All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  3:42 ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, 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 <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  3:42 ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, 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, linux-arm-kernel, linux-m68k,
	linux-mips, linux-parisc, linuxppc-dev, linux-s390, x86,
	sparclinux

[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 <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  3:42 ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, 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, linux-arm-kernel, linux-m68k,
	linux-mips, linux-parisc, linuxppc-dev, linux-s390, x86,
	sparclinux

[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 <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  3:42 ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, 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 <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  3:42 ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, 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 <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
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


^ permalink raw reply	[flat|nested] 52+ messages in thread

* [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  3:42 ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-arm-kernel

[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 <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* [PATCH 01/14] exceptions: fork exception table content from module.h into extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Rusty Russell, Andrew Morton, Linus Torvalds

For historical reasons (i.e. pre-git) the exception table stuff was
buried in the middle of the module.h file.  I noticed this while
doing an audit for needless includes of module.h and found core
kernel files (both arch specific and arch independent) were 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 file called extable.h -- and temporarily include it 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.

The gain here is that module.h gets a bit smaller, across all
modular drivers that we build for allmodconfig.  Also the core
files that only need exception table stuff don't have an include
of module.h that brings in lots of extra stuff and just looks
generally out of place.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/extable.h | 30 ++++++++++++++++++++++++++++++
 include/linux/module.h  | 27 ++-------------------------
 2 files changed, 32 insertions(+), 25 deletions(-)
 create mode 100644 include/linux/extable.h

diff --git a/include/linux/extable.h b/include/linux/extable.h
new file mode 100644
index 000000000000..2c71dccd1bc3
--- /dev/null
+++ b/include/linux/extable.h
@@ -0,0 +1,30 @@
+#ifndef _LINUX_EXTABLE_H
+#define _LINUX_EXTABLE_H
+
+struct module;
+struct exception_table_entry;
+
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value);
+void sort_extable(struct exception_table_entry *start,
+		  struct exception_table_entry *finish);
+void sort_main_extable(void);
+void trim_init_extable(struct module *m);
+
+/* Given an address, look for it in the exception tables */
+const struct exception_table_entry *search_exception_tables(unsigned long add);
+
+#ifdef CONFIG_MODULES
+/* For extable.c to search modules' exception tables. */
+const struct exception_table_entry *search_module_extables(unsigned long addr);
+#else
+static inline const struct exception_table_entry *
+search_module_extables(unsigned long addr)
+{
+	return NULL;
+}
+#endif /*CONFIG_MODULES*/
+
+#endif /* _LINUX_EXTABLE_H */
diff --git a/include/linux/module.h b/include/linux/module.h
index f777164c238b..f95ed243a4de 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -18,6 +18,7 @@
 #include <linux/moduleparam.h>
 #include <linux/jump_label.h>
 #include <linux/export.h>
+#include <linux/extable.h>	/* only as arch move module.h -> extable.h */
 #include <linux/rbtree_latch.h>
 
 #include <linux/percpu.h>
@@ -37,6 +38,7 @@ struct modversion_info {
 };
 
 struct module;
+struct exception_table_entry;
 
 struct module_kobject {
 	struct kobject kobj;
@@ -155,18 +157,6 @@ extern void cleanup_module(void);
 #define __INITRODATA_OR_MODULE __INITRODATA
 #endif /*CONFIG_MODULES*/
 
-/* Archs provide a method of finding the correct exception table. */
-struct exception_table_entry;
-
-const struct exception_table_entry *
-search_extable(const struct exception_table_entry *first,
-	       const struct exception_table_entry *last,
-	       unsigned long value);
-void sort_extable(struct exception_table_entry *start,
-		  struct exception_table_entry *finish);
-void sort_main_extable(void);
-void trim_init_extable(struct module *m);
-
 /* Generic info of form tag = "info" */
 #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
 
@@ -268,9 +258,6 @@ extern const typeof(name) __mod_##type##__##name##_device_table		\
  * files require multiple MODULE_FIRMWARE() specifiers */
 #define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
 
-/* Given an address, look for it in the exception tables */
-const struct exception_table_entry *search_exception_tables(unsigned long add);
-
 struct notifier_block;
 
 #ifdef CONFIG_MODULES
@@ -630,9 +617,6 @@ const char *module_address_lookup(unsigned long addr,
 int lookup_module_symbol_name(unsigned long addr, char *symname);
 int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
 
-/* For extable.c to search modules' exception tables. */
-const struct exception_table_entry *search_module_extables(unsigned long addr);
-
 int register_module_notifier(struct notifier_block *nb);
 int unregister_module_notifier(struct notifier_block *nb);
 
@@ -657,13 +641,6 @@ static inline bool is_livepatch_module(struct module *mod)
 
 #else /* !CONFIG_MODULES... */
 
-/* Given an address, look for it in the exception tables. */
-static inline const struct exception_table_entry *
-search_module_extables(unsigned long addr)
-{
-	return NULL;
-}
-
 static inline struct module *__module_address(unsigned long addr)
 {
 	return NULL;
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 01/14] exceptions: fork exception table content from module.h into extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Rusty Russell, Andrew Morton, Linus Torvalds

For historical reasons (i.e. pre-git) the exception table stuff was
buried in the middle of the module.h file.  I noticed this while
doing an audit for needless includes of module.h and found core
kernel files (both arch specific and arch independent) were 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 file called extable.h -- and temporarily include it 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.

The gain here is that module.h gets a bit smaller, across all
modular drivers that we build for allmodconfig.  Also the core
files that only need exception table stuff don't have an include
of module.h that brings in lots of extra stuff and just looks
generally out of place.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/extable.h | 30 ++++++++++++++++++++++++++++++
 include/linux/module.h  | 27 ++-------------------------
 2 files changed, 32 insertions(+), 25 deletions(-)
 create mode 100644 include/linux/extable.h

diff --git a/include/linux/extable.h b/include/linux/extable.h
new file mode 100644
index 000000000000..2c71dccd1bc3
--- /dev/null
+++ b/include/linux/extable.h
@@ -0,0 +1,30 @@
+#ifndef _LINUX_EXTABLE_H
+#define _LINUX_EXTABLE_H
+
+struct module;
+struct exception_table_entry;
+
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value);
+void sort_extable(struct exception_table_entry *start,
+		  struct exception_table_entry *finish);
+void sort_main_extable(void);
+void trim_init_extable(struct module *m);
+
+/* Given an address, look for it in the exception tables */
+const struct exception_table_entry *search_exception_tables(unsigned long add);
+
+#ifdef CONFIG_MODULES
+/* For extable.c to search modules' exception tables. */
+const struct exception_table_entry *search_module_extables(unsigned long addr);
+#else
+static inline const struct exception_table_entry *
+search_module_extables(unsigned long addr)
+{
+	return NULL;
+}
+#endif /*CONFIG_MODULES*/
+
+#endif /* _LINUX_EXTABLE_H */
diff --git a/include/linux/module.h b/include/linux/module.h
index f777164c238b..f95ed243a4de 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -18,6 +18,7 @@
 #include <linux/moduleparam.h>
 #include <linux/jump_label.h>
 #include <linux/export.h>
+#include <linux/extable.h>	/* only as arch move module.h -> extable.h */
 #include <linux/rbtree_latch.h>
 
 #include <linux/percpu.h>
@@ -37,6 +38,7 @@ struct modversion_info {
 };
 
 struct module;
+struct exception_table_entry;
 
 struct module_kobject {
 	struct kobject kobj;
@@ -155,18 +157,6 @@ extern void cleanup_module(void);
 #define __INITRODATA_OR_MODULE __INITRODATA
 #endif /*CONFIG_MODULES*/
 
-/* Archs provide a method of finding the correct exception table. */
-struct exception_table_entry;
-
-const struct exception_table_entry *
-search_extable(const struct exception_table_entry *first,
-	       const struct exception_table_entry *last,
-	       unsigned long value);
-void sort_extable(struct exception_table_entry *start,
-		  struct exception_table_entry *finish);
-void sort_main_extable(void);
-void trim_init_extable(struct module *m);
-
 /* Generic info of form tag = "info" */
 #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
 
@@ -268,9 +258,6 @@ extern const typeof(name) __mod_##type##__##name##_device_table		\
  * files require multiple MODULE_FIRMWARE() specifiers */
 #define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
 
-/* Given an address, look for it in the exception tables */
-const struct exception_table_entry *search_exception_tables(unsigned long add);
-
 struct notifier_block;
 
 #ifdef CONFIG_MODULES
@@ -630,9 +617,6 @@ const char *module_address_lookup(unsigned long addr,
 int lookup_module_symbol_name(unsigned long addr, char *symname);
 int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
 
-/* For extable.c to search modules' exception tables. */
-const struct exception_table_entry *search_module_extables(unsigned long addr);
-
 int register_module_notifier(struct notifier_block *nb);
 int unregister_module_notifier(struct notifier_block *nb);
 
@@ -657,13 +641,6 @@ static inline bool is_livepatch_module(struct module *mod)
 
 #else /* !CONFIG_MODULES... */
 
-/* Given an address, look for it in the exception tables. */
-static inline const struct exception_table_entry *
-search_module_extables(unsigned long addr)
-{
-	return NULL;
-}
-
 static inline struct module *__module_address(unsigned long addr)
 {
 	return NULL;
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 02/14] x86: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 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 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 7847e5c0e0b5..28cee019209c 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -45,7 +45,7 @@
 #include <linux/slab.h>
 #include <linux/hardirq.h>
 #include <linux/preempt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/kallsyms.h>
 #include <linux/ftrace.h>
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index 4425f593f0ec..3bb4c5f021f6 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -24,7 +24,7 @@
 #include <linux/slab.h>
 #include <linux/hardirq.h>
 #include <linux/preempt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/kallsyms.h>
 #include <linux/ftrace.h>
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
index 832b98f822be..79ae939970d3 100644
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -1,4 +1,4 @@
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <asm/uaccess.h>
 #include <asm/traps.h>
 #include <asm/kdebug.h>
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index dc8023060456..79ae05477d94 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -5,7 +5,7 @@
  */
 #include <linux/sched.h>		/* test_thread_flag(), ...	*/
 #include <linux/kdebug.h>		/* oops_begin/end, ...		*/
-#include <linux/module.h>		/* search_exception_table	*/
+#include <linux/extable.h>		/* search_exception_table	*/
 #include <linux/bootmem.h>		/* max_low_pfn			*/
 #include <linux/kprobes.h>		/* NOKPROBE_SYMBOL, ...		*/
 #include <linux/mmiotrace.h>		/* kmmio_handler, ...		*/
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 02/14] x86: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 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 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 7847e5c0e0b5..28cee019209c 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -45,7 +45,7 @@
 #include <linux/slab.h>
 #include <linux/hardirq.h>
 #include <linux/preempt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/kallsyms.h>
 #include <linux/ftrace.h>
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index 4425f593f0ec..3bb4c5f021f6 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -24,7 +24,7 @@
 #include <linux/slab.h>
 #include <linux/hardirq.h>
 #include <linux/preempt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/kallsyms.h>
 #include <linux/ftrace.h>
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
index 832b98f822be..79ae939970d3 100644
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -1,4 +1,4 @@
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <asm/uaccess.h>
 #include <asm/traps.h>
 #include <asm/kdebug.h>
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index dc8023060456..79ae05477d94 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -5,7 +5,7 @@
  */
 #include <linux/sched.h>		/* test_thread_flag(), ...	*/
 #include <linux/kdebug.h>		/* oops_begin/end, ...		*/
-#include <linux/module.h>		/* search_exception_table	*/
+#include <linux/extable.h>		/* search_exception_table	*/
 #include <linux/bootmem.h>		/* max_low_pfn			*/
 #include <linux/kprobes.h>		/* NOKPROBE_SYMBOL, ...		*/
 #include <linux/mmiotrace.h>		/* kmmio_handler, ...		*/
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 03/14] arm: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
  (?)
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Russell King, linux-arm-kernel

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/arm/mm/extable.c | 2 +-
 arch/arm/mm/fault.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/extable.c b/arch/arm/mm/extable.c
index 312e15e6d00b..f436f7439e46 100644
--- a/arch/arm/mm/extable.c
+++ b/arch/arm/mm/extable.c
@@ -1,7 +1,7 @@
 /*
  *  linux/arch/arm/mm/extable.c
  */
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 int fixup_exception(struct pt_regs *regs)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 3a2e678b8d30..94de590db99e 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
 #include <linux/hardirq.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 03/14] arm: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Russell King, linux-arm-kernel

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/arm/mm/extable.c | 2 +-
 arch/arm/mm/fault.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/extable.c b/arch/arm/mm/extable.c
index 312e15e6d00b..f436f7439e46 100644
--- a/arch/arm/mm/extable.c
+++ b/arch/arm/mm/extable.c
@@ -1,7 +1,7 @@
 /*
  *  linux/arch/arm/mm/extable.c
  */
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 int fixup_exception(struct pt_regs *regs)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 3a2e678b8d30..94de590db99e 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
 #include <linux/hardirq.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 03/14] arm: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-arm-kernel

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/arm/mm/extable.c | 2 +-
 arch/arm/mm/fault.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/extable.c b/arch/arm/mm/extable.c
index 312e15e6d00b..f436f7439e46 100644
--- a/arch/arm/mm/extable.c
+++ b/arch/arm/mm/extable.c
@@ -1,7 +1,7 @@
 /*
  *  linux/arch/arm/mm/extable.c
  */
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 int fixup_exception(struct pt_regs *regs)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 3a2e678b8d30..94de590db99e 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
 #include <linux/hardirq.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 04/14] arm64: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
  (?)
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Catalin Marinas, Will Deacon,
	linux-arm-kernel

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/arm64/kernel/probes/kprobes.c | 2 +-
 arch/arm64/mm/extable.c            | 2 +-
 arch/arm64/mm/fault.c              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c
index bf9768588288..9c1866ef3271 100644
--- a/arch/arm64/kernel/probes/kprobes.c
+++ b/arch/arm64/kernel/probes/kprobes.c
@@ -19,7 +19,7 @@
 #include <linux/kasan.h>
 #include <linux/kernel.h>
 #include <linux/kprobes.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/slab.h>
 #include <linux/stop_machine.h>
 #include <linux/stringify.h>
diff --git a/arch/arm64/mm/extable.c b/arch/arm64/mm/extable.c
index 81acd4706878..c9f118cd812b 100644
--- a/arch/arm64/mm/extable.c
+++ b/arch/arm64/mm/extable.c
@@ -2,7 +2,7 @@
  * Based on arch/arm/mm/extable.c
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 int fixup_exception(struct pt_regs *regs)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index c8beaa0da7df..427f2fd49463 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -18,7 +18,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
 #include <linux/hardirq.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 04/14] arm64: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Catalin Marinas, Will Deacon,
	linux-arm-kernel

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/arm64/kernel/probes/kprobes.c | 2 +-
 arch/arm64/mm/extable.c            | 2 +-
 arch/arm64/mm/fault.c              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c
index bf9768588288..9c1866ef3271 100644
--- a/arch/arm64/kernel/probes/kprobes.c
+++ b/arch/arm64/kernel/probes/kprobes.c
@@ -19,7 +19,7 @@
 #include <linux/kasan.h>
 #include <linux/kernel.h>
 #include <linux/kprobes.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/slab.h>
 #include <linux/stop_machine.h>
 #include <linux/stringify.h>
diff --git a/arch/arm64/mm/extable.c b/arch/arm64/mm/extable.c
index 81acd4706878..c9f118cd812b 100644
--- a/arch/arm64/mm/extable.c
+++ b/arch/arm64/mm/extable.c
@@ -2,7 +2,7 @@
  * Based on arch/arm/mm/extable.c
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 int fixup_exception(struct pt_regs *regs)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index c8beaa0da7df..427f2fd49463 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -18,7 +18,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
 #include <linux/hardirq.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 04/14] arm64: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-arm-kernel

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/arm64/kernel/probes/kprobes.c | 2 +-
 arch/arm64/mm/extable.c            | 2 +-
 arch/arm64/mm/fault.c              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c
index bf9768588288..9c1866ef3271 100644
--- a/arch/arm64/kernel/probes/kprobes.c
+++ b/arch/arm64/kernel/probes/kprobes.c
@@ -19,7 +19,7 @@
 #include <linux/kasan.h>
 #include <linux/kernel.h>
 #include <linux/kprobes.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/slab.h>
 #include <linux/stop_machine.h>
 #include <linux/stringify.h>
diff --git a/arch/arm64/mm/extable.c b/arch/arm64/mm/extable.c
index 81acd4706878..c9f118cd812b 100644
--- a/arch/arm64/mm/extable.c
+++ b/arch/arm64/mm/extable.c
@@ -2,7 +2,7 @@
  * Based on arch/arm/mm/extable.c
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 int fixup_exception(struct pt_regs *regs)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index c8beaa0da7df..427f2fd49463 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -18,7 +18,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
 #include <linux/hardirq.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 05/14] mips: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Ralf Baechle, linux-mips

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/mips/kernel/module.c | 1 +
 arch/mips/kernel/traps.c  | 2 +-
 arch/mips/mm/extable.c    | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c
index 79850e376ef6..94627a3a6a0d 100644
--- a/arch/mips/kernel/module.c
+++ b/arch/mips/kernel/module.c
@@ -20,6 +20,7 @@
 
 #undef DEBUG
 
+#include <linux/extable.h>
 #include <linux/moduleloader.h>
 #include <linux/elf.h>
 #include <linux/mm.h>
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 6fb4704bd156..b4522e3a0562 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -20,7 +20,7 @@
 #include <linux/kexec.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
diff --git a/arch/mips/mm/extable.c b/arch/mips/mm/extable.c
index 9d25d2ba4b9e..e474fa2efed4 100644
--- a/arch/mips/mm/extable.c
+++ b/arch/mips/mm/extable.c
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org>
  */
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/spinlock.h>
 #include <asm/branch.h>
 #include <asm/uaccess.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 05/14] mips: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Ralf Baechle, linux-mips

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/mips/kernel/module.c | 1 +
 arch/mips/kernel/traps.c  | 2 +-
 arch/mips/mm/extable.c    | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c
index 79850e376ef6..94627a3a6a0d 100644
--- a/arch/mips/kernel/module.c
+++ b/arch/mips/kernel/module.c
@@ -20,6 +20,7 @@
 
 #undef DEBUG
 
+#include <linux/extable.h>
 #include <linux/moduleloader.h>
 #include <linux/elf.h>
 #include <linux/mm.h>
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 6fb4704bd156..b4522e3a0562 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -20,7 +20,7 @@
 #include <linux/kexec.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
diff --git a/arch/mips/mm/extable.c b/arch/mips/mm/extable.c
index 9d25d2ba4b9e..e474fa2efed4 100644
--- a/arch/mips/mm/extable.c
+++ b/arch/mips/mm/extable.c
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org>
  */
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/spinlock.h>
 #include <asm/branch.h>
 #include <asm/uaccess.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 06/14] sparc: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
  (?)
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, David S. Miller, sparclinux

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 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 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index cd83be527586..b0377db12d83 100644
--- a/arch/sparc/kernel/kprobes.c
+++ b/arch/sparc/kernel/kprobes.c
@@ -5,7 +5,7 @@
 
 #include <linux/kernel.h>
 #include <linux/kprobes.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/slab.h>
 #include <linux/context_tracking.h>
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index d21cd625c0de..4094a51b1970 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -8,7 +8,7 @@
  * I like traps on v9, :))))
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/sched.h>
 #include <linux/linkage.h>
 #include <linux/kernel.h>
diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c
index 9aacb9159262..52c00d90d4b4 100644
--- a/arch/sparc/kernel/unaligned_64.c
+++ b/arch/sparc/kernel/unaligned_64.c
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <asm/asi.h>
 #include <asm/ptrace.h>
 #include <asm/pstate.h>
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index 6c43b924a7a2..0e9773ca7ff1 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -14,7 +14,7 @@
 #include <linux/mman.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/init.h>
 #include <linux/perf_event.h>
 #include <linux/interrupt.h>
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index aec508e37490..96680a687799 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -5,7 +5,7 @@
  *  Copyright (C) 1997-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  */
  
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/string.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 06/14] sparc: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, David S. Miller, sparclinux

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 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 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index cd83be527586..b0377db12d83 100644
--- a/arch/sparc/kernel/kprobes.c
+++ b/arch/sparc/kernel/kprobes.c
@@ -5,7 +5,7 @@
 
 #include <linux/kernel.h>
 #include <linux/kprobes.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/slab.h>
 #include <linux/context_tracking.h>
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index d21cd625c0de..4094a51b1970 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -8,7 +8,7 @@
  * I like traps on v9, :))))
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/sched.h>
 #include <linux/linkage.h>
 #include <linux/kernel.h>
diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c
index 9aacb9159262..52c00d90d4b4 100644
--- a/arch/sparc/kernel/unaligned_64.c
+++ b/arch/sparc/kernel/unaligned_64.c
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <asm/asi.h>
 #include <asm/ptrace.h>
 #include <asm/pstate.h>
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index 6c43b924a7a2..0e9773ca7ff1 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -14,7 +14,7 @@
 #include <linux/mman.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/init.h>
 #include <linux/perf_event.h>
 #include <linux/interrupt.h>
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index aec508e37490..96680a687799 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -5,7 +5,7 @@
  *  Copyright (C) 1997-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  */
  
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/string.h>
-- 
2.8.4


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 06/14] sparc: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, David S. Miller, sparclinux

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 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 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index cd83be527586..b0377db12d83 100644
--- a/arch/sparc/kernel/kprobes.c
+++ b/arch/sparc/kernel/kprobes.c
@@ -5,7 +5,7 @@
 
 #include <linux/kernel.h>
 #include <linux/kprobes.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/slab.h>
 #include <linux/context_tracking.h>
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index d21cd625c0de..4094a51b1970 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -8,7 +8,7 @@
  * I like traps on v9, :))))
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/sched.h>
 #include <linux/linkage.h>
 #include <linux/kernel.h>
diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c
index 9aacb9159262..52c00d90d4b4 100644
--- a/arch/sparc/kernel/unaligned_64.c
+++ b/arch/sparc/kernel/unaligned_64.c
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <asm/asi.h>
 #include <asm/ptrace.h>
 #include <asm/pstate.h>
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index 6c43b924a7a2..0e9773ca7ff1 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -14,7 +14,7 @@
 #include <linux/mman.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/init.h>
 #include <linux/perf_event.h>
 #include <linux/interrupt.h>
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index aec508e37490..96680a687799 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -5,7 +5,7 @@
  *  Copyright (C) 1997-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  */
  
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/string.h>
-- 
2.8.4


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 07/14] powerpc: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linuxppc-dev

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/powerpc/kernel/kprobes.c | 2 +-
 arch/powerpc/mm/fault.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 3ed8ec09b5c9..e785cc9e1ecd 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -29,7 +29,7 @@
 #include <linux/kprobes.h>
 #include <linux/ptrace.h>
 #include <linux/preempt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/slab.h>
 #include <asm/code-patching.h>
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index a4db22f65021..bb1ffc559f38 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -26,7 +26,7 @@
 #include <linux/mm.h>
 #include <linux/interrupt.h>
 #include <linux/highmem.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
 #include <linux/perf_event.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 07/14] powerpc: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linuxppc-dev

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/powerpc/kernel/kprobes.c | 2 +-
 arch/powerpc/mm/fault.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 3ed8ec09b5c9..e785cc9e1ecd 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -29,7 +29,7 @@
 #include <linux/kprobes.h>
 #include <linux/ptrace.h>
 #include <linux/preempt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/slab.h>
 #include <asm/code-patching.h>
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index a4db22f65021..bb1ffc559f38 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -26,7 +26,7 @@
 #include <linux/mm.h>
 #include <linux/interrupt.h>
 #include <linux/highmem.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
 #include <linux/perf_event.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 08/14] m68k: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Geert Uytterhoeven, linux-m68k

This file was only including module.h for exception table related
functions.  We've now separated that content out into its own file
"extable.h" so now move over to that and avoid all the extra header
content in module.h that we don't really need to compile this.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/m68k/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index 2dcee3a88867..db775322b485 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -42,7 +42,7 @@
 #include <linux/personality.h>
 #include <linux/tty.h>
 #include <linux/binfmts.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/tracehook.h>
 
 #include <asm/setup.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 08/14] m68k: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Geert Uytterhoeven, linux-m68k

This file was only including module.h for exception table related
functions.  We've now separated that content out into its own file
"extable.h" so now move over to that and avoid all the extra header
content in module.h that we don't really need to compile this.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/m68k/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index 2dcee3a88867..db775322b485 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -42,7 +42,7 @@
 #include <linux/personality.h>
 #include <linux/tty.h>
 #include <linux/binfmts.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/tracehook.h>
 
 #include <asm/setup.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 09/14] s390: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Martin Schwidefsky, Heiko Carstens,
	linux-s390

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

The additions of uaccess.h are to deal with implict includes like:

arch/s390/kernel/traps.c: In function 'do_report_trap':
arch/s390/kernel/traps.c:56:4: error: implicit declaration of function 'extable_fixup' [-Werror=implicit-function-declaration]
arch/s390/kernel/traps.c: In function 'illegal_op':
arch/s390/kernel/traps.c:173:3: error: implicit declaration of function 'get_user' [-Werror=implicit-function-declaration]

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/s390/kernel/early.c   | 2 +-
 arch/s390/kernel/kprobes.c | 2 ++
 arch/s390/kernel/traps.c   | 3 ++-
 arch/s390/mm/fault.c       | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 717b03aa16b5..2374c5b46bbc 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -13,7 +13,7 @@
 #include <linux/string.h>
 #include <linux/ctype.h>
 #include <linux/lockdep.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/pfn.h>
 #include <linux/uaccess.h>
 #include <linux/kernel.h>
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index 250f5972536a..4871c7c3ccde 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -26,12 +26,14 @@
 #include <linux/stop_machine.h>
 #include <linux/kdebug.h>
 #include <linux/uaccess.h>
