Re: powerpc: Add an inline function to update HID0

2015-08-08 Thread Benjamin Herrenschmidt
On Tue, 2015-08-04 at 20:08 +1000, Michael Ellerman wrote: > On Tue, 2015-04-08 at 08:30:58 UTC, "Gautham R. Shenoy" wrote: > > Section 3.7 of Version 1.2 of the Power8 Processor User's Manual > > prescribes that updates to HID0 be preceded by a SYNC instruction and > > followed by an ISYNC instruc

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R Shenoy
Hi Segher, Thanks for the suggestions. I will rename the function to update_power8_hid0() and use asm volatile. On Tue, Aug 04, 2015 at 09:30:57PM -0500, Segher Boessenkool wrote: > On Tue, Aug 04, 2015 at 08:08:58PM +1000, Michael Ellerman wrote: > > > +static inline void update_hid0(unsigned l

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Segher Boessenkool
On Tue, Aug 04, 2015 at 08:08:58PM +1000, Michael Ellerman wrote: > > +static inline void update_hid0(unsigned long hid0) > > +{ > > + /* > > +* The HID0 update should at the very least be preceded by a > > +* a SYNC instruction followed by an ISYNC instruction > > +*/ > > + mb();

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Michael Ellerman
On Tue, 2015-08-04 at 19:36 +0530, Madhavan Srinivasan wrote: > > On Tuesday 04 August 2015 03:38 PM, Michael Ellerman wrote: > > On Tue, 2015-04-08 at 08:30:58 UTC, "Gautham R. Shenoy" wrote: > >> Section 3.7 of Version 1.2 of the Power8 Processor User's Manual > >> prescribes that updates to HID

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Madhavan Srinivasan
On Tuesday 04 August 2015 03:38 PM, Michael Ellerman wrote: > On Tue, 2015-04-08 at 08:30:58 UTC, "Gautham R. Shenoy" wrote: >> Section 3.7 of Version 1.2 of the Power8 Processor User's Manual >> prescribes that updates to HID0 be preceded by a SYNC instruction and >> followed by an ISYNC instruc

[PATCH v2] powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R. Shenoy
Section 3.7 of Version 1.2 of the Power8 Processor User's Manual prescribes that updates to HID0 be preceded by a SYNC instruction and followed by an ISYNC instruction (Page 91). Create an inline function name update_hid0() which follows this recipe and invoke it from the static split core path.

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R Shenoy
Hi Michael, On Tue, Aug 04, 2015 at 08:08:58PM +1000, Michael Ellerman wrote: > On Tue, 2015-04-08 at 08:30:58 UTC, "Gautham R. Shenoy" wrote: > > Section 3.7 of Version 1.2 of the Power8 Processor User's Manual > > prescribes that updates to HID0 be preceded by a SYNC instruction and > > followed

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Michael Ellerman
On Tue, 2015-04-08 at 08:30:58 UTC, "Gautham R. Shenoy" wrote: > Section 3.7 of Version 1.2 of the Power8 Processor User's Manual > prescribes that updates to HID0 be preceded by a SYNC instruction and > followed by an ISYNC instruction (Page 91). > > Create a function name update_hid0() which fol

[PATCH] powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R. Shenoy
Section 3.7 of Version 1.2 of the Power8 Processor User's Manual prescribes that updates to HID0 be preceded by a SYNC instruction and followed by an ISYNC instruction (Page 91). Create a function name update_hid0() which follows this recipe and invoke it from the static split core path. Signed-o