diff options
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 8 | ||||
-rw-r--r-- | include/asm-powerpc/reg.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 22daba56c865..400ab2b946e7 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -181,6 +181,7 @@ SYSFS_PMCSETUP(pmc6, SPRN_PMC6); | |||
181 | SYSFS_PMCSETUP(pmc7, SPRN_PMC7); | 181 | SYSFS_PMCSETUP(pmc7, SPRN_PMC7); |
182 | SYSFS_PMCSETUP(pmc8, SPRN_PMC8); | 182 | SYSFS_PMCSETUP(pmc8, SPRN_PMC8); |
183 | SYSFS_PMCSETUP(purr, SPRN_PURR); | 183 | SYSFS_PMCSETUP(purr, SPRN_PURR); |
184 | SYSFS_PMCSETUP(spurr, SPRN_SPURR); | ||
184 | SYSFS_PMCSETUP(dscr, SPRN_DSCR); | 185 | SYSFS_PMCSETUP(dscr, SPRN_DSCR); |
185 | 186 | ||
186 | static SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0); | 187 | static SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0); |
@@ -195,6 +196,7 @@ static SYSDEV_ATTR(pmc6, 0600, show_pmc6, store_pmc6); | |||
195 | static SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7); | 196 | static SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7); |
196 | static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8); | 197 | static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8); |
197 | static SYSDEV_ATTR(purr, 0600, show_purr, NULL); | 198 | static SYSDEV_ATTR(purr, 0600, show_purr, NULL); |
199 | static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL); | ||
198 | static SYSDEV_ATTR(dscr, 0600, show_dscr, store_dscr); | 200 | static SYSDEV_ATTR(dscr, 0600, show_dscr, store_dscr); |
199 | 201 | ||
200 | static void register_cpu_online(unsigned int cpu) | 202 | static void register_cpu_online(unsigned int cpu) |
@@ -234,6 +236,9 @@ static void register_cpu_online(unsigned int cpu) | |||
234 | if (cpu_has_feature(CPU_FTR_PURR)) | 236 | if (cpu_has_feature(CPU_FTR_PURR)) |
235 | sysdev_create_file(s, &attr_purr); | 237 | sysdev_create_file(s, &attr_purr); |
236 | 238 | ||
239 | if (cpu_has_feature(CPU_FTR_SPURR)) | ||
240 | sysdev_create_file(s, &attr_spurr); | ||
241 | |||
237 | if (cpu_has_feature(CPU_FTR_DSCR)) | 242 | if (cpu_has_feature(CPU_FTR_DSCR)) |
238 | sysdev_create_file(s, &attr_dscr); | 243 | sysdev_create_file(s, &attr_dscr); |
239 | } | 244 | } |
@@ -278,6 +283,9 @@ static void unregister_cpu_online(unsigned int cpu) | |||
278 | if (cpu_has_feature(CPU_FTR_PURR)) | 283 | if (cpu_has_feature(CPU_FTR_PURR)) |
279 | sysdev_remove_file(s, &attr_purr); | 284 | sysdev_remove_file(s, &attr_purr); |
280 | 285 | ||
286 | if (cpu_has_feature(CPU_FTR_SPURR)) | ||
287 | sysdev_remove_file(s, &attr_spurr); | ||
288 | |||
281 | if (cpu_has_feature(CPU_FTR_DSCR)) | 289 | if (cpu_has_feature(CPU_FTR_DSCR)) |
282 | sysdev_remove_file(s, &attr_dscr); | 290 | sysdev_remove_file(s, &attr_dscr); |
283 | } | 291 | } |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index cacdecca610c..a3631b15754c 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -164,6 +164,7 @@ | |||
164 | #define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */ | 164 | #define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */ |
165 | #define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */ | 165 | #define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */ |
166 | #define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ | 166 | #define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ |
167 | #define SPRN_SPURR 0x134 /* Scaled PURR */ | ||
167 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ | 168 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ |
168 | #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ | 169 | #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ |
169 | #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ | 170 | #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ |