linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: torvalds@transmeta.com
Cc: akpm@digeo.com, linux-kernel@vger.kernel.org, rusty@rustcorp.com.au
Subject: [PATCH] Remove spinlock workaround for pre 2.95 gccs
Date: Thu, 19 Jun 2003 23:18:19 +0200	[thread overview]
Message-ID: <20030619211819.GA12716@averell> (raw)


Remove the empty initializer workaround that was added for egcs 1.1.
Only 2.95+ is supported now, so all compilers should support empty
structures.

The if just checked for __GNUC__, which means that 2.95 got
the workaround (and the incompatibility) too even though it didn't need it.

Advantage is that gcc 2.95 and 3.x compiled kernels are now binary
compatible. Unfortunately module loading still checks the compiler
version, but I guess that could be taken out now. As far as I know
there should be no compiler related incompatibilities now.

-Andi

--- linux-2.5.72-work/include/linux/spinlock.h-RES	2003-06-14 23:43:05.000000000 +0200
+++ linux-2.5.72-work/include/linux/spinlock.h	2003-06-19 23:11:55.000000000 +0200
@@ -146,13 +146,8 @@
 /*
  * gcc versions before ~2.95 have a nasty bug with empty initializers.
  */
-#if (__GNUC__ > 2)
-  typedef struct { } spinlock_t;
-  #define SPIN_LOCK_UNLOCKED (spinlock_t) { }
-#else
-  typedef struct { int gcc_is_buggy; } spinlock_t;
-  #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
-#endif
+typedef struct { } spinlock_t;
+#define SPIN_LOCK_UNLOCKED (spinlock_t) { }
 
 /*
  * If CONFIG_SMP is unset, declare the _raw_* definitions as nops



             reply	other threads:[~2003-06-19 21:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-19 21:18 Andi Kleen [this message]
2003-06-20  3:00 ` [PATCH] Remove spinlock workaround for pre 2.95 gccs Rusty Russell

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=20030619211819.GA12716@averell \
    --to=ak@muc.de \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@transmeta.com \
    /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 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).