[linux-yocto][v6.1/standard/preempt-rt/nxp-sdk-6.1/nxp-soc & v6.1/standard/nxp-sdk-6.1/nxp-soc][PATCH 1/1] ARM: imx: use raw_spin_lock instead of spin_lock

2023-10-09 Thread Xiaolei Wang via lists.yoctoproject.org
Use raw_spin_lock instead of spin_lock,
this patch fixes the following warning:

Hardware name: Freescale i.MX7 Dual (Device Tree)
 unwind_backtrace from show_stack+0x18/0x1c
 show_stack from dump_stack_lvl+0x40/0x4c
 dump_stack_lvl from __might_resched+0x140/0x1b4
 __might_resched from rt_spin_lock+0x28/0x74
 rt_spin_lock from imx_gpcv2_set_lpm_mode+0x1c/0xbc
 imx_gpcv2_set_lpm_mode from imx7d_enter_low_power_idle+0x7c/0x30c
 imx7d_enter_low_power_idle from cpuidle_enter_state+0xe8/0x328
 cpuidle_enter_state from cpuidle_enter+0x3c/0x50
 cpuidle_enter from do_idle+0x218/0x268
 do_idle from cpu_startup_entry+0x20/0x24
 cpu_startup_entry from rest_init+0xbc/0xd8
 rest_init from arch_post_acpi_subsys_init+0x0/0x18

Signed-off-by: Xiaolei Wang 
---
 arch/arm/mach-imx/gpcv2.c | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-imx/gpcv2.c b/arch/arm/mach-imx/gpcv2.c
index 62e8b0089348..4e7034c79ad7 100644
--- a/arch/arm/mach-imx/gpcv2.c
+++ b/arch/arm/mach-imx/gpcv2.c
@@ -109,7 +109,7 @@ static u32 gpcv2_saved_imrs[IMR_NUM];
 static u32 gpcv2_saved_imrs_m4[IMR_NUM];
 static u32 gpcv2_mf_irqs[IMR_NUM];
 static u32 gpcv2_mf_request_on[IMR_NUM];
-static DEFINE_SPINLOCK(gpcv2_lock);
+static DEFINE_RAW_SPINLOCK(gpcv2_lock);
 
 void imx_gpcv2_add_m4_wake_up_irq(u32 hwirq, bool enable)
 {
@@ -122,10 +122,10 @@ void imx_gpcv2_add_m4_wake_up_irq(u32 hwirq, bool enable)
return;
 
mask = 1 << hwirq % 32;
-   spin_lock_irqsave(_lock, flags);
+   raw_spin_lock_irqsave(_lock, flags);
gpcv2_wake_irqs[idx] = enable ? gpcv2_wake_irqs[idx] | mask :
gpcv2_wake_irqs[idx] & ~mask;
-   spin_unlock_irqrestore(_lock, flags);
+   raw_spin_unlock_irqrestore(_lock, flags);
 }
 
 static int imx_gpcv2_irq_set_wake(struct irq_data *d, unsigned int on)
@@ -137,10 +137,10 @@ static int imx_gpcv2_irq_set_wake(struct irq_data *d, 
unsigned int on)
BUG_ON(idx >= IMR_NUM);
 
mask = 1 << d->hwirq % 32;
-   spin_lock_irqsave(_lock, flags);
+   raw_spin_lock_irqsave(_lock, flags);
gpcv2_wake_irqs[idx] = on ? gpcv2_wake_irqs[idx] | mask :
  gpcv2_wake_irqs[idx] & ~mask;
-   spin_unlock_irqrestore(_lock, flags);
+   raw_spin_unlock_irqrestore(_lock, flags);
 
return 0;
 }
@@ -226,7 +226,7 @@ void imx_gpcv2_set_lpm_mode(enum mxc_cpu_pwr_mode mode)
unsigned long flags;
u32 val1, val2;
 
-   spin_lock_irqsave(_lock, flags);
+   raw_spin_lock_irqsave(_lock, flags);
 
val1 = readl_relaxed(gpc_base + GPC_LPCR_A7_BSC);
val2 = readl_relaxed(gpc_base + GPC_SLPCR);
@@ -283,7 +283,7 @@ void imx_gpcv2_set_lpm_mode(enum mxc_cpu_pwr_mode mode)
writel_relaxed(val1, gpc_base + GPC_LPCR_A7_BSC);
writel_relaxed(val2, gpc_base + GPC_SLPCR);
 
-   spin_unlock_irqrestore(_lock, flags);
+   raw_spin_unlock_irqrestore(_lock, flags);
 }
 
 void imx_gpcv2_set_plat_power_gate_by_lpm(bool pdn)
@@ -329,7 +329,7 @@ void imx_gpcv2_set_cpu_power_gate_by_wfi(u32 cpu, bool pdn)
unsigned long flags;
u32 val;
 
-   spin_lock_irqsave(_lock, flags);
+   raw_spin_lock_irqsave(_lock, flags);
val = readl_relaxed(gpc_base + GPC_LPCR_A7_AD);
 
if (cpu == 0) {
@@ -355,7 +355,7 @@ void imx_gpcv2_set_cpu_power_gate_by_wfi(u32 cpu, bool pdn)
}
}
writel_relaxed(val, gpc_base + GPC_LPCR_A7_AD);
-   spin_unlock_irqrestore(_lock, flags);
+   raw_spin_unlock_irqrestore(_lock, flags);
 }
 
 void imx_gpcv2_set_cpu_power_gate_by_lpm(u32 cpu, bool pdn)