+#include <linux/extable.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/hardirq.h>
 #include <linux/ftrace.h>
 #include <asm/cacheflush.h>
 #include <asm/sections.h>
+#include <asm/uaccess.h>
 #include <asm/dis.h>
 
 DEFINE_PER_CPU(struct kprobe *, current_kprobe);
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index dd97a3e8a34a..d0539f76fd24 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -14,11 +14,12 @@
  */
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/ptrace.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/slab.h>
+#include <asm/uaccess.h>
 #include <asm/fpu/api.h>
 #include "entry.h"
 
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index a58bca62a93b..cca73881e672 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -24,7 +24,7 @@
 #include <linux/kdebug.h>
 #include <linux/init.h>
 #include <linux/console.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/hardirq.h>
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 09/14] s390: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Martin Schwidefsky, Heiko Carstens,
	linux-s390

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

The additions of uaccess.h are to deal with implict includes like:

arch/s390/kernel/traps.c: In function 'do_report_trap':
arch/s390/kernel/traps.c:56:4: error: implicit declaration of function 'extable_fixup' [-Werror=implicit-function-declaration]
arch/s390/kernel/traps.c: In function 'illegal_op':
arch/s390/kernel/traps.c:173:3: error: implicit declaration of function 'get_user' [-Werror=implicit-function-declaration]

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/s390/kernel/early.c   | 2 +-
 arch/s390/kernel/kprobes.c | 2 ++
 arch/s390/kernel/traps.c   | 3 ++-
 arch/s390/mm/fault.c       | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 717b03aa16b5..2374c5b46bbc 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -13,7 +13,7 @@
 #include <linux/string.h>
 #include <linux/ctype.h>
 #include <linux/lockdep.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/pfn.h>
 #include <linux/uaccess.h>
 #include <linux/kernel.h>
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index 250f5972536a..4871c7c3ccde 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -26,12 +26,14 @@
 #include <linux/stop_machine.h>
 #include <linux/kdebug.h>
 #include <linux/uaccess.h>
+#include <linux/extable.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/hardirq.h>
 #include <linux/ftrace.h>
 #include <asm/cacheflush.h>
 #include <asm/sections.h>
+#include <asm/uaccess.h>
 #include <asm/dis.h>
 
 DEFINE_PER_CPU(struct kprobe *, current_kprobe);
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index dd97a3e8a34a..d0539f76fd24 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -14,11 +14,12 @@
  */
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/ptrace.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/slab.h>
+#include <asm/uaccess.h>
 #include <asm/fpu/api.h>
 #include "entry.h"
 
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index a58bca62a93b..cca73881e672 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -24,7 +24,7 @@
 #include <linux/kdebug.h>
 #include <linux/init.h>
 #include <linux/console.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/hardirq.h>
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 10/14] tile: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Chris Metcalf

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/tile/kernel/unaligned.c | 2 +-
 arch/tile/mm/extable.c       | 2 +-
 arch/tile/mm/fault.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/tile/kernel/unaligned.c b/arch/tile/kernel/unaligned.c
index 9772a3554282..4fe78c5b8394 100644
--- a/arch/tile/kernel/unaligned.c
+++ b/arch/tile/kernel/unaligned.c
@@ -22,7 +22,7 @@
 #include <linux/mman.h>
 #include <linux/types.h>
 #include <linux/err.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/compat.h>
 #include <linux/prctl.h>
 #include <asm/cacheflush.h>
diff --git a/arch/tile/mm/extable.c b/arch/tile/mm/extable.c
index 4fb0acb9d154..aeaf20c7aaa4 100644
--- a/arch/tile/mm/extable.c
+++ b/arch/tile/mm/extable.c
@@ -12,7 +12,7 @@
  *   more details.
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/spinlock.h>
 #include <linux/uaccess.h>
 
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c
index beba986589e5..709f8e9ba3e9 100644
--- a/arch/tile/mm/fault.c
+++ b/arch/tile/mm/fault.c
@@ -29,7 +29,7 @@
 #include <linux/tty.h>
 #include <linux/vt_kern.h>		/* For unblank_screen() */
 #include <linux/highmem.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kprobes.h>
 #include <linux/hugetlb.h>
 #include <linux/syscalls.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 10/14] tile: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Chris Metcalf

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/tile/kernel/unaligned.c | 2 +-
 arch/tile/mm/extable.c       | 2 +-
 arch/tile/mm/fault.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/tile/kernel/unaligned.c b/arch/tile/kernel/unaligned.c
index 9772a3554282..4fe78c5b8394 100644
--- a/arch/tile/kernel/unaligned.c
+++ b/arch/tile/kernel/unaligned.c
@@ -22,7 +22,7 @@
 #include <linux/mman.h>
 #include <linux/types.h>
 #include <linux/err.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/compat.h>
 #include <linux/prctl.h>
 #include <asm/cacheflush.h>
diff --git a/arch/tile/mm/extable.c b/arch/tile/mm/extable.c
index 4fb0acb9d154..aeaf20c7aaa4 100644
--- a/arch/tile/mm/extable.c
+++ b/arch/tile/mm/extable.c
@@ -12,7 +12,7 @@
  *   more details.
  */
 
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/spinlock.h>
 #include <linux/uaccess.h>
 
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c
index beba986589e5..709f8e9ba3e9 100644
--- a/arch/tile/mm/fault.c
+++ b/arch/tile/mm/fault.c
@@ -29,7 +29,7 @@
 #include <linux/tty.h>
 #include <linux/vt_kern.h>		/* For unblank_screen() */
 #include <linux/highmem.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kprobes.h>
 #include <linux/hugetlb.h>
 #include <linux/syscalls.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 11/14] alpha: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, linux-alpha

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/alpha/kernel/traps.c | 2 +-
 arch/alpha/mm/fault.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index 74aceead06e9..7cf05aa482d5 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -13,7 +13,7 @@
 #include <linux/sched.h>
 #include <linux/tty.h>
 #include <linux/delay.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kallsyms.h>
 #include <linux/ratelimit.h>
 
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index 83e9eee57a55..47948b4dd157 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -22,7 +22,7 @@
 #include <linux/mman.h>
 #include <linux/smp.h>
 #include <linux/interrupt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *);
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 11/14] alpha: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, linux-alpha

These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/alpha/kernel/traps.c | 2 +-
 arch/alpha/mm/fault.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index 74aceead06e9..7cf05aa482d5 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -13,7 +13,7 @@
 #include <linux/sched.h>
 #include <linux/tty.h>
 #include <linux/delay.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/kallsyms.h>
 #include <linux/ratelimit.h>
 
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index 83e9eee57a55..47948b4dd157 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -22,7 +22,7 @@
 #include <linux/mman.h>
 #include <linux/smp.h>
 #include <linux/interrupt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *);
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 12/14] parisc: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, James E.J. Bottomley, Helge Deller,
	linux-parisc

This file was only including module.h for exception table related
functions.  We've now separated that content out into its own file
"extable.h" so now move over to that and avoid all the extra header
content in module.h that we don't really need to compile this file.

Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/parisc/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index 163af2c31d76..a67519b79504 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -14,7 +14,7 @@
 #include <linux/ptrace.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 #include <asm/traps.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 12/14] parisc: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, James E.J. Bottomley, Helge Deller,
	linux-parisc

This file was only including module.h for exception table related
functions.  We've now separated that content out into its own file
"extable.h" so now move over to that and avoid all the extra header
content in module.h that we don't really need to compile this file.

Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/parisc/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index 163af2c31d76..a67519b79504 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -14,7 +14,7 @@
 #include <linux/ptrace.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
-#include <linux/module.h>
+#include <linux/extable.h>
 #include <linux/uaccess.h>
 
 #include <asm/traps.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 13/14] core: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Rusty Russell, Andrew Morton, Linus Torvalds

These files were including module.h for exception table related
functions.  We've now separated that content out into its own file
"extable.h" so now move over to that and where possible, avoid all
the extra header content in module.h that we don't really need to
compile these non-modular files.

Note:
   init/main.c still needs module.h for __init_or_module
   kernel/extable.c still needs module.h for is_module_text_address

...and so we don't get the benefit of removing module.h from the cpp
feed for these two files, unlike the almost universal 1:1 exchange
of module.h for extable.h we were able to do in the arch dirs.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 init/main.c      | 1 +
 kernel/extable.c | 1 +
 kernel/module.c  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/init/main.c b/init/main.c
index 9a9a25570f72..42fa8368d4a9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -12,6 +12,7 @@
 #define DEBUG		/* Enable initcall_debug */
 
 #include <linux/types.h>
+#include <linux/extable.h>
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/kernel.h>
diff --git a/kernel/extable.c b/kernel/extable.c
index e820ccee9846..55038378d882 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -17,6 +17,7 @@
 */
 #include <linux/ftrace.h>
 #include <linux/memory.h>
+#include <linux/extable.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/init.h>
diff --git a/kernel/module.c b/kernel/module.c
index e70a2faf71d9..536ab4b72761 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -17,6 +17,7 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <linux/export.h>
+#include <linux/extable.h>
 #include <linux/moduleloader.h>
 #include <linux/trace_events.h>
 #include <linux/init.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 13/14] core: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Rusty Russell, Andrew Morton, Linus Torvalds

These files were including module.h for exception table related
functions.  We've now separated that content out into its own file
"extable.h" so now move over to that and where possible, avoid all
the extra header content in module.h that we don't really need to
compile these non-modular files.

Note:
   init/main.c still needs module.h for __init_or_module
   kernel/extable.c still needs module.h for is_module_text_address

...and so we don't get the benefit of removing module.h from the cpp
feed for these two files, unlike the almost universal 1:1 exchange
of module.h for extable.h we were able to do in the arch dirs.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 init/main.c      | 1 +
 kernel/extable.c | 1 +
 kernel/module.c  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/init/main.c b/init/main.c
index 9a9a25570f72..42fa8368d4a9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -12,6 +12,7 @@
 #define DEBUG		/* Enable initcall_debug */
 
 #include <linux/types.h>
+#include <linux/extable.h>
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/kernel.h>
diff --git a/kernel/extable.c b/kernel/extable.c
index e820ccee9846..55038378d882 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -17,6 +17,7 @@
 */
 #include <linux/ftrace.h>
 #include <linux/memory.h>
+#include <linux/extable.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/init.h>
diff --git a/kernel/module.c b/kernel/module.c
index e70a2faf71d9..536ab4b72761 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -17,6 +17,7 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <linux/export.h>
+#include <linux/extable.h>
 #include <linux/moduleloader.h>
 #include <linux/trace_events.h>
 #include <linux/init.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 14/14] module.h: remove extable.h include now users have migrated
  2016-07-25  3:42 ` Paul Gortmaker
@ 2016-07-25  3:42   ` Paul Gortmaker
  -1 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Rusty Russell, Andrew Morton, Linus Torvalds

With hopefully most/all users of module.h that were looking for
exception table functions moved over to the new extable.h header,
we can remove the back-compat include that let us transition
without introducing build regressions.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/module.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index f95ed243a4de..1974eadcb308 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -18,7 +18,6 @@
 #include <linux/moduleparam.h>
 #include <linux/jump_label.h>
 #include <linux/export.h>
-#include <linux/extable.h>	/* only as arch move module.h -> extable.h */
 #include <linux/rbtree_latch.h>
 
 #include <linux/percpu.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 14/14] module.h: remove extable.h include now users have migrated
@ 2016-07-25  3:42   ` Paul Gortmaker
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Gortmaker @ 2016-07-25  3:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Rusty Russell, Andrew Morton, Linus Torvalds

With hopefully most/all users of module.h that were looking for
exception table functions moved over to the new extable.h header,
we can remove the back-compat include that let us transition
without introducing build regressions.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/module.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index f95ed243a4de..1974eadcb308 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -18,7 +18,6 @@
 #include <linux/moduleparam.h>
 #include <linux/jump_label.h>
 #include <linux/export.h>
-#include <linux/extable.h>	/* only as arch move module.h -> extable.h */
 #include <linux/rbtree_latch.h>
 
 #include <linux/percpu.h>
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

* Re: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
  2016-07-25  3:42 ` Paul Gortmaker
                     ` (3 preceding siblings ...)
  (?)
@ 2016-07-25  4:18   ` Linus Torvalds
  -1 siblings, 0 replies; 52+ messages in thread
From: Linus Torvalds @ 2016-07-25  4:18 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Linux Kernel Mailing List, linux-arch, 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, Martin Schwidefsky, Matt Turner,
	Michael Ellerman, Paul Mackerras, Ralf Baechle,
	Richard Henderson, Russell King, Rus

On Sun, Jul 24, 2016 at 8:42 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
>
> 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 [...]

This looks to be the right thing to do as far as I can tell. I'm not
sure how big of a problem the extable stuff is (we definitely have
much bigger unnecessary include files that cause a lot more problems),
but it seems like a reasonable cleanup.

              Linus

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  4:18   ` Linus Torvalds
  0 siblings, 0 replies; 52+ messages in thread
From: Linus Torvalds @ 2016-07-25  4:18 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Linux Kernel Mailing List, linux-arch, 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, Martin Schwidefsky, Matt Turner,
	Michael Ellerman, Paul Mackerras, Ralf Baechle,
	Richard Henderson, Russell King, Rusty Russell, Thomas Gleixner,
	Will Deacon, linux-alpha, linux-arm-kernel, Linux/m68k,
	linux-mips, Parisc List, ppc-dev, linux-s390,
	the arch/x86 maintainers, sparclinux

On Sun, Jul 24, 2016 at 8:42 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
>
> 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 [...]

This looks to be the right thing to do as far as I can tell. I'm not
sure how big of a problem the extable stuff is (we definitely have
much bigger unnecessary include files that cause a lot more problems),
but it seems like a reasonable cleanup.

              Linus

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  4:18   ` Linus Torvalds
  0 siblings, 0 replies; 52+ messages in thread
From: Linus Torvalds @ 2016-07-25  4:18 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Linux Kernel Mailing List, linux-arch, 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, Martin Schwidefsky, Matt Turner,
	Michael Ellerman, Paul Mackerras, Ralf Baechle,
	Richard Henderson, Russell King

On Sun, Jul 24, 2016 at 8:42 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
>
> 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 [...]

This looks to be the right thing to do as far as I can tell. I'm not
sure how big of a problem the extable stuff is (we definitely have
much bigger unnecessary include files that cause a lot more problems),
but it seems like a reasonable cleanup.

              Linus

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  4:18   ` Linus Torvalds
  0 siblings, 0 replies; 52+ messages in thread
From: Linus Torvalds @ 2016-07-25  4:18 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Linux Kernel Mailing List, linux-arch, 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, Martin Schwidefsky, Matt Turner,
	Michael Ellerman, Paul Mackerras, Ralf Baechle,
	Richard Henderson, Russell King, Rusty Russell, Thomas Gleixner,
	Will Deacon, linux-alpha, linux-arm-kernel, Linux/m68k,
	linux-mips, Parisc List, ppc-dev, linux-s390,
	the arch/x86 maintainers, sparclinux

On Sun, Jul 24, 2016 at 8:42 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
>
> 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 [...]

This looks to be the right thing to do as far as I can tell. I'm not
sure how big of a problem the extable stuff is (we definitely have
much bigger unnecessary include files that cause a lot more problems),
but it seems like a reasonable cleanup.

              Linus

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  4:18   ` Linus Torvalds
  0 siblings, 0 replies; 52+ messages in thread
From: Linus Torvalds @ 2016-07-25  4:18 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Linux Kernel Mailing List, linux-arch, 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, Martin Schwidefsky, Matt Turner,
	Michael Ellerman, Paul Mackerras, Ralf Baechle,
	Richard Henderson, Russell King

On Sun, Jul 24, 2016 at 8:42 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
>
> 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 [...]

This looks to be the right thing to do as far as I can tell. I'm not
sure how big of a problem the extable stuff is (we definitely have
much bigger unnecessary include files that cause a lot more problems),
but it seems like a reasonable cleanup.

              Linus

^ permalink raw reply	[flat|nested] 52+ messages in thread

* [RFC/PATCH 00/14] split exception table content out of module.h into extable.h
@ 2016-07-25  4:18   ` Linus Torvalds
  0 siblings, 0 replies; 52+ messages in thread
From: Linus Torvalds @ 2016-07-25  4:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jul 24, 2016 at 8:42 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
>
> 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 [...]

This looks to be the right thing to do as far as I can tell. I'm not
sure how big of a problem the extable stuff is (we definitely have
much bigger unnecessary include files that cause a lot more problems),
but it seems like a reasonable cleanup.

              Linus

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 02/14] x86: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42   ` Paul Gortmaker
  (?)
@ 2016-07-25  6:35   ` Ingo Molnar
  -1 siblings, 0 replies; 52+ messages in thread
From: Ingo Molnar @ 2016-07-25  6:35 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: linux-kernel, linux-arch, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86


* Paul Gortmaker <paul.gortmaker@windriver.com> wrote:

> These files were only including module.h for exception table
> related functions.  We've now separated that content out into its
> own file "extable.h" so now move over to that and avoid all the
> extra header content in module.h that we don't really need to compile
> these files.
> 
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: x86@kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 05/14] mips: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42   ` Paul Gortmaker
  (?)
@ 2016-07-25  9:08     ` kbuild test robot
  -1 siblings, 0 replies; 52+ messages in thread
From: kbuild test robot @ 2016-07-25  9:08 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: kbuild-all, linux-kernel, linux-arch, Paul Gortmaker,
	Ralf Baechle, linux-mips

[-- Attachment #1: Type: text/plain, Size: 2247 bytes --]

Hi,

[auto build test ERROR on next-20160724]
[cannot apply to stable/master linus/master linux/master v4.7-rc7 v4.7-rc6 v4.7-rc5 v4.7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Paul-Gortmaker/split-exception-table-content-out-of-module-h-into-extable-h/20160725-152314
config: mips-jz4740 (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

All errors (new ones prefixed by >>):

   arch/mips/kernel/traps.c: In function 'show_registers':
>> arch/mips/kernel/traps.c:354:2: error: implicit declaration of function 'print_modules' [-Werror=implicit-function-declaration]
     print_modules();
     ^
   cc1: some warnings being treated as errors

vim +/print_modules +354 arch/mips/kernel/traps.c

c1bf207d David Daney     2010-08-03  348  void show_registers(struct pt_regs *regs)
^1da177e Linus Torvalds  2005-04-16  349  {
39b8d525 Ralf Baechle    2008-04-28  350  	const int field = 2 * sizeof(unsigned long);
83e4da1e Leonid Yegoshin 2013-10-08  351  	mm_segment_t old_fs = get_fs();
39b8d525 Ralf Baechle    2008-04-28  352  
eae23f2c Ralf Baechle    2007-10-14  353  	__show_regs(regs);
^1da177e Linus Torvalds  2005-04-16 @354  	print_modules();
39b8d525 Ralf Baechle    2008-04-28  355  	printk("Process %s (pid: %d, threadinfo=%p, task=%p, tls=%0*lx)\n",
39b8d525 Ralf Baechle    2008-04-28  356  	       current->comm, current->pid, current_thread_info(), current,
39b8d525 Ralf Baechle    2008-04-28  357  	      field, current_thread_info()->tp_value);

:::::: The code at line 354 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 18973 bytes --]

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 05/14] mips: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  9:08     ` kbuild test robot
  0 siblings, 0 replies; 52+ messages in thread
From: kbuild test robot @ 2016-07-25  9:08 UTC (permalink / raw)
  Cc: kbuild-all, linux-kernel, linux-arch, Paul Gortmaker,
	Ralf Baechle, linux-mips

