1. 13 May, 2020 11 commits
    • Cristian Marussi's avatar
      [HACK][DEBUG] SCMI IIOdev example driver · 37b246d4
      Cristian Marussi authored
      
      
      [HACK][DEBUG] SCMI IIOdev example driver
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      37b246d4
    • Cristian Marussi's avatar
      firmware: arm_scmi: SCMI Sensor v2.1 Extensions · ea657ff9
      Cristian Marussi authored
      
      
      SCMI v2.1 Sensor Extensions support
      - new tentative API
      - new internal structs for msg resp and notific
      - new Sensor notification support
      - new v2.1 sensor descriptor axis and update_intervals handling
      - new protocol init and ops with v1 and v2 coexistence
      - new config set/get
      - new reading_timestamped
      - added new sensor classes enums
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ea657ff9
    • Cristian Marussi's avatar
      firmware: arm_scmi: Add Base notifications support · bfceddb7
      Cristian Marussi authored
      
      
      Make SCMI Base protocol register with the notification core.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V6 --> V7
      - fixed report.timestamp type
      - fix max_payld_sz initialization
      - fix report layout and initialization
      - expose SCMI_EVENT_ in linux/scmi_protocol.h
      V5 --> V6
      - added handle argument to fill_custom_report()
      V4 --> V5
      - fixed unsual return construct
      V3 --> V4
      - scmi_event field renamed
      V2 --> V3
      - added handle awareness
      V1 --> V2
      - simplified .set_notify_enabled() implementation moving the ALL_SRCIDs
        logic out of protocol. ALL_SRCIDs logic is now in charge of the
        notification core, together with proper reference counting of enables
      - switched to devres protocol-registration
      bfceddb7
    • Cristian Marussi's avatar
      firmware: arm_scmi: Add Reset notifications support · 37841416
      Cristian Marussi authored
      
      
      Make SCMI Reset protocol register with the notification core.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V6 --> V7
      - fixed report.timestamp type
      - added agent_id notification field
      - fixed .max_payld_sz initialization
      - expose SCMI_EVENT_ in linux/scmi_protocol.h
      V5 --> V6
      - added handle argument to fill_custom_report()
      V4 --> V5
      - fixed unsual return construct
      V3 --> V4
      - scmi_event field renamed
      V2 --> V3
      - added handle awareness
      V1 --> V2
      - simplified .set_notify_enabled() implementation moving the ALL_SRCIDs
        logic out of protocol. ALL_SRCIDs logic is now in charge of the
        notification core, together with proper reference counting of enables
      - switched to devres protocol-registration
      37841416
    • Cristian Marussi's avatar
      firmware: arm_scmi: Add Sensor notifications support · 30c5dacb
      Cristian Marussi authored
      
      
      Make SCMI Sensor protocol register with the notification core.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V6 --> V7
      - fixed report.timestamp type
      - removed trip_point_notify from .sensor_ops
      - fixed max_payld_sz initialization
      - expose SCMI_EVENT_ in linux/scmi_protocol.h
      V5 --> V6
      - added handle argument to fill_custom_report()
      V4 --> V5
      - fixed unsual return construct
      V3 --> V4
      - scmi_event field renamed
      V2 --> V3
      - added handle awareness
      V1 --> V2
      - simplified .set_notify_enabled() implementation moving the ALL_SRCIDs
        logic out of protocol. ALL_SRCIDs logic is now in charge of the
        notification core, together with proper reference counting of enables
      - switched to devres protocol-registration
      30c5dacb
    • Cristian Marussi's avatar
      firmware: arm_scmi: Add Perf notifications support · 733e77ed
      Cristian Marussi authored
      
      
      Make SCMI Perf protocol register with the notification core.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V6 --> V7
      - fixed report.timestamp type
      - fixed max_payld_sz initialization
      - expose SCMI_EVENT_ in linux/scmi_protocol.h
      V5 --> V6
      - added handle argument to fill_custom_report()
      V4 --> V5
      - fixed unsual return construct
      V3 --> V4
      - scmi_event field renamed
      V2 --> V3
      - added handle awareness
      V1 --> V2
      - simplified .set_notify_enabled() implementation moving the ALL_SRCIDs
        logic out of protocol. ALL_SRCIDs logic is now in charge of the
        notification core, together with proper reference counting of enables
      - switched to devres protocol-registration
      733e77ed
    • Cristian Marussi's avatar
      firmware: arm_scmi: Add Power notifications support · 4a89ce8f
      Cristian Marussi authored
      
      
      Make SCMI Power protocol register with the notification core.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V6 --> V7
      - fixed report.timestamp type
      - removed POWER_STATE_CHANGE_REQUESTED motification handling (deprecated)
      - fixed max_payld_sz initialization
      - expose SCMI_EVENT_ in linux/scmi_protocol.h
      V5 --> V6
      - added handle argument to fill_custom_report()
      V4 --> V5
      - fixed unsual return construct
      V3 --> V4
      - scmi_event field renamed
      V2 --> V3
      - added handle awareness
      V1 --> V2
      - simplified .set_notify_enabled() implementation moving the ALL_SRCIDs
        logic out of protocol. ALL_SRCIDs logic is now in charge of the
        notification core, together with proper reference counting of enables
      - switched to devres protocol-registration
      4a89ce8f
    • Cristian Marussi's avatar
      firmware: arm_scmi: Enable notification core · 2b546899
      Cristian Marussi authored
      
      
      Initialize and enable SCMI Notifications core support during bus/driver
      probe phase, so that protocols can start registering their supported
      events during their initialization.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V3 --> V4
      - simplified core initialization: protocols events' registrations is now
        disjoint from users' callback registrations, so that events' generation
        can be enabled earlier for registered events and delayed for pending
        ones in order to support deferred (or missing) protocol initialization
      V2 --> V3
      - reviewed core initialization: all implemented protocols must complete
        their protocol-events registration phases before notifications can be
        enabled as a whole; in the meantime any user's callback registration
        requests possibly issued while the notifications were not enabled
        remain pending: a dedicated worker completes the handlers registration
        once all protocols have been initialized.
        NOTE THAT this can lead to ISSUES with late inserted or missing SCMI
        modules (i.e. for protocols defined in the DT and implemented by the
        platform but lazily loaded or not loaded at all.), since in these
        scenarios notifications dispatching will be enabled later or never.
      - reviewed core exit: protocol users (devices) are accounted on probe/
        remove, and protocols' events are unregisteredonce last user go
        (can happen only at shutdown)
      V1 --> V2
      - added timestamping
      - moved notification init/exit and using devres
      2b546899
    • Cristian Marussi's avatar
      firmware: arm_scmi: Add notification dispatch and delivery · 421a85a6
      Cristian Marussi authored
      
      
      Add core SCMI Notifications dispatch and delivery support logic which is
      able, at first, to dispatch well-known received events from the RX ISR to
      the dedicated deferred worker, and then, from there, to final deliver the
      events to the registered users' callbacks.
      
      Dispatch and delivery is just added here, still not enabled.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V7 --> V8
      - Fixed enabled check in scmi_notify() not to use atomics
      V5 --> V6
      - added handle argument to fill_custom_report()
      V4 --> V5
      - fixed kernel-doc
      - fixed unneded var initialization
      V3 --> V4
      - dispatcher now handles dequeuing of events in chunks (header+payload):
        handling of these in_flight events let us remove one unneeded memcpy
        on RX interrupt path (scmi_notify)
      - deferred dispatcher now access their own per-protocol handlers' table
        reducing locking contention on the RX path
      V2 --> V3
      - exposing wq in sysfs via WQ_SYSFS
      V1 --> V2
      - splitted out of V1 patch 04
      - moved from IDR maps to real HashTables to store event_handlers
      - simplified delivery logic
      421a85a6
    • Cristian Marussi's avatar
      firmware: arm_scmi: Add notification callbacks-registration · 4d38621d
      Cristian Marussi authored
      
      
      Add core SCMI Notifications callbacks-registration support: allow users
      to register their own callbacks against the desired events.
      Whenever a registration request is issued against a still non existent
      event, mark such request as pending for later processing, in order to
      account for possible late initializations of SCMI Protocols associated
      to loadable drivers.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V7 --> V8
      - Fixed init check, un-needed atomics removed
      V6 --> V7
      - removed un-needed ktime.h include
      V4 --> V5
      - fix kernel-doc
      - reviewed REVT_NOTIFY_ENABLE macro
      - added matching barrier for late_init
      V3 --> V4
      - split registered_handlers hashtable on a per-protocol basis to reduce
        unneeded contention
      - introduced pending_handlers table and related late_init worker to finalize
        handlers registration upon effective protocols' registrations
      - introduced further safe accessors macros for registered_protocols
        and registered_events arrays
      V2 --> V3
      - refactored get/put event_handler
      - removed generic non-handle-based API
      V1 --> V2
      - splitted out of V1 patch 04
      - moved from IDR maps to real HashTables to store event_handlers
      - added proper enable_events refcounting via __scmi_enable_evt()
        [was broken in V1 when using ALL_SRCIDs notification chains]
      - reviewed hashtable cleanup strategy in scmi_notifications_exit()
      - added scmi_register_event_notifier()/scmi_unregister_event_notifier()
        to include/linux/scmi_protocol.h as a candidate user API
        [no EXPORTs still]
      - added notify_ops to handle during initialization as an additional
        internal API for scmi_drivers
      4d38621d
    • Cristian Marussi's avatar
      firmware: arm_scmi: Add notification protocol-registration · 25b2dfa3
      Cristian Marussi authored
      
      
      Add core SCMI Notifications protocol-registration support: allow protocols
      to register their own set of supported events, during their initialization
      phase. Notification core can track multiple platform instances by their
      handles.
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
      ---
      V7 --> V8
      - Fixed init/enable procedure, un-needed atomics removed
      V4 --> V5
      - fixed kernel-doc
      - added barriers for registered protocols and events
      - using kfifo_alloc and devm_add_action_or_reset
      V3 --> V4
      - removed scratch ISR buffer, move scratch BH buffer into protocol
        descriptor
      - converted registered_protocols and registered_events from hashtables
        into bare fixed-sized arrays
      - removed unregister protocols' routines (never called really)
      V2 --> V3
      - added scmi_notify_instance to track target platform instance
      V1 --> V2
      - splitted out of V1 patch 04
      - moved from IDR maps to real HashTables to store events
      - scmi_notifications_initialized is now an atomic_t
      - reviewed protocol registration/unregistration to use devres
      - fixed:
        drivers/firmware/arm_scmi/notify.c:483:18-23: ERROR:
        	reference preceded by free on line 482
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      25b2dfa3
  2. 21 Apr, 2020 8 commits
    • Sudeep Holla's avatar
    • Sudeep Holla's avatar
      fcfbdea7
    • Sudeep Holla's avatar
      mailbox: arm_mhu: add support to read and record mbox-name · 2e5adb9f
      Sudeep Holla authored
      
      
      It's sometimes useful to identify the mailbox controller with the name
      as specified in the devicetree via mbox-name property especially in a
      system with multiple controllers.
      
      This patch adds support to read and record the mailbox controller name.
      
      Cc: Jassi Brar <jaswinder.singh@linaro.org>
      Signed-off-by: Sudeep Holla's avatarSudeep Holla <sudeep.holla@arm.com>
      2e5adb9f
    • Sudeep Holla's avatar
      mailbox: arm_mhu: add full support for the doorbells · 15c2b985
      Sudeep Holla authored
      
      
      We now have the basic infrastructure and binding to support doorbells
      on ARM MHU controller.
      
      This patch adds all the necessary mailbox operations to add support for
      the doorbells. Maximum of 32 doorbells are supported on each physical
      channel, however the total number of doorbells is restricted to 20
      in order to save memory. It can increased if required in future.
      
      Cc: Jassi Brar <jaswinder.singh@linaro.org>
      Signed-off-by: Sudeep Holla's avatarSudeep Holla <sudeep.holla@arm.com>
      15c2b985
    • Sudeep Holla's avatar
      mailbox: arm_mhu: re-factor data structure to add doorbell support · f940d79b
      Sudeep Holla authored
      
      
      In order to support doorbells, we need a bit of reword around data
      structures that are per-channel. Since the number of doorbells are
      not fixed though restricted to maximum of 20, the channel assignment
      and initialization is move to xlate function.
      
      This patch also adds the platform data for the existing support of one
      channel per physical channel.
      
      Cc: Jassi Brar <jaswinder.singh@linaro.org>
      Signed-off-by: Sudeep Holla's avatarSudeep Holla <sudeep.holla@arm.com>
      f940d79b
    • Sudeep Holla's avatar
      mailbox: arm_mhu: migrate to threaded irq handler · b1bbd9ea
      Sudeep Holla authored
      
      
      In preparation to introduce support for doorbells which require the
      interrupt handlers to be threaded, this patch moves the existing
      interrupt handler to threaded handler.
      
      Also it moves out the registering and freeing of the handlers from
      the mailbox startup and shutdown methods. This also is required to
      support doorbells.
      
      Cc: Jassi Brar <jaswinder.singh@linaro.org>
      Signed-off-by: Sudeep Holla's avatarSudeep Holla <sudeep.holla@arm.com>
      b1bbd9ea
    • Sudeep Holla's avatar
      dt-bindings: mailbox: add bindings to support ARM MHU doorbells · d314d0ce
      Sudeep Holla authored
      
      
      The ARM MHU has mechanism to assert interrupt signals to facilitate
      inter-processor message based communication. It drives the signal using
      a 32-bit register, with all 32-bits logically ORed together. It also
      enables software to set, clear and check the status of each of the bits
      of this register independently. Each bit of the register can be
      associated with a type of event that can contribute to raising the
      interrupt thereby allowing it to be used as independent doorbells.
      
      Since the first version of this binding can't support doorbells,
      this patch extends the existing binding to support them by allowing
      "#mbox-cells" to be 2.
      
      Cc: Jassi Brar <jaswinder.singh@linaro.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: Sudeep Holla's avatarSudeep Holla <sudeep.holla@arm.com>
      d314d0ce
    • Sudeep Holla's avatar
      mailbox: add support for doorbell/signal mode controllers · 5e0b9c1e
      Sudeep Holla authored
      
      
      Some mailbox controllers are lack FIFOs or memory to transmit data.
      They typically contains single doorbell registers to just signal the
      remote. The actually data is transmitted/shared using some shared memory
      which is not part of the mailbox.
      
      Such controllers don't need to transmit any data, they just transmit
      the signal. In such controllers the data pointer passed to
      mbox_send_message is passed to client via it's tx_prepare callback.
      Controller doesn't need any data to be passed from the client.
      
      This patch introduce the new API send_signal to support such doorbell/
      signal mode in mailbox controllers. This is useful to avoid another
      layer of abstraction as typically multiple channels can be multiplexied
      into single register.
      
      Cc: Jassi Brar <jassisinghbrar@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: Sudeep Holla's avatarSudeep Holla <sudeep.holla@arm.com>
      5e0b9c1e
  3. 20 Apr, 2020 5 commits
  4. 14 Apr, 2020 12 commits
  5. 12 Apr, 2020 4 commits
    • Linus Torvalds's avatar
      Linux 5.7-rc1 · 8f3d9f35
      Linus Torvalds authored
      8f3d9f35
    • Linus Torvalds's avatar
      MAINTAINERS: sort field names for all entries · 3b50142d
      Linus Torvalds authored
      
      
      This sorts the actual field names too, potentially causing even more
      chaos and confusion at merge time if you have edited the MAINTAINERS
      file.  But the end result is a more consistent layout, and hopefully
      it's a one-time pain minimized by doing this just before the -rc1
      release.
      
      This was entirely scripted:
      
        ./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS --order
      Requested-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3b50142d
    • Linus Torvalds's avatar
      MAINTAINERS: sort entries by entry name · 4400b7d6
      Linus Torvalds authored
      
      
      They are all supposed to be sorted, but people who add new entries don't
      always know the alphabet.  Plus sometimes the entry names get edited,
      and people don't then re-order the entry.
      
      Let's see how painful this will be for merging purposes (the MAINTAINERS
      file is often edited in various different trees), but Joe claims there's
      relatively few patches in -next that touch this, and doing it just
      before -rc1 is likely the best time.  Fingers crossed.
      
      This was scripted with
      
        /scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS
      
      but then I also ended up manually upper-casing a few entry names that
      stood out when looking at the end result.
      Requested-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4400b7d6
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4f8a3cc1
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of three patches to fix the fallout of the newly added split
        lock detection feature.
      
        It addressed the case where a KVM guest triggers a split lock #AC and
        KVM reinjects it into the guest which is not prepared to handle it.
      
        Add proper sanity checks which prevent the unconditional injection
        into the guest and handles the #AC on the host side in the same way as
        user space detections are handled. Depending on the detection mode it
        either warns and disables detection for the task or kills the task if
        the mode is set to fatal"
      
      * tag 'x86-urgent-2020-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        KVM: VMX: Extend VMXs #AC interceptor to handle split lock #AC in guest
        KVM: x86: Emulate split-lock access as a write in emulator
        x86/split_lock: Provide handle_guest_split_lock()
      4f8a3cc1