1. 31 7月, 2018 4 次提交
    • R
      arc: [plat-eznps] fix printk warning in arc/plat-eznps/mtm.c · 9e2ea405
      Randy Dunlap 提交于
      Fix printk format warning in arch/arc/plat-eznps/mtm.c:
      
      In file included from ../include/linux/printk.h:7,
                       from ../include/linux/kernel.h:14,
                       from ../include/linux/list.h:9,
                       from ../include/linux/smp.h:12,
                       from ../arch/arc/plat-eznps/mtm.c:17:
      ../arch/arc/plat-eznps/mtm.c: In function 'set_mtm_hs_ctr':
      ../include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
       #define KERN_SOH "\001"  /* ASCII Start Of Header */
                        ^~~~~~
      ../include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
       #define KERN_ERR KERN_SOH "3" /* error conditions */
                        ^~~~~~~~
      ../include/linux/printk.h:308:9: note: in expansion of macro 'KERN_ERR'
        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
               ^~~~~~~~
      ../arch/arc/plat-eznps/mtm.c:166:3: note: in expansion of macro 'pr_err'
         pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n",
         ^~~~~~
      ../arch/arc/plat-eznps/mtm.c:166:40: note: format string is defined here
         pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n",
                                             ~^
                                             %ld
      The hs_ctr variable can just be int instead of long, so also change
      kstrtol() to kstrtoint() and leave the format string as %d.
      
      Also add 2 header files since they are used in mtm.c and we prefer
      not to depend on accidental/indirect #includes.
      
      Cc: linux-snps-arc@lists.infradead.org
      Cc: Ofer Levi <oferle@mellanox.com>
      Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      9e2ea405
    • R
      arc: [plat-eznps] fix data type errors in platform headers · b1f32ce1
      Randy Dunlap 提交于
      Add <linux/types.h> to fix build errors.
      Both ctop.h and <soc/nps/common.h> use u32 types and cause many
      errors.
      
      Examples:
      ../include/soc/nps/common.h:71:4: error: unknown type name 'u32'
          u32 __reserved:20, cluster:4, core:4, thread:4;
      ../include/soc/nps/common.h:76:3: error: unknown type name 'u32'
         u32 value;
      ../include/soc/nps/common.h:124:4: error: unknown type name 'u32'
          u32 base:8, cl_x:4, cl_y:4,
      ../include/soc/nps/common.h:127:3: error: unknown type name 'u32'
         u32 value;
      
      ../arch/arc/plat-eznps/include/plat/ctop.h:83:4: error: unknown type name 'u32'
          u32 gen:1, gdis:1, clk_gate_dis:1, asb:1,
      ../arch/arc/plat-eznps/include/plat/ctop.h:86:3: error: unknown type name 'u32'
         u32 value;
      ../arch/arc/plat-eznps/include/plat/ctop.h:93:4: error: unknown type name 'u32'
          u32 csa:22, dmsid:6, __reserved:3, cs:1;
      ../arch/arc/plat-eznps/include/plat/ctop.h:95:3: error: unknown type name 'u32'
         u32 value;
      
      Cc: linux-snps-arc@lists.infradead.org
      Cc: Ofer Levi <oferle@mellanox.com>
      Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      b1f32ce1
    • O
      ARC: [plat-eznps] Add missing struct nps_host_reg_aux_dpc · 05b466bf
      Ofer Levi 提交于
      Fixing compilation issue caused by missing struct nps_host_reg_aux_dpc
      definition.
      
      Fixes: 3f9cd874 ("ARC: [plat-eznps] avoid toggling of DPC register")
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NOfer Levi <oferle@mellanox.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      05b466bf
    • E
      ARC: add SMP_CACHE_BYTES value validate · 386177da
      Eugeniy Paltsev 提交于
      Check that SMP_CACHE_BYTES (and hence ARCH_DMA_MINALIGN) is larger
      or equal to any cache line length by comparing it with values
      previously read from ARC cache BCR registers.
      Signed-off-by: NEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      386177da
  2. 28 7月, 2018 2 次提交
    • E
      ARC: dma [non-IOC] setup SMP_CACHE_BYTES and cache_line_size · eb277739
      Eugeniy Paltsev 提交于
      As for today we don't setup SMP_CACHE_BYTES and cache_line_size for
      ARC, so they are set to L1_CACHE_BYTES by default. L1 line length
      (L1_CACHE_BYTES) might be easily smaller than L2 line (which is
      usually the case BTW). This breaks code.
      
      For example this breaks ethernet infrastructure on HSDK/AXS103 boards
      with IOC disabled, involving manual cache flushes
      Functions which alloc and manage sk_buff packet data area rely on
      SMP_CACHE_BYTES define. In the result we can share last L2 cache
      line in sk_buff linear packet data area between DMA buffer and
      some useful data in other structure. So we can lose this data when
      we invalidate DMA buffer.
      
         sk_buff linear packet data area
                      |
                      |
                      |         skb->end        skb->tail
                      V            |                |
                                   V                V
      ----------------------------------------------.
            packet data            | <tail padding> |  <useful data in other struct>
      ----------------------------------------------.
      
      ---------------------.--------------------------------------------------.
           SLC line        |             SLC (L2 cache) line (128B)           |
      ---------------------.--------------------------------------------------.
              ^                                     ^
              |                                     |
           These cache lines will be invalidated when we invalidate skb
           linear packet data area before DMA transaction starting.
      
      This leads to issues painful to debug as it reproduces only if
      (sk_buff->end - sk_buff->tail) < SLC_LINE_SIZE and
      if we have some useful data right after sk_buff->end.
      
      Fix that by hardcode SMP_CACHE_BYTES to max line length we may have.
      Signed-off-by: NEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      eb277739
    • E
      ARC: dma [non IOC]: fix arc_dma_sync_single_for_(device|cpu) · 4c612add
      Eugeniy Paltsev 提交于
      ARC backend for dma_sync_single_for_(device|cpu) was broken as it was
      not honoring the @dir argument and simply forcing it based on the call:
       - arc_dma_sync_single_for_device(dir) assumed DMA_TO_DEVICE (cache wback)
       - arc_dma_sync_single_for_cpu(dir) assumed DMA_FROM_DEVICE (cache inv)
      
      This is not true given the DMA API programming model and has been
      discussed here [1] in some detail.
      
      Interestingly while the deficiency has been there forever, it only started
      showing up after 4.17 dma common ops rework, commit a8eb92d0
      ("arc: fix arc_dma_{map,unmap}_page") which wired up these calls under the
      more commonly used dma_map_page API triggering the issue.
      
      [1]: https://lkml.org/lkml/2018/5/18/979
      Fixes: commit a8eb92d0 ("arc: fix arc_dma_{map,unmap}_page")
      Cc: stable@kernel.org # v4.17+
      Signed-off-by: NEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      [vgupta: reworked changelog]
      4c612add
  3. 25 7月, 2018 1 次提交
  4. 23 7月, 2018 4 次提交
    • L
      Linux 4.18-rc6 · d72e90f3
      Linus Torvalds 提交于
      d72e90f3
    • L
      Merge tag 'nvme-for-4.18' of git://git.infradead.org/nvme · 74413084
      Linus Torvalds 提交于
      Pull NVMe fixes from Christoph Hellwig:
      
       - fix a regression in 4.18 that causes a memory leak on probe failure
         (Keith Bush)
      
       - fix a deadlock in the passthrough ioctl code (Scott Bauer)
      
       - don't enable AENs if not supported (Weiping Zhang)
      
       - fix an old regression in metadata handling in the passthrough ioctl
         code (Roland Dreier)
      
      * tag 'nvme-for-4.18' of git://git.infradead.org/nvme:
        nvme: fix handling of metadata_len for NVME_IOCTL_IO_CMD
        nvme: don't enable AEN if not supported
        nvme: ensure forward progress during Admin passthru
        nvme-pci: fix memory leak on probe failure
      74413084
    • L
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 165ea0d1
      Linus Torvalds 提交于
      Pull vfs fixes from Al Viro:
       "Fix several places that screw up cleanups after failures halfway
        through opening a file (one open-coding filp_clone_open() and getting
        it wrong, two misusing alloc_file()). That part is -stable fodder from
        the 'work.open' branch.
      
        And Christoph's regression fix for uapi breakage in aio series;
        include/uapi/linux/aio_abi.h shouldn't be pulling in the kernel
        definition of sigset_t, the reason for doing so in the first place had
        been bogus - there's no need to expose struct __aio_sigset in
        aio_abi.h at all"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        aio: don't expose __aio_sigset in uapi
        ocxlflash_getfile(): fix double-iput() on alloc_file() failures
        cxl_getfile(): fix double-iput() on alloc_file() failures
        drm_mode_create_lease_ioctl(): fix open-coded filp_clone_open()
      165ea0d1
    • A
      alpha: fix osf_wait4() breakage · f88a333b
      Al Viro 提交于
      kernel_wait4() expects a userland address for status - it's only
      rusage that goes as a kernel one (and needs a copyout afterwards)
      
      [ Also, fix the prototype of kernel_wait4() to have that __user
        annotation   - Linus ]
      
      Fixes: 92ebce5a ("osf_wait4: switch to kernel_wait4()")
      Cc: stable@kernel.org # v4.13+
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f88a333b
  5. 22 7月, 2018 16 次提交
  6. 21 7月, 2018 10 次提交
  7. 20 7月, 2018 3 次提交