1. 17 1月, 2016 1 次提交
  2. 16 1月, 2016 4 次提交
    • D
      kvm: rename pfn_t to kvm_pfn_t · ba049e93
      Dan Williams 提交于
      To date, we have implemented two I/O usage models for persistent memory,
      PMEM (a persistent "ram disk") and DAX (mmap persistent memory into
      userspace).  This series adds a third, DAX-GUP, that allows DAX mappings
      to be the target of direct-i/o.  It allows userspace to coordinate
      DMA/RDMA from/to persistent memory.
      
      The implementation leverages the ZONE_DEVICE mm-zone that went into
      4.3-rc1 (also discussed at kernel summit) to flag pages that are owned
      and dynamically mapped by a device driver.  The pmem driver, after
      mapping a persistent memory range into the system memmap via
      devm_memremap_pages(), arranges for DAX to distinguish pfn-only versus
      page-backed pmem-pfns via flags in the new pfn_t type.
      
      The DAX code, upon seeing a PFN_DEV+PFN_MAP flagged pfn, flags the
      resulting pte(s) inserted into the process page tables with a new
      _PAGE_DEVMAP flag.  Later, when get_user_pages() is walking ptes it keys
      off _PAGE_DEVMAP to pin the device hosting the page range active.
      Finally, get_page() and put_page() are modified to take references
      against the device driver established page mapping.
      
      Finally, this need for "struct page" for persistent memory requires
      memory capacity to store the memmap array.  Given the memmap array for a
      large pool of persistent may exhaust available DRAM introduce a
      mechanism to allocate the memmap from persistent memory.  The new
      "struct vmem_altmap *" parameter to devm_memremap_pages() enables
      arch_add_memory() to use reserved pmem capacity rather than the page
      allocator.
      
      This patch (of 18):
      
      The core has developed a need for a "pfn_t" type [1].  Move the existing
      pfn_t in KVM to kvm_pfn_t [2].
      
      [1]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002199.html
      [2]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002218.htmlSigned-off-by: NDan Williams <dan.j.williams@intel.com>
      Acked-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ba049e93
    • M
      arch/arm/include/asm/pgtable-3level.h: add pmd_mkclean for THP · 44842045
      Minchan Kim 提交于
      MADV_FREE needs pmd_dirty and pmd_mkclean for detecting recent overwrite
      of the contents since MADV_FREE syscall is called for THP page.
      
      This patch adds pmd_mkclean for THP page MADV_FREE support.
      Signed-off-by: NMinchan Kim <minchan@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: <yalin.wang2010@gmail.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Chen Gang <gang.chen.5i5j@gmail.com>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Daniel Micay <danielmicay@gmail.com>
      Cc: Darrick J. Wong <darrick.wong@oracle.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Jason Evans <je@fb.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Mika Penttil <mika.penttila@nextfour.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      44842045
    • K
      mm: differentiate page_mapped() from page_mapcount() for compound pages · e1534ae9
      Kirill A. Shutemov 提交于
      Let's define page_mapped() to be true for compound pages if any
      sub-pages of the compound page is mapped (with PMD or PTE).
      
      On other hand page_mapcount() return mapcount for this particular small
      page.
      
      This will make cases like page_get_anon_vma() behave correctly once we
      allow huge pages to be mapped with PTE.
      
      Most users outside core-mm should use page_mapcount() instead of
      page_mapped().
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Tested-by: NSasha Levin <sasha.levin@oracle.com>
      Tested-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Acked-by: NJerome Marchand <jmarchan@redhat.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Steve Capper <steve.capper@linaro.org>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: David Rientjes <rientjes@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e1534ae9
    • K
      arm, thp: remove infrastructure for handling splitting PMDs · 0ebd7446
      Kirill A. Shutemov 提交于
      With new refcounting we don't need to mark PMDs splitting.  Let's drop
      code to handle this.
      
      pmdp_splitting_flush() is not needed too: on splitting PMD we will do
      pmdp_clear_flush() + set_pte_at().  pmdp_clear_flush() will do IPI as
      needed for fast_gup.
      
      [arnd@arndb.de: fix unterminated ifdef in header file]
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Sasha Levin <sasha.levin@oracle.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Jerome Marchand <jmarchan@redhat.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Steve Capper <steve.capper@linaro.org>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: David Rientjes <rientjes@google.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0ebd7446
  3. 15 1月, 2016 1 次提交
    • D
      arm: mm: support ARCH_MMAP_RND_BITS · e0c25d95
      Daniel Cashman 提交于
      arm: arch_mmap_rnd() uses a hard-code value of 8 to generate the random
      offset for the mmap base address.  This value represents a compromise
      between increased ASLR effectiveness and avoiding address-space
      fragmentation.  Replace it with a Kconfig option, which is sensibly
      bounded, so that platform developers may choose where to place this
      compromise.  Keep 8 as the minimum acceptable value.
      
      [arnd@arndb.de: ARM: avoid ARCH_MMAP_RND_BITS for NOMMU]
      Signed-off-by: NDaniel Cashman <dcashman@google.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: NKees Cook <keescook@chromium.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Mark Salyzyn <salyzyn@android.com>
      Cc: Jeff Vander Stoep <jeffv@google.com>
      Cc: Nick Kralevich <nnk@google.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Hector Marco-Gisbert <hecmargi@upv.es>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e0c25d95
  4. 13 1月, 2016 2 次提交
  5. 09 1月, 2016 1 次提交
  6. 08 1月, 2016 1 次提交
  7. 07 1月, 2016 5 次提交
    • R
      dts: vt8500: Add SDHC node to DTS file for WM8650 · 0f090bf1
      Roman Volkov 提交于
      Since WM8650 has the same 'WMT' SDHC controller as WM8505, and the driver
      is already in the kernel, this node enables the controller support for
      WM8650
      Signed-off-by: NRoman Volkov <rvolkov@v1ros.org>
      Reviewed-by: NAlexey Charkov <alchark@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      0f090bf1
    • T
      ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices · 5b1a6181
      Timo Sigurdsson 提交于
      Commit 69fb4dca ("power: Add an axp20x-usb-power driver") introduced a
      new driver for the USB power supply used on various Allwinner based SBCs.
      However, the driver was not added to multi_v7_defconfig which breaks USB
      support for some boards (e.g. LeMaker BananaPi) as the kernel will now
      turn off the USB power supply during boot by default if the driver isn't
      present. (This was not the case in linux 4.3 or lower where the USB power
      was always left on.)
      
      Hence, add the driver to multi_v7_defconfig in order to keep USB support
      working on those boards that require it.
      Signed-off-by: NTimo Sigurdsson <public_timo.s@silentcreek.de>
      Tested-by: NTimo Sigurdsson <public_timo.s@silentcreek.de>
      Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      5b1a6181
    • L
      ARM: versatile: fix MMC/SD interrupt assignment · 20f12758
      Linus Walleij 提交于
      Commit 0976c946
      "arm/versatile: Fix versatile irq specifications"
      has an off-by-one error on the Versatile AB that has
      been regressing the Versatile AB hardware for some time.
      
      However it seems like the interrupt assignments have
      never been correct and I have now adjusted them according
      to the specification. The masks for the valid interrupts
      made it impossible to assign the right SIC interrupt
      for the MMCI, so I went in and fixed these to correspond
      to the specifications, and added references if anyone
      wants to double-check.
      
      Due to the Versatile PB including the Versatile AB
      as a base DTS file, we need to override and correct
      some values to correspond to the actual changes in the
      hardware.
      
      For the Versatile PB I don't think the IRQ line
      assignment for MMCI has ever been correct for either of
      the two MMCI blocks. It would be nice if someone with the
      physical PB board could test this.
      
      Patch tested on the Versatile AB, QEMU for Versatile AB
      and QEMU for Versatile PB.
      
      Cc: Rob Herring <robh@kernel.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: stable@vger.kernel.org
      Fixes: 0976c946 ("arm/versatile: Fix versatile irq specifications")
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      20f12758
    • L
      ARM: nomadik: set latencies to 8 cycles · a461a3ec
      Linus Walleij 提交于
      The Nomadik has sporadic crashes because of these latencies, setting
      them to max makes the platform work nicely, so use this values for
      now.
      
      These latencies were set to 2 since the Nomadik platform was merged,
      but I suspect they never took effect until the right size and
      associativity for the cache was specified in the device tree and
      that is why the crash comes now.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      a461a3ec
    • T
      ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption · e7b11dc7
      Tony Lindgren 提交于
      Commit 63aa945b ("memory: omap-gpmc: Add Kconfig option for debug")
      unified the GPMC debug for the SoCs with GPMC. The commit also left out
      the option for HWMOD_INIT_NO_RESET as we now require proper timings for
      GPMC to be able to remap GPMC devices out of address 0.
      
      Unfortunately on Nokia N900, onenand now only partially works with the
      device tree provided timings. It works enough to get detected but the
      clock rate supported by the onenand chip gets misdetected. This in turn
      causes the GPMC timings to be miscalculated and this leads into file
      system corruption on N900.
      
      Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync
      write. This is needed also for async timings when we write to onenand
      with omap2_onenand_set_async_mode(). Without sync write bit set, the
      async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff.
      
      Let's exit with an error if onenand rate is not detected. And let's
      remove the extra call to omap2_onenand_set_async_mode() as we only need
      to do this once at the end of omap2_onenand_setup_async().
      
      Fixes: 63aa945b ("memory: omap-gpmc: Add Kconfig option for debug")
      Cc: stable@vger.kernel.org # v4.2+
      Reported-by: NIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
      Tested-by: NIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
      Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      e7b11dc7
  8. 06 1月, 2016 2 次提交
  9. 05 1月, 2016 3 次提交
  10. 04 1月, 2016 4 次提交
  11. 01 1月, 2016 1 次提交
  12. 30 12月, 2015 1 次提交
  13. 23 12月, 2015 4 次提交
    • T
      ARM: OMAP2+: Fix randconfig build warning for dm814_pllss_data · dbb7e70a
      Tony Lindgren 提交于
      Fix warning for arch/arm/mach-omap2/prm_common.c:666:35: warning:
      ‘dm814_pllss_data’ defined but not used [-Wunused-variable]".
      
      This can happen if CONFIG_SOC_TI81XX is not selected.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      dbb7e70a
    • J
      ARM: tegra: Fix suspend hang on Tegra124 Chromebooks · 80373d37
      Jon Hunter 提交于
      Enabling CPUFreq support for Tegra124 Chromebooks is causing the Tegra124
      to hang when resuming from suspend.
      
      When CPUFreq is enabled, the CPU clock is changed from the PLLX clock to
      the DFLL clock during kernel boot. When resuming from suspend the CPU
      clock is temporarily changed back to the PLLX clock before switching back
      to the DFLL. If the DFLL is operating at a much lower frequency than the
      PLLX when we enter suspend, and so the CPU voltage rail is at a voltage
      too low for the CPUs to operate at the PLLX frequency, then the device
      will hang.
      
      Please note that the PLLX is used in the resume sequence to switch the CPU
      clock from the very slow 32K clock to a faster clock during early resume
      to speed up the resume sequence before the DFLL is resumed.
      
      Ideally, we should fix this by setting the suspend frequency so that it
      matches the PLLX frequency, however, that would be a bigger change. For
      now simply disable CPUFreq support for Tegra124 Chromebooks to avoid the
      hang when resuming from suspend.
      
      Fixes: 9a0baee9 ("ARM: tegra: Enable CPUFreq support for Tegra124
      		      Chromebooks")
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      80373d37
    • L
      ARM: sa1100/simpad: Be sure to clamp return value · 1f33b013
      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: arm@kernel.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      1f33b013
    • L
      ARM: scoop: Be sure to clamp return value · 86d5e657
      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: arm@kernel.org
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      86d5e657
  14. 22 12月, 2015 5 次提交
  15. 21 12月, 2015 5 次提交