diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-14 01:15:45 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-14 01:15:45 -0500 |
commit | 821077b2617ef70662a861393c929d7e47609512 (patch) | |
tree | a1ea11b67418bb2f84efb7f0b44a772c3f625f2a /arch/powerpc | |
parent | 3136254ca5dfaf53486f7032c674f9b6d7fd1d53 (diff) | |
parent | d7867959e7e928ab52ef204e2559937e5c9fc4ce (diff) |
Merge git://oak/home/sfr/kernels/iseries/work
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 51 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/irq.c | 25 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 6 |
5 files changed, 33 insertions, 62 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 4b7940693f3d..5a71ed9612fe 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -71,6 +71,11 @@ | |||
71 | #include <asm/paca.h> | 71 | #include <asm/paca.h> |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | int __irq_offset_value; | ||
75 | #ifdef CONFIG_PPC32 | ||
76 | EXPORT_SYMBOL(__irq_offset_value); | ||
77 | #endif | ||
78 | |||
74 | static int ppc_spurious_interrupts; | 79 | static int ppc_spurious_interrupts; |
75 | 80 | ||
76 | #if defined(CONFIG_PPC_ISERIES) && defined(CONFIG_SMP) | 81 | #if defined(CONFIG_PPC_ISERIES) && defined(CONFIG_SMP) |
@@ -98,7 +103,6 @@ extern atomic_t ipi_sent; | |||
98 | EXPORT_SYMBOL(irq_desc); | 103 | EXPORT_SYMBOL(irq_desc); |
99 | 104 | ||
100 | int distribute_irqs = 1; | 105 | int distribute_irqs = 1; |
101 | int __irq_offset_value; | ||
102 | u64 ppc64_interrupt_controller; | 106 | u64 ppc64_interrupt_controller; |
103 | #endif /* CONFIG_PPC64 */ | 107 | #endif /* CONFIG_PPC64 */ |
104 | 108 | ||
@@ -311,7 +315,6 @@ void __init init_IRQ(void) | |||
311 | } | 315 | } |
312 | 316 | ||
313 | #ifdef CONFIG_PPC64 | 317 | #ifdef CONFIG_PPC64 |
314 | #ifndef CONFIG_PPC_ISERIES | ||
315 | /* | 318 | /* |
316 | * Virtual IRQ mapping code, used on systems with XICS interrupt controllers. | 319 | * Virtual IRQ mapping code, used on systems with XICS interrupt controllers. |
317 | */ | 320 | */ |
@@ -420,8 +423,6 @@ unsigned int real_irq_to_virt_slowpath(unsigned int real_irq) | |||
420 | 423 | ||
421 | } | 424 | } |
422 | 425 | ||
423 | #endif /* CONFIG_PPC_ISERIES */ | ||
424 | |||
425 | #ifdef CONFIG_IRQSTACKS | 426 | #ifdef CONFIG_IRQSTACKS |
426 | struct thread_info *softirq_ctx[NR_CPUS]; | 427 | struct thread_info *softirq_ctx[NR_CPUS]; |
427 | struct thread_info *hardirq_ctx[NR_CPUS]; | 428 | struct thread_info *hardirq_ctx[NR_CPUS]; |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 1b3ba8a440a6..9dda16ccde78 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -42,32 +42,6 @@ | |||
42 | 42 | ||
43 | /* #define LPARCFG_DEBUG */ | 43 | /* #define LPARCFG_DEBUG */ |
44 | 44 | ||
45 | /* find a better place for this function... */ | ||
46 | static void log_plpar_hcall_return(unsigned long rc, char *tag) | ||
47 | { | ||
48 | if (rc == 0) /* success, return */ | ||
49 | return; | ||
50 | /* check for null tag ? */ | ||
51 | if (rc == H_Hardware) | ||
52 | printk(KERN_INFO | ||
53 | "plpar-hcall (%s) failed with hardware fault\n", tag); | ||
54 | else if (rc == H_Function) | ||
55 | printk(KERN_INFO | ||
56 | "plpar-hcall (%s) failed; function not allowed\n", tag); | ||
57 | else if (rc == H_Authority) | ||
58 | printk(KERN_INFO | ||
59 | "plpar-hcall (%s) failed; not authorized to this function\n", | ||
60 | tag); | ||
61 | else if (rc == H_Parameter) | ||
62 | printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n", | ||
63 | tag); | ||
64 | else | ||
65 | printk(KERN_INFO | ||
66 | "plpar-hcall (%s) failed with unexpected rc(0x%lx)\n", | ||
67 | tag, rc); | ||
68 | |||
69 | } | ||
70 | |||
71 | static struct proc_dir_entry *proc_ppc64_lparcfg; | 45 | static struct proc_dir_entry *proc_ppc64_lparcfg; |
72 | #define LPARCFG_BUFF_SIZE 4096 | 46 | #define LPARCFG_BUFF_SIZE 4096 |
73 | 47 | ||
@@ -172,6 +146,31 @@ static int lparcfg_data(struct seq_file *m, void *v) | |||
172 | /* | 146 | /* |
173 | * Methods used to fetch LPAR data when running on a pSeries platform. | 147 | * Methods used to fetch LPAR data when running on a pSeries platform. |
174 | */ | 148 | */ |
149 | /* find a better place for this function... */ | ||
150 | static void log_plpar_hcall_return(unsigned long rc, char *tag) | ||
151 | { | ||
152 | if (rc == 0) /* success, return */ | ||
153 | return; | ||
154 | /* check for null tag ? */ | ||
155 | if (rc == H_Hardware) | ||
156 | printk(KERN_INFO | ||
157 | "plpar-hcall (%s) failed with hardware fault\n", tag); | ||
158 | else if (rc == H_Function) | ||
159 | printk(KERN_INFO | ||
160 | "plpar-hcall (%s) failed; function not allowed\n", tag); | ||
161 | else if (rc == H_Authority) | ||
162 | printk(KERN_INFO | ||
163 | "plpar-hcall (%s) failed; not authorized to this function\n", | ||
164 | tag); | ||
165 | else if (rc == H_Parameter) | ||
166 | printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n", | ||
167 | tag); | ||
168 | else | ||
169 | printk(KERN_INFO | ||
170 | "plpar-hcall (%s) failed with unexpected rc(0x%lx)\n", | ||
171 | tag, rc); | ||
172 | |||
173 | } | ||
175 | 174 | ||
176 | /* | 175 | /* |
177 | * H_GET_PPP hcall returns info in 4 parms. | 176 | * H_GET_PPP hcall returns info in 4 parms. |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index c98cfcc9cd9a..e5694335bf10 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -57,10 +57,6 @@ extern void power4_idle(void); | |||
57 | boot_infos_t *boot_infos; | 57 | boot_infos_t *boot_infos; |
58 | struct ide_machdep_calls ppc_ide_md; | 58 | struct ide_machdep_calls ppc_ide_md; |
59 | 59 | ||
60 | /* XXX should go elsewhere */ | ||
61 | int __irq_offset_value; | ||
62 | EXPORT_SYMBOL(__irq_offset_value); | ||
63 | |||
64 | int boot_cpuid; | 60 | int boot_cpuid; |
65 | EXPORT_SYMBOL_GPL(boot_cpuid); | 61 | EXPORT_SYMBOL_GPL(boot_cpuid); |
66 | int boot_cpuid_phys; | 62 | int boot_cpuid_phys; |
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 01090e9ce0cf..a58daa153686 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -42,13 +42,6 @@ | |||
42 | #include "irq.h" | 42 | #include "irq.h" |
43 | #include "call_pci.h" | 43 | #include "call_pci.h" |
44 | 44 | ||
45 | /* This maps virtual irq numbers to real irqs */ | ||
46 | unsigned int virt_irq_to_real_map[NR_IRQS]; | ||
47 | |||
48 | /* The next available virtual irq number */ | ||
49 | /* Note: the pcnet32 driver assumes irq numbers < 2 aren't valid. :( */ | ||
50 | static int next_virtual_irq = 2; | ||
51 | |||
52 | static long Pci_Interrupt_Count; | 45 | static long Pci_Interrupt_Count; |
53 | static long Pci_Event_Count; | 46 | static long Pci_Event_Count; |
54 | 47 | ||
@@ -350,26 +343,14 @@ static hw_irq_controller iSeries_IRQ_handler = { | |||
350 | int __init iSeries_allocate_IRQ(HvBusNumber busNumber, | 343 | int __init iSeries_allocate_IRQ(HvBusNumber busNumber, |
351 | HvSubBusNumber subBusNumber, HvAgentId deviceId) | 344 | HvSubBusNumber subBusNumber, HvAgentId deviceId) |
352 | { | 345 | { |
353 | unsigned int realirq, virtirq; | 346 | int virtirq; |
347 | unsigned int realirq; | ||
354 | u8 idsel = (deviceId >> 4); | 348 | u8 idsel = (deviceId >> 4); |
355 | u8 function = deviceId & 7; | 349 | u8 function = deviceId & 7; |
356 | 350 | ||
357 | virtirq = next_virtual_irq++; | ||
358 | realirq = ((busNumber - 1) << 6) + ((idsel - 1) << 3) + function; | 351 | realirq = ((busNumber - 1) << 6) + ((idsel - 1) << 3) + function; |
359 | virt_irq_to_real_map[virtirq] = realirq; | 352 | virtirq = virt_irq_create_mapping(realirq); |
360 | 353 | ||
361 | irq_desc[virtirq].handler = &iSeries_IRQ_handler; | 354 | irq_desc[virtirq].handler = &iSeries_IRQ_handler; |
362 | return virtirq; | 355 | return virtirq; |
363 | } | 356 | } |
364 | |||
365 | int virt_irq_create_mapping(unsigned int real_irq) | ||
366 | { | ||
367 | BUG(); /* Don't call this on iSeries, yet */ | ||
368 | |||
369 | return 0; | ||
370 | } | ||
371 | |||
372 | void virt_irq_init(void) | ||
373 | { | ||
374 | return; | ||
375 | } | ||
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 6a29f301436b..da26639190db 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <asm/sections.h> | 39 | #include <asm/sections.h> |
40 | #include <asm/iommu.h> | 40 | #include <asm/iommu.h> |
41 | #include <asm/firmware.h> | 41 | #include <asm/firmware.h> |
42 | #include <asm/systemcfg.h> | ||
43 | #include <asm/system.h> | 42 | #include <asm/system.h> |
44 | #include <asm/time.h> | 43 | #include <asm/time.h> |
45 | #include <asm/paca.h> | 44 | #include <asm/paca.h> |
@@ -548,8 +547,6 @@ static unsigned long __init build_iSeries_Memory_Map(void) | |||
548 | */ | 547 | */ |
549 | static void __init iSeries_setup_arch(void) | 548 | static void __init iSeries_setup_arch(void) |
550 | { | 549 | { |
551 | unsigned procIx = get_paca()->lppaca.dyn_hv_phys_proc_index; | ||
552 | |||
553 | if (get_paca()->lppaca.shared_proc) { | 550 | if (get_paca()->lppaca.shared_proc) { |
554 | ppc_md.idle_loop = iseries_shared_idle; | 551 | ppc_md.idle_loop = iseries_shared_idle; |
555 | printk(KERN_INFO "Using shared processor idle loop\n"); | 552 | printk(KERN_INFO "Using shared processor idle loop\n"); |
@@ -565,9 +562,6 @@ static void __init iSeries_setup_arch(void) | |||
565 | itVpdAreas.xSlicMaxLogicalProcs); | 562 | itVpdAreas.xSlicMaxLogicalProcs); |
566 | printk("Max physical processors = %d\n", | 563 | printk("Max physical processors = %d\n", |
567 | itVpdAreas.xSlicMaxPhysicalProcs); | 564 | itVpdAreas.xSlicMaxPhysicalProcs); |
568 | |||
569 | _systemcfg->processor = xIoHriProcessorVpd[procIx].xPVR; | ||
570 | printk("Processor version = %x\n", _systemcfg->processor); | ||
571 | } | 565 | } |
572 | 566 | ||
573 | static void iSeries_show_cpuinfo(struct seq_file *m) | 567 | static void iSeries_show_cpuinfo(struct seq_file *m) |