diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/iomap.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/irq.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 25 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 45 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_parse.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/udbg.c | 2 |
9 files changed, 87 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 8cdd48ea4391..1448af92c6a9 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -809,8 +809,9 @@ system_reset_iSeries: | |||
809 | mtmsrd r24 /* RI on */ | 809 | mtmsrd r24 /* RI on */ |
810 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ | 810 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ |
811 | cmpwi 0,r24,0 /* Are we processor 0? */ | 811 | cmpwi 0,r24,0 /* Are we processor 0? */ |
812 | beq .__start_initialization_iSeries /* Start up the first processor */ | 812 | bne 1f |
813 | mfspr r4,SPRN_CTRLF | 813 | b .__start_initialization_iSeries /* Start up the first processor */ |
814 | 1: mfspr r4,SPRN_CTRLF | ||
814 | li r5,CTRL_RUNLATCH /* Turn off the run light */ | 815 | li r5,CTRL_RUNLATCH /* Turn off the run light */ |
815 | andc r4,r4,r5 | 816 | andc r4,r4,r5 |
816 | mtspr SPRN_CTRLT,r4 | 817 | mtspr SPRN_CTRLT,r4 |
@@ -1611,7 +1612,7 @@ _GLOBAL(generic_secondary_smp_init) | |||
1611 | #endif | 1612 | #endif |
1612 | 1613 | ||
1613 | #ifdef CONFIG_PPC_ISERIES | 1614 | #ifdef CONFIG_PPC_ISERIES |
1614 | _STATIC(__start_initialization_iSeries) | 1615 | _INIT_STATIC(__start_initialization_iSeries) |
1615 | /* Clear out the BSS */ | 1616 | /* Clear out the BSS */ |
1616 | LOAD_REG_IMMEDIATE(r11,__bss_stop) | 1617 | LOAD_REG_IMMEDIATE(r11,__bss_stop) |
1617 | LOAD_REG_IMMEDIATE(r8,__bss_start) | 1618 | LOAD_REG_IMMEDIATE(r8,__bss_start) |
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 601ef79a5916..2a5cf8680370 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/pci.h> | 7 | #include <linux/pci.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
10 | #include <asm/pci-bridge.h> | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * Here comes the ppc64 implementation of the IOMAP | 13 | * Here comes the ppc64 implementation of the IOMAP |
@@ -136,7 +137,12 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | |||
136 | 137 | ||
137 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | 138 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) |
138 | { | 139 | { |
139 | /* Nothing to do */ | 140 | if (isa_vaddr_is_ioport(addr)) |
141 | return; | ||
142 | if (pcibios_vaddr_is_ioport(addr)) | ||
143 | return; | ||
144 | iounmap(addr); | ||
140 | } | 145 | } |
146 | |||
141 | EXPORT_SYMBOL(pci_iomap); | 147 | EXPORT_SYMBOL(pci_iomap); |
142 | EXPORT_SYMBOL(pci_iounmap); | 148 | EXPORT_SYMBOL(pci_iounmap); |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 2fc87862146c..24bea97c736c 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -418,10 +418,10 @@ irq_hw_number_t virq_to_hw(unsigned int virq) | |||
418 | } | 418 | } |
419 | EXPORT_SYMBOL_GPL(virq_to_hw); | 419 | EXPORT_SYMBOL_GPL(virq_to_hw); |
420 | 420 | ||
421 | struct irq_host *irq_alloc_host(unsigned int revmap_type, | 421 | __init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type, |
422 | unsigned int revmap_arg, | 422 | unsigned int revmap_arg, |
423 | struct irq_host_ops *ops, | 423 | struct irq_host_ops *ops, |
424 | irq_hw_number_t inval_irq) | 424 | irq_hw_number_t inval_irq) |
425 | { | 425 | { |
426 | struct irq_host *host; | 426 | struct irq_host *host; |
427 | unsigned int size = sizeof(struct irq_host); | 427 | unsigned int size = sizeof(struct irq_host); |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index fe7d1255e11e..083cfbdbe0b2 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -65,7 +65,7 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose) | |||
65 | spin_unlock(&hose_spinlock); | 65 | spin_unlock(&hose_spinlock); |
66 | } | 66 | } |
67 | 67 | ||
68 | struct pci_controller * pcibios_alloc_controller(struct device_node *dev) | 68 | __init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev) |
69 | { | 69 | { |
70 | struct pci_controller *phb; | 70 | struct pci_controller *phb; |
71 | 71 | ||
@@ -101,6 +101,29 @@ void pcibios_free_controller(struct pci_controller *phb) | |||
101 | kfree(phb); | 101 | kfree(phb); |
102 | } | 102 | } |
103 | 103 | ||
104 | int pcibios_vaddr_is_ioport(void __iomem *address) | ||
105 | { | ||
106 | int ret = 0; | ||
107 | struct pci_controller *hose; | ||
108 | unsigned long size; | ||
109 | |||
110 | spin_lock(&hose_spinlock); | ||
111 | list_for_each_entry(hose, &hose_list, list_node) { | ||
112 | #ifdef CONFIG_PPC64 | ||
113 | size = hose->pci_io_size; | ||
114 | #else | ||
115 | size = hose->io_resource.end - hose->io_resource.start + 1; | ||
116 | #endif | ||
117 | if (address >= hose->io_base_virt && | ||
118 | address < (hose->io_base_virt + size)) { | ||
119 | ret = 1; | ||
120 | break; | ||
121 | } | ||
122 | } | ||
123 | spin_unlock(&hose_spinlock); | ||
124 | return ret; | ||
125 | } | ||
126 | |||
104 | /* | 127 | /* |
105 | * Return the domain number for this bus. | 128 | * Return the domain number for this bus. |
106 | */ | 129 | */ |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 0adf077f3f3a..cd35c969bb28 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -60,6 +60,24 @@ LIST_HEAD(hose_list); | |||
60 | static int pci_bus_count; | 60 | static int pci_bus_count; |
61 | 61 | ||
62 | static void | 62 | static void |
63 | fixup_hide_host_resource_fsl(struct pci_dev* dev) | ||
64 | { | ||
65 | int i, class = dev->class >> 8; | ||
66 | |||
67 | if ((class == PCI_CLASS_PROCESSOR_POWERPC) && | ||
68 | (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) && | ||
69 | (dev->bus->parent == NULL)) { | ||
70 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
71 | dev->resource[i].start = 0; | ||
72 | dev->resource[i].end = 0; | ||
73 | dev->resource[i].flags = 0; | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl); | ||
78 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl); | ||
79 | |||
80 | static void | ||
63 | fixup_broken_pcnet32(struct pci_dev* dev) | 81 | fixup_broken_pcnet32(struct pci_dev* dev) |
64 | { | 82 | { |
65 | if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { | 83 | if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { |
@@ -415,15 +433,13 @@ probe_resource(struct pci_bus *parent, struct resource *pr, | |||
415 | return 0; | 433 | return 0; |
416 | } | 434 | } |
417 | 435 | ||
418 | static void __init | 436 | void __init |
419 | update_bridge_base(struct pci_bus *bus, int i) | 437 | update_bridge_resource(struct pci_dev *dev, struct resource *res) |
420 | { | 438 | { |
421 | struct resource *res = bus->resource[i]; | ||
422 | u8 io_base_lo, io_limit_lo; | 439 | u8 io_base_lo, io_limit_lo; |
423 | u16 mem_base, mem_limit; | 440 | u16 mem_base, mem_limit; |
424 | u16 cmd; | 441 | u16 cmd; |
425 | unsigned long start, end, off; | 442 | unsigned long start, end, off; |
426 | struct pci_dev *dev = bus->self; | ||
427 | struct pci_controller *hose = dev->sysdata; | 443 | struct pci_controller *hose = dev->sysdata; |
428 | 444 | ||
429 | if (!hose) { | 445 | if (!hose) { |
@@ -467,12 +483,20 @@ update_bridge_base(struct pci_bus *bus, int i) | |||
467 | pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, mem_limit); | 483 | pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, mem_limit); |
468 | 484 | ||
469 | } else { | 485 | } else { |
470 | DBG(KERN_ERR "PCI: ugh, bridge %s res %d has flags=%lx\n", | 486 | DBG(KERN_ERR "PCI: ugh, bridge %s res has flags=%lx\n", |
471 | pci_name(dev), i, res->flags); | 487 | pci_name(dev), res->flags); |
472 | } | 488 | } |
473 | pci_write_config_word(dev, PCI_COMMAND, cmd); | 489 | pci_write_config_word(dev, PCI_COMMAND, cmd); |
474 | } | 490 | } |
475 | 491 | ||
492 | static void __init | ||
493 | update_bridge_base(struct pci_bus *bus, int i) | ||
494 | { | ||
495 | struct resource *res = bus->resource[i]; | ||
496 | struct pci_dev *dev = bus->self; | ||
497 | update_bridge_resource(dev, res); | ||
498 | } | ||
499 | |||
476 | static inline void alloc_resource(struct pci_dev *dev, int idx) | 500 | static inline void alloc_resource(struct pci_dev *dev, int idx) |
477 | { | 501 | { |
478 | struct resource *pr, *r = &dev->resource[idx]; | 502 | struct resource *pr, *r = &dev->resource[idx]; |
@@ -1223,7 +1247,7 @@ pcibios_init(void) | |||
1223 | 1247 | ||
1224 | subsys_initcall(pcibios_init); | 1248 | subsys_initcall(pcibios_init); |
1225 | 1249 | ||
1226 | void __init pcibios_fixup_bus(struct pci_bus *bus) | 1250 | void pcibios_fixup_bus(struct pci_bus *bus) |
1227 | { | 1251 | { |
1228 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; | 1252 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; |
1229 | unsigned long io_offset; | 1253 | unsigned long io_offset; |
@@ -1468,3 +1492,10 @@ EARLY_PCI_OP(read, dword, u32 *) | |||
1468 | EARLY_PCI_OP(write, byte, u8) | 1492 | EARLY_PCI_OP(write, byte, u8) |
1469 | EARLY_PCI_OP(write, word, u16) | 1493 | EARLY_PCI_OP(write, word, u16) |
1470 | EARLY_PCI_OP(write, dword, u32) | 1494 | EARLY_PCI_OP(write, dword, u32) |
1495 | |||
1496 | extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||
1497 | int early_find_capability(struct pci_controller *hose, int bus, int devfn, | ||
1498 | int cap) | ||
1499 | { | ||
1500 | return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap); | ||
1501 | } | ||
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 84f000a45e36..a83727b308a0 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -423,7 +423,11 @@ void show_regs(struct pt_regs * regs) | |||
423 | printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); | 423 | printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); |
424 | trap = TRAP(regs); | 424 | trap = TRAP(regs); |
425 | if (trap == 0x300 || trap == 0x600) | 425 | if (trap == 0x300 || trap == 0x600) |
426 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) | ||
427 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); | ||
428 | #else | ||
426 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); | 429 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); |
430 | #endif | ||
427 | printk("TASK = %p[%d] '%s' THREAD: %p", | 431 | printk("TASK = %p[%d] '%s' THREAD: %p", |
428 | current, current->pid, current->comm, task_thread_info(current)); | 432 | current, current->pid, current->comm, task_thread_info(current)); |
429 | 433 | ||
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 3786dcc8a7b6..b5c96af955c6 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -24,7 +24,7 @@ | |||
24 | /* Max address size we deal with */ | 24 | /* Max address size we deal with */ |
25 | #define OF_MAX_ADDR_CELLS 4 | 25 | #define OF_MAX_ADDR_CELLS 4 |
26 | #define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \ | 26 | #define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \ |
27 | (ns) >= 0) | 27 | (ns) > 0) |
28 | 28 | ||
29 | static struct of_bus *of_match_bus(struct device_node *np); | 29 | static struct of_bus *of_match_bus(struct device_node *np); |
30 | static int __of_address_to_resource(struct device_node *dev, | 30 | static int __of_address_to_resource(struct device_node *dev, |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 4924c48cb1ff..50ef38cffdbf 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -496,6 +496,10 @@ int check_legacy_ioport(unsigned long base_port) | |||
496 | break; | 496 | break; |
497 | } | 497 | } |
498 | np = of_find_node_by_type(NULL, "8042"); | 498 | np = of_find_node_by_type(NULL, "8042"); |
499 | /* Pegasos has no device_type on its 8042 node, look for the | ||
500 | * name instead */ | ||
501 | if (!np) | ||
502 | np = of_find_node_by_name(NULL, "8042"); | ||
499 | break; | 503 | break; |
500 | case FDC_BASE: /* FDC1 */ | 504 | case FDC_BASE: /* FDC1 */ |
501 | np = of_find_node_by_type(NULL, "fdc"); | 505 | np = of_find_node_by_type(NULL, "fdc"); |
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index cbca1df8bc60..0f9b4eadfbcb 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c | |||
@@ -155,7 +155,7 @@ static int early_console_initialized; | |||
155 | * Called by setup_system after ppc_md->probe and ppc_md->early_init. | 155 | * Called by setup_system after ppc_md->probe and ppc_md->early_init. |
156 | * Call it again after setting udbg_putc in ppc_md->setup_arch. | 156 | * Call it again after setting udbg_putc in ppc_md->setup_arch. |
157 | */ | 157 | */ |
158 | void register_early_udbg_console(void) | 158 | void __init register_early_udbg_console(void) |
159 | { | 159 | { |
160 | if (early_console_initialized) | 160 | if (early_console_initialized) |
161 | return; | 161 | return; |