linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] Fix various section mismatches and build errors.
@ 2011-06-26 11:19 Ralf Baechle
  2011-06-27 13:26 ` [PATCH 10/12] SERIAL: SC26xx: Fix link error Ralf Baechle
  2011-06-28  5:12 ` [PATCH 00/12] Fix various section mismatches and build errors David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Ralf Baechle @ 2011-06-26 11:19 UTC (permalink / raw)
  To: Andrew Morton, Alan Cox, Brent Casavant, David Airlie
  Cc: dri-devel, linux-kernel, linux-mips, linux-scsi, linux-serial,
	netdev

I'm getting screen and screens full of section mismatches from my test
builds of the current kernel to the point where it's sometimes more
meaningful messages get hidden by the bulk of mismatches.  This is the
first round of fixes with more to come.

  Ralf

 drivers/gpu/drm/radeon/radeon_clocks.c |    4 ++--
 drivers/leds/leds-lp5521.c             |    4 ++--
 drivers/leds/leds-lp5523.c             |    4 ++--
 drivers/misc/ioc4.c                    |    2 +-
 drivers/net/3c509.c                    |    2 +-
 drivers/net/3c59x.c                    |    2 +-
 drivers/net/depca.c                    |   25 +++++++++++++------------
 drivers/net/hp100.c                    |    2 +-
 drivers/net/ne3210.c                   |   12 +++++++-----
 drivers/net/tulip/de4x5.c              |    2 +-
 drivers/scsi/sim710.c                  |    2 +-
 drivers/tty/serial/Kconfig             |    2 +-
 12 files changed, 33 insertions(+), 30 deletions(-)

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

* [PATCH 10/12] SERIAL: SC26xx: Fix link error.
  2011-06-26 11:19 [PATCH 00/12] Fix various section mismatches and build errors Ralf Baechle
@ 2011-06-27 13:26 ` Ralf Baechle
  2011-06-28  8:25   ` Alan Cox
  2011-06-28  5:12 ` [PATCH 00/12] Fix various section mismatches and build errors David Miller
  1 sibling, 1 reply; 9+ messages in thread
From: Ralf Baechle @ 2011-06-27 13:26 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-serial, linux-kernel, linux-mips

Kconfig allows enabling console support for the SC26xx driver even when
it's configured as a module resulting in a:

ERROR: "uart_console_device" [drivers/tty/serial/sc26xx.ko] undefined!

modpost error since the driver was merged in
eea63e0e8a60d00485b47fb6e75d9aa2566b989b [SC26XX: New serial driver for
SC2681 uarts] in 2.6.25.  Fixed by only allowing console support to be
enabled if the driver is builtin.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
To: Alan Cox <alan@linux.intel.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
---
 drivers/tty/serial/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 636144c..b3692e6 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1419,7 +1419,7 @@ config SERIAL_SC26XX
 
 config SERIAL_SC26XX_CONSOLE
 	bool "Console on SC2681/SC2692 serial port"
-	depends on SERIAL_SC26XX
+	depends on SERIAL_SC26XX=y
 	select SERIAL_CORE_CONSOLE
 	help
 	  Support for Console on SC2681/SC2692 serial ports.
-- 
1.7.4.4

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

* Re: [PATCH 00/12] Fix various section mismatches and build errors.
  2011-06-26 11:19 [PATCH 00/12] Fix various section mismatches and build errors Ralf Baechle
  2011-06-27 13:26 ` [PATCH 10/12] SERIAL: SC26xx: Fix link error Ralf Baechle
@ 2011-06-28  5:12 ` David Miller
  2011-06-29 13:07   ` Ralf Baechle
  1 sibling, 1 reply; 9+ messages in thread
From: David Miller @ 2011-06-28  5:12 UTC (permalink / raw)
  To: ralf
  Cc: akpm, alan, bcasavan, airlied, grundler, JBottomley, perex,
	rpurdie, klassert, tj, dri-devel, linux-kernel, linux-mips,
	linux-scsi, linux-serial, netdev


See commit:

commit 948252cb9e01d65a89ecadf67be5018351eee15e
Author: David S. Miller <davem@davemloft.net>
Date:   Tue May 31 19:27:48 2011 -0700

    Revert "net: fix section mismatches"
    
    This reverts commit e5cb966c0838e4da43a3b0751bdcac7fe719f7b4.
    
    It causes new build regressions with gcc-4.2 which is
    pretty common on non-x86 platforms.
    
    Reported-by: James Bottomley <James.Bottomley@HansenPartnership.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

and postings that led to this revert including:

http://marc.info/?l=linux-netdev&m=130653748205263&w=2

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

* Re: [PATCH 10/12] SERIAL: SC26xx: Fix link error.
  2011-06-27 13:26 ` [PATCH 10/12] SERIAL: SC26xx: Fix link error Ralf Baechle
@ 2011-06-28  8:25   ` Alan Cox
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2011-06-28  8:25 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-serial, linux-kernel, linux-mips

On Mon, 27 Jun 2011 14:26:56 +0100
Ralf Baechle <ralf@linux-mips.org> wrote:

