]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: make iSeries boot again
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 11 Oct 2005 09:40:20 +0000 (19:40 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Oct 2005 00:58:00 +0000 (10:58 +1000)
On ARCH=ppc64 we were getting htab_hash_mask recalculated
to the correct value for our particular machine by accident.
In the merge tree, that code was commented out, so htab_hash_mask
was being corrupted.

We now set ppc64_pft_size instead which gets htab_has_mask
calculated correctly for us later.  We should put an
ibm,pft-size property in the device tree at some point.

Also set -mno-minimal-toc in some makefiles.
Allow iSeries to configure PROC_DEVICETREE.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
arch/powerpc/Kconfig
arch/powerpc/mm/Makefile
arch/powerpc/platforms/iseries/Makefile
arch/powerpc/platforms/iseries/setup.c

index 330376b74c877086a15b98da3623655dd9de95b6..cd55c9b0f7ea69b27cc86477847f12805a4cf9f8 100644 (file)
@@ -570,7 +570,7 @@ config SCHED_SMT
 
 config PROC_DEVICETREE
        bool "Support for Open Firmware device tree in /proc"
-       depends on PPC_OF && PROC_FS
+       depends on (PPC_OF || PPC_ISERIES) && PROC_FS
        help
          This option adds a device-tree directory under /proc which contains
          an image of the device tree that the kernel copies from Open
index 612bc4ec72b1e1ec23e094ca7fd3517fe783d6a2..14b2ffb6c2d85ad4f883d188ce9fd635584eba00 100644 (file)
@@ -2,6 +2,10 @@
 # Makefile for the linux ppc-specific parts of the memory manager.
 #
 
+ifeq ($(CONFIG_PPC64),y)
+EXTRA_CFLAGS   += -mno-minimal-toc
+endif
+
 obj-y                          := fault.o mem.o lmb.o
 obj-$(CONFIG_PPC32)            += init_32.o pgtable_32.o mmu_context_32.o \
                                   tlb_32.o
index 18bf4007756105cdbe023a022fe8b1a9c39475f8..127b465308be80e86ec72a46c3b9538533777a9c 100644 (file)
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS   += -mno-minimal-toc
+
 obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
        hvcall.o proc.o htab.o iommu.o misc.o
 obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o
index c3e532b766ef3b84f126babbb36672abba52d092..b6cf050a8c27d7147b3aa84d76b2f75b08bf873b 100644 (file)
@@ -430,7 +430,6 @@ static void __init build_iSeries_Memory_Map(void)
        u32 loadAreaFirstChunk, loadAreaLastChunk, loadAreaSize;
        u32 nextPhysChunk;
        u32 hptFirstChunk, hptLastChunk, hptSizeChunks, hptSizePages;
-       u32 num_ptegs;
        u32 totalChunks,moreChunks;
        u32 currChunk, thisChunk, absChunk;
        u32 currDword;
@@ -493,10 +492,7 @@ static void __init build_iSeries_Memory_Map(void)
        printk("HPT absolute addr = %016lx, size = %dK\n",
                        chunk_to_addr(hptFirstChunk), hptSizeChunks * 256);
 
-       /* Fill in the hashed page table hash mask */
-       num_ptegs = hptSizePages *
-               (PAGE_SIZE / (sizeof(hpte_t) * HPTES_PER_GROUP));
-       htab_hash_mask = num_ptegs - 1;
+       ppc64_pft_size = __ilog2(hptSizePages * PAGE_SIZE);
 
        /*
         * The actual hashed page table is in the hypervisor,