[-- Attachment #1: Type: text/plain, Size: 2247 bytes --]

Hi,

[auto build test ERROR on next-20160724]
[cannot apply to stable/master linus/master linux/master v4.7-rc7 v4.7-rc6 v4.7-rc5 v4.7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Paul-Gortmaker/split-exception-table-content-out-of-module-h-into-extable-h/20160725-152314
config: mips-jz4740 (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

All errors (new ones prefixed by >>):

   arch/mips/kernel/traps.c: In function 'show_registers':
>> arch/mips/kernel/traps.c:354:2: error: implicit declaration of function 'print_modules' [-Werror=implicit-function-declaration]
     print_modules();
     ^
   cc1: some warnings being treated as errors

vim +/print_modules +354 arch/mips/kernel/traps.c

c1bf207d David Daney     2010-08-03  348  void show_registers(struct pt_regs *regs)
^1da177e Linus Torvalds  2005-04-16  349  {
39b8d525 Ralf Baechle    2008-04-28  350  	const int field = 2 * sizeof(unsigned long);
83e4da1e Leonid Yegoshin 2013-10-08  351  	mm_segment_t old_fs = get_fs();
39b8d525 Ralf Baechle    2008-04-28  352  
eae23f2c Ralf Baechle    2007-10-14  353  	__show_regs(regs);
^1da177e Linus Torvalds  2005-04-16 @354  	print_modules();
39b8d525 Ralf Baechle    2008-04-28  355  	printk("Process %s (pid: %d, threadinfo=%p, task=%p, tls=%0*lx)\n",
39b8d525 Ralf Baechle    2008-04-28  356  	       current->comm, current->pid, current_thread_info(), current,
39b8d525 Ralf Baechle    2008-04-28  357  	      field, current_thread_info()->tp_value);

:::::: The code at line 354 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 18973 bytes --]

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 05/14] mips: migrate exception table users off module.h and onto extable.h
@ 2016-07-25  9:08     ` kbuild test robot
  0 siblings, 0 replies; 52+ messages in thread
From: kbuild test robot @ 2016-07-25  9:08 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: kbuild-all, linux-kernel, linux-arch, Ralf Baechle, linux-mips

[-- Attachment #1: Type: text/plain, Size: 2247 bytes --]

Hi,

[auto build test ERROR on next-20160724]
[cannot apply to stable/master linus/master linux/master v4.7-rc7 v4.7-rc6 v4.7-rc5 v4.7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Paul-Gortmaker/split-exception-table-content-out-of-module-h-into-extable-h/20160725-152314
config: mips-jz4740 (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

All errors (new ones prefixed by >>):

   arch/mips/kernel/traps.c: In function 'show_registers':
>> arch/mips/kernel/traps.c:354:2: error: implicit declaration of function 'print_modules' [-Werror=implicit-function-declaration]
     print_modules();
     ^
   cc1: some warnings being treated as errors

vim +/print_modules +354 arch/mips/kernel/traps.c

c1bf207d David Daney     2010-08-03  348  void show_registers(struct pt_regs *regs)
^1da177e Linus Torvalds  2005-04-16  349  {
39b8d525 Ralf Baechle    2008-04-28  350  	const int field = 2 * sizeof(unsigned long);
83e4da1e Leonid Yegoshin 2013-10-08  351  	mm_segment_t old_fs = get_fs();
39b8d525 Ralf Baechle    2008-04-28  352  
eae23f2c Ralf Baechle    2007-10-14  353  	__show_regs(regs);
^1da177e Linus Torvalds  2005-04-16 @354  	print_modules();
39b8d525 Ralf Baechle    2008-04-28  355  	printk("Process %s (pid: %d, threadinfo=%p, task=%p, tls=%0*lx)\n",
39b8d525 Ralf Baechle    2008-04-28  356  	       current->comm, current->pid, current_thread_info(), current,
39b8d525 Ralf Baechle    2008-04-28  357  	      field, current_thread_info()->tp_value);

:::::: The code at line 354 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 18973 bytes --]

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 04/14] arm64: migrate exception table users off module.h and onto extable.h
  2016-07-25  3:42   ` Paul Gortmaker
@ 2016-07-25 16:03     ` Catalin Marinas
  -1 siblings, 0 replies; 52+ messages in thread
From: Catalin Marinas @ 2016-07-25 16:03 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, linux-arch, Will Deacon, linux-arm-kernel

On Sun, Jul 24, 2016 at 11:42:37PM -0400, Paul Gortmaker wrote:
> These files were only including module.h for exception table
> related functions.  We've now separated that content out into its
> own file "extable.h" so now move over to that and avoid all the
> extra header content in module.h that we don't really need to compile
> these files.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

^ permalink raw reply	[flat|nested] 52+ messages in thread

* [PATCH 04/14] arm64: migrate exception table users off module.h and onto extable.h
@ 2016-07-25 16:03     ` Catalin Marinas
  0 siblings, 0 replies; 52+ messages in thread
From: Catalin Marinas @ 2016-07-25 16:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jul 24, 2016 at 11:42:37PM -0400, Paul Gortmaker wrote:
> These files were only including module.h for exception table
> related functions.  We've now separated that content out into its
> own file "extable.h" so now move over to that and avoid all the
> extra header content in module.h that we don't really need to compile
> these files.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 01/14] exceptions: fork exception table content from module.h into extable.h
  2016-07-25  3:42   ` Paul Gortmaker
  (?)
@ 2016-07-27  2:34     ` Rusty Russell
  -1 siblings, 0 replies; 52+ messages in thread
From: Rusty Russell @ 2016-07-27  2:34 UTC (permalink / raw)
  To: Paul Gortmaker, linux-kernel
  Cc: linux-arch, Paul Gortmaker, Andrew Morton, Linus Torvalds, Jessica Yu

Paul Gortmaker <paul.gortmaker@windriver.com> writes:
> For historical reasons (i.e. pre-git) the exception table stuff was
> buried in the middle of the module.h file.  I noticed this while
> doing an audit for needless includes of module.h and found core
> kernel files (both arch specific and arch independent) were just
> including module.h for this.

I'm going to include this first patch now; it's trivial, and allows the
rest of the changes to proceed at the archs' leisure.

I have another patch series which had to be tweaked, so I'm deferring
the push to Linus for a couple of days stewing in linux-next anyway.

Thanks,
Rusty.

> 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 file called extable.h -- and temporarily include it 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.
>
> The gain here is that module.h gets a bit smaller, across all
> modular drivers that we build for allmodconfig.  Also the core
> files that only need exception table stuff don't have an include
> of module.h that brings in lots of extra stuff and just looks
> generally out of place.
>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  include/linux/extable.h | 30 ++++++++++++++++++++++++++++++
>  include/linux/module.h  | 27 ++-------------------------
>  2 files changed, 32 insertions(+), 25 deletions(-)
>  create mode 100644 include/linux/extable.h
>
> diff --git a/include/linux/extable.h b/include/linux/extable.h
> new file mode 100644
> index 000000000000..2c71dccd1bc3
> --- /dev/null
> +++ b/include/linux/extable.h
> @@ -0,0 +1,30 @@
> +#ifndef _LINUX_EXTABLE_H
> +#define _LINUX_EXTABLE_H
> +
> +struct module;
> +struct exception_table_entry;
> +
> +const struct exception_table_entry *
> +search_extable(const struct exception_table_entry *first,
> +	       const struct exception_table_entry *last,
> +	       unsigned long value);
> +void sort_extable(struct exception_table_entry *start,
> +		  struct exception_table_entry *finish);
> +void sort_main_extable(void);
> +void trim_init_extable(struct module *m);
> +
> +/* Given an address, look for it in the exception tables */
> +const struct exception_table_entry *search_exception_tables(unsigned long add);
> +
> +#ifdef CONFIG_MODULES
> +/* For extable.c to search modules' exception tables. */
> +const struct exception_table_entry *search_module_extables(unsigned long addr);
> +#else
> +static inline const struct exception_table_entry *
> +search_module_extables(unsigned long addr)
> +{
> +	return NULL;
> +}
> +#endif /*CONFIG_MODULES*/
> +
> +#endif /* _LINUX_EXTABLE_H */
> diff --git a/include/linux/module.h b/include/linux/module.h
> index f777164c238b..f95ed243a4de 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -18,6 +18,7 @@
>  #include <linux/moduleparam.h>
>  #include <linux/jump_label.h>
>  #include <linux/export.h>
> +#include <linux/extable.h>	/* only as arch move module.h -> extable.h */
>  #include <linux/rbtree_latch.h>
>  
>  #include <linux/percpu.h>
> @@ -37,6 +38,7 @@ struct modversion_info {
>  };
>  
>  struct module;
> +struct exception_table_entry;
>  
>  struct module_kobject {
>  	struct kobject kobj;
> @@ -155,18 +157,6 @@ extern void cleanup_module(void);
>  #define __INITRODATA_OR_MODULE __INITRODATA
>  #endif /*CONFIG_MODULES*/
>  
> -/* Archs provide a method of finding the correct exception table. */
> -struct exception_table_entry;
> -
> -const struct exception_table_entry *
> -search_extable(const struct exception_table_entry *first,
> -	       const struct exception_table_entry *last,
> -	       unsigned long value);
> -void sort_extable(struct exception_table_entry *start,
> -		  struct exception_table_entry *finish);
> -void sort_main_extable(void);
> -void trim_init_extable(struct module *m);
> -
>  /* Generic info of form tag = "info" */
>  #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>  
> @@ -268,9 +258,6 @@ extern const typeof(name) __mod_##type##__##name##_device_table		\
>   * files require multiple MODULE_FIRMWARE() specifiers */
>  #define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
>  
> -/* Given an address, look for it in the exception tables */
> -const struct exception_table_entry *search_exception_tables(unsigned long add);
> -
>  struct notifier_block;
>  
>  #ifdef CONFIG_MODULES
> @@ -630,9 +617,6 @@ const char *module_address_lookup(unsigned long addr,
>  int lookup_module_symbol_name(unsigned long addr, char *symname);
>  int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
>  
> -/* For extable.c to search modules' exception tables. */
> -const struct exception_table_entry *search_module_extables(unsigned long addr);
> -
>  int register_module_notifier(struct notifier_block *nb);
>  int unregister_module_notifier(struct notifier_block *nb);
>  
> @@ -657,13 +641,6 @@ static inline bool is_livepatch_module(struct module *mod)
>  
>  #else /* !CONFIG_MODULES... */
>  
> -/* Given an address, look for it in the exception tables. */
> -static inline const struct exception_table_entry *
> -search_module_extables(unsigned long addr)
> -{
> -	return NULL;
> -}
> -
>  static inline struct module *__module_address(unsigned long addr)
>  {
>  	return NULL;
> -- 
> 2.8.4

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 01/14] exceptions: fork exception table content from module.h into extable.h
@ 2016-07-27  2:34     ` Rusty Russell
  0 siblings, 0 replies; 52+ messages in thread
From: Rusty Russell @ 2016-07-27  2:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Paul Gortmaker, Andrew Morton, Linus Torvalds, Jessica Yu

Paul Gortmaker <paul.gortmaker@windriver.com> writes:
> For historical reasons (i.e. pre-git) the exception table stuff was
> buried in the middle of the module.h file.  I noticed this while
> doing an audit for needless includes of module.h and found core
> kernel files (both arch specific and arch independent) were just
> including module.h for this.

I'm going to include this first patch now; it's trivial, and allows the
rest of the changes to proceed at the archs' leisure.

I have another patch series which had to be tweaked, so I'm deferring
the push to Linus for a couple of days stewing in linux-next anyway.

Thanks,
Rusty.

> 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 file called extable.h -- and temporarily include it 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.
>
> The gain here is that module.h gets a bit smaller, across all
> modular drivers that we build for allmodconfig.  Also the core
> files that only need exception table stuff don't have an include
> of module.h that brings in lots of extra stuff and just looks
> generally out of place.
>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  include/linux/extable.h | 30 ++++++++++++++++++++++++++++++
>  include/linux/module.h  | 27 ++-------------------------
>  2 files changed, 32 insertions(+), 25 deletions(-)
>  create mode 100644 include/linux/extable.h
>
> diff --git a/include/linux/extable.h b/include/linux/extable.h
> new file mode 100644
> index 000000000000..2c71dccd1bc3
> --- /dev/null
> +++ b/include/linux/extable.h
> @@ -0,0 +1,30 @@
> +#ifndef _LINUX_EXTABLE_H
> +#define _LINUX_EXTABLE_H
> +
> +struct module;
> +struct exception_table_entry;
> +
> +const struct exception_table_entry *
> +search_extable(const struct exception_table_entry *first,
> +	       const struct exception_table_entry *last,
> +	       unsigned long value);
> +void sort_extable(struct exception_table_entry *start,
> +		  struct exception_table_entry *finish);
> +void sort_main_extable(void);
> +void trim_init_extable(struct module *m);
> +
> +/* Given an address, look for it in the exception tables */
> +const struct exception_table_entry *search_exception_tables(unsigned long add);
> +
> +#ifdef CONFIG_MODULES
> +/* For extable.c to search modules' exception tables. */
> +const struct exception_table_entry *search_module_extables(unsigned long addr);
> +#else
> +static inline const struct exception_table_entry *
> +search_module_extables(unsigned long addr)
> +{
> +	return NULL;
> +}
> +#endif /*CONFIG_MODULES*/
> +
> +#endif /* _LINUX_EXTABLE_H */
> diff --git a/include/linux/module.h b/include/linux/module.h
> index f777164c238b..f95ed243a4de 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -18,6 +18,7 @@
>  #include <linux/moduleparam.h>
>  #include <linux/jump_label.h>
>  #include <linux/export.h>
> +#include <linux/extable.h>	/* only as arch move module.h -> extable.h */
>  #include <linux/rbtree_latch.h>
>  
>  #include <linux/percpu.h>
> @@ -37,6 +38,7 @@ struct modversion_info {
>  };
>  
>  struct module;
> +struct exception_table_entry;
>  
>  struct module_kobject {
>  	struct kobject kobj;
> @@ -155,18 +157,6 @@ extern void cleanup_module(void);
>  #define __INITRODATA_OR_MODULE __INITRODATA
>  #endif /*CONFIG_MODULES*/
>  
> -/* Archs provide a method of finding the correct exception table. */
> -struct exception_table_entry;
> -
> -const struct exception_table_entry *
> -search_extable(const struct exception_table_entry *first,
> -	       const struct exception_table_entry *last,
> -	       unsigned long value);
> -void sort_extable(struct exception_table_entry *start,
> -		  struct exception_table_entry *finish);
> -void sort_main_extable(void);
> -void trim_init_extable(struct module *m);
> -
>  /* Generic info of form tag = "info" */
>  #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>  
> @@ -268,9 +258,6 @@ extern const typeof(name) __mod_##type##__##name##_device_table		\
>   * files require multiple MODULE_FIRMWARE() specifiers */
>  #define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
>  
> -/* Given an address, look for it in the exception tables */
> -const struct exception_table_entry *search_exception_tables(unsigned long add);
> -
>  struct notifier_block;
>  
>  #ifdef CONFIG_MODULES
> @@ -630,9 +617,6 @@ const char *module_address_lookup(unsigned long addr,
>  int lookup_module_symbol_name(unsigned long addr, char *symname);
>  int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
>  
> -/* For extable.c to search modules' exception tables. */
> -const struct exception_table_entry *search_module_extables(unsigned long addr);
> -
>  int register_module_notifier(struct notifier_block *nb);
>  int unregister_module_notifier(struct notifier_block *nb);
>  
> @@ -657,13 +641,6 @@ static inline bool is_livepatch_module(struct module *mod)
>  
>  #else /* !CONFIG_MODULES... */
>  
> -/* Given an address, look for it in the exception tables. */
> -static inline const struct exception_table_entry *
> -search_module_extables(unsigned long addr)
> -{
> -	return NULL;
> -}
> -
>  static inline struct module *__module_address(unsigned long addr)
>  {
>  	return NULL;
> -- 
> 2.8.4

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 01/14] exceptions: fork exception table content from module.h into extable.h
@ 2016-07-27  2:34     ` Rusty Russell
  0 siblings, 0 replies; 52+ messages in thread
From: Rusty Russell @ 2016-07-27  2:34 UTC (permalink / raw)
  To: Paul Gortmaker, linux-kernel
  Cc: linux-arch, Andrew Morton, Linus Torvalds, Jessica Yu

Paul Gortmaker <paul.gortmaker@windriver.com> writes:
> For historical reasons (i.e. pre-git) the exception table stuff was
> buried in the middle of the module.h file.  I noticed this while
> doing an audit for needless includes of module.h and found core
> kernel files (both arch specific and arch independent) were just
> including module.h for this.

I'm going to include this first patch now; it's trivial, and allows the
rest of the changes to proceed at the archs' leisure.

I have another patch series which had to be tweaked, so I'm deferring
the push to Linus for a couple of days stewing in linux-next anyway.

Thanks,
Rusty.

> 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 file called extable.h -- and temporarily include it 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.
>
> The gain here is that module.h gets a bit smaller, across all
> modular drivers that we build for allmodconfig.  Also the core
> files that only need exception table stuff don't have an include
> of module.h that brings in lots of extra stuff and just looks
> generally out of place.
>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  include/linux/extable.h | 30 ++++++++++++++++++++++++++++++
>  include/linux/module.h  | 27 ++-------------------------
>  2 files changed, 32 insertions(+), 25 deletions(-)
>  create mode 100644 include/linux/extable.h
>
> diff --git a/include/linux/extable.h b/include/linux/extable.h
> new file mode 100644
> index 000000000000..2c71dccd1bc3
> --- /dev/null
> +++ b/include/linux/extable.h
> @@ -0,0 +1,30 @@
> +#ifndef _LINUX_EXTABLE_H
> +#define _LINUX_EXTABLE_H
> +
> +struct module;
> +struct exception_table_entry;
> +
> +const struct exception_table_entry *
> +search_extable(const struct exception_table_entry *first,
> +	       const struct exception_table_entry *last,
> +	       unsigned long value);
> +void sort_extable(struct exception_table_entry *start,
> +		  struct exception_table_entry *finish);
> +void sort_main_extable(void);
> +void trim_init_extable(struct module *m);
> +
> +/* Given an address, look for it in the exception tables */
> +const struct exception_table_entry *search_exception_tables(unsigned long add);
> +
> +#ifdef CONFIG_MODULES
> +/* For extable.c to search modules' exception tables. */
> +const struct exception_table_entry *search_module_extables(unsigned long addr);
> +#else
> +static inline const struct exception_table_entry *
> +search_module_extables(unsigned long addr)
> +{
> +	return NULL;
> +}
> +#endif /*CONFIG_MODULES*/
> +
> +#endif /* _LINUX_EXTABLE_H */
> diff --git a/include/linux/module.h b/include/linux/module.h
> index f777164c238b..f95ed243a4de 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -18,6 +18,7 @@
>  #include <linux/moduleparam.h>
>  #include <linux/jump_label.h>
>  #include <linux/export.h>
> +#include <linux/extable.h>	/* only as arch move module.h -> extable.h */
>  #include <linux/rbtree_latch.h>
>  
>  #include <linux/percpu.h>
> @@ -37,6 +38,7 @@ struct modversion_info {
>  };
>  
>  struct module;
> +struct exception_table_entry;
>  
>  struct module_kobject {
>  	struct kobject kobj;
> @@ -155,18 +157,6 @@ extern void cleanup_module(void);
>  #define __INITRODATA_OR_MODULE __INITRODATA
>  #endif /*CONFIG_MODULES*/
>  
> -/* Archs provide a method of finding the correct exception table. */
> -struct exception_table_entry;
> -
> -const struct exception_table_entry *
> -search_extable(const struct exception_table_entry *first,
> -	       const struct exception_table_entry *last,
> -	       unsigned long value);
> -void sort_extable(struct exception_table_entry *start,
> -		  struct exception_table_entry *finish);
> -void sort_main_extable(void);
> -void trim_init_extable(struct module *m);
> -
>  /* Generic info of form tag = "info" */
>  #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>  
> @@ -268,9 +258,6 @@ extern const typeof(name) __mod_##type##__##name##_device_table		\
>   * files require multiple MODULE_FIRMWARE() specifiers */
>  #define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
>  
> -/* Given an address, look for it in the exception tables */
> -const struct exception_table_entry *search_exception_tables(unsigned long add);
> -
>  struct notifier_block;
>  
>  #ifdef CONFIG_MODULES
> @@ -630,9 +617,6 @@ const char *module_address_lookup(unsigned long addr,
>  int lookup_module_symbol_name(unsigned long addr, char *symname);
>  int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
>  
> -/* For extable.c to search modules' exception tables. */
> -const struct exception_table_entry *search_module_extables(unsigned long addr);
> -
>  int register_module_notifier(struct notifier_block *nb);
>  int unregister_module_notifier(struct notifier_block *nb);
>  
> @@ -657,13 +641,6 @@ static inline bool is_livepatch_module(struct module *mod)
>  
>  #else /* !CONFIG_MODULES... */
>  
> -/* Given an address, look for it in the exception tables. */
> -static inline const struct exception_table_entry *
> -search_module_extables(unsigned long addr)
> -{
> -	return NULL;
> -}
> -
>  static inline struct module *__module_address(unsigned long addr)
>  {
>  	return NULL;
> -- 
> 2.8.4

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2016-07-28  1:48 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25  3:42 [RFC/PATCH 00/14] split exception table content out of module.h into extable.h Paul Gortmaker
2016-07-25  3:42 ` Paul Gortmaker
2016-07-25  3:42 ` Paul Gortmaker
2016-07-25  3:42 ` Paul Gortmaker
2016-07-25  3:42 ` Paul Gortmaker
2016-07-25  3:42 ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 01/14] exceptions: fork exception table content from " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-27  2:34   ` Rusty Russell
2016-07-27  2:34     ` Rusty Russell
2016-07-27  2:34     ` Rusty Russell
2016-07-25  3:42 ` [PATCH 02/14] x86: migrate exception table users off module.h and onto extable.h Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  6:35   ` Ingo Molnar
2016-07-25  3:42 ` [PATCH 03/14] arm: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 04/14] arm64: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25 16:03   ` Catalin Marinas
2016-07-25 16:03     ` Catalin Marinas
2016-07-25  3:42 ` [PATCH 05/14] mips: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  9:08   ` kbuild test robot
2016-07-25  9:08     ` kbuild test robot
2016-07-25  9:08     ` kbuild test robot
2016-07-25  3:42 ` [PATCH 06/14] sparc: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 07/14] powerpc: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 08/14] m68k: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 09/14] s390: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 10/14] tile: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 11/14] alpha: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 12/14] parisc: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 13/14] core: " Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  3:42 ` [PATCH 14/14] module.h: remove extable.h include now users have migrated Paul Gortmaker
2016-07-25  3:42   ` Paul Gortmaker
2016-07-25  4:18 ` [RFC/PATCH 00/14] split exception table content out of module.h into extable.h Linus Torvalds
2016-07-25  4:18   ` Linus Torvalds
2016-07-25  4:18   ` Linus Torvalds
2016-07-25  4:18   ` Linus Torvalds
2016-07-25  4:18   ` Linus Torvalds
2016-07-25  4:18   ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.