1. 22 8月, 2016 2 次提交
    • C
      powerpc: sysdev: cpm: fix gpio save_regs functions · 41017a75
      Christophe Leroy 提交于
      of_mm_gpiochip_add_data() calls mm_gc->save_regs() before
      setting the data. Therefore ->save_regs() cannot use
      gpiochip_get_data()
      
      [    0.275940] Unable to handle kernel paging request for data at address 0x00000130
      [    0.283120] Faulting instruction address: 0xc01b44cc
      [    0.288175] Oops: Kernel access of bad area, sig: 11 [#1]
      [    0.293343] PREEMPT CMPC885
      [    0.296141] CPU: 0 PID: 1 Comm: swapper Not tainted 4.7.0-g65124df-dirty #68
      [    0.304131] task: c6074000 ti: c6080000 task.ti: c6080000
      [    0.309459] NIP: c01b44cc LR: c0011720 CTR: c0011708
      [    0.314372] REGS: c6081d90 TRAP: 0300   Not tainted  (4.7.0-g65124df-dirty)
      [    0.322267] MSR: 00009032 <EE,ME,IR,DR,RI>  CR: 24000028  XER: 20000000
      [    0.328813] DAR: 00000130 DSISR: c0000000
      GPR00: c01b6d0c c6081e40 c6074000 c6017000 c9028000 c601d028 c6081dd8 00000000
      GPR08: c601d028 00000000 ffffffff 00000001 24000044 00000000 c0002790 00000000
      GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 c05643b0 00000083
      GPR24: c04a1a6c c0560000 c04a8308 c04c6480 c0012498 c6017000 c7ffcc78 c6017000
      [    0.360806] NIP [c01b44cc] gpiochip_get_data+0x4/0xc
      [    0.365684] LR [c0011720] cpm1_gpio16_save_regs+0x18/0x44
      [    0.370972] Call Trace:
      [    0.373451] [c6081e50] [c01b6d0c] of_mm_gpiochip_add_data+0x70/0xdc
      [    0.379624] [c6081e70] [c00124c0] cpm_init_par_io+0x28/0x118
      [    0.385238] [c6081e80] [c04a8ac0] do_one_initcall+0xb0/0x17c
      [    0.390819] [c6081ef0] [c04a8cbc] kernel_init_freeable+0x130/0x1dc
      [    0.396924] [c6081f30] [c00027a4] kernel_init+0x14/0x110
      [    0.402177] [c6081f40] [c000b424] ret_from_kernel_thread+0x5c/0x64
      [    0.408233] Instruction dump:
      [    0.411168] 4182fafc 3f80c040 48234c6d 3bc0fff0 3b9c5ed0 4bfffaf4 81290020 712a0004
      [    0.418825] 4182fb34 48234c51 4bfffb2c 81230004 <80690130> 4e800020 7c0802a6 9421ffe0
      [    0.426763] ---[ end trace fe4113ee21d72ffa ]---
      
      fixes: e65078f1 ("powerpc: sysdev: cpm1: use gpiochip data pointer")
      fixes: a14a2d48 ("powerpc: cpm_common: use gpiochip data pointer")
      Cc: stable@vger.kernel.org
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      41017a75
    • P
      powerpc: migrate exception table users off module.h and onto extable.h · 8a39b05f
      Paul Gortmaker 提交于
      These files were only including module.h for exception table
      related functions.  We've now separated that content out into its
      own file "extable.h" so now move over to that and avoid all the
      extra header content in module.h that we don't really need to compile
      these files.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8a39b05f
  2. 09 8月, 2016 1 次提交
    • B
      powerpc/xics: Properly set Edge/Level type and enable resend · 880a3d6a
      Benjamin Herrenschmidt 提交于
      This sets the type of the interrupt appropriately. We set it as follow:
      
       - If not mapped from the device-tree, we use edge. This is the case
      of the virtual interrupts and PCI MSIs for example.
      
       - If mapped from the device-tree and #interrupt-cells is 2 (PAPR
      compliant), we use the second cell to set the appropriate type
      
       - If mapped from the device-tree and #interrupt-cells is 1 (current
      OPAL on P8 does that), we assume level sensitive since those are
      typically going to be the PSI LSIs which are level sensitive.
      
      Additionally, we mark the interrupts requested via the opal_interrupts
      property all level. This is a bit fishy but the best we can do until we
      fix OPAL to properly expose them with a complete descriptor. It is also
      correct for the current HW anyway as OPAL interrupts are currently PCI
      error and PSI interrupts which are level.
      
      Finally now that edge interrupts are properly identified, we can enable
      CONFIG_HARDIRQS_SW_RESEND which will make the core re-send them if
      they occur while masked, which some drivers rely upon.
      
      This fixes issues with lost interrupts on some Mellanox adapters.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      880a3d6a
  3. 05 8月, 2016 1 次提交
  4. 04 8月, 2016 1 次提交
    • K
      dma-mapping: use unsigned long for dma_attrs · 00085f1e
      Krzysztof Kozlowski 提交于
      The dma-mapping core and the implementations do not change the DMA
      attributes passed by pointer.  Thus the pointer can point to const data.
      However the attributes do not have to be a bitfield.  Instead unsigned
      long will do fine:
      
      1. This is just simpler.  Both in terms of reading the code and setting
         attributes.  Instead of initializing local attributes on the stack
         and passing pointer to it to dma_set_attr(), just set the bits.
      
      2. It brings safeness and checking for const correctness because the
         attributes are passed by value.
      
      Semantic patches for this change (at least most of them):
      
          virtual patch
          virtual context
      
          @r@
          identifier f, attrs;
      
          @@
          f(...,
          - struct dma_attrs *attrs
          + unsigned long attrs
          , ...)
          {
          ...
          }
      
          @@
          identifier r.f;
          @@
          f(...,
          - NULL
          + 0
           )
      
      and
      
          // Options: --all-includes
          virtual patch
          virtual context
      
          @r@
          identifier f, attrs;
          type t;
      
          @@
          t f(..., struct dma_attrs *attrs);
      
          @@
          identifier r.f;
          @@
          f(...,
          - NULL
          + 0
           )
      
      Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.comSigned-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Acked-by: NRobin Murphy <robin.murphy@arm.com>
      Acked-by: NHans-Christian Noren Egtvedt <egtvedt@samfundet.no>
      Acked-by: Mark Salter <msalter@redhat.com> [c6x]
      Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> [cris]
      Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> [drm]
      Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
      Acked-by: Fabien Dessenne <fabien.dessenne@st.com> [bdisp]
      Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> [vb2-core]
      Acked-by: David Vrabel <david.vrabel@citrix.com> [xen]
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen swiotlb]
      Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
      Acked-by: Richard Kuo <rkuo@codeaurora.org> [hexagon]
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
      Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390]
      Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> [avr32]
      Acked-by: Vineet Gupta <vgupta@synopsys.com> [arc]
      Acked-by: Robin Murphy <robin.murphy@arm.com> [arm64 and dma-iommu]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      00085f1e
  5. 03 8月, 2016 3 次提交
  6. 21 7月, 2016 1 次提交
    • B
      powerpc/dart: Use a cachable DART · c40785ad
      Benjamin Herrenschmidt 提交于
      Instead of punching a hole in the linear mapping, just use normal
      cachable memory, and apply the flush sequence documented in the
      CPC625 (aka U3) user manual.
      
      This allows us to remove quite a bit of code related to the early
      allocation of the DART and the hole in the linear mapping. We can
      also get rid of the copy of the DART for suspend/resume as the
      original memory can just be saved/restored now, as long as we
      properly sync the caches.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [mpe: Integrate dart_init() fix to return ENODEV when DART disabled]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c40785ad
  7. 17 7月, 2016 1 次提交
  8. 14 7月, 2016 1 次提交
  9. 13 7月, 2016 1 次提交
    • D
      pmem: kill __pmem address space · 7a9eb206
      Dan Williams 提交于
      The __pmem address space was meant to annotate codepaths that touch
      persistent memory and need to coordinate a call to wmb_pmem().  Now that
      wmb_pmem() is gone, there is little need to keep this annotation.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      7a9eb206
  10. 09 7月, 2016 2 次提交
    • C
      powerpc/8xx: Fix vaddr for IMMR early remap · f86ef74e
      Christophe Leroy 提交于
      Memory: 124428K/131072K available (3748K kernel code, 188K rwdata,
      648K rodata, 508K init, 290K bss, 6644K reserved)
      Kernel virtual memory layout:
        * 0xfffdf000..0xfffff000  : fixmap
        * 0xfde00000..0xfe000000  : consistent mem
        * 0xfddf6000..0xfde00000  : early ioremap
        * 0xc9000000..0xfddf6000  : vmalloc & ioremap
      SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
      
      Today, IMMR is mapped 1:1 at startup
      
      Mapping IMMR 1:1 is just wrong because it may overlap with another
      area. On most mpc8xx boards it is OK as IMMR is set to 0xff000000
      but for instance on EP88xC board, IMMR is at 0xfa200000 which
      overlaps with VM ioremap area
      
      This patch fixes the virtual address for remapping IMMR with the fixmap
      regardless of the value of IMMR.
      
      The size of IMMR area is 256kbytes (CPM at offset 0, security engine
      at offset 128k) so a 512k page is enough
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NScott Wood <oss@buserror.net>
      f86ef74e
    • C
      powerpc/85xx: Don't report SRAM to L2 cache fallback as error · 8ebf506a
      Claudiu Manoil 提交于
      If the SRAM region parameters are missing the SRAM driver
      probing exits and the L2 region is configured as L2 cache
      entirely.  This is the expected default behaviour, so it
      makes no sense to report it as an error.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NScott Wood <oss@buserror.net>
      8ebf506a
  11. 28 6月, 2016 1 次提交
    • D
      block: convert to device_add_disk() · 0d52c756
      Dan Williams 提交于
      For block drivers that specify a parent device, convert them to use
      device_add_disk().
      
      This conversion was done with the following semantic patch:
      
          @@
          struct gendisk *disk;
          expression E;
          @@
      
          - disk->driverfs_dev = E;
          ...
          - add_disk(disk);
          + device_add_disk(E, disk);
      
          @@
          struct gendisk *disk;
          expression E1, E2;
          @@
      
          - disk->driverfs_dev = E1;
          ...
          E2 = disk;
          ...
          - add_disk(E2);
          + device_add_disk(E1, E2);
      
      ...plus some manual fixups for a few missed conversions.
      
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      0d52c756
  12. 19 5月, 2016 1 次提交
  13. 16 5月, 2016 1 次提交
    • C
      powerpc/fsl-pci: Add a workaround for PCI 5 errata · a8165d42
      chenhui zhao 提交于
      Issue:
      As a master, the PCI IP block can combine a memory write to the last PCI
      double word (4 bytes) of a cacheline with a 4 byte memory write to the
      first PCI double word of the subsequent cacheline. This affects 32-bit
      PCI target devices that blindly assert STOP on memory-write transactions,
      without detecting that the data beat being transferred is the last data
      beat of the transaction. It can cause a hang. PCI-X operation is not
      affected by this erratum.
      
      Workaround:
      Setting the bit MDS in the PCI Bus Function Register will disable the
      combining of crossing cacheline boundary requests into one burst
      transaction. Therefore, it can prevent the errata scenario from
      occurring.
      
      This errata exists in MPC8543, MPC8543E, MPC8545, MPC8545E, MPC8547,
      MPC8547E, MPC8548 and MPC8548E. Refer to PCI 5 in MPC8548 errata
      document.
      Signed-off-by: NZhao Chenhui <chenhui.zhao@freescale.com>
      Signed-off-by: NZhiqiang Hou <Zhiqiang.Hou@freescale.com>
      [scottwood: whitespace fix]
      Signed-off-by: NScott Wood <oss@buserror.net>
      a8165d42
  14. 27 4月, 2016 1 次提交
  15. 31 3月, 2016 1 次提交
    • L
      powerpc: ppc4xx: drop unused variable · ab503238
      Linus Walleij 提交于
      commit 0d36fe65
      "powerpc: ppc4xx: use gpiochip data pointer"
      made the mm_gc local variable in ppc4xx_gpio_set()
      redundant, and when GCC treats warnings as errors this
      happens:
      
      arch/powerpc/sysdev/ppc4xx_gpio.c: In function 'ppc4xx_gpio_set':
      arch/powerpc/sysdev/ppc4xx_gpio.c:93:26: error:
        unused variable 'mm_gc' [-Werror=unused-variable]
           struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
                                   ^
         cc1: all warnings being treated as errors
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      ab503238
  16. 30 3月, 2016 4 次提交
    • L
      powerpc: simple-gpio: use gpiochip data pointer · 937daafc
      Linus Walleij 提交于
      This makes the driver use the data pointer added to the gpio_chip
      to store a pointer to the state container instead of relying on
      container_of().
      
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      937daafc
    • L
      powerpc: ppc4xx: use gpiochip data pointer · 0d36fe65
      Linus Walleij 提交于
      This makes the driver use the data pointer added to the gpio_chip
      to store a pointer to the state container instead of relying on
      container_of().
      
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      0d36fe65
    • L
      powerpc: cpm_common: use gpiochip data pointer · a14a2d48
      Linus Walleij 提交于
      This makes the driver use the data pointer added to the gpio_chip
      to store a pointer to the state container instead of relying on
      container_of().
      
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      a14a2d48
    • L
      powerpc: sysdev: cpm1: use gpiochip data pointer · e65078f1
      Linus Walleij 提交于
      This makes the driver use the data pointer added to the gpio_chip
      to store a pointer to the state container instead of relying on
      container_of().
      
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      e65078f1
  17. 23 3月, 2016 2 次提交
  18. 16 3月, 2016 1 次提交
  19. 10 3月, 2016 2 次提交
  20. 05 3月, 2016 1 次提交
  21. 01 3月, 2016 1 次提交
  22. 29 2月, 2016 1 次提交
  23. 26 1月, 2016 2 次提交
    • L
      powerpc: simple_gpio: Be sure to clamp return value · a4ce4b8d
      Linus Walleij 提交于
      As we want gpio_chip .get() calls to be able to return negative
      error codes and propagate to drivers, we need to go over all
      drivers and make sure their return values are clamped to [0,1].
      We do this by using the ret = !!(val) design pattern.
      
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      a4ce4b8d
    • L
      powerpc: ppc4cc/gpio: Be sure to clamp return value · eecdf59a
      Linus Walleij 提交于
      As we want gpio_chip .get() calls to be able to return negative
      error codes and propagate to drivers, we need to go over all
      drivers and make sure their return values are clamped to [0,1].
      We do this by using the ret = !!(val) design pattern.
      
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      eecdf59a
  24. 16 1月, 2016 1 次提交
    • D
      mm, dax, pmem: introduce pfn_t · 34c0fd54
      Dan Williams 提交于
      For the purpose of communicating the optional presence of a 'struct
      page' for the pfn returned from ->direct_access(), introduce a type that
      encapsulates a page-frame-number plus flags.  These flags contain the
      historical "page_link" encoding for a scatterlist entry, but can also
      denote "device memory".  Where "device memory" is a set of pfns that are
      not part of the kernel's linear mapping by default, but are accessed via
      the same memory controller as ram.
      
      The motivation for this new type is large capacity persistent memory
      that needs struct page entries in the 'memmap' to support 3rd party DMA
      (i.e.  O_DIRECT I/O with a persistent memory source/target).  However,
      we also need it in support of maintaining a list of mapped inodes which
      need to be unmapped at driver teardown or freeze_bdev() time.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Hansen <dave@sr71.net>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      34c0fd54
  25. 24 12月, 2015 1 次提交
  26. 23 12月, 2015 5 次提交