1. Jun 23, 2023
  2. Jun 22, 2023
    • Greg Kroah-Hartman's avatar
      Merge tag 'coresight-next-v6.5' of... · fa50d6b8
      Greg Kroah-Hartman authored
      Merge tag 'coresight-next-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux
      
       into char-misc-next
      
      Suzuki writes:
      
      coresight: Updates for v6.5
      
      CoreSight and hwtracing subsystem updates for v6.5 includes:
      
       - Fixes to the CTI module reference leaks. This involves,
         redesign of how the helper devices are tracked and CTI
         devices have been converted to helper devices.
       - Fix removal of the trctraceidr file from sysfs for ETMs.
       - Match all ETMv4 instances based on the ETMv4 architected
         registers and the CoreSight Component ID (CID), than having
         to add individual PIDs for CPUs.
       - Add support for Dummy CoreSight source and sink drivers.
       - Add James Clark as Reviewer for the CoreSight kernel drivers
       - Fixes to HiSilicon PCIe Tune and Trace Device driver
      
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      
      * tag 'coresight-next-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: (27 commits)
        hwtracing: hisi_ptt: Fix potential sleep in atomic context
        hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU
        hwtracing: hisi_ptt: Export available filters through sysfs
        hwtracing: hisi_ptt: Add support for dynamically updating the filter list
        hwtracing: hisi_ptt: Factor out filter allocation and release operation
        coresight: dummy: Update type of mode parameter in dummy_{sink,source}_enable()
        Documentation: trace: Add documentation for Coresight Dummy Trace
        dt-bindings: arm: Add support for Coresight dummy trace
        Coresight: Add coresight dummy driver
        MAINTAINERS: coresight: Add James Clark as Reviewer
        coresight: etm4x: Match all ETM4 instances based on DEVARCH and DEVTYPE
        coresight: etm4x: Make etm4_remove_dev() return void
        coresight: etm4x: Fix missing trctraceidr file in sysfs
        coresight: Fix CTI module refcount leak by making it a helper device
        coresight: Enable and disable helper devices adjacent to the path
        coresight: Refactor out buffer allocation function for ETR
        coresight: Make refcount a property of the connection
        coresight: Store in-connections as well as out-connections
        coresight: Simplify connection fixup mechanism
        coresight: Store pointers to connections rather than an array of them
        ...
      fa50d6b8
    • Greg Kroah-Hartman's avatar
      Merge tag 'icc-6.5-rc1' of... · 92852219
      Greg Kroah-Hartman authored
      Merge tag 'icc-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc
      
       into char-misc-next
      
      Georgi writes:
      
      interconnect changes for 6.5
      
      This pull request contains the interconnect changes for the 6.5-rc1 merge
      window which is a mix of core and driver changes with the following highlights:
      
      - Support for configuring QoS on the Qualcomm's RPM-based platforms, that
        required special handling of some interface (non-scaling) clocks.
      - Support for clock-based interconnect providers for cases when clock
        corresponds to bus bandwidth. This is used to enable CPU cluster bandwidth
        scaling on MSM8996 platforms. One patch is touching a file in the clock
        subsystem that has been acked by the maintainer.
      
      Core changes:
      	interconnect: add clk-based icc provider support
      	interconnect: icc-clk: fix modular build
      	interconnect: drop unused icc_get() interface
      
      Driver changes:
      	interconnect: qcom: rpm: Rename icc desc clocks to bus_blocks
      	interconnect: qcom: rpm: Rename icc provider num_clocks to num_bus_clocks
      	interconnect: qcom: rpm: Drop unused parameters
      	interconnect: qcom: rpm: Set QoS registers only once
      	interconnect: qcom: rpm: Handle interface clocks
      	interconnect: qcom: icc-rpm: Enforce 2 or 0 bus clocks
      	interconnect: qcom: rpm: Don't use clk_get_optional for bus clocks anymore
      	interconnect: qcom: msm8996: Promote to core_initcall
      	interconnect: qcom: rpm: allocate enough data in probe()
      	dt-bindings: interconnect/msm8996-cbf: add defines to be used by CBF
      	clk: qcom: cbf-msm8996: scale CBF clock according to the CPUfreq
      	dt-bindings: interconnect: fsl,imx8m-noc: drop unneeded quotes
      
      Signed-off-by: default avatarGeorgi Djakov <djakov@kernel.org>
      
      * tag 'icc-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
        dt-bindings: interconnect: fsl,imx8m-noc: drop unneeded quotes
        interconnect: icc-clk: fix modular build
        clk: qcom: cbf-msm8996: scale CBF clock according to the CPUfreq
        interconnect: drop unused icc_get() interface
        interconnect: qcom: rpm: allocate enough data in probe()
        interconnect: qcom: msm8996: Promote to core_initcall
        interconnect: qcom: rpm: Don't use clk_get_optional for bus clocks anymore
        interconnect: qcom: icc-rpm: Enforce 2 or 0 bus clocks
        interconnect: qcom: rpm: Handle interface clocks
        interconnect: add clk-based icc provider support
        dt-bindings: interconnect/msm8996-cbf: add defines to be used by CBF
        interconnect: qcom: rpm: Set QoS registers only once
        interconnect: qcom: rpm: Drop unused parameters
        interconnect: qcom: rpm: Rename icc provider num_clocks to num_bus_clocks
        interconnect: qcom: rpm: Rename icc desc clocks to bus_blocks
      92852219
  3. Jun 21, 2023
  4. Jun 19, 2023
    • Arnd Bergmann's avatar
      samples: pfsm: add CC_CAN_LINK dependency · a5052c85
      Arnd Bergmann authored
      When no libc for the target architecture is available, cross-compiling
      the same cannot work:
      
      samples/pfsm/pfsm-wakeup.c:12:10: fatal error: fcntl.h: No such file or directory
      
      Fixes: 9e66fb52
      
       ("samples: Add userspace example for TI TPS6594 PFSM")
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20230616145013.3889906-1-arnd@kernel.org
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a5052c85
    • Claudiu Beznea's avatar
      misc: fastrpc: check return value of devm_kasprintf() · af2e19d8
      Claudiu Beznea authored
      devm_kasprintf() returns a pointer to dynamically allocated memory.
      Pointer could be NULL in case allocation fails. Check pointer validity.
      Identified with coccinelle (kmerr.cocci script).
      
      Fixes: 3abe3ab3
      
       ("misc: fastrpc: add secure domain support")
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
      Link: https://lore.kernel.org/r/20230615102546.581899-1-claudiu.beznea@microchip.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      af2e19d8
    • Greg Kroah-Hartman's avatar
      Merge tag 'extcon-next-for-6.5' of... · afc5fddd
      Greg Kroah-Hartman authored
      Merge tag 'extcon-next-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
      
      Chanwoo writes:
      
      Update extcon next for v6.5
      
      Detailed description for this pull request:
      1. Clean-up extcon core without any behavior changes
      - Add extcon_alloc_cables/muex/groups to improve the readability
        of extcon_dev_register.
      
      - Fix kernel doc of property and property capability fields to aovid warnings
        and add missing description of struct extcon_dev.
      
      - Use DECLARE_BITMAP macro and sysfs_emit instead of sprintf
      
      - Use device_match_of_node helper instead of accessing the .of_node
      
      - Use ida_alloc/free to get the unique id for extcon device
      
      2. Update extcon-usbc-tusb320.c to support usb_role_switch and accessory detection
      - Add usb_role_switch support on extcon-usbsc-tusb320.
      
      - Add additional accessory detection for audio/debug accessory
        and then pass the deteced accessory information to typec subsystem
        on extcon-usbsc-tusb320.c.
      
      - Add the support of unregistration of typec port on both error handling
        and driver removal step on
      
      3. Update extcon provider drivers (apx288/qcom-spmi-misc/palmas)
      - Replace put_device with acpi_dev_put on extcon-axp288.c
      
      - Use platform_get_irq_byname_optional for getting irq of
        usb_id and usb_vbus on extcon-qcom-spmi-misc.c.
      
      - Remove unused of_gpio.h on extcon-palmas.c.
      
      4. Fix the devicetree binding document
      - Rename misc node name to 'usb-dect@900' on pm8941-misc.yam
      
      - Fix usb-id and usb_vbus defintion on pm8941-misc.yaml
      
      - Drop unneeded quotes from extcon-arizona.c devicetree documentation
      
      * tag 'extcon-next-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: (26 commits)
        dt-bindings: extcon: wlf,arizona: drop unneeded quotes
        extcon: Switch i2c drivers back to use .probe()
        extcon: Drop unneeded assignments
        extcon: Use sizeof(*pointer) instead of sizeof(type)
        extcon: Use unique number for the extcon device ID
        extcon: Remove dup device name in the message and unneeded error check
        extcon: Use dev_of_node(dev) instead of dev->of_node
        extcon: Use device_match_of_node() helper
        extcon: Amend kernel documentation of struct extcon_dev
        extcon: Use sysfs_emit() to instead of sprintf()
        extcon: Use DECLARE_BITMAP() to declare bit arrays
        extcon: Fix kernel doc of property capability fields to avoid warnings
        extcon: Fix kernel doc of property fields to avoid warnings
        extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
        extcon: usbc-tusb320: add usb_role_switch support
        extcon: usbc-tusb320: add accessory detection support
        extcon: Add extcon_alloc_groups to simplify extcon register function
        extcon: Add extcon_alloc_muex to simplify extcon register function
        extcon: Add extcon_alloc_cables to simplify extcon register function
        extcon: Remove redundant null checking for class
        ...
      afc5fddd
    • Nathan Chancellor's avatar
      coresight: dummy: Update type of mode parameter in dummy_{sink,source}_enable() · 185891f0
      Nathan Chancellor authored
      Clang's kernel Control Flow Integrity (kCFI) is a compiler-based
      security mitigation that ensures the target of an indirect function call
      matches the expected type of the call and trapping if they do not match
      exactly. The warning -Wincompatible-function-pointer-types-strict aims
      to catch these issues at compile time, which reveals:
      
        drivers/hwtracing/coresight/coresight-dummy.c:53:12: error: incompatible function pointer types initializing 'int (*)(struct coresight_device *, struct perf_event *, enum cs_mode)' with an expression of type 'int (struct coresight_device *, struct perf_event *, u32)' (aka 'int (struct coresight_device *, struct perf_event *, unsigned int)') [-Werror,-Wincompatible-function-pointer-types-strict]
           53 |         .enable = dummy_source_enable,
              |                   ^~~~~~~~~~~~~~~~~~~
        drivers/hwtracing/coresight/coresight-dummy.c:62:12: error: incompatible function pointer types initializing 'int (*)(struct coresight_device *, enum cs_mode, void *)' with an expression of type 'int (struct coresight_device *, u32, void *)' (aka 'int (struct coresight_device *, unsigned int, void *)') [-Werror,-Wincompatible-function-pointer-types-strict]
           62 |         .enable = dummy_sink_enable,
              |                   ^~~~~~~~~~~~~~~~~
        2 errors generated.
      
      Commit 9fa36828 ("coresight: Use enum type for cs_mode wherever
      possible") updated the type of the mode parameter in the prototype but
      this driver was not introduced until commit 9d3ba0b6 ("Coresight:
      Add coresight dummy driver") and 'int' is ABI compatible with 'enum
      cs_mode', so there is no warning from regular
      -Wincompatible-function-pointer-types.
      
      Adjust the type of the mode parameter in the callback implementations in
      the coresight dummy driver to match the prototype, clearing up the
      warning and avoiding kCFI failures at runtime.
      
      Fixes: 9d3ba0b6
      
       ("Coresight: Add coresight dummy driver")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20230616-coresight-dummy-fix-kcfi-warnings-v1-1-c55c64f8f0f5@kernel.org
      185891f0
  5. Jun 15, 2023