Fixes MISRA XXX No functional change.
Signed-off-by: Andrew Cooper <[email protected]> --- CC: Jan Beulich <[email protected]> CC: Roger Pau Monné <[email protected]> CC: Wei Liu <[email protected]> CC: Stefano Stabellini <[email protected]> CC: Julien Grall <[email protected]> CC: Volodymyr Babchuk <[email protected]> CC: Bertrand Marquis <[email protected]> CC: Michal Orzel <[email protected]> CC: Roberto Bagnara <[email protected]> CC: Federico Serafini <[email protected]> CC: [email protected] <[email protected]> Can someone please remind me which MISRA rule is the one about macros aliasing identifiers? --- xen/arch/x86/include/asm/processor.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/processor.h b/xen/arch/x86/include/asm/processor.h index ff62b080afbf..b227cdee8ef3 100644 --- a/xen/arch/x86/include/asm/processor.h +++ b/xen/arch/x86/include/asm/processor.h @@ -126,14 +126,6 @@ static inline int cpu_nr_siblings(unsigned int cpu) return cpu_data[cpu].x86_num_siblings; } -/* - * Generic CPUID function - * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx - * resulting in stale register contents being returned. - */ -#define cpuid(leaf, eax, ebx, ecx, edx) \ - cpuid_count(leaf, 0, eax, ebx, ecx, edx) - /* Some CPUID calls want 'count' to be placed in ecx */ static inline void cpuid_count( unsigned int op, @@ -148,6 +140,21 @@ static inline void cpuid_count( : "0" (op), "c" (count) ); } +/* + * Generic CPUID function + * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx + * resulting in stale register contents being returned. + */ +static inline void cpuid( + unsigned int leaf, + unsigned int *eax, + unsigned int *ebx, + unsigned int *ecx, + unsigned int *edx) +{ + cpuid_count(leaf, 0, eax, ebx, ecx, edx); +} + /* * CPUID functions returning a single datum */ base-commit: f3f6c500e2dbd23af77c207e2cf4b496fffa1b0d -- 2.30.2
