[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <dba1f760-2073-f7e0-148f-370f5ead4e76@linux.vnet.ibm.com>
Date: Tue, 13 Mar 2018 11:13:05 +0530
From: Anju T Sudhakar <anju@...ux.vnet.ibm.com>
To: Michael Ellerman <mpe@...erman.id.au>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
maddy@...ux.vnet.ibm.com
Subject: Re: [PATCH v3] powerpc/kernel/sysfs: Export ldbar spr to sysfs
Hi,
On Tuesday 06 March 2018 04:35 PM, Michael Ellerman wrote:
> Anju T Sudhakar <anju@...ux.vnet.ibm.com> writes:
>
>> diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
>> index 4437c70..caefb64 100644
>> --- a/arch/powerpc/kernel/sysfs.c
>> +++ b/arch/powerpc/kernel/sysfs.c
>> @@ -757,6 +759,9 @@ static int register_cpu_online(unsigned int cpu)
>> device_create_file(s, &pmc_attrs[i]);
>>
>> #ifdef CONFIG_PPC64
>> + if (cpu_has_feature(CPU_FTR_ARCH_300))
>> + device_create_file(s, &dev_attr_ldbar);
> Is this register readable in supervisor state?
This is a nice catch, thanks. :)
The guest kernel can not access the register, it is only readable in the
hypervisor state.
I will resend the patch with a condition check so that this spr will not
get registered for guest kernel.
Regards,
Anju
>
> cheers
>
Powered by blists - more mailing lists