History

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

Linus Torvalds committed 14 years ago

Commit 06ca7c42 parents 7bcd5b4 9a45a946 files · +42 −31Browse files

Unified · Split

6 files
  1. arch/powerpc/configs/ppc64_defconfig +0 −5
  2. arch/powerpc/kernel/exceptions-64s.S +1 −1
  3. arch/powerpc/kernel/perf_event.c +7 −1
  4. arch/powerpc/kernel/process.c +3 −3
  5. arch/powerpc/sysdev/fsl_pci.c +29 −19
  6. drivers/macintosh/adb.c +2 −2
arch/powerpc/configs/ppc64_defconfig+0−5
@@ -24,10 +24,6 @@ CONFIG_PPC_SPLPAR=y · 23 unmodified lines
2424 CONFIG_SCANLOG=m
2525 CONFIG_PPC_SMLPAR=y
2626 CONFIG_DTL=y
27−CONFIG_PPC_ISERIES=y
28−CONFIG_VIODASD=y
29−CONFIG_VIOCD=m
30−CONFIG_VIOTAPE=m
3127 CONFIG_PPC_MAPLE=y
3228 CONFIG_PPC_PASEMI=y
3329 CONFIG_PPC_PASEMI_IOMMU=y
@@ -259,7 +255,6 @@ CONFIG_PASEMI_MAC=y · 225 unmodified lines
259255 CONFIG_MLX4_EN=m
260256 CONFIG_QLGE=m
261257 CONFIG_BE2NET=m
262−CONFIG_ISERIES_VETH=m
263258 CONFIG_PPP=m
264259 CONFIG_PPP_ASYNC=m
265260 CONFIG_PPP_SYNC_TTY=m
arch/powerpc/kernel/exceptions-64s.S+1−1
@@ -775,7 +775,7 @@ program_check_common: · 774 unmodified lines
775775 EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
776776 bl .save_nvgprs
777777 addi r3,r1,STACK_FRAME_OVERHEAD
778− ENABLE_INTS
778+ DISABLE_INTS
779779 bl .program_check_exception
780780 b .ret_from_except
781781
arch/powerpc/kernel/perf_event.c+7−1
@@ -865,6 +865,7 @@ static void power_pmu_start(struct perf_event *event, int ef_flags) · 864 unmodified lines
865865 {
866866 unsigned long flags;
867867 s64 left;
868+ unsigned long val;
868869
869870 if (!event->hw.idx || !event->hw.sample_period)
870871 return;
@@ -880,7 +881,12 @@ static void power_pmu_start(struct perf_event *event, int ef_flags) · 9 unmodified lines
880881
881882 event->hw.state = 0;
882883 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);
884890
885891 perf_event_update_userpage(event);
886892 perf_pmu_enable(event->pmu);
arch/powerpc/kernel/process.c+3−3
@@ -566,12 +566,12 @@ static void show_instructions(struct pt_regs *regs) · 565 unmodified lines
566566 */
567567 if (!__kernel_text_address(pc) ||
568568 __get_user(instr, (unsigned int __user *)pc)) {
569− printk("XXXXXXXX ");
569+ printk(KERN_CONT "XXXXXXXX ");
570570 } else {
571571 if (regs->nip == pc)
572− printk("<%08x> ", instr);
572+ printk(KERN_CONT "<%08x> ", instr);
573573 else
574− printk("%08x ", instr);
574+ printk(KERN_CONT "%08x ", instr);
575575 }
576576
577577 pc += sizeof(int);
arch/powerpc/sysdev/fsl_pci.c+29−19
@@ -385,26 +385,36 @@ static void __init setup_pci_cmd(struct pci_controller *hose) · 384 unmodified lines
385385 void fsl_pcibios_fixup_bus(struct pci_bus *bus)
386386 {
387387 struct pci_controller *hose = pci_bus_to_host(bus);
388− int i;
389−
390− if ((bus->parent == hose->bus) &&
391− ((fsl_pcie_bus_fixup &&
392− early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) ||
393− (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)))
394− {
395− for (i = 0; i < 4; ++i) {
388+ int i, is_pcie = 0, no_link;
389+
390+ /* The root complex bridge comes up with bogus resources,
391+ * we copy the PHB ones in.
392+ *
393+ * With the current generic PCI code, the PHB bus no longer
394+ * has bus->resource[0..4] set, so things are a bit more
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) {
396404 struct resource *res = bus->resource[i];
397− struct resource *par = bus->parent->resource[i];
398− if (res) {
399− res->start = 0;
400− res->end = 0;
401− res->flags = 0;
402− }
403− if (res && par) {
404− res->start = par->start;
405− res->end = par->end;
406− res->flags = par->flags;
407− }
405+ struct resource *par;
406+
407+ if (!res)
408+ continue;
409+ if (i == 0)
410+ par = &hose->io_resource;
411+ else if (i < 4)
412+ par = &hose->mem_resources[i-1];
413+ else par = NULL;
414+
415+ res->start = par ? par->start : 0;
416+ res->end = par ? par->end : 0;
417+ res->flags = par ? par->flags : 0;
408418 }
409419 }
410420 }
drivers/macintosh/adb.c+2−2
@@ -710,7 +710,7 @@ static ssize_t adb_read(struct file *file, char __user *buf, · 709 unmodified lines
710710 req = NULL;
711711 spin_lock_irqsave(&state->lock, flags);
712712 add_wait_queue(&state->wait_queue, &wait);
713− current->state = TASK_INTERRUPTIBLE;
713+ set_current_state(TASK_INTERRUPTIBLE);
714714
715715 for (;;) {
716716 req = state->completed;
@@ -734,7 +734,7 @@ static ssize_t adb_read(struct file *file, char __user *buf, · 17 unmodified lines
734734 spin_lock_irqsave(&state->lock, flags);
735735 }
736736
737− current->state = TASK_RUNNING;
737+ set_current_state(TASK_RUNNING);
738738 remove_wait_queue(&state->wait_queue, &wait);
739739 spin_unlock_irqrestore(&state->lock, flags);
740740