From: Anju T Sudhakar <anju@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
maddy@linux.vnet.ibm.com
Subject: Re: [PATCH v3] powerpc/kernel/sysfs: Export ldbar spr to sysfs
Date: Tue, 13 Mar 2018 11:13:05 +0530 [thread overview]
Message-ID: <dba1f760-2073-f7e0-148f-370f5ead4e76@linux.vnet.ibm.com> (raw)
In-Reply-To: <878tb5foqk.fsf@concordia.ellerman.id.au>
Hi,
On Tuesday 06 March 2018 04:35 PM, Michael Ellerman wrote:
> Anju T Sudhakar <anju@linux.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
>
next prev parent reply other threads:[~2018-03-13 5:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 13:00 [PATCH v3] powerpc/kernel/sysfs: Export ldbar spr to sysfs Anju T Sudhakar
2018-03-06 11:05 ` Michael Ellerman
2018-03-13 5:43 ` Anju T Sudhakar [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-11-09 12:13 Anju T Sudhakar
2017-11-09 12:47 ` Anju T Sudhakar
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=dba1f760-2073-f7e0-148f-370f5ead4e76@linux.vnet.ibm.com \
--to=anju@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
/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).