All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: David Miller <davem@davemloft.net>
Cc: akpm@linux-foundation.org, alan@linux.intel.com,
	bcasavan@sgi.com, airlied@linux.ie, grundler@parisc-linux.org,
	JBottomley@parallels.com, perex@perex.cz, rpurdie@rpsys.net,
	klassert@mathematik.tu-chemnitz.de, tj@kernel.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org, linux-scsi@vger.kernel.org,
	linux-serial@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 00/12] Fix various section mismatches and build errors.
Date: Wed, 29 Jun 2011 14:07:11 +0100	[thread overview]
Message-ID: <20110629130711.GA15649@linux-mips.org> (raw)
In-Reply-To: <20110627.221257.1290251511587162468.davem@davemloft.net>

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)

  reply	other threads:[~2011-06-29 13:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-26 11:19 [PATCH 00/12] Fix various section mismatches and build errors Ralf Baechle
2011-06-26 11:19 ` Ralf Baechle
2011-06-26 11:19 ` Ralf Baechle
2011-06-26 11:19 ` [PATCH 01/12] SCSI: sim710: Fix section mismatch Ralf Baechle
2011-06-26 11:21 ` [PATCH 02/12] NET: 3c509: " Ralf Baechle
2011-06-26 11:22 ` [PATCH 03/12] NET: 3c59x: " Ralf Baechle
2011-06-26 11:23 ` [PATCH 04/12] NET: depca: Fix bucketload full of section mismatches Ralf Baechle
2011-06-26 11:24 ` [PATCH 05/12] NET: hp100: Fix " Ralf Baechle
2011-06-26 11:26 ` [PATCH 06/12] NET: ne3210: Fix bucketload full of " Ralf Baechle
2011-06-26 11:28 ` [PATCH 07/12] NET: de4x5: Fix section mismatch Ralf Baechle
2011-06-26 11:30 ` [PATCH 08/12] LED: lp5521: Fix section mismatches Ralf Baechle
2011-06-26 11:31 ` [PATCH 09/12] LED: lp5523: " 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-27 13:35 ` [PATCH 11/12] MISC: IOC4: Fix section mismatch / race condition Ralf Baechle
2011-06-27 15:57   ` Brent Casavant
2011-06-27 13:40 ` [PATCH 12/12] DRM: Radeon: Fix section mismatch Ralf Baechle
2011-06-28  5:12 ` [PATCH 00/12] Fix various section mismatches and build errors David Miller
2011-06-29 13:07   ` Ralf Baechle [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110629130711.GA15649@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=JBottomley@parallels.com \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=bcasavan@sgi.com \
    --cc=davem@davemloft.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=grundler@parisc-linux.org \
    --cc=klassert@mathematik.tu-chemnitz.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=rpurdie@rpsys.net \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.