提交 3a5f8c5f 编写于 作者: S Stephen Rothwell

powerpc: make iSeries boot again

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: NStephen Rothwell <sfr@canb.auug.org.au>
上级 f255f0dd
...@@ -570,7 +570,7 @@ config SCHED_SMT ...@@ -570,7 +570,7 @@ config SCHED_SMT
config PROC_DEVICETREE config PROC_DEVICETREE
bool "Support for Open Firmware device tree in /proc" bool "Support for Open Firmware device tree in /proc"
depends on PPC_OF && PROC_FS depends on (PPC_OF || PPC_ISERIES) && PROC_FS
help help
This option adds a device-tree directory under /proc which contains This option adds a device-tree directory under /proc which contains
an image of the device tree that the kernel copies from Open an image of the device tree that the kernel copies from Open
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
# Makefile for the linux ppc-specific parts of the memory manager. # 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-y := fault.o mem.o lmb.o
obj-$(CONFIG_PPC32) += init_32.o pgtable_32.o mmu_context_32.o \ obj-$(CONFIG_PPC32) += init_32.o pgtable_32.o mmu_context_32.o \
tlb_32.o tlb_32.o
......
EXTRA_CFLAGS += -mno-minimal-toc
obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
hvcall.o proc.o htab.o iommu.o misc.o hvcall.o proc.o htab.o iommu.o misc.o
obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o
......
...@@ -430,7 +430,6 @@ static void __init build_iSeries_Memory_Map(void) ...@@ -430,7 +430,6 @@ static void __init build_iSeries_Memory_Map(void)
u32 loadAreaFirstChunk, loadAreaLastChunk, loadAreaSize; u32 loadAreaFirstChunk, loadAreaLastChunk, loadAreaSize;
u32 nextPhysChunk; u32 nextPhysChunk;
u32 hptFirstChunk, hptLastChunk, hptSizeChunks, hptSizePages; u32 hptFirstChunk, hptLastChunk, hptSizeChunks, hptSizePages;
u32 num_ptegs;
u32 totalChunks,moreChunks; u32 totalChunks,moreChunks;
u32 currChunk, thisChunk, absChunk; u32 currChunk, thisChunk, absChunk;
u32 currDword; u32 currDword;
...@@ -493,10 +492,7 @@ static void __init build_iSeries_Memory_Map(void) ...@@ -493,10 +492,7 @@ static void __init build_iSeries_Memory_Map(void)
printk("HPT absolute addr = %016lx, size = %dK\n", printk("HPT absolute addr = %016lx, size = %dK\n",
chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); chunk_to_addr(hptFirstChunk), hptSizeChunks * 256);
/* Fill in the hashed page table hash mask */ ppc64_pft_size = __ilog2(hptSizePages * PAGE_SIZE);
num_ptegs = hptSizePages *
(PAGE_SIZE / (sizeof(hpte_t) * HPTES_PER_GROUP));
htab_hash_mask = num_ptegs - 1;
/* /*
* The actual hashed page table is in the hypervisor, * The actual hashed page table is in the hypervisor,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册