diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/abs_addr.h | 21 | ||||
-rw-r--r-- | arch/powerpc/include/asm/firmware.h | 9 | ||||
-rw-r--r-- | arch/powerpc/include/asm/time.h | 15 | ||||
-rw-r--r-- | arch/powerpc/kernel/irq.c | 14 | ||||
-rw-r--r-- | arch/powerpc/kernel/isa-bridge.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 108 | ||||
-rw-r--r-- | arch/powerpc/kernel/paca.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 15 | ||||
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 108 | ||||
-rw-r--r-- | arch/powerpc/lib/locks.c | 24 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 9 | ||||
-rw-r--r-- | arch/powerpc/mm/slb.c | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/stab.c | 9 | ||||
-rw-r--r-- | arch/powerpc/oprofile/common.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/pci.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 1 | ||||
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 28 |
18 files changed, 26 insertions, 367 deletions
diff --git a/arch/powerpc/include/asm/abs_addr.h b/arch/powerpc/include/asm/abs_addr.h index 5ab0b71531be..9d92ba04b033 100644 --- a/arch/powerpc/include/asm/abs_addr.h +++ b/arch/powerpc/include/asm/abs_addr.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/prom.h> | 19 | #include <asm/prom.h> |
20 | #include <asm/firmware.h> | ||
21 | 20 | ||
22 | struct mschunks_map { | 21 | struct mschunks_map { |
23 | unsigned long num_chunks; | 22 | unsigned long num_chunks; |
@@ -46,30 +45,12 @@ static inline unsigned long addr_to_chunk(unsigned long addr) | |||
46 | 45 | ||
47 | static inline unsigned long phys_to_abs(unsigned long pa) | 46 | static inline unsigned long phys_to_abs(unsigned long pa) |
48 | { | 47 | { |
49 | unsigned long chunk; | 48 | return pa; |
50 | |||
51 | /* This is a no-op on non-iSeries */ | ||
52 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | ||
53 | return pa; | ||
54 | |||
55 | chunk = addr_to_chunk(pa); | ||
56 | |||
57 | if (chunk < mschunks_map.num_chunks) | ||
58 | chunk = mschunks_map.mapping[chunk]; | ||
59 | |||
60 | return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK); | ||
61 | } | 49 | } |
62 | 50 | ||
63 | /* Convenience macros */ | 51 | /* Convenience macros */ |
64 | #define virt_to_abs(va) phys_to_abs(__pa(va)) | 52 | #define virt_to_abs(va) phys_to_abs(__pa(va)) |
65 | #define abs_to_virt(aa) __va(aa) | 53 | #define abs_to_virt(aa) __va(aa) |
66 | 54 | ||
67 | /* | ||
68 | * Converts Virtual Address to Real Address for | ||
69 | * Legacy iSeries Hypervisor calls | ||
70 | */ | ||
71 | #define iseries_hv_addr(virtaddr) \ | ||
72 | (0x8000000000000000UL | virt_to_abs(virtaddr)) | ||
73 | |||
74 | #endif /* __KERNEL__ */ | 55 | #endif /* __KERNEL__ */ |
75 | #endif /* _ASM_POWERPC_ABS_ADDR_H */ | 56 | #endif /* _ASM_POWERPC_ABS_ADDR_H */ |
diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h index 14db29b18d0e..ad0b751b0d78 100644 --- a/arch/powerpc/include/asm/firmware.h +++ b/arch/powerpc/include/asm/firmware.h | |||
@@ -41,7 +41,6 @@ | |||
41 | #define FW_FEATURE_XDABR ASM_CONST(0x0000000000040000) | 41 | #define FW_FEATURE_XDABR ASM_CONST(0x0000000000040000) |
42 | #define FW_FEATURE_MULTITCE ASM_CONST(0x0000000000080000) | 42 | #define FW_FEATURE_MULTITCE ASM_CONST(0x0000000000080000) |
43 | #define FW_FEATURE_SPLPAR ASM_CONST(0x0000000000100000) | 43 | #define FW_FEATURE_SPLPAR ASM_CONST(0x0000000000100000) |
44 | #define FW_FEATURE_ISERIES ASM_CONST(0x0000000000200000) | ||
45 | #define FW_FEATURE_LPAR ASM_CONST(0x0000000000400000) | 44 | #define FW_FEATURE_LPAR ASM_CONST(0x0000000000400000) |
46 | #define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000) | 45 | #define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000) |
47 | #define FW_FEATURE_BEAT ASM_CONST(0x0000000001000000) | 46 | #define FW_FEATURE_BEAT ASM_CONST(0x0000000001000000) |
@@ -65,8 +64,6 @@ enum { | |||
65 | FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR | | 64 | FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR | |
66 | FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO, | 65 | FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO, |
67 | FW_FEATURE_PSERIES_ALWAYS = 0, | 66 | FW_FEATURE_PSERIES_ALWAYS = 0, |
68 | FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, | ||
69 | FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, | ||
70 | FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2, | 67 | FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2, |
71 | FW_FEATURE_POWERNV_ALWAYS = 0, | 68 | FW_FEATURE_POWERNV_ALWAYS = 0, |
72 | FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, | 69 | FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, |
@@ -79,9 +76,6 @@ enum { | |||
79 | #ifdef CONFIG_PPC_PSERIES | 76 | #ifdef CONFIG_PPC_PSERIES |
80 | FW_FEATURE_PSERIES_POSSIBLE | | 77 | FW_FEATURE_PSERIES_POSSIBLE | |
81 | #endif | 78 | #endif |
82 | #ifdef CONFIG_PPC_ISERIES | ||
83 | FW_FEATURE_ISERIES_POSSIBLE | | ||
84 | #endif | ||
85 | #ifdef CONFIG_PPC_POWERNV | 79 | #ifdef CONFIG_PPC_POWERNV |
86 | FW_FEATURE_POWERNV_POSSIBLE | | 80 | FW_FEATURE_POWERNV_POSSIBLE | |
87 | #endif | 81 | #endif |
@@ -99,9 +93,6 @@ enum { | |||
99 | #ifdef CONFIG_PPC_PSERIES | 93 | #ifdef CONFIG_PPC_PSERIES |
100 | FW_FEATURE_PSERIES_ALWAYS & | 94 | FW_FEATURE_PSERIES_ALWAYS & |
101 | #endif | 95 | #endif |
102 | #ifdef CONFIG_PPC_ISERIES | ||
103 | FW_FEATURE_ISERIES_ALWAYS & | ||
104 | #endif | ||
105 | #ifdef CONFIG_PPC_POWERNV | 96 | #ifdef CONFIG_PPC_POWERNV |
106 | FW_FEATURE_POWERNV_ALWAYS & | 97 | FW_FEATURE_POWERNV_ALWAYS & |
107 | #endif | 98 | #endif |
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h index 7eb10fb96cd0..2136f58a54e8 100644 --- a/arch/powerpc/include/asm/time.h +++ b/arch/powerpc/include/asm/time.h | |||
@@ -18,11 +18,6 @@ | |||
18 | #include <linux/percpu.h> | 18 | #include <linux/percpu.h> |
19 | 19 | ||
20 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
21 | #ifdef CONFIG_PPC_ISERIES | ||
22 | #include <asm/paca.h> | ||
23 | #include <asm/firmware.h> | ||
24 | #include <asm/iseries/hv_call.h> | ||
25 | #endif | ||
26 | 21 | ||
27 | /* time.c */ | 22 | /* time.c */ |
28 | extern unsigned long tb_ticks_per_jiffy; | 23 | extern unsigned long tb_ticks_per_jiffy; |
@@ -167,15 +162,6 @@ static inline void set_dec(int val) | |||
167 | #ifndef CONFIG_BOOKE | 162 | #ifndef CONFIG_BOOKE |
168 | --val; | 163 | --val; |
169 | #endif | 164 | #endif |
170 | #ifdef CONFIG_PPC_ISERIES | ||
171 | if (firmware_has_feature(FW_FEATURE_ISERIES) && | ||
172 | get_lppaca()->shared_proc) { | ||
173 | get_lppaca()->virtual_decr = val; | ||
174 | if (get_dec() > val) | ||
175 | HvCall_setVirtualDecr(); | ||
176 | return; | ||
177 | } | ||
178 | #endif | ||
179 | mtspr(SPRN_DEC, val); | 165 | mtspr(SPRN_DEC, val); |
180 | #endif /* not 40x or 8xx_CPU6 */ | 166 | #endif /* not 40x or 8xx_CPU6 */ |
181 | } | 167 | } |
@@ -217,7 +203,6 @@ DECLARE_PER_CPU(struct cpu_usage, cpu_usage_array); | |||
217 | #endif | 203 | #endif |
218 | 204 | ||
219 | extern void secondary_cpu_time_init(void); | 205 | extern void secondary_cpu_time_init(void); |
220 | extern void iSeries_time_init_early(void); | ||
221 | 206 | ||
222 | DECLARE_PER_CPU(u64, decrementers_next_tb); | 207 | DECLARE_PER_CPU(u64, decrementers_next_tb); |
223 | 208 | ||
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index eb804e15b29b..45b367c8d8b8 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -211,11 +211,6 @@ notrace void arch_local_irq_restore(unsigned long en) | |||
211 | * External interrupt events on non-iseries will have caused | 211 | * External interrupt events on non-iseries will have caused |
212 | * interrupts to be hard-disabled, so there is no problem, we | 212 | * interrupts to be hard-disabled, so there is no problem, we |
213 | * cannot have preempted. | 213 | * cannot have preempted. |
214 | * | ||
215 | * That leaves us with EEs on iSeries or decrementer interrupts, | ||
216 | * which I decided to safely ignore. The preemption would have | ||
217 | * itself been the result of an interrupt, upon which return we | ||
218 | * will have checked for pending events on the old CPU. | ||
219 | */ | 214 | */ |
220 | irq_happened = get_irq_happened(); | 215 | irq_happened = get_irq_happened(); |
221 | if (!irq_happened) | 216 | if (!irq_happened) |
@@ -458,15 +453,6 @@ void do_IRQ(struct pt_regs *regs) | |||
458 | irq_exit(); | 453 | irq_exit(); |
459 | set_irq_regs(old_regs); | 454 | set_irq_regs(old_regs); |
460 | 455 | ||
461 | #ifdef CONFIG_PPC_ISERIES | ||
462 | if (firmware_has_feature(FW_FEATURE_ISERIES) && | ||
463 | get_lppaca()->int_dword.fields.decr_int) { | ||
464 | get_lppaca()->int_dword.fields.decr_int = 0; | ||
465 | /* Signal a fake decrementer interrupt */ | ||
466 | timer_interrupt(regs); | ||
467 | } | ||
468 | #endif | ||
469 | |||
470 | trace_irq_exit(regs); | 456 | trace_irq_exit(regs); |
471 | } | 457 | } |
472 | 458 | ||
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c index 479752901ec6..d45ec58703ce 100644 --- a/arch/powerpc/kernel/isa-bridge.c +++ b/arch/powerpc/kernel/isa-bridge.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/pci-bridge.h> | 29 | #include <asm/pci-bridge.h> |
30 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
31 | #include <asm/ppc-pci.h> | 31 | #include <asm/ppc-pci.h> |
32 | #include <asm/firmware.h> | ||
33 | 32 | ||
34 | unsigned long isa_io_base; /* NULL if no ISA bus */ | 33 | unsigned long isa_io_base; /* NULL if no ISA bus */ |
35 | EXPORT_SYMBOL(isa_io_base); | 34 | EXPORT_SYMBOL(isa_io_base); |
@@ -261,8 +260,6 @@ static struct notifier_block isa_bridge_notifier = { | |||
261 | */ | 260 | */ |
262 | static int __init isa_bridge_init(void) | 261 | static int __init isa_bridge_init(void) |
263 | { | 262 | { |
264 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
265 | return 0; | ||
266 | bus_register_notifier(&pci_bus_type, &isa_bridge_notifier); | 263 | bus_register_notifier(&pci_bus_type, &isa_bridge_notifier); |
267 | return 0; | 264 | return 0; |
268 | } | 265 | } |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 578f35f18723..ac12bd80ad95 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/seq_file.h> | 26 | #include <linux/seq_file.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/iseries/hv_lp_config.h> | ||
30 | #include <asm/lppaca.h> | 29 | #include <asm/lppaca.h> |
31 | #include <asm/hvcall.h> | 30 | #include <asm/hvcall.h> |
32 | #include <asm/firmware.h> | 31 | #include <asm/firmware.h> |
@@ -55,80 +54,14 @@ static unsigned long get_purr(void) | |||
55 | int cpu; | 54 | int cpu; |
56 | 55 | ||
57 | for_each_possible_cpu(cpu) { | 56 | for_each_possible_cpu(cpu) { |
58 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 57 | struct cpu_usage *cu; |
59 | sum_purr += lppaca_of(cpu).emulated_time_base; | ||
60 | else { | ||
61 | struct cpu_usage *cu; | ||
62 | 58 | ||
63 | cu = &per_cpu(cpu_usage_array, cpu); | 59 | cu = &per_cpu(cpu_usage_array, cpu); |
64 | sum_purr += cu->current_tb; | 60 | sum_purr += cu->current_tb; |
65 | } | ||
66 | } | 61 | } |
67 | return sum_purr; | 62 | return sum_purr; |
68 | } | 63 | } |
69 | 64 | ||
70 | #ifdef CONFIG_PPC_ISERIES | ||
71 | |||
72 | /* | ||
73 | * Methods used to fetch LPAR data when running on an iSeries platform. | ||
74 | */ | ||
75 | static int iseries_lparcfg_data(struct seq_file *m, void *v) | ||
76 | { | ||
77 | unsigned long pool_id; | ||
78 | int shared, entitled_capacity, max_entitled_capacity; | ||
79 | int processors, max_processors; | ||
80 | unsigned long purr = get_purr(); | ||
81 | |||
82 | shared = (int)(local_paca->lppaca_ptr->shared_proc); | ||
83 | |||
84 | seq_printf(m, "system_active_processors=%d\n", | ||
85 | (int)HvLpConfig_getSystemPhysicalProcessors()); | ||
86 | |||
87 | seq_printf(m, "system_potential_processors=%d\n", | ||
88 | (int)HvLpConfig_getSystemPhysicalProcessors()); | ||
89 | |||
90 | processors = (int)HvLpConfig_getPhysicalProcessors(); | ||
91 | seq_printf(m, "partition_active_processors=%d\n", processors); | ||
92 | |||
93 | max_processors = (int)HvLpConfig_getMaxPhysicalProcessors(); | ||
94 | seq_printf(m, "partition_potential_processors=%d\n", max_processors); | ||
95 | |||
96 | if (shared) { | ||
97 | entitled_capacity = HvLpConfig_getSharedProcUnits(); | ||
98 | max_entitled_capacity = HvLpConfig_getMaxSharedProcUnits(); | ||
99 | } else { | ||
100 | entitled_capacity = processors * 100; | ||
101 | max_entitled_capacity = max_processors * 100; | ||
102 | } | ||
103 | seq_printf(m, "partition_entitled_capacity=%d\n", entitled_capacity); | ||
104 | |||
105 | seq_printf(m, "partition_max_entitled_capacity=%d\n", | ||
106 | max_entitled_capacity); | ||
107 | |||
108 | if (shared) { | ||
109 | pool_id = HvLpConfig_getSharedPoolIndex(); | ||
110 | seq_printf(m, "pool=%d\n", (int)pool_id); | ||
111 | seq_printf(m, "pool_capacity=%d\n", | ||
112 | (int)(HvLpConfig_getNumProcsInSharedPool(pool_id) * | ||
113 | 100)); | ||
114 | seq_printf(m, "purr=%ld\n", purr); | ||
115 | } | ||
116 | |||
117 | seq_printf(m, "shared_processor_mode=%d\n", shared); | ||
118 | |||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | #else /* CONFIG_PPC_ISERIES */ | ||
123 | |||
124 | static int iseries_lparcfg_data(struct seq_file *m, void *v) | ||
125 | { | ||
126 | return 0; | ||
127 | } | ||
128 | |||
129 | #endif /* CONFIG_PPC_ISERIES */ | ||
130 | |||
131 | #ifdef CONFIG_PPC_PSERIES | ||
132 | /* | 65 | /* |
133 | * Methods used to fetch LPAR data when running on a pSeries platform. | 66 | * Methods used to fetch LPAR data when running on a pSeries platform. |
134 | */ | 67 | */ |
@@ -648,8 +581,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, | |||
648 | u8 new_weight, *new_weight_ptr = &new_weight; | 581 | u8 new_weight, *new_weight_ptr = &new_weight; |
649 | ssize_t retval; | 582 | ssize_t retval; |
650 | 583 | ||
651 | if (!firmware_has_feature(FW_FEATURE_SPLPAR) || | 584 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) |
652 | firmware_has_feature(FW_FEATURE_ISERIES)) | ||
653 | return -EINVAL; | 585 | return -EINVAL; |
654 | 586 | ||
655 | if (count > kbuf_sz) | 587 | if (count > kbuf_sz) |
@@ -709,21 +641,6 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, | |||
709 | return retval; | 641 | return retval; |
710 | } | 642 | } |
711 | 643 | ||
712 | #else /* CONFIG_PPC_PSERIES */ | ||
713 | |||
714 | static int pseries_lparcfg_data(struct seq_file *m, void *v) | ||
715 | { | ||
716 | return 0; | ||
717 | } | ||
718 | |||
719 | static ssize_t lparcfg_write(struct file *file, const char __user * buf, | ||
720 | size_t count, loff_t * off) | ||
721 | { | ||
722 | return -EINVAL; | ||
723 | } | ||
724 | |||
725 | #endif /* CONFIG_PPC_PSERIES */ | ||
726 | |||
727 | static int lparcfg_data(struct seq_file *m, void *v) | 644 | static int lparcfg_data(struct seq_file *m, void *v) |
728 | { | 645 | { |
729 | struct device_node *rootdn; | 646 | struct device_node *rootdn; |
@@ -738,19 +655,11 @@ static int lparcfg_data(struct seq_file *m, void *v) | |||
738 | rootdn = of_find_node_by_path("/"); | 655 | rootdn = of_find_node_by_path("/"); |
739 | if (rootdn) { | 656 | if (rootdn) { |
740 | tmp = of_get_property(rootdn, "model", NULL); | 657 | tmp = of_get_property(rootdn, "model", NULL); |
741 | if (tmp) { | 658 | if (tmp) |
742 | model = tmp; | 659 | model = tmp; |
743 | /* Skip "IBM," - see platforms/iseries/dt.c */ | ||
744 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
745 | model += 4; | ||
746 | } | ||
747 | tmp = of_get_property(rootdn, "system-id", NULL); | 660 | tmp = of_get_property(rootdn, "system-id", NULL); |
748 | if (tmp) { | 661 | if (tmp) |
749 | system_id = tmp; | 662 | system_id = tmp; |
750 | /* Skip "IBM," - see platforms/iseries/dt.c */ | ||
751 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
752 | system_id += 4; | ||
753 | } | ||
754 | lp_index_ptr = of_get_property(rootdn, "ibm,partition-no", | 663 | lp_index_ptr = of_get_property(rootdn, "ibm,partition-no", |
755 | NULL); | 664 | NULL); |
756 | if (lp_index_ptr) | 665 | if (lp_index_ptr) |
@@ -761,8 +670,6 @@ static int lparcfg_data(struct seq_file *m, void *v) | |||
761 | seq_printf(m, "system_type=%s\n", model); | 670 | seq_printf(m, "system_type=%s\n", model); |
762 | seq_printf(m, "partition_id=%d\n", (int)lp_index); | 671 | seq_printf(m, "partition_id=%d\n", (int)lp_index); |
763 | 672 | ||
764 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
765 | return iseries_lparcfg_data(m, v); | ||
766 | return pseries_lparcfg_data(m, v); | 673 | return pseries_lparcfg_data(m, v); |
767 | } | 674 | } |
768 | 675 | ||
@@ -786,8 +693,7 @@ static int __init lparcfg_init(void) | |||
786 | umode_t mode = S_IRUSR | S_IRGRP | S_IROTH; | 693 | umode_t mode = S_IRUSR | S_IRGRP | S_IROTH; |
787 | 694 | ||
788 | /* Allow writing if we have FW_FEATURE_SPLPAR */ | 695 | /* Allow writing if we have FW_FEATURE_SPLPAR */ |
789 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && | 696 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) |
790 | !firmware_has_feature(FW_FEATURE_ISERIES)) | ||
791 | mode |= S_IWUSR; | 697 | mode |= S_IWUSR; |
792 | 698 | ||
793 | ent = proc_create("powerpc/lparcfg", mode, NULL, &lparcfg_fops); | 699 | ent = proc_create("powerpc/lparcfg", mode, NULL, &lparcfg_fops); |
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 41456ff55e14..0bb1f98613ba 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -11,13 +11,10 @@ | |||
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
12 | #include <linux/memblock.h> | 12 | #include <linux/memblock.h> |
13 | 13 | ||
14 | #include <asm/firmware.h> | ||
15 | #include <asm/lppaca.h> | 14 | #include <asm/lppaca.h> |
16 | #include <asm/paca.h> | 15 | #include <asm/paca.h> |
17 | #include <asm/sections.h> | 16 | #include <asm/sections.h> |
18 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
19 | #include <asm/iseries/lpar_map.h> | ||
20 | #include <asm/iseries/hv_types.h> | ||
21 | #include <asm/kexec.h> | 18 | #include <asm/kexec.h> |
22 | 19 | ||
23 | /* This symbol is provided by the linker - let it fill in the paca | 20 | /* This symbol is provided by the linker - let it fill in the paca |
@@ -30,8 +27,8 @@ extern unsigned long __toc_start; | |||
30 | * The structure which the hypervisor knows about - this structure | 27 | * The structure which the hypervisor knows about - this structure |
31 | * should not cross a page boundary. The vpa_init/register_vpa call | 28 | * should not cross a page boundary. The vpa_init/register_vpa call |
32 | * is now known to fail if the lppaca structure crosses a page | 29 | * is now known to fail if the lppaca structure crosses a page |
33 | * boundary. The lppaca is also used on legacy iSeries and POWER5 | 30 | * boundary. The lppaca is also used on POWER5 pSeries boxes. |
34 | * pSeries boxes. The lppaca is 640 bytes long, and cannot readily | 31 | * The lppaca is 640 bytes long, and cannot readily |
35 | * change since the hypervisor knows its layout, so a 1kB alignment | 32 | * change since the hypervisor knows its layout, so a 1kB alignment |
36 | * will suffice to ensure that it doesn't cross a page boundary. | 33 | * will suffice to ensure that it doesn't cross a page boundary. |
37 | */ | 34 | */ |
@@ -183,12 +180,9 @@ void __init allocate_pacas(void) | |||
183 | /* | 180 | /* |
184 | * We can't take SLB misses on the paca, and we want to access them | 181 | * We can't take SLB misses on the paca, and we want to access them |
185 | * in real mode, so allocate them within the RMA and also within | 182 | * in real mode, so allocate them within the RMA and also within |
186 | * the first segment. On iSeries they must be within the area mapped | 183 | * the first segment. |
187 | * by the HV, which is HvPagesToMap * HVPAGESIZE bytes. | ||
188 | */ | 184 | */ |
189 | limit = min(0x10000000ULL, ppc64_rma_size); | 185 | limit = min(0x10000000ULL, ppc64_rma_size); |
190 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
191 | limit = min(limit, HvPagesToMap * HVPAGESIZE); | ||
192 | 186 | ||
193 | paca_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids); | 187 | paca_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids); |
194 | 188 | ||
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index cce98d76e905..d0373bcb7c9d 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/byteorder.h> | 38 | #include <asm/byteorder.h> |
39 | #include <asm/machdep.h> | 39 | #include <asm/machdep.h> |
40 | #include <asm/ppc-pci.h> | 40 | #include <asm/ppc-pci.h> |
41 | #include <asm/firmware.h> | ||
42 | #include <asm/eeh.h> | 41 | #include <asm/eeh.h> |
43 | 42 | ||
44 | static DEFINE_SPINLOCK(hose_spinlock); | 43 | static DEFINE_SPINLOCK(hose_spinlock); |
@@ -219,20 +218,6 @@ static int pci_read_irq_line(struct pci_dev *pci_dev) | |||
219 | struct of_irq oirq; | 218 | struct of_irq oirq; |
220 | unsigned int virq; | 219 | unsigned int virq; |
221 | 220 | ||
222 | /* The current device-tree that iSeries generates from the HV | ||
223 | * PCI informations doesn't contain proper interrupt routing, | ||
224 | * and all the fallback would do is print out crap, so we | ||
225 | * don't attempt to resolve the interrupts here at all, some | ||
226 | * iSeries specific fixup does it. | ||
227 | * | ||
228 | * In the long run, we will hopefully fix the generated device-tree | ||
229 | * instead. | ||
230 | */ | ||
231 | #ifdef CONFIG_PPC_ISERIES | ||
232 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
233 | return -1; | ||
234 | #endif | ||
235 | |||
236 | pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev)); | 221 | pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev)); |
237 | 222 | ||
238 | #ifdef DEBUG | 223 | #ifdef DEBUG |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 883e74c0d1b3..0c683d376b1c 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/current.h> | 12 | #include <asm/current.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/cputable.h> | 14 | #include <asm/cputable.h> |
15 | #include <asm/firmware.h> | ||
16 | #include <asm/hvcall.h> | 15 | #include <asm/hvcall.h> |
17 | #include <asm/prom.h> | 16 | #include <asm/prom.h> |
18 | #include <asm/machdep.h> | 17 | #include <asm/machdep.h> |
@@ -341,8 +340,7 @@ static void __cpuinit register_cpu_online(unsigned int cpu) | |||
341 | int i, nattrs; | 340 | int i, nattrs; |
342 | 341 | ||
343 | #ifdef CONFIG_PPC64 | 342 | #ifdef CONFIG_PPC64 |
344 | if (!firmware_has_feature(FW_FEATURE_ISERIES) && | 343 | if (cpu_has_feature(CPU_FTR_SMT)) |
345 | cpu_has_feature(CPU_FTR_SMT)) | ||
346 | device_create_file(s, &dev_attr_smt_snooze_delay); | 344 | device_create_file(s, &dev_attr_smt_snooze_delay); |
347 | #endif | 345 | #endif |
348 | 346 | ||
@@ -414,8 +412,7 @@ static void unregister_cpu_online(unsigned int cpu) | |||
414 | BUG_ON(!c->hotpluggable); | 412 | BUG_ON(!c->hotpluggable); |
415 | 413 | ||
416 | #ifdef CONFIG_PPC64 | 414 | #ifdef CONFIG_PPC64 |
417 | if (!firmware_has_feature(FW_FEATURE_ISERIES) && | 415 | if (cpu_has_feature(CPU_FTR_SMT)) |
418 | cpu_has_feature(CPU_FTR_SMT)) | ||
419 | device_remove_file(s, &dev_attr_smt_snooze_delay); | 416 | device_remove_file(s, &dev_attr_smt_snooze_delay); |
420 | #endif | 417 | #endif |
421 | 418 | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index f81c81b92f0e..2c42cd72d0f5 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -17,8 +17,7 @@ | |||
17 | * | 17 | * |
18 | * TODO (not necessarily in this file): | 18 | * TODO (not necessarily in this file): |
19 | * - improve precision and reproducibility of timebase frequency | 19 | * - improve precision and reproducibility of timebase frequency |
20 | * measurement at boot time. (for iSeries, we calibrate the timebase | 20 | * measurement at boot time. |
21 | * against the Titan chip's clock.) | ||
22 | * - for astronomical applications: add a new function to get | 21 | * - for astronomical applications: add a new function to get |
23 | * non ambiguous timestamps even around leap seconds. This needs | 22 | * non ambiguous timestamps even around leap seconds. This needs |
24 | * a new timestamp format and a good name. | 23 | * a new timestamp format and a good name. |
@@ -70,10 +69,6 @@ | |||
70 | #include <asm/vdso_datapage.h> | 69 | #include <asm/vdso_datapage.h> |
71 | #include <asm/firmware.h> | 70 | #include <asm/firmware.h> |
72 | #include <asm/cputime.h> | 71 | #include <asm/cputime.h> |
73 | #ifdef CONFIG_PPC_ISERIES | ||
74 | #include <asm/iseries/it_lp_queue.h> | ||
75 | #include <asm/iseries/hv_call_xm.h> | ||
76 | #endif | ||
77 | 72 | ||
78 | /* powerpc clocksource/clockevent code */ | 73 | /* powerpc clocksource/clockevent code */ |
79 | 74 | ||
@@ -117,14 +112,6 @@ static struct clock_event_device decrementer_clockevent = { | |||
117 | DEFINE_PER_CPU(u64, decrementers_next_tb); | 112 | DEFINE_PER_CPU(u64, decrementers_next_tb); |
118 | static DEFINE_PER_CPU(struct clock_event_device, decrementers); | 113 | static DEFINE_PER_CPU(struct clock_event_device, decrementers); |
119 | 114 | ||
120 | #ifdef CONFIG_PPC_ISERIES | ||
121 | static unsigned long __initdata iSeries_recal_titan; | ||
122 | static signed long __initdata iSeries_recal_tb; | ||
123 | |||
124 | /* Forward declaration is only needed for iSereis compiles */ | ||
125 | static void __init clocksource_init(void); | ||
126 | #endif | ||
127 | |||
128 | #define XSEC_PER_SEC (1024*1024) | 115 | #define XSEC_PER_SEC (1024*1024) |
129 | 116 | ||
130 | #ifdef CONFIG_PPC64 | 117 | #ifdef CONFIG_PPC64 |
@@ -423,74 +410,6 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
423 | EXPORT_SYMBOL(profile_pc); | 410 | EXPORT_SYMBOL(profile_pc); |
424 | #endif | 411 | #endif |
425 | 412 | ||
426 | #ifdef CONFIG_PPC_ISERIES | ||
427 | |||
428 | /* | ||
429 | * This function recalibrates the timebase based on the 49-bit time-of-day | ||
430 | * value in the Titan chip. The Titan is much more accurate than the value | ||
431 | * returned by the service processor for the timebase frequency. | ||
432 | */ | ||
433 | |||
434 | static int __init iSeries_tb_recal(void) | ||
435 | { | ||
436 | unsigned long titan, tb; | ||
437 | |||
438 | /* Make sure we only run on iSeries */ | ||
439 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | ||
440 | return -ENODEV; | ||
441 | |||
442 | tb = get_tb(); | ||
443 | titan = HvCallXm_loadTod(); | ||
444 | if ( iSeries_recal_titan ) { | ||
445 | unsigned long tb_ticks = tb - iSeries_recal_tb; | ||
446 | unsigned long titan_usec = (titan - iSeries_recal_titan) >> 12; | ||
447 | unsigned long new_tb_ticks_per_sec = (tb_ticks * USEC_PER_SEC)/titan_usec; | ||
448 | unsigned long new_tb_ticks_per_jiffy = | ||
449 | DIV_ROUND_CLOSEST(new_tb_ticks_per_sec, HZ); | ||
450 | long tick_diff = new_tb_ticks_per_jiffy - tb_ticks_per_jiffy; | ||
451 | char sign = '+'; | ||
452 | /* make sure tb_ticks_per_sec and tb_ticks_per_jiffy are consistent */ | ||
453 | new_tb_ticks_per_sec = new_tb_ticks_per_jiffy * HZ; | ||
454 | |||
455 | if ( tick_diff < 0 ) { | ||
456 | tick_diff = -tick_diff; | ||
457 | sign = '-'; | ||
458 | } | ||
459 | if ( tick_diff ) { | ||
460 | if ( tick_diff < tb_ticks_per_jiffy/25 ) { | ||
461 | printk( "Titan recalibrate: new tb_ticks_per_jiffy = %lu (%c%ld)\n", | ||
462 | new_tb_ticks_per_jiffy, sign, tick_diff ); | ||
463 | tb_ticks_per_jiffy = new_tb_ticks_per_jiffy; | ||
464 | tb_ticks_per_sec = new_tb_ticks_per_sec; | ||
465 | calc_cputime_factors(); | ||
466 | vdso_data->tb_ticks_per_sec = tb_ticks_per_sec; | ||
467 | setup_cputime_one_jiffy(); | ||
468 | } | ||
469 | else { | ||
470 | printk( "Titan recalibrate: FAILED (difference > 4 percent)\n" | ||
471 | " new tb_ticks_per_jiffy = %lu\n" | ||
472 | " old tb_ticks_per_jiffy = %lu\n", | ||
473 | new_tb_ticks_per_jiffy, tb_ticks_per_jiffy ); | ||
474 | } | ||
475 | } | ||
476 | } | ||
477 | iSeries_recal_titan = titan; | ||
478 | iSeries_recal_tb = tb; | ||
479 | |||
480 | /* Called here as now we know accurate values for the timebase */ | ||
481 | clocksource_init(); | ||
482 | return 0; | ||
483 | } | ||
484 | late_initcall(iSeries_tb_recal); | ||
485 | |||
486 | /* Called from platform early init */ | ||
487 | void __init iSeries_time_init_early(void) | ||
488 | { | ||
489 | iSeries_recal_tb = get_tb(); | ||
490 | iSeries_recal_titan = HvCallXm_loadTod(); | ||
491 | } | ||
492 | #endif /* CONFIG_PPC_ISERIES */ | ||
493 | |||
494 | #ifdef CONFIG_IRQ_WORK | 413 | #ifdef CONFIG_IRQ_WORK |
495 | 414 | ||
496 | /* | 415 | /* |
@@ -547,16 +466,6 @@ void arch_irq_work_raise(void) | |||
547 | #endif /* CONFIG_IRQ_WORK */ | 466 | #endif /* CONFIG_IRQ_WORK */ |
548 | 467 | ||
549 | /* | 468 | /* |
550 | * For iSeries shared processors, we have to let the hypervisor | ||
551 | * set the hardware decrementer. We set a virtual decrementer | ||
552 | * in the lppaca and call the hypervisor if the virtual | ||
553 | * decrementer is less than the current value in the hardware | ||
554 | * decrementer. (almost always the new decrementer value will | ||
555 | * be greater than the current hardware decementer so the hypervisor | ||
556 | * call will not be needed) | ||
557 | */ | ||
558 | |||
559 | /* | ||
560 | * timer_interrupt - gets called when the decrementer overflows, | 469 | * timer_interrupt - gets called when the decrementer overflows, |
561 | * with interrupts disabled. | 470 | * with interrupts disabled. |
562 | */ | 471 | */ |
@@ -599,20 +508,10 @@ void timer_interrupt(struct pt_regs * regs) | |||
599 | irq_work_run(); | 508 | irq_work_run(); |
600 | } | 509 | } |
601 | 510 | ||
602 | #ifdef CONFIG_PPC_ISERIES | ||
603 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
604 | get_lppaca()->int_dword.fields.decr_int = 0; | ||
605 | #endif | ||
606 | |||
607 | *next_tb = ~(u64)0; | 511 | *next_tb = ~(u64)0; |
608 | if (evt->event_handler) | 512 | if (evt->event_handler) |
609 | evt->event_handler(evt); | 513 | evt->event_handler(evt); |
610 | 514 | ||
611 | #ifdef CONFIG_PPC_ISERIES | ||
612 | if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) | ||
613 | process_hvlpevents(); | ||
614 | #endif | ||
615 | |||
616 | #ifdef CONFIG_PPC64 | 515 | #ifdef CONFIG_PPC64 |
617 | /* collect purr register values often, for accurate calculations */ | 516 | /* collect purr register values often, for accurate calculations */ |
618 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { | 517 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { |
@@ -984,9 +883,8 @@ void __init time_init(void) | |||
984 | */ | 883 | */ |
985 | start_cpu_decrementer(); | 884 | start_cpu_decrementer(); |
986 | 885 | ||
987 | /* Register the clocksource, if we're not running on iSeries */ | 886 | /* Register the clocksource */ |
988 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | 887 | clocksource_init(); |
989 | clocksource_init(); | ||
990 | 888 | ||
991 | init_decrementer_clockevent(); | 889 | init_decrementer_clockevent(); |
992 | } | 890 | } |
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index a6ebba56fdd4..bb7cfecf2788 100644 --- a/arch/powerpc/lib/locks.c +++ b/arch/powerpc/lib/locks.c | |||
@@ -19,11 +19,9 @@ | |||
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | 20 | ||
21 | /* waiting for a spinlock... */ | 21 | /* waiting for a spinlock... */ |
22 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) | 22 | #if defined(CONFIG_PPC_SPLPAR) |
23 | #include <asm/hvcall.h> | 23 | #include <asm/hvcall.h> |
24 | #include <asm/iseries/hv_call.h> | ||
25 | #include <asm/smp.h> | 24 | #include <asm/smp.h> |
26 | #include <asm/firmware.h> | ||
27 | 25 | ||
28 | void __spin_yield(arch_spinlock_t *lock) | 26 | void __spin_yield(arch_spinlock_t *lock) |
29 | { | 27 | { |
@@ -40,14 +38,8 @@ void __spin_yield(arch_spinlock_t *lock) | |||
40 | rmb(); | 38 | rmb(); |
41 | if (lock->slock != lock_value) | 39 | if (lock->slock != lock_value) |
42 | return; /* something has changed */ | 40 | return; /* something has changed */ |
43 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 41 | plpar_hcall_norets(H_CONFER, |
44 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 42 | get_hard_smp_processor_id(holder_cpu), yield_count); |
45 | ((u64)holder_cpu << 32) | yield_count); | ||
46 | #ifdef CONFIG_PPC_SPLPAR | ||
47 | else | ||
48 | plpar_hcall_norets(H_CONFER, | ||
49 | get_hard_smp_processor_id(holder_cpu), yield_count); | ||
50 | #endif | ||
51 | } | 43 | } |
52 | 44 | ||
53 | /* | 45 | /* |
@@ -71,14 +63,8 @@ void __rw_yield(arch_rwlock_t *rw) | |||
71 | rmb(); | 63 | rmb(); |
72 | if (rw->lock != lock_value) | 64 | if (rw->lock != lock_value) |
73 | return; /* something has changed */ | 65 | return; /* something has changed */ |
74 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 66 | plpar_hcall_norets(H_CONFER, |
75 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 67 | get_hard_smp_processor_id(holder_cpu), yield_count); |
76 | ((u64)holder_cpu << 32) | yield_count); | ||
77 | #ifdef CONFIG_PPC_SPLPAR | ||
78 | else | ||
79 | plpar_hcall_norets(H_CONFER, | ||
80 | get_hard_smp_processor_id(holder_cpu), yield_count); | ||
81 | #endif | ||
82 | } | 68 | } |
83 | #endif | 69 | #endif |
84 | 70 | ||
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index b534bbac3f82..3e8c37a4e395 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <asm/udbg.h> | 56 | #include <asm/udbg.h> |
57 | #include <asm/code-patching.h> | 57 | #include <asm/code-patching.h> |
58 | #include <asm/fadump.h> | 58 | #include <asm/fadump.h> |
59 | #include <asm/firmware.h> | ||
59 | 60 | ||
60 | #ifdef DEBUG | 61 | #ifdef DEBUG |
61 | #define DBG(fmt...) udbg_printf(fmt) | 62 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -756,12 +757,9 @@ void __init early_init_mmu(void) | |||
756 | */ | 757 | */ |
757 | htab_initialize(); | 758 | htab_initialize(); |
758 | 759 | ||
759 | /* Initialize stab / SLB management except on iSeries | 760 | /* Initialize stab / SLB management */ |
760 | */ | ||
761 | if (mmu_has_feature(MMU_FTR_SLB)) | 761 | if (mmu_has_feature(MMU_FTR_SLB)) |
762 | slb_initialize(); | 762 | slb_initialize(); |
763 | else if (!firmware_has_feature(FW_FEATURE_ISERIES)) | ||
764 | stab_initialize(get_paca()->stab_real); | ||
765 | } | 763 | } |
766 | 764 | ||
767 | #ifdef CONFIG_SMP | 765 | #ifdef CONFIG_SMP |
@@ -772,8 +770,7 @@ void __cpuinit early_init_mmu_secondary(void) | |||
772 | mtspr(SPRN_SDR1, _SDR1); | 770 | mtspr(SPRN_SDR1, _SDR1); |
773 | 771 | ||
774 | /* Initialize STAB/SLB. We use a virtual address as it works | 772 | /* Initialize STAB/SLB. We use a virtual address as it works |
775 | * in real mode on pSeries and we want a virtual address on | 773 | * in real mode on pSeries. |
776 | * iSeries anyway | ||
777 | */ | 774 | */ |
778 | if (mmu_has_feature(MMU_FTR_SLB)) | 775 | if (mmu_has_feature(MMU_FTR_SLB)) |
779 | slb_initialize(); | 776 | slb_initialize(); |
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index e22276cb67a4..a538c80db2df 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <asm/cputable.h> | 21 | #include <asm/cputable.h> |
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
23 | #include <asm/smp.h> | 23 | #include <asm/smp.h> |
24 | #include <asm/firmware.h> | ||
25 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
26 | #include <asm/udbg.h> | 25 | #include <asm/udbg.h> |
27 | #include <asm/code-patching.h> | 26 | #include <asm/code-patching.h> |
@@ -307,11 +306,6 @@ void slb_initialize(void) | |||
307 | 306 | ||
308 | get_paca()->stab_rr = SLB_NUM_BOLTED; | 307 | get_paca()->stab_rr = SLB_NUM_BOLTED; |
309 | 308 | ||
310 | /* On iSeries the bolted entries have already been set up by | ||
311 | * the hypervisor from the lparMap data in head.S */ | ||
312 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
313 | return; | ||
314 | |||
315 | lflags = SLB_VSID_KERNEL | linear_llp; | 309 | lflags = SLB_VSID_KERNEL | linear_llp; |
316 | vflags = SLB_VSID_KERNEL | vmalloc_llp; | 310 | vflags = SLB_VSID_KERNEL | vmalloc_llp; |
317 | 311 | ||
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 41e31642a86a..9106ebb118f5 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include <asm/cputable.h> | 21 | #include <asm/cputable.h> |
22 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
23 | #include <asm/abs_addr.h> | 23 | #include <asm/abs_addr.h> |
24 | #include <asm/firmware.h> | ||
25 | #include <asm/iseries/hv_call.h> | ||
26 | 24 | ||
27 | struct stab_entry { | 25 | struct stab_entry { |
28 | unsigned long esid_data; | 26 | unsigned long esid_data; |
@@ -285,12 +283,5 @@ void stab_initialize(unsigned long stab) | |||
285 | /* Set ASR */ | 283 | /* Set ASR */ |
286 | stabreal = get_paca()->stab_real | 0x1ul; | 284 | stabreal = get_paca()->stab_real | 0x1ul; |
287 | 285 | ||
288 | #ifdef CONFIG_PPC_ISERIES | ||
289 | if (firmware_has_feature(FW_FEATURE_ISERIES)) { | ||
290 | HvCall1(HvCallBaseSetASR, stabreal); | ||
291 | return; | ||
292 | } | ||
293 | #endif /* CONFIG_PPC_ISERIES */ | ||
294 | |||
295 | mtspr(SPRN_ASR, stabreal); | 286 | mtspr(SPRN_ASR, stabreal); |
296 | } | 287 | } |
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c index d65e68f3cb25..6f01624f317f 100644 --- a/arch/powerpc/oprofile/common.c +++ b/arch/powerpc/oprofile/common.c | |||
@@ -195,9 +195,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
195 | if (!cur_cpu_spec->oprofile_cpu_type) | 195 | if (!cur_cpu_spec->oprofile_cpu_type) |
196 | return -ENODEV; | 196 | return -ENODEV; |
197 | 197 | ||
198 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
199 | return -ENODEV; | ||
200 | |||
201 | switch (cur_cpu_spec->oprofile_type) { | 198 | switch (cur_cpu_spec->oprofile_type) { |
202 | #ifdef CONFIG_PPC_BOOK3S_64 | 199 | #ifdef CONFIG_PPC_BOOK3S_64 |
203 | #ifdef CONFIG_OPROFILE_CELL | 200 | #ifdef CONFIG_OPROFILE_CELL |
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index f92b9ef7340e..214478d781ae 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/iommu.h> | 31 | #include <asm/iommu.h> |
32 | #include <asm/tce.h> | 32 | #include <asm/tce.h> |
33 | #include <asm/abs_addr.h> | 33 | #include <asm/abs_addr.h> |
34 | #include <asm/firmware.h> | ||
34 | 35 | ||
35 | #include "powernv.h" | 36 | #include "powernv.h" |
36 | #include "pci.h" | 37 | #include "pci.h" |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 7bc73af6c7b9..5f3ef876ded2 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/udbg.h> | 41 | #include <asm/udbg.h> |
42 | #include <asm/smp.h> | 42 | #include <asm/smp.h> |
43 | #include <asm/trace.h> | 43 | #include <asm/trace.h> |
44 | #include <asm/firmware.h> | ||
44 | 45 | ||
45 | #include "plpar_wrappers.h" | 46 | #include "plpar_wrappers.h" |
46 | #include "pseries.h" | 47 | #include "pseries.h" |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 974a47b3c9b8..68a9cbbab450 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <asm/irq_regs.h> | 39 | #include <asm/irq_regs.h> |
40 | #include <asm/spu.h> | 40 | #include <asm/spu.h> |
41 | #include <asm/spu_priv1.h> | 41 | #include <asm/spu_priv1.h> |
42 | #include <asm/firmware.h> | ||
43 | #include <asm/setjmp.h> | 42 | #include <asm/setjmp.h> |
44 | #include <asm/reg.h> | 43 | #include <asm/reg.h> |
45 | 44 | ||
@@ -1635,25 +1634,6 @@ static void super_regs(void) | |||
1635 | mfspr(SPRN_DEC), mfspr(SPRN_SPRG2)); | 1634 | mfspr(SPRN_DEC), mfspr(SPRN_SPRG2)); |
1636 | printf("sp = "REG" sprg3= "REG"\n", sp, mfspr(SPRN_SPRG3)); | 1635 | printf("sp = "REG" sprg3= "REG"\n", sp, mfspr(SPRN_SPRG3)); |
1637 | printf("toc = "REG" dar = "REG"\n", toc, mfspr(SPRN_DAR)); | 1636 | printf("toc = "REG" dar = "REG"\n", toc, mfspr(SPRN_DAR)); |
1638 | #ifdef CONFIG_PPC_ISERIES | ||
1639 | if (firmware_has_feature(FW_FEATURE_ISERIES)) { | ||
1640 | struct paca_struct *ptrPaca; | ||
1641 | struct lppaca *ptrLpPaca; | ||
1642 | |||
1643 | /* Dump out relevant Paca data areas. */ | ||
1644 | printf("Paca: \n"); | ||
1645 | ptrPaca = local_paca; | ||
1646 | |||
1647 | printf(" Local Processor Control Area (LpPaca): \n"); | ||
1648 | ptrLpPaca = ptrPaca->lppaca_ptr; | ||
1649 | printf(" Saved Srr0=%.16lx Saved Srr1=%.16lx \n", | ||
1650 | ptrLpPaca->saved_srr0, ptrLpPaca->saved_srr1); | ||
1651 | printf(" Saved Gpr3=%.16lx Saved Gpr4=%.16lx \n", | ||
1652 | ptrLpPaca->saved_gpr3, ptrLpPaca->saved_gpr4); | ||
1653 | printf(" Saved Gpr5=%.16lx \n", | ||
1654 | ptrLpPaca->gpr5_dword.saved_gpr5); | ||
1655 | } | ||
1656 | #endif | ||
1657 | 1637 | ||
1658 | return; | 1638 | return; |
1659 | } | 1639 | } |
@@ -2856,10 +2836,6 @@ static void dump_tlb_book3e(void) | |||
2856 | 2836 | ||
2857 | static void xmon_init(int enable) | 2837 | static void xmon_init(int enable) |
2858 | { | 2838 | { |
2859 | #ifdef CONFIG_PPC_ISERIES | ||
2860 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
2861 | return; | ||
2862 | #endif | ||
2863 | if (enable) { | 2839 | if (enable) { |
2864 | __debugger = xmon; | 2840 | __debugger = xmon; |
2865 | __debugger_ipi = xmon_ipi; | 2841 | __debugger_ipi = xmon_ipi; |
@@ -2896,10 +2872,6 @@ static struct sysrq_key_op sysrq_xmon_op = { | |||
2896 | 2872 | ||
2897 | static int __init setup_xmon_sysrq(void) | 2873 | static int __init setup_xmon_sysrq(void) |
2898 | { | 2874 | { |
2899 | #ifdef CONFIG_PPC_ISERIES | ||
2900 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
2901 | return 0; | ||
2902 | #endif | ||
2903 | register_sysrq_key('x', &sysrq_xmon_op); | 2875 | register_sysrq_key('x', &sysrq_xmon_op); |
2904 | return 0; | 2876 | return 0; |
2905 | } | 2877 | } |