diff options
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 8 | ||||
-rw-r--r-- | include/asm-powerpc/cputable.h | 6 | ||||
-rw-r--r-- | include/asm-powerpc/reg.h | 1 |
3 files changed, 13 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 63ed265b7f09..22daba56c865 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(dscr, SPRN_DSCR); | ||
184 | 185 | ||
185 | static SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0); | 186 | static SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0); |
186 | static SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1); | 187 | static SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1); |
@@ -194,6 +195,7 @@ static SYSDEV_ATTR(pmc6, 0600, show_pmc6, store_pmc6); | |||
194 | static SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7); | 195 | static SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7); |
195 | static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8); | 196 | static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8); |
196 | static SYSDEV_ATTR(purr, 0600, show_purr, NULL); | 197 | static SYSDEV_ATTR(purr, 0600, show_purr, NULL); |
198 | static SYSDEV_ATTR(dscr, 0600, show_dscr, store_dscr); | ||
197 | 199 | ||
198 | static void register_cpu_online(unsigned int cpu) | 200 | static void register_cpu_online(unsigned int cpu) |
199 | { | 201 | { |
@@ -231,6 +233,9 @@ static void register_cpu_online(unsigned int cpu) | |||
231 | 233 | ||
232 | if (cpu_has_feature(CPU_FTR_PURR)) | 234 | if (cpu_has_feature(CPU_FTR_PURR)) |
233 | sysdev_create_file(s, &attr_purr); | 235 | sysdev_create_file(s, &attr_purr); |
236 | |||
237 | if (cpu_has_feature(CPU_FTR_DSCR)) | ||
238 | sysdev_create_file(s, &attr_dscr); | ||
234 | } | 239 | } |
235 | 240 | ||
236 | #ifdef CONFIG_HOTPLUG_CPU | 241 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -272,6 +277,9 @@ static void unregister_cpu_online(unsigned int cpu) | |||
272 | 277 | ||
273 | if (cpu_has_feature(CPU_FTR_PURR)) | 278 | if (cpu_has_feature(CPU_FTR_PURR)) |
274 | sysdev_remove_file(s, &attr_purr); | 279 | sysdev_remove_file(s, &attr_purr); |
280 | |||
281 | if (cpu_has_feature(CPU_FTR_DSCR)) | ||
282 | sysdev_remove_file(s, &attr_dscr); | ||
275 | } | 283 | } |
276 | #endif /* CONFIG_HOTPLUG_CPU */ | 284 | #endif /* CONFIG_HOTPLUG_CPU */ |
277 | 285 | ||
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 6fe5c9d4ca3b..782adbf1f7aa 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -152,6 +152,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
152 | #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) | 152 | #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) |
153 | #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) | 153 | #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) |
154 | #define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) | 154 | #define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) |
155 | #define CPU_FTR_DSCR LONG_ASM_CONST(0x0002000000000000) | ||
155 | 156 | ||
156 | #ifndef __ASSEMBLY__ | 157 | #ifndef __ASSEMBLY__ |
157 | 158 | ||
@@ -330,13 +331,14 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
330 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 331 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
331 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 332 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
332 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 333 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
333 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE) | 334 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ |
335 | CPU_FTR_DSCR) | ||
334 | #define CPU_FTRS_POWER6X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 336 | #define CPU_FTRS_POWER6X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
335 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 337 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
336 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 338 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
337 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 339 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
338 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | \ | 340 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | \ |
339 | CPU_FTR_SPURR | CPU_FTR_REAL_LE) | 341 | CPU_FTR_SPURR | CPU_FTR_REAL_LE | CPU_FTR_DSCR) |
340 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 342 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
341 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 343 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
342 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 344 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 6faae7b14d55..cacdecca610c 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -143,6 +143,7 @@ | |||
143 | 143 | ||
144 | /* Special Purpose Registers (SPRNs)*/ | 144 | /* Special Purpose Registers (SPRNs)*/ |
145 | #define SPRN_CTR 0x009 /* Count Register */ | 145 | #define SPRN_CTR 0x009 /* Count Register */ |
146 | #define SPRN_DSCR 0x11 | ||
146 | #define SPRN_CTRLF 0x088 | 147 | #define SPRN_CTRLF 0x088 |
147 | #define SPRN_CTRLT 0x098 | 148 | #define SPRN_CTRLT 0x098 |
148 | #define CTRL_CT 0xc0000000 /* current thread */ | 149 | #define CTRL_CT 0xc0000000 /* current thread */ |