Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 May 2010 18:17:05 +0000 (11:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 May 2010 18:17:05 +0000 (11:17 -0700)
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (92 commits)
  powerpc: Remove unused 'protect4gb' boot parameter
  powerpc: Build-in e1000e for pseries & ppc64_defconfig
  powerpc/pseries: Make request_ras_irqs() available to other pseries code
  powerpc/numa: Use ibm,architecture-vec-5 to detect form 1 affinity
  powerpc/numa: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim
  powerpc: Use smt_snooze_delay=-1 to always busy loop
  powerpc: Remove check of ibm,smt-snooze-delay OF property
  powerpc/kdump: Fix race in kdump shutdown
  powerpc/kexec: Fix race in kexec shutdown
  powerpc/kexec: Speedup kexec hash PTE tear down
  powerpc/pseries: Add hcall to read 4 ptes at a time in real mode
  powerpc: Use more accurate limit for first segment memory allocations
  powerpc/kdump: Use chip->shutdown to disable IRQs
  powerpc/kdump: CPUs assume the context of the oopsing CPU
  powerpc/crashdump: Do not fail on NULL pointer dereferencing
  powerpc/eeh: Fix oops when probing in early boot
  powerpc/pci: Check devices status property when scanning OF tree
  powerpc/vio: Switch VIO Bus PM to use generic helpers
  powerpc: Avoid bad relocations in iSeries code
  powerpc: Use common cpu_die (fixes SMP+SUSPEND build)
  ...

1  2 
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/traps.c
drivers/macintosh/windfarm_pm81.c

index c09138d150d41eae784608074aa1416ff40265d5,1b784ff92d9d06a5f162790fcaa6f1ddd1055b57..28a686fb269c057de4a4ddf0e6b24dbf908abe82
@@@ -133,6 -133,7 +133,6 @@@ int main(void
        DEFINE(PACAKMSR, offsetof(struct paca_struct, kernel_msr));
        DEFINE(PACASOFTIRQEN, offsetof(struct paca_struct, soft_enabled));
        DEFINE(PACAHARDIRQEN, offsetof(struct paca_struct, hard_enabled));
 -      DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_event_pending));
        DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id));
  #ifdef CONFIG_PPC_MM_SLICES
        DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct,
  #endif /* CONFIG_PPC_STD_MMU_64 */
        DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp));
        DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id));
+       DEFINE(PACAKEXECSTATE, offsetof(struct paca_struct, kexec_state));
        DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr));
        DEFINE(PACA_STARTSPURR, offsetof(struct paca_struct, startspurr));
        DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
        DEFINE(PGD_T_LOG2, PGD_T_LOG2);
        DEFINE(PTE_T_LOG2, PTE_T_LOG2);
  #endif
