[linux-yocto][v5.15/standard/preempt-rt/sdkv5.15/xlnx-soc][PATCH] driver: soc: xilinx: rename cpu_number1 to dummy_cpu_number

2024-01-16 Thread quanyang.wang via lists.yoctoproject.org
From: Quanyang Wang 

The per cpu variable cpu_number1 is passed to xlnx_event_handler as
argument "dev_id", but is not used in this function. So drop the
initialization of this variable and rename it to dummy_cpu_number.
This patch is to fix the following calltrace when the kernel option
CONFIG_DEBUG_ATOMIC_SLEEP is enabled:

BUG: sleeping function called from invalid context at 
include/linux/sched/mm.h:274
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0
preempt_count: 1, expected: 0
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0 #53
Hardware name: Xilinx Versal vmk180 Eval board rev1.1 (QSPI) (DT)
Call trace:
 dump_backtrace+0xd0/0xe0
 show_stack+0x18/0x40
 dump_stack_lvl+0x7c/0xa0
 dump_stack+0x18/0x34
 __might_resched+0x10c/0x140
 __might_sleep+0x4c/0xa0
 __kmem_cache_alloc_node+0xf4/0x168
 kmalloc_trace+0x28/0x38
 __request_percpu_irq+0x74/0x138
 xlnx_event_manager_probe+0xf8/0x298
 platform_probe+0x68/0xd8

Signed-off-by: Quanyang Wang 
---
Hi Bruce,
Would you please help merge this patch to the branches:
v5.15/standard/preempt-rt/sdkv5.15/xlnx-soc
v5.15/standard/sdkv5.15/xlnx-soc
Thanks,
Quanyang
---
 drivers/soc/xilinx/xlnx_event_manager.c | 14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/soc/xilinx/xlnx_event_manager.c 
b/drivers/soc/xilinx/xlnx_event_manager.c
index cf152eb58d87a..1ab3486e64f95 100644
--- a/drivers/soc/xilinx/xlnx_event_manager.c
+++ b/drivers/soc/xilinx/xlnx_event_manager.c
@@ -20,7 +20,7 @@
 #include 
 #include 
 
-static DEFINE_PER_CPU_READ_MOSTLY(int, cpu_number1);
+static DEFINE_PER_CPU_READ_MOSTLY(int, dummy_cpu_number);
 
 static int virq_sgi;
 static int event_manager_availability = -EACCES;
