* [PATCH 6/8] x86: xen: audit and remove any unnecessary uses of module.h [not found] <20160714001901.31603-1-paul.gortmaker@windriver.com> @ 2016-07-14 0:18 ` Paul Gortmaker 2016-07-14 3:59 ` Juergen Gross 2016-07-14 13:04 ` [PATCH 0/8] x86: audit and remove needless module.h includes Ingo Molnar [not found] ` <20160714130443.GA27637@gmail.com> 2 siblings, 1 reply; 7+ messages in thread From: Paul Gortmaker @ 2016-07-14 0:18 UTC (permalink / raw) To: linux-kernel Cc: Juergen Gross, x86, Paul Gortmaker, Ingo Molnar, David Vrabel, H. Peter Anvin, xen-devel, Boris Ostrovsky, Thomas Gleixner Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance for the presence of either and replace as needed. Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: David Vrabel <david.vrabel@citrix.com> Cc: Juergen Gross <jgross@suse.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Cc: xen-devel@lists.xenproject.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- arch/x86/xen/debugfs.c | 1 - arch/x86/xen/enlighten.c | 2 +- arch/x86/xen/mmu.c | 3 ++- arch/x86/xen/p2m.c | 2 +- arch/x86/xen/platform-pci-unplug.c | 2 +- arch/x86/xen/setup.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c index c8377fb26cdf..1daff5545c0a 100644 --- a/arch/x86/xen/debugfs.c +++ b/arch/x86/xen/debugfs.c @@ -1,7 +1,6 @@ #include <linux/init.h> #include <linux/debugfs.h> #include <linux/slab.h> -#include <linux/module.h> #include "debugfs.h" diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 575cea4bab94..88845bb50b7b 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -23,7 +23,7 @@ #include <linux/sched.h> #include <linux/kprobes.h> #include <linux/bootmem.h> -#include <linux/module.h> +#include <linux/export.h> #include <linux/mm.h> #include <linux/page-flags.h> #include <linux/highmem.h> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 67433714b791..7d5afdb417cc 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -43,7 +43,8 @@ #include <linux/debugfs.h> #include <linux/bug.h> #include <linux/vmalloc.h> -#include <linux/module.h> +#include <linux/export.h> +#include <linux/init.h> #include <linux/gfp.h> #include <linux/memblock.h> #include <linux/seq_file.h> diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index dd2a49a8aacc..37129db76d33 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -60,7 +60,7 @@ */ #include <linux/init.h> -#include <linux/module.h> +#include <linux/export.h> #include <linux/list.h> #include <linux/hash.h> #include <linux/sched.h> diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c index 9586ff32810c..d37a0c7f82cb 100644 --- a/arch/x86/xen/platform-pci-unplug.c +++ b/arch/x86/xen/platform-pci-unplug.c @@ -21,7 +21,7 @@ #include <linux/init.h> #include <linux/io.h> -#include <linux/module.h> +#include <linux/export.h> #include <xen/platform_pci.h> #include "xen-ops.h" diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index e345891450c3..176425233e4d 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -4,7 +4,7 @@ * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007 */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/sched.h> #include <linux/mm.h> #include <linux/pm.h> -- 2.8.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 6/8] x86: xen: audit and remove any unnecessary uses of module.h 2016-07-14 0:18 ` [PATCH 6/8] x86: xen: audit and remove any unnecessary uses of module.h Paul Gortmaker @ 2016-07-14 3:59 ` Juergen Gross 0 siblings, 0 replies; 7+ messages in thread From: Juergen Gross @ 2016-07-14 3:59 UTC (permalink / raw) To: Paul Gortmaker, linux-kernel Cc: x86, Ingo Molnar, David Vrabel, H. Peter Anvin, xen-devel, Boris Ostrovsky, Thomas Gleixner On 14/07/16 02:18, Paul Gortmaker wrote: > Historically a lot of these existed because we did not have > a distinction between what was modular code and what was providing > support to modules via EXPORT_SYMBOL and friends. That changed > when we forked out support for the latter into the export.h file. > > This means we should be able to reduce the usage of module.h > in code that is obj-y Makefile or bool Kconfig. The advantage > in doing so is that module.h itself sources about 15 other headers; > adding significantly to what we feed cpp, and it can obscure what > headers we are effectively using. > > Since module.h was the source for init.h (for __init) and for > export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance > for the presence of either and replace as needed. > > Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> > Cc: David Vrabel <david.vrabel@citrix.com> > Cc: Juergen Gross <jgross@suse.com> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: "H. Peter Anvin" <hpa@zytor.com> > Cc: x86@kernel.org > Cc: xen-devel@lists.xenproject.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Juergen Gross <jgross@suse.com> Juergen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/8] x86: audit and remove needless module.h includes [not found] <20160714001901.31603-1-paul.gortmaker@windriver.com> 2016-07-14 0:18 ` [PATCH 6/8] x86: xen: audit and remove any unnecessary uses of module.h Paul Gortmaker @ 2016-07-14 13:04 ` Ingo Molnar [not found] ` <20160714130443.GA27637@gmail.com> 2 siblings, 0 replies; 7+ messages in thread From: Ingo Molnar @ 2016-07-14 13:04 UTC (permalink / raw) To: Paul Gortmaker Cc: Juergen Gross, xen-devel, kvm, Radim Krčmář, x86, linux-kernel, Ingo Molnar, David Vrabel, H. Peter Anvin, Paolo Bonzini, Boris Ostrovsky, Arjan van de Ven, Thomas Gleixner * Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > To that end, I have done allmodconfig, allyesconfig and allnoconfig > for both 32 bit and 64 bit x86 with these changes on the linux-next > from today, which presumably has an up to date copy of tip in it. It does, still I get this on allnoconfig with your patches applied: arch/x86/kernel/setup_percpu.c: In function ‘setup_percpu_segment’: arch/x86/kernel/setup_percpu.c:159:2: error: implicit declaration of function ‘pack_descriptor’ [-Werror=implicit-function-declaration] pack_descriptor(&gdt, per_cpu_offset(cpu), 0xFFFFF, ^ arch/x86/kernel/setup_percpu.c:162:2: error: implicit declaration of function ‘write_gdt_entry’ [-Werror=implicit-function-declaration] write_gdt_entry(get_cpu_gdt_table(cpu), ^ arch/x86/kernel/setup_percpu.c:162:18: error: implicit declaration of function ‘get_cpu_gdt_table’ [-Werror=implicit-function-declaration] write_gdt_entry(get_cpu_gdt_table(cpu), I'll continue testing with the setup_percpu.c change left out. Thanks, Ingo _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20160714130443.GA27637@gmail.com>]
* Re: [PATCH 0/8] x86: audit and remove needless module.h includes [not found] ` <20160714130443.GA27637@gmail.com> @ 2016-07-14 15:18 ` Paul Gortmaker [not found] ` <20160714151835.GO4194@windriver.com> 1 sibling, 0 replies; 7+ messages in thread From: Paul Gortmaker @ 2016-07-14 15:18 UTC (permalink / raw) To: Ingo Molnar Cc: Juergen Gross, xen-devel, kvm, Radim Krčmář, x86, linux-kernel, Ingo Molnar, David Vrabel, H. Peter Anvin, Paolo Bonzini, Boris Ostrovsky, Arjan van de Ven, Thomas Gleixner [Re: [PATCH 0/8] x86: audit and remove needless module.h includes] On 14/07/2016 (Thu 15:04) Ingo Molnar wrote: > > * Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > > > To that end, I have done allmodconfig, allyesconfig and allnoconfig > > for both 32 bit and 64 bit x86 with these changes on the linux-next > > from today, which presumably has an up to date copy of tip in it. > > It does, still I get this on allnoconfig with your patches applied: Took me a while to figure out why I didn't see this; I was able to finally reproduce it on x86-32 with allnoconfig but CONFIG_SMP=y. > > arch/x86/kernel/setup_percpu.c: In function ‘setup_percpu_segment’: > arch/x86/kernel/setup_percpu.c:159:2: error: implicit declaration of function > ‘pack_descriptor’ [-Werror=implicit-function-declaration] > pack_descriptor(&gdt, per_cpu_offset(cpu), 0xFFFFF, > ^ > arch/x86/kernel/setup_percpu.c:162:2: error: implicit declaration of function > ‘write_gdt_entry’ [-Werror=implicit-function-declaration] > write_gdt_entry(get_cpu_gdt_table(cpu), > ^ > arch/x86/kernel/setup_percpu.c:162:18: error: implicit declaration of function > ‘get_cpu_gdt_table’ [-Werror=implicit-function-declaration] > write_gdt_entry(get_cpu_gdt_table(cpu), All three of these guys live in asm/desc.h and adding that to the top of arch/x86/kernel/setup_percpu.c asm include list seems to fix the reproducer I now have here. > > I'll continue testing with the setup_percpu.c change left out. Let me know if you want a resend or if you want to just add the asm/desc.h locally or ... Paul. -- > > Thanks, > > Ingo _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20160714151835.GO4194@windriver.com>]
* Re: [PATCH 0/8] x86: audit and remove needless module.h includes [not found] ` <20160714151835.GO4194@windriver.com> @ 2016-07-14 18:39 ` Ingo Molnar [not found] ` <20160714183903.GA16975@gmail.com> 1 sibling, 0 replies; 7+ messages in thread From: Ingo Molnar @ 2016-07-14 18:39 UTC (permalink / raw) To: Paul Gortmaker Cc: Juergen Gross, xen-devel, kvm, Radim Krčmář, x86, linux-kernel, Ingo Molnar, David Vrabel, H. Peter Anvin, Paolo Bonzini, Boris Ostrovsky, Arjan van de Ven, Thomas Gleixner * Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > > I'll continue testing with the setup_percpu.c change left out. > > Let me know if you want a resend or if you want to just add the > asm/desc.h locally or ... So I tried the asm/desc.h but saw other build failures - for now gave up. Can we do this in a separate patch? Thanks, Ingo _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20160714183903.GA16975@gmail.com>]
* Re: [PATCH 0/8] x86: audit and remove needless module.h includes [not found] ` <20160714183903.GA16975@gmail.com> @ 2016-07-14 18:46 ` Paul Gortmaker [not found] ` <20160714184603.GR4194@windriver.com> 1 sibling, 0 replies; 7+ messages in thread From: Paul Gortmaker @ 2016-07-14 18:46 UTC (permalink / raw) To: Ingo Molnar Cc: Juergen Gross, xen-devel, kvm, Radim Krčmář, x86, linux-kernel, Ingo Molnar, David Vrabel, H. Peter Anvin, Paolo Bonzini, Boris Ostrovsky, Arjan van de Ven, Thomas Gleixner [Re: [PATCH 0/8] x86: audit and remove needless module.h includes] On 14/07/2016 (Thu 20:39) Ingo Molnar wrote: > > * Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > > > > I'll continue testing with the setup_percpu.c change left out. > > > > Let me know if you want a resend or if you want to just add the > > asm/desc.h locally or ... > > So I tried the asm/desc.h but saw other build failures - for now gave up. > Can we do this in a separate patch? Yes of course. In the meantime I'll investigate further and add more configs to my testing. Is there a list of the configs used for sanity testing tip somewhere? Thanks, Paul. -- > > Thanks, > > Ingo _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20160714184603.GR4194@windriver.com>]
* Re: [PATCH 0/8] x86: audit and remove needless module.h includes [not found] ` <20160714184603.GR4194@windriver.com> @ 2016-07-14 18:56 ` Ingo Molnar 0 siblings, 0 replies; 7+ messages in thread From: Ingo Molnar @ 2016-07-14 18:56 UTC (permalink / raw) To: Paul Gortmaker Cc: Juergen Gross, xen-devel, kvm, Radim Krčmář, x86, linux-kernel, Ingo Molnar, David Vrabel, H. Peter Anvin, Paolo Bonzini, Boris Ostrovsky, Arjan van de Ven, Thomas Gleixner * Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > [Re: [PATCH 0/8] x86: audit and remove needless module.h includes] On 14/07/2016 (Thu 20:39) Ingo Molnar wrote: > > > > > * Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > > > > > > I'll continue testing with the setup_percpu.c change left out. > > > > > > Let me know if you want a resend or if you want to just add the > > > asm/desc.h locally or ... > > > > So I tried the asm/desc.h but saw other build failures - for now gave up. > > Can we do this in a separate patch? > > Yes of course. In the meantime I'll investigate further and add more > configs to my testing. Is there a list of the configs used for sanity > testing tip somewhere? No need for you to complicate your testing (unless you have enough hardware resources for that) - I can deal with the occasional build failure. Since I eventually create and boot randconfigs there's no fixed set of configs. :-/ That I enabled SMP on the "allnoconfig" (and forgot about it!) has to do with the fact that even my allnoconfigs are typically bootable (on one of my test systems) so there's a handful of pre-baked configs that always get enabled. But other than those small perturbations I do similar testing to what you did: all{no|def|mod|yes}config on x86-{32|64}, plus randconfigs. Thanks, Ingo _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-07-14 18:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160714001901.31603-1-paul.gortmaker@windriver.com>
2016-07-14 0:18 ` [PATCH 6/8] x86: xen: audit and remove any unnecessary uses of module.h Paul Gortmaker
2016-07-14 3:59 ` Juergen Gross
2016-07-14 13:04 ` [PATCH 0/8] x86: audit and remove needless module.h includes Ingo Molnar
[not found] ` <20160714130443.GA27637@gmail.com>
2016-07-14 15:18 ` Paul Gortmaker
[not found] ` <20160714151835.GO4194@windriver.com>
2016-07-14 18:39 ` Ingo Molnar
[not found] ` <20160714183903.GA16975@gmail.com>
2016-07-14 18:46 ` Paul Gortmaker
[not found] ` <20160714184603.GR4194@windriver.com>
2016-07-14 18:56 ` Ingo Molnar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).