]> git.neil.brown.name Git - history.git/commitdiff
PPC32: Define default settings for advanced config options.
authorTom Rini <trini@kernel.crashing.org>
Fri, 8 Nov 2002 08:56:17 +0000 (19:56 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 8 Nov 2002 08:56:17 +0000 (19:56 +1100)
This simplifies the C code by removing some #ifdefs.

arch/ppc/Kconfig
arch/ppc/Makefile
arch/ppc/mm/init.c

index dc67db5fa23a9b02825c5d2cd71141c30d2baa5f..529b0910ed97d7046ba59acaaae96f4eeb219c6c 100644 (file)
@@ -1209,6 +1209,9 @@ config ADVANCED_OPTIONS
 
          Unless you know what you are doing, say N here.
 
+comment "Default settings for advanced configuration options are used"
+       depends on !ADVANCED_OPTIONS
+
 config HIGHMEM_START_BOOL
        bool "Set high memory pool address"
        depends on ADVANCED_OPTIONS && HIGHMEM
@@ -1224,6 +1227,11 @@ config HIGHMEM_START
        depends on HIGHMEM_START_BOOL
        default "0xfe000000"
 
+config HIGHMEM_START
+       hex
+       depends on !HIGHMEM_START_BOOL
+       default "0xfe000000"
+
 config LOWMEM_SIZE_BOOL
        bool "Set maximum low memory"
        depends on ADVANCED_OPTIONS && HIGHMEM
@@ -1241,6 +1249,11 @@ config LOWMEM_SIZE
        depends on LOWMEM_SIZE_BOOL
        default "0x20000000"
 
+config LOWMEM_SIZE
+       hex
+       depends on !LOWMEM_SIZE_BOOL
+       default "0x20000000"
+
 config KERNEL_START_BOOL
        bool "Set custom kernel base address"
        depends on ADVANCED_OPTIONS
@@ -1257,6 +1270,11 @@ config KERNEL_START
        depends on KERNEL_START_BOOL
        default "0xc0000000"
 
+config KERNEL_START
+       hex
+       depends on !KERNEL_START_BOOL
+       default "0xc0000000"
+
 config TASK_SIZE_BOOL
        bool "Set custom user task size"
        depends on ADVANCED_OPTIONS
@@ -1272,6 +1290,11 @@ config TASK_SIZE
        depends on TASK_SIZE_BOOL
        default "0x80000000"
 
+config TASK_SIZE
+       hex
+       depends on !TASK_SIZE_BOOL
+       default "0x80000000"
+
 config PIN_TLB
        bool "Pinned Kernel TLBs (860 ONLY)"
        depends on ADVANCED_OPTIONS && 8xx
index 012375eaf652c1ba6bcc54b8d6fc9c1b35514d0f..0f2077bd6ef816bf2cce21ebd110bda6595c4991 100644 (file)
 # Rewritten by Cort Dougan and Paul Mackerras
 #
 
-# Be sure to change PAGE_OFFSET in include/asm-ppc/page.h to match
-ifdef CONFIG_KERNEL_START_BOOL
+# This must match PAGE_OFFSET in include/asm-ppc/page.h.
 KERNELLOAD     =$(CONFIG_KERNEL_START)
-else
-KERNELLOAD     =0xc0000000
-endif
 
+LDFLAGS_BLOB   := --format binary --oformat elf32-powerpc
 LDFLAGS_vmlinux        = -Ttext $(KERNELLOAD) -Bstatic
 CPPFLAGS       := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH)
 AFLAGS         := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH)
index 9fdb30456b8b6c3d895dc2dbb2b9dc9b258447f3..8ee426fe5a9606f6d0177e4024d78744c3548a3c 100644 (file)
 #include "mem_pieces.h"
 #include "mmu_decl.h"
 
-#ifdef CONFIG_LOWMEM_SIZE_BOOL
+#if defined(CONFIG_KERNEL_START_BOOL) || defined(CONFIG_LOWMEM_SIZE_BOOL)
+/* The ammount of lowmem must be within 0xF0000000 - KERNELBASE. */
+#if (CONFIG_LOWMEM_SIZE > (0xF0000000 - KERNELBASE))
+#error "You must adjust CONFIG_LOWMEM_SIZE or CONFIG_START_KERNEL"
+#endif
+#endif
 #define MAX_LOW_MEM    CONFIG_LOWMEM_SIZE
-#else
-#define MAX_LOW_MEM    (0xF0000000UL - KERNELBASE)
-#endif /* CONFIG_LOWMEM_SIZE_BOOL */
 
 #ifdef CONFIG_PPC_ISERIES
 extern void create_virtual_bus_tce_table(void);