aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-postgresql.py (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2025-01-13of: reserved-memory: Do not make kmemleak ignore freed addressZijun Hu1-1/+2
early_init_dt_alloc_reserved_memory_arch() will free address @base when suffers memblock_mark_nomap() error, but it still makes kmemleak ignore the freed address @base via kmemleak_ignore_phys(). That is unnecessary, besides, also causes unnecessary warning messages: kmemleak_ignore_phys() -> make_black_object() -> paint_ptr() -> kmemleak_warn() // warning message here. Fix by avoiding kmemleak_ignore_phys() when suffer the error. Fixes: 658aafc8139c ("memblock: exclude MEMBLOCK_NOMAP regions from kmemleak") Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-10-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-13of: reserved-memory: Fix using wrong number of cells to get property 'alignment'Zijun Hu1-2/+2
According to DT spec, size of property 'alignment' is based on parent node’s #size-cells property. But __reserved_mem_alloc_size() wrongly uses @dt_root_addr_cells to get the property obviously. Fix by using @dt_root_size_cells instead of @dt_root_addr_cells. Fixes: 3f0c82066448 ("drivers: of: add initialization code for dynamic reserved memory") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-9-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-13of: Remove a duplicated code blockZijun Hu3-35/+25
address.c has a same code block with fdt_address.c. Remove a copy by moving the duplicated code block into of_private.h. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-8-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-13of: property: Avoiding using uninitialized variable @imaplen in parse_interrupt_map()Zijun Hu1-1/+1
parse_interrupt_map() will use uninitialized variable @imaplen if fails to get property 'interrupt-map'. Fix by using the variable after successfully getting the property. Fixes: e7985f43609c ("of: property: Fix fw_devlink handling of interrupt-map") Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-6-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-10of: Correct child specifier used as input of the 2nd nexus nodeZijun Hu1-1/+1
API of_parse_phandle_with_args_map() will use wrong input for nexus node Nexus_2 as shown below: Node_1 Nexus_1 Nexus_2 &Nexus_1,arg_1 -> arg_1,&Nexus_2,arg_2' -> &Nexus_2,arg_2 -> arg_2,... map-pass-thru=<...> Nexus_1's output arg_2 should be used as input of Nexus_2, but the API wrongly uses arg_2' instead which != arg_2 due to Nexus_1's map-pass-thru. Fix by always making @match_array point to @initial_match_array into which to store nexus output. Fixes: bd6f2fd5a1d5 ("of: Support parsing phandle argument lists through a nexus node") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-1-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-10dt-bindings: interrupt-controller: ti,omap4-wugen-mpu: Add file extensionKrzysztof Kozlowski1-0/+0
Add TXT file extension so the format of binding will be explicit (we have also bindins in YAML). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250107131111.246969-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-10dt-bindings: interrupt-controller: Correct indentation and style in DTS exampleKrzysztof Kozlowski2-20/+20
DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Andrew Jeffery <andrew@codeconstruct.com.au> # aspeed,ast2400-vic.yaml Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20250107131108.246898-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-10dt-bindings: display: Correct indentation and style in DTS exampleKrzysztof Kozlowski12-244/+243
DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # msm Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas Link: https://lore.kernel.org/r/20250107125854.227233-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-09dt-bindings: opp: h6: Add A100 operating pointsCody Eksal1-0/+1
The A100, similar to the H6 and H616, use an NVMEM value to determine speed binnings. The method used is similar to that of the H6. However, the information is stored at a slightly different bit offset. Add a new compatible for the A100. Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20241031070232.1793078-12-masterr3c0rd@epochal.quest Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-07dt-bindings: samsung,mipi-dsim: Add imx7d specific compatibleAlexander Stein1-1/+3
This add a imx7(d) specific compatible which is compatible to imx8mm. This silences the dtbs_check warning: arch/arm/boot/dts/nxp/imx/imx7s-mba7.dtb: dsi@30760000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx7d-mipi-dsim', 'fsl,imx8mm-mipi-dsim'] is too long Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20250107094943.518474-3-alexander.stein@ew.tq-group.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-07dt-bindings: soc: altera: convert socfpga-system.txt to yamlNiravkumar L Rabara2-25/+51
Convert socfpga-system.txt to altr,socfpga-sys-mgr.yaml and move to soc directory. Add platform names in description for clarity. ARM(32-bit) platforms Cyclone5, Arria5 and Arria10 is using "altr,sys-mgr" compatible, while ARM64 is using "altr,sys-mgr-s10" compatible. Removed "cpu1-start-addr" for ARM64 as it is not required. Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Link: https://lore.kernel.org/r/20250107105129.2784203-1-niravkumar.l.rabara@intel.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-07dt-bindings: interrupt-controller: qcom,pdc: Document SM8750 PDCMelody Olvera1-0/+1
Document the PDC block on the SM8750 SoC. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_pdc-v1-1-3a06cb62a28f@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-07dt-bindings: memory-controller: qca,ath79-ddr-controller: Drop consumer from exampleRob Herring (Arm)1-7/+0
Normal practice is examples only show what the binding document defines and doesn't include consumers in a provider example (or vice-versa). The "qca,ddr-wb-channel-interrupts" and "qca,ddr-wb-channels" properties are also not yet documented by a schema, so avoid (not yet enabled) warnings on them by dropping the interrupt-controller node from the example. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20250103212448.2852884-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-07dt-bindings: sram: qcom,imem: Document MSM8976AngeloGioacchino Del Regno1-0/+1
Add compatible for MSM8976 IMEM. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20221111120156.48040-5-angelogioacchino.delregno@collabora.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-07dt-bindings: thermal: qcom-tsens: Document ipq6018 temperature sensorRayyan Ansari1-0/+1
Document the ipq6018 temperature sensor, which is used in ipq6018.dtsi and is compatible with the ipq8074 temperature sensor. Signed-off-by: Rayyan Ansari <rayyan.ansari@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240716133803.82907-1-rayyan.ansari@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-07dt-bindings: qcom,pdc: document QCS8300 Power Domain ControllerJingyi Wang1-0/+1
Document Power Domain Controller for Qualcomm QCS8300. PDC is included in QCS8300 SoC. This controller acts as an interrupt controller, enabling the detection of interrupts when the GIC is non-operational. Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240911-qcs8300_binding-v2-1-de8641b3eaa1@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-07dt-bindings: qcom,pdc: document QCS615 Power Domain ControllerLijuan Gao1-0/+1
Add a compatible for the Power Domain Controller on QCS615 platform. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Link: https://lore.kernel.org/r/20241104-add_initial_support_for_qcs615-v5-2-9dde8d7b80b0@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-06dt-bindings: mailbox: qcom,apcs-kpss-global: Document the qcs615 APSSKyle Deng1-0/+1
Add compatible for the Qualcomm qcs615 mailbox block. QCS615 mailbox is compatible with SDM845 use fallback for it. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Kyle Deng <quic_chunkaid@quicinc.com> Link: https://lore.kernel.org/r/20241018073417.2338864-2-quic_chunkaid@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-06dt-bindings: nvmem: qfprom: Add compatible for QCS615Lijuan Gao1-0/+1
Document compatible for QFPROM used on QCS615. It's compatible with generic QFPROM fallback. Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Link: https://lore.kernel.org/all/20240912-add_qfprom_compatible_for_qcs615-v1-1-9ef2e26c14ee@quicinc.com/ Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-06dt-bindings: remoteproc: qcom,sa8775p-pas: Document QCS8300 remoteprocJingyi Wang1-14/+30
Document the components used to boot the ADSP, CDSP and GPDSP on the Qualcomm QCS8300 SoC. Use fallback to indicate the compatibility of the remoteproc on the QCS8300 with that on the SA8775P. Co-developed-by: Xin Liu <quic_liuxin@quicinc.com> Signed-off-by: Xin Liu <quic_liuxin@quicinc.com> Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240925-qcs8300_remoteproc_binding-v3-1-21b0c52b142b@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-03dt-bindings: mfd: mediatek: mt6397: Add bindings for MT6328Yassine Oudjana2-0/+3
Add compatible strings for the MT6328 PMIC. Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241018081050.23592-3-y.oudjana@protonmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-03docs: dt: unittest: Correct SELFTEST to UNITTESTDirk Behme2-8/+6
The Kconfig switch is CONFIG_OF_UNITTEST. Not OF_SELFTEST. Correct this. While at it replace the outdated file list with a link to the directory as proposed by Rob Herring. Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241029054042.958775-1-dirk.behme@de.bosch.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-01-02dt-bindings: vendor-prefixes: add SiflowerChuanhong Guo1-0/+2
Shanghai Siflower Communication Co. is a manufacturer for home router SoCs. Add a vendor prefix for it. Link: http://www.siflower.com.cn/en Signed-off-by: Chuanhong Guo <gch981213@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241223034350.215375-1-gch981213@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-31of: Constify 'struct bin_attribute'Thomas Weißschuh1-2/+2
The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-of-v1-1-99cc2e8c2a55@weissschuh.net Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-18dt-bindings: interrupt-controller: arm,gic: Correct VGIC interrupt descriptionKrzysztof Kozlowski1-2/+2
The description of VGIC interrupt referenced obsolete "see below" after converting TXT to DT Schema in commit 66ed144f147a ("dt-bindings: interrupt-controller: Convert ARM GIC to json-schema"), because there is no dedicated "VGIC" chapter anymore below. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Marc Zyngier <maz@kernel.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241217061226.14139-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-17dt-bindings: interrupt-controller: update imsic reg address to 0x24000000 in Example 1Huang Borong1-1/+1
Change the 'reg' property address from 0x28000000 to 0x24000000 to match the node label interrupt-controller@24000000. Signed-off-by: Huang Borong <huangborong@bosc.ac.cn> Link: https://lore.kernel.org/r/20241213090924.181249-1-huangborong@bosc.ac.cn Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-17dt-bindings: power: Convert raspberrypi,bcm2835-power to Dt schemaKaran Sanghavi2-47/+42
Convert the raspberrypi,bcm2835-power binding to Dt schema Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Karan Sanghavi <karansanghvi98@gmail.com> Link: https://lore.kernel.org/r/20241216-raspberrypi-bcm2835-power-v5-1-222fc244132b@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-16of: Fix of_find_node_opts_by_path() handling of alias+path+optionsZijun Hu1-3/+3
of_find_node_opts_by_path() fails to find OF device node when its @path parameter have pattern below: "alias-name/node-name-1/.../node-name-N:options". The reason is that alias name length calculated by the API is wrong, as explained by example below: "testcase-alias/phandle-tests/consumer-a:testaliasoption". ^ ^ ^ 0 14 39 The right length of alias 'testcase-alias' is 14, but the result worked out by the API is 39 which is obvious wrong. Fix by using index of either '/' or ':' as the length who comes earlier. Fixes: 75c28c09af99 ("of: add optional options parameter to of_find_node_by_path()") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241216-of_core_fix-v2-1-e69b8f60da63@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-16of: unittest: Add a test case for of_find_node_opts_by_path() with alias+path+optionsZijun Hu1-0/+9
To test of_find_node_opts_by_path() take @path argument with pattern: "alias-name/node-name-1/.../node-name-N:options", for example: "testcase-alias/phandle-tests/consumer-a:testaliasoption" Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241216-of_core_fix-v2-2-e69b8f60da63@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-16dt-bindings: timer: fsl,imxgpt: Document fsl,imx35-gptFabio Estevam1-0/+1
The i.MX35 General Purpose Timer is compatible with i.MX31. Document the fsl,imx35-gpt compatible. This fixes the following dt-schema warning: timer@53f90000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx35-gpt', 'fsl,imx31-gpt'] is too long 'fsl,imx1-gpt' was expected 'fsl,imx21-gpt' was expected 'fsl,imx27-gpt' was expected 'fsl,imx31-gpt' was expected 'fsl,imx35-gpt' is not one of ['fsl,imx25-gpt', 'fsl,imx50-gpt', 'fsl,imx51-gpt', 'fsl,imx53-gpt', 'fsl,imx6q-gpt'] 'fsl,imx6dl-gpt' was expected 'fsl,imx35-gpt' is not one of ['fsl,imx6sl-gpt', 'fsl,imx6sx-gpt', 'fsl,imx8mp-gpt', 'fsl,imxrt1050-gpt', 'fsl,imxrt1170-gpt'] 'fsl,imx35-gpt' is not one of ['fsl,imx6ul-gpt', 'fsl,imx7d-gpt'] 'fsl,imx6sx-gpt' was expected Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241202132147.587799-2-festevam@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-16dt-bindings: timer: fsl,imxgpt: Fix the fsl,imx7d-gpt fallbackFabio Estevam1-1/+1
imx7s.dtsi correctly describes the GPT node as: compatible = "fsl,imx7d-gpt", "fsl,imx6dl-gpt"; Document the fallback compatible to be "fsl,imx6dl-gpt" in the bindings. This fixes the following dt-schema warnings: timer@302f0000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx7d-gpt', 'fsl,imx6dl-gpt'] is too long 'fsl,imx1-gpt' was expected 'fsl,imx21-gpt' was expected 'fsl,imx27-gpt' was expected 'fsl,imx31-gpt' was expected 'fsl,imx7d-gpt' is not one of ['fsl,imx25-gpt', 'fsl,imx50-gpt', 'fsl,imx51-gpt', 'fsl,imx53-gpt', 'fsl,imx6q-gpt'] 'fsl,imx6dl-gpt' was expected 'fsl,imx7d-gpt' is not one of ['fsl,imx6sl-gpt', 'fsl,imx6sx-gpt', 'fsl,imx8mp-gpt', 'fsl,imxrt1050-gpt', 'fsl,imxrt1170-gpt'] 'fsl,imx6sx-gpt' was expected Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241202132147.587799-1-festevam@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-10of/irq: Correct element count for array @dummy_imask in API of_irq_parse_raw()Zijun Hu1-1/+1
Array @dummy_imask only needs MAX_PHANDLE_ARGS elements, but it actually has (MAX_PHANDLE_ARGS + 1) elements. One extra element doesn't hurt anything except for some stack usage. Fix by using (MAX_PHANDLE_ARGS - 1) as max element index in initializer. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241209-of_irq_fix-v1-2-782f1419c8a1@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-10of: Simplify API of_find_node_with_property() implementationZijun Hu1-7/+3
Simplify of_find_node_with_property() implementation by __of_find_property(). Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241206-of_core_fix-v1-10-dc28ed56bec3@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-10of/fdt: Dump __be32 array in CPU type order in of_dump_addr()Zijun Hu1-1/+1
of_dump_addr() dumps __be32 array without conversion to CPU byte order in advance, that will reduce log readability for little endian CPUs. Fix by be32_to_cpu() conversion before dump. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241206-of_core_fix-v1-6-dc28ed56bec3@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-10of: Hide of_default_bus_match_table[]Stephen Boyd2-14/+11
This isn't used outside this file. Hide the array in the C file. Signed-off-by: Stephen Boyd <swboyd@chromium.org> Acked-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20241204194806.2665589-1-swboyd@chromium.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-03of/fdt: Implement use BIN_ATTR_SIMPLE macro for fdt sysfs attributeThomas Weißschuh1-12/+4
The usage of the macro allows to remove the custom handler function, saving some memory. Additionally the code is easier to read. While at it also mark the attribute as __ro_after_init, as the only modification happens in the __init phase. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241122-sysfs-const-bin_attr-of-v1-1-7052f9dcd4be@weissschuh.net Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-12-01Linux 6.13-rc1Linus Torvalds1-2/+2
2024-12-01strscpy: write destination buffer only onceLinus Torvalds1-6/+17
The point behind strscpy() was to once and for all avoid all the problems with 'strncpy()' and later broken "fixed" versions like strlcpy() that just made things worse. So strscpy not only guarantees NUL-termination (unlike strncpy), it also doesn't do unnecessary padding at the destination. But at the same time also avoids byte-at-a-time reads and writes by _allowing_ some extra NUL writes - within the size, of course - so that the whole copy can be done with word operations. It is also stable in the face of a mutable source string: it explicitly does not read the source buffer multiple times (so an implementation using "strnlen()+memcpy()" would be wrong), and does not read the source buffer past the size (like the mis-design that is strlcpy does). Finally, the return value is designed to be simple and unambiguous: if the string cannot be copied fully, it returns an actual negative error, making error handling clearer and simpler (and the caller already knows the size of the buffer). Otherwise it returns the string length of the result. However, there was one final stability issue that can be important to callers: the stability of the destination buffer. In particular, the same way we shouldn't read the source buffer more than once, we should avoid doing multiple writes to the destination buffer: first writing a potentially non-terminated string, and then terminating it with NUL at the end does not result in a stable result buffer. Yes, it gives the right result in the end, but if the rule for the destination buffer was that it is _always_ NUL-terminated even when accessed concurrently with updates, the final byte of the buffer needs to always _stay_ as a NUL byte. [ Note that "final byte is NUL" here is literally about the final byte in the destination array, not the terminating NUL at the end of the string itself. There is no attempt to try to make concurrent reads and writes give any kind of consistent string length or contents, but we do want to guarantee that there is always at least that final terminating NUL character at the end of the destination array if it existed before ] This is relevant in the kernel for the tsk->comm[] array, for example. Even without locking (for either readers or writers), we want to know that while the buffer contents may be garbled, it is always a valid C string and always has a NUL character at 'comm[TASK_COMM_LEN-1]' (and never has any "out of thin air" data). So avoid any "copy possibly non-terminated string, and terminate later" behavior, and write the destination buffer only once. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-11-30printf: Remove unused 'bprintf'Dr. David Alan Gilbert2-24/+0
bprintf() is unused. Remove it. It was added in the commit 4370aa4aa753 ("vsprintf: add binary printf") but as far as I can see was never used, unlike the other two functions in that patch. Link: https://lore.kernel.org/20241002173147.210107-1-linux@treblig.org Reviewed-by: Andy Shevchenko <andy@kernel.org> Acked-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2024-11-30tools/power turbostat: 2024.11.30Len Brown2-2/+2
since 2024.07.26: assorted minor bug fixes assorted platform specific tweaks initial RAPL PSYS (SysWatt) support Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Add RAPL psys as a built-in counterPatryk Wlazlyn2-10/+85
Introduce the counter as a part of global, platform counters structure. We open the counter for only one cpu, but otherwise treat it as an ordinary RAPL counter, allowing for grouped perf read. The counter is disabled by default, because it's interpretation may require additional, platform specific information, making it unsuitable for general use. Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Fix child's argument forwardingPatryk Wlazlyn1-1/+1
Add '+' to optstring when early scanning for --no-msr and --no-perf. It causes option processing to stop as soon as a nonoption argument is encountered, effectively skipping child's arguments. Fixes: 3e4048466c39 ("tools/power turbostat: Add --no-msr option") Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Force --no-perf in --dump modePatryk Wlazlyn1-0/+6
Force the --no-perf early to prevent using it as a source. User asks for raw values, but perf returns them relative to the opening of the file descriptor. Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Add support for /sys/class/drm/card1Zhang Rui1-9/+29
On some machines, the graphics device is enumerated as /sys/class/drm/card1 instead of /sys/class/drm/card0. The current implementation does not handle this scenario, resulting in the loss of graphics C6 residency and frequency information. Add support for /sys/class/drm/card1, ensuring that turbostat can retrieve and display the graphics columns for these platforms. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Cache graphics sysfs file descriptors during probeZhang Rui1-50/+32
Snapshots of the graphics sysfs knobs are taken based on file descriptors. To optimize this process, open the files and cache the file descriptors during the graphics probe phase. As a result, the previously cached pathnames become redundant and are removed. This change aims to streamline the code without altering its functionality. No functional change intended. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Consolidate graphics sysfs accessZhang Rui1-9/+6
Currently, there is an inconsistency in how graphics sysfs knobs are accessed: graphics residency sysfs knobs are opened and closed for each read, while graphics frequency sysfs knobs are opened once and remain open until turbostat exits. This inconsistency is confusing and adds unnecessary code complexity. Consolidate the access method by opening the sysfs files once and reusing the file pointers for subsequent accesses. This approach simplifies the code and ensures a consistent method for accessing graphics sysfs knobs. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Remove unnecessary fflush() callZhang Rui1-4/+3
The graphics sysfs knobs are read-only, making the use of fflush() before reading them redundant. Remove the unnecessary fflush() call. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Enhance platform divergence descriptionZhang Rui1-28/+30
In various generations, platforms often share a majority of features, diverging only in a few specific aspects. The current approach of using hardcoded values in 'platform_features' structure fails to effectively represent these divergences. To improve the description of platform divergence: 1. Each newly introduced 'platform_features' structure must have a base, typically derived from the previous generation. 2. Platform feature values should be inherited from the base structure rather than being hardcoded. This approach ensures a more accurate and maintainable representation of platform-specific features across different generations. Converts `adl_features` and `lnl_features` to follow this new scheme. No functional change. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Add initial support for GraniteRapids-DZhang Rui1-0/+1
Add initial support for GraniteRapids-D. It shares the same features with SapphireRapids. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2024-11-30tools/power turbostat: Remove PC3 support on LunarlakeZhang Rui1-1/+1
Lunarlake supports CC1/CC6/CC7/PC2/PC6/PC10. Remove PC3 support on Lunarlake. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>