lkml.org 
[lkml]   [2005]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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]
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.631 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site