On Thu, Jun 02, 2016 at 10:14:39AM +0200, Borislav Petkov wrote:
> On Thu, Jun 02, 2016 at 09:58:30AM +0200, Borislav Petkov wrote:
> > Ha, very nice! Let me try it.
> 
> Yap, much better than opencoding on_each_cpu_mask() :-)
> 
> ---
> From: Borislav Petkov <b...@suse.de>
> Date: Wed, 1 Jun 2016 11:36:13 +0200
> Subject: [PATCH] hwmon: (fam15h_power) Disable preemption when reading
>  registers
> 
> We need to read a bunch of registers on each compute unit and possibly
> on the current CPU too. Disable preemption around it. Otherwise, you
> get:
> 
>   BUG: using smp_processor_id() in preemptible [00000000] code: 
> systemd-udevd/327
>   caller is read_registers+0x6a/0x110 [fam15h_power]
>   CPU: 3 PID: 327 Comm: systemd-udevd Not tainted 4.7.0-rc1+ #4
>   Hardware name: HP HP EliteBook 745 G3/807E, BIOS N73 Ver. 01.08 01/28/2016
>   ...
> 
> Suggested-by: Thomas Gleixner <t...@linutronix.de>
> Signed-off-by: Borislav Petkov <b...@suse.de>
> Cc: Rui Huang <ray.hu...@amd.com>
> Cc: Sherry Hurwitz <sherry.hurw...@amd.com>
> Cc: Guenter Roeck <li...@roeck-us.net>
> Fixes: fa7943449943 ("hwmon: (fam15h_power) Add compute unit accumulated 
> power")

I like this version. Applied, though it would be nice to get a Tested-by: or
Acked-by: from someone at AMD. I'll hold back until early next week before
sending it to Linus.

Thanks,
Guenter

Reply via email to