MIPS: Add CONFIG_RELOCATABLE Kconfig option
[cascardo/linux.git] / arch / mips / Kconfig
index 2018c2b..7040a6b 100644 (file)
@@ -62,6 +62,7 @@ config MIPS
        select HAVE_IRQ_TIME_ACCOUNTING
        select GENERIC_TIME_VSYSCALL
        select ARCH_CLOCKSOURCE_DATA
+       select HANDLE_DOMAIN_IRQ
 
 menu "Machine selection"
 
@@ -137,7 +138,7 @@ config ATH79
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_MIPS16
-       select SYS_SUPPORTS_ZBOOT
+       select SYS_SUPPORTS_ZBOOT_UART_PROM
        select USE_OF
        help
          Support for the Atheros AR71XX/AR724X/AR913X SoCs.
@@ -196,6 +197,7 @@ config BCM47XX
        select GPIOLIB
        select LEDS_GPIO_REGISTER
        select BCM47XX_NVRAM
+       select BCM47XX_SPROM
        help
         Support for BCM47XX based boards
 
@@ -473,6 +475,7 @@ config MIPS_MALTA
        select SYS_SUPPORTS_MULTITHREADING
        select SYS_SUPPORTS_SMARTMIPS
        select SYS_SUPPORTS_ZBOOT
+       select SYS_SUPPORTS_RELOCATABLE
        select USE_OF
        select ZONE_DMA32 if 64BIT
        select BUILTIN_DTB
@@ -507,6 +510,7 @@ config MIPS_SEAD3
        select MIPS_MSC
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
+       select SYS_HAS_CPU_MIPS32_R6
        select SYS_HAS_CPU_MIPS64_R1
        select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
@@ -516,6 +520,7 @@ config MIPS_SEAD3
        select SYS_SUPPORTS_SMARTMIPS
        select SYS_SUPPORTS_MICROMIPS
        select SYS_SUPPORTS_MIPS16
+       select SYS_SUPPORTS_RELOCATABLE
        select USB_EHCI_BIG_ENDIAN_DESC
        select USB_EHCI_BIG_ENDIAN_MMIO
        select USE_OF
@@ -1155,6 +1160,13 @@ config ISA_DMA_API
 config HOLES_IN_ZONE
        bool
 
+config SYS_SUPPORTS_RELOCATABLE
+       bool
+       help
+        Selected if the platform supports relocating the kernel.
+        The platform must provide plat_get_fdt() if it selects CONFIG_USE_OF
+        to allow access to command line and entropy sources.
+
 #
 # Endianness selection.  Sufficiently obscure so many users don't know what to
 # answer,so we try hard to limit the available choices.  Also the use of a
@@ -1999,7 +2011,7 @@ config MIPS_PGD_C0_CONTEXT
 #
 config HARDWARE_WATCHPOINTS
        bool
-       default y if CPU_MIPSR1 || CPU_MIPSR2
+       default y if CPU_MIPSR1 || CPU_MIPSR2 || CPU_MIPSR6
 
 menu "Kernel type"
 
@@ -2280,7 +2292,7 @@ config MIPS_CMP
 
 config MIPS_CPS
        bool "MIPS Coherent Processing System support"
-       depends on SYS_SUPPORTS_MIPS_CPS && !CPU_MIPSR6
+       depends on SYS_SUPPORTS_MIPS_CPS
        select MIPS_CM
        select MIPS_CPC
        select MIPS_CPS_PM if HOTPLUG_CPU
@@ -2470,6 +2482,31 @@ config NUMA
 config SYS_SUPPORTS_NUMA
        bool
 
+config RELOCATABLE
+       bool "Relocatable kernel"
+       depends on SYS_SUPPORTS_RELOCATABLE && (CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_MIPS32_R6 || CPU_MIPS64_R6)
+       help
+         This builds a kernel image that retains relocation information
+         so it can be loaded someplace besides the default 1MB.
+         The relocations make the kernel binary about 15% larger,
+         but are discarded at runtime
+
+config RELOCATION_TABLE_SIZE
+       hex "Relocation table size"
+       depends on RELOCATABLE
+       range 0x0 0x01000000
+       default "0x00100000"
+       ---help---
+         A table of relocation data will be appended to the kernel binary
+         and parsed at boot to fix up the relocated kernel.
+
+         This option allows the amount of space reserved for the table to be
+         adjusted, although the default of 1Mb should be ok in most cases.
+
+         The build will fail and a valid size suggested if this is too small.
+
+         If unsure, leave at the default value.
+
 config NODES_SHIFT
        int
        default "6"