From: Chris Metcalf <cmetcalf@tilera.com>
To: Christoph Lameter <cl@linux.com>
Cc: Tejun Heo <tj@kernel.org>,
akpm@linuxfoundation.org, linux-arch@vger.kernel.org,
Steven Rostedt <srostedt@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [guv v2 23/31] tile: Replace __get_cpu_var uses
Date: Mon, 26 Aug 2013 18:22:27 -0400 [thread overview]
Message-ID: <521BD523.3040706@tilera.com> (raw)
In-Reply-To: <00000140bc69acdb-3b2967b0-e224-424b-ad08-973515704be6-000000@email.amazonses.com>
On 8/26/2013 4:56 PM, Christoph Lameter wrote:
> Index: linux/arch/tile/include/asm/irqflags.h
> ===================================================================
> --- linux.orig/arch/tile/include/asm/irqflags.h 2013-08-22 14:39:14.000000000 -0500
> +++ linux/arch/tile/include/asm/irqflags.h 2013-08-22 14:39:57.453305409 -0500
Nack to the changes to this file, with all due respect :-), since I have conflicting changes in the linux-tile tree that also remove all uses of __get_cpu_var from this file. Note that there are places in this file where "this_cpu_and", etc., make sense; I don't know if it makes sense for your script to be looking for this kind of thing more generally.
> - __get_cpu_var(current_asid) = asid;
> + __this_cpu_read(current_asid) = asid;
This should be __this_cpu_write(current_asid, asid). You caught this idiom elsewhere so not sure if it was a script bug that caused it to be missed here?
> - int depth = __get_cpu_var(irq_depth)++;
> + int depth = __this_cpu_inc_return(irq_depth) - 1;
I would omit the "-1" here and instead change the one test of "depth == 0" to be "depth == 1".
> - __get_cpu_var(current_asid) = min_asid = asid_range.start;
> + __this_cpu_write(current_asid, min_asid = asid_range.start);
This was ugly before but now it's much worse :-) Please just split it into an assignment to min_asid, then use __this_cpu_write() with min_asid. Thanks.
The rest is fine. Would it make more sense for me to fold all these changes into the tile tree and just have it meet in linux-next? There are certainly a bunch of other changes staged there which likely also include more uses of __get_cpu_var...
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
next prev parent reply other threads:[~2013-08-26 22:22 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130826204351.725357339@linux.com>
2013-08-26 20:44 ` [guv v2 02/31] percpu: Make __verify_pcu_ptr handle per cpu pointers to arrays Christoph Lameter
2013-08-26 20:44 ` [guv v2 03/31] Coccinelle script for __get_cpu_var conversion Christoph Lameter
2013-08-26 20:44 ` [guv v2 05/31] time: Replace __get_cpu_var uses Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 04/31] net: " Christoph Lameter
2013-08-26 20:44 ` [guv v2 06/31] scheduler: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 09/31] block: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 08/31] tracing: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-28 19:48 ` Steven Rostedt
2013-08-29 3:44 ` Masami Hiramatsu
2013-08-29 3:44 ` Masami Hiramatsu
2013-08-29 16:35 ` Christoph Lameter
2013-08-30 7:00 ` Ingo Molnar
2013-08-26 20:44 ` [guv v2 11/31] percpu: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 07/31] mm: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 10/31] rcu: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 12/31] watchdog: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 14/31] drivers: " Christoph Lameter
2013-08-26 20:44 ` [guv v2 13/31] kernel misc: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 18/31] s390: " Christoph Lameter
2013-08-28 6:27 ` Heiko Carstens
2013-08-26 20:44 ` [guv v2 16/31] x86: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 15/31] zcache/zsmalloc: " Christoph Lameter
2013-08-26 20:44 ` [guv v2 17/31] mips: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 19/31] ia64: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 01/31] x86: Use this_cpu_inc/dec for debug registers Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 20/31] powerpc: Replace __get_cpu_var uses Christoph Lameter
2013-08-27 8:44 ` Geert Uytterhoeven
2013-08-27 8:44 ` Geert Uytterhoeven
2013-08-27 15:37 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 21/31] sparc: " Christoph Lameter
2013-08-26 20:44 ` [guv v2 22/31] arm: " Christoph Lameter
2013-08-27 9:41 ` Catalin Marinas
2013-08-26 20:56 ` [guv v2 25/31] avr32: " Christoph Lameter
2013-08-27 6:58 ` Hans-Christian Egtvedt
2013-08-27 6:58 ` Hans-Christian Egtvedt
2013-08-26 20:56 ` [guv v2 29/31] parisc: " Christoph Lameter
2013-08-26 20:56 ` [guv v2 23/31] tile: " Christoph Lameter
2013-08-26 20:56 ` Christoph Lameter
2013-08-26 22:22 ` Chris Metcalf [this message]
2013-08-27 14:48 ` Christoph Lameter
2013-08-28 17:19 ` Chris Metcalf
2013-08-28 17:54 ` Christoph Lameter
2013-08-28 18:13 ` Chris Metcalf
2013-08-28 18:22 ` Christoph Lameter
2013-08-30 16:01 ` Chris Metcalf
2013-08-26 21:16 ` [guv v2 24/31] blackfin: " Christoph Lameter
2013-08-26 21:16 ` [guv v2 31/31] Remove __get_cpu_var and __raw_get_cpu_var macros Christoph Lameter
2013-08-26 21:16 ` [guv v2 26/31] alpha: Replace __get_cpu_var Christoph Lameter
2013-08-26 21:16 ` Christoph Lameter
2013-08-26 21:56 ` [guv v2 28/31] arc: Replace __get_cpu_var uses throughout the kernel Christoph Lameter
[not found] ` <521C2A9F.3070400@synopsys.com>
[not found] ` <00000140c05d28b7-f0a2bc86-fe85-40f7-b627-32664cd616a4-000000@email.amazonses.com>
2013-08-28 4:24 ` Vineet Gupta
2013-08-28 13:46 ` Christoph Lameter
2013-08-26 21:56 ` [guv v2 30/31] metag: Replace __get_cpu_var uses Christoph Lameter
2013-08-26 21:56 ` Christoph Lameter
2013-08-27 9:53 ` James Hogan
2013-08-26 21:56 ` [guv v2 27/31] sh: Replace __get_cpu_var uses throughout the kernel Christoph Lameter
2013-09-02 21:35 ` [guv v2 04/31] net: Replace __get_cpu_var uses David Howells
2013-09-03 3:33 ` David Miller
2013-09-03 3:33 ` David Miller
2013-09-03 14:21 ` Christoph Lameter
2013-09-03 14:20 ` Christoph Lameter
2013-09-03 20:39 ` David Howells
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=521BD523.3040706@tilera.com \
--to=cmetcalf@tilera.com \
--cc=akpm@linuxfoundation.org \
--cc=cl@linux.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srostedt@redhat.com \
--cc=tj@kernel.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).