+ #ifdef CONFIG_FSL_BOOKE
+       DEFINE(TLBCAM_SIZE, sizeof(struct tlbcam));
+       DEFINE(TLBCAM_MAS0, offsetof(struct tlbcam, MAS0));
+       DEFINE(TLBCAM_MAS1, offsetof(struct tlbcam, MAS1));
+       DEFINE(TLBCAM_MAS2, offsetof(struct tlbcam, MAS2));
+       DEFINE(TLBCAM_MAS3, offsetof(struct tlbcam, MAS3));
+       DEFINE(TLBCAM_MAS7, offsetof(struct tlbcam, MAS7));
+ #endif
  
  #ifdef CONFIG_KVM_EXIT_TIMING
        DEFINE(VCPU_TIMING_EXIT_TBU, offsetof(struct kvm_vcpu,
index 066bd31551d5414fb0a7a43ed85964c64665f042,250ee2ebf288462068d4631607fb50f3f51c242e..30817d9b20cb59ecb12741edee7d0dacf5366dc3
@@@ -53,6 -53,7 +53,6 @@@
  #include <linux/bootmem.h>
  #include <linux/pci.h>
  #include <linux/debugfs.h>
 -#include <linux/perf_event.h>
  
  #include <asm/uaccess.h>
  #include <asm/system.h>
@@@ -144,6 -145,11 +144,6 @@@ notrace void raw_local_irq_restore(unsi
        }
  #endif /* CONFIG_PPC_STD_MMU_64 */
  
 -      if (test_perf_event_pending()) {
 -              clear_perf_event_pending();
 -              perf_event_do_pending();
 -      }
 -
        /*
         * if (get_paca()->hard_enabled) return;
         * But again we need to take care that gcc gets hard_enabled directly
@@@ -284,30 -290,33 +284,33 @@@ u64 arch_irq_stat_cpu(unsigned int cpu
  }
  
  #ifdef CONFIG_HOTPLUG_CPU
- void fixup_irqs(cpumask_t map)
+ void fixup_irqs(const struct cpumask *map)
  {
        struct irq_desc *desc;
        unsigned int irq;
        static int warned;
+       cpumask_var_t mask;
  
-       for_each_irq(irq) {
-               cpumask_t mask;
+       alloc_cpumask_var(&mask, GFP_KERNEL);
  
+       for_each_irq(irq) {
                desc = irq_to_desc(irq);
                if (desc && desc->status & IRQ_PER_CPU)
                        continue;
  
-               cpumask_and(&mask, desc->affinity, &map);
-               if (any_online_cpu(mask) == NR_CPUS) {
+               cpumask_and(mask, desc->affinity, map);
+               if (cpumask_any(mask) >= nr_cpu_ids) {
                        printk("Breaking affinity for irq %i\n", irq);
-                       mask = map;
+                       cpumask_copy(mask, map);
                }
                if (desc->chip->set_affinity)
-                       desc->chip->set_affinity(irq, &mask);
+                       desc->chip->set_affinity(irq, mask);
                else if (desc->action && !(warned++))
                        printk("Cannot set affinity for irq %i\n", irq);
        }
  
+       free_cpumask_var(mask);
        local_irq_enable();
        mdelay(1);
        local_irq_disable();
index b6859aade9c26c7bc5f75eceed7a949401c028c9,ca7ce85ebc2efc73476250e520d554abcf121ba0..3031fc712ad03fec600e0caa042c16c5ae6d691a
@@@ -380,6 -380,46 +380,46 @@@ int machine_check_440A(struct pt_regs *
        }
        return 0;
  }
+ int machine_check_47x(struct pt_regs *regs)
+ {
+       unsigned long reason = get_mc_reason(regs);
+       u32 mcsr;
+       printk(KERN_ERR "Machine check in kernel mode.\n");
+       if (reason & ESR_IMCP) {
+               printk(KERN_ERR
+                      "Instruction Synchronous Machine Check exception\n");
+               mtspr(SPRN_ESR, reason & ~ESR_IMCP);
+               return 0;
+       }
+       mcsr = mfspr(SPRN_MCSR);
+       if (mcsr & MCSR_IB)
+               printk(KERN_ERR "Instruction Read PLB Error\n");
+       if (mcsr & MCSR_DRB)
+               printk(KERN_ERR "Data Read PLB Error\n");
+       if (mcsr & MCSR_DWB)
+               printk(KERN_ERR "Data Write PLB Error\n");
+       if (mcsr & MCSR_TLBP)
+               printk(KERN_ERR "TLB Parity Error\n");
+       if (mcsr & MCSR_ICP) {
+               flush_instruction_cache();
+               printk(KERN_ERR "I-Cache Parity Error\n");
+       }
+       if (mcsr & MCSR_DCSP)
+               printk(KERN_ERR "D-Cache Search Parity Error\n");
+       if (mcsr & PPC47x_MCSR_GPR)
+               printk(KERN_ERR "GPR Parity Error\n");
+       if (mcsr & PPC47x_MCSR_FPR)
+               printk(KERN_ERR "FPR Parity Error\n");
+       if (mcsr & PPC47x_MCSR_IPR)
+               printk(KERN_ERR "Machine Check exception is imprecise\n");
+       /* Clear MCSR */
+       mtspr(SPRN_MCSR, mcsr);
+       return 0;
+ }
  #elif defined(CONFIG_E500)
  int machine_check_e500(struct pt_regs *regs)
  {
@@@ -815,15 -855,12 +855,15 @@@ void __kprobes program_check_exception(
                return;
        }
        if (reason & REASON_TRAP) {
 +              /* Debugger is first in line to stop recursive faults in
 +               * rcu_lock, notify_die, or atomic_notifier_call_chain */
 +              if (debugger_bpt(regs))
 +                      return;
 +
                /* trap exception */
                if (notify_die(DIE_BPT, "breakpoint", regs, 5, 5, SIGTRAP)
                                == NOTIFY_STOP)
                        return;
 -              if (debugger_bpt(regs))
 -                      return;
  
                if (!(regs->msr & MSR_PR) &&  /* not user-mode */
                    report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) {
index 129cda737880a5b5aa15863a237ae8cf3a533cb5,e6e46a227698ec866836dd7ec1ff79b72ffae176..749d174b0dc6f58998b2b21fd88cd39001405725
@@@ -188,7 -188,7 +188,7 @@@ struct wf_smu_sys_fans_state 
  };
  
  /*
 - * Configs for SMU Sytem Fan control loop
 + * Configs for SMU System Fan control loop
   */
  static struct wf_smu_sys_fans_param wf_smu_sys_all_params[] = {
        /* Model ID 2 */
@@@ -757,10 -757,8 +757,8 @@@ static int __devexit wf_smu_remove(stru
                wf_put_control(cpufreq_clamp);
  
        /* Destroy control loops state structures */
-       if (wf_smu_sys_fans)
-               kfree(wf_smu_sys_fans);
-       if (wf_smu_cpu_fans)
-               kfree(wf_smu_cpu_fans);
+       kfree(wf_smu_sys_fans);
+       kfree(wf_smu_cpu_fans);
  
        return 0;
  }