09 Sep, 2015

1 commit

  • Pull libnvdimm updates from Dan Williams:
    "This update has successfully completed a 0day-kbuild run and has
    appeared in a linux-next release. The changes outside of the typical
    drivers/nvdimm/ and drivers/acpi/nfit.[ch] paths are related to the
    removal of IORESOURCE_CACHEABLE, the introduction of memremap(), and
    the introduction of ZONE_DEVICE + devm_memremap_pages().

    Summary:

    - Introduce ZONE_DEVICE and devm_memremap_pages() as a generic
    mechanism for adding device-driver-discovered memory regions to the
    kernel's direct map.

    This facility is used by the pmem driver to enable pfn_to_page()
    operations on the page frames returned by DAX ('direct_access' in
    'struct block_device_operations').

    For now, the 'memmap' allocation for these "device" pages comes
    from "System RAM". Support for allocating the memmap from device
    memory will arrive in a later kernel.

    - Introduce memremap() to replace usages of ioremap_cache() and
    ioremap_wt(). memremap() drops the __iomem annotation for these
    mappings to memory that do not have i/o side effects. The
    replacement of ioremap_cache() with memremap() is limited to the
    pmem driver to ease merging the api change in v4.3.

    Completion of the conversion is targeted for v4.4.

    - Similar to the usage of memcpy_to_pmem() + wmb_pmem() in the pmem
    driver, update the VFS DAX implementation and PMEM api to provide
    persistence guarantees for kernel operations on a DAX mapping.

    - Convert the ACPI NFIT 'BLK' driver to map the block apertures as
    cacheable to improve performance.

    - Miscellaneous updates and fixes to libnvdimm including support for
    issuing "address range scrub" commands, clarifying the optimal
    'sector size' of pmem devices, a clarification of the usage of the
    ACPI '_STA' (status) property for DIMM devices, and other minor
    fixes"

    * tag 'libnvdimm-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (34 commits)
    libnvdimm, pmem: direct map legacy pmem by default
    libnvdimm, pmem: 'struct page' for pmem
    libnvdimm, pfn: 'struct page' provider infrastructure
    x86, pmem: clarify that ARCH_HAS_PMEM_API implies PMEM mapped WB
    add devm_memremap_pages
    mm: ZONE_DEVICE for "device memory"
    mm: move __phys_to_pfn and __pfn_to_phys to asm/generic/memory_model.h
    dax: drop size parameter to ->direct_access()
    nd_blk: change aperture mapping from WC to WB
    nvdimm: change to use generic kvfree()
    pmem, dax: have direct_access use __pmem annotation
    dax: update I/O path to do proper PMEM flushing
    pmem: add copy_from_iter_pmem() and clear_pmem()
    pmem, x86: clean up conditional pmem includes
    pmem: remove layer when calling arch_has_wmb_pmem()
    pmem, x86: move x86 PMEM API to new pmem.h header
    libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option
    pmem: switch to devm_ allocations
    devres: add devm_memremap
    libnvdimm, btt: write and validate parent_uuid
    ...

    Linus Torvalds
     

22 Aug, 2015

1 commit

  • The SPI core currently reports the MODALIAS uevent as "spi:"
    even for SPI devices that were registered by OF.

    That means the OF module alias exported by MODULE_OF_TABLE(of,...) is
    currently not used and user-space has no way to autoload this module.

    But it is still a good practice to add the OF module alias information
    into the kernel module even when it currently is unused so once the SPI
    core is changed to report a correct OF modalias uevent, module
    autoloading will be working for this driver.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Brian Norris

    Javier Martinez Canillas
     

11 Aug, 2015

1 commit


22 Jul, 2015

1 commit

  • When we added the "jedec,spi-nor" compatible string for use in this
    driver, we added it as a modalias option. The modalias can be derived in
    different ways for platform devices vs. device tree (of_*) matching. But
    for device tree matching (the primary target of this identifier string),
    the modalias is determined from the first entry in the 'compatible'
    property. IOW, the following properties would bind to this driver:

    // Option (a), modalias = "spi-nor"
    compatible = "jedec,spi-nor";

    // Option (b), modalias = "spi-nor"
    compatible = "idontknowwhatimdoing,spi-nor";

    But the following would not:

    // Option (c), modalias = "shinynewdevice"
    compatible = "myvendor,shinynewdevice", "jedec,spi-nor";

    So, we'd like to match (a) and (c) (even when we don't have an explicit
    entry for "shinynewdevice"), and we'd rather not allow (b).

    To do this, we
    (1) always (for devices without specific platform data) pass the
    modalias to the spi-nor library;
    (2) rework the spi-nor library to not reject "bad" names, and
    instead just fall back to autodetection; and
    (3) add the .of_match_table to properly catch all "jedec,spi-nor".

    This allows (a) and (c) without warnings, and rejects (b).

    Signed-off-by: Brian Norris

    Brian Norris
     

