LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tim Bird <tim.bird@am.sony.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: v2.6.21-rt1 - bug in asm-mips/atomic.h
Date: Thu, 03 May 2007 12:16:34 -0700	[thread overview]
Message-ID: <463A3512.4020508@am.sony.com> (raw)
In-Reply-To: <20070426135730.GA2116@elte.hu>

Ingo Molnar wrote:
> i have released the v2.6.20-rt1 kernel...
Ingo,

There appears to be a bug in the patch for include/asm-mips/atomic.h
In the hunk for line 554, it has 2 #endifs.
I think it should only have one.

A portion of the patch reads:

Index: new-linux/include/asm-mips/atomic.h
===================================================================
--- new-linux.orig/include/asm-mips/atomic.h	2007-04-25 20:08:32.000000000 -0700
+++ new-linux/include/asm-mips/atomic.h	2007-04-26 16:15:14.000000000 -0700
@@ -545,7 +554,9 @@
 		: "=&r" (result), "=&r" (temp), "=m" (v->counter)
 		: "Ir" (i), "m" (v->counter)
 		: "memory");
-	} else {
+	}
+#if !defined(CONFIG_NO_SPINLOCK) && !defined(CONFIG_PREEMPT_RT)
+	else {
 		unsigned long flags;

 		raw_local_irq_save(flags);
@@ -554,6 +565,8 @@
 		v->counter = result;
 		raw_local_irq_restore(flags);
 	}
+#endif
+#endif

 	smp_mb();


When I applied the patch to 2.6.21 and tried to compile for MIPS I got:
  CHK     include/linux/utsrelease.h
  CC      arch/mips/kernel/asm-offsets.s
In file included from /home/tbird/work/alp-3.0/alp-linux/include/linux/rt_lock.h:14,
                 from /home/tbird/work/alp-3.0/alp-linux/include/linux/spinlock.h:116,
                 from /home/tbird/work/alp-3.0/alp-linux/include/linux/capability.h:45,
                 from /home/tbird/work/alp-3.0/alp-linux/include/linux/sched.h:47,
                 from /home/tbird/work/alp-3.0/alp-linux/arch/mips/kernel/asm-offsets.c:14:
include2/asm/atomic.h:571: error: expected '(' before 'volatile'
include2/asm/atomic.h:573: error: expected identifier or '(' before 'return'
include2/asm/atomic.h:574: error: expected identifier or '(' before '}' token
include2/asm/atomic.h:576: error: expected declaration specifiers or '...' before 'atomic64_t'
include2/asm/atomic.h: In function 'atomic64_sub_return':
include2/asm/atomic.h:593: error: 'v' undeclared (first use in this function)
include2/asm/atomic.h:593: error: (Each undeclared identifier is reported only once
include2/asm/atomic.h:593: error: for each function it appears in.)
include2/asm/atomic.h:585: error: invalid lvalue in asm output 2
include2/asm/atomic.h:585: error: memory input 4 is not directly addressable
include2/asm/atomic.h:599: error: invalid lvalue in asm output 2
include2/asm/atomic.h:599: error: memory input 4 is not directly addressable
include2/asm/atomic.h: At top level:
include2/asm/atomic.h:638: error: expected declaration specifiers or '...' before 'atomic64_t'
include2/asm/atomic.h: In function 'atomic64_sub_if_positive':
include2/asm/atomic.h:659: error: 'v' undeclared (first use in this function)
include2/asm/atomic.h:647: error: invalid lvalue in asm output 2
include2/asm/atomic.h:647: error: memory input 4 is not directly addressable
include2/asm/atomic.h:665: error: invalid lvalue in asm output 2
include2/asm/atomic.h:665: error: memory input 4 is not directly addressable
In file included from /home/tbird/work/alp-3.0/alp-linux/include/linux/rt_lock.h:14,
                 from /home/tbird/work/alp-3.0/alp-linux/include/linux/spinlock.h:116,
                 from /home/tbird/work/alp-3.0/alp-linux/include/linux/capability.h:45,
                 from /home/tbird/work/alp-3.0/alp-linux/include/linux/sched.h:47,
                 from /home/tbird/work/alp-3.0/alp-linux/arch/mips/kernel/asm-offsets.c:14:
include2/asm/atomic.h:779:2: error: #endif without #if

After removing the second #endif in the second hunk above, things compiled better.
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================


  parent reply	other threads:[~2007-05-03 19:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05  6:56 v2.6.20-rt1, yum/rpm Ingo Molnar
2007-02-05  9:18 ` Serge Belyshev
2007-02-05  9:02   ` Ingo Molnar
2007-02-05 10:36 ` Sunil Naidu
2007-02-05 10:42   ` Peter Zijlstra
2007-02-05 10:22     ` Ingo Molnar
2007-02-05 11:15     ` Sunil Naidu
2007-02-05 12:59 ` Michal Piotrowski
2007-02-05 13:47   ` Ingo Molnar
2007-02-05 21:29     ` Michal Piotrowski
2007-02-05 14:25 ` Karsten Wiese
2007-02-05 15:17 ` Parag Warudkar
2007-02-05 21:50 ` Michal Piotrowski
2007-02-06  0:11 ` Michal Piotrowski
2007-02-06  1:14 ` Daniel Walker
2007-02-06 10:10 ` Arjan van de Ven
2007-02-07 12:32   ` Ingo Molnar
2007-02-06 10:30 ` Sunil Naidu
2007-02-27 17:39 ` K.R. Foley
2007-02-28  8:11   ` Ingo Molnar
2007-02-28 10:16     ` K.R. Foley
2007-04-26 13:57 ` v2.6.21-rt1 Ingo Molnar
2007-04-26 20:53   ` v2.6.21-rt1 Free Ekanayaka
2007-05-03 19:16   ` Tim Bird [this message]
2007-05-03 19:35     ` v2.6.21-rt1 - mips compile bugs Tim Bird
2007-05-17 18:46   ` v2.6.21-rt1 emin ak

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=463A3512.4020508@am.sony.com \
    --to=tim.bird@am.sony.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --subject='Re: v2.6.21-rt1 - bug in asm-mips/atomic.h' \
    /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

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).