[TH1520] Clean up CLK Driver Module#246
[TH1520] Clean up CLK Driver Module#246zhuzhenxxx-collab wants to merge 1224 commits intoRVCK-Project:rvck-6.6from
Conversation
…pr-controller" community inclusion category: feature bugzilla: RVCK-Project#71 -------------------------------- This reverts commit a810a59. Implement using the upstream mainline. Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-v6.12-rc4 commit 6eabf65 category: feature bugzilla: RVCK-Project#71 -------------------------------- Set error to -ENOMEM if kcalloc() fails or if irq_domain_add_linear() fails inside of plic_probe() instead of returning 0. Fixes: 4d936f1 ("irqchip/sifive-plic: Probe plic driver early for Allwinner D1 platform") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Anup Patel <anup@brainfault.org> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240903-correct_error_codes_sifive_plic-v1-1-d929b79663a2@rivosinc.com Closes: https://lore.kernel.org/r/202409031122.yBh8HrxA-lkp@intel.com/ Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
…pu() mainline inclusion from mainline-v6.18-rc1 commit b92ff23 category: feature bugzilla: RVCK-Project#71 -------------------------------- Replace the open coded for_each_cpu(cpu, cpu_present_mask) loop with the more readable and equivalent for_each_present_cpu(cpu) macro. Signed-off-by: Fushuai Wang <wangfushuai@baidu.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250811064701.2906-1-wangfushuai@baidu.com Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-v6.19-rc1 commit 14ff9e5 category: feature bugzilla: RVCK-Project#71 -------------------------------- Optimize the PLIC driver by maintaining the interrupt enable state in the handler's enable_save array during normal operation rather than only during suspend/resume. This eliminates the need to read enable registers during suspend and makes the enable state immediately available for other purposes. Let __plic_toggle() update both the hardware registers and the cached enable_save state atomically within the existing enable_lock protection. That allows to remove the suspend-time enable register reading since handler::enable_save now always reflects the current state. [ tglx: Massaged change log ] Signed-off-by: Charles Mirabile <cmirabil@redhat.com> Signed-off-by: Lucas Zampieri <lzampier@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://patch.msgid.link/20251024083647.475239-4-lzampier@redhat.com Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-v6.19-rc1 commit 539d147 category: feature bugzilla: RVCK-Project#71 -------------------------------- Add a new compatible for the plic found in UltraRISC DP1000 with a quirk to work around a known hardware bug with IRQ claiming in the UR-CP100 cores. When claiming an interrupt on UR-CP100 cores, all other interrupts must be disabled before the claim register is accessed to prevent incorrect handling of the interrupt. This is a hardware bug in the CP100 core implementation, not specific to the DP1000 SoC. When the PLIC_QUIRK_CP100_CLAIM_REGISTER_ERRATUM flag is present, a specialized handler (plic_handle_irq_cp100) disables all interrupts except for the first pending one before reading the claim register, and then restores the interrupts before further processing of the claimed interrupt continues. This implementation leverages the enable_save optimization, which maintains the current interrupt enable state in memory, avoiding additional register reads during the workaround. The driver matches on "ultrarisc,cp100-plic" to apply the quirk to all SoCs using UR-CP100 cores, regardless of the specific SoC implementation. This has no impact on other platforms. [ tglx: Condensed the code a bit, massaged change log and comments ] Co-developed-by: Zhang Xincheng <zhangxincheng@ultrarisc.com> Signed-off-by: Zhang Xincheng <zhangxincheng@ultrarisc.com> Signed-off-by: Charles Mirabile <cmirabil@redhat.com> Signed-off-by: Lucas Zampieri <lzampier@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Samuel Holland <samuel.holland@sifive.com> Link: https://patch.msgid.link/20251024083647.475239-5-lzampier@redhat.com Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-v6.19-rc1 commit 9dfb295 category: feature bugzilla: RVCK-Project#71 -------------------------------- Add compatible strings for the PLIC found in UltraRISC DP1000 SoC. The PLIC is part of the UR-CP100 core and has a hardware bug requiring a workaround. Signed-off-by: Charles Mirabile <cmirabil@redhat.com> Signed-off-by: Lucas Zampieri <lzampier@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20251024083647.475239-3-lzampier@redhat.com Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-v6.19-rc1 commit a045359 category: feature bugzilla: RVCK-Project#71 -------------------------------- The code path for M-Mode linux that disables interrupts for other contexts was missed when refactoring __plic_toggle(). Since the new version caches updates to the state for the primary context, its use in this codepath is no longer desireable even if it could be made correct. Replace the calls to __plic_toggle() with a loop that simply disables all of the interrupts in groups of 32 with a direct mmio write. Fixes: 14ff9e5 ("irqchip/sifive-plic: Cache the interrupt enable state") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Charles Mirabile <cmirabil@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://patch.msgid.link/20251103161813.2437427-1-cmirabil@redhat.com Closes: https://lore.kernel.org/oe-kbuild-all/202510271316.AQM7gCCy-lkp@intel.com/ Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
community inclusion category: feature bugzilla: RVCK-Project#71 -------------------------------- 1. Remove aer interrupt from PCIe nodes: The PCIe nodes in DP1000 series devices do not support Advanced Error Reporting (AER) interrupt. Remove the aer interrupt from interrupts and interrupt-names properties in all affected device tree files. 2. Add cache information: Add detailed L1 I-cache and D-cache configuration (64B block size, 4-way set associative, 64KB size per core) and L3 cache configuration to CPU nodes. 3. Extend ISA information: Add comprehensive ISA base and extension list to CPU nodes, including standard extensions and custom extensions. 4. Update key-wakeup for titan board: - Rename existing key-wakeup to key-wakeup@0 - Add key-wakeup@1 (Power key) on porta 11 - Add key-wakeup@2 (USB wakeup) on porta 4 5. Add ethernet MDIO and PHY configuration: Configure MDIO bus and PHY0 for ethernet interface on titan board. Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
community inclusion category: feature bugzilla: RVCK-Project#71 -------------------------------- Add support for UltraRISC Core PVT (Voltage, Temperature) sensor embedded into dp1000 series SoCs. The driver provides: 1. Support for 11 temperature channels (cores and SoC components) 2. Support for 2 voltage channels (cluster voltages) 3. Hardware monitoring via hwmon interface 4. Device tree based configuration Add necessary Kconfig and Makefile entries, and update device tree with PVT sensor nodes and channel configurations. Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
community inclusion category: feature bugzilla: RVCK-Project#71 -------------------------------- Add device tree binding documentation for UltraRISC DP1000 Core voltage and temperature (PVT) sensor. Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
community inclusion category: feature bugzilla: RVCK-Project#71 -------------------------------- Add support for UltraRISC Core PVT sensor driver by enabling CONFIG_SENSORS_COREPVT_ULTRARISC=m. Enable CONFIG_KEYBOARD_GPIO=m. Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
community inclusion category: feature bugzilla: RVCK-Project#71 -------------------------------- Fix naming inconsistencies in dp1000 device tree files: 1. Correct filename typo: dp1000-mo-* -> dp1000-m0-*(replace letter 'o' with digit '0') 2. Rename pinctrl header to use company prefix: ur-dp1000-pinctrl.h -> ultrarisc,dp1000-pinctrl.h 3. Update all include paths to match the new filename Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
…trarisc,dp1000-pinctrl.h community inclusion category: feature bugzilla: RVCK-Project#71 -------------------------------- Rename pinctrl header to use company prefix: ur-dp1000-pinctrl.h -> ultrarisc,dp1000-pinctrl.h Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
…AMD_SECURE_DISPLAY community inclusion category: feature bugzilla: RVCK-Project#71 -------------------------------- Enable CONFIG_FW_LOADER_COMPRESS_ZSTD to support loading zstd compressed firmware files. This is required for compatibility with distributions like Ubuntu which use zstd compression for firmware files. Enable CONFIG_DRM_AMD_ACP and CONFIG_DRM_AMD_SECURE_DISPLAY for AMD GPU. Enable CONFIG_RTC_DRV_DS1307_CENTURY and CONFIG_RTC_DRV_SD3078. Signed-off-by: Jia Wang <wangjia@ultrarisc.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion category bugfix from mainline-v6.2-rc1 commit: torvalds/linux@a1ccd3d Link:RVCK-Project#181 ------------------------------------------------- Revert "mango pci hack:broadcast when no MSI source known" This reverts commit 24fb032. This merge requires a revert, as disabling the PCIe port native services will severely impact the normal operation of the server's PCIe advanced features (such as AER/DPC/HP). original changelog PCI/portdrv: Squash into portdrv.c Squash portdrv_core.c and portdrv_pci.c into portdrv.c to make it easier to find things. The whole thing is less than 1000 lines, and it's a pain to bounce back and forth between two files. Several portdrv_core.c functions were non-static because they were referenced from portdrv_pci.c. Make them static since they're now all in portdrv.c. No functional change intended. Link: https://lore.kernel.org/r/20221019204127.44463-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: liuqingtao <liu.qingtao2@zte.com.cn> Signed-off-by: hu.yuye<hu.yuye@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-v6.14-rc3 commit 34bbb5d category: feature bugzilla: RVCK-Project#186 Reference: torvalds/linux@34bbb5d -------------------------------- If ->iobase is set the default will be UPIO_PORT for ->iotype after the uart_read_and_validate_port_properties() call. Hence no need to assign that explicitly. Otherwise it will be UPIO_MEM. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250124161530.398361-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Wenhong Liu <liu.wenhong35@zte.com.cn> Signed-off-by: liuqingtao <liu.qingtao2@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-6.14-rc7 commit 4b455f5 category: feature bugzilla: RVCK-Project#178 -------------------------------- Currently if architectures want to support HOTPLUG_SMT they need to provide a topology_is_primary_thread() telling the framework which thread in the SMT cannot offline. However arm64 doesn't have a restriction on which thread in the SMT cannot offline, a simplest choice is that just make 1st thread as the "primary" thread. So just make this as the default implementation in the framework and let architectures like x86 that have special primary thread to override this function (which they've already done). There's no need to provide a stub function if !CONFIG_SMP or !CONFIG_HOTPLUG_SMT. In such case the testing CPU is already the 1st CPU in the SMT so it's always the primary thread. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Link: https://lore.kernel.org/r/20250311075143.61078-2-yangyicong@huawei.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Rui Gao<gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-6.14-rc7 commit 5deb9c7 category: feature bugzilla: RVCK-Project#178 -------------------------------- On building the topology from the devicetree, we've already gotten the SMT thread number of each core. Update the largest SMT thread number and enable the SMT control by the end of topology parsing. The framework's SMT control provides two interface to the users through /sys/devices/system/cpu/smt/control (Documentation/ABI/testing/sysfs-devices-system-cpu): 1) enable SMT by writing "on" and disable by "off" 2) enable SMT by writing max_thread_number or disable by writing 1 Both method support to completely disable/enable the SMT cores so both work correctly for symmetric SMT platform and asymmetric platform with non-SMT and one type SMT cores like: core A: 1 thread core B: X (X!=1) threads Note that for a theoretically possible multiple SMT-X (X>1) core platform the SMT control is also supported as expected but only by writing the "on/off" method. Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Link: https://lore.kernel.org/r/20250311075143.61078-3-yangyicong@huawei.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Rui Gao<gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-6.14-rc7 commit e6b18eb category: feature bugzilla: RVCK-Project#178 -------------------------------- For ACPI we'll build the topology from PPTT and we cannot directly get the SMT number of each core. Instead using a temporary xarray to record the heterogeneous information (from ACPI_PPTT_ACPI_IDENTICAL) and SMT information of the first core in its heterogeneous CPU cluster when building the topology. Then we can know the largest SMT number in the system. If a homogeneous system's using ACPI 6.2 or later, all the CPUs should be under the root node of PPTT. There'll be only one entry in the xarray and all the CPUs in the system will be assumed identical. The framework's SMT control provides two interface to the users [1] through /sys/devices/system/cpu/smt/control (Documentation/ABI/testing/sysfs-devices-system-cpu): 1) enable SMT by writing "on" and disable by "off" 2) enable SMT by writing max_thread_number or disable by writing 1 Both method support to completely disable/enable the SMT cores so both work correctly for symmetric SMT platform and asymmetric platform with non-SMT and one type SMT cores like: core A: 1 thread core B: X (X!=1) threads Note that for a theoretically possible multiple SMT-X (X>1) core platform the SMT control is also supported as expected but only by writing the "on/off" method. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Link: https://lore.kernel.org/r/20250311075143.61078-4-yangyicong@huawei.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Rui Gao<gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from mainline-6.18-rc2 commit 6d0ef68 category: feature bugzilla: RVCK-Project#178 -------------------------------- Currently, RISC-V lacks arch-specific registers for CPU topology properties and must get them from ACPI. Thus, parse_acpi_topology() is moved from arm64/ to drivers/ for RISC-V reuse. Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Link: https://patch.msgid.link/20250923015409.15983-2-cuiyunhui@bytedance.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Rui Gao<gao.rui@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
driver inclusion category: feature Link: RVCK-Project#185 -------------------------------- This patch enable the following config:CONFIG_PCIE_EDR=y Signed-off-by: liuqingtao <liu.qingtao2@zte.com.cn> Signed-off-by: hu.yuye<hu.yuye@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit 6fcfe54 category: feature bugzilla: RVCK-Project#108 -------------------------------- The parameter head_terms is always used in get_config_terms. Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230901233949.2930562-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit 8f91662 category: feature bugzilla: RVCK-Project#108 -------------------------------- Add a const and rename str to event_name. Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230901233949.2930562-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit 4163644 category: feature bugzilla: RVCK-Project#108 -------------------------------- Add term_type to union of values returned by the lexer to avoid casts to and from an integer. Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230901233949.2930562-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit 727adee category: feature bugzilla: RVCK-Project#108 -------------------------------- When trying to add events to multiple PMUs the term list is copied first as adding the event will rewrite the event's name term into the sysfs and/or json encoding terms (see perf_pmu__check_alias). Change the parse events add API so the passed in term list is const, then copy the list when modification is necessary. Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230901233949.2930562-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit 0d3f0e6 category: feature bugzilla: RVCK-Project#108 -------------------------------- parse_events_terms() existed in function names but was passed a 'struct list_head'. As many parse_events functions take an evsel_config list as well as a parse_event_term list, and the naming head_terms and head_config is inconsistent, there's a potential to switch the lists and get errors. Introduce a 'struct parse_events_terms', that just wraps a list_head, to avoid this. Add the regular init/exit functions and transition the code to use them. Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230901233949.2930562-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit b1f0562 category: feature bugzilla: RVCK-Project#108 -------------------------------- PMU alias names were computed when the first perf_pmu is created, scanning all PMUs in event sources for a file called alias that generally doesn't exist. Switch to trying to load the file when all PMU related files are loaded in lookup. This would cause a PMU name lookup of an alias name to fail if no PMUs were loaded, so in that case all PMUs are loaded and the find repeated. The overhead is similar but in the (very) general case not all PMUs are scanned for the alias file. As the overhead occurs once per invocation it doesn't show in perf bench internals pmu-scan. On a tigerlake machine, the number of openat system calls for an event of cpu/cycles/ with perf stat reduces from 94 to 69 (ie 25 fewer openat calls). Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: James Clark <james.clark@arm.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Kan Liang <kan.liang@linux.intel.com> Link: https://lore.kernel.org/r/20230925062323.840799-1-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit aa61360 category: feature bugzilla: RVCK-Project#108 -------------------------------- Assign default_config as part of the init. perf_pmu__get_default_config was doing more than just getting the default config and so this is intended to better align with the code. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: James Clark <james.clark@arm.com> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Yang Jihong <yangjihong1@huawei.com> Cc: Will Deacon <will@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Jing Zhang <renyu.zj@linux.alibaba.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: John Garry <john.g.garry@oracle.com> Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20231012175645.1849503-2-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit 461e3e6 category: feature bugzilla: RVCK-Project#108 -------------------------------- Avoid setting PMU values in intel_pt_pmu_default_config, move to perf_pmu__arch_init. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: James Clark <james.clark@arm.com> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Yang Jihong <yangjihong1@huawei.com> Cc: Will Deacon <will@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Jing Zhang <renyu.zj@linux.alibaba.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: John Garry <john.g.garry@oracle.com> Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20231012175645.1849503-3-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
mainline inclusion from Linux 6.7-rc1 commit 672bd21 category: feature bugzilla: RVCK-Project#108 -------------------------------- Avoid setting PMU values in arm_spe_pmu_default_config, move to perf_pmu__arch_init. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Leo Yan <leo.yan@linaro.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: James Clark <james.clark@arm.com> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Yang Jihong <yangjihong1@huawei.com> Cc: Will Deacon <will@kernel.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Jing Zhang <renyu.zj@linux.alibaba.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: John Garry <john.g.garry@oracle.com> Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20231012175645.1849503-4-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
The DRM Imagination GPU requires a power-domain driver. In the T-HEAD TH1520 SoC implements power management capabilities through the E902 core, which can be communicated with through the mailbox, using firmware protocol. Add AON node, which servers as a power-domain controller. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Reviewed-by: Drew Fustini <drew@pdp7.com> Signed-off-by: Drew Fustini <drew@pdp7.com>
dist inclusion category: cleanup Link: RVCK-Project#235 -------------------------------- This reverts commit 8297afc. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#235 -------------------------------- This reverts commit a7bf54d. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#235 -------------------------------- This reverts commit 44dc885. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#235 -------------------------------- This reverts commit d0c9470. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#235 -------------------------------- This reverts commit 2e4869d. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#235 -------------------------------- This reverts commit 61085f0. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#235 -------------------------------- This reverts commit f57b43b. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#235 -------------------------------- This reverts commit 9898f99. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion from Linux 7.0-rc3 commit 30e7573 category: feature bugzilla: RVCK-Project#236 -------------------------------- Add a YAML schema for the T-HEAD TH1520 SoC reset controller. This controller manages resets for subsystems such as the GPU within the TH1520 SoC. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Link: https://lore.kernel.org/r/20250303152511.494405-2-m.wilczynski@samsung.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion from Linux 7.0-rc3 commit 4a65326 category: feature bugzilla: RVCK-Project#236 -------------------------------- Add reset controller driver for the T-HEAD TH1520 SoC that manages hardware reset lines for various subsystems. The driver currently implements support for GPU reset control, with infrastructure in place to extend support for NPU and Watchdog Timer resets in future updates. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Link: https://lore.kernel.org/r/20250303152511.494405-3-m.wilczynski@samsung.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion from Linux 7.0-rc3 commit cf5e81d category: feature bugzilla: RVCK-Project#236 -------------------------------- Add the "gpu-clkgen" reset property to the AON device tree node. This allows the AON power domain driver to detect the capability to power sequence the GPU and spawn the necessary pwrseq-thead-gpu auxiliary driver for managing the GPU's complex power sequence. This commit also adds the prerequisite dt-bindings/reset/thead,th1520-reset.h include to make the TH1520_RESET_ID_GPU_CLKGEN available. This include was previously dropped during a conflict resolution [1]. Link: https://lore.kernel.org/all/aAvfn2mq0Ksi8DF2@x1/ [1] Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Drew Fustini <drew@pdp7.com> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Drew Fustini <drew@pdp7.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
|
开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/23417954731 参数解析结果
测试完成 详细结果:RVCK result
Kunit Test Result[01:51:42] Testing complete. Ran 457 tests: passed: 445, skipped: 12 Kernel Build ResultKernel build succeeded: RVCK-Project/rvck/246/ ff7cd8e74ec5115c658ba1ab7132680f /srv/guix_result/3caf2ac92ef56dba75faeaaffc78afb3d49b11ac/Image LAVA Checkargs:
result:Lava check fail! lava log: https://lava.oerv.ac.cn/scheduler/job/1616 lava result count: call: 1 Check Patch Result
|
dist inclusion category: cleanup Link: RVCK-Project#240 -------------------------------- This reverts commit cc271cf. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#240 -------------------------------- This reverts commit bd576f6. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion from Linux 7.0-rc5 commit 5d4d263 category: feature bugzilla: RVCK-Project#240 -------------------------------- This driver was tested using the drm/imagination GPU driver. It was able to successfully power on the GPU, by passing a command through mailbox from E910 core to E902 that's responsible for powering up the GPU. The GPU driver was able to read the BVNC version from control registers, which confirms it was successfully powered on. [ 33.957467] powervr ffef400000.gpu: [drm] loaded firmware powervr/rogue_36.52.104.182_v1.fw [ 33.966008] powervr ffef400000.gpu: [drm] FW version v1.0 (build 6621747 OS) [ 38.978542] powervr ffef400000.gpu: [drm] *ERROR* Firmware failed to boot Though the driver still fails to boot the firmware, the mailbox driver works when used with the not-yet-upstreamed firmware AON driver. There is ongoing work to get the BXM-4-64 supported with the drm/imagination driver [1], though it's not completed yet. This work is based on the driver from the vendor kernel [2]. Link: https://gitlab.freedesktop.org/imagination/linux-firmware/-/issues/2 [1] Link: https://github.com/revyos/thead-kernel.git [2] Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion from Linux 7.0-rc5 commit c95c136 category: feature bugzilla: RVCK-Project#240 -------------------------------- Add mailbox device tree node. This work is based on the vendor kernel [1]. Link: https://github.com/revyos/thead-kernel.git [1] Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Reviewed-by: Drew Fustini <dfustini@tenstorrent.com> Signed-off-by: Drew Fustini <dfustini@tenstorrent.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion from Linux 7.0-rc5 commit 1037885 category: feature bugzilla: RVCK-Project#240 -------------------------------- Document bindings for the T-Head TH1520 AP sub-system clock controller. Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf Co-developed-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Drew Fustini <dfustini@tenstorrent.com> Link: https://lore.kernel.org/r/20240623-th1520-clk-v2-1-ad8d6432d9fb@tenstorrent.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion from Linux 7.0-rc5 commit e919fe0 category: feature bugzilla: RVCK-Project#240 -------------------------------- Add node for the AP_SUBSYS clock controller on the T-Head TH1520 SoC. Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs Signed-off-by: Drew Fustini <dfustini@tenstorrent.com> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#245 -------------------------------- This reverts commit f9aaf7e. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
dist inclusion category: cleanup Link: RVCK-Project#245 -------------------------------- This reverts commit 8796a76. Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion from Linux 7.0-rc5 commit ae81b69 category: feature bugzilla: RVCK-Project#245 -------------------------------- Add support for the AP sub-system clock controller in the T-Head TH1520. This include CPU, DPU, GMAC and TEE PLLs. Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf Co-developed-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Yangtao Li <frank.li@vivo.com> Co-developed-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs Signed-off-by: Drew Fustini <dfustini@tenstorrent.com> Link: https://lore.kernel.org/r/20240711-th1520-clk-v3-2-6ff17bb318fb@tenstorrent.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
3caf2ac to
e615bc5
Compare
|
开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/23430768045 参数解析结果
测试完成 详细结果:RVCK result
Kunit Test Result[09:43:30] Testing complete. Ran 457 tests: passed: 445, skipped: 12 Kernel Build ResultKernel build succeeded: RVCK-Project/rvck/246/ b5fe7c01ade67fcbc8d54222b7911acc /srv/guix_result/e615bc5fb97e8e10b23700ea8bbb8d72d4cf38f7/Image LAVA Checkargs:
result:Lava check done! lava log: https://lava.oerv.ac.cn/scheduler/job/1620 lava result count: [fail]: 174, [pass]: 1435, [skip]: 290 Check Patch Result
|
dist inclusion category: bugfix bugzilla: RVCK-Project#245 -------------------------------- Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
e615bc5 to
e330371
Compare
|
开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/23476279498 参数解析结果
测试完成 详细结果:RVCK result
Kunit Test Result[06:33:59] Testing complete. Ran 457 tests: passed: 445, skipped: 12 Kernel Build ResultKernel build succeeded: RVCK-Project/rvck/246/ ec4dba136c7e664e1395436ddd08f118 /srv/guix_result/e330371ccc921cd880f67f5379c317cb6eca30cb/Image LAVA Checkargs:
result:Lava check done! lava log: https://lava.oerv.ac.cn/scheduler/job/1623 lava result count: [fail]: 176, [pass]: 1433, [skip]: 290 Check Patch Result
|
clk 驱动清理,更新中