26 Jun, 2015

1 commit

  • Pull cgroup writeback support from Jens Axboe:
    "This is the big pull request for adding cgroup writeback support.

    This code has been in development for a long time, and it has been
    simmering in for-next for a good chunk of this cycle too. This is one
    of those problems that has been talked about for at least half a
    decade, finally there's a solution and code to go with it.

    Also see last weeks writeup on LWN:

    http://lwn.net/Articles/648292/"

    * 'for-4.2/writeback' of git://git.kernel.dk/linux-block: (85 commits)
    writeback, blkio: add documentation for cgroup writeback support
    vfs, writeback: replace FS_CGROUP_WRITEBACK with SB_I_CGROUPWB
    writeback: do foreign inode detection iff cgroup writeback is enabled
    v9fs: fix error handling in v9fs_session_init()
    bdi: fix wrong error return value in cgwb_create()
    buffer: remove unusued 'ret' variable
    writeback: disassociate inodes from dying bdi_writebacks
    writeback: implement foreign cgroup inode bdi_writeback switching
    writeback: add lockdep annotation to inode_to_wb()
    writeback: use unlocked_inode_to_wb transaction in inode_congested()
    writeback: implement unlocked_inode_to_wb transaction and use it for stat updates
    writeback: implement [locked_]inode_to_wb_and_lock_list()
    writeback: implement foreign cgroup inode detection
    writeback: make writeback_control track the inode being written back
    writeback: relocate wb[_try]_get(), wb_put(), inode_{attach|detach}_wb()
    mm: vmscan: disable memcg direct reclaim stalling if cgroup writeback support is in use
    writeback: implement memcg writeback domain based throttling
    writeback: reset wb_domain->dirty_limit[_tstmp] when memcg domain size changes
    writeback: implement memcg wb_domain
    writeback: update wb_over_bg_thresh() to use wb_domain aware operations
    ...

    Linus Torvalds
     

24 Jun, 2015

1 commit

  • Pull powerpc updates from Michael Ellerman:

    - disable the 32-bit vdso when building LE, so we can build with a
    64-bit only toolchain.

    - EEH fixes from Gavin & Richard.

    - enable the sys_kcmp syscall from Laurent.

    - sysfs control for fastsleep workaround from Shreyas.

    - expose OPAL events as an irq chip by Alistair.

    - MSI ops moved to pci_controller_ops by Daniel.

    - fix for kernel to userspace backtraces for perf from Anton.

    - merge pseries and pseries_le defconfigs from Cyril.

    - CXL in-kernel API from Mikey.

    - OPAL prd driver from Jeremy.

    - fix for DSCR handling & tests from Anshuman.

    - Powernv flash mtd driver from Cyril.

    - dynamic DMA Window support on powernv from Alexey.

    - LLVM clang fixes & workarounds from Anton.

    - reworked version of the patch to abort syscalls when transactional.

    - fix the swap encoding to support 4TB, from Aneesh.

    - various fixes as usual.

    - Freescale updates from Scott: Highlights include more 8xx
    optimizations, an e6500 hugetlb optimization, QMan device tree nodes,
    t1024/t1023 support, and various fixes and cleanup.

    * tag 'powerpc-4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (180 commits)
    cxl: Fix typo in debug print
    cxl: Add CXL_KERNEL_API config option
    powerpc/powernv: Fix wrong IOMMU table in pnv_ioda_setup_bus_dma()
    powerpc/mm: Change the swap encoding in pte.
    powerpc/mm: PTE_RPN_MAX is not used, remove the same
    powerpc/tm: Abort syscalls in active transactions
    powerpc/iommu/ioda2: Enable compile with IOV=on and IOMMU_API=off
    powerpc/include: Add opal-prd to installed uapi headers
    powerpc/powernv: fix construction of opal PRD messages
    powerpc/powernv: Increase opal-irqchip initcall priority
    powerpc: Make doorbell check preemption safe
    powerpc/powernv: pnv_init_idle_states() should only run on powernv
    macintosh/nvram: Remove as unused
    powerpc: Don't use gcc specific options on clang
    powerpc: Don't use -mno-strict-align on clang
    powerpc: Only use -mtraceback=no, -mno-string and -msoft-float if toolchain supports it
    powerpc: Only use -mabi=altivec if toolchain supports it
    powerpc: Fix duplicate const clang warning in user access code
    vfio: powerpc/spapr: Support Dynamic DMA windows
    vfio: powerpc/spapr: Register memory and define IOMMU v2
    ...

    Linus Torvalds
     

