Non-booting G5
David Gibson
dwg at au1.ibm.com
Wed Aug 31 14:34:05 EST 2005
On Tue, Aug 30, 2005 at 11:11:00AM -0700, Linus Torvalds wrote:
>
> This commit causes my G5 to not boot at all. It just hangs very early on
> in the boot sequence.
>
> The good news is that I used this bug to verify (and fix an off-by-one
> error) the git bisection thing. The previous commit works fine ("ppc64:
> Check of_chosen..")
>
> I won't have time to test anything else, since my flight to Italy leaves
> in a couple of hours, but hopefully this is enough for people to start on.
>
> I don't have anything strange in my config, but I'm appending that as a
> gzipped attachment in case people care.
Fix bug in ppc64 dynamic hugepage support
I'm an idiot. In adjusting the logic for SLB miss for the dynamic
hugepage stuff, I messed up the !CONFIG_HUGETLB_PAGE case, failing to
set the SLB flags properly.
This patch fixes it. It also streamlines the logic for the
CONFIG_HUGETLB_PAGE case (removing a couple of branches) while we're
at it.
Booted, and roughly tested on POWER5 (with and without
CONFIG_HUGETLB_PAGE), iSeries/RS64 (no hugepage available), and G5
(with and without CONFIG_HUGETLB_PAGE).
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
Index: working-2.6/arch/ppc64/mm/slb_low.S
===================================================================
--- working-2.6.orig/arch/ppc64/mm/slb_low.S 2005-08-31 13:46:45.000000000 +1000
+++ working-2.6/arch/ppc64/mm/slb_low.S 2005-08-31 13:46:45.000000000 +1000
@@ -97,25 +97,21 @@
lhz r9,PACAHIGHHTLBAREAS(r13)
srdi r11,r3,(HTLB_AREA_SHIFT-SID_SHIFT)
srd r9,r9,r11
- andi. r9,r9,1
- bne 5f
+ lhz r11,PACALOWHTLBAREAS(r13)
+ srd r11,r11,r3
+ or r9,r9,r11
+END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE)
+#endif /* CONFIG_HUGETLB_PAGE */
li r11,SLB_VSID_USER
- cmpldi r3,16
- bge 6f
-
- lhz r9,PACALOWHTLBAREAS(r13)
- srd r9,r9,r3
- andi. r9,r9,1
-
- beq 6f
-
-5: li r11,SLB_VSID_USER|SLB_VSID_L
+#ifdef CONFIG_HUGETLB_PAGE
+BEGIN_FTR_SECTION
+ rldimi r11,r9,8,55 /* shift masked bit into SLB_VSID_L */
END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE)
#endif /* CONFIG_HUGETLB_PAGE */
-6: ld r9,PACACONTEXTID(r13)
+ ld r9,PACACONTEXTID(r13)
rldimi r3,r9,USER_ESID_BITS,0
9: /* r3 = protovsid, r11 = flags, r10 = esid_data, cr7 = <>KERNELBASE */
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/people/dgibson
More information about the Linuxppc64-dev
mailing list