diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-08-29 08:15:24 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-02-11 23:11:19 +0300 |
commit | fa1e160b08e8ceabecbd5b42d8268278197c3e67 (patch) | |
tree | 79af41dbe85dd1ad2c3fad9c850bbbd30852438e /arch/ia64/kernel/nr-irqs.c | |
parent | a5b7c61ee6ad475e2d7dd1e374f45329bd38e687 (diff) | |
download | linux-fa1e160b08e8ceabecbd5b42d8268278197c3e67.tar.xz |
ia64: remove generated/nr-irqs.h generation to fix build warning
Randy reports the following warning when building ARCH=ia64 with
CONFIG_IA64_PALINFO=m:
../scripts/Makefile.build:68: 'arch/ia64/kernel/palinfo.ko' will not be built even though obj-m is specified.
../scripts/Makefile.build:69: You cannot use subdir-y/m to visit a module Makefile. Use obj-y/m instead.
This message is actually false-positive, and you can get palinfo.ko
correctly built. It is emitted in the archprepare stage, where Kbuild
descends into arch/ia64/kernel to generate include/generated/nr-irqs.h
instead of any kind of kernel objects.
arch/ia64/kernel/nr-irqs.c was introduced by commit 213060a4d699
("[IA64] pvops: paravirtualize NR_IRQS") to pre-calculate:
NR_IRQS = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, FOO_NR_IRQS...)
Since commit d52eefb47d4e ("ia64/xen: Remove Xen support for ia64"), this
union contains just one field, making NR_IRQS and IA64_NATIVE_NR_IRQS
always match.
So, the following hard-coding now works:
#define NR_IRQS IA64_NATIVE_NR_IRQS
If you need to re-introduce NR_IRQS = max(...) gimmick in the future,
please try to implement it in asm-offsets.c instead of a separate file.
It will be possible because the header inclusion has been consolidated
to make asm-offsets.c independent of <asm/irqs.h>.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Diffstat (limited to 'arch/ia64/kernel/nr-irqs.c')
-rw-r--r-- | arch/ia64/kernel/nr-irqs.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/ia64/kernel/nr-irqs.c b/arch/ia64/kernel/nr-irqs.c deleted file mode 100644 index f2633b22d3be..000000000000 --- a/arch/ia64/kernel/nr-irqs.c +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * calculate - * NR_IRQS = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, FOO_NR_IRQS...) - * depending on config. - * This must be calculated before processing asm-offset.c. - */ - -#define ASM_OFFSETS_C 1 - -#include <linux/kbuild.h> -#include <linux/threads.h> -#include <asm/native/irq.h> - -void foo(void) -{ - union paravirt_nr_irqs_max { - char ia64_native_nr_irqs[IA64_NATIVE_NR_IRQS]; - }; - - DEFINE(NR_IRQS, sizeof (union paravirt_nr_irqs_max)); -} |