From: Stefan Agner <stefan@agner.ch> To: Jacky Bai <ping.bai@nxp.com> Cc: sboyd@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, kernel@pengutronix.de, "A.s. Dong" <aisheng.dong@nxp.com>, dl-linux-imx <linux-imx@nxp.com>, jacky.baip@gmail.com, Fabio Estevam <fabio.estevam@nxp.com>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 1/4] clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux Date: Wed, 18 Apr 2018 15:20:12 +0200 [thread overview] Message-ID: <cb7c35abeee1ee179c9d0b1850d988d7@agner.ch> (raw) In-Reply-To: <HE1PR04MB31135AACF6954F400B02675087B60@HE1PR04MB3113.eurprd04.prod.outlook.com> On 18.04.2018 15:03, Jacky Bai wrote: >> Subject: Re: [PATCH v6 1/4] clk: imx: Add CLK_IS_CRITICAL flag for busy >> divider and busy mux >> >> Hi Bai, >> >> On 20.03.2018 03:24, Bai Ping wrote: >> > The busy divider and busy mux is actually used by the system critical >> > clocks, so add 'CLK_IS_CRITICAL' to clocks registered with these two type. >> >> This seems that this patch breaks i.MX 6ULL. Our Colibri iMX6ULL freezes with >> v4.17-rc1: >> > > Thanks for you report this. I will try on imx6ull and look into it. > I just sent a possible fix for this, unfortunately I forgot to add you to the recipients list, sorry about that: https://patchwork.kernel.org/patch/10348099/ However, I am not 100% sure why this leads to a crash and whether that fix is good enough. It would be best if somebody with better clocking overview could have a closer look at that... -- Stefan > BR > Jacky Bai >> [ 0.000000] Booting Linux on physical CPU 0x0 >> [ 0.000000] Linux version 4.17.0-rc1-00002-g7529efa14a7c-dirty >> (ags@trochilidae) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) >> #517 SMP Wed Apr 18 11:11:07 CEST 2018 >> [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), >> cr=10c5387d >> [ 0.000000] CPU: div instructions available: patching division code >> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing >> instruction cache >> [ 0.000000] OF: fdt: Machine model: Toradex Colibri iMX6ULL 512MB on >> Colibri Evaluation Board V3 >> [ 0.000000] earlycon: ec_imx6q0 at MMIO 0x02020000 (options >> '115200n8') >> [ 0.000000] bootconsole [ec_imx6q0] enabled >> [ 0.000000] debug: ignoring loglevel setting. >> [ 0.000000] Memory policy: Data cache writealloc >> [ 0.000000] cma: Reserved 256 MiB at 0x90000000 >> [ 0.000000] On node 0 totalpages: 131072 >> [ 0.000000] Normal zone: 1024 pages used for memmap >> [ 0.000000] Normal zone: 0 pages reserved >> [ 0.000000] Normal zone: 131072 pages, LIFO batch:31 >> [ 0.000000] random: fast init done >> [ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s35084 r8192 >> d22260 u65536 >> [ 0.000000] pcpu-alloc: s35084 r8192 d22260 u65536 alloc=16*4096 >> [ 0.000000] pcpu-alloc: [0] 0 >> [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: >> 130048 >> [ 0.000000] Kernel command line: >> mtdparts=gpmi-nand:512k(mx6ull-bcb),1536k(u-boot1)ro,1536k(u- >> boot2)ro,512k(u-boot-env),-(ubi) >> earlycon user_debug=31 ignore_loglevel ubi.mtd=ubi root=ubi0:rootfs rw >> rootfstype=ubifs ubi.fm_autoconvert=1 consoleblank=0 >> no_console_suspend=1 console=tty1 console=ttymxc0,115200n8 >> [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 >> bytes) >> [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 >> bytes) >> [ 0.000000] Memory: 243904K/524288K available (8192K kernel code, >> 365K rwdata, 2720K rodata, 1024K init, 389K bss, 18240K reserved, 262144K >> cma-reserved) >> [ 0.000000] Virtual kernel memory layout: >> [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) >> [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) >> [ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB) >> [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) >> [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB) >> [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (9184 kB) >> [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB) >> [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 366 kB) >> [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 390 kB) >> [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, >> Nodes=1 >> [ 0.000000] Hierarchical RCU implementation. >> [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. >> [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, >> nr_cpu_ids=1 >> [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 >> <freeze> >> >> Yet need to understand what is exactly going on. >> >> -- >> Stefan >> >> >> > >> > Signed-off-by: Bai Ping <ping.bai@nxp.com> >> > Acked-by: Dong Aisheng <aisheng.dong@nxp.com> >> > --- >> > change from V3->v4: >> > - fix a typo in commit log >> > change from v4->v5: >> > - optimize the commit subject >> > change from v5->v6: >> > - no change >> > --- >> > drivers/clk/imx/clk-busy.c | 4 ++-- >> > 1 file changed, 2 insertions(+), 2 deletions(-) >> > >> > diff --git a/drivers/clk/imx/clk-busy.c b/drivers/clk/imx/clk-busy.c >> > index 6df3389..9903652 100644 >> > --- a/drivers/clk/imx/clk-busy.c >> > +++ b/drivers/clk/imx/clk-busy.c >> > @@ -101,7 +101,7 @@ struct clk *imx_clk_busy_divider(const char *name, >> > const char *parent_name, >> > >> > init.name = name; >> > init.ops = &clk_busy_divider_ops; >> > - init.flags = CLK_SET_RATE_PARENT; >> > + init.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL; >> > init.parent_names = &parent_name; >> > init.num_parents = 1; >> > >> > @@ -175,7 +175,7 @@ struct clk *imx_clk_busy_mux(const char *name, >> > void __iomem *reg, u8 shift, >> > >> > init.name = name; >> > init.ops = &clk_busy_mux_ops; >> > - init.flags = 0; >> > + init.flags = CLK_IS_CRITICAL; >> > init.parent_names = parent_names; >> > init.num_parents = num_parents;
WARNING: multiple messages have this Message-ID (diff)
From: stefan@agner.ch (Stefan Agner) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 1/4] clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux Date: Wed, 18 Apr 2018 15:20:12 +0200 [thread overview] Message-ID: <cb7c35abeee1ee179c9d0b1850d988d7@agner.ch> (raw) In-Reply-To: <HE1PR04MB31135AACF6954F400B02675087B60@HE1PR04MB3113.eurprd04.prod.outlook.com> On 18.04.2018 15:03, Jacky Bai wrote: >> Subject: Re: [PATCH v6 1/4] clk: imx: Add CLK_IS_CRITICAL flag for busy >> divider and busy mux >> >> Hi Bai, >> >> On 20.03.2018 03:24, Bai Ping wrote: >> > The busy divider and busy mux is actually used by the system critical >> > clocks, so add 'CLK_IS_CRITICAL' to clocks registered with these two type. >> >> This seems that this patch breaks i.MX 6ULL. Our Colibri iMX6ULL freezes with >> v4.17-rc1: >> > > Thanks for you report this. I will try on imx6ull and look into it. > I just sent a possible fix for this, unfortunately I forgot to add you to the recipients list, sorry about that: https://patchwork.kernel.org/patch/10348099/ However, I am not 100% sure why this leads to a crash and whether that fix is good enough. It would be best if somebody with better clocking overview could have a closer look at that... -- Stefan > BR > Jacky Bai >> [ 0.000000] Booting Linux on physical CPU 0x0 >> [ 0.000000] Linux version 4.17.0-rc1-00002-g7529efa14a7c-dirty >> (ags at trochilidae) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) >> #517 SMP Wed Apr 18 11:11:07 CEST 2018 >> [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), >> cr=10c5387d >> [ 0.000000] CPU: div instructions available: patching division code >> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing >> instruction cache >> [ 0.000000] OF: fdt: Machine model: Toradex Colibri iMX6ULL 512MB on >> Colibri Evaluation Board V3 >> [ 0.000000] earlycon: ec_imx6q0 at MMIO 0x02020000 (options >> '115200n8') >> [ 0.000000] bootconsole [ec_imx6q0] enabled >> [ 0.000000] debug: ignoring loglevel setting. >> [ 0.000000] Memory policy: Data cache writealloc >> [ 0.000000] cma: Reserved 256 MiB at 0x90000000 >> [ 0.000000] On node 0 totalpages: 131072 >> [ 0.000000] Normal zone: 1024 pages used for memmap >> [ 0.000000] Normal zone: 0 pages reserved >> [ 0.000000] Normal zone: 131072 pages, LIFO batch:31 >> [ 0.000000] random: fast init done >> [ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s35084 r8192 >> d22260 u65536 >> [ 0.000000] pcpu-alloc: s35084 r8192 d22260 u65536 alloc=16*4096 >> [ 0.000000] pcpu-alloc: [0] 0 >> [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: >> 130048 >> [ 0.000000] Kernel command line: >> mtdparts=gpmi-nand:512k(mx6ull-bcb),1536k(u-boot1)ro,1536k(u- >> boot2)ro,512k(u-boot-env),-(ubi) >> earlycon user_debug=31 ignore_loglevel ubi.mtd=ubi root=ubi0:rootfs rw >> rootfstype=ubifs ubi.fm_autoconvert=1 consoleblank=0 >> no_console_suspend=1 console=tty1 console=ttymxc0,115200n8 >> [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 >> bytes) >> [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 >> bytes) >> [ 0.000000] Memory: 243904K/524288K available (8192K kernel code, >> 365K rwdata, 2720K rodata, 1024K init, 389K bss, 18240K reserved, 262144K >> cma-reserved) >> [ 0.000000] Virtual kernel memory layout: >> [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) >> [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) >> [ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB) >> [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) >> [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB) >> [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (9184 kB) >> [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB) >> [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 366 kB) >> [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 390 kB) >> [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, >> Nodes=1 >> [ 0.000000] Hierarchical RCU implementation. >> [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. >> [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, >> nr_cpu_ids=1 >> [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 >> <freeze> >> >> Yet need to understand what is exactly going on. >> >> -- >> Stefan >> >> >> > >> > Signed-off-by: Bai Ping <ping.bai@nxp.com> >> > Acked-by: Dong Aisheng <aisheng.dong@nxp.com> >> > --- >> > change from V3->v4: >> > - fix a typo in commit log >> > change from v4->v5: >> > - optimize the commit subject >> > change from v5->v6: >> > - no change >> > --- >> > drivers/clk/imx/clk-busy.c | 4 ++-- >> > 1 file changed, 2 insertions(+), 2 deletions(-) >> > >> > diff --git a/drivers/clk/imx/clk-busy.c b/drivers/clk/imx/clk-busy.c >> > index 6df3389..9903652 100644 >> > --- a/drivers/clk/imx/clk-busy.c >> > +++ b/drivers/clk/imx/clk-busy.c >> > @@ -101,7 +101,7 @@ struct clk *imx_clk_busy_divider(const char *name, >> > const char *parent_name, >> > >> > init.name = name; >> > init.ops = &clk_busy_divider_ops; >> > - init.flags = CLK_SET_RATE_PARENT; >> > + init.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL; >> > init.parent_names = &parent_name; >> > init.num_parents = 1; >> > >> > @@ -175,7 +175,7 @@ struct clk *imx_clk_busy_mux(const char *name, >> > void __iomem *reg, u8 shift, >> > >> > init.name = name; >> > init.ops = &clk_busy_mux_ops; >> > - init.flags = 0; >> > + init.flags = CLK_IS_CRITICAL; >> > init.parent_names = parent_names; >> > init.num_parents = num_parents;
next prev parent reply other threads:[~2018-04-18 13:20 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-03-20 2:24 [PATCH v6 1/4] clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux Bai Ping 2018-03-20 2:24 ` Bai Ping 2018-03-20 2:24 ` [PATCH v6 2/4] clk: imx: add new gate/gate2 wrapper funtion Bai Ping 2018-03-20 2:24 ` Bai Ping 2018-04-06 18:33 ` Stephen Boyd 2018-04-06 18:33 ` Stephen Boyd 2018-03-20 2:24 ` [PATCH v6 3/4] dt-bindings: imx: update clock doc for imx6sll Bai Ping 2018-03-20 2:24 ` Bai Ping 2018-04-06 18:33 ` Stephen Boyd 2018-04-06 18:33 ` Stephen Boyd 2018-03-20 2:24 ` [PATCH v6 4/4] clk: imx: add clock driver " Bai Ping 2018-03-20 2:24 ` Bai Ping 2018-04-06 18:33 ` Stephen Boyd 2018-04-06 18:33 ` Stephen Boyd 2018-04-06 18:33 ` [PATCH v6 1/4] clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux Stephen Boyd 2018-04-06 18:33 ` Stephen Boyd 2018-04-18 11:41 ` Stefan Agner 2018-04-18 11:41 ` Stefan Agner 2018-04-18 13:03 ` Jacky Bai 2018-04-18 13:03 ` Jacky Bai 2018-04-18 13:20 ` Stefan Agner [this message] 2018-04-18 13:20 ` Stefan Agner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cb7c35abeee1ee179c9d0b1850d988d7@agner.ch \ --to=stefan@agner.ch \ --cc=aisheng.dong@nxp.com \ --cc=fabio.estevam@nxp.com \ --cc=jacky.baip@gmail.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-imx@nxp.com \ --cc=ping.bai@nxp.com \ --cc=robh+dt@kernel.org \ --cc=sboyd@kernel.org \ --cc=shawnguo@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.