1. 18 3月, 2022 5 次提交
    • V
      VMCI: Check exclusive_vectors when freeing interrupt 1 · 5df0e734
      Vishnu Dasa 提交于
      free_irq() may be called to free an interrupt that was not
      allocated.  Add missing 'if' statement to check for
      exclusive_vectors when freeing interrupt 1.
      
      Fixes: cc68f217 ("VMCI: dma dg: register dummy IRQ handlers for DMA datagrams")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NBryan Tan <bryantan@vmware.com>
      Reviewed-by: NRajesh Jalisatgi <rjalisatgi@vmware.com>
      Signed-off-by: NVishnu Dasa <vdasa@vmware.com>
      Link: https://lore.kernel.org/r/20220318055843.30606-1-vdasa@vmware.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5df0e734
    • J
      VMCI: Update maintainers for VMCI · e70bcbcf
      Jorgen Hansen 提交于
      Remove myself as maintainer for the VMCI driver, and add Bryan
      and Rajesh.
      Acked-by: NRajesh Jalisatgi <rjalisatgi@vmware.com>
      Acked-by: NBryan Tan <bryantan@vmware.com>
      Acked-by: NVishnu Dasa <vdasa@vmware.com>
      Signed-off-by: NJorgen Hansen <jhansen@vmware.com>
      Link: https://lore.kernel.org/r/20220227210539.19665-1-jhansen@vmware.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e70bcbcf
    • R
      virtio_console: eliminate anonymous module_init & module_exit · fefb8a2a
      Randy Dunlap 提交于
      Eliminate anonymous module_init() and module_exit(), which can lead to
      confusion or ambiguity when reading System.map, crashes/oops/bugs,
      or an initcall_debug log.
      
      Give each of these init and exit functions unique driver-specific
      names to eliminate the anonymous names.
      
      Example 1: (System.map)
       ffffffff832fc78c t init
       ffffffff832fc79e t init
       ffffffff832fc8f8 t init
      
      Example 2: (initcall_debug log)
       calling  init+0x0/0x12 @ 1
       initcall init+0x0/0x12 returned 0 after 15 usecs
       calling  init+0x0/0x60 @ 1
       initcall init+0x0/0x60 returned 0 after 2 usecs
       calling  init+0x0/0x9a @ 1
       initcall init+0x0/0x9a returned 0 after 74 usecs
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Reviewed-by: NAmit Shah <amit@kernel.org>
      Cc: virtualization@lists.linux-foundation.org
      Cc: Arnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20220316192010.19001-3-rdunlap@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fefb8a2a
    • G
      Merge tag 'coresight-next-v5.18-v2' of... · 6aec3bfe
      Greg Kroah-Hartman 提交于
      Merge tag 'coresight-next-v5.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next
      
      Suzuki writes:
      
      coresight: changes for v5.18
      
      The coresight update for v5.18 includes
        - TRBE erratum workarounds for Arm Cortex-A510
        - Fixes for leaking root namespace PIDs into non-root namespace
          trace sessions
        - Miscellaneous fixes and cleanups
      
      Updated tag to reflect missing committer s-o-b tags.
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      
      * tag 'coresight-next-v5.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
        coresight: Drop unused 'none' enum value for each component
        coresight: etm3x: Don't trace PID for non-root PID namespace
        coresight: etm4x: Don't trace PID for non-root PID namespace
        coresight: etm4x: Don't use virtual contextID for non-root PID namespace
        coresight: etm4x: Add lock for reading virtual context ID comparator
        coresight: trbe: Move check for kernel page table isolation from EL0 to probe
        coresight: no-op refactor to make INSTP0 check more idiomatic
        hwtracing: coresight: Replace acpi_bus_get_device()
        coresight: syscfg: Fix memleak on registration failure in cscfg_create_device
        coresight: Fix TRCCONFIGR.QE sysfs interface
        coresight: trbe: Work around the trace data corruption
        coresight: trbe: Work around the invalid prohibited states
        coresight: trbe: Work around the ignored system register writes
      6aec3bfe
    • G
      Merge tag 'iio-for-5.18a' of... · cc6ce5ac
      Greg Kroah-Hartman 提交于
      Merge tag 'iio-for-5.18a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
      
      Jonathan writes:
      
      First set of new device support, fixes, cleanups and features for IIO in 5.18
      
      This cycle we had quite a few series that applied similar changes
      to lots of drivers. To keep this description manageable I have
      called those out in their own section rather than per driver.
      
      Particularly pleased to see the long running AFE precision series
      going in this cycle.
      
      Series includes some late breaking fixes.
      
      New device support
      * adi,ada4250 amplifier
        - New driver and dt bindings for this programmable gain amplifier.
      * adi,admv1014 microwave down-converter
        - New driver, dt bindings and some device specific ABI that
          may be generalized as more drivers for devices similar to this
          are added.
      * adi,admv4420 K Band down-converter.
        - New driver and dt bindings.
      * adi,adxl367 accelerometer driver.
        - New driver, dt-bindings + some new IIO ABI definitions to support
          reference magnitude events where an estimate of the acceleration
          due to gravity has been removed.
        - A few fixes as follow up patches.
      * adi,ltc2688 DAC with toggle and dither modes.
        - New driver and bindings. Includes some new driver specific (for now)
          ABI for handling toggle mode and the addition of a dither waveform to
          the DAC output.
      * AFE (analog front end) add support for additional types of analog device
        in front of an ADC.
        - RTD temperature sensors with dt bindings.
        - Temperature transducers wit dt bindings.
        - Related cleanup and features listed in other sections below.
      * maxim,ds3502 potentiometer.
        - Add support to ds1803 driver which required significant rework.
      * mediatek,mt2701-auxadc driver
        - Add mediatek,mt8186-auxadc - id table and chip specific info only.
      * semtech,sx9324, semtech,ax9360
        - Substantial refactoring of sx9310 to extract core logic for reuse
          into a separate module
        - New driver using this supporting sx9324 proximity sensors.
        - New driver using this supporting sx9360 proximity sensors.
      * silan,sc7a20
        - Compatible with the st,lis2dh (or nearly anyway) so add ID and
          chip specific info to enable support. Also silan vendor ID added
          for dt-bindings.
      
      Staging graduation
      * adi,ad7280a monitoring ADC for stacked lithium-ion batteries in
        electric cars and similar.
        - Substantial rework of driver required to bring inline with current
          IIO best practice. An unusual device in IIO so some interesting features
          we may see more of in future.
      
      Multiple driver/core cleanup
      - Use sysfs_emit() in simple locations where there is no path to change
        to various core created attributes.
      - Trivial white space fixes around inconsistency between space after { and
        before } in id tables.
      - Introduce new handling for fractional types to avoid repeated similar
        implementations. Use this in 3 drivers. Note this is also targeted
        at future use in the AFE driver and was motivated by discussions
        around the precision related work on that driver.
      - of related header cleanups - drop of*.h and add mod_devicetable.h as
        appropriate.
      - Move a number of symbol exports into IIO_* namespaces.  Two categories,
        1) Library used by multiple drivers e.g. st_sensors
        2) Core driver module exporting functions used by bus specific modules.
        A few related cleanups in this set.
      - Switch from CONFIG_PM_* guards to new DEFINE_SIMPLE_DEV_PM_OPS() and
        similar to simplify drivers and take advantage of these new macros
        allowing the compiler to do the job or removing unused code without
        the need for __maybe_unused markings. Conversion of other drivers to
        these new macros ongoing.
      
      Features
      * adi,adf4350
        - Switch from of specific to generic device properties enabling use with
          other firmware types.
      * adi,adx345
        - Switch from of specific to generic device properties.
        - Add ACPI ID ADS0345
        - Related driver cleanup.
      * adi,hmc425a
        - Switch from of specific to generic device properties.
      * afe analog rescaler driver
        - Wider range of types supported for scale.
        - Support offset.
        - Kunit tests.
      * atlas,ezo-sensor
        - Convert from of to device properties.
      * fsl,mma8452
        - Support mount matrix.
      * infineon,dps310:
        - Add ACPI ID IFX3100.
      * invensense,mpu6050
        - Convert to generic device properties.
      * maxim,ds1803
        - Add out_raw_available before supporting more devices.
        - Convert from of specific to device properties.
      * samsung,ssp_sensors
        - Convert from of specific to device properties.
      * st,stm32-timer trigger
        - Convert from of specific to device properties.
      * ti,hdc101x
        - Add ACPI ID TXNW1010.
      * ti,tsc2046:
        - Add read_raw support to enable use of iio_hwmon and similar.
      
      Fixes / cleanup.
      * mailmap
        - Update for Cai Huoqing
      * MAINTAINERS
        - Fix Analog Devices related links.
        - Add entry for ADRF6780
        - Add entry for ADMV1013
        - Add entry for AD7293
        - Add entry for ADMV8818
        - Update files listed for adis-lib
      * iio core:
        - Fix wrong comment about current_mode being something a driver should
          ever access.
        - Use struct_size() rather than open coding in industrialio-hw-consumer
      * adi,axl355
        - Use units.h definitions instead of local versions.
      * adi,adis-lib
        - Simplify *updated_bits() macro
        - Whitespace cleanup.
      * afe - Note many of these fixes only apply to particular configurations
        so the problems have probably not been seen in the wild, but will be
        visible with new usecases enabled this cycle.
        - Fix application of consumer scale for IIO_VAL_INT.
        - Apply a scale of 1 when no scale is provided.
        - Make best effort to establish a valid offset value for fractional
          cases.
        - Use s64 for scale calculations where parameters may be signed.
        - Tidy up include order.
        - Improve accuracy for small fractional sales
        - Reduce risk of integer overflow.
      * ams,as3935
        - Use devm_delayed_work_autocancel() to replace open coded equivalent.
      * aspeed,adc
        - Fix wrong use of divider flag.
      * atmel,sama5d2-adc
        - Relax atmel,trigger-edge-type to optional.
        - Drop Ludovic Desroches from listed maintainers of the dt-binding
          inline with previous MAINTAINERS entry update.
      * fsl,mma8452
        - Fix probing when i2c_device_id used.
        - dev_get_drvdata() on the iio_dev->dev, no longer returns iio_dev.
          Use dev_to_iio_dev() instead. Note the original path in here
          worked more by luck than design.
      * invensense,mpu6050
        - Drop ACPI_PTR() protection to avoid an unused warning.
        - Use fact ACPI_COMPANION() returns null when ACPI_HANDLE() does to
          simplify handling.
      * motorola,cpcap-adc
        - Drop unused assignment.
      * qcom,spmi-adc
        - Fix wrong example of 'reg' in binding document.
      * renesas,rzg2l-adc
        - Trivial typo fix.
      * semtech,sx9360
        - Fix wrong register handling for event generation.
      * st_sensors
        - Allow manual disabling of I2C or SPI module if not needed for a particular
          board. Default is still to enable the bus specific module if
          appropriate bus is supported.
      * st,lsm6dsx
        - dev_get_drvdata() on the iio_dev->dev, no longer returns iio_dev.
          Use dev_to_iio_dev() instead.
      * ti,palmas-gpadc
        - Split the interrupt fields in the dt-binding example
      * ti,tsc2046
        - Rework state machine to improve readability after recent debugging of
          an issue fixed elsewhere.
        - Add a sanity check to avoid very large memory allocations if a crazy
          delay is specified.
      * ti,twl6030
        - Add error handling if devm_request_threaded_irq() fails.
      * xilinx,ams
        - Use devm_delayed_work_autocancel() instead of open coding equivalent.
        - Fix missing required clock entry in dt-binding.
        - Fix miss counting of channels resulting in ps channels not
          being enabled.
        - Fix incorrect values written to sequencer registers.
        - Fix sequence for single channel reading.
      
      * tag 'iio-for-5.18a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (245 commits)
        iio: adc: xilinx-ams: Fix single channel switching sequence
        iio: adc: xilinx-ams: Fixed wrong sequencer register settings
        iio: adc: xilinx-ams: Fixed missing PS channels
        dt-bindings: iio: adc: zynqmp_ams: Add clock entry
        iio: accel: mma8452: use the correct logic to get mma8452_data
        iio: adc: aspeed: Add divider flag to fix incorrect voltage reading.
        iio: imu: st_lsm6dsx: use dev_to_iio_dev() to get iio_dev struct
        dt-bindings: iio: Add ltc2688 documentation
        iio: ABI: add ABI file for the LTC2688 DAC
        iio: dac: add support for ltc2688
        dt-bindings: iio: afe: add bindings for temperature transducers
        dt-bindings: iio: afe: add bindings for temperature-sense-rtd
        iio: afe: rescale: add temperature transducers
        iio: afe: rescale: add RTD temperature sensor support
        iio: test: add basic tests for the iio-rescale driver
        iio: afe: rescale: reduce risk of integer overflow
        iio: afe: rescale: fix accuracy for small fractional scales
        iio: afe: rescale: add offset support
        iio: afe: rescale: add INT_PLUS_{MICRO,NANO} support
        iio: afe: rescale: expose scale processing function
        ...
      cc6ce5ac
  2. 11 3月, 2022 18 次提交
    • G
      Merge tag 'icc-5.18-rc1' of... · d6cd2f85
      Greg Kroah-Hartman 提交于
      Merge tag 'icc-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next
      
      Georgi writes:
      
      interconnect changes for 5.18
      
      These are the interconnect changes for the 5.18-rc1 merge window
      consisting of minor framework and driver updates.
      
      Core changes:
       - Added stubs for the bulk API to expand compile testing coverage.
      
      Driver changes:
       - imx: Implemented get_bw() function to get initial avg/peak bandwidth.
       - msm8939: Fix ioremap collision for snoc-mm.
      Signed-off-by: NGeorgi Djakov <djakov@kernel.org>
      
      * tag 'icc-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
        interconnect: Add stubs for the bulk API
        interconnect: qcom: msm8939: Remove snoc_mm specific regmap
        dt-bindings: interconnect: Convert snoc-mm to a sub-node of snoc
        interconnect: imx: Add imx_icc_get_bw function to set initial avg and peak
      d6cd2f85
    • A
      coresight: Drop unused 'none' enum value for each component · 286f9505
      Anshuman Khandual 提交于
      CORESIGHT_DEV_TYPE_NONE/CORESIGHT_DEV_SUBTYPE_XXXX_NONE values are not used
      any where. Actual enumeration can start from 0. Just drop these unused enum
      values.
      
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/1645005118-10561-1-git-send-email-anshuman.khandual@arm.comSigned-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      286f9505
    • L
      coresight: etm3x: Don't trace PID for non-root PID namespace · ec70b05d
      Leo Yan 提交于
      ETMv3 driver enables PID tracing by directly using perf config from
      userspace, this means the tracer will capture PID packets from root
      namespace but the profiling session runs in non-root PID namespace.
      Finally, the recorded packets can mislead perf reporting with the
      mismatched PID values.
      
      This patch changes to only enable PID tracing for root PID namespace.
      Note, the hardware supports VMID tracing from ETMv3.5, but the driver
      never enables VMID trace, this patch doesn't handle VMID trace (bit 30
      in ETMCR register) particularly.
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20220204152403.71775-5-leo.yan@linaro.org
      ec70b05d
    • L
      coresight: etm4x: Don't trace PID for non-root PID namespace · aab47386
      Leo Yan 提交于
      When runs in perf mode, the driver always enables the PID tracing.  This
      can lead confusion when the profiling session runs in non-root PID
      namespace, whereas it records the PIDs from the root PID namespace.
      
      To avoid confusion for PID tracing, when runs in perf mode, this patch
      changes to only enable PID tracing for root PID namespace.
      
      As result, after apply this patch, the perf tool reports PID as '-1' for
      all samples:
      
        # unshare --fork --pid perf record -e cs_etm// -m 64K,64K -a \
      	-o perf_test.data -- uname
        # perf report -i perf_test.data --itrace=Zi1000i --stdio
      
        # Total Lost Samples: 0
        #
        # Samples: 94  of event 'instructions'
        # Event count (approx.): 94000
        #
        # Overhead  Command  Shared Object      Symbol
        # ........  .......  .................  ..............................
        #
            68.09%  :-1      [kernel.kallsyms]  [k] __sched_text_end
             3.19%  :-1      [kernel.kallsyms]  [k] hrtimer_interrupt
             2.13%  :-1      [kernel.kallsyms]  [k] __bitmap_and
             2.13%  :-1      [kernel.kallsyms]  [k] trace_vbprintk
             1.06%  :-1      [kernel.kallsyms]  [k] __fget_files
             1.06%  :-1      [kernel.kallsyms]  [k] __schedule
             1.06%  :-1      [kernel.kallsyms]  [k] __softirqentry_text_start
             1.06%  :-1      [kernel.kallsyms]  [k] __update_load_avg_cfs_rq
             1.06%  :-1      [kernel.kallsyms]  [k] __update_load_avg_se
             1.06%  :-1      [kernel.kallsyms]  [k] arch_counter_get_cntpct
             1.06%  :-1      [kernel.kallsyms]  [k] check_and_switch_context
             1.06%  :-1      [kernel.kallsyms]  [k] format_decode
             1.06%  :-1      [kernel.kallsyms]  [k] handle_percpu_devid_irq
             1.06%  :-1      [kernel.kallsyms]  [k] irq_enter_rcu
             1.06%  :-1      [kernel.kallsyms]  [k] irqtime_account_irq
             1.06%  :-1      [kernel.kallsyms]  [k] ktime_get
             1.06%  :-1      [kernel.kallsyms]  [k] ktime_get_coarse_real_ts64
             1.06%  :-1      [kernel.kallsyms]  [k] memmove
             1.06%  :-1      [kernel.kallsyms]  [k] perf_ioctl
             1.06%  :-1      [kernel.kallsyms]  [k] perf_output_begin
             1.06%  :-1      [kernel.kallsyms]  [k] perf_output_copy
             1.06%  :-1      [kernel.kallsyms]  [k] profile_tick
             1.06%  :-1      [kernel.kallsyms]  [k] sched_clock
             1.06%  :-1      [kernel.kallsyms]  [k] timerqueue_add
             1.06%  :-1      [kernel.kallsyms]  [k] trace_save_cmdline
             1.06%  :-1      [kernel.kallsyms]  [k] update_load_avg
             1.06%  :-1      [kernel.kallsyms]  [k] vbin_printf
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20220204152403.71775-4-leo.yan@linaro.org
      aab47386
    • L
      coresight: etm4x: Don't use virtual contextID for non-root PID namespace · 1314dd19
      Leo Yan 提交于
      As commented in the function ctxid_pid_store(), it can cause the PID
      values mismatching between context ID tracing and PID allocated in a
      non-root namespace.
      
      For this reason, when a process runs in non-root PID namespace, the
      driver doesn't allow PID tracing and returns failure when access
      contextID related sysfs nodes.
      
      VMID works for virtual contextID when the kernel runs in EL2 mode with
      VHE; on the other hand, the driver doesn't prevent users from accessing
      it when programs run in the non-root namespace.  Thus this can lead
      to same issues with contextID described above.
      
      This patch imposes the checking on VMID related sysfs knobs and returns
      failure if current process runs in non-root PID namespace.
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20220204152403.71775-3-leo.yan@linaro.org
      1314dd19
    • L
      coresight: etm4x: Add lock for reading virtual context ID comparator · bf0ef4f1
      Leo Yan 提交于
      Updates to the values and the index are protected via the spinlock.
      Ensure we use the same lock to read the value safely.
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20220204152403.71775-2-leo.yan@linaro.org
      bf0ef4f1
    • S
      coresight: trbe: Move check for kernel page table isolation from EL0 to probe · ef1dacf4
      Sudeep Holla 提交于
      Currently with the check present in the module initialisation, it shouts
      on all the systems irrespective of presence of coresight trace buffer
      extensions.
      
      Similar to Arm SPE perf driver, move the check for kernel page table
      isolation from  EL0 to the device probe stage instead of the module
      initialisation so that it complains only on the systems that support TRBE.
      
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: coresight@lists.linaro.org
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Reviewed-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/20220203190159.3145272-1-sudeep.holla@arm.comSigned-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      ef1dacf4
    • J
      coresight: no-op refactor to make INSTP0 check more idiomatic · d05bbad0
      James Clark 提交于
      The spec says this:
      
        P0 tracing support field. The permitted values are:
            0b00  Tracing of load and store instructions as P0 elements is not
                  supported.
            0b11  Tracing of load and store instructions as P0 elements is
                  supported, so TRCCONFIGR.INSTP0 is supported.
      
                  All other values are reserved.
      
      The value we are looking for is 0b11 so simplify this. The double read
      and && was a bit obfuscated.
      Suggested-by: NSuzuki Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NJames Clark <james.clark@arm.com>
      Link: https://lore.kernel.org/r/20220203115336.119735-2-james.clark@arm.comSigned-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      d05bbad0
    • R
      hwtracing: coresight: Replace acpi_bus_get_device() · 27caf7e4
      Rafael J. Wysocki 提交于
      Replace acpi_bus_get_device() that is going to be dropped with
      acpi_fetch_acpi_dev().
      
      No intentional functional impact.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Link: https://lore.kernel.org/r/5790600.lOV4Wx5bFT@kreacherSigned-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      27caf7e4
    • M
      coresight: syscfg: Fix memleak on registration failure in cscfg_create_device · cfa5dbcd
      Miaoqian Lin 提交于
      device_register() calls device_initialize(),
      according to doc of device_initialize:
      
          Use put_device() to give up your reference instead of freeing
          * @dev directly once you have called this function.
      
      To prevent potential memleak, use put_device() for error handling.
      Signed-off-by: NMiaoqian Lin <linmq006@gmail.com>
      Fixes: 85e2414c ("coresight: syscfg: Initial coresight system configuration")
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20220124124121.8888-1-linmq006@gmail.comSigned-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      cfa5dbcd
    • J
      coresight: Fix TRCCONFIGR.QE sysfs interface · ea75a342
      James Clark 提交于
      It's impossible to program a valid value for TRCCONFIGR.QE
      when TRCIDR0.QSUPP==0b10. In that case the following is true:
      
        Q element support is implemented, and only supports Q elements without
        instruction counts. TRCCONFIGR.QE can only take the values 0b00 or 0b11.
      
      Currently the low bit of QSUPP is checked to see if the low bit of QE can
      be written to, but as you can see when QSUPP==0b10 the low bit is cleared
      making it impossible to ever write the only valid value of 0b11 to QE.
      0b10 would be written instead, which is a reserved QE value even for all
      values of QSUPP.
      
      The fix is to allow writing the low bit of QE for any non zero value of
      QSUPP.
      
      This change also ensures that the low bit is always set, even when the
      user attempts to only set the high bit.
      Signed-off-by: NJames Clark <james.clark@arm.com>
      Reviewed-by: NMike Leach <mike.leach@linaro.org>
      Fixes: d8c66962 ("coresight-etm4x: Controls pertaining to the reset, mode, pe and events")
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20220120113047.2839622-2-james.clark@arm.comSigned-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      ea75a342
    • A
      coresight: trbe: Work around the trace data corruption · 3a828845
      Anshuman Khandual 提交于
      TRBE implementations affected by Arm erratum #1902691 might corrupt trace
      data or deadlock, when it's being written into the memory. Workaround this
      problem in the driver, by preventing TRBE initialization on affected cpus.
      The firmware must have disabled the access to TRBE for the kernel on such
      implementations. This will cover the kernel for any firmware that doesn't
      do this already. This just updates the TRBE driver as required.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Suzuki Poulose <suzuki.poulose@arm.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/1643120437-14352-8-git-send-email-anshuman.khandual@arm.comSigned-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      3a828845
    • A
      coresight: trbe: Work around the invalid prohibited states · f209e9fe
      Anshuman Khandual 提交于
      TRBE implementations affected by Arm erratum #2038923 might get TRBE into
      an inconsistent view on whether trace is prohibited within the CPU. As a
      result, the trace buffer or trace buffer state might be corrupted. This
      happens after TRBE buffer has been enabled by setting TRBLIMITR_EL1.E,
      followed by just a single context synchronization event before execution
      changes from a context, in which trace is prohibited to one where it isn't,
      or vice versa. In these mentioned conditions, the view of whether trace is
      prohibited is inconsistent between parts of the CPU, and the trace buffer
      or the trace buffer state might be corrupted.
      
      Work around this problem in the TRBE driver by preventing an inconsistent
      view of whether the trace is prohibited or not based on TRBLIMITR_EL1.E by
      immediately following a change to TRBLIMITR_EL1.E with at least one ISB
      instruction before an ERET, or two ISB instructions if no ERET is to take
      place. This just updates the TRBE driver as required.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Suzuki Poulose <suzuki.poulose@arm.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/1643120437-14352-7-git-send-email-anshuman.khandual@arm.comSigned-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      f209e9fe
    • A
      coresight: trbe: Work around the ignored system register writes · ac0ba210
      Anshuman Khandual 提交于
      TRBE implementations affected by Arm erratum #2064142 might fail to write
      into certain system registers after the TRBE has been disabled. Under some
      conditions after TRBE has been disabled, writes into certain TRBE registers
      TRBLIMITR_EL1, TRBPTR_EL1, TRBBASER_EL1, TRBSR_EL1 and TRBTRG_EL1 will be
      ignored and not be effected.
      
      Work around this problem in the TRBE driver by executing TSB CSYNC and DSB
      just after the trace collection has stopped and before performing a system
      register write to one of the affected registers. This just updates the TRBE
      driver as required.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Suzuki Poulose <suzuki.poulose@arm.com>
      Cc: coresight@lists.linaro.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/1643120437-14352-6-git-send-email-anshuman.khandual@arm.comSigned-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      ac0ba210
    • G
      Merge tag 'phy-for-5.18' of... · 9edcfaa3
      Greg Kroah-Hartman 提交于
      Merge tag 'phy-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next
      
      Vinod writes:
      
      phy-for-5.18
      
        - New support:
              - Mediatek tphy support for MT8186
      	- Qualcomm usb phy support for sc8180x and sc8280xp
      	- Qualcomm ufs phy support for sc8180x and sc8280xp
      	- Qualcomm usb phy support for MSM8953
      	- Cadence D-Phy Rx support
      	- Sun4i support for USB phy
      	- Rockchip naneng combo phy support for RK3568
      	- Qualcomm eDP PHY for sc7280
      
        - Updates:
              - wake on support for Synopsis XHCI controllers
      	- Yamilify Qualcomm USB HS phy binding
      	- Charger detection support for TI tusb1210
      
      * tag 'phy-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (53 commits)
        phy: qcom-qmp: add sc8280xp UFS PHY
        dt-bindings: phy: qcom,qmp: add sc8180x and sc8280xp ufs compatibles
        phy: qcom-snps: Add sc8280xp support
        dt-bindings: phy: qcom,usb-snps-femto-v2: Add sc8180x and sc8280xp
        dt-bindings: Revert "dt-bindings: soc: grf: add naneng combo phy register compatible"
        phy: dt-bindings: Add Cadence D-PHY Rx bindings
        phy: dt-bindings: cdns,dphy: add power-domains property
        phy: dt-bindings: Convert Cadence DPHY binding to YAML
        phy: cadence: Add Cadence D-PHY Rx driver
        dt-bindings: phy: renesas,usb2-phy: Document RZ/V2L phy bindings
        Revert "PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware"
        Revert "usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720"
        Revert "ata: ahci: mvebu: Make SATA PHY optional for Armada 3720"
        phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation
        phy: marvell: phy-mvebu-a3700-comphy: Remove port from driver configuration
        phy: phy-brcm-usb: fixup BCM4908 support
        dt-bindings: phy: mediatek,tphy: Add compatible for MT8192
        phy: ti: tusb1210: Add charger detection
        phy: ti: tusb1210: Add a delay between power-on and restoring the phy-parameters
        phy: ti: tusb1210: Drop tusb->vendor_specific2 != 0 check from tusb1210_power_on()
        ...
      9edcfaa3
    • G
      Merge tag 'soundwire-5.18-rc1' of... · 57b1659f
      Greg Kroah-Hartman 提交于
      Merge tag 'soundwire-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next
      
      Vinod writes:
      
      soundwire updates for 5.17-rc1
      
       - stream handling refactoring and renaming to make it consistent
         in the core
       - runtime pm suport for qcom driver
       - in band wake up interrupt support for qcom driver
      
      * tag 'soundwire-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (27 commits)
        soundwire: qcom: use __maybe_unused for swrm_runtime_resume()
        soundwire: qcom: constify static struct qcom_swrm_data global variables
        soundwire: qcom: add in-band wake up interrupt support
        dt-bindings: soundwire: qcom: document optional wake irq
        soundwire: qcom: add runtime pm support
        soundwire: stream: make enable/disable/deprepare idempotent
        soundwire: stream: sdw_stream_add_ functions can be called multiple times
        soundwire: stream: introduce sdw_slave_rt_find() helper
        soundwire: stream: separate alloc and config within sdw_stream_add_xxx()
        soundwire: stream: move list addition to sdw_slave_alloc_rt()
        soundwire: stream: rename and move master/slave_rt_free routines
        soundwire: stream: group sdw_stream_ functions
        soundwire: stream: split sdw_alloc_slave_rt() in alloc and config
        soundwire: stream: move sdw_alloc_slave_rt() before 'master' helpers
        soundwire: stream: split sdw_alloc_master_rt() in alloc and config
        soundwire: stream: simplify sdw_alloc_master_rt()
        soundwire: stream: group sdw_port and sdw_master/slave_port functions
        soundwire: stream: add 'slave' prefix for port range checks
        soundwire: stream: split alloc and config in two functions
        soundwire: stream: split port allocation and configuration loops
        ...
      57b1659f
    • G
      Merge tag 'misc-habanalabs-next-2022-02-28' of... · 4dee7a71
      Greg Kroah-Hartman 提交于
      Merge tag 'misc-habanalabs-next-2022-02-28' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-next
      
      Oded writes:
      
      This tag contains habanalabs driver changes for v5.18:
      
      - Add new feature of recording time-stamp when a completion
        queue counter reaches a target value as determined by the
        userspace application. This is used by the graph compiler
        to accurately measure the time it takes for certain workloads
        to execute, which helps to fine-tune future compilations.
      
      - Add two new attributes to sysfs that expose the VRM and
        f/w OS version
      
      - Add a delay to the reset path that allows the driver to
        receive and handle additional events from the f/w before
        doing the reset. This can help when debugging why a reset
        event was received from the f/w.
      
      - Re-factor some of the sysfs code in the driver. Mainly,
        move functions from hwmgr.c to more relevant files and
        totally remove hwmgr.c file.
      
      - Fix multiple bugs such as races, use-after-free, ignoring
        error codes, etc.
      
      - As usual, multiple minor changes and small fixes.
      
      * tag 'misc-habanalabs-next-2022-02-28' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: (50 commits)
        habanalabs: remove deprecated firmware states
        habanalabs: add an option to delay a device reset
        habanalabs: Add check for pci_enable_device
        habanalabs: Fix reset upon device release bug
        habanalabs: make sure device mem alloc is page aligned
        habanalabs/gaudi: add missing handling of NIC related events
        habanalabs/gaudi: handle axi errors from NIC engines
        habanalabs: allow user to set allocation page size
        habanalabs: use kernel-doc for memory ioctl documentation
        habanalabs: avoid using an uninitialized variable
        habanalabs: set max power on device init per ASIC
        habanalabs: use proper max_power variable for device utilization
        habanalabs: enable stop-on-error debugfs setting per ASIC
        habanalabs: change function to static
        habanalabs: add missing include of vmalloc.h
        habanalabs: fix use-after-free bug
        habanalabs: rephrase error messages in PCI initialization
        habanalabs: fix spelling mistake
        habanalabs: Timestamps buffers registration
        habanalabs: fix race when waiting on encaps signal
        ...
      4dee7a71
    • G
      Merge tag 'fpga-for-5.18-rc1' of... · 0245107a
      Greg Kroah-Hartman 提交于
      Merge tag 'fpga-for-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-next
      
      Moritz writes:
      
      FPGA Manager changes for 5.18-rc1
      
      Christophe's patch is part of a larger effort of removing the use of the
      deprecated pci-dma-compat API.
      
      All patches have been reviewed on the mailing list, and have been in the
      last few linux-next releases (as part of our for-next branch) without issues.
      Signed-off-by: NMoritz Fischer <mdf@kernel.org>
      
      * tag 'fpga-for-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga:
        fpga: dfl: pci: Remove usage of the deprecated "pci-dma-compat.h" API
      0245107a
  3. 03 3月, 2022 1 次提交
  4. 02 3月, 2022 16 次提交