From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Date: Thu, 28 May 2015 03:56:26 +0000 Subject: Re: [PATCH 06/16] ia64: fix up obsolete cpu function usage. Message-Id: <87lhg9welh.fsf@rustcorp.com.au> List-Id: References: <1425296150-4722-1-git-send-email-rusty@rustcorp.com.au> <1425296150-4722-6-git-send-email-rusty@rustcorp.com.au> <87mw0qn7h0.fsf@rustcorp.com.au> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Tony Luck Cc: Linux Kernel Mailing List , Fenghua Yu , "linux-ia64@vger.kernel.org" Tony Luck writes: > On Tue, May 26, 2015 at 6:18 PM, Rusty Russell wrote: > >> 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. > > Good to be sure ... but cpumask_test_cpu() simply calls test_bit() ... > and 2 out of 3 versions of that function throw "volatile" back into the > mix: :-) Yep, volatile is hard to remove. But that seems like an argument for removing the last user, not changing the interface... The theory is that we're eschewing volatile, or so I thought. Cheers, Rusty. > Global definition: test_bit > > File Line > 0 include/asm/bitops.h 334 test_bit (int nr, const volatile > void *addr) > 1 asm-generic/bitops/non-atomic.h 103 static inline int test_bit(int > nr, const volatile unsigned long *addr) > 2 asm-generic/bitops/atomic.h 16 static __always_inline int > test_bit(unsigned int nr, const unsigned long *addr) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752202AbbE1ENI (ORCPT ); Thu, 28 May 2015 00:13:08 -0400 Received: from ozlabs.org ([103.22.144.67]:42553 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbbE1EM7 (ORCPT ); Thu, 28 May 2015 00:12:59 -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> <87mw0qn7h0.fsf@rustcorp.com.au> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Thu, 28 May 2015 13:14:26 +0930 Message-ID: <87lhg9welh.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 Tony Luck writes: > On Tue, May 26, 2015 at 6:18 PM, Rusty Russell wrote: > >> 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. > > Good to be sure ... but cpumask_test_cpu() simply calls test_bit() ... > and 2 out of 3 versions of that function throw "volatile" back into the > mix: :-) Yep, volatile is hard to remove. But that seems like an argument for removing the last user, not changing the interface... The theory is that we're eschewing volatile, or so I thought. Cheers, Rusty. > Global definition: test_bit > > File Line > 0 include/asm/bitops.h 334 test_bit (int nr, const volatile > void *addr) > 1 asm-generic/bitops/non-atomic.h 103 static inline int test_bit(int > nr, const volatile unsigned long *addr) > 2 asm-generic/bitops/atomic.h 16 static __always_inline int > test_bit(unsigned int nr, const unsigned long *addr)