17 Jun, 2015

2 commits


11 Jun, 2015

1 commit

  • Powerpc powernv platforms allow access to certain system flash devices
    through a firmwarwe interface. This change adds an mtd driver for these
    flash devices.

    Minor updates from Jeremy Kerr and Joel Stanley.

    Signed-off-by: Cyril Bur
    Signed-off-by: Joel Stanley
    Signed-off-by: Jeremy Kerr
    Reviewed-by: Neelesh Gupta
    Signed-off-by: Michael Ellerman

    Cyril Bur
     

02 Jun, 2015

1 commit

  • With the planned cgroup writeback support, backing-dev related
    declarations will be more widely used across block and cgroup;
    unfortunately, including backing-dev.h from include/linux/blkdev.h
    makes cyclic include dependency quite likely.

    This patch separates out backing-dev-defs.h which only has the
    essential definitions and updates blkdev.h to include it. c files
    which need access to more backing-dev details now include
    backing-dev.h directly. This takes backing-dev.h off the common
    include dependency chain making it a lot easier to use it across block
    and cgroup.

    v2: fs/fat build failure fixed.

    Signed-off-by: Tejun Heo
    Reviewed-by: Jan Kara
    Cc: Jens Axboe
    Signed-off-by: Jens Axboe

    Tejun Heo
     

23 May, 2015

1 commit


19 May, 2015

1 commit


16 May, 2015