@@ -363,7 +363,7 @@ void imx_gpcv2_set_cpu_power_gate_by_lpm(u32 cpu, bool pdn)
unsigned long flags;
u32 val;
 
-   spin_lock_irqsave(_lock, flags);
+   raw_spin_lock_irqsave(_lock, flags);
 
val = readl_relaxed(gpc_base + GPC_LPCR_A7_AD);
if (cpu == 0) {
@@ -384,7 +384,7 @@ void imx_gpcv2_set_cpu_power_gate_by_lpm(u32 cpu, bool pdn)
}
 
writel_relaxed(val, gpc_base + GPC_LPCR_A7_AD);
-   spin_unlock_irqrestore(_lock, flags);
+   raw_spin_unlock_irqrestore(_lock, flags);
 }
 
 void imx_gpcv2_set_cpu_power_gate_in_idle(bool pdn)
@@ -395,7 +395,7 @@ void imx_gpcv2_set_cpu_power_gate_in_idle(bool pdn)
for_each_possible_cpu(cpu)
imx_gpcv2_set_cpu_power_gate_by_lpm(cpu, pdn);
 
-   spin_lock_irqsave(_lock, flags);
+   raw_spin_lock_irqsave(_lock, flags);
 
imx_gpcv2_set_m_core_pgc(pdn, GPC_PGC_C0);
if (num_online_cpus() > 1)
@@ -424,7 +424,7 @@ void imx_gpcv2_set_cpu_power_gate_in_idle(bool pdn)
gpc_base + GPC_PGC_ACK_SEL_A7);
imx_gpcv2_enable_rbc(false);
}
-   spin_unlock_irqrestore(_lock, flags);
+   raw_spin_unlock_irqrestore(_lock, flags);
 }
 
 void imx_gpcv2_set_mix_phy_gate_by_lpm(u32 pdn_index, u32 pup_index)
@@ -468,10 +468,10 @@ int 

Re: [linux-yocto][linux-yocto v6.1] fix patch for marvell cn96xx

2023-10-09 Thread Ruiqiang Hao via lists.yoctoproject.org

The condition being removed wasn't in exactly the same
place on the -rt brances, so I fixedup the patch when
applying it.

Both branches should be fixed.
I just realized that RT branch and Standard branch are different when 
processing merges,
this patch is not applicable on the RT branch.

I will send a pull-request later to fix this.

Thanks,
Ruiqiang


From: Bruce Ashfield 
Sent: Monday, October 9, 2023 20:02
To: Hao, Ruiqiang 
Cc: linux-yocto@lists.yoctoproject.org 
Subject: Re: [linux-yocto][linux-yocto v6.1] fix patch for marvell cn96xx

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

In message: [linux-yocto][linux-yocto v6.1] fix patch for marvell cn96xx
on 09/10/2023 Ruiqiang Hao wrote:

> Hi Bruce,
>
> Please help to merge this patch into our linux-yocto repo.
>
> repo:
>   linux-yocto
> branch:
>   v6.1/standard/cn-sdkv5.15/octeon
>   v6.1/standard/preempt-rt/cn-sdkv5.15/octeon

The condition being removed wasn't in exactly the same
place on the -rt brances, so I fixedup the patch when
applying it.

Both branches should be fixed.

Bruce

>
> Thanks,
> Ruiqiang

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



Re: [linux-yocto][linux-yocto v6.1] fix patch for marvell cn96xx

2023-10-09 Thread Bruce Ashfield
In message: [linux-yocto][linux-yocto v6.1] fix patch for marvell cn96xx
on 09/10/2023 Ruiqiang Hao wrote:

> Hi Bruce,
> 
> Please help to merge this patch into our linux-yocto repo.
> 
> repo:
>   linux-yocto
> branch:
>   v6.1/standard/cn-sdkv5.15/octeon
>   v6.1/standard/preempt-rt/cn-sdkv5.15/octeon

The condition being removed wasn't in exactly the same
place on the -rt brances, so I fixedup the patch when
applying it.

Both branches should be fixed.

Bruce

> 
> Thanks,
> Ruiqiang

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



Re: [linux-yocto] [PATCH] nxp-imx7: enable CONFIG_I2C kernel config explicitly

2023-10-09 Thread Bruce Ashfield
merged.

Bruce

In message: [PATCH] nxp-imx7: enable CONFIG_I2C kernel config explicitly
on 09/10/2023 Meng Li wrote:

> The CONFIG_I2C kernel config is not enabled if setup WRLinux project
> with nodistro parameter, so add it into BSP cfg file.
> 
> Signed-off-by: Meng Li 
> ---
>  bsp/nxp-imx7/nxp-imx7.cfg | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/bsp/nxp-imx7/nxp-imx7.cfg b/bsp/nxp-imx7/nxp-imx7.cfg
> index 37438785..930c697e 100644
> --- a/bsp/nxp-imx7/nxp-imx7.cfg
> +++ b/bsp/nxp-imx7/nxp-imx7.cfg
> @@ -86,6 +86,7 @@ CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
>  
>  CONFIG_NVMEM_IMX_OCOTP=y
>  
> +CONFIG_I2C=y
>  CONFIG_I2C_CHARDEV=y
>  CONFIG_I2C_IMX=y
>  
> -- 
> 2.34.1
> 

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