> Kconfig allows enabling console support for the SC26xx driver even
> when it's configured as a module resulting in a:
> 
> ERROR: "uart_console_device" [drivers/tty/serial/sc26xx.ko] undefined!
> 
> modpost error since the driver was merged in
> eea63e0e8a60d00485b47fb6e75d9aa2566b989b [SC26XX: New serial driver
> for SC2681 uarts] in 2.6.25.  Fixed by only allowing console support
> to be enabled if the driver is builtin.
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Acked-by: Alan Cox <alan@linux.intel.com>

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

* Re: [PATCH 00/12] Fix various section mismatches and build errors.
  2011-06-28  5:12 ` [PATCH 00/12] Fix various section mismatches and build errors David Miller
@ 2011-06-29 13:07   ` Ralf Baechle
  2011-06-29 13:58     ` James Bottomley
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Baechle @ 2011-06-29 13:07 UTC (permalink / raw)
  To: David Miller
  Cc: akpm, alan, bcasavan, airlied, grundler, JBottomley, perex,
	rpurdie, klassert, tj, dri-devel, linux-kernel, linux-mips,
	linux-scsi, linux-serial, netdev

On Mon, Jun 27, 2011 at 10:12:57PM -0700, David Miller wrote:

> commit 948252cb9e01d65a89ecadf67be5018351eee15e
> Author: David S. Miller <davem@davemloft.net>
> Date:   Tue May 31 19:27:48 2011 -0700
> 
>     Revert "net: fix section mismatches"
>     
>     This reverts commit e5cb966c0838e4da43a3b0751bdcac7fe719f7b4.
>     
>     It causes new build regressions with gcc-4.2 which is
>     pretty common on non-x86 platforms.
>     
>     Reported-by: James Bottomley <James.Bottomley@HansenPartnership.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> and postings that led to this revert including:
> 
> http://marc.info/?l=linux-netdev&m=130653748205263&w=2

Thanks for the pointers; I looked into it a bit deeper and found that the
construct which hppa64-linux-gcc 4.2.4 doesn't like is the combination of
const and __devinitconst __devinitdata.

My patches are minimalistic and don't do any constification and seem to
work fine for PA-RISC.

A possible alternative to allow the use of Michał's reverted patch would
be to conditionalize the definition of __devinitconst.  There is no
user of __devexitconst so I left that unchanged.

  Ralf

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 include/linux/init.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/linux/init.h b/include/linux/init.h
index 577671c..e12fd85 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -84,7 +84,15 @@
 /* Used for HOTPLUG */
 #define __devinit        __section(.devinit.text) __cold
 #define __devinitdata    __section(.devinit.data)
+#if defined __GNUC__ && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
+/*
+ * GCC 4.2 will sometimes throw an error if the combination of const and
+ * __devinitconst is being used.  As a workaround make __devinitconst a noop
+ */
+#define __devinitconst
+#else
 #define __devinitconst   __section(.devinit.rodata)
+#endif
 #define __devexit        __section(.devexit.text) __exitused __cold
 #define __devexitdata    __section(.devexit.data)
 #define __devexitconst   __section(.devexit.rodata)

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

* Re: [PATCH 00/12] Fix various section mismatches and build errors.
  2011-06-29 13:07   ` Ralf Baechle
@ 2011-06-29 13:58     ` James Bottomley
  2011-06-29 15:14       ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: James Bottomley @ 2011-06-29 13:58 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: David Miller, akpm, alan, bcasavan, airlied, grundler, perex,
	rpurdie, klassert, tj, dri-devel, linux-kernel, linux-mips,
	linux-scsi, linux-serial, netdev

On Wed, 2011-06-29 at 14:07 +0100, Ralf Baechle wrote:
> On Mon, Jun 27, 2011 at 10:12:57PM -0700, David Miller wrote:
> 
> > commit 948252cb9e01d65a89ecadf67be5018351eee15e
> > Author: David S. Miller <davem@davemloft.net>
> > Date:   Tue May 31 19:27:48 2011 -0700
> > 
> >     Revert "net: fix section mismatches"
> >     
> >     This reverts commit e5cb966c0838e4da43a3b0751bdcac7fe719f7b4.
> >     
> >     It causes new build regressions with gcc-4.2 which is
> >     pretty common on non-x86 platforms.
> >     
> >     Reported-by: James Bottomley <James.Bottomley@HansenPartnership.com>
> >     Signed-off-by: David S. Miller <davem@davemloft.net>
> > 
> > and postings that led to this revert including:
> > 
> > http://marc.info/?l=linux-netdev&m=130653748205263&w=2
> 
> Thanks for the pointers; I looked into it a bit deeper and found that the
> construct which hppa64-linux-gcc 4.2.4 doesn't like is the combination of
> const and __devinitconst __devinitdata.
> 
> My patches are minimalistic and don't do any constification and seem to
> work fine for PA-RISC.
> 
> A possible alternative to allow the use of Michał's reverted patch would
> be to conditionalize the definition of __devinitconst.  There is no
> user of __devexitconst so I left that unchanged.

To be honest, my own take on this is that, apart from the compiler
cockups trying to do read only annotations, which affect various
versions of gcc not just the parisc ones, the _devX annotations are
pretty pointless.  They only really do something in the non-hotplug
case, so since 95% of the world seems to use hotplug now and the other
5% doesn't care that much about the odd page of memory (which you rarely
get, since modules sections are accumulated per module, not aggregate),
I'd just favour stripping __init and __exit where there's a problem.

I think we should simply concentrate on __init and __exit; that's where
most of the discard value lies and stop expending huge efforts on the
__devX stuff which adds huge complexity for no real gain.

James



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

* Re: [PATCH 00/12] Fix various section mismatches and build errors.
  2011-06-29 13:58     ` James Bottomley
