* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard @ 2011-04-01 14:33 Avik Sil 2011-04-02 5:27 ` Ming Lei 0 siblings, 1 reply; 11+ messages in thread From: Avik Sil @ 2011-04-01 14:33 UTC (permalink / raw) To: linux-arm-kernel Hi, I've applied the patches in http://lists.infradead.org/pipermail/linux-arm-kernel/2011-March/045283.html on top of a linaro kernel which resulted in booting problem on Pandaboard. It hangs inside the cti_unlock() while reading the LOCKSTATUS value, which happens when omap_init_pmu() is called. Please help me debug the issue. Regards, Avik ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-01 14:33 arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard Avik Sil @ 2011-04-02 5:27 ` Ming Lei 2011-04-04 14:14 ` Avik Sil 0 siblings, 1 reply; 11+ messages in thread From: Ming Lei @ 2011-04-02 5:27 UTC (permalink / raw) To: linux-arm-kernel Hi Avik, 2011/4/1 Avik Sil <aviksil@linux.vnet.ibm.com>: > Hi, > > I've applied the patches in > http://lists.infradead.org/pipermail/linux-arm-kernel/2011-March/045283.html > on top of a linaro kernel which resulted in booting problem on Pandaboard. > It hangs inside the cti_unlock() while reading the LOCKSTATUS value, which > happens when omap_init_pmu() is called. Please help me debug the issue. Please check if l3 clocks are enabled to drive CTI, such as done in below: omap_writel(1, CM_L3INSTR_L3_3_CLKCTRL); omap_writel(1, CM_L3INSTR_L3_INSTR_CLKCTRL); omap_writel(2, CM_EMU_CLKSTCTRL); while ((omap_readl(CM_EMU_CLKSTCTRL) & 0x300) != 0x300); No such issue on mainline since this clocks are enabled automatically. thanks, -- Ming Lei ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-02 5:27 ` Ming Lei @ 2011-04-04 14:14 ` Avik Sil 2011-04-04 14:23 ` Ming Lei 0 siblings, 1 reply; 11+ messages in thread From: Avik Sil @ 2011-04-04 14:14 UTC (permalink / raw) To: linux-arm-kernel Hi Ming, On Saturday 02 April 2011 10:57 AM, Ming Lei wrote: > Hi Avik, > > 2011/4/1 Avik Sil<aviksil@linux.vnet.ibm.com>: >> Hi, >> >> I've applied the patches in >> http://lists.infradead.org/pipermail/linux-arm-kernel/2011-March/045283.html >> on top of a linaro kernel which resulted in booting problem on Pandaboard. >> It hangs inside the cti_unlock() while reading the LOCKSTATUS value, which >> happens when omap_init_pmu() is called. Please help me debug the issue. > > Please check if l3 clocks are enabled to drive CTI, such as done in below: > > omap_writel(1, CM_L3INSTR_L3_3_CLKCTRL); > omap_writel(1, CM_L3INSTR_L3_INSTR_CLKCTRL); > omap_writel(2, CM_EMU_CLKSTCTRL); > while ((omap_readl(CM_EMU_CLKSTCTRL)& 0x300) != 0x300); > Can you please tell me where should I insert the above code to enable l3 clocks to drive CTI? Regards, Avik > No such issue on mainline since this clocks are enabled automatically. > > thanks, ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-04 14:14 ` Avik Sil @ 2011-04-04 14:23 ` Ming Lei 2011-04-04 16:01 ` Avik Sil 0 siblings, 1 reply; 11+ messages in thread From: Ming Lei @ 2011-04-04 14:23 UTC (permalink / raw) To: linux-arm-kernel Hi, 2011/4/4 Avik Sil <aviksil@linux.vnet.ibm.com>: > Hi Ming, > > On Saturday 02 April 2011 10:57 AM, Ming Lei wrote: >> >> Hi Avik, >> >> 2011/4/1 Avik Sil<aviksil@linux.vnet.ibm.com>: >>> >>> Hi, >>> >>> I've applied the patches in >>> >>> http://lists.infradead.org/pipermail/linux-arm-kernel/2011-March/045283.html >>> on top of a linaro kernel which resulted in booting problem on >>> Pandaboard. >>> It hangs inside the cti_unlock() while reading the LOCKSTATUS value, >>> which >>> happens when omap_init_pmu() is called. Please help me debug the issue. >> >> Please check if ?l3 clocks are enabled to drive CTI, such as done in >> below: >> >> ? ? ? ?omap_writel(1, CM_L3INSTR_L3_3_CLKCTRL); >> ? ? ? ?omap_writel(1, CM_L3INSTR_L3_INSTR_CLKCTRL); >> ? ? ? ?omap_writel(2, CM_EMU_CLKSTCTRL); >> ? ? ? ?while ((omap_readl(CM_EMU_CLKSTCTRL)& ?0x300) != 0x300); >> > Can you please tell me where should I insert the above code to enable l3 > clocks to drive CTI? It should be inserted before calling omap4_configure_pmu_irq. thanks, -- Ming Lei ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-04 14:23 ` Ming Lei @ 2011-04-04 16:01 ` Avik Sil 2011-04-05 2:03 ` Ming Lei 0 siblings, 1 reply; 11+ messages in thread From: Avik Sil @ 2011-04-04 16:01 UTC (permalink / raw) To: linux-arm-kernel On Monday 04 April 2011 07:53 PM, Ming Lei wrote: > Hi, > > 2011/4/4 Avik Sil<aviksil@linux.vnet.ibm.com>: >> Hi Ming, >> >> On Saturday 02 April 2011 10:57 AM, Ming Lei wrote: >>> >>> Hi Avik, >>> >>> 2011/4/1 Avik Sil<aviksil@linux.vnet.ibm.com>: >>>> >>>> Hi, >>>> >>>> I've applied the patches in >>>> >>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2011-March/045283.html >>>> on top of a linaro kernel which resulted in booting problem on >>>> Pandaboard. >>>> It hangs inside the cti_unlock() while reading the LOCKSTATUS value, >>>> which >>>> happens when omap_init_pmu() is called. Please help me debug the issue. >>> >>> Please check if l3 clocks are enabled to drive CTI, such as done in >>> below: >>> >>> omap_writel(1, CM_L3INSTR_L3_3_CLKCTRL); >>> omap_writel(1, CM_L3INSTR_L3_INSTR_CLKCTRL); >>> omap_writel(2, CM_EMU_CLKSTCTRL); >>> while ((omap_readl(CM_EMU_CLKSTCTRL)& 0x300) != 0x300); >>> >> Can you please tell me where should I insert the above code to enable l3 >> clocks to drive CTI? > > It should be inserted before calling omap4_configure_pmu_irq. > After inserting the above code, I got build error saying undeclared identifiers. After searching, I found the above identifiers are defined with 'OMAP4430_' prefix in arch/arm/mach-omap2/cm2_44xx.h (OMAP4430_CM_L3INSTR_L3_3_CLKCTRL and OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL) and arch/arm/mach-omap2/prm44xx.h (OMAP4430_CM_EMU_CLKSTCTRL): #define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0720) [...] Should I use those identifier instead? I gave a try with those identifiers and it built the image successfully although with some warnings - "passing argument 2 of 'omap_writel' makes integer from pointer without a cast". And the kernel ended up with oops: [ 1.082122] Unable to handle kernel paging request at virtual address ae008e20 [ 1.089630] pgd = c0004000 [ 1.092498] [ae008e20] *pgd=00000000 [ 1.096252] Internal error: Oops: 805 [#1] SMP [ 1.100891] last sysfs file: [ 1.104034] Modules linked in: [ 1.107269] CPU: 0 Not tainted (2.6.38.2+ #13) [ 1.112274] PC is at omap_writel+0x4/0xc [ 1.116394] LR is at omap2_init_devices+0x108/0x42c [ 1.121490] pc : [<c006f174>] lr : [<c0011274>] psr: 60000013 [ 1.121490] sp : da845f98 ip : 271beb3a fp : 00000000 [ 1.133453] r10: 00000000 r9 : 00000000 r8 : c001116c [ 1.138916] r7 : 00000000 r6 : c0789738 r5 : 00000002 r4 : c078acd0 [ 1.145690] r3 : da848000 r2 : 271beb3a r1 : ae008e20 r0 : 00000001 [ 1.152496] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel [ 1.160064] Control: 10c53c7f Table: 8000404a DAC: 00000015 [ 1.166046] Process swapper (pid: 1, stack limit = 0xda8442f8) [ 1.172119] Stack: (0xda845f98 to 0xda846000) [ 1.176696] 5f80: c07ed3a0 c003b82c [ 1.185180] 5fa0: c0789738 c00535a4 00000000 271beb3a c07bddf4 0000019a c0789738 c07843d4 [ 1.193664] 5fc0: c003b2bc c003b82c c0789738 c07843d4 00000004 00000000 00000000 c000874c [ 1.202148] 5fe0: 00000000 c0008588 c00600b0 00000013 00000000 c00600b0 38c64703 060aa000 [ 1.210632] [<c006f174>] (omap_writel+0x4/0xc) from [<c0011274>] (omap2_init_devices+0x108/0x42c) [ 1.219848] [<c0011274>] (omap2_init_devices+0x108/0x42c) from [<c00535a4>] (do_one_initcall+0x34/0x18c) [ 1.229675] [<c00535a4>] (do_one_initcall+0x34/0x18c) from [<c000874c>] (kernel_init+0x1c4/0x250) [ 1.238891] [<c000874c>] (kernel_init+0x1c4/0x250) from [<c00600b0>] (kernel_thread_exit+0x0/0x8) [ 1.248107] Code: e28114b2 e1c100b0 e12fff1e e28114b2 (e5810000) [ 1.254455] ---[ end trace da227214a82491b7 ]--- [ 1.259338] Kernel panic - not syncing: Attempted to kill init! [ 1.265533] [<c00673ac>] (unwind_backtrace+0x0/0xfc) from [<c057d2f0>] (panic+0xb8/0x1dc) [ 1.274047] [<c057d2f0>] (panic+0xb8/0x1dc) from [<c00a75fc>] (do_exit+0x6e4/0x74c) [ 1.282012] [<c00a75fc>] (do_exit+0x6e4/0x74c) from [<c0063458>] (die+0x1e0/0x1f8) [ 1.289916] [<c0063458>] (die+0x1e0/0x1f8) from [<c006b884>] (__do_kernel_fault+0x74/0x84) [ 1.298492] [<c006b884>] (__do_kernel_fault+0x74/0x84) from [<c05831c8>] (do_page_fault+0xa8/0x338) [ 1.307891] [<c05831c8>] (do_page_fault+0xa8/0x338) from [<c00534e0>] (do_DataAbort+0x38/0x98) [ 1.316833] [<c00534e0>] (do_DataAbort+0x38/0x98) from [<c05811ec>] (__dabt_svc+0x4c/0x60) [ 1.325408] Exception stack(0xda845f50 to 0xda845f98) [ 1.330718] 5f40: 00000001 ae008e20 271beb3a da848000 [ 1.339202] 5f60: c078acd0 00000002 c0789738 00000000 c001116c 00000000 00000000 00000000 [ 1.347686] 5f80: 271beb3a da845f98 c0011274 c006f174 60000013 ffffffff [ 1.354583] [<c05811ec>] (__dabt_svc+0x4c/0x60) from [<c006f174>] (omap_writel+0x4/0xc) [ 1.362915] [<c006f174>] (omap_writel+0x4/0xc) from [<c0011274>] (omap2_init_devices+0x108/0x42c) [ 1.372131] [<c0011274>] (omap2_init_devices+0x108/0x42c) from [<c00535a4>] (do_one_initcall+0x34/0x18c) [ 1.381958] [<c00535a4>] (do_one_initcall+0x34/0x18c) from [<c000874c>] (kernel_init+0x1c4/0x250) [ 1.391174] [<c000874c>] (kernel_init+0x1c4/0x250) from [<c00600b0>] (kernel_thread_exit+0x0/0x8) [ 1.400390] CPU1: stopping [ 1.403259] [<c00673ac>] (unwind_backtrace+0x0/0xfc) from [<c0053384>] (do_IPI+0x108/0x118) [ 1.411926] [<c0053384>] (do_IPI+0x108/0x118) from [<c058123c>] (__irq_svc+0x3c/0x120) [ 1.420166] Exception stack(0xda86bf90 to 0xda86bfd8) [ 1.425445] bf80: c07cb574 00000000 da86a000 00000000 [ 1.433929] bfa0: da86a000 c07ed464 c058ae04 c0789dc4 c078a004 411fc092 00000000 00000000 [ 1.442413] bfc0: 00000000 da86bfd8 c0060154 c0060158 60000113 ffffffff [ 1.449279] [<c058123c>] (__irq_svc+0x3c/0x120) from [<c0060158>] (default_idle+0x28/0x2c) [ 1.457855] [<c0060158>] (default_idle+0x28/0x2c) from [<c00609fc>] (cpu_idle+0xc8/0xfc) [ 1.466278] [<c00609fc>] (cpu_idle+0xc8/0xfc) from [<8057990c>] (0x8057990c) Are there other definitions for the identifiers you have used? Regards, Avik > thanks, ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-04 16:01 ` Avik Sil @ 2011-04-05 2:03 ` Ming Lei 2011-04-05 11:05 ` Avik Sil 0 siblings, 1 reply; 11+ messages in thread From: Ming Lei @ 2011-04-05 2:03 UTC (permalink / raw) To: linux-arm-kernel Hi, 2011/4/5 Avik Sil <aviksil@linux.vnet.ibm.com>: > #define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL > OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0720) > [...] > > Should I use those identifier instead? Yes, seems right, but you need to use the ioremap addresses of the identifiers. > Are there other definitions for the identifiers you have used? As I said before, these are not needed for mainline, so I didn't try these. thanks, -- Ming Lei ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-05 2:03 ` Ming Lei @ 2011-04-05 11:05 ` Avik Sil 2011-04-06 6:07 ` Ming Lei 0 siblings, 1 reply; 11+ messages in thread From: Avik Sil @ 2011-04-05 11:05 UTC (permalink / raw) To: linux-arm-kernel On Tuesday 05 April 2011 07:33 AM, Ming Lei wrote: > Hi, > > 2011/4/5 Avik Sil<aviksil@linux.vnet.ibm.com>: >> #define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL >> OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0720) >> [...] >> >> Should I use those identifier instead? > > Yes, seems right, but you need to use the ioremap addresses of the identifiers. > Even after using ioremapped addresses in omap_writel() I'm getting the oops. Can you please point me to the location in mainline, where these l3 clocks are enabled? Regards, Avik >> Are there other definitions for the identifiers you have used? > > As I said before, these are not needed for mainline, so I didn't try these. > > > thanks, ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-05 11:05 ` Avik Sil @ 2011-04-06 6:07 ` Ming Lei 2011-04-07 9:06 ` Avik Sil 0 siblings, 1 reply; 11+ messages in thread From: Ming Lei @ 2011-04-06 6:07 UTC (permalink / raw) To: linux-arm-kernel Hi Avik, 2011/4/5 Avik Sil <aviksil@linux.vnet.ibm.com>: > Even after using ioremapped addresses in omap_writel() I'm getting the oops. > Can you please point me to the location in mainline, where these l3 clocks > are enabled? I guess you can find here: l3_main_3_ick && l3_instr_ick: arch/arm/mach-omap2/clock44xx_data.c the clocks are set as ENABLE_ON_INIT. thanks, -- Ming Lei ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-06 6:07 ` Ming Lei @ 2011-04-07 9:06 ` Avik Sil 2011-04-07 9:54 ` Ming Lei 0 siblings, 1 reply; 11+ messages in thread From: Avik Sil @ 2011-04-07 9:06 UTC (permalink / raw) To: linux-arm-kernel Hi Ming, On Wednesday 06 April 2011 11:37 AM, Ming Lei wrote: > Hi Avik, > > 2011/4/5 Avik Sil<aviksil@linux.vnet.ibm.com>: >> Even after using ioremapped addresses in omap_writel() I'm getting the oops. >> Can you please point me to the location in mainline, where these l3 clocks >> are enabled? > > I guess you can find here: > > l3_main_3_ick&& l3_instr_ick: arch/arm/mach-omap2/clock44xx_data.c > > the clocks are set as ENABLE_ON_INIT. Those clocks are also set ENABLE_ON_INIT in the linaro kernel. But still it's hanging at "val = __raw_readl(base + LOCKSTATUS);" in cti_unlock(), even after explicitly enabling it using: omap_writel(1, CM_L3INSTR_L3_3_CLKCTRL); omap_writel(1, CM_L3INSTR_L3_INSTR_CLKCTRL); omap_writel(2, CM_EMU_CLKSTCTRL); while ((omap_readl(CM_EMU_CLKSTCTRL) & 0x300) != 0x300); BTW, the oops were fixed by replacing omap_writel with __raw_writel. Regards, Avik > > thanks, ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-07 9:06 ` Avik Sil @ 2011-04-07 9:54 ` Ming Lei 2011-04-07 10:42 ` Avik Sil 0 siblings, 1 reply; 11+ messages in thread From: Ming Lei @ 2011-04-07 9:54 UTC (permalink / raw) To: linux-arm-kernel Hi Avik, Please check if the option CONFIG_PM is enabled or not. If not, please try to enable it to see you issue can be fixed. 2011/4/7 Avik Sil <aviksil@linux.vnet.ibm.com>: > Hi Ming, > > On Wednesday 06 April 2011 11:37 AM, Ming Lei wrote: >> >> Hi Avik, >> >> 2011/4/5 Avik Sil<aviksil@linux.vnet.ibm.com>: >>> >>> Even after using ioremapped addresses in omap_writel() I'm getting the >>> oops. >>> Can you please point me to the location in mainline, where these l3 >>> clocks >>> are enabled? >> >> I guess you can find here: >> >> ? ? ? ? ?l3_main_3_ick&& ?l3_instr_ick: >> arch/arm/mach-omap2/clock44xx_data.c >> >> the clocks are set as ENABLE_ON_INIT. > > Those clocks are also set ENABLE_ON_INIT in the linaro kernel. But still > it's hanging at "val = __raw_readl(base + LOCKSTATUS);" in cti_unlock(), > even after explicitly enabling it using: > > omap_writel(1, CM_L3INSTR_L3_3_CLKCTRL); > omap_writel(1, CM_L3INSTR_L3_INSTR_CLKCTRL); > omap_writel(2, CM_EMU_CLKSTCTRL); > while ((omap_readl(CM_EMU_CLKSTCTRL) & 0x300) != 0x300); > > BTW, the oops were fixed by replacing omap_writel with __raw_writel. > > Regards, > Avik > >> >> thanks, > > thanks, -- Ming Lei ^ permalink raw reply [flat|nested] 11+ messages in thread
* arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard 2011-04-07 9:54 ` Ming Lei @ 2011-04-07 10:42 ` Avik Sil 0 siblings, 0 replies; 11+ messages in thread From: Avik Sil @ 2011-04-07 10:42 UTC (permalink / raw) To: linux-arm-kernel Hi Ming, On Thursday 07 April 2011 03:24 PM, Ming Lei wrote: > Hi Avik, > > Please check if the option CONFIG_PM is enabled or not. CONFIG_PM is enabled in my config: $ grep CONFIG_PM .config CONFIG_PM=y # CONFIG_PM_DEBUG is not set CONFIG_PM_SLEEP_SMP=y CONFIG_PM_SLEEP=y CONFIG_PM_RUNTIME=y CONFIG_PM_OPS=y CONFIG_PM_OPP=y CONFIG_PMIC_DA903X=y CONFIG_PMIC_ADP5520=y As suggested in http://groups.google.com/group/pandaboard/browse_thread/thread/74abf5dafa2fd6e2/b1cc29b5060b4223?#b1cc29b5060b4223 , do you think prcm_setup_regs() has to be called for OMAP4? Regards, Avik > > If not, please try to enable it to see you issue can be fixed. > > > 2011/4/7 Avik Sil<aviksil@linux.vnet.ibm.com>: >> Hi Ming, >> >> On Wednesday 06 April 2011 11:37 AM, Ming Lei wrote: >>> >>> Hi Avik, >>> >>> 2011/4/5 Avik Sil<aviksil@linux.vnet.ibm.com>: >>>> >>>> Even after using ioremapped addresses in omap_writel() I'm getting the >>>> oops. >>>> Can you please point me to the location in mainline, where these l3 >>>> clocks >>>> are enabled? >>> >>> I guess you can find here: >>> >>> l3_main_3_ick&& l3_instr_ick: >>> arch/arm/mach-omap2/clock44xx_data.c >>> >>> the clocks are set as ENABLE_ON_INIT. >> >> Those clocks are also set ENABLE_ON_INIT in the linaro kernel. But still >> it's hanging at "val = __raw_readl(base + LOCKSTATUS);" in cti_unlock(), >> even after explicitly enabling it using: >> >> omap_writel(1, CM_L3INSTR_L3_3_CLKCTRL); >> omap_writel(1, CM_L3INSTR_L3_INSTR_CLKCTRL); >> omap_writel(2, CM_EMU_CLKSTCTRL); >> while ((omap_readl(CM_EMU_CLKSTCTRL)& 0x300) != 0x300); >> >> BTW, the oops were fixed by replacing omap_writel with __raw_writel. >> >> Regards, >> Avik >> >>> >>> thanks, >> >> > > > thanks, ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-04-07 10:42 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-01 14:33 arm: pmu: support pmu/perf on OMAP4 - booting problem on pandaboard Avik Sil 2011-04-02 5:27 ` Ming Lei 2011-04-04 14:14 ` Avik Sil 2011-04-04 14:23 ` Ming Lei 2011-04-04 16:01 ` Avik Sil 2011-04-05 2:03 ` Ming Lei 2011-04-05 11:05 ` Avik Sil 2011-04-06 6:07 ` Ming Lei 2011-04-07 9:06 ` Avik Sil 2011-04-07 9:54 ` Ming Lei 2011-04-07 10:42 ` Avik Sil
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).