xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Doug Goldstein <cardoe@cardoe.com>, xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Liu Jinsong <jinsong.liu@alibaba-inc.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH 2/2] build: convert NR_CPUS to Kconfig
Date: Sat, 9 Jan 2016 14:36:48 +0000	[thread overview]
Message-ID: <56911B00.20307@citrix.com> (raw)
In-Reply-To: <1452295045-30903-2-git-send-email-cardoe@cardoe.com>

On 08/01/16 23:17, Doug Goldstein wrote:
> diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c
> index 7f89694..9207179 100644
> --- a/xen/common/spinlock.c
> +++ b/xen/common/spinlock.c
> @@ -246,7 +246,7 @@ int _spin_trylock_recursive(spinlock_t *lock)
>      unsigned int cpu = smp_processor_id();
>  
>      /* Don't allow overflow of recurse_cpu field. */
> -    BUILD_BUG_ON(NR_CPUS > 0xfffu);
> +    BUILD_BUG_ON(CONFIG_NR_CPUS > 0xfffu);
>  
>      check_lock(&lock->debug);
>  

Talking of recursive spinlocks, this check has a fencepost error.

I have submitted a cleanup patch, subject "xen/spinlock: Use mnemonics
for recursive spinlock sentinel values", which also fixes this bug.

It is going to conflict with this change.  I don't mind rebasing,
depending on which patch gets accepted first.

Everything else looks fine.  Reviewed-by: Andrew Cooper
<andrew.cooper3@citrix.com>

  reply	other threads:[~2016-01-09 14:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 23:17 [PATCH 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Doug Goldstein
2016-01-08 23:17 ` [PATCH 2/2] build: convert NR_CPUS to Kconfig Doug Goldstein
2016-01-09 14:36   ` Andrew Cooper [this message]
2016-01-11 14:24   ` Jan Beulich
2016-01-11 15:06     ` Doug Goldstein
2016-01-11 15:30       ` Jan Beulich
2016-01-11 15:49         ` Dario Faggioli
2016-01-09 13:43 ` [PATCH 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Andrew Cooper
2016-01-11 14:15   ` Jan Beulich

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=56911B00.20307@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.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 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).