public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] ARM: arch_timer: Don't expect both secure and nonsecure PPI IRQ info
@ 2013-01-18 12:23 Rajendra Nayak
  2013-01-18 13:13 ` Marc Zyngier
  0 siblings, 1 reply; 3+ messages in thread
From: Rajendra Nayak @ 2013-01-18 12:23 UTC (permalink / raw)
  To: linux-arm-kernel

The current logic expects platforms to pass information about *both*
secure and nonsecure PPI IRQ. Make arch_timer work even when either one
of those are provided instead.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/kernel/arch_timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
index c8ef207..59e1e26 100644
--- a/arch/arm/kernel/arch_timer.c
+++ b/arch/arm/kernel/arch_timer.c
@@ -495,7 +495,7 @@ int __init arch_timer_of_register(void)
 	if (!arch_timer_ppi[VIRT_PPI]) {
 		arch_timer_use_virtual = false;
 
-		if (!arch_timer_ppi[PHYS_SECURE_PPI] ||
+		if (!arch_timer_ppi[PHYS_SECURE_PPI] &&
 		    !arch_timer_ppi[PHYS_NONSECURE_PPI]) {
 			pr_warn("arch_timer: No interrupt available, giving up\n");
 			return -EINVAL;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: arch_timer: Don't expect both secure and nonsecure PPI IRQ info
  2013-01-18 12:23 [PATCH] ARM: arch_timer: Don't expect both secure and nonsecure PPI IRQ info Rajendra Nayak
@ 2013-01-18 13:13 ` Marc Zyngier
  2013-01-18 13:28   ` Rajendra Nayak
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2013-01-18 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

On 18/01/13 12:23, Rajendra Nayak wrote:

Hi Rajendra,

> The current logic expects platforms to pass information about *both*
> secure and nonsecure PPI IRQ. Make arch_timer work even when either one
> of those are provided instead.

I'm afraid this patch doesn't really solve the problem. The DT binding
cannot express having only the virtual interrupt, or only the non-secure
physical interrupt. This patch only works in the case where you only
have the secure physical interrupt.

I think the real fix should be to make all the interrupts mandatory in
the DT (they do exist in the HW), and make the code less tolerant of
broken DTs.

Cheers,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: arch_timer: Don't expect both secure and nonsecure PPI IRQ info
  2013-01-18 13:13 ` Marc Zyngier
@ 2013-01-18 13:28   ` Rajendra Nayak
  0 siblings, 0 replies; 3+ messages in thread
From: Rajendra Nayak @ 2013-01-18 13:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 18 January 2013 06:43 PM, Marc Zyngier wrote:
> I think the real fix should be to make all the interrupts mandatory in
> the DT (they do exist in the HW), and make the code less tolerant of
> broken DTs.

Got it, thanks Mark. Time for me to go fix the OMAP5 broken DT then.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-18 13:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 12:23 [PATCH] ARM: arch_timer: Don't expect both secure and nonsecure PPI IRQ info Rajendra Nayak
2013-01-18 13:13 ` Marc Zyngier
2013-01-18 13:28   ` Rajendra Nayak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox