1. 21 12月, 2015 3 次提交
  2. 18 12月, 2015 1 次提交
    • A
      powerpc/opal-irqchip: Fix deadlock introduced by "Fix double endian conversion" · 036592fb
      Alistair Popple 提交于
      Commit 25642e14 ("powerpc/opal-irqchip: Fix double endian
      conversion") fixed an endian bug by calling opal_handle_events() in
      opal_event_unmask().
      
      However this introduced a deadlock if we find an event is active
      during unmasking and call opal_handle_events() again. The bad call
      sequence is:
      
        opal_interrupt()
        -> opal_handle_events()
           -> generic_handle_irq()
              -> handle_level_irq()
                 -> raw_spin_lock(&desc->lock)
                    handle_irq_event(desc)
                    unmask_irq(desc)
                    -> opal_event_unmask()
                       -> opal_handle_events()
                          -> generic_handle_irq()
                             -> handle_level_irq()
                                -> raw_spin_lock(&desc->lock)	(BOOM)
      
      When generating multiple opal events in quick succession this would lead
      to the following stall warnings:
      
      EEH: Fenced PHB#0 detected, location: U78C9.001.WZS09XA-P1-C32
      INFO: rcu_sched detected stalls on CPUs/tasks:
      
               12-...: (1 GPs behind) idle=68f/140000000000001/0 softirq=860/861 fqs=2065
               15-...: (1 GPs behind) idle=be5/140000000000001/0 softirq=1142/1143 fqs=2065
               (detected by 13, t=2102 jiffies, g=1325, c=1324, q=602)
      NMI watchdog: BUG: soft lockup - CPU#18 stuck for 22s! [irqbalance:2696]
      INFO: rcu_sched detected stalls on CPUs/tasks:
               12-...: (1 GPs behind) idle=68f/140000000000001/0 softirq=860/861 fqs=8371
               15-...: (1 GPs behind) idle=be5/140000000000001/0 softirq=1142/1143 fqs=8371
               (detected by 20, t=8407 jiffies, g=1325, c=1324, q=1290)
      
      This patch corrects the problem by queuing the work if an event is
      active during unmasking, which is similar to the pre-endian fix
      behaviour.
      
      Fixes: 25642e14 ("powerpc/opal-irqchip: Fix double endian conversion")
      Signed-off-by: NAlistair Popple <alistair@popple.id.au>
      Reported-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      036592fb
  3. 17 12月, 2015 6 次提交
  4. 16 12月, 2015 3 次提交
    • M
      Partial revert of "powerpc: Individual System V IPC system calls" · 2475c362
      Michael Ellerman 提交于
      This partially reverts commit a3423615.
      
      While reviewing the glibc patch to exploit the individual IPC calls,
      Arnd & Andreas noticed that we were still requiring userspace to pass
      IPC_64 in order to get the new style IPC API.
      
      With a bit of cleanup in the kernel we can drop that requirement, and
      instead only provide the new style API, which will simplify things for
      userspace.
      
      Rather than try and sneak that patch into 4.4, instead we will drop the
      individual IPC calls for powerpc, and merge them again in 4.5 once the
      cleanup patch has gone in.
      
      Because we've already added sys_mlock2() as syscall #378, we don't do a
      full revert of the IPC calls. Instead we drop the __NR #defines, and
      send those now undefined syscall numbers to sys_ni_syscall(). This
      leaves a gap in the syscall numbers, but we'll reuse them when we merge
      the individual IPC calls.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      2475c362
    • D
      Revert "scatterlist: use sg_phys()" · 3e6110fd
      Dan Williams 提交于
      commit db0fa0cb "scatterlist: use sg_phys()" did replacements of
      the form:
      
          phys_addr_t phys = page_to_phys(sg_page(s));
          phys_addr_t phys = sg_phys(s) & PAGE_MASK;
      
      However, this breaks platforms where sizeof(phys_addr_t) >
      sizeof(unsigned long).  Revert for 4.3 and 4.4 to make room for a
      combined helper in 4.5.
      
      Cc: <stable@vger.kernel.org>
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Fixes: db0fa0cb ("scatterlist: use sg_phys()")
      Suggested-by: NJoerg Roedel <joro@8bytes.org>
      Reported-by: NVitaly Lavrov <vel21ripn@gmail.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      3e6110fd
    • L
      Fix user-visible spelling error · 173ae9ba
      Linus Torvalds 提交于
      Pavel Machek reports a warning about W+X pages found in the "Persisent"
      kmap area.  After grepping for it (using the correct spelling), and not
      finding it, I noticed how the debug printk was just misspelled.  Fix it.
      
      The actual mapping bug that Pavel reported is still open.  It's
      apparently a separate issue from the known EFI page tables, looks like
      it's related to the HIGHMEM mappings.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      173ae9ba
  5. 15 12月, 2015 4 次提交
  6. 14 12月, 2015 1 次提交
  7. 13 12月, 2015 2 次提交
  8. 12 12月, 2015 9 次提交
    • H
      parisc: Disable huge pages on Mako machines · 78c0cbff
      Helge Deller 提交于
      Mako-based machines (PA8800 and PA8900 CPUs) don't allow aliasing on
      non-equaivalent addresses.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      78c0cbff
    • H
      parisc: Wire up mlock2 syscall · 5c477b45
      Helge Deller 提交于
      Signed-off-by: NHelge Deller <deller@gmx.de>
      5c477b45
    • B
      parisc: Remove unused pcibios_init_bus() · 5f0e9b4c
      Bjorn Helgaas 提交于
      There are no callers of pcibios_init_bus(), so remove it.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      5f0e9b4c
    • V
      c512c6ba
    • V
      ARCv2: perf: Ensure perf intr gets enabled on all cores · c6317bc7
      Vineet Gupta 提交于
      This was the second perf intr issue
      
      perf sampling on multicore requires intr to be enabled on all cores.
      ARC perf probe code used helper arc_request_percpu_irq() which calls
       - request_percpu_irq() on core0
       - enable_percpu_irq() on all all cores (including core0)
      
      genirq requires that request be made ahead of enable call.
      However if perf probe happened on non core0 (observed on a 3.18 kernel),
      enable would get called ahead of request, failing obviously and
      rendering perf intr disabled on all such cores
      
      [   11.120000] 1 ARC perf       : 8 counters (48 bits), 113 conditions, [overflow IRQ support]
      [   11.130000] 1 -----> enable_percpu_irq() IRQ 20 failed
      [   11.140000] 3 -----> enable_percpu_irq() IRQ 20 failed
      [   11.140000] 2 -----> enable_percpu_irq() IRQ 20 failed
      [   11.140000] 0 =====> request_percpu_irq() IRQ 20
      [   11.140000] 0 -----> enable_percpu_irq() IRQ 20
      
      Fix this fragility, by calling request_percpu_irq() on whatever core
      calls probe (there is no requirement on which core calls this anyways)
      and then calling enable on each cores.
      
      Interestingly this started as invesigation of STAR 9000838902:
      "sporadically IRQs enabled on perf prob"
      
      which was about occassional boot spew as request_percpu_irq got called
      non-locally (from an IPI), and re-enabled interrupts in following path
      proc_mkdir ->  spin_unlock_irq()
      
      which the irq work code didn't like.
      
      | ARC perf     : 8 counters (48 bits), 113 conditions, [overflow IRQ support]
      |
      | BUG: failure at ../kernel/irq_work.c:135/irq_work_run_list()!
      | CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.10-01127-g285efb8e66d1 #2
      |
      | Stack Trace:
      |  arc_unwind_core.constprop.1+0x94/0x104
      |  dump_stack+0x62/0x98
      |  irq_work_run_list+0xb0/0xb4
      |  irq_work_run+0x22/0x3c
      |  do_IPI+0x74/0x9c
      |  handle_irq_event_percpu+0x34/0x164
      |  handle_percpu_irq+0x58/0x78
      |  generic_handle_irq+0x1e/0x2c
      |  arch_do_IRQ+0x3c/0x60
      |  ret_from_exception+0x0/0x8
      
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-snps-arc@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: <stable@vger.kernel.org> #4.2+
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      c6317bc7
    • V
      ARC: intc: No need to clear IRQ_NOAUTOEN · 5bf704c2
      Vineet Gupta 提交于
      arc_request_percpu_irq() is called by all cores to request/enable percpu
      irq. It has some "prep" calls needed by genirq:
       - setup percpu devid
       - disable IRQ_NOAUTOEN
      
      However given that enable_percpu_irq() is called enayways, latter can be
      avoided.
      
      We are now left with irq_set_percpu_devid() quirk and that too for
      ARCompact builds only, since previous patch updated ARCv2 intc to do this
      in the "right" place, i.e. irq map function.
      
      By next release, this will ultimately be fixed for ARCompact as well.
      
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: linux-snps-arc@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      5bf704c2
    • V
      ARCv2: intc: Fix random perf irq disabling in SMP setup · 8eb0984b
      Vineet Gupta 提交于
      As part of fixing another perf issue, observed that after a perf run,
      the interrupt got disabled on one/more cores.
      
      Turns out that despite requesting perf irq as percpu, the flow handler
      registered was not handle_percpu_irq()
      
      Given that on ARCv2 cores, IRQs < 24 are always private to cpu, we
      register the right handler at the very onset.
      
      Before Fix
      
      | [ARCLinux]# cat /proc/interrupts | grep perf
      |  20:    0      0      0       0  ARCv2 core Intc  20 ARC perf counters
      |
      | [ARCLinux]# perf record -c 20000 /sbin/hackbench
      | Running with 10*40 (== 400) tasks.
      |
      | [ARCLinux]# cat /proc/interrupts | grep perf
      |  20:    0    522      8    51916  ARCv2 core Intc  20 ARC perf counters
      |
      | [ARCLinux]# perf record -c 20000 /sbin/hackbench
      | Running with 10*40 (== 400) tasks.
      |
      | [ARCLinux]# cat /proc/interrupts | grep perf
      |  20:    0    522      8   104368  ARCv2 core Intc  20 ARC perf counters
      
      After Fix
      
      | [ARCLinux]# cat /proc/interrupts | grep perf
      |  20:    0      0      0       0  ARCv2 core Intc  20 ARC perf counters
      |
      | [ARCLinux]# perf record -c 20000 /sbin/hackbench
      | Running with 10*40 (== 400) tasks.
      |
      | [ARCLinux]# cat /proc/interrupts | grep perf
      |  20:  64198  62012  62697  67803  ARCv2 core Intc  20 ARC perf counters
      |
      | [ARCLinux]# perf record -c 20000 /sbin/hackbench
      | Running with 10*40 (== 400) tasks.
      |
      | [ARCLinux]# cat /proc/interrupts | grep perf
      |  20: 126014 122792 123301 133654  ARCv2 core Intc  20 ARC perf counters
      
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: stable@vger.kernel.org #4.2+
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      8eb0984b
    • L
      ls2080a/dts: Add little endian property for GPIO IP block · 65347783
      Liu Gang 提交于
      The GPIO block for ls2080a platform has little endian registers,
      the GPIO driver needs this property to read/write registers by
      right interface.
      Signed-off-by: NLiu Gang <Gang.Liu@freescale.com>
      Signed-off-by: NLi Yang <leoli@freescale.com>
      Signed-off-by: NKevin Hilman <khilman@linaro.org>
      65347783
    • Y
      ARM64: dts: ls2080a: fix eSDHC endianness · 2dd2e4d1
      yangbo lu 提交于
      Add the "little-endian" property to fix the issue that eSDHC
      is not working and dumping out "mmc0: Controller never released
      inhibit bit(s)." error messages constantly.
      
      Fixes: 5461597f ("dts/ls2080a: Update DTSI to add support of various peripherals")
      Signed-off-by: NYangbo Lu <yangbo.lu@freescale.com>
      Signed-off-by: NLi Yang <leoli@freescale.com>
      Signed-off-by: NKevin Hilman <khilman@linaro.org>
      2dd2e4d1
  9. 11 12月, 2015 6 次提交
  10. 10 12月, 2015 1 次提交
  11. 09 12月, 2015 4 次提交
    • A
      Revert "powerpc/eeh: Don't unfreeze PHB PE after reset" · dc9c41bd
      Andrew Donnellan 提交于
      This reverts commit 527d10ef.
      
      The reverted commit breaks cxlflash devices following an EEH reset (and
      possibly other cxl devices, however this has not been tested).
      
      The reverted commit changed the behaviour of eeh_reset_device() so that PHB
      PEs are not unfrozen following the completion of the reset. This should not
      be problematic, as no device resources should have been associated with the
      PHB PE.
      
      However, when attempting to load the cxlflash driver after a reset, the
      driver attempts to read Vital Product Data through a call to
      pci_read_vpd() (which is called on the physical cxl device, not on the
      virtual AFU device). pci_read_vpd() in turn attempts to read from the cxl
      device's config space. This fails, as the PE it's trying to read from is
      still frozen. In turn, the driver gets an -ENODEV and fails to initialise.
      
      It appears this issue only affects some parts of the VPD area, as "lspci
      -vvv", which only reads a subset of the VPD bytes, is not broken by the
      original patch.
      
      At this stage, we don't fully understand why we're trying to read a frozen
      PE, and we don't know how this affects other cxl devices. It is possible
      that there is an underlying bug in the cxl driver or the powerpc CAPI
      support code, or alternatively a bug in the PCI resource allocation/mapping
      code that is incorrectly mapping resources to PE#0.
      
      As such, this fix is incomplete, however it is necessary to prevent a
      serious regression in CAPI support.
      
      In the meantime, revert the commit, especially as it was intended to be a
      non-functional change.
      
      Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
      Cc: Ian Munsie <imunsie@au1.ibm.com>
      Cc: Daniel Axtens <dja@axtens.net>
      Signed-off-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      dc9c41bd
    • P
      powerpc/sbc8641: drop bogus PHY IRQ entries from DTS file · 5b01310c
      Paul Gortmaker 提交于
      This file was originally cloned off of the MPC8641D-HPCN reference
      platform, which actually had a PHY IRQ line connected. However this
      board does not. The bogus entry was largely inert and went undetected
      until commit 321beec5 ("net: phy: Use
      interrupts when available in NOLINK state") was added to the tree.
      
      With the above commit, the board fails to NFS boot since it sits waiting
      for a PHY IRQ event that of course never arrives. Removing the bogus
      entries from the DTS file fixes the issue.
      
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5b01310c
    • G
      um: fix returns without va_end · 887a9853
      Geyslan G. Bem 提交于
      When using va_list ensure that va_start will be followed by va_end.
      Signed-off-by: NGeyslan G. Bem <geyslan@gmail.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      887a9853
    • R
      um: Fix fpstate handling · 8090bfd2
      Richard Weinberger 提交于
      The x86 FPU cleanup changed fpstate to a plain integer.
      UML on x86 has to deal with that too.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      8090bfd2