1 commit

  • In commit 8ff16cf77ce3 ("Documentation: devicetree: m25p80: add "nor-jedec"
    binding"), we added a generic "nor-jedec" binding to catch all
    mostly-compatible SPI NOR flash which can be detected via the READ ID
    opcode (0x9F). This was discussed and reviewed at the time, however
    objections have come up since then as part of this discussion:

    http://lkml.kernel.org/g/20150511224646.GJ32500@ld-irv-0074

    It seems the parties involved agree that "jedec,spi-nor" does a better
    job of capturing the fact that this is SPI-specific, not just any NOR
    flash.

    This binding was only merged for v4.1-rc1, so it's still OK to change
    the naming.

    At the same time, let's move the documentation to a better name.

    Next up: stop referring to code (drivers/mtd/devices/m25p80.c) from the
    documentation.

    Signed-off-by: Brian Norris
    Cc: Marek Vasut
    Cc: Rafał Miłecki
    Cc: Rob Herring
    Cc: Pawel Moll
    Cc: Ian Campbell
    Cc: Kumar Gala
    Cc: devicetree@vger.kernel.org
    Acked-by: Stephen Warren
    Acked-by: Geert Uytterhoeven
    Acked-by: Mark Rutland

    Brian Norris
     

07 May, 2015

2 commits

  • We had many entries that were recently added just to allow selecting
    some flashes directly but were never used. They weren't providing any
    special flash handling, we just needed them due to the lack of some
    generic binding string.

    With the introduction of "nor-jedec" (in 1103b85) they won't be needed
    unless we discover some faulty flash requiring workarounds.
    As explained in m25p80 DT documentation we require specifying
    "nor-jedec" now as less specific compatible entry.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki
     
  • of_device_id is always used as const.
    (See driver.of_match_table and open firmware functions)

    Signed-off-by: Fabian Frederick
    Signed-off-by: Brian Norris

    Fabian Frederick
     

06 Apr, 2015

2 commits

  • Use the new 'nor-jedec' binding to provide automatic detection of flash
    that use the 0x9F READ ID opcode. This can help for use cases where
    platforms just specify compatibility with "m25p80", and then see
    messages like this:

    m25p80 spi32766.0: found s25fl256s1, expected m25p80

    Instead, they can just specify the generic string and see this:

    m25p80 spi32766.0: s25fl256s1 (32768 Kbytes)

    Also, update the language about m25p_ids[] to straighten out the
    expectations here. We should no longer need to continuously grow the
    m25p_ids[] table, and in fact, we might want to start removing entries
    which are not used in device trees so far, so we can just default to
    auto-detection as much as possible in the future.

    Signed-off-by: Brian Norris
    Cc: Rafał Miłecki

    Brian Norris
     
  • The .remove callback may be used when detaching a device via sysfs, so
    we can't expect to free up this memory.

    Signed-off-by: Brian Norris
    Acked-by: Robert Jarzmik

    Brian Norris
     

12 Mar, 2015

1 commit


24 Feb, 2015

1 commit

  • Ensures that block2mtd is triggered after the block devices are enumerated
    at boot time.
    This issue is seen on BCM2835 (Raspberry Pi) systems when mounting JFFS2
    block2mtd filesystems, probably because of the delay on enumerating a USB
    MMC card reader.

    Signed-off-by: Felix Fietkau
    Signed-off-by: Rodrigo Freire
    Signed-off-by: Herton Krzesinski
    Signed-off-by: Brian Norris

    Felix Fietkau
     

13 Jan, 2015

3 commits

  • drivers/mtd/devices/st_spi_fsm.c:1647:17:
    warning: comparison between signed and unsigned integer expressions

    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Lee Jones
     
  • ST's Common Clk Framework is now available. This patch ensures the FSM
    makes use of it by obtaining and enabling the EMI clock. If system fails
    to provide the EMI clock, we bomb out.

    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Lee Jones
     
  • Under certain conditions, the SPI-FSM Controller can be left in a state where
    the data FIFO is not entirely empty. This can lead to problems where subsequent
    data transfers appear to have been shifted by a number of unidentified bytes.

    One simple example would be an errant FSM sequence which loaded more data to the
    FIFO than was read by the host. Another more interesting case results from an
    obscure artefact in the FSM Controller. When switching from data transfers in
    x4 or x2 mode to data transfers in x1 mode, extraneous bytes will appear in the
    FIFO, unless the previous data transfer was a multiple of 32 cycles (i.e. 8
    bytes for x2, and 16 bytes for x4). This applies equally whether FSM is being
    operated directly by a S/W driver, or by the SPI boot-controller in FSM-Boot
    mode. Furthermore, data in the FIFO not only survive a transition between
    FSM-Boot and FSM, but also a S/W reset of IP block [1].

    By taking certain precautions, it is possible to prevent the driver from causing
    this type of problem (e.g. ensuring that the host and programmed sequence
    agree on the transfer size, and restricting transfer sizes to multiples of
    32-cycles [2]). However, at the point the driver is loaded, no assumptions can be
    made regarding the state of the FIFO. Even if previous S/W drivers have behaved
    correctly, it is impossible to control the number of transactions serviced by
    the controller operating in FSM-Boot.

    To address this problem, we ensure the FIFO is cleared during initialisation,
    before performing any FSM operations. Previously, the fsm_clear_fifo() code was
    capable of detecting and clearing any unwanted 32-bit words from the FIFO. This
    patch extends the capability to handle an arbitrary number of bytes present in
    the FIFO [3]. Now that the issue is better understood, we also remove the calls
    to fsm_clear_fifo() following the fsm_read() and fsm_write() operations.

    The process of actually clearing the FIFO deserves a mention. While the FIFO
    may contain any number of bytes, the SPI_FAST_SEQ_STA register only reports the
    number of complete 32-bit words present. Furthermore, data can only be drained
    from the FIFO by reading complete 32-bit words. With this in mind, a two stage
    process is used to the clear the FIFO:

    1. Read any complete 32-bit words from the FIFO, as reported by the
    SPI_FAST_SEQ_STA register.

    2. Mop up any remaining bytes. At this point, it is not known if there
    are 0, 1, 2, or 3 bytes in the FIFO. To handle all cases, a dummy
    FSM sequence is used to load one byte at a time, until a complete
    32-bit word is formed; at most, 4 bytes will need to be loaded.

    [1] Although this issue has existed since early versions of the SPI-FSM
    controller, its full extent only emerged recently as a consequence of the
    targetpacks starting to use FSM-Boot(x4) as the default configuration.

    [2] The requirement to restrict transfers to multiples of 32 cycles was found
    empirically back when DUAL and QUAD mode support was added. The current
    analysis now gives a satisfactory explanation for this requirement.

    [3] Theoretically, it is possible for the FIFO to contain an arbitrary number of
    bits. However, since there are no known use-cases that leave incomplete
    bytes in the FIFO, only words and bytes are considered here.

    Signed-off-by: Angus Clark
    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Lee Jones
     

18 Dec, 2014

1 commit

  • Pull MTD updates from Brian Norris:
    "Summary:
    - Add device tree support for DoC3

    - SPI NOR:
    Refactoring, for better layering between spi-nor.c and its
    driver users (e.g., m25p80.c)

    New flash device support

    Support 6-byte ID strings

    - NAND:
    New NAND driver for Allwinner SoC's (sunxi)

    GPMI NAND: add support for raw (no ECC) access, for testing
    purposes

    Add ATO manufacturer ID

    A few odd driver fixes

    - MTD tests:
    Allow testers to compensate for OOB bitflips in oobtest

    Fix a torturetest regression

    - nandsim: Support longer ID byte strings

    And more"

    * tag 'for-linus-20141215' of git://git.infradead.org/linux-mtd: (63 commits)
    mtd: tests: abort torturetest on erase errors
    mtd: physmap_of: fix potential NULL dereference
    mtd: spi-nor: allow NULL as chip name and try to auto detect it
    mtd: nand: gpmi: add raw oob access functions
    mtd: nand: gpmi: add proper raw access support
    mtd: nand: gpmi: add gpmi_copy_bits function
    mtd: spi-nor: factor out write_enable() for erase commands
    mtd: spi-nor: add support for s25fl128s
    mtd: spi-nor: remove the jedec_id/ext_id
    mtd: spi-nor: add id/id_len for flash_info{}
    mtd: nand: correct the comment of function nand_block_isreserved()
    jffs2: Drop bogus if in comment
    mtd: atmel_nand: replace memcpy32_toio/memcpy32_fromio with memcpy
    mtd: cafe_nand: drop duplicate .write_page implementation
    mtd: m25p80: Add support for serial flash Spansion S25FL132K
    MTD: m25p80: fix inconsistency in m25p_ids compared to spi_nor_ids
    mtd: spi-nor: improve wait-till-ready timeout loop
    mtd: delete unnecessary checks before two function calls
    mtd: nand: omap: Fix NAND enumeration on 3430 LDP
    mtd: nand: add ATO manufacturer info
    ...

    Linus Torvalds
     

01 Dec, 2014

1 commit


26 Nov, 2014

3 commits


06 Nov, 2014

1 commit

  • We are trying to remove the legacy tx_dma and rx_dma fields from the
    spi_transfer structure. Currently dataflash uses tx_dma but only to make
    sure that it's set to 0 so we can remove this use by replacing with a
    zero initialisation of the entire spi_transfer struct.

    Signed-off-by: Mark Brown
    Signed-off-by: Brian Norris

    Mark Brown
     

05 Nov, 2014

2 commits


04 Nov, 2014

1 commit


23 Oct, 2014

1 commit


22 Oct, 2014

4 commits

  • Modify phram to include rather than

    Signed-off-by: Rob Ward
    Signed-off-by: Brian Norris

    Rob Ward
     
  • Add device-tree support. This is straightforward as docg3 only uses the
    standard IOMEM resources.

    Signed-off-by: Robert Jarzmik
    Cc: devicetree@vger.kernel.org
    Cc: Mark Rutland
    Signed-off-by: Brian Norris

    Robert Jarzmik
     
  • seq_printf doesn't return a useful value, so remove
    these misuses.

    Signed-off-by: Joe Perches
    Signed-off-by: Brian Norris

    Joe Perches
     
  • m25p80's device ID table is now spi_nor_ids, defined in spi-nor. The
    MODULE_DEVICE_TABLE() macro doesn't work with extern definitions, but
    its use was also removed at the same time. Now if m25p80 is built as
    a module it doesn't get the necessary aliases to be loaded
    automatically.

    A clean solution to this will involve defining the list of device
    IDs in spi-nor.h and removing struct spi_device_id from the spi-nor
    API, but this is quite a large change.

    As a quick fix suitable for stable, copy the device IDs back into
    m25p80.

    Fixes: 03e296f613af ("mtd: m25p80: use the SPI nor framework")
    Cc: # 3.16.x: 32f1b7c8352f: mtd: move support for struct flash_platform_data into m25p80
    Cc: # 3.16.x: 90e55b3812a1: mtd: m25p80: get rid of spi_get_device_id
    Cc: # 3.16.x: 70f3ce0510af: mtd: spi-nor: make spi_nor_scan() take a chip type name, not spi_device_id
    Cc: # 3.16.x
    Signed-off-by: Ben Hutchings
    Signed-off-by: Brian Norris

    Ben Hutchings
     

20 Oct, 2014

1 commit


18 Oct, 2014

2 commits


29 Sep, 2014

1 commit

  • This "type" seems to be an extra hint for m25p80 about the flash. Some
    archs register flash_platform_data with "name" set to "m25p80" and then
    with a real flash name set in "type". It seems to be a trick specific
    to the m25p80 so let's move it out of spi-nor.
    Btw switch to the spi_nor_match_id instead of iterating spi_nor_ids.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki