aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-18 11:26:28 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-18 11:26:28 -0400
commit347b4599dd6ffef27e18c227532d1ec66556000b (patch)
treedf37f2645e7e13a4203368006ae8fcdf3b86ca78 /arch/powerpc/kernel
parent939e3428066962b7c5966d8f9648058e644f5395 (diff)
parentccd308f09a6636d86dbe62bab892b96711feee67 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (32 commits) [POWERPC] Remove build warnings in windfarm_core [POWERPC] Pass per-file CFLAGs for platform specific op codes [POWERPC] Correct #endif comment [POWERPC] Fix ppc_rtas_progress_show() [POWERPC] Fix sed command lines for zlib source construction [POWERPC] Specify GNUTARGET on $(AR) invocations [POWERPC] Make sure device node type/name is not NULL on hot-added nodes [POWERPC] Small fixes for the Ebony device tree [POWERPC] Fix warning on UP [POWERPC] cell_defconfig: Disable cpufreq and pmi [POWERPC] Fix IO space on PCI buses created from of_platform [POWERPC] Add spinlock to request_phb_iospace() [POWERPC] Fix make rules for treeImage.initrd [POWERPC] Remove warning in mpic.c [POWERPC] Update pasemi_defconfig [POWERPC] pasemi: CONFIG_GENERIC_TBSYNC no longer needed [POWERPC] Update iseries_defconfig [POWERPC] Wire up some more syscalls [POWERPC] Fix bug adding properties with flatdevtree.c's ft_set_prop() [POWERPC] Remove fixup_bigphys_addr() for arch/powerpc to avoid link error ...
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/cputable.c2
-rw-r--r--arch/powerpc/kernel/entry_32.S18
-rw-r--r--arch/powerpc/kernel/of_platform.c10
-rw-r--r--arch/powerpc/kernel/pci_64.c23
-rw-r--r--arch/powerpc/kernel/prom.c5
-rw-r--r--arch/powerpc/kernel/rtas-proc.c2
6 files changed, 50 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 9cb24d20f0f9..6ef87fb90b8e 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -836,7 +836,7 @@ static struct cpu_spec cpu_specs[] = {
836 .pvr_mask = 0xffff0000, 836 .pvr_mask = 0xffff0000,
837 .pvr_value = 0x80040000, 837 .pvr_value = 0x80040000,
838 .cpu_name = "7448", 838 .cpu_name = "7448",
839 .cpu_features = CPU_FTRS_7447A, 839 .cpu_features = CPU_FTRS_7448,
840 .cpu_user_features = COMMON_USER | 840 .cpu_user_features = COMMON_USER |
841 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, 841 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
842 .icache_bsize = 32, 842 .icache_bsize = 32,
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index c29d1652a421..4074c0b31453 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -596,7 +596,11 @@ fast_exception_return:
596 mr r12,r4 /* restart at exc_exit_restart */ 596 mr r12,r4 /* restart at exc_exit_restart */
597 b 2b 597 b 2b
598 598
599 .comm fee_restarts,4 599 .section .bss
600 .align 2
601fee_restarts:
602 .space 4
603 .previous
600 604
601/* aargh, a nonrecoverable interrupt, panic */ 605/* aargh, a nonrecoverable interrupt, panic */
602/* aargh, we don't know which trap this is */ 606/* aargh, we don't know which trap this is */
@@ -851,7 +855,11 @@ load_dbcr0:
851 mtspr SPRN_DBSR,r11 /* clear all pending debug events */ 855 mtspr SPRN_DBSR,r11 /* clear all pending debug events */
852 blr 856 blr
853 857
854 .comm global_dbcr0,8 858 .section .bss
859 .align 4
860global_dbcr0:
861 .space 8
862 .previous
855#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */ 863#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
856 864
857do_work: /* r10 contains MSR_KERNEL here */ 865do_work: /* r10 contains MSR_KERNEL here */
@@ -926,7 +934,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
926 /* shouldn't return */ 934 /* shouldn't return */
927 b 4b 935 b 4b
928 936
929 .comm ee_restarts,4 937 .section .bss
938 .align 2
939ee_restarts:
940 .space 4
941 .previous
930 942
931/* 943/*
932 * PROM code for specific machines follows. Put it 944 * PROM code for specific machines follows. Put it
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 84c34d979a88..d501c23e5159 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -427,11 +427,13 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
427 /* Process "ranges" property */ 427 /* Process "ranges" property */
428 pci_process_bridge_OF_ranges(phb, dev->node, 0); 428 pci_process_bridge_OF_ranges(phb, dev->node, 0);
429 429
430 /* Setup IO space. 430 /* Setup IO space. We use the non-dynamic version of that code here,
431 * This will not work properly for ISA IOs, something needs to be done 431 * which doesn't quite support unplugging. Next kernel release will
432 * about it if we ever generalize that way of probing PCI brigdes 432 * have a better fix for this.
433 * Note also that we don't do ISA, this will also be fixed with a
434 * more massive rework.
433 */ 435 */
434 pci_setup_phb_io_dynamic(phb, 0); 436 pci_setup_phb_io(phb, 0);
435 437
436 /* Init pci_dn data structures */ 438 /* Init pci_dn data structures */
437 pci_devs_phb_init_dynamic(phb); 439 pci_devs_phb_init_dynamic(phb);
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index b0409e19b1c1..249cca27a9b8 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -41,6 +41,7 @@
41 41
42unsigned long pci_probe_only = 1; 42unsigned long pci_probe_only = 1;
43int pci_assign_all_buses = 0; 43int pci_assign_all_buses = 0;
44static int pci_initial_scan_done;
44 45
45static void fixup_resource(struct resource *res, struct pci_dev *dev); 46static void fixup_resource(struct resource *res, struct pci_dev *dev);
46static void do_bus_setup(struct pci_bus *bus); 47static void do_bus_setup(struct pci_bus *bus);
@@ -604,6 +605,8 @@ static int __init pcibios_init(void)
604 /* map in PCI I/O space */ 605 /* map in PCI I/O space */
605 phbs_remap_io(); 606 phbs_remap_io();
606 607
608 pci_initial_scan_done = 1;
609
607 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n"); 610 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
608 611
609 return 0; 612 return 0;
@@ -1042,13 +1045,16 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
1042 } 1045 }
1043} 1046}
1044 1047
1045void __init pci_setup_phb_io(struct pci_controller *hose, int primary) 1048void __devinit pci_setup_phb_io(struct pci_controller *hose, int primary)
1046{ 1049{
1047 unsigned long size = hose->pci_io_size; 1050 unsigned long size = hose->pci_io_size;
1048 unsigned long io_virt_offset; 1051 unsigned long io_virt_offset;
1049 struct resource *res; 1052 struct resource *res;
1050 struct device_node *isa_dn; 1053 struct device_node *isa_dn;
1051 1054
1055 if (size == 0)
1056 return;
1057
1052 hose->io_base_virt = reserve_phb_iospace(size); 1058 hose->io_base_virt = reserve_phb_iospace(size);
1053 DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", 1059 DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n",
1054 hose->global_number, hose->io_base_phys, 1060 hose->global_number, hose->io_base_phys,
@@ -1069,6 +1075,15 @@ void __init pci_setup_phb_io(struct pci_controller *hose, int primary)
1069 res = &hose->io_resource; 1075 res = &hose->io_resource;
1070 res->start += io_virt_offset; 1076 res->start += io_virt_offset;
1071 res->end += io_virt_offset; 1077 res->end += io_virt_offset;
1078
1079 /* If this is called after the initial PCI scan, then we need to
1080 * proceed to IO mappings now
1081 */
1082 if (pci_initial_scan_done)
1083 __ioremap_explicit(hose->io_base_phys,
1084 (unsigned long)hose->io_base_virt,
1085 hose->pci_io_size,
1086 _PAGE_NO_CACHE | _PAGE_GUARDED);
1072} 1087}
1073 1088
1074void __devinit pci_setup_phb_io_dynamic(struct pci_controller *hose, 1089void __devinit pci_setup_phb_io_dynamic(struct pci_controller *hose,
@@ -1078,6 +1093,9 @@ void __devinit pci_setup_phb_io_dynamic(struct pci_controller *hose,
1078 unsigned long io_virt_offset; 1093 unsigned long io_virt_offset;
1079 struct resource *res; 1094 struct resource *res;
1080 1095
1096 if (size == 0)
1097 return;
1098
1081 hose->io_base_virt = __ioremap(hose->io_base_phys, size, 1099 hose->io_base_virt = __ioremap(hose->io_base_phys, size,
1082 _PAGE_NO_CACHE | _PAGE_GUARDED); 1100 _PAGE_NO_CACHE | _PAGE_GUARDED);
1083 DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", 1101 DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n",
@@ -1106,6 +1124,9 @@ static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys,
1106 /* Root Bus */ 1124 /* Root Bus */
1107 res = &hose->io_resource; 1125 res = &hose->io_resource;
1108 1126
1127 if (res->end == 0 && res->start == 0)
1128 return 1;
1129
1109 *start_virt = pci_io_base + res->start; 1130 *start_virt = pci_io_base + res->start;
1110 *start_phys = *start_virt + hose->io_base_phys 1131 *start_phys = *start_virt + hose->io_base_phys
1111 - (unsigned long) hose->io_base_virt; 1132 - (unsigned long) hose->io_base_virt;
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index c065b5550368..066a6a7a25b8 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1472,6 +1472,11 @@ static int of_finish_dynamic_node(struct device_node *node)
1472 node->name = of_get_property(node, "name", NULL); 1472 node->name = of_get_property(node, "name", NULL);
1473 node->type = of_get_property(node, "device_type", NULL); 1473 node->type = of_get_property(node, "device_type", NULL);
1474 1474
1475 if (!node->name)
1476 node->name = "<NULL>";
1477 if (!node->type)
1478 node->type = "<NULL>";
1479
1475 if (!parent) { 1480 if (!parent) {
1476 err = -ENODEV; 1481 err = -ENODEV;
1477 goto out; 1482 goto out;
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 190b7ed1dbfb..f2e3bc714d76 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -379,7 +379,7 @@ static ssize_t ppc_rtas_progress_write(struct file *file,
379/* ****************************************************************** */ 379/* ****************************************************************** */
380static int ppc_rtas_progress_show(struct seq_file *m, void *v) 380static int ppc_rtas_progress_show(struct seq_file *m, void *v)
381{ 381{
382 if (progress_led) 382 if (progress_led[0])
383 seq_printf(m, "%s\n", progress_led); 383 seq_printf(m, "%s\n", progress_led);
384 return 0; 384 return 0;
385} 385}