1. 09 5月, 2017 1 次提交
  2. 19 11月, 2016 1 次提交
  3. 07 11月, 2016 1 次提交
  4. 06 5月, 2016 2 次提交
    • R
      mtd: mtd: drop NAND_ECC_SOFT_BCH enum value · e4225ae8
      Rafał Miłecki 提交于
      This value should not be part of nand_ecc_modes_t as it specifies
      algorithm not a mode. We successfully managed to introduce new "algo"
      field which is respected now.
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      e4225ae8
    • J
      mtd: nandsim: add __init attribute · 77784785
      Julia Lawall 提交于
      Add __init attribute on functions that are only called from other __init
      functions and that are not inlined, at least with gcc version 4.8.4 on an
      x86 machine with allyesconfig.  Currently, the functions are put in the
      .text.unlikely segment.  Declaring them as __init will cause them to be
      put in the .init.text and to disappear after initialization.
      
      The result of objdump -x on the functions before the change is as follows:
      
      000000000000059a l     F .text.unlikely 0000000000000239 alloc_device
      000000000000034e l     F .text.unlikely 000000000000002e get_partition_name
      00000000000007d3 l     F .text.unlikely 00000000000005da init_nandsim
      
      And after the change it is as follows:
      
      0000000000000029 l     F .init.text	0000000000000234 alloc_device
      0000000000000000 l     F .init.text	0000000000000029 get_partition_name
      000000000000025d l     F .init.text	00000000000005d5 init_nandsim
      
      Done with the help of Coccinelle.  The semantic patch checks for local
      static non-init functions that are called from an __init function and are
      not called from any other function.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      77784785
  5. 20 4月, 2016 1 次提交
  6. 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
  7. 08 1月, 2016 2 次提交
  8. 19 12月, 2015 2 次提交
  9. 09 12月, 2015 1 次提交
  10. 22 9月, 2015 1 次提交
  11. 07 7月, 2015 2 次提交
  12. 17 6月, 2015 1 次提交
  13. 02 2月, 2015 1 次提交
  14. 16 1月, 2015 1 次提交
  15. 23 10月, 2014 1 次提交
    • A
      nandsim: add id_bytes module parameter · b00358a5
      Akinobu Mita 提交于
      nandsim can simulate NAND Flash which returns the ID bytes specified
      by first_id_byte, ..., fourth_id_byte module parameters.
      
      In order to simulate NAND flash which returns more than four ID bytes,
      this adds id_bytes module parameter which is specified by the array of
      byte like this:
      
       # modprobe nandsim id_bytes=0x98,0xdc,0x90,0x26,0x76,0x15,0x01,0x08 bch=1
      
      This doesn't add fifth_id_byte, ..., seventh_id_byte module parameters,
      because they are redundant.  But the existing first_id_byte, ...,
      fourth_id_byte module parameters are preserved and add "(obsolete)" to
      the description.
      
      Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: linux-mtd@lists.infradead.org
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      b00358a5
  16. 20 8月, 2014 1 次提交
  17. 07 5月, 2014 1 次提交
    • A
      replace checking for ->read/->aio_read presence with check in ->f_mode · 7f7f25e8
      Al Viro 提交于
      Since we are about to introduce new methods (read_iter/write_iter), the
      tests in a bunch of places would have to grow inconveniently.  Check
      once (at open() time) and store results in ->f_mode as FMODE_CAN_READ
      and FMODE_CAN_WRITE resp.  It might end up being a temporary measure -
      once everything switches from ->aio_{read,write} to ->{read,write}_iter
      it might make sense to return to open-coded checks.  We'll see...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7f7f25e8
  18. 28 10月, 2013 1 次提交
  19. 25 10月, 2013 1 次提交
  20. 31 8月, 2013 1 次提交
  21. 06 8月, 2013 6 次提交
  22. 05 4月, 2013 3 次提交
  23. 26 2月, 2013 1 次提交
  24. 04 2月, 2013 1 次提交
  25. 18 12月, 2012 1 次提交
  26. 10 12月, 2012 1 次提交
  27. 29 9月, 2012 2 次提交
  28. 06 7月, 2012 1 次提交
    • H
      mtd: nandsim: don't open code a do_div helper · 596fd462
      Herton Ronaldo Krzesinski 提交于
      We don't need to open code the divide function, just use div_u64 that
      already exists and do the same job. While this is a straightforward
      clean up, there is more to that, the real motivation for this.
      
      While building on a cross compiling environment in armel, using gcc
      4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5), I was getting the following build
      error:
      
      ERROR: "__aeabi_uldivmod" [drivers/mtd/nand/nandsim.ko] undefined!
      
      After investigating with objdump and hand built assembly version
      generated with the compiler, I narrowed __aeabi_uldivmod as being
      generated from the divide function. When nandsim.c is built with
      -fno-inline-functions-called-once, that happens when
      CONFIG_DEBUG_SECTION_MISMATCH is enabled, the do_div optimization in
      arch/arm/include/asm/div64.h doesn't work as expected with the open
      coded divide function: even if the do_div we are using doesn't have a
      constant divisor, the compiler still includes the else parts of the
      optimized do_div macro, and translates the divisions there to use
      __aeabi_uldivmod, instead of only calling __do_div_asm -> __do_div64 and
      optimizing/removing everything else out.
      
      So to reproduce, gcc 4.6 plus CONFIG_DEBUG_SECTION_MISMATCH=y and
      CONFIG_MTD_NAND_NANDSIM=m should do it, building on armel.
      
      After this change, the compiler does the intended thing even with
      -fno-inline-functions-called-once, and optimizes out as expected the
      constant handling in the optimized do_div on arm. As this also avoids a
      build issue, I'm marking for Stable, as I think is applicable for this
      case.
      Signed-off-by: NHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
      Cc: stable@vger.kernel.org
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      596fd462