From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h Date: Sun, 24 Jul 2016 23:42:33 -0400 Message-ID: <20160725034247.109173-1-paul.gortmaker@windriver.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , Paul Gortmaker , Andrew Morton , Benjamin Herrenschmidt , Catalin Marinas , Chris Metcalf , "David S. Miller" , Geert Uytterhoeven , Heiko Carstens , Helge Deller , "H. Peter Anvin" , Ingo Molnar , Ivan Kokshaysky , "James E.J. Bottomley" , Linus Torvalds , Martin Schwidefsky , Matt Turner , Michael Ellerman , Paul Mackerras Return-path: Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips List-subscribe: List-owner: List-post: List-archive: [RFC: Not looking for detailed review given the merge window is open. As long as nobody thinks the general idea is horrible, I'll expand into more fringe arch and resend in 2wks and get it added then to linux-next.] While doing an audit looking for unnecessary instances of module.h inclusion across arch/x86/ I found a significant number of includes of module.h were for things like search_exception_table and friends. For historical reasons (i.e. pre-git) the exception table stuff was buried in the middle of the module.h file. So we have core kernel files that are completely non-modular (both arch specific and arch independent) that are just including module.h for this. The converse is also true, in that conventional drivers, be they for filesystems or actual hardware peripherals or similar, do not normally care about the exception tables. Here we fork the exception table content out of module.h into a new extable.h file. The gain here is that module.h gets a bit smaller; a win for all modular drivers that we build for allmodconfig. Also most core files that only need exception table stuff get to shed an include of module.h that brings in lots of extra stuff and just looks generally out of place. They use the tiny extable.h instead. We temporarily include extable.h into the module.h itself. Then we will work our way across the arch independent and arch specific files needing just exception table content, and move them off module.h and onto extable.h Once that is done, we can remove the extable.h from module.h and in doing it like this, we avoid introducing build failures into the git history. We have the option of taking this final one line commit and pushing it out a complete release if we want to open up a bigger window for converting some of the more fringe archtectures. I've converted about a dozen architectures here w/o issue; that largely reflects what I currently have toolchains for. Build testing seems necessary in all instances, since the odds are high that the module.h presence was hiding implicit use of other headers, as was the case for s390. Paul. -- Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chris Metcalf Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Rusty Russell Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-alpha@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: x86@kernel.org Cc: sparclinux@vger.kernel.org Paul Gortmaker (14): exceptions: fork exception table content from module.h into extable.h x86: migrate exception table users off module.h and onto extable.h arm: migrate exception table users off module.h and onto extable.h arm64: migrate exception table users off module.h and onto extable.h mips: migrate exception table users off module.h and onto extable.h sparc: migrate exception table users off module.h and onto extable.h powerpc: migrate exception table users off module.h and onto extable.h m68k: migrate exception table users off module.h and onto extable.h s390: migrate exception table users off module.h and onto extable.h tile: migrate exception table users off module.h and onto extable.h alpha: migrate exception table users off module.h and onto extable.h parisc: migrate exception table users off module.h and onto extable.h core: migrate exception table users off module.h and onto extable.h module.h: remove extable.h include now users have migrated arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arm/mm/extable.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm64/kernel/probes/kprobes.c | 2 +- arch/arm64/mm/extable.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/m68k/kernel/signal.c | 2 +- arch/mips/kernel/module.c | 1 + arch/mips/kernel/traps.c | 2 +- arch/mips/mm/extable.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/kernel/kprobes.c | 2 +- arch/powerpc/mm/fault.c | 2 +- arch/s390/kernel/early.c | 2 +- arch/s390/kernel/kprobes.c | 2 ++ arch/s390/kernel/traps.c | 3 ++- arch/s390/mm/fault.c | 2 +- arch/sparc/kernel/kprobes.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/sparc/kernel/unaligned_64.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/sparc/mm/init_64.c | 2 +- arch/tile/kernel/unaligned.c | 2 +- arch/tile/mm/extable.c | 2 +- arch/tile/mm/fault.c | 2 +- arch/x86/kernel/kprobes/core.c | 2 +- arch/x86/kernel/kprobes/opt.c | 2 +- arch/x86/mm/extable.c | 2 +- arch/x86/mm/fault.c | 2 +- include/linux/extable.h | 30 ++++++++++++++++++++++++++++++ include/linux/module.h | 26 +------------------------- init/main.c | 1 + kernel/extable.c | 1 + kernel/module.c | 1 + 35 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 include/linux/extable.h -- 2.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753171AbcGYDqC (ORCPT ); Sun, 24 Jul 2016 23:46:02 -0400 Received: from mail5.windriver.com ([192.103.53.11]:60996 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753121AbcGYDpt (ORCPT ); Sun, 24 Jul 2016 23:45:49 -0400 From: Paul Gortmaker To: CC: , Paul Gortmaker , Andrew Morton , Benjamin Herrenschmidt , Catalin Marinas , Chris Metcalf , "David S. Miller" , Geert Uytterhoeven , Heiko Carstens , Helge Deller , "H. Peter Anvin" , Ingo Molnar , Ivan Kokshaysky , "James E.J. Bottomley" , Linus Torvalds , Martin Schwidefsky , Matt Turner , Michael Ellerman , Paul Mackerras , Ralf Baechle , Richard Henderson , Russell King , Rusty Russell , Thomas Gleixner , Will Deacon , , , , , , , , , Subject: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h Date: Sun, 24 Jul 2016 23:42:33 -0400 Message-ID: <20160725034247.109173-1-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.8.4 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [RFC: Not looking for detailed review given the merge window is open. As long as nobody thinks the general idea is horrible, I'll expand into more fringe arch and resend in 2wks and get it added then to linux-next.] While doing an audit looking for unnecessary instances of module.h inclusion across arch/x86/ I found a significant number of includes of module.h were for things like search_exception_table and friends. For historical reasons (i.e. pre-git) the exception table stuff was buried in the middle of the module.h file. So we have core kernel files that are completely non-modular (both arch specific and arch independent) that are just including module.h for this. The converse is also true, in that conventional drivers, be they for filesystems or actual hardware peripherals or similar, do not normally care about the exception tables. Here we fork the exception table content out of module.h into a new extable.h file. The gain here is that module.h gets a bit smaller; a win for all modular drivers that we build for allmodconfig. Also most core files that only need exception table stuff get to shed an include of module.h that brings in lots of extra stuff and just looks generally out of place. They use the tiny extable.h instead. We temporarily include extable.h into the module.h itself. Then we will work our way across the arch independent and arch specific files needing just exception table content, and move them off module.h and onto extable.h Once that is done, we can remove the extable.h from module.h and in doing it like this, we avoid introducing build failures into the git history. We have the option of taking this final one line commit and pushing it out a complete release if we want to open up a bigger window for converting some of the more fringe archtectures. I've converted about a dozen architectures here w/o issue; that largely reflects what I currently have toolchains for. Build testing seems necessary in all instances, since the odds are high that the module.h presence was hiding implicit use of other headers, as was the case for s390. Paul. -- Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chris Metcalf Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Rusty Russell Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-alpha@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: x86@kernel.org Cc: sparclinux@vger.kernel.org Paul Gortmaker (14): exceptions: fork exception table content from module.h into extable.h x86: migrate exception table users off module.h and onto extable.h arm: migrate exception table users off module.h and onto extable.h arm64: migrate exception table users off module.h and onto extable.h mips: migrate exception table users off module.h and onto extable.h sparc: migrate exception table users off module.h and onto extable.h powerpc: migrate exception table users off module.h and onto extable.h m68k: migrate exception table users off module.h and onto extable.h s390: migrate exception table users off module.h and onto extable.h tile: migrate exception table users off module.h and onto extable.h alpha: migrate exception table users off module.h and onto extable.h parisc: migrate exception table users off module.h and onto extable.h core: migrate exception table users off module.h and onto extable.h module.h: remove extable.h include now users have migrated arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arm/mm/extable.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm64/kernel/probes/kprobes.c | 2 +- arch/arm64/mm/extable.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/m68k/kernel/signal.c | 2 +- arch/mips/kernel/module.c | 1 + arch/mips/kernel/traps.c | 2 +- arch/mips/mm/extable.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/kernel/kprobes.c | 2 +- arch/powerpc/mm/fault.c | 2 +- arch/s390/kernel/early.c | 2 +- arch/s390/kernel/kprobes.c | 2 ++ arch/s390/kernel/traps.c | 3 ++- arch/s390/mm/fault.c | 2 +- arch/sparc/kernel/kprobes.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/sparc/kernel/unaligned_64.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/sparc/mm/init_64.c | 2 +- arch/tile/kernel/unaligned.c | 2 +- arch/tile/mm/extable.c | 2 +- arch/tile/mm/fault.c | 2 +- arch/x86/kernel/kprobes/core.c | 2 +- arch/x86/kernel/kprobes/opt.c | 2 +- arch/x86/mm/extable.c | 2 +- arch/x86/mm/fault.c | 2 +- include/linux/extable.h | 30 ++++++++++++++++++++++++++++++ include/linux/module.h | 26 +------------------------- init/main.c | 1 + kernel/extable.c | 1 + kernel/module.c | 1 + 35 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 include/linux/extable.h -- 2.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Paul Gortmaker Subject: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h Date: Sun, 24 Jul 2016 23:42:33 -0400 Message-ID: <20160725034247.109173-1-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-arch-owner@vger.kernel.org Message-ID: <20160725034233.541Y113BCUhDDqGGw7fcD1n0XVfabu3dtCeoYCH0h-I@z> List-Archive: List-Post: To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, Paul Gortmaker , Andrew Morton , Benjamin Herrenschmidt , Catalin Marinas , Chris Metcalf , "David S. Miller" , Geert Uytterhoeven , Heiko Carstens , Helge Deller , "H. Peter Anvin" , Ingo Molnar , Ivan Kokshaysky , "James E.J. Bottomley" , Linus Torvalds , Martin Schwidefsky , Matt Turner , Michael Ellerman , Paul Mackerras , Ralf Baechle , Richard Henderson , Russell King , Rusty Russell , Thomas Gleixner , Will Deacon , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, x86@kernel.org, sparclinux@vger.kernel.org List-ID: [RFC: Not looking for detailed review given the merge window is open. As long as nobody thinks the general idea is horrible, I'll expand into more fringe arch and resend in 2wks and get it added then to linux-next.] While doing an audit looking for unnecessary instances of module.h inclusion across arch/x86/ I found a significant number of includes of module.h were for things like search_exception_table and friends. For historical reasons (i.e. pre-git) the exception table stuff was buried in the middle of the module.h file. So we have core kernel files that are completely non-modular (both arch specific and arch independent) that are just including module.h for this. The converse is also true, in that conventional drivers, be they for filesystems or actual hardware peripherals or similar, do not normally care about the exception tables. Here we fork the exception table content out of module.h into a new extable.h file. The gain here is that module.h gets a bit smaller; a win for all modular drivers that we build for allmodconfig. Also most core files that only need exception table stuff get to shed an include of module.h that brings in lots of extra stuff and just looks generally out of place. They use the tiny extable.h instead. We temporarily include extable.h into the module.h itself. Then we will work our way across the arch independent and arch specific files needing just exception table content, and move them off module.h and onto extable.h Once that is done, we can remove the extable.h from module.h and in doing it like this, we avoid introducing build failures into the git history. We have the option of taking this final one line commit and pushing it out a complete release if we want to open up a bigger window for converting some of the more fringe archtectures. I've converted about a dozen architectures here w/o issue; that largely reflects what I currently have toolchains for. Build testing seems necessary in all instances, since the odds are high that the module.h presence was hiding implicit use of other headers, as was the case for s390. Paul. -- Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chris Metcalf Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Rusty Russell Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-alpha@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: x86@kernel.org Cc: sparclinux@vger.kernel.org Paul Gortmaker (14): exceptions: fork exception table content from module.h into extable.h x86: migrate exception table users off module.h and onto extable.h arm: migrate exception table users off module.h and onto extable.h arm64: migrate exception table users off module.h and onto extable.h mips: migrate exception table users off module.h and onto extable.h sparc: migrate exception table users off module.h and onto extable.h powerpc: migrate exception table users off module.h and onto extable.h m68k: migrate exception table users off module.h and onto extable.h s390: migrate exception table users off module.h and onto extable.h tile: migrate exception table users off module.h and onto extable.h alpha: migrate exception table users off module.h and onto extable.h parisc: migrate exception table users off module.h and onto extable.h core: migrate exception table users off module.h and onto extable.h module.h: remove extable.h include now users have migrated arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arm/mm/extable.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm64/kernel/probes/kprobes.c | 2 +- arch/arm64/mm/extable.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/m68k/kernel/signal.c | 2 +- arch/mips/kernel/module.c | 1 + arch/mips/kernel/traps.c | 2 +- arch/mips/mm/extable.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/kernel/kprobes.c | 2 +- arch/powerpc/mm/fault.c | 2 +- arch/s390/kernel/early.c | 2 +- arch/s390/kernel/kprobes.c | 2 ++ arch/s390/kernel/traps.c | 3 ++- arch/s390/mm/fault.c | 2 +- arch/sparc/kernel/kprobes.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/sparc/kernel/unaligned_64.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/sparc/mm/init_64.c | 2 +- arch/tile/kernel/unaligned.c | 2 +- arch/tile/mm/extable.c | 2 +- arch/tile/mm/fault.c | 2 +- arch/x86/kernel/kprobes/core.c | 2 +- arch/x86/kernel/kprobes/opt.c | 2 +- arch/x86/mm/extable.c | 2 +- arch/x86/mm/fault.c | 2 +- include/linux/extable.h | 30 ++++++++++++++++++++++++++++++ include/linux/module.h | 26 +------------------------- init/main.c | 1 + kernel/extable.c | 1 + kernel/module.c | 1 + 35 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 include/linux/extable.h -- 2.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h Date: Sun, 24 Jul 2016 23:42:33 -0400 Message-ID: <20160725034247.109173-1-paul.gortmaker@windriver.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, Paul Gortmaker , Andrew Morton , Benjamin Herrenschmidt , Catalin Marinas , Chris Metcalf , "David S. Miller" , Geert Uytterhoeven , Heiko Carstens , Helge Deller , "H. Peter Anvin" , Ingo Molnar , Ivan Kokshaysky , "James E.J. Bottomley" , Linus Torvalds , Martin Schwidefsky , Matt Turner , Michael Ellerman , Paul Mackerras List-Id: linux-m68k@vger.kernel.org [RFC: Not looking for detailed review given the merge window is open. As long as nobody thinks the general idea is horrible, I'll expand into more fringe arch and resend in 2wks and get it added then to linux-next.] While doing an audit looking for unnecessary instances of module.h inclusion across arch/x86/ I found a significant number of includes of module.h were for things like search_exception_table and friends. For historical reasons (i.e. pre-git) the exception table stuff was buried in the middle of the module.h file. So we have core kernel files that are completely non-modular (both arch specific and arch independent) that are just including module.h for this. The converse is also true, in that conventional drivers, be they for filesystems or actual hardware peripherals or similar, do not normally care about the exception tables. Here we fork the exception table content out of module.h into a new extable.h file. The gain here is that module.h gets a bit smaller; a win for all modular drivers that we build for allmodconfig. Also most core files that only need exception table stuff get to shed an include of module.h that brings in lots of extra stuff and just looks generally out of place. They use the tiny extable.h instead. We temporarily include extable.h into the module.h itself. Then we will work our way across the arch independent and arch specific files needing just exception table content, and move them off module.h and onto extable.h Once that is done, we can remove the extable.h from module.h and in doing it like this, we avoid introducing build failures into the git history. We have the option of taking this final one line commit and pushing it out a complete release if we want to open up a bigger window for converting some of the more fringe archtectures. I've converted about a dozen architectures here w/o issue; that largely reflects what I currently have toolchains for. Build testing seems necessary in all instances, since the odds are high that the module.h presence was hiding implicit use of other headers, as was the case for s390. Paul. -- Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chris Metcalf Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Rusty Russell Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-alpha@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: x86@kernel.org Cc: sparclinux@vger.kernel.org Paul Gortmaker (14): exceptions: fork exception table content from module.h into extable.h x86: migrate exception table users off module.h and onto extable.h arm: migrate exception table users off module.h and onto extable.h arm64: migrate exception table users off module.h and onto extable.h mips: migrate exception table users off module.h and onto extable.h sparc: migrate exception table users off module.h and onto extable.h powerpc: migrate exception table users off module.h and onto extable.h m68k: migrate exception table users off module.h and onto extable.h s390: migrate exception table users off module.h and onto extable.h tile: migrate exception table users off module.h and onto extable.h alpha: migrate exception table users off module.h and onto extable.h parisc: migrate exception table users off module.h and onto extable.h core: migrate exception table users off module.h and onto extable.h module.h: remove extable.h include now users have migrated arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arm/mm/extable.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm64/kernel/probes/kprobes.c | 2 +- arch/arm64/mm/extable.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/m68k/kernel/signal.c | 2 +- arch/mips/kernel/module.c | 1 + arch/mips/kernel/traps.c | 2 +- arch/mips/mm/extable.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/kernel/kprobes.c | 2 +- arch/powerpc/mm/fault.c | 2 +- arch/s390/kernel/early.c | 2 +- arch/s390/kernel/kprobes.c | 2 ++ arch/s390/kernel/traps.c | 3 ++- arch/s390/mm/fault.c | 2 +- arch/sparc/kernel/kprobes.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/sparc/kernel/unaligned_64.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/sparc/mm/init_64.c | 2 +- arch/tile/kernel/unaligned.c | 2 +- arch/tile/mm/extable.c | 2 +- arch/tile/mm/fault.c | 2 +- arch/x86/kernel/kprobes/core.c | 2 +- arch/x86/kernel/kprobes/opt.c | 2 +- arch/x86/mm/extable.c | 2 +- arch/x86/mm/fault.c | 2 +- include/linux/extable.h | 30 ++++++++++++++++++++++++++++++ include/linux/module.h | 26 +------------------------- init/main.c | 1 + kernel/extable.c | 1 + kernel/module.c | 1 + 35 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 include/linux/extable.h -- 2.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Date: Mon, 25 Jul 2016 03:42:33 +0000 Subject: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h Message-Id: <20160725034247.109173-1-paul.gortmaker@windriver.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, Paul Gortmaker , Andrew Morton , Benjamin Herrenschmidt , Catalin Marinas , Chris Metcalf , "David S. Miller" , Geert Uytterhoeven , Heiko Carstens , Helge Deller , "H. Peter Anvin" , Ingo Molnar , Ivan Kokshaysky , "James E.J. Bottomley" , Linus Torvalds , Martin Schwidefsky , Matt Turner , Michael Ellerman , Paul Mackerras [RFC: Not looking for detailed review given the merge window is open. As long as nobody thinks the general idea is horrible, I'll expand into more fringe arch and resend in 2wks and get it added then to linux-next.] While doing an audit looking for unnecessary instances of module.h inclusion across arch/x86/ I found a significant number of includes of module.h were for things like search_exception_table and friends. For historical reasons (i.e. pre-git) the exception table stuff was buried in the middle of the module.h file. So we have core kernel files that are completely non-modular (both arch specific and arch independent) that are just including module.h for this. The converse is also true, in that conventional drivers, be they for filesystems or actual hardware peripherals or similar, do not normally care about the exception tables. Here we fork the exception table content out of module.h into a new extable.h file. The gain here is that module.h gets a bit smaller; a win for all modular drivers that we build for allmodconfig. Also most core files that only need exception table stuff get to shed an include of module.h that brings in lots of extra stuff and just looks generally out of place. They use the tiny extable.h instead. We temporarily include extable.h into the module.h itself. Then we will work our way across the arch independent and arch specific files needing just exception table content, and move them off module.h and onto extable.h Once that is done, we can remove the extable.h from module.h and in doing it like this, we avoid introducing build failures into the git history. We have the option of taking this final one line commit and pushing it out a complete release if we want to open up a bigger window for converting some of the more fringe archtectures. I've converted about a dozen architectures here w/o issue; that largely reflects what I currently have toolchains for. Build testing seems necessary in all instances, since the odds are high that the module.h presence was hiding implicit use of other headers, as was the case for s390. Paul. -- Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chris Metcalf Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Rusty Russell Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-alpha@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: x86@kernel.org Cc: sparclinux@vger.kernel.org Paul Gortmaker (14): exceptions: fork exception table content from module.h into extable.h x86: migrate exception table users off module.h and onto extable.h arm: migrate exception table users off module.h and onto extable.h arm64: migrate exception table users off module.h and onto extable.h mips: migrate exception table users off module.h and onto extable.h sparc: migrate exception table users off module.h and onto extable.h powerpc: migrate exception table users off module.h and onto extable.h m68k: migrate exception table users off module.h and onto extable.h s390: migrate exception table users off module.h and onto extable.h tile: migrate exception table users off module.h and onto extable.h alpha: migrate exception table users off module.h and onto extable.h parisc: migrate exception table users off module.h and onto extable.h core: migrate exception table users off module.h and onto extable.h module.h: remove extable.h include now users have migrated arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arm/mm/extable.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm64/kernel/probes/kprobes.c | 2 +- arch/arm64/mm/extable.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/m68k/kernel/signal.c | 2 +- arch/mips/kernel/module.c | 1 + arch/mips/kernel/traps.c | 2 +- arch/mips/mm/extable.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/kernel/kprobes.c | 2 +- arch/powerpc/mm/fault.c | 2 +- arch/s390/kernel/early.c | 2 +- arch/s390/kernel/kprobes.c | 2 ++ arch/s390/kernel/traps.c | 3 ++- arch/s390/mm/fault.c | 2 +- arch/sparc/kernel/kprobes.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/sparc/kernel/unaligned_64.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/sparc/mm/init_64.c | 2 +- arch/tile/kernel/unaligned.c | 2 +- arch/tile/mm/extable.c | 2 +- arch/tile/mm/fault.c | 2 +- arch/x86/kernel/kprobes/core.c | 2 +- arch/x86/kernel/kprobes/opt.c | 2 +- arch/x86/mm/extable.c | 2 +- arch/x86/mm/fault.c | 2 +- include/linux/extable.h | 30 ++++++++++++++++++++++++++++++ include/linux/module.h | 26 +------------------------- init/main.c | 1 + kernel/extable.c | 1 + kernel/module.c | 1 + 35 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 include/linux/extable.h -- 2.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: paul.gortmaker@windriver.com (Paul Gortmaker) Date: Sun, 24 Jul 2016 23:42:33 -0400 Subject: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h Message-ID: <20160725034247.109173-1-paul.gortmaker@windriver.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org [RFC: Not looking for detailed review given the merge window is open. As long as nobody thinks the general idea is horrible, I'll expand into more fringe arch and resend in 2wks and get it added then to linux-next.] While doing an audit looking for unnecessary instances of module.h inclusion across arch/x86/ I found a significant number of includes of module.h were for things like search_exception_table and friends. For historical reasons (i.e. pre-git) the exception table stuff was buried in the middle of the module.h file. So we have core kernel files that are completely non-modular (both arch specific and arch independent) that are just including module.h for this. The converse is also true, in that conventional drivers, be they for filesystems or actual hardware peripherals or similar, do not normally care about the exception tables. Here we fork the exception table content out of module.h into a new extable.h file. The gain here is that module.h gets a bit smaller; a win for all modular drivers that we build for allmodconfig. Also most core files that only need exception table stuff get to shed an include of module.h that brings in lots of extra stuff and just looks generally out of place. They use the tiny extable.h instead. We temporarily include extable.h into the module.h itself. Then we will work our way across the arch independent and arch specific files needing just exception table content, and move them off module.h and onto extable.h Once that is done, we can remove the extable.h from module.h and in doing it like this, we avoid introducing build failures into the git history. We have the option of taking this final one line commit and pushing it out a complete release if we want to open up a bigger window for converting some of the more fringe archtectures. I've converted about a dozen architectures here w/o issue; that largely reflects what I currently have toolchains for. Build testing seems necessary in all instances, since the odds are high that the module.h presence was hiding implicit use of other headers, as was the case for s390. Paul. -- Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chris Metcalf Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Matt Turner Cc: Michael Ellerman Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Henderson Cc: Russell King Cc: Rusty Russell Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-alpha at vger.kernel.org Cc: linux-arm-kernel at lists.infradead.org Cc: linux-m68k at lists.linux-m68k.org Cc: linux-mips at linux-mips.org Cc: linux-parisc at vger.kernel.org Cc: linuxppc-dev at lists.ozlabs.org Cc: linux-s390 at vger.kernel.org Cc: x86 at kernel.org Cc: sparclinux at vger.kernel.org Paul Gortmaker (14): exceptions: fork exception table content from module.h into extable.h x86: migrate exception table users off module.h and onto extable.h arm: migrate exception table users off module.h and onto extable.h arm64: migrate exception table users off module.h and onto extable.h mips: migrate exception table users off module.h and onto extable.h sparc: migrate exception table users off module.h and onto extable.h powerpc: migrate exception table users off module.h and onto extable.h m68k: migrate exception table users off module.h and onto extable.h s390: migrate exception table users off module.h and onto extable.h tile: migrate exception table users off module.h and onto extable.h alpha: migrate exception table users off module.h and onto extable.h parisc: migrate exception table users off module.h and onto extable.h core: migrate exception table users off module.h and onto extable.h module.h: remove extable.h include now users have migrated arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 2 +- arch/arm/mm/extable.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm64/kernel/probes/kprobes.c | 2 +- arch/arm64/mm/extable.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/m68k/kernel/signal.c | 2 +- arch/mips/kernel/module.c | 1 + arch/mips/kernel/traps.c | 2 +- arch/mips/mm/extable.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/kernel/kprobes.c | 2 +- arch/powerpc/mm/fault.c | 2 +- arch/s390/kernel/early.c | 2 +- arch/s390/kernel/kprobes.c | 2 ++ arch/s390/kernel/traps.c | 3 ++- arch/s390/mm/fault.c | 2 +- arch/sparc/kernel/kprobes.c | 2 +- arch/sparc/kernel/traps_64.c | 2 +- arch/sparc/kernel/unaligned_64.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/sparc/mm/init_64.c | 2 +- arch/tile/kernel/unaligned.c | 2 +- arch/tile/mm/extable.c | 2 +- arch/tile/mm/fault.c | 2 +- arch/x86/kernel/kprobes/core.c | 2 +- arch/x86/kernel/kprobes/opt.c | 2 +- arch/x86/mm/extable.c | 2 +- arch/x86/mm/fault.c | 2 +- include/linux/extable.h | 30 ++++++++++++++++++++++++++++++ include/linux/module.h | 26 +------------------------- init/main.c | 1 + kernel/extable.c | 1 + kernel/module.c | 1 + 35 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 include/linux/extable.h -- 2.8.4