Messages in this thread Patch in this message | | | Date | Tue, 4 Jan 2005 15:37:40 +1100 | From | Stephen Rothwell <> | Subject | [PATCH 9/11] PPC64: use xPMCRegsInUse |
| |
Hi Andrew,
This fixes an aweful piece of code that could have just referenced xPMCRegsInUse in the lppaca structure.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/
diff -ruN linus-bk-naca.8/arch/ppc64/kernel/sysfs.c linus-bk-naca.9/arch/ppc64/kernel/sysfs.c --- linus-bk-naca.8/arch/ppc64/kernel/sysfs.c 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.9/arch/ppc64/kernel/sysfs.c 2004-12-13 14:49:37.000000000 +1100 @@ -14,6 +14,8 @@ #include <asm/hvcall.h> #include <asm/prom.h> #include <asm/systemcfg.h> +#include <asm/paca.h> +#include <asm/iSeries/ItLpPaca.h> /* SMT stuff */ @@ -154,10 +156,8 @@ #ifdef CONFIG_PPC_PSERIES /* instruct hypervisor to maintain PMCs */ - if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { - char *ptr = (char *)&paca[smp_processor_id()].lppaca; - ptr[0xBB] = 1; - } + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) + get_paca()->lppaca.xPMCRegsInUse = 1; /* * On SMT machines we have to set the run latch in the ctrl register[unhandled content-type:application/pgp-signature] | |