From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 2/2] build: convert NR_CPUS to Kconfig Date: Sat, 9 Jan 2016 14:36:48 +0000 Message-ID: <56911B00.20307@citrix.com> References: <1452295045-30903-1-git-send-email-cardoe@cardoe.com> <1452295045-30903-2-git-send-email-cardoe@cardoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1452295045-30903-2-git-send-email-cardoe@cardoe.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Doug Goldstein , xen-devel@lists.xen.org Cc: Keir Fraser , Ian Campbell , George Dunlap , Liu Jinsong , Dario Faggioli , Stefano Stabellini , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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