[PATCH 0/6] Add an asm-generic cpuinfo_op declaration

Conor.Dooley at microchip.com Conor.Dooley at microchip.com
Mon Aug 22 03:05:28 PDT 2022


On 22/08/2022 10:36, Geert Uytterhoeven wrote:
> On Sun, Aug 21, 2022 at 1:36 PM Conor Dooley <mail at conchuod.ie> wrote:
>>   arch/microblaze/include/asm/processor.h | 2 +-
>>   arch/riscv/include/asm/processor.h      | 1 +
>>   arch/s390/include/asm/processor.h       | 2 +-
>>   arch/sh/include/asm/processor.h         | 2 +-
>>   arch/sparc/include/asm/cpudata.h        | 3 +--
>>   arch/x86/include/asm/processor.h        | 2 +-
>>   include/asm-generic/processor.h         | 7 +++++++
>>   7 files changed, 13 insertions(+), 6 deletions(-)
>>   create mode 100644 include/asm-generic/processor.h
> 
> I was a bit surprised not to find fs/proc/cpuinfo.c in the diffstat
> above. That file already has an external declaration for cpuinfo_op,
> and uses it rather unconditionally (that is, if CONFIG_PROC_FS=y)
> on all architectures.
> 
> So I think you can just move that to include/linux/processor.h, include
> the latter everywhere, and drop all architecture-specific copies.

Hey Geert,
This is the sort of thing I was really hoping to hear, so fine by
me.. When you say "everywhere", I assume you mean in every arch
and not just the ones listed here that already have it in an arch
specific header?

Thanks,
Conor.




More information about the linux-riscv mailing list