Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752077AbbE0BUK (ORCPT ); Tue, 26 May 2015 21:20:10 -0400 Received: from ozlabs.org ([103.22.144.67]:54847 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751518AbbE0BUJ (ORCPT ); Tue, 26 May 2015 21:20:09 -0400 From: Rusty Russell To: Tony Luck Cc: Linux Kernel Mailing List , Fenghua Yu , "linux-ia64\@vger.kernel.org" Subject: Re: [PATCH 06/16] ia64: fix up obsolete cpu function usage. In-Reply-To: References: <1425296150-4722-1-git-send-email-rusty@rustcorp.com.au> <1425296150-4722-6-git-send-email-rusty@rustcorp.com.au> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Wed, 27 May 2015 10:48:35 +0930 Message-ID: <87mw0qn7h0.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1793 Lines: 51 Tony Luck writes: > On Mon, Mar 2, 2015 at 3:35 AM, Rusty Russell wrote: >> Thanks to spatch, then a sweep for for_each_cpu_mask => for_each_cpu. >> >> Signed-off-by: Rusty Russell > > I'm seeing a bunch of warnings building the ia64 tree: Indeed, here's the forgotten fix sitting in my patch collection. > Should cpumask_set_cpu() and friends specify a volatile argument??? It's weird, but it turns out hardly anyone wants that. Cheers, Rusty. ia64: make cpu_callin_map non-volatile. cpumask_test_cpu() doesn't take volatile, unlike the obsoleted cpu_isset. The only place ia64 really cares is the spin waiting for a bit; udelay() is probably a barrier but insert rmb() to be sure. Signed-off-by: Rusty Russell diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 15051e9c2c6f..629975b56608 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c @@ -127,7 +127,7 @@ int smp_num_siblings = 1; volatile int ia64_cpu_to_sapicid[NR_CPUS]; EXPORT_SYMBOL(ia64_cpu_to_sapicid); -static volatile cpumask_t cpu_callin_map; +static cpumask_t cpu_callin_map; struct smp_boot_data smp_boot_data __initdata; @@ -477,6 +477,7 @@ do_boot_cpu (int sapicid, int cpu, struct task_struct *idle) for (timeout = 0; timeout < 100000; timeout++) { if (cpumask_test_cpu(cpu, &cpu_callin_map)) break; /* It has booted */ + rmb(); /* Make sure we re-read cpu_callin_map */ udelay(100); } Dprintk("\n"); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/