Re: [PATCH V2] powerpc/kernel/sysfs: disable writing to purr in non-powernv

2013-10-01 Thread Michael Ellerman
Hi Maddy, On Fri, Sep 27, 2013 at 05:03:54PM +0530, Madhavan Srinivasan wrote: powerpc/kernel/sysfs.c exports purr with write permission. PURR This is only valid for kernel in hypervisor mode. But writing to the file in PowerVM lpar causes crash. In the kernel history/source we refer to it

Re: [PATCH V2] powerpc/kernel/sysfs: disable writing to purr in non-powernv

2013-10-01 Thread Benjamin Herrenschmidt
On Tue, 2013-10-01 at 16:31 +1000, Michael Ellerman wrote: 1)Changed the test for to hypervisor mode instead of platform I think Ben's wrong about that. Almost all existing code uses FW_FEATURE_LPAR to differentiate hypervisor vs guest mode, so I think we should do the same here. I

Re: [PATCH V2] powerpc/kernel/sysfs: disable writing to purr in non-powernv

2013-10-01 Thread Madhavan Srinivasan
On Tuesday 01 October 2013 12:01 PM, Michael Ellerman wrote: Hi Maddy, On Fri, Sep 27, 2013 at 05:03:54PM +0530, Madhavan Srinivasan wrote: powerpc/kernel/sysfs.c exports purr with write permission. PURR This is only valid for kernel in hypervisor mode. But writing to the file in

Re: [PATCH V2] powerpc/kernel/sysfs: disable writing to purr in non-powernv

2013-10-01 Thread Michael Ellerman
On Tue, Oct 01, 2013 at 05:50:30PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2013-10-01 at 16:31 +1000, Michael Ellerman wrote: 1)Changed the test for to hypervisor mode instead of platform I think Ben's wrong about that. Almost all existing code uses FW_FEATURE_LPAR to

[PATCH V2] powerpc/kernel/sysfs: disable writing to purr in non-powernv

2013-09-27 Thread Madhavan Srinivasan
powerpc/kernel/sysfs.c exports purr with write permission. This is only valid for kernel in hypervisor mode. But writing to the file in PowerVM lpar causes crash. # echo 0 purr cpu 0x0: Vector: 700 (Program Check) at [c0d072b0] pc: c001770c: .write_purr+0x1c/0x40 lr: