Re: [PATCH v2] gpio/omap: add *remove* callback in platform_driver
On Thu, Aug 9, 2012 at 8:28 PM, Kevin Hilman wrote: > "DebBarma, Tarun Kanti" writes: > >> On Wed, Aug 8, 2012 at 10:40 PM, Kevin Hilman wrote: >>> Tarun Kanti DebBarma writes: >>> >>>> Add *remove* callback so that necessary cleanup operations are >>>> performed when device is unregistered. The device is deleted >>>> from the list and associated clock handle is released by >>>> calling clk_put() and irq descriptor is released using the >>>> irq_free_desc() api. >>>> >>>> Signed-off-by: Tarun Kanti DebBarma >>>> Reported-by: Paul Walmsley >>>> Reviewed-by: Jon Hunter >>>> Cc: Kevin Hilman >>>> Cc: Rajendra Nayak >>>> Cc: Santosh Shilimkar >>>> Cc: Cousson, Benoit >>>> Cc: Paul Walmsley >>>> --- >>>> v2: >>>> Baseline: >>>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git >>>> Commit: 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (Linux 3.6-rc1) >>>> >>>> (1) Use irq_free_descs() instead of irq_free_desc(). >>>> Besides, irq_free_desc() was using wrong parameter, >>>> irq_base, instead of bank->irq. >>>> (2) irq_free_descs() moved outside spin_lock/unlock_*() >>>> in order to avoid exception warnings. >>>> >>>> (3) pm_runtime_disable() added so that bind can happen successfully >>>> >>>> Test Detail: >>>> Step 1: Unbind gpio.5 device in order to invoke the *remove* callback. >>>> #echo "omap_gpio.5" > sys/bus/platform/drivers/omap_gpio/unbind >>>> >>>> Step 2: Bind gpio.5 device and confirm probe() for the device succeeds. >>>> #echo "omap_gpio.5" > sys/bus/platform/drivers/omap_gpio/bind >>>> >>>> Step 3: Execute read/write GPIO test case. >>> >>> What happens when GPIOs are in use (requested)? >> If I try to unbind a currently active GPIO bank then I see an exception >> after the irq descriptor is freed by the remove. I believe this is expected >> because interrupt raised by the system would not be handled. > > ... and the GPIO is still configured to trigger interrupts. Right! > > The point is that there is lots to cleanup/unconfigure properly for this > to work properly. As far as I can think of, all active gpio requests done either in board files or through DT have to be freed. But if this is done then when we bind() the device again initialization done in omap_gpio_probe() would not restore the board/DT related configuration. So the point is are we supposed to do all these cleanup in *remove* callback? If yes, how do we manage board level gpio usage? --- Tarun > > Kevin > >> [ 18.859405] irq_free_descs: calling free_desc(192)... >> [ 18.866180] irq_free_descs: calling free_desc(192)... >> [ 18.872680] irq_free_descs: calling free_desc(192)... >> [ 18.877990] irq_free_descs: calling free_desc(192)... >> [ 18.883270] irq_free_descs: calling free_desc(192)... >> [ 18.888549] irq_free_descs: calling free_desc(192)... >> [ 18.893859] irq_free_descs: calling free_desc(192)... >> [ 18.899139] irq_free_descs: calling free_desc(192)... >> [ 18.904418] irq_free_descs: calling free_desc(192)... >> [ 18.909729] irq_free_descs: calling free_desc(192)... >> [ 18.915008] irq_free_descs: calling free_desc(192)... >> [ 18.920288] irq_free_descs: calling free_desc(192)... >> [ 18.925598] irq_free_descs: calling free_desc(192)... >> [ 18.930877] irq_free_descs: calling free_desc(192)... >> [ 18.936157] irq_free_descs: calling free_desc(192)... >> [ 18.941467] irq_free_descs: calling free_desc(192)... >> [ 18.946746] irq_free_descs: calling free_desc(192)... >> [ 18.952026] irq_free_descs: calling free_desc(192)... >> [ 18.957336] irq_free_descs: calling free_desc(192)... >> [ 18.962615] irq_free_descs: calling free_desc(192)... >> [ 18.967895] irq_free_descs: calling free_desc(192)... >> [ 18.973205] irq_free_descs: calling free_desc(192)... >> [ 18.978485] irq_free_descs: calling free_desc(192)... >> [ 18.983764] irq_free_descs: calling free_desc(192)... >> [ 18.989074] irq_free_descs: calling free_desc(192)... >> [ 18.994354] irq_free_descs: calling free_desc(192)... >> [ 18.999633] irq_free_descs: calling free_desc(192)... >> [ 19.004913] irq_free_descs: calling free_desc(192)... >> [ 19.010223] irq_free_descs: calling free_desc(192)... >> [ 19.015502] irq_free_descs: calling free_desc(1
Re: [PATCH v2] gpio/omap: add *remove* callback in platform_driver
On Thu, Aug 9, 2012 at 8:28 PM, Kevin Hilman khil...@ti.com wrote: DebBarma, Tarun Kanti tarun.ka...@ti.com writes: On Wed, Aug 8, 2012 at 10:40 PM, Kevin Hilman khil...@ti.com wrote: Tarun Kanti DebBarma tarun.ka...@ti.com writes: Add *remove* callback so that necessary cleanup operations are performed when device is unregistered. The device is deleted from the list and associated clock handle is released by calling clk_put() and irq descriptor is released using the irq_free_desc() api. Signed-off-by: Tarun Kanti DebBarma tarun.ka...@ti.com Reported-by: Paul Walmsley p...@pwsan.com Reviewed-by: Jon Hunter jon-hun...@ti.com Cc: Kevin Hilman khil...@ti.com Cc: Rajendra Nayak rna...@ti.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Cousson, Benoit b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com --- v2: Baseline: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Commit: 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (Linux 3.6-rc1) (1) Use irq_free_descs() instead of irq_free_desc(). Besides, irq_free_desc() was using wrong parameter, irq_base, instead of bank-irq. (2) irq_free_descs() moved outside spin_lock/unlock_*() in order to avoid exception warnings. (3) pm_runtime_disable() added so that bind can happen successfully Test Detail: Step 1: Unbind gpio.5 device in order to invoke the *remove* callback. #echo omap_gpio.5 sys/bus/platform/drivers/omap_gpio/unbind Step 2: Bind gpio.5 device and confirm probe() for the device succeeds. #echo omap_gpio.5 sys/bus/platform/drivers/omap_gpio/bind Step 3: Execute read/write GPIO test case. What happens when GPIOs are in use (requested)? If I try to unbind a currently active GPIO bank then I see an exception after the irq descriptor is freed by the remove. I believe this is expected because interrupt raised by the system would not be handled. ... and the GPIO is still configured to trigger interrupts. Right! The point is that there is lots to cleanup/unconfigure properly for this to work properly. As far as I can think of, all active gpio requests done either in board files or through DT have to be freed. But if this is done then when we bind() the device again initialization done in omap_gpio_probe() would not restore the board/DT related configuration. So the point is are we supposed to do all these cleanup in *remove* callback? If yes, how do we manage board level gpio usage? --- Tarun Kevin [ 18.859405] irq_free_descs: calling free_desc(192)... [ 18.866180] irq_free_descs: calling free_desc(192)... [ 18.872680] irq_free_descs: calling free_desc(192)... [ 18.877990] irq_free_descs: calling free_desc(192)... [ 18.883270] irq_free_descs: calling free_desc(192)... [ 18.888549] irq_free_descs: calling free_desc(192)... [ 18.893859] irq_free_descs: calling free_desc(192)... [ 18.899139] irq_free_descs: calling free_desc(192)... [ 18.904418] irq_free_descs: calling free_desc(192)... [ 18.909729] irq_free_descs: calling free_desc(192)... [ 18.915008] irq_free_descs: calling free_desc(192)... [ 18.920288] irq_free_descs: calling free_desc(192)... [ 18.925598] irq_free_descs: calling free_desc(192)... [ 18.930877] irq_free_descs: calling free_desc(192)... [ 18.936157] irq_free_descs: calling free_desc(192)... [ 18.941467] irq_free_descs: calling free_desc(192)... [ 18.946746] irq_free_descs: calling free_desc(192)... [ 18.952026] irq_free_descs: calling free_desc(192)... [ 18.957336] irq_free_descs: calling free_desc(192)... [ 18.962615] irq_free_descs: calling free_desc(192)... [ 18.967895] irq_free_descs: calling free_desc(192)... [ 18.973205] irq_free_descs: calling free_desc(192)... [ 18.978485] irq_free_descs: calling free_desc(192)... [ 18.983764] irq_free_descs: calling free_desc(192)... [ 18.989074] irq_free_descs: calling free_desc(192)... [ 18.994354] irq_free_descs: calling free_desc(192)... [ 18.999633] irq_free_descs: calling free_desc(192)... [ 19.004913] irq_free_descs: calling free_desc(192)... [ 19.010223] irq_free_descs: calling free_desc(192)... [ 19.015502] irq_free_descs: calling free_desc(192)... [ 19.020782] irq_free_descs: calling free_desc(192)... [ 19.026092] irq_free_descs: calling free_desc(192)... [ 19.032440] irq 194, desc: c072f340, depth: 1, count: 0, unhandled: 0 [ 19.039154] -handle_irq(): c00a3e08, handle_bad_irq+0x0/0x260 [ 19.045379] -irq_data.chip(): c078ff7c, no_irq_chip+0x0/0x5c [ 19.051391] -action(): ef0d42c0 [ 19.054748] -action-handler(): c0399ee0, ks8851_irq+0x0/0x1c [ 19.060852]IRQ_NOPROBE set [ 19.064056] IRQ_NOREQUEST set [ 19.067230] Unable to handle kernel paging request at virtual address 203a6c9 [ 19.074768] pgd = c0004000 [ 19.077606] [203a6c99] *pgd= [ 19.081329] Internal error: Oops: 5 [#1] SMP ARM [ 19.086151] Modules linked in: [ 19.089355] CPU: 0Not tainted (3.6.0-rc1
Re: [PATCH v2] gpio/omap: add *remove* callback in platform_driver
On Wed, Aug 8, 2012 at 10:40 PM, Kevin Hilman wrote: > Tarun Kanti DebBarma writes: > >> Add *remove* callback so that necessary cleanup operations are >> performed when device is unregistered. The device is deleted >> from the list and associated clock handle is released by >> calling clk_put() and irq descriptor is released using the >> irq_free_desc() api. >> >> Signed-off-by: Tarun Kanti DebBarma >> Reported-by: Paul Walmsley >> Reviewed-by: Jon Hunter >> Cc: Kevin Hilman >> Cc: Rajendra Nayak >> Cc: Santosh Shilimkar >> Cc: Cousson, Benoit >> Cc: Paul Walmsley >> --- >> v2: >> Baseline: >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git >> Commit: 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (Linux 3.6-rc1) >> >> (1) Use irq_free_descs() instead of irq_free_desc(). >> Besides, irq_free_desc() was using wrong parameter, >> irq_base, instead of bank->irq. >> (2) irq_free_descs() moved outside spin_lock/unlock_*() >> in order to avoid exception warnings. >> >> (3) pm_runtime_disable() added so that bind can happen successfully >> >> Test Detail: >> Step 1: Unbind gpio.5 device in order to invoke the *remove* callback. >> #echo "omap_gpio.5" > sys/bus/platform/drivers/omap_gpio/unbind >> >> Step 2: Bind gpio.5 device and confirm probe() for the device succeeds. >> #echo "omap_gpio.5" > sys/bus/platform/drivers/omap_gpio/bind >> >> Step 3: Execute read/write GPIO test case. > > What happens when GPIOs are in use (requested)? If I try to unbind a currently active GPIO bank then I see an exception after the irq descriptor is freed by the remove. I believe this is expected because interrupt raised by the system would not be handled. [ 18.859405] irq_free_descs: calling free_desc(192)... [ 18.866180] irq_free_descs: calling free_desc(192)... [ 18.872680] irq_free_descs: calling free_desc(192)... [ 18.877990] irq_free_descs: calling free_desc(192)... [ 18.883270] irq_free_descs: calling free_desc(192)... [ 18.888549] irq_free_descs: calling free_desc(192)... [ 18.893859] irq_free_descs: calling free_desc(192)... [ 18.899139] irq_free_descs: calling free_desc(192)... [ 18.904418] irq_free_descs: calling free_desc(192)... [ 18.909729] irq_free_descs: calling free_desc(192)... [ 18.915008] irq_free_descs: calling free_desc(192)... [ 18.920288] irq_free_descs: calling free_desc(192)... [ 18.925598] irq_free_descs: calling free_desc(192)... [ 18.930877] irq_free_descs: calling free_desc(192)... [ 18.936157] irq_free_descs: calling free_desc(192)... [ 18.941467] irq_free_descs: calling free_desc(192)... [ 18.946746] irq_free_descs: calling free_desc(192)... [ 18.952026] irq_free_descs: calling free_desc(192)... [ 18.957336] irq_free_descs: calling free_desc(192)... [ 18.962615] irq_free_descs: calling free_desc(192)... [ 18.967895] irq_free_descs: calling free_desc(192)... [ 18.973205] irq_free_descs: calling free_desc(192)... [ 18.978485] irq_free_descs: calling free_desc(192)... [ 18.983764] irq_free_descs: calling free_desc(192)... [ 18.989074] irq_free_descs: calling free_desc(192)... [ 18.994354] irq_free_descs: calling free_desc(192)... [ 18.999633] irq_free_descs: calling free_desc(192)... [ 19.004913] irq_free_descs: calling free_desc(192)... [ 19.010223] irq_free_descs: calling free_desc(192)... [ 19.015502] irq_free_descs: calling free_desc(192)... [ 19.020782] irq_free_descs: calling free_desc(192)... [ 19.026092] irq_free_descs: calling free_desc(192)... [ 19.032440] irq 194, desc: c072f340, depth: 1, count: 0, unhandled: 0 [ 19.039154] ->handle_irq(): c00a3e08, handle_bad_irq+0x0/0x260 [ 19.045379] ->irq_data.chip(): c078ff7c, no_irq_chip+0x0/0x5c [ 19.051391] ->action(): ef0d42c0 [ 19.054748] ->action->handler(): c0399ee0, ks8851_irq+0x0/0x1c [ 19.060852]IRQ_NOPROBE set [ 19.064056] IRQ_NOREQUEST set [ 19.067230] Unable to handle kernel paging request at virtual address 203a6c9 [ 19.074768] pgd = c0004000 [ 19.077606] [203a6c99] *pgd= [ 19.081329] Internal error: Oops: 5 [#1] SMP ARM [ 19.086151] Modules linked in: [ 19.089355] CPU: 0Not tainted (3.6.0-rc1-3-g43a916d-dirty #885) [ 19.096374] PC is at gpio_irq_handler+0x7c/0x26c [ 19.101165] LR is at handle_bad_irq+0x1cc/0x260 [ 19.105895] pc : []lr : []psr: 6093 [ 19.105895] sp : c0725df8 ip : 6fc6 fp : 0001 [ 19.117889] r10: r9 : fa05502c r8 : 0020 [ 19.123352] r7 : r6 : r5 : r4 : ef0bbe10 [ 19.130157] r3 : ef0c1980 r2 : 203a6c65 r1 : 0034 r0 : [ 19.136993] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kel [ 19.144714] Control: 10c53c7d Table: ae89804a DAC: 0017 [ 19.150695] Process swapper/0 (pid: 0, stack limit = 0xc07242f8) [ 19.156982] Stack: (0xc0725df8 to 0xc0726000) [ 19.161529] 5de0: c0740 [ 19.170074] 5e00:
Re: [PATCH v2] gpio/omap: add *remove* callback in platform_driver
On Wed, Aug 8, 2012 at 7:33 PM, Shilimkar, Santosh wrote: > On Wed, Aug 8, 2012 at 7:28 PM, Tarun Kanti DebBarma > wrote: >> Add *remove* callback so that necessary cleanup operations are >> performed when device is unregistered. The device is deleted >> from the list and associated clock handle is released by >> calling clk_put() and irq descriptor is released using the >> irq_free_desc() api. >> >> Signed-off-by: Tarun Kanti DebBarma >> Reported-by: Paul Walmsley >> Reviewed-by: Jon Hunter >> Cc: Kevin Hilman >> Cc: Rajendra Nayak >> Cc: Santosh Shilimkar >> Cc: Cousson, Benoit >> Cc: Paul Walmsley >> --- >> v2: >> Baseline: >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git >> Commit: 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (Linux 3.6-rc1) >> >> (1) Use irq_free_descs() instead of irq_free_desc(). >> Besides, irq_free_desc() was using wrong parameter, >> irq_base, instead of bank->irq. >> (2) irq_free_descs() moved outside spin_lock/unlock_*() >> in order to avoid exception warnings. >> >> (3) pm_runtime_disable() added so that bind can happen successfully >> >> Test Detail: >> Step 1: Unbind gpio.5 device in order to invoke the *remove* callback. >> #echo "omap_gpio.5" > sys/bus/platform/drivers/omap_gpio/unbind >> >> Step 2: Bind gpio.5 device and confirm probe() for the device succeeds. >> #echo "omap_gpio.5" > sys/bus/platform/drivers/omap_gpio/bind >> >> Step 3: Execute read/write GPIO test case. >> > Thanks details about test. Whe you to "Unbind->bind", do > you see that PM is not broken. > > In other words, can you also test and ensure that the OMAP3 suspend and > CPUIDLE are not broken because of this patch. > PER and CORE domains should transition to low power states. Sure, I will do the PM test on OMAP3 and confirm this. --- Tarun > > Regards > Santosh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] gpio/omap: add *remove* callback in platform_driver
On Wed, Aug 8, 2012 at 7:33 PM, Shilimkar, Santosh santosh.shilim...@ti.com wrote: On Wed, Aug 8, 2012 at 7:28 PM, Tarun Kanti DebBarma tarun.ka...@ti.com wrote: Add *remove* callback so that necessary cleanup operations are performed when device is unregistered. The device is deleted from the list and associated clock handle is released by calling clk_put() and irq descriptor is released using the irq_free_desc() api. Signed-off-by: Tarun Kanti DebBarma tarun.ka...@ti.com Reported-by: Paul Walmsley p...@pwsan.com Reviewed-by: Jon Hunter jon-hun...@ti.com Cc: Kevin Hilman khil...@ti.com Cc: Rajendra Nayak rna...@ti.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Cousson, Benoit b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com --- v2: Baseline: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Commit: 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (Linux 3.6-rc1) (1) Use irq_free_descs() instead of irq_free_desc(). Besides, irq_free_desc() was using wrong parameter, irq_base, instead of bank-irq. (2) irq_free_descs() moved outside spin_lock/unlock_*() in order to avoid exception warnings. (3) pm_runtime_disable() added so that bind can happen successfully Test Detail: Step 1: Unbind gpio.5 device in order to invoke the *remove* callback. #echo omap_gpio.5 sys/bus/platform/drivers/omap_gpio/unbind Step 2: Bind gpio.5 device and confirm probe() for the device succeeds. #echo omap_gpio.5 sys/bus/platform/drivers/omap_gpio/bind Step 3: Execute read/write GPIO test case. Thanks details about test. Whe you to Unbind-bind, do you see that PM is not broken. In other words, can you also test and ensure that the OMAP3 suspend and CPUIDLE are not broken because of this patch. PER and CORE domains should transition to low power states. Sure, I will do the PM test on OMAP3 and confirm this. --- Tarun Regards Santosh -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] gpio/omap: add *remove* callback in platform_driver
On Wed, Aug 8, 2012 at 10:40 PM, Kevin Hilman khil...@ti.com wrote: Tarun Kanti DebBarma tarun.ka...@ti.com writes: Add *remove* callback so that necessary cleanup operations are performed when device is unregistered. The device is deleted from the list and associated clock handle is released by calling clk_put() and irq descriptor is released using the irq_free_desc() api. Signed-off-by: Tarun Kanti DebBarma tarun.ka...@ti.com Reported-by: Paul Walmsley p...@pwsan.com Reviewed-by: Jon Hunter jon-hun...@ti.com Cc: Kevin Hilman khil...@ti.com Cc: Rajendra Nayak rna...@ti.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Cousson, Benoit b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com --- v2: Baseline: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Commit: 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (Linux 3.6-rc1) (1) Use irq_free_descs() instead of irq_free_desc(). Besides, irq_free_desc() was using wrong parameter, irq_base, instead of bank-irq. (2) irq_free_descs() moved outside spin_lock/unlock_*() in order to avoid exception warnings. (3) pm_runtime_disable() added so that bind can happen successfully Test Detail: Step 1: Unbind gpio.5 device in order to invoke the *remove* callback. #echo omap_gpio.5 sys/bus/platform/drivers/omap_gpio/unbind Step 2: Bind gpio.5 device and confirm probe() for the device succeeds. #echo omap_gpio.5 sys/bus/platform/drivers/omap_gpio/bind Step 3: Execute read/write GPIO test case. What happens when GPIOs are in use (requested)? If I try to unbind a currently active GPIO bank then I see an exception after the irq descriptor is freed by the remove. I believe this is expected because interrupt raised by the system would not be handled. [ 18.859405] irq_free_descs: calling free_desc(192)... [ 18.866180] irq_free_descs: calling free_desc(192)... [ 18.872680] irq_free_descs: calling free_desc(192)... [ 18.877990] irq_free_descs: calling free_desc(192)... [ 18.883270] irq_free_descs: calling free_desc(192)... [ 18.888549] irq_free_descs: calling free_desc(192)... [ 18.893859] irq_free_descs: calling free_desc(192)... [ 18.899139] irq_free_descs: calling free_desc(192)... [ 18.904418] irq_free_descs: calling free_desc(192)... [ 18.909729] irq_free_descs: calling free_desc(192)... [ 18.915008] irq_free_descs: calling free_desc(192)... [ 18.920288] irq_free_descs: calling free_desc(192)... [ 18.925598] irq_free_descs: calling free_desc(192)... [ 18.930877] irq_free_descs: calling free_desc(192)... [ 18.936157] irq_free_descs: calling free_desc(192)... [ 18.941467] irq_free_descs: calling free_desc(192)... [ 18.946746] irq_free_descs: calling free_desc(192)... [ 18.952026] irq_free_descs: calling free_desc(192)... [ 18.957336] irq_free_descs: calling free_desc(192)... [ 18.962615] irq_free_descs: calling free_desc(192)... [ 18.967895] irq_free_descs: calling free_desc(192)... [ 18.973205] irq_free_descs: calling free_desc(192)... [ 18.978485] irq_free_descs: calling free_desc(192)... [ 18.983764] irq_free_descs: calling free_desc(192)... [ 18.989074] irq_free_descs: calling free_desc(192)... [ 18.994354] irq_free_descs: calling free_desc(192)... [ 18.999633] irq_free_descs: calling free_desc(192)... [ 19.004913] irq_free_descs: calling free_desc(192)... [ 19.010223] irq_free_descs: calling free_desc(192)... [ 19.015502] irq_free_descs: calling free_desc(192)... [ 19.020782] irq_free_descs: calling free_desc(192)... [ 19.026092] irq_free_descs: calling free_desc(192)... [ 19.032440] irq 194, desc: c072f340, depth: 1, count: 0, unhandled: 0 [ 19.039154] -handle_irq(): c00a3e08, handle_bad_irq+0x0/0x260 [ 19.045379] -irq_data.chip(): c078ff7c, no_irq_chip+0x0/0x5c [ 19.051391] -action(): ef0d42c0 [ 19.054748] -action-handler(): c0399ee0, ks8851_irq+0x0/0x1c [ 19.060852]IRQ_NOPROBE set [ 19.064056] IRQ_NOREQUEST set [ 19.067230] Unable to handle kernel paging request at virtual address 203a6c9 [ 19.074768] pgd = c0004000 [ 19.077606] [203a6c99] *pgd= [ 19.081329] Internal error: Oops: 5 [#1] SMP ARM [ 19.086151] Modules linked in: [ 19.089355] CPU: 0Not tainted (3.6.0-rc1-3-g43a916d-dirty #885) [ 19.096374] PC is at gpio_irq_handler+0x7c/0x26c [ 19.101165] LR is at handle_bad_irq+0x1cc/0x260 [ 19.105895] pc : [c02e13b0]lr : [c00a3fd4]psr: 6093 [ 19.105895] sp : c0725df8 ip : 6fc6 fp : 0001 [ 19.117889] r10: r9 : fa05502c r8 : 0020 [ 19.123352] r7 : r6 : r5 : r4 : ef0bbe10 [ 19.130157] r3 : ef0c1980 r2 : 203a6c65 r1 : 0034 r0 : [ 19.136993] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kel [ 19.144714] Control: 10c53c7d Table: ae89804a DAC: 0017 [ 19.150695] Process swapper/0 (pid: 0, stack limit = 0xc07242f8) [ 19.156982] Stack: (0xc0725df8 to 0xc0726000) [ 19.161529]
Re: [GPIO] Crashed when not using
Sourav, On Mon, Jul 30, 2012 at 2:13 PM, Poddar, Sourav wrote: > Hi All, > > I tried using gpio as an interrupt line for my driver > (drivers/staging/iio/light/tsl2x7x_core.c) for omap5. > The interrupt line number was directly passed to the driver using > device tree. But what I observed > is the following crash.. > > > [1.599273] mousedev: PS/2 mouse device common for all mice > [1.607513] i2c /dev entries driver > [1.613739] Driver for 1-wire Dallas network protocol. > [1.622650] usbcore: registered new interface driver usbhid > [1.628540] usbhid: USB HID core driver > [1.633728] Unhandled fault: imprecise external abort (0x1406) at > 0x > [1.641113] Internal error: : 1406 [#1] SMP ARM > [1.645874] Modules linked in: > [1.649078] CPU: 0Not tainted (3.5.0-02045-g0b474d6-dirty #415) > [1.655761] PC is at _set_gpio_triggering+0x44/0x264 > [1.660980] LR is at gpio_irq_type+0xb8/0x160 > [1.665527] pc : []lr : []psr: 6093 > [1.665527] sp : dc851df0 ip : c07a8f00 fp : > [1.677581] r10: 0081 r9 : r8 : dc8ffc10 > [1.683074] r7 : 2093 r6 : r5 : 0001 r4 : fa05b000 > [1.689910] r3 : dc8ffc10 r2 : 0002 r1 : 0002 r0 : 0140 > [1.696746] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM > Segment kernel > [1.704528] Control: 10c53c7d Table: 8000406a DAC: 0017 > [1.710540] Process swapper/0 (pid: 1, stack limit = 0xdc8502f8) > [1.716857] Stack: (0xdc851df0 to 0xdc852000) > [1.721405] 1de0: 0002 > c0731280 dc8ffc6c 2093 > [1.730010] 1e00: c02dc224 c0731280 dc8d4980 c07a8e50 > 0141 0002 c00a37b8 > [1.738586] 1e20: 2002 c0731280 dc8d4980 0141 c07312d4 > c07312b4 4013 c00a3d7c > [1.747161] 1e40: 0141 c06728c0 c0090578 c247f000 > c00a2d5c c0412258 0141 > [1.755737] 1e60: c0731280 c0537818 dc8d4980 c00a3fe4 c07bf6a0 > 2002 c071bed8 c247f000 > [1.764312] 1e80: dc9df000 0004 c07bf6a0 dc9df020 c247f3c0 > c04ea344 c06728c0 c247f000 > [1.772888] 1ea0: 09090578 c07bf6a0 dc9df004 dc9df000 > c04ea194 0091 c071bed8 > [1.781494] 1ec0: c06f89f4 c03e13c0 c03e1314 dc9df020 c0d1afd8 > dc9df054 c07bf60c c03272ac > [1.790069] 1ee0: dc9df020 c07bf60c dc9df054 0091 > c03274c0 c07bf60c dc851f08 > [1.798645] 1f00: c032742c c0325b10 dc8f26a8 dc9ef790 > c07bf60c c07bcea8 c243d6c0 > [1.807220] 1f20: c0326240 c0672958 c02bce08 c07bf5e4 > c07bf60c c03e12a0 > [1.815795] 1f40: 0091 c071bed8 c06f89f4 c0327ab0 c07bf5e4 > 0007 c07c8c40 > [1.824401] 1f60: 0091 c03e1738 dc85 0007 > c0008648 c112c9f0 > [1.832977] 1f80: c06a6d58 c06f89f4 0001 6013 c06694c8 > 0006 0006 > [1.841552] 1fa0: 6013 c0700a20 0007 c07c8c40 c06d020c > 0091 c071bed8 c0700a28 > [1.850128] 1fc0: c06d0380 0006 0006 c06d020c > c06d028c > [1.858703] 1fe0: c001548c 0013 > c001548c 3f3f3f3f 3f3f3f3f > [1.867309] [] (_set_gpio_triggering+0x44/0x264) from > [] (gpio_irq_type+0x0/0x160) > [1.877075] [] (gpio_irq_type+0x0/0x160) from [<2002>] > (0x2002) > [1.884552] Code: e3120008 11816006 01c66001 e7846000 (e593c0fc) > [1.890960] [ cut here ] > [1.895812] WARNING: at arch/arm/mach-omap2/omap_l3_noc.c:113 > l3_interrupt_handler+0x184/0x1bc() > [1.905029] L3 custom error: MASTER:MPU TARGET:L4 PER2 > [1.910430] Modules linked in: > [1.913635] [] (unwind_backtrace+0x0/0xf4) from > [] (warn_slowpath_common+0x4c/0x64) > [1.923492] [] (warn_slowpath_common+0x4c/0x64) from > [] (warn_slowpath_fmt+0x30/0x40) > [1.933563] [] (warn_slowpath_fmt+0x30/0x40) from > [] (l3_interrupt_handler+0x184/0x1bc) > [1.943786] [] (l3_interrupt_handler+0x184/0x1bc) from > [] (handle_irq_event_percpu+0x64/0x24c) > [1.954650] [] (handle_irq_event_percpu+0x64/0x24c) from > [] (handle_irq_event+0x3c/0x5c) > [1.964965] [] (handle_irq_event+0x3c/0x5c) from > [] (handle_fasteoi_irq+0x98/0x13c) > [1.974822] [] (handle_fasteoi_irq+0x98/0x13c) from > [] (generic_handle_irq+0x34/0x44) > [1.984863] [] (generic_handle_irq+0x34/0x44) from > [] (handle_IRQ+0x4c/0xac) > [1.994110] [] (handle_IRQ+0x4c/0xac) from [] > (gic_handle_irq+0x2c/0x60) > [2.002960] [] (gic_handle_irq+0x2c/0x60) from > [] (__irq_svc+0x44/0x60) > [2.011718] Exception stack(0xdc851c48 to 0xdc851c90) > [2.017028] 1c40: c07a87a0 dc851c80 > c0743f80 dc851da8 > [2.025604] 1c60: 0001 0001 dc851cd7 c02dbb6a > c02dbb6c dc851c90 > [2.034179] 1c80: c04f2440 c04f2444 6113 > [2.039489] [] (__irq_svc+0x44/0x60) from [] > (_raw_spin_unlock_irq+0x28/0x2c)
Re: [GPIO] Crashed when not using
Sourav, On Mon, Jul 30, 2012 at 2:13 PM, Poddar, Sourav sourav.pod...@ti.com wrote: Hi All, I tried using gpio as an interrupt line for my driver (drivers/staging/iio/light/tsl2x7x_core.c) for omap5. The interrupt line number was directly passed to the driver using device tree. But what I observed is the following crash.. [1.599273] mousedev: PS/2 mouse device common for all mice [1.607513] i2c /dev entries driver [1.613739] Driver for 1-wire Dallas network protocol. [1.622650] usbcore: registered new interface driver usbhid [1.628540] usbhid: USB HID core driver [1.633728] Unhandled fault: imprecise external abort (0x1406) at 0x [1.641113] Internal error: : 1406 [#1] SMP ARM [1.645874] Modules linked in: [1.649078] CPU: 0Not tainted (3.5.0-02045-g0b474d6-dirty #415) [1.655761] PC is at _set_gpio_triggering+0x44/0x264 [1.660980] LR is at gpio_irq_type+0xb8/0x160 [1.665527] pc : [c02dbb68]lr : [c02dc2dc]psr: 6093 [1.665527] sp : dc851df0 ip : c07a8f00 fp : [1.677581] r10: 0081 r9 : r8 : dc8ffc10 [1.683074] r7 : 2093 r6 : r5 : 0001 r4 : fa05b000 [1.689910] r3 : dc8ffc10 r2 : 0002 r1 : 0002 r0 : 0140 [1.696746] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [1.704528] Control: 10c53c7d Table: 8000406a DAC: 0017 [1.710540] Process swapper/0 (pid: 1, stack limit = 0xdc8502f8) [1.716857] Stack: (0xdc851df0 to 0xdc852000) [1.721405] 1de0: 0002 c0731280 dc8ffc6c 2093 [1.730010] 1e00: c02dc224 c0731280 dc8d4980 c07a8e50 0141 0002 c00a37b8 [1.738586] 1e20: 2002 c0731280 dc8d4980 0141 c07312d4 c07312b4 4013 c00a3d7c [1.747161] 1e40: 0141 c06728c0 c0090578 c247f000 c00a2d5c c0412258 0141 [1.755737] 1e60: c0731280 c0537818 dc8d4980 c00a3fe4 c07bf6a0 2002 c071bed8 c247f000 [1.764312] 1e80: dc9df000 0004 c07bf6a0 dc9df020 c247f3c0 c04ea344 c06728c0 c247f000 [1.772888] 1ea0: 09090578 c07bf6a0 dc9df004 dc9df000 c04ea194 0091 c071bed8 [1.781494] 1ec0: c06f89f4 c03e13c0 c03e1314 dc9df020 c0d1afd8 dc9df054 c07bf60c c03272ac [1.790069] 1ee0: dc9df020 c07bf60c dc9df054 0091 c03274c0 c07bf60c dc851f08 [1.798645] 1f00: c032742c c0325b10 dc8f26a8 dc9ef790 c07bf60c c07bcea8 c243d6c0 [1.807220] 1f20: c0326240 c0672958 c02bce08 c07bf5e4 c07bf60c c03e12a0 [1.815795] 1f40: 0091 c071bed8 c06f89f4 c0327ab0 c07bf5e4 0007 c07c8c40 [1.824401] 1f60: 0091 c03e1738 dc85 0007 c0008648 c112c9f0 [1.832977] 1f80: c06a6d58 c06f89f4 0001 6013 c06694c8 0006 0006 [1.841552] 1fa0: 6013 c0700a20 0007 c07c8c40 c06d020c 0091 c071bed8 c0700a28 [1.850128] 1fc0: c06d0380 0006 0006 c06d020c c06d028c [1.858703] 1fe0: c001548c 0013 c001548c 3f3f3f3f 3f3f3f3f [1.867309] [c02dbb68] (_set_gpio_triggering+0x44/0x264) from [c02dc224] (gpio_irq_type+0x0/0x160) [1.877075] [c02dc224] (gpio_irq_type+0x0/0x160) from [2002] (0x2002) [1.884552] Code: e3120008 11816006 01c66001 e7846000 (e593c0fc) [1.890960] [ cut here ] [1.895812] WARNING: at arch/arm/mach-omap2/omap_l3_noc.c:113 l3_interrupt_handler+0x184/0x1bc() [1.905029] L3 custom error: MASTER:MPU TARGET:L4 PER2 [1.910430] Modules linked in: [1.913635] [c001bd5c] (unwind_backtrace+0x0/0xf4) from [c00414c4] (warn_slowpath_common+0x4c/0x64) [1.923492] [c00414c4] (warn_slowpath_common+0x4c/0x64) from [c0041570] (warn_slowpath_fmt+0x30/0x40) [1.933563] [c0041570] (warn_slowpath_fmt+0x30/0x40) from [c0035de4] (l3_interrupt_handler+0x184/0x1bc) [1.943786] [c0035de4] (l3_interrupt_handler+0x184/0x1bc) from [c00a28b8] (handle_irq_event_percpu+0x64/0x24c) [1.954650] [c00a28b8] (handle_irq_event_percpu+0x64/0x24c) from [c00a2adc] (handle_irq_event+0x3c/0x5c) [1.964965] [c00a2adc] (handle_irq_event+0x3c/0x5c) from [c00a56a8] (handle_fasteoi_irq+0x98/0x13c) [1.974822] [c00a56a8] (handle_fasteoi_irq+0x98/0x13c) from [c00a235c] (generic_handle_irq+0x34/0x44) [1.984863] [c00a235c] (generic_handle_irq+0x34/0x44) from [c00153a0] (handle_IRQ+0x4c/0xac) [1.994110] [c00153a0] (handle_IRQ+0x4c/0xac) from [c0008480] (gic_handle_irq+0x2c/0x60) [2.002960] [c0008480] (gic_handle_irq+0x2c/0x60) from [c04f26e4] (__irq_svc+0x44/0x60) [2.011718] Exception stack(0xdc851c48 to 0xdc851c90) [2.017028] 1c40: c07a87a0 dc851c80 c0743f80 dc851da8 [2.025604] 1c60: 0001 0001 dc851cd7 c02dbb6a c02dbb6c dc851c90 [2.034179] 1c80:
Re: [PATCH 1/2] gpio/omap: move bank->dbck initialization to omap_gpio_mod_init()
On Wed, Jul 11, 2012 at 11:21 PM, Paul Walmsley wrote: > On Wed, 11 Jul 2012, Tarun Kanti DebBarma wrote: > >> Since the bank->dbck initialization in a one time operation there >> is no need to keep this within gpio_debounce(). Therefore, moving >> clk_get(bank->dbck) to omap_gpio_mod_init(). Since the value of >> bank->dbck would be NULL at the beginning, this check has been >> removed. >> >> Signed-off-by: Tarun Kanti DebBarma >> Reported-by: Paul Walmsley >> Reviewed-by: Jon Hunter >> Cc: Kevin Hilman >> Cc: Rajendra Nayak >> Cc: Santosh Shilimkar >> Cc: Cousson, Benoit >> Cc: Paul Walmsley >> --- >> drivers/gpio/gpio-omap.c | 10 -- >> 1 files changed, 4 insertions(+), 6 deletions(-) > > Reviewed-by: Paul Walmsley > > These drivers are maintained by Grant Likely and Linus Walleij: > > GPIO SUBSYSTEM > M: Grant Likely > M: Linus Walleij > S: Maintained > T: git git://git.secretlab.ca/git/linux-2.6.git > F: Documentation/gpio.txt > F: drivers/gpio/ > F: include/linux/gpio* > > So you'll want to cc them. They are probably also who should merge these. Ok, I wanted Kevin to have a look first. Anyways, I have cc'ed. Thanks. -- Tarun > > > - Paul -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] gpio/omap: move bank-dbck initialization to omap_gpio_mod_init()
On Wed, Jul 11, 2012 at 11:21 PM, Paul Walmsley p...@pwsan.com wrote: On Wed, 11 Jul 2012, Tarun Kanti DebBarma wrote: Since the bank-dbck initialization in a one time operation there is no need to keep this within gpio_debounce(). Therefore, moving clk_get(bank-dbck) to omap_gpio_mod_init(). Since the value of bank-dbck would be NULL at the beginning, this check has been removed. Signed-off-by: Tarun Kanti DebBarma tarun.ka...@ti.com Reported-by: Paul Walmsley p...@pwsan.com Reviewed-by: Jon Hunter jon-hun...@ti.com Cc: Kevin Hilman khil...@ti.com Cc: Rajendra Nayak rna...@ti.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Cousson, Benoit b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com --- drivers/gpio/gpio-omap.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) Reviewed-by: Paul Walmsley p...@pwsan.com These drivers are maintained by Grant Likely and Linus Walleij: GPIO SUBSYSTEM M: Grant Likely grant.lik...@secretlab.ca M: Linus Walleij linus.wall...@stericsson.com S: Maintained T: git git://git.secretlab.ca/git/linux-2.6.git F: Documentation/gpio.txt F: drivers/gpio/ F: include/linux/gpio* So you'll want to cc them. They are probably also who should merge these. Ok, I wanted Kevin to have a look first. Anyways, I have cc'ed. Thanks. -- Tarun - Paul -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/