@@ -552,7 +552,6 @@ static void xlnx_disable_percpu_irq(void *data)
 static int xlnx_event_init_sgi(struct platform_device *pdev)
 {
int ret = 0;
-   int cpu;
/*
 * IRQ related structures are used for the following:
 * for each SGI interrupt ensure its mapped by GIC IRQ domain
@@ -589,11 +588,8 @@ static int xlnx_event_init_sgi(struct platform_device 
*pdev)
sgi_fwspec.param[0] = sgi_num;
virq_sgi = irq_create_fwspec_mapping(_fwspec);
 
-   cpu = get_cpu();
-   per_cpu(cpu_number1, cpu) = cpu;
ret = request_percpu_irq(virq_sgi, xlnx_event_handler, 
"xlnx_event_mgmt",
-_number1);
-   put_cpu();
+_cpu_number);
 
WARN_ON(ret);
if (ret) {
@@ -609,16 +605,12 @@ static int xlnx_event_init_sgi(struct platform_device 
*pdev)
 
 static void xlnx_event_cleanup_sgi(struct platform_device *pdev)
 {
-   int cpu = smp_processor_id();
-
-   per_cpu(cpu_number1, cpu) = cpu;
-
cpuhp_remove_state(CPUHP_AP_ONLINE_DYN);
 
on_each_cpu(xlnx_disable_percpu_irq, NULL, 1);
 
irq_clear_status_flags(virq_sgi, IRQ_PER_CPU);
-   free_percpu_irq(virq_sgi, _number1);
+   free_percpu_irq(virq_sgi, _cpu_number);
irq_dispose_mapping(virq_sgi);
 }
 
-- 
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13491): 
https://lists.yoctoproject.org/g/linux-yocto/message/13491
Mute This Topic: https://lists.yoctoproject.org/mt/103780752/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][linux-yocto v6.1/standard/ti-sdk-6.1/ti-j7xxx & v6.1/standard/preempt-rt/ti-sdk-6.1/ti-j7xxx][PATCH 2/2] ARM: dts: am335x-boneblack-hdmi: disable HDMI audio simple-audio-card node

2024-01-16 Thread Xulin Sun via lists.yoctoproject.org
Disable HDMI audio simple-audio-card node as a workaround, since we did not
have the document and not figure out how to set the HDMI audio parameters
for the BBB target board, to avoid below booting error information if
connecting HDMI monitor:
davinci-mcasp.0-i2s-hifi: ASoC: error at __soc_pcm_hw_params on 
davinci-mcasp.0-i2s-hifi: -22
davinci-mcasp 48038000.mcasp: stream has more channels (2) than are enabled in 
mcasp (0)
davinci-mcasp 48038000.mcasp: ASoC: error at snd_soc_dai_hw_params on 
48038000.mcasp: -22

Signed-off-by: Xulin Sun 
---
 arch/arm/boot/dts/am335x-boneblack-hdmi.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am335x-boneblack-hdmi.dtsi 
b/arch/arm/boot/dts/am335x-boneblack-hdmi.dtsi
index 7cfddada9348..37fac7374136 100644
--- a/arch/arm/boot/dts/am335x-boneblack-hdmi.dtsi
+++ b/arch/arm/boot/dts/am335x-boneblack-hdmi.dtsi
@@ -128,6 +128,7 @@ sound {
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <_master>;
simple-audio-card,frame-master = <_master>;
+   status = "disabled";
 
dailink0_master: simple-audio-card,cpu {
sound-dai = <>;
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13490): 
https://lists.yoctoproject.org/g/linux-yocto/message/13490
Mute This Topic: https://lists.yoctoproject.org/mt/103779681/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][linux-yocto v6.1/standard/ti-sdk-6.1/ti-j7xxx & v6.1/standard/preempt-rt/ti-sdk-6.1/ti-j7xxx][PATCH 1/2] ARM: dts: tps65217: add power regulator & backlight drivers support

2024-01-16 Thread Xulin Sun via lists.yoctoproject.org
Support TPS65217 voltage regulator driver and TPS65217 Backlight driver.
And enable them by default. This will avoid below booting failed
information:
tps65217-pmic: Failed to locate of_node [id: -1]
tps65217-bl: Failed to locate of_node [id: -1]

Signed-off-by: Xulin Sun 
---
 arch/arm/boot/dts/tps65217.dtsi | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/tps65217.dtsi b/arch/arm/boot/dts/tps65217.dtsi
index 0d463de5650f..f412e7476660 100644
--- a/arch/arm/boot/dts/tps65217.dtsi
+++ b/arch/arm/boot/dts/tps65217.dtsi
@@ -13,6 +13,16 @@  {
interrupt-controller;
#interrupt-cells = <1>;
 
+   pmic {
+   compatible = "ti,tps65217-pmic";
+   status = "okay";
+   };
+
+   bl {
+   compatible = "ti,tps65217-bl";
+   status = "okay";
+   };
+
charger {
compatible = "ti,tps65217-charger";
interrupts = <0>, <1>;
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13489): 
https://lists.yoctoproject.org/g/linux-yocto/message/13489
Mute This Topic: https://lists.yoctoproject.org/mt/103779680/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][v6.1/standard/preempt-rt/sdkv6.1/xlnx-soc][PATCH] driver: soc: xilinx: rename cpu_number1 to dummy_cpu_number

2024-01-16 Thread quanyang.wang via lists.yoctoproject.org
From: Quanyang Wang 

The per cpu variable cpu_number1 is passed to xlnx_event_handler as
argument "dev_id", but is not used in this function. So drop the
initialization of this variable and rename it to dummy_cpu_number.
This patch is to fix the following calltrace when the kernel option
CONFIG_DEBUG_ATOMIC_SLEEP is enabled:

BUG: sleeping function called from invalid context at 
include/linux/sched/mm.h:274
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0
preempt_count: 1, expected: 0
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0 #53
Hardware name: Xilinx Versal vmk180 Eval board rev1.1 (QSPI) (DT)
Call trace:
 dump_backtrace+0xd0/0xe0
 show_stack+0x18/0x40
 dump_stack_lvl+0x7c/0xa0
 dump_stack+0x18/0x34
 __might_resched+0x10c/0x140
 __might_sleep+0x4c/0xa0
 __kmem_cache_alloc_node+0xf4/0x168
 kmalloc_trace+0x28/0x38
 __request_percpu_irq+0x74/0x138
 xlnx_event_manager_probe+0xf8/0x298
 platform_probe+0x68/0xd8

Signed-off-by: Quanyang Wang 
---
Hi Bruce,
Would you please help merge this patch to the branches:
v6.1/standard/preempt-rt/sdkv6.1/xlnx-soc
v6.1/standard/sdkv6.1/xlnx-soc
Thanks,
Quanyang
---
 drivers/soc/xilinx/xlnx_event_manager.c | 14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/soc/xilinx/xlnx_event_manager.c 
b/drivers/soc/xilinx/xlnx_event_manager.c
index 9b6fe19666946..9156cb45bd533 100644
--- a/drivers/soc/xilinx/xlnx_event_manager.c
+++ b/drivers/soc/xilinx/xlnx_event_manager.c
@@ -22,7 +22,7 @@
 #include 
 #include 
 
-static DEFINE_PER_CPU_READ_MOSTLY(int, cpu_number1);
+static DEFINE_PER_CPU_READ_MOSTLY(int, dummy_cpu_number);
 
 static int virq_sgi;
 static int event_manager_availability = -EACCES;
@@ -569,7 +569,6 @@ static void xlnx_disable_percpu_irq(void *data)
 static int xlnx_event_init_sgi(struct platform_device *pdev)
 {
int ret = 0;
-   int cpu;
/*
 * IRQ related structures are used for the following:
 * for each SGI interrupt ensure its mapped by GIC IRQ domain
@@ -606,11 +605,8 @@ static int xlnx_event_init_sgi(struct platform_device 
*pdev)
sgi_fwspec.param[0] = sgi_num;
virq_sgi = irq_create_fwspec_mapping(_fwspec);
 
-   cpu = get_cpu();
-   per_cpu(cpu_number1, cpu) = cpu;
ret = request_percpu_irq(virq_sgi, xlnx_event_handler, 
"xlnx_event_mgmt",
-_number1);
-   put_cpu();
+_cpu_number);
 
WARN_ON(ret);
if (ret) {
@@ -626,16 +622,12 @@ static int xlnx_event_init_sgi(struct platform_device 
*pdev)
 
 static void xlnx_event_cleanup_sgi(struct platform_device *pdev)
 {
-   int cpu = smp_processor_id();
-
-   per_cpu(cpu_number1, cpu) = cpu;
-
cpuhp_remove_state(CPUHP_AP_ONLINE_DYN);
 
on_each_cpu(xlnx_disable_percpu_irq, NULL, 1);
 
irq_clear_status_flags(virq_sgi, IRQ_PER_CPU);
-   free_percpu_irq(virq_sgi, _number1);
+   free_percpu_irq(virq_sgi, _cpu_number);
irq_dispose_mapping(virq_sgi);
 }
 
-- 
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13488): 
https://lists.yoctoproject.org/g/linux-yocto/message/13488
Mute This Topic: https://lists.yoctoproject.org/mt/103778951/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][yocto-kernel-cache][yocto-6.1 master][PATCH 0/1] feature/security: add configs to harden protection

2024-01-16 Thread Xiangyu Chen
From: Xiangyu Chen 

Hi Bruce,

After using kernel-hardening-checker[1] utils to check current configs, we 
picked up some configs from failure case to
feature/security/security.cfg to improve the kernel security.

Following configs no impact on performance but can improve kernel security:

CONFIG_HW_RANDOM_TPM=y Exposing the TPM's Random Number Generator(if have) as a 
hwrng device.
CONFIG_DEBUG_WX=y Warn on W+X mappings at boot.
CONFIG_SECURITY_DMESG_RESTRICT=y Restrict unprivileged access to the kernel 
syslog.
CONFIG_LDISC_AUTOLOAD=n Disable automatically load TTY Line Disciplines.


Thanks!

Ref:
[1] https://github.com/a13xp0p0v/kernel-hardening-checker

Xiangyu Chen (1):
  feature/security: add configs to harden protection

 features/security/security.cfg | 12 
 1 file changed, 12 insertions(+)

-- 
2.35.5


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13487): 
https://lists.yoctoproject.org/g/linux-yocto/message/13487
Mute This Topic: https://lists.yoctoproject.org/mt/103758931/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][yocto-kernel-cache][yocto-6.1 master][PATCH 1/1] feature/security: add configs to harden protection

2024-01-16 Thread Xiangyu Chen
From: Xiangyu Chen 

Add some configs to harden protection:
  CONFIG_HW_RANDOM_TPM=y Exposing the TPM's Random Number Generator as a hwrng 
device.
  CONFIG_DEBUG_WX=y Warn on W+X mappings at boot.
  CONFIG_SECURITY_DMESG_RESTRICT=y Restrict unprivileged access to the kernel 
syslog.
  CONFIG_LDISC_AUTOLOAD=n Disable automatically load TTY Line Disciplines.

Signed-off-by: Xiangyu Chen 
---
 features/security/security.cfg | 12 
 1 file changed, 12 insertions(+)

diff --git a/features/security/security.cfg b/features/security/security.cfg
index 6c096739..92325ccb 100644
--- a/features/security/security.cfg
+++ b/features/security/security.cfg
@@ -56,3 +56,15 @@ CONFIG_STRICT_MODULE_RWX=y
 # Meltdown and Spectre
 CONFIG_PAGE_TABLE_ISOLATION=y
 CONFIG_RETPOLINE=y
+
+# Exposing the TPM's Random Number Generator as a hwrng device.
+CONFIG_HW_RANDOM_TPM=y
+
+# Warn on W+X mappings at boot
+CONFIG_DEBUG_WX=y
+
+# Restrict unprivileged access to the kernel syslog
+CONFIG_SECURITY_DMESG_RESTRICT=y
+
+# The kernel will automatically load the module of any line dicipline that is 
asked for.
+CONFIG_LDISC_AUTOLOAD=n
-- 
2.35.5


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13486): 
https://lists.yoctoproject.org/g/linux-yocto/message/13486
Mute This Topic: https://lists.yoctoproject.org/mt/103758930/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] Trial merge of v5.15.147 v6.1.73 for linux-yocto

2024-01-16 Thread Kevin Hao
Hi Bruce,

This is a trial merge of the stable kernel v5.15.147 v6.1.73 for the following 
branches in the linux-yocto.
  9a246c2e36ad  v5.15/standard/sdkv5.10/axxia
  c2332b69f732  v5.15/standard/preempt-rt/sdkv5.10/axxia
  2e914c1570ee  v5.15/standard/base
  ae36cbd24fb1  v5.15/standard/preempt-rt/base
  a4cfcde3a893  v5.15/standard/cn-sdkv5.4/octeon
 #Have textual conflicts
  720e9fd2ec11  v5.15/standard/preempt-rt/cn-sdkv5.4/octeon 
 #Have textual conflicts
  0449e981cd6f  v5.15/standard/cn-sdkv5.15/octeon   
 #Have textual conflicts
  2645fa34fa63  v5.15/standard/preempt-rt/cn-sdkv5.15/octeon
 #Have textual conflicts
  de909f0d84d4  v5.15/standard/ti-sdk-5.10/ti-j72xx
  a1e4c426e783  v5.15/standard/preempt-rt/ti-sdk-5.10/ti-j72xx
  5823ad8da2e7  v5.15/standard/nxp-sdk-5.15/nxp-soc
  466079d642d1  v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc
  a5831da1a1ed  v5.15/standard/bcm-2xxx-rpi
  2111b37f040b  v5.15/standard/preempt-rt/bcm-2xxx-rpi
  3ec1272b6eaf  v5.15/standard/nxp-sdk-5.15/nxp-s32g
  0e489d0dcd94  v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-s32g
  37ec30be53ae  v5.15/standard/intel-sdk-5.15/intel-socfpga
  efff5185d724  v5.15/standard/preempt-rt/intel-sdk-5.15/intel-socfpga
  3074949bd235  v5.15/standard/x86
  a7acd94843eb  v5.15/standard/preempt-rt/x86
  8bedd5d2abfa  v5.15/standard/sdkv5.15/xlnx-soc
  d655616b570b  v5.15/standard/preempt-rt/sdkv5.15/xlnx-soc
  783cd1bfc30f  v6.1/standard/sdkv5.10/axxia
  2932a760cc54  v6.1/standard/preempt-rt/sdkv5.10/axxia
  0c0af508fd92  v6.1/standard/base
  2f575407bddc  v6.1/standard/preempt-rt/base
  bd0d86de7dbf  v6.1/standard/ti-sdk-6.1/ti-j7xxx
  4c978003d3a9  v6.1/standard/preempt-rt/ti-sdk-6.1/ti-j7xxx
  0f5b639c5073  v6.1/standard/nxp-sdk-6.1/nxp-soc
  1778b6be7608  v6.1/standard/preempt-rt/nxp-sdk-6.1/nxp-soc
  c647d3ec32ac  v6.1/standard/cn-sdkv5.15/octeon
  97f196bbad16  v6.1/standard/preempt-rt/cn-sdkv5.15/octeon
  7ffade61386d  v6.1/standard/microchip-polarfire-soc
  0e097d64621b  v6.1/standard/preempt-rt/microchip-polarfire-soc
  812180e3a3bf  v6.1/standard/bcm-2xxx-rpi
  4e7691108339  v6.1/standard/preempt-rt/bcm-2xxx-rpi
  f7ab5e54ab66  v6.1/standard/nxp-sdk-5.15/nxp-s32g
  cc6220fedab2  v6.1/standard/preempt-rt/nxp-sdk-5.15/nxp-s32g
  ba4d7ab73168  v6.1/standard/intel-sdk-6.1/intel-socfpga
  f1d9924365be  v6.1/standard/preempt-rt/intel-sdk-6.1/intel-socfpga
  5fd07e7a199b  v6.1/standard/x86
  266bc43a4acc  v6.1/standard/preempt-rt/x86
  8dd296cd8060  v6.1/standard/sdkv6.1/xlnx-soc
  d5de94a91512  v6.1/standard/preempt-rt/sdkv6.1/xlnx-soc

For v5.15.147, it doesn't have many patches (only 60), but it has introduced
many significant conflicts in the octeon branches. We can resolve most of them
by favoring the SDK version. However, there are some that need to be handled
with extra care. There are only 5 patches in the v6.1.73, so there is no any
conflict when merging it. All the branches have passed my build test. I have
pushed all these branches to:
https://github.com/haokexin/linux

You can use this as a reference for the linux-yocto stable kernel bump.

Thanks,
Kevin

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13485): 
https://lists.yoctoproject.org/g/linux-yocto/message/13485
Mute This Topic: https://lists.yoctoproject.org/mt/103758882/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-