1. 23 4月, 2016 10 次提交
  2. 16 4月, 2016 1 次提交
  3. 08 4月, 2016 3 次提交
    • D
      libnvdimm, pfn: fix nvdimm_namespace_add_poison() vs section alignment · a3901802
      Dan Williams 提交于
      When section alignment padding is in effect we need to shift / truncate
      the range that is queried for poison by the 'start_pad' or 'end_trunc'
      reservations.
      
      It's easiest if we just pass in an adjusted resource range rather than
      deriving it from the passed in namespace.  With the resource range
      resolution pushed out to the caller we can also push the
      namespace-to-region lookup to the caller and drop the implicit pmem-type
      assumption about the passed in namespace object.
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a3901802
    • D
      libnvdimm, pfn: fix uuid validation · e5670563
      Dan Williams 提交于
      If we detect a namespace has a stale info block in the init path, we
      should overwrite with the latest configuration.  In fact, we already
      return -ENODEV when the parent uuid is invalid, the same should be done
      for the 'self' uuid.  Otherwise we can get into a condition where
      userspace is unable to reconfigure the pfn-device without directly /
      manually invalidating the info block.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e5670563
    • D
      libnvdimm: fix smart data retrieval · 21129112
      Dan Williams 提交于
      It appears that smart data retrieval has been broken the since the
      initial implementation.  Fix the payload size to be 128-bytes per the
      specification.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      21129112
  4. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf
  5. 29 3月, 2016 1 次提交
  6. 10 3月, 2016 5 次提交
  7. 07 3月, 2016 1 次提交
  8. 06 3月, 2016 11 次提交
  9. 24 2月, 2016 2 次提交
    • A
      nvdimm: use 'u64' for pfn flags · c4544205
      Arnd Bergmann 提交于
      A recent bugfix changed pfn_t to always be 64-bit wide, but did not
      change the code in pmem.c, which is now broken on 32-bit architectures
      as reported by gcc:
      
      In file included from ../drivers/nvdimm/pmem.c:28:0:
      drivers/nvdimm/pmem.c: In function 'pmem_alloc':
      include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
       #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
      
      This changes the intermediate pfn_flags in struct pmem_device to
      be 64 bit wide as well, so they can store the flags correctly.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: db78c222 ("mm: fix pfn_t vs highmem")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      c4544205
    • D
      nfit: update address range scrub commands to the acpi 6.1 format · 4577b066
      Dan Williams 提交于
      The original format of these commands from the "NVDIMM DSM Interface
      Example" [1] are superseded by the ACPI 6.1 definition of the "NVDIMM Root
      Device _DSMs" [2].
      
      [1]: http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
      [2]: http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf
           "9.20.7 NVDIMM Root Device _DSMs"
      
      Changes include:
      1/ New 'restart' fields in ars_status, unfortunately these are
         implemented in the middle of the existing definition so this change
         is not backwards compatible.  The expectation is that shipping
         platforms will only ever support the ACPI 6.1 definition.
      
      2/ New status values for ars_start ('busy') and ars_status ('overflow').
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Linda Knippers <linda.knippers@hpe.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      4577b066
  10. 20 2月, 2016 1 次提交
  11. 17 2月, 2016 1 次提交
  12. 30 1月, 2016 2 次提交
    • T
      x86, kexec, nvdimm: Use walk_iomem_res_desc() for iomem search · f0f4711a
      Toshi Kani 提交于
      Change the callers of walk_iomem_res() scanning for the
      following resources by name to use walk_iomem_res_desc()
      instead.
      
       "ACPI Tables"
       "ACPI Non-volatile Storage"
       "Persistent Memory (legacy)"
       "Crash kernel"
      
      Note, the caller of walk_iomem_res() with "GART" will be removed
      in a later patch.
      Signed-off-by: NToshi Kani <toshi.kani@hpe.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Reviewed-by: NDave Young <dyoung@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Chun-Yi <joeyli.kernel@gmail.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Lee, Chun-Yi <joeyli.kernel@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Minfei Huang <mnfhuang@gmail.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Takao Indoh <indou.takao@jp.fujitsu.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: kexec@lists.infradead.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-mm <linux-mm@kvack.org>
      Cc: linux-nvdimm@lists.01.org
      Link: http://lkml.kernel.org/r/1453841853-11383-15-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      f0f4711a
    • D
      libnvdimm, pfn: fix restoring memmap location · 45eb570a
      Dan Williams 提交于
      This path was missed when turning on the memmap in pmem support.  Permit
      'pmem' as a valid location for the map.
      Reported-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      45eb570a
  13. 27 1月, 2016 1 次提交