From: Alexander Graf <agraf@suse.de>
To: Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>
Cc: akpm@linuxfoundation.org, rostedt@goodmis.org,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Scott Wood <scottwood@freescale.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 26/35] [PATCH 26/36] powerpc: Replace __get_cpu_var uses
Date: Tue, 16 Dec 2014 23:07:05 +0100 [thread overview]
Message-ID: <5490AD09.3000807@suse.de> (raw)
In-Reply-To: <20140826181444.GJ31659@mtj.dyndns.org>
On 26.08.14 20:14, Tejun Heo wrote:
> On Sun, Aug 17, 2014 at 12:30:49PM -0500, Christoph Lameter wrote:
>> __get_cpu_var() is used for multiple purposes in the kernel source. One of
>> them is address calculation via the form &__get_cpu_var(x). This calculates
>> the address for the instance of the percpu variable of the current processor
>> based on an offset.
>>
>> Other use cases are for storing and retrieving data from the current
>> processors percpu area. __get_cpu_var() can be used as an lvalue when
>> writing data or on the right side of an assignment.
> ...
>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> CC: Paul Mackerras <paulus@samba.org>
>> Signed-off-by: Christoph Lameter <cl@linux.com>
>
> (Please disregard the ones I posted for v1 of the patch series)
>
> Applied to percpu/for-3.18-consistent-ops with the fix up patch rolled
> in. Please let me know if this patch should be routed differently.
> Note that this patch was to be applied to percpu/for-3.17 but delayed
> due to build issues caused by cpumask_var_t.
Unfortunately this commit breaks e500v2 builds with KVM enabled:
arch/powerpc/kvm/e500.c: In function "local_sid_setup_one":
arch/powerpc/kvm/e500.c:81:29: error: macro "__this_cpu_write"
requires 2 arguments, but only 1 given
arch/powerpc/kvm/e500.c:81:3: error: unknown type name "__this_cpu_write"
arch/powerpc/kvm/e500.c:81:47: error: expected "=", ",", ";", "asm" or
"__attribute__" before ")" token
arch/powerpc/kvm/e500.c:82:8: error: request for member "val" in
something not a structure or union
arch/powerpc/kvm/e500.c:83:8: error: request for member "pentry" in
something not a structure or union
Looking at the offending line of code I'm not surprised:
- __get_cpu_var(pcpu_sids).entry[sid] = entry;
+ __this_cpu_write(pcpu_sids)entry[sid], entry);
This doesn't quite look like valid C to me. The patch below fixes the
build error for me. Please check whether it's correct and if so apply it
directly to the tree.
Alex
From: Alexander Graf <agraf@suse.de>
Date: Tue, 16 Dec 2014 23:04:01 +0100
Subject: [PATCH] KVM: PPC: E500: Compile fix in this_cpu_write
Commit 69111bac42f5 (powerpc: Replace __get_cpu_var uses) introduced compile
breakage to the e500 target by introducing invalid automatically created C
syntax.
Fix up the breakage and make the code compile again.
Signed-off-by: Alexander Graf <agraf@suse.de>
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
index 1609584..e1cb588 100644
--- a/arch/powerpc/kvm/e500.c
+++ b/arch/powerpc/kvm/e500.c
@@ -78,7 +78,7 @@ static inline int local_sid_setup_one(struct id *entry)
sid = __this_cpu_inc_return(pcpu_last_used_sid);
if (sid < NUM_TIDS) {
- __this_cpu_write(pcpu_sids)entry[sid], entry);
+ __this_cpu_write(pcpu_sids.entry[sid], entry);
entry->val = sid;
entry->pentry = this_cpu_ptr(&pcpu_sids.entry[sid]);
ret = sid;
next prev parent reply other threads:[~2014-12-16 22:07 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-17 17:30 [PATCH 00/35] percpu: Consistent per cpu operations V7 Christoph Lameter
2014-08-17 17:30 ` [PATCH 01/35] [PATCH 02/36] kernel misc: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:04 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 02/35] [PATCH 03/36] time: " Christoph Lameter
2014-08-26 18:05 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 03/35] time: Convert a bunch of &__get_cpu_var introduced in the 3.16 merge period Christoph Lameter
2014-08-26 18:05 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 04/35] [PATCH 04/36] scheduler: Replace __get_cpu_var with this_cpu_ptr Christoph Lameter
2014-08-26 18:05 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 05/35] [PATCH 05/36] block: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-08-26 18:06 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 06/35] [PATCH 06/36] drivers/char/random: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:07 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 07/35] [PATCH 07/36] drivers/cpuidle: Replace __get_cpu_var uses for address calculation Christoph Lameter
2014-08-26 18:07 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 08/35] [PATCH 08/36] drivers/oprofile: " Christoph Lameter
2014-08-26 18:08 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 09/35] [PATCH 09/36] drivers/clocksource: Replace __get_cpu_var used " Christoph Lameter
2014-08-26 18:08 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 10/35] [PATCH 10/36] drivers/net/ethernet/tile: Replace __get_cpu_var uses " Christoph Lameter
2014-08-26 18:08 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 11/35] [PATCH 11/36] watchdog: Replace __raw_get_cpu_var uses Christoph Lameter
2014-08-26 18:08 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 12/35] [PATCH 12/36] net: Replace get_cpu_var through this_cpu_ptr Christoph Lameter
2014-08-26 18:09 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 13/35] [PATCH 13/36] md: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-08-26 18:09 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 14/35] [PATCH 14/36] metag: Replace __get_cpu_var uses for address calculation Christoph Lameter
2014-08-26 18:09 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 15/35] [PATCH 15/36] drivers/net/ethernet/tile: __get_cpu_var call introduced in 3.14 Christoph Lameter
2014-08-26 18:09 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 16/35] [PATCH 16/36] irqchips: Replace __this_cpu_ptr uses Christoph Lameter
2014-08-26 18:10 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 17/35] [PATCH 17/36] x86: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:10 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 18/35] [PATCH 18/36] uv: Replace __get_cpu_var Christoph Lameter
2014-08-26 18:11 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 19/35] [PATCH 19/36] arm: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-08-22 17:48 ` Will Deacon
2014-08-26 18:11 ` Tejun Heo
2014-08-26 18:16 ` Will Deacon
2014-08-26 18:19 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 20/35] [PATCH 20/36] MIPS: Replace __get_cpu_var uses in FPU emulator Christoph Lameter
2014-08-26 18:12 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 21/35] [PATCH 21/36] mips: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:12 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 22/35] [PATCH 22/36] s390: " Christoph Lameter
2014-08-26 18:13 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 23/35] [PATCH 23/36] s390: cio driver &__get_cpu_var replacements Christoph Lameter
2014-08-26 18:13 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 24/35] [PATCH 24/36] ia64: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:13 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 25/35] [PATCH 25/36] alpha: Replace __get_cpu_var Christoph Lameter
2014-08-26 18:14 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 26/35] [PATCH 26/36] powerpc: Replace __get_cpu_var uses Christoph Lameter
2014-08-18 2:45 ` Christoph Lameter
2014-08-26 18:14 ` Tejun Heo
2014-12-16 22:07 ` Alexander Graf [this message]
2014-12-17 9:43 ` Paolo Bonzini
2014-12-17 15:31 ` Christoph Lameter
2014-08-17 17:30 ` [PATCH 27/35] [PATCH 27/36] tile: " Christoph Lameter
2014-08-26 18:11 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 28/35] [PATCH 28/36] tile: Use this_cpu_ptr() for hardware counters Christoph Lameter
2014-08-26 18:15 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 29/35] [PATCH 29/36] blackfin: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:15 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 30/35] [PATCH 30/36] avr32: Replace __get_cpu_var with __this_cpu_write Christoph Lameter
2014-08-26 18:15 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 31/35] [PATCH 31/36] sparc: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:16 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 32/35] [PATCH 32/36] clocksource: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-08-26 18:16 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 33/35] [PATCH 34/36] percpu: Remove __this_cpu_ptr Christoph Lameter
2014-08-26 18:16 ` Tejun Heo
2014-08-17 17:30 ` [PATCH 34/35] [PATCH 01/36] __get_cpu_var/cpumask_var_t: Resolve ambiguities Christoph Lameter
2014-08-17 17:30 ` [PATCH 35/35] [PATCH 33/36] Remove __get_cpu_var and __raw_get_cpu_var macros [only in 3.17] Christoph Lameter
2014-08-26 18:17 ` [PATCH 00/35] percpu: Consistent per cpu operations V7 Tejun Heo
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=5490AD09.3000807@suse.de \
--to=agraf@suse.de \
--cc=akpm@linuxfoundation.org \
--cc=benh@kernel.crashing.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=scottwood@freescale.com \
--cc=tglx@linutronix.de \
--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