aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-02-18 18:26:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-02-18 18:26:37 -0500
commit06ca7c4376b779e6cb11527abc4f609ddca35b58 (patch)
tree3762945d93d82c1489d1ef254941d2af0c5fdc57
parent7bcd5b4671c3aa9185a7e6f76ee12e392070ddea (diff)
parent9a45a9407c69d068500923480884661e2b9cc421 (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Here are a few more fixes for powerpc. Some are regressions, the rest is simple/obvious/nasty enough that I deemed it good to go now. Here's also step one of deprecating legacy iSeries support: we are removing it from the main defconfig. Nobody seems to be using it anymore and the code is nasty to maintain, (involves horrible hacks in various low level areas of the kernel) so we plan to actually rip it out at some point. For now let's just avoid building it by default. Stephen will proceed to do the actual removal later (probably 3.4 or 3.5). * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/perf: power_pmu_start restores incorrect values, breaking frequency events powerpc/adb: Use set_current_state() powerpc: Disable interrupts early in Program Check powerpc: Remove legacy iSeries from ppc64_defconfig powerpc/fsl/pci: Fix PCIe fixup regression powerpc: Fix kernel log of oops/panic instruction dump
-rw-r--r--arch/powerpc/configs/ppc64_defconfig5
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S2
-rw-r--r--arch/powerpc/kernel/perf_event.c8
-rw-r--r--arch/powerpc/kernel/process.c6
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c48
-rw-r--r--drivers/macintosh/adb.c4
6 files changed, 42 insertions, 31 deletions
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 2156e077859b..1acf65026773 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -24,10 +24,6 @@ CONFIG_PPC_SPLPAR=y
24CONFIG_SCANLOG=m 24CONFIG_SCANLOG=m
25CONFIG_PPC_SMLPAR=y 25CONFIG_PPC_SMLPAR=y
26CONFIG_DTL=y 26CONFIG_DTL=y
27CONFIG_PPC_ISERIES=y
28CONFIG_VIODASD=y
29CONFIG_VIOCD=m
30CONFIG_VIOTAPE=m
31CONFIG_PPC_MAPLE=y 27CONFIG_PPC_MAPLE=y
32CONFIG_PPC_PASEMI=y 28CONFIG_PPC_PASEMI=y
33CONFIG_PPC_PASEMI_IOMMU=y 29CONFIG_PPC_PASEMI_IOMMU=y
@@ -259,7 +255,6 @@ CONFIG_PASEMI_MAC=y
259CONFIG_MLX4_EN=m 255CONFIG_MLX4_EN=m
260CONFIG_QLGE=m 256CONFIG_QLGE=m
261CONFIG_BE2NET=m 257CONFIG_BE2NET=m
262CONFIG_ISERIES_VETH=m
263CONFIG_PPP=m 258CONFIG_PPP=m
264CONFIG_PPP_ASYNC=m 259CONFIG_PPP_ASYNC=m
265CONFIG_PPP_SYNC_TTY=m 260CONFIG_PPP_SYNC_TTY=m
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index d4be7bb3dbdf..3844ca7c5099 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -775,7 +775,7 @@ program_check_common:
775 EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN) 775 EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
776 bl .save_nvgprs 776 bl .save_nvgprs
777 addi r3,r1,STACK_FRAME_OVERHEAD 777 addi r3,r1,STACK_FRAME_OVERHEAD
778 ENABLE_INTS 778 DISABLE_INTS
779 bl .program_check_exception 779 bl .program_check_exception
780 b .ret_from_except 780 b .ret_from_except
781 781
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c
index 10a140f82cb8..64483fde95c6 100644
--- a/arch/powerpc/kernel/perf_event.c
+++ b/arch/powerpc/kernel/perf_event.c
@@ -865,6 +865,7 @@ static void power_pmu_start(struct perf_event *event, int ef_flags)
865{ 865{
866 unsigned long flags; 866 unsigned long flags;
867 s64 left; 867 s64 left;
868 unsigned long val;
868 869
869 if (!event->hw.idx || !event->hw.sample_period) 870 if (!event->hw.idx || !event->hw.sample_period)
870 return; 871 return;
@@ -880,7 +881,12 @@ static void power_pmu_start(struct perf_event *event, int ef_flags)
880 881
881 event->hw.state = 0; 882 event->hw.state = 0;
882 left = local64_read(&event->hw.period_left); 883 left = local64_read(&event->hw.period_left);
883 write_pmc(event->hw.idx, left); 884
885 val = 0;
886 if (left < 0x80000000L)
887 val = 0x80000000L - left;
888
889 write_pmc(event->hw.idx, val);
884 890
885 perf_event_update_userpage(event); 891 perf_event_update_userpage(event);
886 perf_pmu_enable(event->pmu); 892 perf_pmu_enable(event->pmu);
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index ebe5766781aa..d817ab018486 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -566,12 +566,12 @@ static void show_instructions(struct pt_regs *regs)
566 */ 566 */
567 if (!__kernel_text_address(pc) || 567 if (!__kernel_text_address(pc) ||
568 __get_user(instr, (unsigned int __user *)pc)) { 568 __get_user(instr, (unsigned int __user *)pc)) {
569 printk("XXXXXXXX "); 569 printk(KERN_CONT "XXXXXXXX ");
570 } else { 570 } else {
571 if (regs->nip == pc) 571 if (regs->nip == pc)
572 printk("<%08x> ", instr); 572 printk(KERN_CONT "<%08x> ", instr);
573 else 573 else
574 printk("%08x ", instr); 574 printk(KERN_CONT "%08x ", instr);
575 } 575 }
576 576
577 pc += sizeof(int); 577 pc += sizeof(int);
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 30eb17ecad49..6073288fed29 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -385,26 +385,36 @@ static void __init setup_pci_cmd(struct pci_controller *hose)
385void fsl_pcibios_fixup_bus(struct pci_bus *bus) 385void fsl_pcibios_fixup_bus(struct pci_bus *bus)
386{ 386{
387 struct pci_controller *hose = pci_bus_to_host(bus); 387 struct pci_controller *hose = pci_bus_to_host(bus);
388 int i; 388 int i, is_pcie = 0, no_link;
389 389
390 if ((bus->parent == hose->bus) && 390 /* The root complex bridge comes up with bogus resources,
391 ((fsl_pcie_bus_fixup && 391 * we copy the PHB ones in.
392 early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) || 392 *
393 (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK))) 393 * With the current generic PCI code, the PHB bus no longer
394 { 394 * has bus->resource[0..4] set, so things are a bit more
395 for (i = 0; i < 4; ++i) { 395 * tricky.
396 */
397
398 if (fsl_pcie_bus_fixup)
399 is_pcie = early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP);
400 no_link = !!(hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK);
401
402 if (bus->parent == hose->bus && (is_pcie || no_link)) {
403 for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; ++i) {
396 struct resource *res = bus->resource[i]; 404 struct resource *res = bus->resource[i];
397 struct resource *par = bus->parent->resource[i]; 405 struct resource *par;
398 if (res) { 406
399 res->start = 0; 407 if (!res)
400 res->end = 0; 408 continue;
401 res->flags = 0; 409 if (i == 0)
402 } 410 par = &hose->io_resource;
403 if (res && par) { 411 else if (i < 4)
404 res->start = par->start; 412 par = &hose->mem_resources[i-1];
405 res->end = par->end; 413 else par = NULL;
406 res->flags = par->flags; 414
407 } 415 res->start = par ? par->start : 0;
416 res->end = par ? par->end : 0;
417 res->flags = par ? par->flags : 0;
408 } 418 }
409 } 419 }
410} 420}
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 75049e765191..b026896206ca 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -710,7 +710,7 @@ static ssize_t adb_read(struct file *file, char __user *buf,
710 req = NULL; 710 req = NULL;
711 spin_lock_irqsave(&state->lock, flags); 711 spin_lock_irqsave(&state->lock, flags);
712 add_wait_queue(&state->wait_queue, &wait); 712 add_wait_queue(&state->wait_queue, &wait);
713 current->state = TASK_INTERRUPTIBLE; 713 set_current_state(TASK_INTERRUPTIBLE);
714 714
715 for (;;) { 715 for (;;) {
716 req = state->completed; 716 req = state->completed;
@@ -734,7 +734,7 @@ static ssize_t adb_read(struct file *file, char __user *buf,
734 spin_lock_irqsave(&state->lock, flags); 734 spin_lock_irqsave(&state->lock, flags);
735 } 735 }
736 736
737 current->state = TASK_RUNNING; 737 set_current_state(TASK_RUNNING);
738 remove_wait_queue(&state->wait_queue, &wait); 738 remove_wait_queue(&state->wait_queue, &wait);
739 spin_unlock_irqrestore(&state->lock, flags); 739 spin_unlock_irqrestore(&state->lock, flags);
740 740