1. 22 2月, 2012 3 次提交
  2. 16 2月, 2012 5 次提交
    • A
      powerpc/perf: power_pmu_start restores incorrect values, breaking frequency events · 9a45a940
      Anton Blanchard 提交于
      perf on POWER stopped working after commit e050e3f0 (perf: Fix
      broken interrupt rate throttling). That patch exposed a bug in
      the POWER perf_events code.
      
      Since the PMCs count upwards and take an exception when the top bit
      is set, we want to write 0x80000000 - left in power_pmu_start. We were
      instead programming in left which effectively disables the counter
      until we eventually hit 0x80000000. This could take seconds or longer.
      
      With the patch applied I get the expected number of samples:
      
                SAMPLE events:       9948
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: <stable@kernel.org>
      9a45a940
    • B
      powerpc: Disable interrupts early in Program Check · 54321242
      Benjamin Herrenschmidt 提交于
      Program Check exceptions are the result of WARNs, BUGs, some
      type of breakpoints, kprobe, and other illegal instructions.
      
      We want interrupts (and thus preemption) to remain disabled
      while doing the initial stage of testing the reason and
      branching off to a debugger or kprobe, so we are still on
      the original CPU which makes debugging easier in various cases.
      
      This is how the code was intended, hence the local_irq_enable()
      right in the middle of program_check_exception().
      
      However, the assembly exception prologue for that exception was
      incorrectly marked as enabling interrupts, which defeats that
      (and records a redundant enable with lockdep).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      54321242
    • S
      powerpc: Remove legacy iSeries from ppc64_defconfig · a1a1d1bf
      Stephen Rothwell 提交于
      Since we are heading towards removing the Legacy iSeries platform, start
      by no longer building it for ppc64_defconfig.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a1a1d1bf
    • B
      powerpc/fsl/pci: Fix PCIe fixup regression · 13635dfd
      Benjamin Herrenschmidt 提交于
      Upstream changes to the way PHB resources are registered
      broke the resource fixup for FSL boards.
      
      We can no longer rely on the resource pointer array for the PHB's
      pci_bus structure, so let's leave it alone and go straight for
      the PHB resources instead. This also makes the code generally
      more readable.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      13635dfd
    • I
      powerpc: Fix kernel log of oops/panic instruction dump · 40c8cefa
      Ira Snyder 提交于
      A kernel oops/panic prints an instruction dump showing several
      instructions before and after the instruction which caused the
      oops/panic.
      
      The code intended that the faulting instruction be enclosed in angle
      brackets, however a bug caused the faulting instruction to be
      interpreted by printk() as the message log level.
      
      To fix this, the KERN_CONT log level is added before the actual text of
      the printed message.
      
      === Before the patch ===
      
      [ 1081.587266] Instruction dump:
      [ 1081.590236] 7c000110 7c0000f8 5400077c 552907f6 7d290378 992b0003 4e800020 38000001
      [ 1081.598034] 3d20c03a 9009a114 7c0004ac 39200000
      [ 1081.602500]  4e800020 3803ffd0 2b800009
      
      <4>[ 1081.587266] Instruction dump:
      <4>[ 1081.590236] 7c000110 7c0000f8 5400077c 552907f6 7d290378 992b0003 4e800020 38000001
      <4>[ 1081.598034] 3d20c03a 9009a114 7c0004ac 39200000
      <98090000>[ 1081.602500]  4e800020 3803ffd0 2b800009
      
      === After the patch ===
      
      [   51.385216] Instruction dump:
      [   51.388186] 7c000110 7c0000f8 5400077c 552907f6 7d290378 992b0003 4e800020 38000001
      [   51.395986] 3d20c03a 9009a114 7c0004ac 39200000 <98090000> 4e800020 3803ffd0 2b800009
      
      <4>[   51.385216] Instruction dump:
      <4>[   51.388186] 7c000110 7c0000f8 5400077c 552907f6 7d290378 992b0003 4e800020 38000001
      <4>[   51.395986] 3d20c03a 9009a114 7c0004ac 39200000 <98090000> 4e800020 3803ffd0 2b800009
      Signed-off-by: NIra W. Snyder <iws@ovro.caltech.edu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      40c8cefa
  3. 14 2月, 2012 7 次提交
    • T
      powerpc/pseries/eeh: Fix crash when error happens during device probe · 778a785f
      Thadeu Lima de Souza Cascardo 提交于
      EEH may happen during a PCI driver probe. If the driver is trying to
      access some register in a loop, the EEH code will try to print the
      driver name. But the driver pointer in struct pci_dev is not set until
      probe returns successfully.
      
      Use a function to test if the device and the driver pointer is NULL
      before accessing the driver's name.
      Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      778a785f
    • B
      powerpc/pseries: Fix partition migration hang in stop_topology_update · 444080d1
      Brian King 提交于
      This fixes a hang that was observed during live partition migration.
      Since stop_topology_update must not be called from an interrupt
      context, call it earlier in the migration process. The hang observed
      can be seen below:
      
      WARNING: at kernel/timer.c:1011
      Modules linked in: ip6t_LOG xt_tcpudp xt_pkttype ipt_LOG xt_limit ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_raw xt_NOTRACK ipt_REJECT xt_state iptable_raw iptable_filter ip6table_mangle nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables ip6table_filter ip6_tables x_tables ipv6 fuse loop ibmveth sg ext3 jbd mbcache raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx raid10 raid1 raid0 scsi_dh_alua scsi_dh_rdac scsi_dh_hp_sw scsi_dh_emc dm_round_robin dm_multipath scsi_dh sd_mod crc_t10dif ibmvfc scsi_transport_fc scsi_tgt scsi_mod dm_snapshot dm_mod
      NIP: c0000000000c52d8 LR: c00000000004be28 CTR: 0000000000000000
      REGS: c00000005ffd77d0 TRAP: 0700   Not tainted  (3.2.0-git-00001-g07d106d0)
      MSR: 8000000000021032 <ME,CE,IR,DR>  CR: 48000084  XER: 00000001
      CFAR: c00000000004be20
      TASK = c00000005ec78860[0] 'swapper/3' THREAD: c00000005ec98000 CPU: 3
      GPR00: 0000000000000001 c00000005ffd7a50 c000000000fbbc98 c000000000ec8340
      GPR04: 00000000282a0020 0000000000000000 0000000000004000 0000000000000101
      GPR08: 0000000000000012 c00000005ffd4000 0000000000000020 c000000000f3ba88
      GPR12: 0000000000000000 c000000007f40900 0000000000000001 0000000000000004
      GPR16: 0000000000000001 0000000000000000 0000000000000000 c000000001022310
      GPR20: 0000000000000001 0000000000000000 0000000000200200 c000000001029e14
      GPR24: 0000000000000000 0000000000000001 0000000000000040 c00000003f74bc80
      GPR28: c00000003f74bc84 c000000000f38038 c000000000f16b58 c000000000ec8340
      NIP [c0000000000c52d8] .del_timer_sync+0x28/0x60
      LR [c00000000004be28] .stop_topology_update+0x20/0x38
      Call Trace:
      [c00000005ffd7a50] [c00000005ec78860] 0xc00000005ec78860 (unreliable)
      [c00000005ffd7ad0] [c00000000004be28] .stop_topology_update+0x20/0x38
      [c00000005ffd7b40] [c000000000028378] .__rtas_suspend_last_cpu+0x58/0x260
      [c00000005ffd7bf0] [c0000000000fa230] .generic_smp_call_function_interrupt+0x160/0x358
      [c00000005ffd7cf0] [c000000000036ec8] .smp_ipi_demux+0x88/0x100
      [c00000005ffd7d80] [c00000000005c154] .icp_hv_ipi_action+0x5c/0x80
      [c00000005ffd7e00] [c00000000012a088] .handle_irq_event_percpu+0x100/0x318
      [c00000005ffd7f00] [c00000000012e774] .handle_percpu_irq+0x84/0xd0
      [c00000005ffd7f90] [c000000000022ba8] .call_handle_irq+0x1c/0x2c
      [c00000005ec9ba20] [c00000000001157c] .do_IRQ+0x22c/0x2a8
      [c00000005ec9bae0] [c0000000000054bc] hardware_interrupt_entry+0x18/0x1c
      Exception: 501 at .cpu_idle+0x194/0x2f8
          LR = .cpu_idle+0x194/0x2f8
      [c00000005ec9bdd0] [c000000000017e58] .cpu_idle+0x188/0x2f8 (unreliable)
      [c00000005ec9be90] [c00000000067ec18] .start_secondary+0x3e4/0x524
      [c00000005ec9bf90] [c0000000000093e8] .start_secondary_prolog+0x10/0x14
      Instruction dump:
      ebe1fff8 4e800020 fbe1fff8 7c0802a6 f8010010 7c7f1b78 f821ff81 78290464
      80090014 5400019e 7c0000d0 78000fe0 <0b000000> 4800000c 7c210b78 7c421378
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      444080d1
    • M
      powerpc/powernv: Disable interrupts while taking phb->lock · f1c853b5
      Michael Ellerman 提交于
      We need to disable interrupts when taking the phb->lock. Otherwise
      we could deadlock with pci_lock taken from an interrupt.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f1c853b5
    • B
      powerpc: Fix WARN_ON in decrementer_check_overflow · 6fe5f5f3
      Benjamin Herrenschmidt 提交于
      We use __get_cpu_var() which triggers a false positive warning
      in smp_processor_id() thinking interrupts are enabled (at this
      point, they are soft-enabled but hard-disabled).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6fe5f5f3
    • B
      powerpc/wsp: Fix IRQ affinity setting · 7a768d30
      Benjamin Herrenschmidt 提交于
      We call the cache_hwirq_map() function with a linux IRQ number
      but it expects a HW irq number. This triggers a BUG on multic-chip
      setups in addition to not doing the right thing.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7a768d30
    • S
      powerpc: Implement GET_IP/SET_IP · e6289427
      Srikar Dronamraju 提交于
      With this change, helpers such as instruction_pointer() et al, get defined
      in the generic header in terms of GET_IP
      
      Removed the unnecessary definition of profile_pc in !CONFIG_SMP case as
      suggested by Mike Frysinger.
      Signed-off-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e6289427
    • B
      powerpc/wsp: Permanently enable PCI class code workaround · 454c0bfd
      Benjamin Herrenschmidt 提交于
      It appears that on the Chroma card, the class code of the root
      complex is still wrong even on DD2 or later chips. This could
      be a firmware issue, but that breaks resource allocation so let's
      unconditionally fix it up.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      454c0bfd
  4. 25 1月, 2012 4 次提交
  5. 18 1月, 2012 7 次提交
    • R
      powerpc/85xx: Add dr_mode property in USB nodes · 621c4b99
      Ramneek Mehresh 提交于
      Add usb2 controller node for P1020RDB, P2020RDB, P2020DS, P1021MDS
      Signed-off-by: NRamneek Mehresh <ramneek.mehresh@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      621c4b99
    • R
      powerpc/85xx: Enable USB2 controller node for P1020RDB · 70a0ac66
      Ramneek Mehresh 提交于
      Enable USB2 controller node for P1020RDB. USB2 controller is used only
      when board boots from SPI or SD as it is muxed with eLBC
      Signed-off-by: NRamneek Mehresh <ramneek.mehresh@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      70a0ac66
    • J
      powerpc/85xx: Fix cmd12 bug and add the chip compatible for eSDHC · f8b5a318
      Jerry Huang 提交于
      According to latest kernel, the auto-cmd12 property should be
      "sdhci,auto-cmd12", and according to the SDHC binding and the workaround for
      the special chip, add the chip compatible for eSDHC: "fsl,p1022-esdhc",
      "fsl,mpc8536-esdhc", "fsl,p1020-esdhc", "fsl,p2020-esdhc" and
      "fsl,p1010-esdhc".
      Signed-off-by: NJerry Huang <Chang-Ming.Huang@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      f8b5a318
    • E
      audit: inline audit_syscall_entry to reduce burden on archs · b05d8447
      Eric Paris 提交于
      Every arch calls:
      
      if (unlikely(current->audit_context))
      	audit_syscall_entry()
      
      which requires knowledge about audit (the existance of audit_context) in
      the arch code.  Just do it all in static inline in audit.h so that arch's
      can remain blissfully ignorant.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      b05d8447
    • E
      Audit: push audit success and retcode into arch ptrace.h · d7e7528b
      Eric Paris 提交于
      The audit system previously expected arches calling to audit_syscall_exit to
      supply as arguments if the syscall was a success and what the return code was.
      Audit also provides a helper AUDITSC_RESULT which was supposed to simplify things
      by converting from negative retcodes to an audit internal magic value stating
      success or failure.  This helper was wrong and could indicate that a valid
      pointer returned to userspace was a failed syscall.  The fix is to fix the
      layering foolishness.  We now pass audit_syscall_exit a struct pt_reg and it
      in turns calls back into arch code to collect the return value and to
      determine if the syscall was a success or failure.  We also define a generic
      is_syscall_success() macro which determines success/failure based on if the
      value is < -MAX_ERRNO.  This works for arches like x86 which do not use a
      separate mechanism to indicate syscall failure.
      
      We make both the is_syscall_success() and regs_return_value() static inlines
      instead of macros.  The reason is because the audit function must take a void*
      for the regs.  (uml calls theirs struct uml_pt_regs instead of just struct
      pt_regs so audit_syscall_exit can't take a struct pt_regs).  Since the audit
      function takes a void* we need to use static inlines to cast it back to the
      arch correct structure to dereference it.
      
      The other major change is that on some arches, like ia64, MIPS and ppc, we
      change regs_return_value() to give us the negative value on syscall failure.
      THE only other user of this macro, kretprobe_example.c, won't notice and it
      makes the value signed consistently for the audit functions across all archs.
      
      In arch/sh/kernel/ptrace_64.c I see that we were using regs[9] in the old
      audit code as the return value.  But the ptrace_64.h code defined the macro
      regs_return_value() as regs[3].  I have no idea which one is correct, but this
      patch now uses the regs_return_value() function, so it now uses regs[3].
      
      For powerpc we previously used regs->result but now use the
      regs_return_value() function which uses regs->gprs[3].  regs->gprs[3] is
      always positive so the regs_return_value(), much like ia64 makes it negative
      before calling the audit code when appropriate.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: H. Peter Anvin <hpa@zytor.com> [for x86 portion]
      Acked-by: Tony Luck <tony.luck@intel.com> [for ia64]
      Acked-by: Richard Weinberger <richard@nod.at> [for uml]
      Acked-by: David S. Miller <davem@davemloft.net> [for sparc]
      Acked-by: Ralf Baechle <ralf@linux-mips.org> [for mips]
      Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [for ppc]
      d7e7528b
    • J
      arch/powerpc/sysdev/fsl_pci.c: add missing iounmap · 0cf572dc
      Julia Lawall 提交于
      Add missing iounmap in error handling code, in a case where the function
      already preforms iounmap on some other execution path.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression e;
      statement S,S1;
      int ret;
      @@
      e = \(ioremap\|ioremap_nocache\)(...)
      ... when != iounmap(e)
      if (<+...e...+>) S
      ... when any
          when != iounmap(e)
      *if (...)
         { ... when != iounmap(e)
           return ...; }
      ... when any
      iounmap(e);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      0cf572dc
    • M
      powerpc: fix compile error with 85xx/p1022_ds.c · ba8438fb
      Michael Neuling 提交于
      Current linux-next compiled with mpc85xx_defconfig causes this:
       arch/powerpc/platforms/85xx/p1022_ds.c:341:14: error: 'udbg_progress' undeclared here (not in a function)
      
      Add include to fix this.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Acked-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      ba8438fb
  6. 15 1月, 2012 1 次提交
    • S
      Kbuild: Use dtc's -d (dependency) option · 7c431851
      Stephen Warren 提交于
      This hooks dtc into Kbuild's dependency system.
      
      Thus, for example, "make dtbs" will rebuild tegra-harmony.dtb if only
      tegra20.dtsi has changed yet tegra-harmony.dts has not. The previous
      lack of this feature recently caused me to have very confusing "git
      bisect" results.
      
      For ARM, it's obvious what to add to $(targets). I'm not familiar enough
      with other architectures to know what to add there. Powerpc appears to
      already add various .dtb files into $(targets), but the other archs may
      need something added to $(targets) to work.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      [mmarek: Dropped arch/c6x part to avoid merging commits from the middle
      of the merge window]
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      7c431851
  7. 13 1月, 2012 4 次提交
  8. 11 1月, 2012 2 次提交
  9. 07 1月, 2012 4 次提交
  10. 05 1月, 2012 3 次提交
    • T
      powerpc: fix compile error with 85xx/p1010rdb.c · ef88e391
      Tony Breeds 提交于
      Current linux-next compiled with mpc85xx_defconfig causes this:
      
      arch/powerpc/platforms/85xx/p1010rdb.c:41:14: error: 'np' undeclared (first use in this function)
      arch/powerpc/platforms/85xx/p1023_rds.c:102:14: error: 'np' undeclared (first use in this function)
      
      Introduced in:
        commit 996983b7
        Author: Kyle Moffett <Kyle.D.Moffett@boeing.com>
        Date:   Fri Dec 2 06:28:02 2011 +0000
        powerpc/mpic: Search for open-pic device-tree node if NULL
      Signed-off-by: NTony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      ef88e391
    • M
      powerpc: fix compile error with 85xx/p1023_rds.c · 2c1c7430
      Michael Neuling 提交于
      Current linux-next compiled with mpc85xx_smp_defconfig causes this:
      arch/powerpc/platforms/85xx/p1023_rds.c: In function 'mpc85xx_rds_pic_init':
      arch/powerpc/platforms/85xx/p1023_rds.c:102:14: error: 'np' undeclared (first use in this function)
      arch/powerpc/platforms/85xx/p1023_rds.c:102:14: note: each undeclared identifier is reported only once for each function it appears in
      
      Introduced in:
        commit 996983b7
        Author: Kyle Moffett <Kyle.D.Moffett@boeing.com>
        Date:   Fri Dec 2 06:28:02 2011 +0000
        powerpc/mpic: Search for open-pic device-tree node if NULL
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      2c1c7430
    • T
      powerpc/fsl: add MSI support for the Freescale hypervisor · 446bc1ff
      Timur Tabi 提交于
      Add support for vmpic-msi nodes to the fsl_msi driver.  The MSI is
      virtualized by the hypervisor, so the vmpic-msi does not contain a 'reg'
      property.  Instead, the driver uses hcalls.
      
      Add support for the "msi-address-64" property to the fsl_pci driver.
      The Freescale hypervisor typically puts the virtualized MSIIR register
      in the page after the end of DDR, so we extend the DDR ATMU to cover it.
      Any other location for MSIIR is not supported, for now.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      446bc1ff