Skip to content

Commit fa1e160

Browse files
committed
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 213060a ("[IA64] pvops: paravirtualize NR_IRQS") to pre-calculate: NR_IRQS = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, FOO_NR_IRQS...) Since commit d52eefb ("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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]>
1 parent a5b7c61 commit fa1e160

File tree

4 files changed

+3
-34
lines changed

4 files changed

+3
-34
lines changed

arch/ia64/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,3 @@ define archhelp
8686
echo ' install - Install compressed kernel image'
8787
echo '* unwcheck - Check vmlinux for invalid unwind info'
8888
endef
89-
90-
archprepare: make_nr_irqs_h
91-
PHONY += make_nr_irqs_h
92-
93-
make_nr_irqs_h:
94-
$(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h

arch/ia64/include/asm/irq.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
#include <linux/types.h>
1616
#include <linux/cpumask.h>
17-
#include <generated/nr-irqs.h>
17+
#include <asm/native/irq.h>
18+
19+
#define NR_IRQS IA64_NATIVE_NR_IRQS
1820

1921
static __inline__ int
2022
irq_canonicalize (int irq)

arch/ia64/kernel/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,3 @@ CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
4747

4848
# The gate DSO image is built using a special linker script.
4949
include $(src)/Makefile.gate
50-
51-
include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
52-
$(call filechk,offsets,__ASM_NR_IRQS_H__)
53-
54-
targets += nr-irqs.s

arch/ia64/kernel/nr-irqs.c

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)