[PATCH 9/11] PPC64: use xPMCRegsInUse
Stephen Rothwell
sfr at canb.auug.org.au
Tue Jan 4 15:37:40 EST 2005
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 at canb.auug.org.au>
--
Cheers,
Stephen Rothwell sfr at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/ea16f4d5/attachment.pgp
More information about the Linuxppc64-dev
mailing list