All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	kilroyd@googlemail.com, a.p.zijlstra@chello.nl,
	tglx@linutronix.de
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:core/locking] locking: Check spinlock_t/rwlock_t argument type on non-SMP builds too
Date: Mon, 3 Aug 2009 13:39:29 +0200	[thread overview]
Message-ID: <20090803113929.GA25828@elte.hu> (raw)
In-Reply-To: <tip-8d19bd347e1073e7f1ef9f8057c560a5f6be63d7@git.kernel.org>


* tip-bot for David Kilroy <kilroyd@googlemail.com> wrote:

> Commit-ID:  8d19bd347e1073e7f1ef9f8057c560a5f6be63d7
> Gitweb:     http://git.kernel.org/tip/8d19bd347e1073e7f1ef9f8057c560a5f6be63d7
> Author:     David Kilroy <kilroyd@googlemail.com>
> AuthorDate: Sun, 2 Aug 2009 19:41:05 +0100
> Committer:  Ingo Molnar <mingo@elte.hu>
> CommitDate: Sun, 2 Aug 2009 21:29:07 +0200
> 
> locking: Check spinlock_t/rwlock_t argument type on non-SMP builds too
> 
> When writing code for UP without CONFIG_DEBUG_SPINLOCK it's
> easy to get the first argument to the spinlock/rwlock functions
> wrong. This is because the parameter is not actually used in
> this configuration.
> 
> Typically you will only find out it's wrong:
> 
>  * by rebuilding with CONFIG_SMP or CONFIG_DEBUG_SPINLOCK
>  * after you've submitted your beautiful patch series
> 
> The first means a long wait, and the latter is a bit late.
> 
> Change the intermediate macros into inline functions.
> 
> -v2: Use C inlines instead of in-macro type-checks
> -v3: Correct bug in _spin_trylock_bh

x86 works fine now - but this patch broke architecture builds, such 
as the build on Alpha:

In file included from 
/home/mingo/tip/arch/alpha/kernel/sys_sable.c:25:
/home/mingo/tip/arch/alpha/include/asm/core_t2.h: In function 
't2_readb':
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:451: error: 
'_spin_lock_irqsave' is static but used in inline function 
't2_readb' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:456: error: 
'_spin_unlock_irqrestore' is static but used in inline function 
't2_readb' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h: In function 
't2_readw':
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:465: error: 
'_spin_lock_irqsave' is static but used in inline function 
't2_readw' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:470: error: 
'_spin_unlock_irqrestore' is static but used in inline function 
't2_readw' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h: In function 
't2_readl':
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:483: error: 
'_spin_lock_irqsave' is static but used in inline function 
't2_readl' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:488: error: 
'_spin_unlock_irqrestore' is static but used in inline function 
't2_readl' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h: In function 
't2_readq':
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:497: error: 
'_spin_lock_irqsave' is static but used in inline function 
't2_readq' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:504: error: 
'_spin_unlock_irqrestore' is static but used in inline function 
't2_readq' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h: In function 
't2_writeb':
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:513: error: 
'_spin_lock_irqsave' is static but used in inline function 
't2_writeb' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:519: error: 
'_spin_unlock_irqrestore' is static but used in inline function 
't2_writeb' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h: In function 
't2_writew':
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:527: error: 
'_spin_lock_irqsave' is static but used in inline function 
't2_writew' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:533: error: 
'_spin_unlock_irqrestore' is static but used in inline function 
't2_writew' which is not static
/home/mingo/tip/arch/alpha/include/asm/core_t2.h: In function 
't2_writel':
/home/mingo/tip/arch/alpha/include/asm/core_t2.h:545: error: 
'_spin_lock_irqsave' is static but used in inline function 
't2_writel' which is not static

	Ingo

  reply	other threads:[~2009-08-03 11:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 18:44 [PATCH] check spinlock_t/rwlock_t argument type on non-SMP builds David Kilroy
2009-07-03  7:38 ` Ingo Molnar
2009-07-03 19:02   ` Dave
2009-07-18 12:14     ` Ingo Molnar
2009-07-22 18:11       ` [PATCH v2] " David Kilroy
2009-08-02 13:14         ` [tip:core/locking] locking: Check spinlock_t/rwlock_t argument type on non-SMP builds too tip-bot for David Kilroy
2009-08-02 13:40           ` Ingo Molnar
2009-08-02 16:45             ` Dave
2009-08-02 18:05               ` Ingo Molnar
2009-08-02 18:41         ` [PATCH v3] locking: check " David Kilroy
2009-08-02 19:30           ` [tip:core/locking] locking: Check " tip-bot for David Kilroy
2009-08-03 11:39             ` Ingo Molnar [this message]
2009-08-03 19:52               ` Dave
2009-08-04  3:05                 ` Mike Frysinger

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=20090803113929.GA25828@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hpa@zytor.com \
    --cc=kilroyd@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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.