[PATCH v2 07/19] powerpc/rtas: improve function information lookups

Michael Ellerman mpe at ellerman.id.au
Wed Feb 8 22:57:09 AEDT 2023


Nathan Lynch via B4 Submission Endpoint
<devnull+nathanl.linux.ibm.com at kernel.org> writes:
> From: Nathan Lynch <nathanl at linux.ibm.com>
>
> The core RTAS support code and its clients perform two types of lookup
> for RTAS firmware function information.
> 
...
> diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
> index 479a95cb2770..14fe79217c26 100644
> --- a/arch/powerpc/include/asm/rtas.h
> +++ b/arch/powerpc/include/asm/rtas.h
> @@ -16,6 +16,93 @@
>   * Copyright (C) 2001 PPC 64 Team, IBM Corp
>   */
>  
> +#define rtas_fnidx(x_) RTAS_FNIDX__ ## x_

I'd prefer we just spelt it out in full, to aid grepability and
cscope/tags etc.

> +enum rtas_function_index {
> +	rtas_fnidx(CHECK_EXCEPTION),
> +	rtas_fnidx(DISPLAY_CHARACTER),
> +	rtas_fnidx(EVENT_SCAN),
> +	rtas_fnidx(FREEZE_TIME_BASE),
> +	rtas_fnidx(GET_POWER_LEVEL),
> +	rtas_fnidx(GET_SENSOR_STATE),
> +	rtas_fnidx(GET_TERM_CHAR),
> +	rtas_fnidx(GET_TIME_OF_DAY),
> +	rtas_fnidx(IBM_ACTIVATE_FIRMWARE),
> +	rtas_fnidx(IBM_CBE_START_PTCAL),
> +	rtas_fnidx(IBM_CBE_STOP_PTCAL),
> +	rtas_fnidx(IBM_CHANGE_MSI),



cheers


More information about the Linuxppc-dev mailing list