linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm: powerpc: book3s: use local_paca instead of get_paca
@ 2017-03-29 10:55 Denis Kirjanov
  2017-04-25  7:30 ` Denis Kirjanov
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Kirjanov @ 2017-03-29 10:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: mpe, paulus, Denis Kirjanov

with CONFIG_DEBUG_PREEMPT get_paca produces the following warning
in kvmppc_book3s_init_hv since we are getting into the
smp_processor_id debugging code

There is no real issue with the xics_phys field.
If paca->kvm_hstate.xics_phys is non-zero on one cpu, it will be
non-zero on them all.  Therefore this is not fixing any actual
problem, just the warning.

[  138.521188] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/5596
[  138.521308] caller is .kvmppc_book3s_init_hv+0x184/0x350 [kvm_hv]
[  138.521404] CPU: 5 PID: 5596 Comm: modprobe Not tainted 4.11.0-rc3-00022-gc7e790c #1
[  138.521509] Call Trace:
[  138.521563] [c0000007d018b810] [c0000000023eef10] .dump_stack+0xe4/0x150 (unreliable)
[  138.521694] [c0000007d018b8a0] [c000000001f6ec04] .check_preemption_disabled+0x134/0x150
[  138.521829] [c0000007d018b940] [d00000000a010274] .kvmppc_book3s_init_hv+0x184/0x350 [kvm_hv]
[  138.521963] [c0000007d018ba00] [c00000000191d5cc] .do_one_initcall+0x5c/0x1c0
[  138.522082] [c0000007d018bad0] [c0000000023e9494] .do_init_module+0x84/0x240
[  138.522201] [c0000007d018bb70] [c000000001aade18] .load_module+0x1f68/0x2a10
[  138.522319] [c0000007d018bd20] [c000000001aaeb30] .SyS_finit_module+0xc0/0xf0
[  138.522439] [c0000007d018be30] [c00000000191baec] system_call+0x38/0xfc

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
---
 arch/powerpc/kvm/book3s_hv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 1ec86d9..cb4ff36 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -3930,7 +3930,7 @@ static int kvmppc_book3s_init_hv(void)
 	 * indirectly, via OPAL.
 	 */
 #ifdef CONFIG_SMP
-	if (!get_paca()->kvm_hstate.xics_phys) {
+	if (!local_paca->kvm_hstate.xics_phys) {
 		struct device_node *np;
 
 		np = of_find_compatible_node(NULL, NULL, "ibm,opal-intc");
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm: powerpc: book3s: use local_paca instead of get_paca
  2017-03-29 10:55 [PATCH] kvm: powerpc: book3s: use local_paca instead of get_paca Denis Kirjanov
@ 2017-04-25  7:30 ` Denis Kirjanov
  2017-04-25 10:42   ` Michael Ellerman
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Kirjanov @ 2017-04-25  7:30 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: mpe, paulus, Denis Kirjanov

On 3/29/17, Denis Kirjanov <kda@linux-powerpc.org> wrote:
> with CONFIG_DEBUG_PREEMPT get_paca produces the following warning
> in kvmppc_book3s_init_hv since we are getting into the
> smp_processor_id debugging code
>
> There is no real issue with the xics_phys field.
> If paca->kvm_hstate.xics_phys is non-zero on one cpu, it will be
> non-zero on them all.  Therefore this is not fixing any actual
> problem, just the warning.

Hey Michael,

are you going to take the patch?

Thanks!
>
> [  138.521188] BUG: using smp_processor_id() in preemptible [00000000] code:
> modprobe/5596
> [  138.521308] caller is .kvmppc_book3s_init_hv+0x184/0x350 [kvm_hv]
> [  138.521404] CPU: 5 PID: 5596 Comm: modprobe Not tainted
> 4.11.0-rc3-00022-gc7e790c #1
> [  138.521509] Call Trace:
> [  138.521563] [c0000007d018b810] [c0000000023eef10] .dump_stack+0xe4/0x150
> (unreliable)
> [  138.521694] [c0000007d018b8a0] [c000000001f6ec04]
> .check_preemption_disabled+0x134/0x150
> [  138.521829] [c0000007d018b940] [d00000000a010274]
> .kvmppc_book3s_init_hv+0x184/0x350 [kvm_hv]
> [  138.521963] [c0000007d018ba00] [c00000000191d5cc]
> .do_one_initcall+0x5c/0x1c0
> [  138.522082] [c0000007d018bad0] [c0000000023e9494]
> .do_init_module+0x84/0x240
> [  138.522201] [c0000007d018bb70] [c000000001aade18]
> .load_module+0x1f68/0x2a10
> [  138.522319] [c0000007d018bd20] [c000000001aaeb30]
> .SyS_finit_module+0xc0/0xf0
> [  138.522439] [c0000007d018be30] [c00000000191baec] system_call+0x38/0xfc
>
> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
> ---
>  arch/powerpc/kvm/book3s_hv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 1ec86d9..cb4ff36 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -3930,7 +3930,7 @@ static int kvmppc_book3s_init_hv(void)
>  	 * indirectly, via OPAL.
>  	 */
>  #ifdef CONFIG_SMP
> -	if (!get_paca()->kvm_hstate.xics_phys) {
> +	if (!local_paca->kvm_hstate.xics_phys) {
>  		struct device_node *np;
>
>  		np = of_find_compatible_node(NULL, NULL, "ibm,opal-intc");
> --
> 1.8.3.1
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm: powerpc: book3s: use local_paca instead of get_paca
  2017-04-25  7:30 ` Denis Kirjanov
@ 2017-04-25 10:42   ` Michael Ellerman
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2017-04-25 10:42 UTC (permalink / raw)
  To: Denis Kirjanov, linuxppc-dev; +Cc: paulus, Denis Kirjanov

Denis Kirjanov <kda@linux-powerpc.org> writes:

> On 3/29/17, Denis Kirjanov <kda@linux-powerpc.org> wrote:
>> with CONFIG_DEBUG_PREEMPT get_paca produces the following warning
>> in kvmppc_book3s_init_hv since we are getting into the
>> smp_processor_id debugging code
>>
>> There is no real issue with the xics_phys field.
>> If paca->kvm_hstate.xics_phys is non-zero on one cpu, it will be
>> non-zero on them all.  Therefore this is not fixing any actual
>> problem, just the warning.
>
> Hey Michael,
>
> are you going to take the patch?

It's in KVM code, so technically Paul should take it.

I'll see if it is likely to conflict with anything in his tree and if
not I'll merge it.

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-25 10:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29 10:55 [PATCH] kvm: powerpc: book3s: use local_paca instead of get_paca Denis Kirjanov
2017-04-25  7:30 ` Denis Kirjanov
2017-04-25 10:42   ` Michael Ellerman

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).