Re: [PATCH v3 1/2] cacheinfo: Add function to get cacheinfo for a given (cpu, cachelevel)
From: Borislav Petkov
Date: Sat Jun 08 2024 - 08:12:48 EST
On Thu, Jun 06, 2024 at 07:58:29PM +0000, Luck, Tony wrote:
> So this is #include hell that many others have complained about.
Starts much earlier:
In file included from ./include/linux/cpu.h:17,
from ./include/linux/cacheinfo.h:6,
from ./arch/riscv/include/asm/cacheinfo.h:9,
from ./arch/riscv/include/asm/elf.h:16,
from ./include/linux/elf.h:6,
from ./include/linux/module.h:19,
from ./include/linux/device/driver.h:21,
from ./include/linux/device.h:32,
from ./include/linux/acpi.h:14,
from drivers/irqchip/irqchip.c:11:
./include/linux/node.h:96:25: error: field 'dev' has incomplete type
96 | struct device dev;
|
And yeah, this is an abomination.
> How much do you *REALLY* want that lockdep_assert_cpus_held() to be in <linux/cacheinfo.h>
If we had an easy fix sure but this really is a nightmare after trying
it a bit here too.
Oh well, some other time.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette