powerpc: Get the number of SLBs from "slb-size" property

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, January 16, 2009 - 10:00 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b60c31...
Commit:     b60c31d85a2a2f1a9c8623f1fb56e2688aa1e2b1
Parent:     9ba0fdbfaed2e74005d87fab948c5522b86ff733
Author:     Michael Neuling <mikey@neuling.org>
AuthorDate: Wed Jan 14 13:42:41 2009 +0000
Committer:  Benjamin Herrenschmidt <benh@kernel.crashing.org>
CommitDate: Fri Jan 16 16:15:16 2009 +1100

    powerpc: Get the number of SLBs from "slb-size" property
    
    The PAPR says that the property for specifying the number of SLBs should
    be called "slb-size".  We currently only look for "ibm,slb-size" because
    this is what firmware actually presents.
    
    This patch makes us look for the "slb-size" property as well and in
    preference to the "ibm,slb-size".  This should future proof us if
    firmware changes to match PAPR.
    
    Signed-off-by: Michael Neuling <mikey@neuling.org>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/prom.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index c09cffa..f00f831 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -590,6 +590,11 @@ static void __init check_cpu_slb_size(unsigned long node)
 {
 	u32 *slb_size_ptr;
 
+	slb_size_ptr = of_get_flat_dt_prop(node, "slb-size", NULL);
+	if (slb_size_ptr != NULL) {
+		mmu_slb_size = *slb_size_ptr;
+		return;
+	}
 	slb_size_ptr = of_get_flat_dt_prop(node, "ibm,slb-size", NULL);
 	if (slb_size_ptr != NULL) {
 		mmu_slb_size = *slb_size_ptr;
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
powerpc: Get the number of SLBs from "slb-size" property, Linux Kernel Mailing ..., (Fri Jan 16, 10:00 am)