1. 05 Apr, 2019 3 commits
  2. 03 Apr, 2019 6 commits
    • Tony Lindgren's avatar
      bus: ti-sysc: Add quirk handling for external optional functional clock · a54275f4
      Tony Lindgren authored
      We cannot access mcpdm registers at all unless there is an optional pdmclk
      configured. As this is currently only needed for mcpdm, let's check for
      mcpdm in sysc_get_clocks(). If it turns out to be needed for other modules
      too, we can add more flags to the quirks table for this.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      a54275f4
    • Tony Lindgren's avatar
      bus: ti-sysc: Add support for early quirks based on register address · 42b9c5c9
      Tony Lindgren authored
      At least mcpdm needs an optional external clock enabled to function and
      this clock typically comes from the PMIC. We can detect mcpdm based on
      the interconnect target module address and set a quirk flag early.
      
      To do this, let's initialize the clocks a bit later and add a new
      function for sysc_init_early_quirks(). Note that we cannot yet enable
      the early quirks for mcpdm until the optional external clocks are
      handled in the in the following patch.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      42b9c5c9
    • Tony Lindgren's avatar
      bus: ti-sysc: Move rstctrl reset to happen later · b11c1ea1
      Tony Lindgren authored
      We can do the rsstctrl a bit later, but need to deassert rstctrl reset
      before the clocks are enabled if asserted. Let's only init restctrl
      in sysc_init_resets() and do the reset later on just before we enable
      the device clocks.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      b11c1ea1
    • Tony Lindgren's avatar
      bus: ti-sysc: Manage clocks for the interconnect target module in all cases · 93de83a2
      Tony Lindgren authored
      We are currently not managing interconnect target module clocks in the
      for legacy platform data based case. This causes a problem for using the
      platform data based functions when dropping the platform data for the
      interconnect target module configuration.
      
      To avoid a situation where we need to populate the main and optional
      clocks also for the platform data based functions, let's just manage the
      clocks directly in ti-sysc driver. This means that until the interconnect
      target module confugration platform data is dropped our use count for
      clk_enable() will be 2 instead of 1.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      93de83a2
    • Tony Lindgren's avatar
      bus: ti-sysc: Allocate mdata as needed and do platform data based init later · a3e92e7b
      Tony Lindgren authored
      The platform data based init functions typically reset the interconnect
      target module configure the registers. As we may need the interconnect
      target module specific quirks configured based on the revision register,
      we want to move the platform data based init to happen later.
      
      Let's allocate mdata as needed so it's available for sysc_legacy_init()
      that we call with module clocks enabled from sysc_init_module().
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      a3e92e7b
    • Tony Lindgren's avatar
      bus: ti-sysc: Enable all clocks directly during init to read revision · 1a5cd7c2
      Tony Lindgren authored
      The first thing we want to do is just read the module revision register to
      be able to configure the module specific quirks and configure the module
      registers.
      
      As the interconnect target module may not yet be properly configured and
      may need a reset first, we don't want to use pm_runtime_get() at this
      point.
      
      To read the revision register, let's just enable the all the clocks for
      the interconnect target module during init even if the optional clocks
      are not needed. That way we can read the revision register to configure
      the quirks needed for PM runtime.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      1a5cd7c2
  3. 01 Apr, 2019 5 commits
  4. 26 Mar, 2019 8 commits
    • Tony Lindgren's avatar
      ARM: OMAP2+: Handle reset quirks for dynamically allocated modules · 8b30919a
      Tony Lindgren authored
      For dynamically allocated struct omap_hwmod data, we need to populate
      the device IP specific reset quirks.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      8b30919a
    • Tony Lindgren's avatar
      ARM: OMAP2+: Remove hwmod .rev data and use local SoC checks instead · 70451127
      Tony Lindgren authored
      We can just check for omap2 and 3 for i2c and smartreflex locally.
      The rest of the .rev data is already unused.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      70451127
    • Tony Lindgren's avatar
      ARM: OMAP2+: Allocate struct omap_hwmod based on dts data · b57250fa
      Tony Lindgren authored
      With ti-sysc interconnect target module, we can allocate struct omap_hwmod
      data based on the devicetree data. This allows dropping the static SoC
      specific data eventually so we will only boot with data we actually need.
      
      To allocate struct omap_hwmod dynamically, we need to add a mutex for
      modifying the list, and remove __init for few functions.
      
      Note that we are not initialized oh->_clk or the optional clocks and their
      related quirks. That can be directly handled by the interconnect target
      module driver.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      b57250fa
    • Tony Lindgren's avatar
      ARM: OMAP2+: Define _HWMOD_STATE_DEFAULT and use it · 6d63b12d
      Tony Lindgren authored
      For dynamically allocated struct hwmod entries probing with ti-sysc
      interconnect target module driver, we need to specify the initial default
      state the same way as we do for the platform data cases.
      
      Let's prepare for that by adding _HWMOD_STATE_DEFAULT that we can then
      use to set the initial default state without a need to add similar
      CONFIG_PM handling in multiple places.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      6d63b12d
    • Tony Lindgren's avatar
      ARM: OMAP2+: Prepare class allocation for dynamically allocated modules · 513a4abb
      Tony Lindgren authored
      For dynamically allocated sysconfig data we only need to allocate a new
      class for the cases where the class is shared. For dynamically allocated
      struct omap_hwmod we will always allocate a new class.
      
      Let's add detection for when we need to allocate a new class by comparing
      the class name against the module name. If they match, there's no need
      to allocate a new calls as we don't have case of mixed platform data and
      dts data initialized modules for the same class.
      
      Let's also move the init of class data inside the spinlock.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      513a4abb
    • Tony Lindgren's avatar
      ARM: OMAP2+: Make interconnect target module allocation functions static · 798bd175
      Tony Lindgren authored
      Only omap_hwmod_init_module() gets called, the rest of the interconnect
      target module allocation functions can be static.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      798bd175
    • Tony Lindgren's avatar
      ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset() · 7f0d0786
      Tony Lindgren authored
      Commit 747834ab ("ARM: OMAP2+: hwmod: revise hardreset behavior") made
      the call to _enable() conditional based on no oh->rst_lines_cnt. This
      caused the return value to be potentially uninitialized. Curiously we see
      no compiler warnings for this, probably as this gets inlined.
      
      We call _setup_reset() from _setup() and only _setup_postsetup() if the
      return value is zero. Currently the return value can be uninitialized for
      cases where oh->rst_lines_cnt is set and HWMOD_INIT_NO_RESET is not set.
      
      Fixes: 747834ab ("ARM: OMAP2+: hwmod: revise hardreset behavior")
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      7f0d0786
    • Tony Lindgren's avatar
      ARM: dts: Fix dcan clkctrl clock for am3 · 7d56bedb
      Tony Lindgren authored
      We must not use legacy clock defines for dts clckctrl clocks as the offsets
      will be wrong.
      
      Fixes: 87fc89ce ("ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc")
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      7d56bedb
  5. 17 Mar, 2019 14 commits
  6. 16 Mar, 2019 4 commits
    • Linus Torvalds's avatar
      Merge tag 'pidfd-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · a9dce667
      Linus Torvalds authored
      Pull pidfd system call from Christian Brauner:
       "This introduces the ability to use file descriptors from /proc/<pid>/
        as stable handles on struct pid. Even if a pid is recycled the handle
        will not change. For a start these fds can be used to send signals to
        the processes they refer to.
      
        With the ability to use /proc/<pid> fds as stable handles on struct
        pid we can fix a long-standing issue where after a process has exited
        its pid can be reused by another process. If a caller sends a signal
        to a reused pid it will end up signaling the wrong process.
      
        With this patchset we enable a variety of use cases. One obvious
        example is that we can now safely delegate an important part of
        process management - sending signals - to processes other than the
        parent of a given process by sending file descriptors around via scm
        rights and not fearing that the given process will have been recycled
        in the meantime. It also allows for easy testing whether a given
        process is still alive or not by sending signal 0 to a pidfd which is
        quite handy.
      
        There has been some interest in this feature e.g. from systems
        management (systemd, glibc) and container managers. I have requested
        and gotten comments from glibc to make sure that this syscall is
        suitable for their needs as well. In the future I expect it to take on
        most other pid-based signal syscalls. But such features are left for
        the future once they are needed.
      
        This has been sitting in linux-next for quite a while and has not
        caused any issues. It comes with selftests which verify basic
        functionality and also test that a recycled pid cannot be signaled via
        a pidfd.
      
        Jon has written about a prior version of this patchset. It should
        cover the basic functionality since not a lot has changed since then:
      
            https://lwn.net/Articles/773459/
      
        The commit message for the syscall itself is extensively documenting
        the syscall, including it's functionality and extensibility"
      
      * tag 'pidfd-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        selftests: add tests for pidfd_send_signal()
        signal: add pidfd_send_signal() syscall
      a9dce667
    • Linus Torvalds's avatar
      Merge tag 'devdax-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · f67e3fb4
      Linus Torvalds authored
      Pull device-dax updates from Dan Williams:
       "New device-dax infrastructure to allow persistent memory and other
        "reserved" / performance differentiated memories, to be assigned to
        the core-mm as "System RAM".
      
        Some users want to use persistent memory as additional volatile
        memory. They are willing to cope with potential performance
        differences, for example between DRAM and 3D Xpoint, and want to use
        typical Linux memory management apis rather than a userspace memory
        allocator layered over an mmap() of a dax file. The administration
        model is to decide how much Persistent Memory (pmem) to use as System
        RAM, create a device-dax-mode namespace of that size, and then assign
        it to the core-mm. The rationale for device-dax is that it is a
        generic memory-mapping driver that can be layered over any "special
        purpose" memory, not just pmem. On subsequent boots udev rules can be
        used to restore the memory assignment.
      
        One implication of using pmem as RAM is that mlock() no longer keeps
        data off persistent media. For this reason it is recommended to enable
        NVDIMM Security (previously merged for 5.0) to encrypt pmem contents
        at rest. We considered making this recommendation an actively enforced
        requirement, but in the end decided to leave it as a distribution /
        administrator policy to allow for emulation and test environments that
        lack security capable NVDIMMs.
      
        Summary:
      
         - Replace the /sys/class/dax device model with /sys/bus/dax, and
           include a compat driver so distributions can opt-in to the new ABI.
      
         - Allow for an alternative driver for the device-dax address-range
      
         - Introduce the 'kmem' driver to hotplug / assign a device-dax
           address-range to the core-mm.
      
         - Arrange for the device-dax target-node to be onlined so that the
           newly added memory range can be uniquely referenced by numa apis"
      
      NOTE! I'm not entirely happy with the whole "PMEM as RAM" model because
      we currently have special - and very annoying rules in the kernel about
      accessing PMEM only with the "MC safe" accessors, because machine checks
      inside the regular repeat string copy functions can be fatal in some
      (not described) circumstances.
      
      And apparently the PMEM modules can cause that a lot more than regular
      RAM.  The argument is that this happens because PMEM doesn't necessarily
      get scrubbed at boot like RAM does, but that is planned to be added for
      the user space tooling.
      
      Quoting Dan from another email:
       "The exposure can be reduced in the volatile-RAM case by scanning for
        and clearing errors before it is onlined as RAM. The userspace tooling
        for that can be in place before v5.1-final. There's also runtime
        notifications of errors via acpi_nfit_uc_error_notify() from
        background scrubbers on the DIMM devices. With that mechanism the
        kernel could proactively clear newly discovered poison in the volatile
        case, but that would be additional development more suitable for v5.2.
      
        I understand the concern, and the need to highlight this issue by
        tapping the brakes on feature development, but I don't see PMEM as RAM
        making the situation worse when the exposure is also there via DAX in
        the PMEM case. Volatile-RAM is arguably a safer use case since it's
        possible to repair pages where the persistent case needs active
        application coordination"
      
      * tag 'devdax-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        device-dax: "Hotplug" persistent memory for use like normal RAM
        mm/resource: Let walk_system_ram_range() search child resources
        mm/memory-hotplug: Allow memory resources to be children
        mm/resource: Move HMM pr_debug() deeper into resource code
        mm/resource: Return real error codes from walk failures
        device-dax: Add a 'modalias' attribute to DAX 'bus' devices
        device-dax: Add a 'target_node' attribute
        device-dax: Auto-bind device after successful new_id
        acpi/nfit, device-dax: Identify differentiated memory with a unique numa-node
        device-dax: Add /sys/class/dax backwards compatibility
        device-dax: Add support for a dax override driver
        device-dax: Move resource pinning+mapping into the common driver
        device-dax: Introduce bus + driver model
        device-dax: Start defining a dax bus model
        device-dax: Remove multi-resource infrastructure
        device-dax: Kill dax_region base
        device-dax: Kill dax_region ida
      f67e3fb4
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 477558d7
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "This is the final round of mostly small fixes and performance
        improvements to our initial submit.
      
        The main regression fix is the ia64 simscsi build failure which was
        missed in the serial number elimination conversion"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits)
        scsi: ia64: simscsi: use request tag instead of serial_number
        scsi: aacraid: Fix performance issue on logical drives
        scsi: lpfc: Fix error codes in lpfc_sli4_pci_mem_setup()
        scsi: libiscsi: Hold back_lock when calling iscsi_complete_task
        scsi: hisi_sas: Change SERDES_CFG init value to increase reliability of HiLink
        scsi: hisi_sas: Send HARD RESET to clear the previous affiliation of STP target port
        scsi: hisi_sas: Set PHY linkrate when disconnected
        scsi: hisi_sas: print PHY RX errors count for later revision of v3 hw
        scsi: hisi_sas: Fix a timeout race of driver internal and SMP IO
        scsi: hisi_sas: Change return variable type in phy_up_v3_hw()
        scsi: qla2xxx: check for kstrtol() failure
        scsi: lpfc: fix 32-bit format string warning
        scsi: lpfc: fix unused variable warning
        scsi: target: tcmu: Switch to bitmap_zalloc()
        scsi: libiscsi: fall back to sendmsg for slab pages
        scsi: qla2xxx: avoid printf format warning
        scsi: lpfc: resolve static checker warning in lpfc_sli4_hba_unset
        scsi: lpfc: Correct __lpfc_sli_issue_iocb_s4 lockdep check
        scsi: ufs: hisi: fix ufs_hba_variant_ops passing
        scsi: qla2xxx: Fix panic in qla_dfs_tgt_counters_show
        ...
      477558d7
    • Linus Torvalds's avatar
      Merge tag 'for-5.1/block-post-20190315' of git://git.kernel.dk/linux-block · 11efae35
      Linus Torvalds authored
      Pull more block layer changes from Jens Axboe:
       "This is a collection of both stragglers, and fixes that came in after
        I finalized the initial pull. This contains:
      
         - An MD pull request from Song, with a few minor fixes
      
         - Set of NVMe patches via Christoph
      
         - Pull request from Konrad, with a few fixes for xen/blkback
      
         - pblk fix IO calculation fix (Javier)
      
         - Segment calculation fix for pass-through (Ming)
      
         - Fallthrough annotation for blkcg (Mathieu)"
      
      * tag 'for-5.1/block-post-20190315' of git://git.kernel.dk/linux-block: (25 commits)
        blkcg: annotate implicit fall through
        nvme-tcp: support C2HData with SUCCESS flag
        nvmet: ignore EOPNOTSUPP for discard
        nvme: add proper write zeroes setup for the multipath device
        nvme: add proper discard setup for the multipath device
        nvme: remove nvme_ns_config_oncs
        nvme: disable Write Zeroes for qemu controllers
        nvmet-fc: bring Disconnect into compliance with FC-NVME spec
        nvmet-fc: fix issues with targetport assoc_list list walking
        nvme-fc: reject reconnect if io queue count is reduced to zero
        nvme-fc: fix numa_node when dev is null
        nvme-fc: use nr_phys_segments to determine existence of sgl
        nvme-loop: init nvmet_ctrl fatal_err_work when allocate
        nvme: update comment to make the code easier to read
        nvme: put ns_head ref if namespace fails allocation
        nvme-trace: fix cdw10 buffer overrun
        nvme: don't warn on block content change effects
        nvme: add get-feature to admin cmds tracer
        md: Fix failed allocation of md_register_thread
        It's wrong to add len to sector_nr in raid10 reshape twice
        ...
      11efae35