ia64: clean-up header dependency and build process, fix build warning
cover ia64: clean-up header dependency and build process, fix build warning
Randy Dunlap reports the following warning 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 comes from the fact Kbuild descends into arch/ia64/kernel/ twice.
First, to generate <generated/nr-irqs.h>,
Second, to build kernel and module objects.
The warning is emitted in the first descend because it is not the intended usage.
I looked into the code closely, and noticed arch/ia64/kernel/nr-irqs.c was not needed in the first place.
It was separated out of arch/ia64/kernel/asm-offsets.c just because <asm/mca.h> was including too many bogus headers.
IA64 is not actively maintained, and there exists unneeded obsolete code.
The first two patches are the outcome when I played with ARCH=ia64 builds, but not prerequisites for 3/3. Anyway I believe they are nice cleanups and folded in this patch set.
3/3 is the important one to fix the false positive warning, and it is a nice cleanup too.
Masahiro Yamada (3):
ia64: do not typedef struct pal_min_state_area_s
ia64: remove unneeded header includes from <asm/mca.h>
ia64: remove generated/nr-irqs.h generation to fix build warning
arch/ia64/Makefile | 6 ------ arch/ia64/include/asm/irq.h | 4 +++- arch/ia64/include/asm/mca.h | 11 ++++------- arch/ia64/include/asm/pal.h | 4 ++-- arch/ia64/include/asm/sal.h | 2 +- arch/ia64/kernel/Makefile | 5 ----- arch/ia64/kernel/asm-offsets.c | 18 +++++++++--------- arch/ia64/kernel/efi.c | 1 + arch/ia64/kernel/mca.c | 5 +++-- arch/ia64/kernel/mca_drv.c | 2 +- arch/ia64/kernel/nr-irqs.c | 22 ---------------------- 11 files changed, 24 insertions(+), 56 deletions(-) delete mode 100644 arch/ia64/kernel/nr-irqs.c
Signature · 1 line
2.25.1
PATCH 1/3 ia64: do not typedef struct pal_min_state_area_s
Documentation/process/coding-style.rst says:
Please don't use things like ``vps_t``.
It's a **mistake** to use typedef for structures and pointers.
This commit converts as follows:
struct pal_min_state_area_s -> struct pal_min_state_area
pal_min_state_area_t -> struct pal_min_state_areaMy main motivation for this is to slim down the include directives of <asm/mca.h> in the next commit.
Currently, <asm/mca.h> is required to include <asm/pal.h> directly or indirectly due to (pal_min_state_area_t *). Otherwise, it would have no idea what pal_min_state_area_t is.
Replacing it with (struct pal_min_state_area *) will relax the header dependency since it is enough to tell it is a pointer to a structure, and to resolve the size of struct pal_min_state_area. It will make <asm/mca.h> independent of <asm/pal.h>.
<asm/pal.h> typedef's a lot of structures, but it is trivial to convert the others in the same way.
---
arch/ia64/include/asm/mca.h | 2 +- arch/ia64/include/asm/pal.h | 4 ++-- arch/ia64/include/asm/sal.h | 2 +- arch/ia64/kernel/asm-offsets.c | 18 +++++++++--------- arch/ia64/kernel/mca.c | 4 ++-- arch/ia64/kernel/mca_drv.c | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-)
arch/ia64/include/asm/mca.h +1 -1
@@ -83,7 +83,7 @@ struct ia64_sal_os_state {/* common */ unsigned long sal_ra;/* Return address in SAL, physical */ unsigned long sal_gp;/* GP of the SAL - physical */ -pal_min_state_area_t *pal_min_state;/* from R17. physical in asm, virtual in C */ +struct pal_min_state_area *pal_min_state;/* from R17. physical in asm, virtual in C */ /* Previous values of IA64_KR(CURRENT) and IA64_KR(CURRENT_STACK). * Note: if the MCA/INIT recovery code wants to resume to a new context * then it must change these values to reflect the new kernel stack.
arch/ia64/include/asm/pal.h +2 -2
@@ -750,7 +750,7 @@ typedef union pal_mc_error_info_u {* for PAL. */ -typedef struct pal_min_state_area_s { +struct pal_min_state_area {u64 pmsa_nat_bits;/* nat bits for saved GRs */ u64 pmsa_gr[15 ];/* GR1 - GR15 */ u64 pmsa_bank0_gr[16 ];/* GR16 - GR31 */
@@ -766,7 +766,7 @@ typedef struct pal_min_state_area_s {u64 pmsa_xfs;/* previous ifs */ u64 pmsa_br1;/* branch register 1 */ u64 pmsa_reserved[70 ];/* pal_min_state_area should total to 1KB */ -} pal_min_state_area_t; +};struct ia64_pal_retval {
arch/ia64/include/asm/sal.h +1 -1
@@ -385,7 +385,7 @@ typedef struct sal_processor_static_info { fr :1 , reserved : 58; } valid; -pal_min_state_area_t min_state_area; +struct pal_min_state_area min_state_area;u64 br[8 ];u64 cr[128 ];u64 ar[128 ];
arch/ia64/kernel/asm-offsets.c +9 -9
@@ -245,23 +245,23 @@ void foo(void)BLANK ();DEFINE (IA64_PMSA_GR_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_gr)); + offsetof(struct pal_min_state_area , pmsa_gr));DEFINE (IA64_PMSA_BANK1_GR_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_bank1_gr)); + offsetof(struct pal_min_state_area , pmsa_bank1_gr));DEFINE (IA64_PMSA_PR_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_pr)); + offsetof(struct pal_min_state_area , pmsa_pr));DEFINE (IA64_PMSA_BR0_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_br0)); + offsetof(struct pal_min_state_area , pmsa_br0));DEFINE (IA64_PMSA_RSC_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_rsc)); + offsetof(struct pal_min_state_area , pmsa_rsc));DEFINE (IA64_PMSA_IIP_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_iip)); + offsetof(struct pal_min_state_area , pmsa_iip));DEFINE (IA64_PMSA_IPSR_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_ipsr)); + offsetof(struct pal_min_state_area , pmsa_ipsr));DEFINE (IA64_PMSA_IFS_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_ifs)); + offsetof(struct pal_min_state_area , pmsa_ifs));DEFINE (IA64_PMSA_XIP_OFFSET , - offsetof (struct pal_min_state_area_s , pmsa_xip)); + offsetof(struct pal_min_state_area , pmsa_xip));BLANK ();/* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */
arch/ia64/kernel/mca.c +2 -2
@@ -894,7 +894,7 @@ static void finish_pt_regs(struct pt_regs *regs, struct ia64_sal_os_state *sos, unsigned long *nat) { - const pal_min_state_area_t *ms = sos->pal_min_state; + const struct pal_min_state_area *ms = sos->pal_min_state;const u64 *bank;/* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use
@@ -970,7 +970,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,char *p;ia64_va va;extern char ia64_leave_kernel[];/* Need asm address, not function descriptor */ -const pal_min_state_area_t *ms = sos->pal_min_state; +const struct pal_min_state_area *ms = sos->pal_min_state;struct task_struct *previous_current;struct pt_regs *old_regs;struct switch_stack *old_sw;
arch/ia64/kernel/mca_drv.c +1 -1
@@ -496,7 +496,7 @@ recover_from_read_error(slidx_table_t *slidx, struct ia64_sal_os_state *sos) {u64 target_identifier; -pal_min_state_area_t *pmsa; +struct pal_min_state_area *pmsa;struct ia64_psr *psr1, *psr2;ia64_fptr_t *mca_hdlr_bh = (ia64_fptr_t *)mca_handler_bhhook;
Signature · 1 line
2.25.1
Re: [PATCH 1/3] ia64: do not typedef struct pal_min_state_area_s
Quoted 22 lines · Masahiro Yamada
Documentation/process/coding-style.rstsays:Please don't use things like ``vps_t``.
It's a **mistake** to use typedef for structures and pointers.This commit converts as follows:
struct pal_min_state_area_s -> struct pal_min_state_area pal_min_state_area_t -> struct pal_min_state_areaMy main motivation for this is to slim down the include directives of <
asm/mca.h> in the next commit.Currently, <
asm/mca.h> is required to include <asm/pal.h> directly or indirectly due to (pal_min_state_area_t*). Otherwise, it would have no idea whatpal_min_state_area_tis.Replacing it with (struct
pal_min_state_area*) will relax the header dependency since it is enough to tell it is a pointer to a structure, and to resolve the size of structpal_min_state_area. It will make <asm/mca.h> independent of <asm/pal.h>.
Quoted 4 lines
<
asm/pal.h> typedef's a lot of structures, but it is trivial to convert the others in the same way.Signed-off-by Masahiro Yamada <[email protected]>
Quoted 10 lines
---
arch/ia64/include/asm/mca.h | 2 +- arch/ia64/include/asm/pal.h | 4 ++-- arch/ia64/include/asm/sal.h | 2 +- arch/ia64/kernel/asm-offsets.c | 18 +++++++++--------- arch/ia64/kernel/mca.c | 4 ++-- arch/ia64/kernel/mca_drv.c | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-)
thanks.
Signature · 1 line
~Randy
PATCH 2/3 ia64: remove unneeded header includes from <asm/mca.h>
In reply to Masahiro Yamada<asm/mca.h> includes too many unneeded headers.
This commit cuts off a lot of header includes.
What we need to include are:
- <linux/percpu.h> for DECLARE_PER_CPU(u64, ia64_mca_pal_base)
- <linux/threads.h> for NR_CPUS
- <linux/types.h> for u8, u64, size_t, etc.
- <asm/ptrace.h> for KERNEL_STACK_SIZE
The other header includes are actually unneeded.
<asm/mca.h> previously included 436 headers, and now it includes only 138. I confirmed <asm/mca.h> is still self-contained.
---
arch/ia64/include/asm/mca.h | 9 +++------ arch/ia64/kernel/efi.c | 1 + arch/ia64/kernel/mca.c | 1 + 3 files changed, 5 insertions(+), 6 deletions(-)
arch/ia64/include/asm/mca.h +3 -6
@@ -14,13 +14,10 @@#if !defined(__ASSEMBLY__) -#include <linux/interrupt.h> +#include <linux/percpu.h> +#include <linux/threads.h> #include <linux/types.h> - -#include <asm/param.h> -#include <asm/sal.h> -#include <asm/processor.h> -#include <asm/mca_asm.h> +#include <asm/ptrace.h> #define IA64_MCA_RENDEZ_TIMEOUT (20 * 1000)/* value in milliseconds - 20 seconds */
arch/ia64/kernel/efi.c +1 -0
@@ -39,6 +39,7 @@#include <asm/meminit.h> #include <asm/processor.h> #include <asm/mca.h> +#include <asm/sal.h> #include <asm/setup.h> #include <asm/tlbflush.h>
arch/ia64/kernel/mca.c +1 -0
@@ -96,6 +96,7 @@#include <asm/ptrace.h> #include <asm/sal.h> #include <asm/mca.h> +#include <asm/mca_asm.h> #include <asm/kexec.h> #include <asm/irq.h>
Signature · 1 line
2.25.1
Re: [PATCH 2/3] ia64: remove unneeded header includes from <asm/mca.h>
Quoted 11 lines · Masahiro Yamada
<
asm/mca.h> includes too many unneeded headers.This commit cuts off a lot of header includes.
What we need to include are:
- <
linux/percpu.h> forDECLARE_PER_CPU(u64, ia64_mca_pal_base)
- <linux/threads.h> forNR_CPUS
- <linux/types.h> for u8, u64,size_t, etc.
- <asm/ptrace.h> forKERNEL_STACK_SIZE
Quoted 4 lines
The other header includes are actually unneeded.
<
asm/mca.h> previously included 436 headers, and now it includes only 138. I confirmed <asm/mca.h> is still self-contained.
Nice!
Quoted 1 line
Signed-off-by Masahiro Yamada <[email protected]>
Quoted 7 lines
---
arch/ia64/include/asm/mca.h | 9 +++------ arch/ia64/kernel/efi.c | 1 + arch/ia64/kernel/mca.c | 1 + 3 files changed, 5 insertions(+), 6 deletions(-)
thanks.
Signature · 1 line
~Randy
Re: [PATCH 2/3] ia64: remove unneeded header includes from <asm/mca.h>
In reply to Masahiro YamadaQuoted 12 lines · Masahiro Yamada
<
asm/mca.h> includes too many unneeded headers.This commit cuts off a lot of header includes.
What we need to include are:
- <
linux/percpu.h> forDECLARE_PER_CPU(u64, ia64_mca_pal_base)
- <linux/threads.h> forNR_CPUS
- <linux/types.h> for u8, u64,size_t, etc.
- <asm/ptrace.h> forKERNEL_STACK_SIZE
Quoted 6 lines
The other header includes are actually unneeded.
<
asm/mca.h> previously included 436 headers, and now it includes only 138. I confirmed <asm/mca.h> is still self-contained.Signed-off-by Masahiro Yamada <[email protected]>
Quoted 55 lines
---
arch/ia64/include/asm/mca.h | 9 +++------ arch/ia64/kernel/efi.c | 1 + arch/ia64/kernel/mca.c | 1 + 3 files changed, 5 insertions(+), 6 deletions(-)arch/ia64/include/asm/mca.h +3
-6@@ -14,13 +14,10 @@#if !defined(__ASSEMBLY__) -#include <linux/interrupt.h> +#include <linux/percpu.h> +#include <linux/threads.h> #include <linux/types.h> - -#include <asm/param.h> -#include <asm/sal.h> -#include <asm/processor.h> -#include <asm/mca_asm.h> +#include <asm/ptrace.h> #define IA64_MCA_RENDEZ_TIMEOUT (20 * 1000)/* value in milliseconds - 20 seconds */ arch/ia64/kernel/efi.c +1
-0@@ -39,6 +39,7 @@#include <asm/meminit.h> #include <asm/processor.h> #include <asm/mca.h> +#include <asm/sal.h> #include <asm/setup.h> #include <asm/tlbflush.h> arch/ia64/kernel/mca.c +1
-1@@ -96,6 +96,7 @@#include <asm/ptrace.h> #include <asm/sal.h> #include <asm/mca.h> +#include <asm/mca_asm.h> #include <asm/kexec.h> #include <asm/irq.h> --2.25.1
PATCH 3/3 ia64: remove generated/nr-irqs.h generation to fix build warning
In reply to Masahiro YamadaRandy 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>.
---
arch/ia64/Makefile | 6 ------ arch/ia64/include/asm/irq.h | 4 +++- arch/ia64/kernel/Makefile | 5 ----- arch/ia64/kernel/nr-irqs.c | 22 ---------------------- 4 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 arch/ia64/kernel/nr-irqs.c
arch/ia64/Makefile +0 -6
@@ -87,9 +87,3 @@ define archhelp echo ' install - Install compressed kernel image' echo '* unwcheck - Check vmlinux for invalid unwind info' endef - -archprepare: make_nr_irqs_h -PHONY += make_nr_irqs_h - -make_nr_irqs_h: - $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h
arch/ia64/include/asm/irq.h +3 -1
@@ -14,7 +14,9 @@#include <linux/types.h> #include <linux/cpumask.h> -#include <generated/nr-irqs.h> +#include <asm/native/irq.h> + +#define NR_IRQS IA64_NATIVE_NR_IRQSstatic __inline__int irq_canonicalize (int irq)
arch/ia64/kernel/Makefile +0 -5
@@ -48,8 +48,3 @@ CFLAGS_traps.o += -mfixed-rangeò-f5,f16-f31 # The gate DSO image is built using a special linker script. include $(src)/Makefile.gate - -include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE - $(call filechk,offsets,__ASM_NR_IRQS_H__) - -targets += nr-irqs.s
arch/ia64/kernel/nr-irqs.c deleted +0 -22
@@ -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 )); -}
Signature · 1 line
2.25.1
Re: [PATCH 3/3] ia64: remove generated/nr-irqs.h generation to fix build warning
Quoted 24 lines · Masahiro Yamada
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 moduleMakefile. 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
Kbuilddescends intoarch/ia64/kernelto generateinclude/generated/nr-irqs.hinstead of any kind of kernel objects.
arch/ia64/kernel/nr-irqs.cwas introduced by commit213060a4d699("[IA64] pvops: paravirtualizeNR_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, makingNR_IRQSandIA64_NATIVE_NR_IRQSalways match.So, the following hard-coding now works:
#define NR_IRQS IA64_NATIVE_NR_IRQS
Quoted 7 lines
If you need to re-introduce
NR_IRQS= max(...) gimmick in the future, please try to implement it inasm-offsets.cinstead of a separate file. It will be possible because the header inclusion has been consolidated to makeasm-offsets.cindependent of <asm/irqs.h>.Reported-by Randy Dunlap <[email protected]>Signed-off-by Masahiro Yamada <[email protected]>
Quoted 9 lines
---
arch/ia64/Makefile | 6 ------ arch/ia64/include/asm/irq.h | 4 +++- arch/ia64/kernel/Makefile | 5 ----- arch/ia64/kernel/nr-irqs.c | 22 ---------------------- 4 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 arch/ia64/kernel/nr-irqs.c
thanks.
Signature · 1 line
~Randy
Re: [PATCH 3/3] ia64: remove generated/nr-irqs.h generation to fix build warning
In reply to Masahiro YamadaQuoted 25 lines · Masahiro Yamada
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 moduleMakefile. 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
Kbuilddescends intoarch/ia64/kernelto generateinclude/generated/nr-irqs.hinstead of any kind of kernel objects.
arch/ia64/kernel/nr-irqs.cwas introduced by commit213060a4d699("[IA64] pvops: paravirtualizeNR_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, makingNR_IRQSandIA64_NATIVE_NR_IRQSalways match.So, the following hard-coding now works:
#define NR_IRQS IA64_NATIVE_NR_IRQS
Quoted 7 lines
If you need to re-introduce
NR_IRQS= max(...) gimmick in the future, please try to implement it inasm-offsets.cinstead of a separate file. It will be possible because the header inclusion has been consolidated to makeasm-offsets.cindependent of <asm/irqs.h>.Reported-by Randy Dunlap <[email protected]>Signed-off-by Masahiro Yamada <[email protected]>
This build issue is still remaining.
I will send this series in the next MW
via my kbuild tree.
Quoted 82 lines
---
arch/ia64/Makefile | 6 ------ arch/ia64/include/asm/irq.h | 4 +++- arch/ia64/kernel/Makefile | 5 ----- arch/ia64/kernel/nr-irqs.c | 22 ---------------------- 4 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 arch/ia64/kernel/nr-irqs.carch/ia64/Makefile +0
-6@@ -87,9 +87,3 @@ define archhelp echo ' install - Install compressed kernel image' echo '* unwcheck - Check vmlinux for invalid unwind info' endef - -archprepare: make_nr_irqs_h -PHONY += make_nr_irqs_h - -make_nr_irqs_h: - $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.harch/ia64/include/asm/irq.h +3
-1@@ -14,7 +14,9 @@#include <linux/types.h> #include <linux/cpumask.h> -#include <generated/nr-irqs.h> +#include <asm/native/irq.h> + +#define NR_IRQS IA64_NATIVE_NR_IRQSstatic __inline__int irq_canonicalize (int irq)arch/ia64/kernel/Makefile +0
-5@@ -48,8 +48,3 @@ CFLAGS_traps.o += -mfixed-rangeò-f5,f16-f31 # The gate DSO image is built using a special linker script. include $(src)/Makefile.gate - -include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE - $(call filechk,offsets,__ASM_NR_IRQS_H__) - -targets += nr-irqs.sarch/ia64/kernel/nr-irqs.c deleted +0
-23@@ -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 )); -} --2.25.1
Signature · 2 lines
Best Regards Masahiro Yamada
Hi, IA64 maintainers,
Could you check this series, please?
The build warning is still remaining.
Quoted 54 lines · Masahiro Yamada
Randy Dunlap reports the following warning 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 moduleMakefile. Use obj-y/m instead.This comes from the fact
Kbuilddescends intoarch/ia64/kernel/twice.First, to generate <
generated/nr-irqs.h>,
Second, to build kernel and module objects.The warning is emitted in the first descend because it is not the intended usage.
I looked into the code closely, and noticed
arch/ia64/kernel/nr-irqs.cwas not needed in the first place.It was separated out of
arch/ia64/kernel/asm-offsets.cjust because <asm/mca.h> was including too many bogus headers.IA64 is not actively maintained, and there exists unneeded obsolete code.
The first two patches are the outcome when I played with ARCH=ia64 builds, but not prerequisites for 3/3. Anyway I believe they are nice cleanups and folded in this patch set.
3/3 is the important one to fix the false positive warning, and it is a nice cleanup too.
Masahiro Yamada (3):
ia64: do not typedef structpal_min_state_area_s
ia64: remove unneeded header includes from <asm/mca.h>
ia64: removegenerated/nr-irqs.hgeneration to fix build warningarch/ia64/Makefile | 6 ------ arch/ia64/include/asm/irq.h | 4 +++- arch/ia64/include/asm/mca.h | 11 ++++------- arch/ia64/include/asm/pal.h | 4 ++-- arch/ia64/include/asm/sal.h | 2 +- arch/ia64/kernel/Makefile | 5 ----- arch/ia64/kernel/asm-offsets.c | 18 +++++++++--------- arch/ia64/kernel/efi.c | 1 + arch/ia64/kernel/mca.c | 5 +++-- arch/ia64/kernel/mca_drv.c | 2 +- arch/ia64/kernel/nr-irqs.c | 22 ---------------------- 11 files changed, 24 insertions(+), 56 deletions(-) delete mode 100644 arch/ia64/kernel/nr-irqs.c--
2.25.1
Signature · 2 lines
Best Regards Masahiro Yamada