From: Sam bobroff Date: Wed, 21 May 2014 06:32:38 +0000 (+1000) Subject: powerpc: Fix regression of per-CPU DSCR setting X-Git-Tag: omap-for-v3.16/fixes-against-rc1~60^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1739ea9e13e636590dd56c2f4ca85e783da512e7;p=pandora-kernel.git powerpc: Fix regression of per-CPU DSCR setting Since commit "efcac65 powerpc: Per process DSCR + some fixes (try#4)" it is no longer possible to set the DSCR on a per-CPU basis. The old behaviour was to minipulate the DSCR SPR directly but this is no longer sufficient: the value is quickly overwritten by context switching. This patch stores the per-CPU DSCR value in a kernel variable rather than directly in the SPR and it is used whenever a process has not set the DSCR itself. The sysfs interface (/sys/devices/system/cpu/cpuN/dscr) is unchanged. Writes to the old global default (/sys/devices/system/cpu/dscr_default) now set all of the per-CPU values and reads return the last written value. The new per-CPU default is added to the paca_struct and is used everywhere outside of sysfs.c instead of the old global default. Signed-off-by: Sam Bobroff Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed