[PATCH 3/3] arm64: add arm64 default topology

2022-03-29 Thread Qing Wang
From: Wang Qing default_topology does not fit arm64, especially CPU and cache topology. Add arm64_topology, so we can do more based on CONFIG_GENERIC_ARCH_TOPOLOGY. arm64_xxx_flags() prefer to get the cache attribute from DT. Signed-off-by: Wang Qing --- arch/arm64/kernel/smp.c | 56 +

[PATCH 2/3] arch_topology: support for describing cache topology from DT

2022-03-29 Thread Qing Wang
From: Wang Qing When ACPI is not enabled, we can get cache topolopy from DT like: * cpu0: cpu@000 { * next-level-cache = <&L2_1>; * L2_1: l2-cache { * compatible = "cache"; * next

[PATCH 1/3] sched: topology: add input parameter for sched_domain_flags_f()

2022-03-29 Thread Qing Wang
From: Wang Qing sched_domain_flags_f() are statically set now, but actually, we can get a lot of necessary information based on the cpu_map. e.g. we can know whether its cache is shared. Allows custom extension without affecting current. Signed-off-by: Wang Qing --- arch/powerpc/kernel/smp.c

[PATCH 0/3] support for describing cache topology from DT

2022-03-29 Thread Qing Wang
From: Wang Qing We don't know anything about the cache topology info without ACPI, but in fact we can get it from DT like: * cpu0: cpu@000 { * next-level-cache = <&L2_1>; * L2_1: l2-cache { * compatible = "cac

[PATCH] sched: topology: add input parameter for sched_domain_flags_f()

2022-03-28 Thread Qing Wang
From: Wang Qing sched_domain_flags_f() are statically set now, but actually, we can get a lot of necessary information based on the cpu_map. e.g. we can know whether its cache is shared. Allows custom extension without affecting current. Signed-off-by: Wang Qing --- arch/powerpc/kernel/smp.c

[PATCH] powerpc: delete redundant conversion

2022-02-09 Thread Qing Wang
From: Wang Qing do_div() does a 64-by-32 division No need to transform gpt->ipb_freq to u64 Signed-off-by: Wang Qing --- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platf

[PATCH] arch: powerpc: add missing of_node_put before break

2021-12-13 Thread Qing Wang
From: Wang Qing Fix following coccicheck warning: WARNING: Function "for_each_node_by_name" should have of_node_put() before return. Early exits from for_each_node_by_name should decrement the node reference counter. Signed-off-by: Wang Qing --- arch/powerpc/platforms/powermac/smp.c | 4 +++-

[PATCH] powermac: low_i2c: Add missing of_node_put for loop iteration

2021-12-10 Thread Qing Wang
From: Wang Qing for_each_available_child_of_node() should decrement the node reference counter. Reported by Coccinelle: arch/powerpc/platforms/powermac/low_i2c.c:916:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return. Signed-off-by: Wang Qing --- arch/p

[PATCH] sound: fsl: add missing put_device() call in imx_hdmi_probe()

2021-12-07 Thread Qing Wang
From: Wang Qing of_find_device_by_node() takes a reference to the embedded struct device which needs to be dropped when error return. Signed-off-by: Wang Qing --- sound/soc/fsl/imx-hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/imx-hdmi.c b/sound/soc/fsl/imx-hdmi.c i

[PATCH] macintosh: ams: replace snprintf in show functions with sysfs_emit

2021-10-14 Thread Qing Wang
show() must not use snprintf() when formatting the value to be returned to user space. Fix the following coccicheck warning: drivers/macintosh/ams/ams-core.c:53: WARNING: use scnprintf or sprintf. Use sysfs_emit instead of scnprintf or sprintf makes more sense. Signed-off-by: Qing Wang