@ 2011-06-29 15:14       ` Greg KH
  2011-06-29 16:19         ` Ralf Baechle
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2011-06-29 15:14 UTC (permalink / raw)
  To: James Bottomley
  Cc: Ralf Baechle, David Miller, akpm, alan, bcasavan, airlied,
	grundler, perex, rpurdie, klassert, tj, dri-devel, linux-kernel,
	linux-mips, linux-scsi, linux-serial, netdev

On Wed, Jun 29, 2011 at 08:58:19AM -0500, James Bottomley wrote:
> I think we should simply concentrate on __init and __exit; that's where
> most of the discard value lies and stop expending huge efforts on the
> __devX stuff which adds huge complexity for no real gain.

I have long felt that those __devX markings should just go away as they
cause nothing but problems and have no real gain as you point out.

greg k-h

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

* Re: [PATCH 00/12] Fix various section mismatches and build errors.
  2011-06-29 15:14       ` Greg KH
@ 2011-06-29 16:19         ` Ralf Baechle
  2011-06-29 17:24           ` James Bottomley
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Baechle @ 2011-06-29 16:19 UTC (permalink / raw)
  To: Greg KH
  Cc: James Bottomley, David Miller, akpm, alan, bcasavan, airlied,
	grundler, perex, rpurdie, klassert, tj, dri-devel, linux-kernel,
	linux-mips, linux-scsi, linux-serial, netdev

On Wed, Jun 29, 2011 at 08:14:24AM -0700, Greg KH wrote:

> 
> On Wed, Jun 29, 2011 at 08:58:19AM -0500, James Bottomley wrote:
> > I think we should simply concentrate on __init and __exit; that's where
> > most of the discard value lies and stop expending huge efforts on the
> > __devX stuff which adds huge complexity for no real gain.
> 
> I have long felt that those __devX markings should just go away as they
> cause nothing but problems and have no real gain as you point out.

The suggestion to do that has been floated around before but seems to
have missed sufficient thrust.  I'm all for it; the manual tagging with
__devX has not been very efficient on developer time.  I just want to see
meaningful warnings again over all that noise the current mechanisn may
produce.

  Ralf

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

* Re: [PATCH 00/12] Fix various section mismatches and build errors.
  2011-06-29 16:19         ` Ralf Baechle
@ 2011-06-29 17:24           ` James Bottomley
  0 siblings, 0 replies; 9+ messages in thread
From: James Bottomley @ 2011-06-29 17:24 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Greg KH, David Miller, akpm, alan, bcasavan, airlied, grundler,
	perex, rpurdie, klassert, tj, dri-devel, linux-kernel, linux-mips,
	linux-scsi, linux-serial, netdev

On Wed, 2011-06-29 at 17:19 +0100, Ralf Baechle wrote:
> On Wed, Jun 29, 2011 at 08:14:24AM -0700, Greg KH wrote:
> 
> > 
> > On Wed, Jun 29, 2011 at 08:58:19AM -0500, James Bottomley wrote:
> > > I think we should simply concentrate on __init and __exit; that's where
> > > most of the discard value lies and stop expending huge efforts on the
> > > __devX stuff which adds huge complexity for no real gain.
> > 
> > I have long felt that those __devX markings should just go away as they
> > cause nothing but problems and have no real gain as you point out.
> 
> The suggestion to do that has been floated around before but seems to
> have missed sufficient thrust.  I'm all for it; the manual tagging with
> __devX has not been very efficient on developer time.  I just want to see
> meaningful warnings again over all that noise the current mechanisn may
> produce.

For me, just go ahead and fix the actual problems: so _init sections and
_exit sections that are used from the main body, just strip the
annotations, don't try to change them for _devX ones.

Thanks,

James



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

end of thread, other threads:[~2011-06-29 17:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-26 11:19 [PATCH 00/12] Fix various section mismatches and build errors Ralf Baechle
2011-06-27 13:26 ` [PATCH 10/12] SERIAL: SC26xx: Fix link error Ralf Baechle
2011-06-28  8:25   ` Alan Cox
2011-06-28  5:12 ` [PATCH 00/12] Fix various section mismatches and build errors David Miller
2011-06-29 13:07   ` Ralf Baechle
2011-06-29 13:58     ` James Bottomley
2011-06-29 15:14       ` Greg KH
2011-06-29 16:19         ` Ralf Baechle
2011-06-29 17:24           ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).