Re: [PATCH] clk: qcom: Park shared RCGs upon registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 Aug 2024 at 04:26, Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:
>
> Quoting Amit Pundir (2024-08-12 02:39:47)
> > gcc_qupv3_wrap1_s7_clk_src and gcc_usb30_prim_master_clk_src need to
> > be left untouched to fix the Audio codec and USB-C host mode breakages
> > respectively. It seem to have fixed the serial console garbage dump
> > issue as well.
>
> Alright. Can you try with this patch for the gcc_qupv3* clks on top? And
> keep gcc_usb30_prim_master_clk_src on the new clk_ops? I think we need
> two patches. One for the usb clk and one for these QUP clks that don't
> need to be parked.
>

Moving gcc_qupv3* clks to clk_rcg2_ops and keeping
gcc_usb30_prim_master_clk_sr to the clk_rcg2_shared_no_init_park_ops
works too. No audio or usb-c host regression in limited (~50) test
runs.

> > Thank you for diagnosing this race in ucsi_glink. I needed to run an
> > overnight reboot test to reproduce this crash, and could reproduce it
> > on ~380th reboot. I'll check if it has already been reported or fixed
> > on linux-next.
>
> Amazing! Can you add the msleep() so that it is highly likely?
>

You are right on the target with this one as well. I hit the following
kernel panic on each of the 10 reboots that I tried with the msleep()
in devm_pmic_glink_register_client().

[   17.824050][  T164] Unable to handle kernel NULL pointer
dereference at virtual address 0000000000000010
[   17.824068][  T164] Mem abort info:
[   17.824074][  T164]   ESR = 0x0000000096000006
[   17.824084][  T164]   EC = 0x25: DABT (current EL), IL = 32 bits
[   17.824096][  T164]   SET = 0, FnV = 0
[   17.824105][  T164]   EA = 0, S1PTW = 0
[   17.824113][  T164]   FSC = 0x06: level 2 translation fault
[   17.824124][  T164] Data abort info:
[   17.824130][  T164]   ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
[   17.824140][  T164]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[   17.824151][  T164]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[   17.824165][  T164] user pgtable: 4k pages, 39-bit VAs, pgdp=00000008820ac000
[   17.824180][  T164] [0000000000000010] pgd=080000088208e003,
p4d=080000088208e003, pud=080000088208e003, pmd=0000000000000000
[   17.824221][  T164] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
[   17.825877][  T164] CPU: 0 UID: 0 PID: 164 Comm: kworker/0:10
Tainted: G S          E
6.11.0-rc3-mainline-00013-g1690e68dbe30-dirty #37
[   17.825906][  T164] Tainted: [S]=CPU_OUT_OF_SPEC, [E]=UNSIGNED_MODULE
[   17.825914][  T164] Hardware name: Qualcomm Technologies, Inc.
SM8550 HDK (DT)
[   17.825926][  T164] Workqueue: events
pmic_glink_altmode_enable_worker [pmic_glink_altmode]
[   17.825958][  T164] pstate: 43400005 (nZcv daif +PAN -UAO +TCO +DIT
-SSBS BTYPE=--)
[   17.825978][  T164] pc : pmic_glink_send+0x10/0x2c [pmic_glink]
[   17.826002][  T164] lr : pmic_glink_altmode_request+0x74/0x108
[pmic_glink_altmode]
[   17.826328][  T164] Call trace:
[   17.826335][  T164]  pmic_glink_send+0x10/0x2c [pmic_glink]
[   17.826358][  T164]  pmic_glink_altmode_request+0x74/0x108
[pmic_glink_altmode]
[   17.826379][  T164]  pmic_glink_altmode_enable_worker+0x28/0x68
[pmic_glink_altmode]
[   17.826401][  T164]  process_one_work+0x184/0x2e8
[   17.826432][  T164]  worker_thread+0x2f0/0x404
[   17.826456][  T164]  kthread+0x114/0x118
[   17.826477][  T164]  ret_from_fork+0x10/0x20
[   17.826509][  T164] Code: d503233f f800865e a9bf7bfd 910003fd (f9400800)
[   17.826520][  T164] ---[ end trace 0000000000000000 ]---
[   17.826532][  T164] Kernel panic - not syncing: Oops: Fatal exception
[   17.826541][  T164] SMP: stopping secondary CPUs
[   19.164392][  T164] SMP: failed to stop secondary CPUs 0-1
[   19.364551][  T164] Kernel Offset: 0xf96480000 from 0xffffffc080000000
[   19.364562][  T164] PHYS_OFFSET: 0x80000000
[   19.364570][  T164] CPU features: 0x18,004e0003,80113128,564676af
[   19.364583][  T164] Memory Limit: none

Again, I have not yet checked if it has already been reported upstream
or fixed in the linux-next. I'll hopefully do that next week.

Regards,
Amit Pundir



> ----8<----
> diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c
> index 9ebc0ba35947..12169b0d2adb 100644
> --- a/drivers/soc/qcom/pmic_glink.c
> +++ b/drivers/soc/qcom/pmic_glink.c
> @@ -97,6 +97,8 @@ struct pmic_glink_client
> *devm_pmic_glink_register_client(struct device *dev,
>
>         devres_add(dev, client);
>
> +       msleep(10000);
> +
>         return client;
>  }
>  EXPORT_SYMBOL_GPL(devm_pmic_glink_register_client);




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux