diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/crash.c | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/iomap.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 40 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 10 |
4 files changed, 24 insertions, 41 deletions
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 778f22fd85d2..dbcb85994f46 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/elf.h> | 22 | #include <linux/elf.h> |
23 | #include <linux/elfcore.h> | 23 | #include <linux/elfcore.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/irq.h> | ||
25 | #include <linux/types.h> | 26 | #include <linux/types.h> |
26 | 27 | ||
27 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
@@ -174,6 +175,8 @@ static void crash_kexec_prepare_cpus(void) | |||
174 | 175 | ||
175 | void default_machine_crash_shutdown(struct pt_regs *regs) | 176 | void default_machine_crash_shutdown(struct pt_regs *regs) |
176 | { | 177 | { |
178 | unsigned int irq; | ||
179 | |||
177 | /* | 180 | /* |
178 | * This function is only called after the system | 181 | * This function is only called after the system |
179 | * has paniced or is otherwise in a critical state. | 182 | * has paniced or is otherwise in a critical state. |
@@ -186,6 +189,16 @@ void default_machine_crash_shutdown(struct pt_regs *regs) | |||
186 | */ | 189 | */ |
187 | local_irq_disable(); | 190 | local_irq_disable(); |
188 | 191 | ||
192 | for_each_irq(irq) { | ||
193 | struct irq_desc *desc = irq_descp(irq); | ||
194 | |||
195 | if (desc->status & IRQ_INPROGRESS) | ||
196 | desc->handler->end(irq); | ||
197 | |||
198 | if (!(desc->status & IRQ_DISABLED)) | ||
199 | desc->handler->disable(irq); | ||
200 | } | ||
201 | |||
189 | if (ppc_md.kexec_cpu_down) | 202 | if (ppc_md.kexec_cpu_down) |
190 | ppc_md.kexec_cpu_down(1, 0); | 203 | ppc_md.kexec_cpu_down(1, 0); |
191 | 204 | ||
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index fd8214caedee..a13a93dfc655 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -106,8 +106,6 @@ EXPORT_SYMBOL(iowrite32_rep); | |||
106 | 106 | ||
107 | void __iomem *ioport_map(unsigned long port, unsigned int len) | 107 | void __iomem *ioport_map(unsigned long port, unsigned int len) |
108 | { | 108 | { |
109 | if (!_IO_IS_VALID(port)) | ||
110 | return NULL; | ||
111 | return (void __iomem *) (port+pci_io_base); | 109 | return (void __iomem *) (port+pci_io_base); |
112 | } | 110 | } |
113 | 111 | ||
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 4c4449be81ce..e1b3b3ef1912 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -42,14 +42,6 @@ | |||
42 | unsigned long pci_probe_only = 1; | 42 | unsigned long pci_probe_only = 1; |
43 | int pci_assign_all_buses = 0; | 43 | int pci_assign_all_buses = 0; |
44 | 44 | ||
45 | /* | ||
46 | * legal IO pages under MAX_ISA_PORT. This is to ensure we don't touch | ||
47 | * devices we don't have access to. | ||
48 | */ | ||
49 | unsigned long io_page_mask; | ||
50 | |||
51 | EXPORT_SYMBOL(io_page_mask); | ||
52 | |||
53 | #ifdef CONFIG_PPC_MULTIPLATFORM | 45 | #ifdef CONFIG_PPC_MULTIPLATFORM |
54 | static void fixup_resource(struct resource *res, struct pci_dev *dev); | 46 | static void fixup_resource(struct resource *res, struct pci_dev *dev); |
55 | static void do_bus_setup(struct pci_bus *bus); | 47 | static void do_bus_setup(struct pci_bus *bus); |
@@ -605,7 +597,7 @@ static int __init pcibios_init(void) | |||
605 | iSeries_pcibios_init(); | 597 | iSeries_pcibios_init(); |
606 | #endif | 598 | #endif |
607 | 599 | ||
608 | printk("PCI: Probing PCI hardware\n"); | 600 | printk(KERN_DEBUG "PCI: Probing PCI hardware\n"); |
609 | 601 | ||
610 | /* Scan all of the recorded PCI controllers. */ | 602 | /* Scan all of the recorded PCI controllers. */ |
611 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { | 603 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { |
@@ -630,14 +622,14 @@ static int __init pcibios_init(void) | |||
630 | /* Cache the location of the ISA bridge (if we have one) */ | 622 | /* Cache the location of the ISA bridge (if we have one) */ |
631 | ppc64_isabridge_dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL); | 623 | ppc64_isabridge_dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL); |
632 | if (ppc64_isabridge_dev != NULL) | 624 | if (ppc64_isabridge_dev != NULL) |
633 | printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev)); | 625 | printk(KERN_DEBUG "ISA bridge at %s\n", pci_name(ppc64_isabridge_dev)); |
634 | 626 | ||
635 | #ifdef CONFIG_PPC_MULTIPLATFORM | 627 | #ifdef CONFIG_PPC_MULTIPLATFORM |
636 | /* map in PCI I/O space */ | 628 | /* map in PCI I/O space */ |
637 | phbs_remap_io(); | 629 | phbs_remap_io(); |
638 | #endif | 630 | #endif |
639 | 631 | ||
640 | printk("PCI: Probing PCI hardware done\n"); | 632 | printk(KERN_DEBUG "PCI: Probing PCI hardware done\n"); |
641 | 633 | ||
642 | return 0; | 634 | return 0; |
643 | } | 635 | } |
@@ -804,7 +796,7 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, | |||
804 | else | 796 | else |
805 | prot |= _PAGE_GUARDED; | 797 | prot |= _PAGE_GUARDED; |
806 | 798 | ||
807 | printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, | 799 | printk(KERN_DEBUG "PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, |
808 | prot); | 800 | prot); |
809 | 801 | ||
810 | return __pgprot(prot); | 802 | return __pgprot(prot); |
@@ -1104,8 +1096,6 @@ void __init pci_setup_phb_io(struct pci_controller *hose, int primary) | |||
1104 | pci_process_ISA_OF_ranges(isa_dn, hose->io_base_phys, | 1096 | pci_process_ISA_OF_ranges(isa_dn, hose->io_base_phys, |
1105 | hose->io_base_virt); | 1097 | hose->io_base_virt); |
1106 | of_node_put(isa_dn); | 1098 | of_node_put(isa_dn); |
1107 | /* Allow all IO */ | ||
1108 | io_page_mask = -1; | ||
1109 | } | 1099 | } |
1110 | } | 1100 | } |
1111 | 1101 | ||
@@ -1212,7 +1202,7 @@ int remap_bus_range(struct pci_bus *bus) | |||
1212 | return 1; | 1202 | return 1; |
1213 | if (start_phys == 0) | 1203 | if (start_phys == 0) |
1214 | return 1; | 1204 | return 1; |
1215 | printk("mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); | 1205 | printk(KERN_DEBUG "mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); |
1216 | if (__ioremap_explicit(start_phys, start_virt, size, | 1206 | if (__ioremap_explicit(start_phys, start_virt, size, |
1217 | _PAGE_NO_CACHE | _PAGE_GUARDED)) | 1207 | _PAGE_NO_CACHE | _PAGE_GUARDED)) |
1218 | return 1; | 1208 | return 1; |
@@ -1232,27 +1222,13 @@ static void phbs_remap_io(void) | |||
1232 | static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev) | 1222 | static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev) |
1233 | { | 1223 | { |
1234 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 1224 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
1235 | unsigned long start, end, mask, offset; | 1225 | unsigned long offset; |
1236 | 1226 | ||
1237 | if (res->flags & IORESOURCE_IO) { | 1227 | if (res->flags & IORESOURCE_IO) { |
1238 | offset = (unsigned long)hose->io_base_virt - pci_io_base; | 1228 | offset = (unsigned long)hose->io_base_virt - pci_io_base; |
1239 | 1229 | ||
1240 | start = res->start += offset; | 1230 | res->start += offset; |
1241 | end = res->end += offset; | 1231 | res->end += offset; |
1242 | |||
1243 | /* Need to allow IO access to pages that are in the | ||
1244 | ISA range */ | ||
1245 | if (start < MAX_ISA_PORT) { | ||
1246 | if (end > MAX_ISA_PORT) | ||
1247 | end = MAX_ISA_PORT; | ||
1248 | |||
1249 | start >>= PAGE_SHIFT; | ||
1250 | end >>= PAGE_SHIFT; | ||
1251 | |||
1252 | /* get the range of pages for the map */ | ||
1253 | mask = ((1 << (end+1)) - 1) ^ ((1 << start) - 1); | ||
1254 | io_page_mask |= mask; | ||
1255 | } | ||
1256 | } else if (res->flags & IORESOURCE_MEM) { | 1232 | } else if (res->flags & IORESOURCE_MEM) { |
1257 | res->start += hose->pci_mem_offset; | 1233 | res->start += hose->pci_mem_offset; |
1258 | res->end += hose->pci_mem_offset; | 1234 | res->end += hose->pci_mem_offset; |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 24e3ad756de0..528e7f84cb67 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -76,7 +76,6 @@ | |||
76 | 76 | ||
77 | /* keep track of when we need to update the rtc */ | 77 | /* keep track of when we need to update the rtc */ |
78 | time_t last_rtc_update; | 78 | time_t last_rtc_update; |
79 | extern int piranha_simulator; | ||
80 | #ifdef CONFIG_PPC_ISERIES | 79 | #ifdef CONFIG_PPC_ISERIES |
81 | unsigned long iSeries_recal_titan = 0; | 80 | unsigned long iSeries_recal_titan = 0; |
82 | unsigned long iSeries_recal_tb = 0; | 81 | unsigned long iSeries_recal_tb = 0; |
@@ -945,9 +944,9 @@ void __init time_init(void) | |||
945 | } else { | 944 | } else { |
946 | /* Normal PowerPC with timebase register */ | 945 | /* Normal PowerPC with timebase register */ |
947 | ppc_md.calibrate_decr(); | 946 | ppc_md.calibrate_decr(); |
948 | printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", | 947 | printk(KERN_DEBUG "time_init: decrementer frequency = %lu.%.6lu MHz\n", |
949 | ppc_tb_freq / 1000000, ppc_tb_freq % 1000000); | 948 | ppc_tb_freq / 1000000, ppc_tb_freq % 1000000); |
950 | printk(KERN_INFO "time_init: processor frequency = %lu.%.6lu MHz\n", | 949 | printk(KERN_DEBUG "time_init: processor frequency = %lu.%.6lu MHz\n", |
951 | ppc_proc_freq / 1000000, ppc_proc_freq % 1000000); | 950 | ppc_proc_freq / 1000000, ppc_proc_freq % 1000000); |
952 | tb_last_stamp = tb_last_jiffy = get_tb(); | 951 | tb_last_stamp = tb_last_jiffy = get_tb(); |
953 | } | 952 | } |
@@ -1010,10 +1009,7 @@ void __init time_init(void) | |||
1010 | tb_to_ns_scale = scale; | 1009 | tb_to_ns_scale = scale; |
1011 | tb_to_ns_shift = shift; | 1010 | tb_to_ns_shift = shift; |
1012 | 1011 | ||
1013 | #ifdef CONFIG_PPC_ISERIES | 1012 | tm = get_boot_time(); |
1014 | if (!piranha_simulator) | ||
1015 | #endif | ||
1016 | tm = get_boot_time(); | ||
1017 | 1013 | ||
1018 | write_seqlock_irqsave(&xtime_lock, flags); | 1014 | write_seqlock_irqsave(&xtime_lock, flags); |
1019 | 1015 | ||