1. 05 May, 2016 3 commits
    • Vineet Gupta's avatar
      ARC: support HIGHMEM even without PAE40 · 26f9d5fd
      Vineet Gupta authored
      Initial HIGHMEM support on ARC was introduced for PAE40 where the low
      memory (0x8000_0000 based) and high memory (0x1_0000_0000) were
      physically contiguous. So CONFIG_FLATMEM sufficed (despite a peipheral
      hole in the middle, which wasted a bit of struct page memory, but things
      worked).
      
      However w/o PAE, highmem was not possible and we could only reach
      ~1.75GB of DDR. Now there is a use case to access ~4GB of DDR w/o PAE40
      The idea is to have low memory at canonical 0x8000_0000 and highmem
      at 0 so enire 4GB address space is available for physical addressing
      This needs additional platform/interconnect mapping to convert
      the non contiguous physical addresses into linear bus adresses.
      
      From Linux point of view, non contiguous divide means FLATMEM no
      longer works and DISCONTIGMEM is needed to track the pfns in the 2
      regions.
      
      This scheme would also work for PAE40, only better in that we don't
      waste struct page memory for the peripheral hole.
      
      The DT description will be something like
      
          memory {
              ...
              reg = <0x80000000 0x200000000   /* 512MB: lowmem */
                     0x00000000 0x10000000>;  /* 256MB: highmem */
         }
      Signed-off-by: default avatarNoam Camus <noamc@ezchip.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      26f9d5fd
    • Vineet Gupta's avatar
      ARC: Fix PAE40 boot failures due to PTE truncation · 2519d753
      Vineet Gupta authored
      So a benign looking cleanup which macro'ized PAGE_SHIFT shifts turned
      out to be bad (since it was done non-sensically across the board).
      
      It caused boot failures with PAE40 as forced cast to (unsigned long)
      from newly introduced virt_to_pfn() was causing truncatiion of the
      (long long) pte/paddr values.
      
      It is OK to use this in accessors dealing with kernel virtual address,
      pointers etc, but not for PTE values themelves.
      
      Fixes: cJ2ff5cf2735c ("ARC: mm: Use virt_to_pfn() for addr >> PAGE_SHIFT pattern)
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      2519d753
    • Vineet Gupta's avatar
      ARC: Add missing io barriers to io{read,write}{16,32}be() · e5bc0478
      Vineet Gupta authored
      While reviewing a different change to asm-generic/io.h Arnd spotted that
      ARC ioread32 and ioread32be both of which come from asm-generic versions
      are not symmetrical in terms of calling the io barriers.
      
      generic ioread32   -> ARC readl()                  [ has barriers]
      generic ioread32be -> __be32_to_cpu(__raw_readl()) [ lacks barriers]
      
      While generic ioread32be is being remediated to call readl(), that involves
      a swab32(), causing double swaps on ioread32be() on Big Endian systems.
      
      So provide our versions of big endian IO accessors to ensure io barrier
      calls while also keeping them optimal
      Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: stable@vger.kernel.org  [4.2+]
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      e5bc0478
  2. 27 Apr, 2016 2 commits
  3. 25 Apr, 2016 1 commit
  4. 22 Apr, 2016 1 commit
    • Evgeny Voevodin's avatar
      ARCv2: Enable LOCKDEP · d9676fa1
      Evgeny Voevodin authored
      - The asm helpers for calling into irq tracer were missing
      
      - Add calls to above helpers in low level assembly entry code for ARCv2
      
      - irq_save() uses CLRI to disable interrupts and returns the prev interrupt
        state (in STATUS32) in a specific encoding (and not the raw value of
        STATUS32). This is usable with SETI in irq_restore(). However
        save_flags() reads the raw value of STATUS32 which doesn't pair with
        irq_save/restore() and thus needs fixing.
      Signed-off-by: default avatarEvgeny Voevodin <evgeny.voevodin@intel.com>
      [vgupta: updated changelog and also added some comments]
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      d9676fa1
  5. 18 Apr, 2016 1 commit
  6. 17 Apr, 2016 5 commits
  7. 16 Apr, 2016 7 commits
  8. 15 Apr, 2016 17 commits
  9. 14 Apr, 2016 3 commits
    • Mike Snitzer's avatar
      dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros · 9567366f
      Mike Snitzer authored
      The READ_LOCK macro was incorrectly returning -EINVAL if
      dm_bm_is_read_only() was true -- it will always be true once the cache
      metadata transitions to read-only by dm_cache_metadata_set_read_only().
      
      Wrap READ_LOCK and WRITE_LOCK multi-statement macros in do {} while(0).
      Also, all accesses of the 'cmd' argument passed to these related macros
      are now encapsulated in parenthesis.
      
      A follow-up patch can be developed to eliminate the use of macros in
      favor of pure C code.  Avoiding that now given that this needs to apply
      to stable@.
      Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Fixes: d14fcf3d ("dm cache: make sure every metadata function checks fail_io")
      Cc: stable@vger.kernel.org
      9567366f
    • Keith Busch's avatar
      NVMe: Always use MSI/MSI-x interrupts · a5229050
      Keith Busch authored
      Multiple users have reported device initialization failure due the driver
      not receiving legacy PCI interrupts. This is not unique to any particular
      controller, but has been observed on multiple platforms.
      
      There have been no issues reported or observed when with message signaled
      interrupts, so this patch attempts to use MSI-x during initialization,
      falling back to MSI. If that fails, legacy would become the default.
      
      The setup_io_queues error handling had to change as a result: the admin
      queue's msix_entry used to be initialized to the legacy IRQ. The case
      where nr_io_queues is 0 would fail request_irq when setting up the admin
      queue's interrupt since re-enabling MSI-x fails with 0 vectors, leaving
      the admin queue's msix_entry invalid. Instead, return success immediately.
      Reported-by: default avatarTim Muhlemmer <muhlemmer@gmail.com>
      Reported-by: default avatarJon Derrick <jonathan.derrick@intel.com>
      Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      a5229050
    • Linus Torvalds's avatar
      /proc/iomem: only expose physical resource addresses to privileged users · 51d7b120
      Linus Torvalds authored
      In commit c4004b02 ("x86: remove the kernel code/data/bss resources
      from /proc/iomem") I was hoping to remove the phyiscal kernel address
      data from /proc/iomem entirely, but that had to be reverted because some
      system programs actually use it.
      
      This limits all the detailed resource information to properly
      credentialed users instead.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      51d7b120