[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    powerpc/pmac: Don't register pmac PIC syscore ops when HW not present
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2011-05-31 11:59:01
Message-ID: 201105311159.p4VBx1bi028168 () hera ! kernel ! org
[Download RAW message or body]

Gitweb:     http://git.kernel.org/linus/339dedf709e21d5718d6596750166f70e8bed40a
Commit:     339dedf709e21d5718d6596750166f70e8bed40a
Parent:     55922c9d1b84b89cb946c777fddccb3247e7df2c
Author:     Benjamin Herrenschmidt <benh@kernel.crashing.org>
AuthorDate: Tue May 31 18:01:23 2011 +1000
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Tue May 31 20:30:20 2011 +0900

    powerpc/pmac: Don't register pmac PIC syscore ops when HW not present
    
    The Apple custom PIC only exist in some earlier machine models,
    anything with an MPIC will crash on suspend if we register those
    syscore ops unconditionally.
    
    This is a regression caused by commit f5a592f7d74e ("PM / PowerPC: Use
    struct syscore_ops instead of sysdevs for PM")
    
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 arch/powerpc/platforms/powermac/pic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 9089b04..7667db4 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -715,7 +715,8 @@ static struct syscore_ops pmacpic_syscore_ops = {
 
 static int __init init_pmacpic_syscore(void)
 {
-	register_syscore_ops(&pmacpic_syscore_ops);
+	if (pmac_irq_hw[0])
+		register_syscore_ops(&pmacpic_syscore_ops);
 	return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic