Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Jul 2013 21:52:21 +0000 (14:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Jul 2013 21:52:21 +0000 (14:52 -0700)
Pull MIPS updates from Ralf Baechle:
 "MIPS updates:

   - All the things that didn't make 3.10.
   - Removes the Windriver PPMC platform.  Nobody will miss it.
   - Remove a workaround from kernel/irq/irqdomain.c which was there
     exclusivly for MIPS.  Patch by Grant Likely.
   - More small improvments for the SEAD 3 platform
   - Improvments on the BMIPS / SMP support for the BCM63xx series.
   - Various cleanups of dead leftovers.
   - Platform support for the Cavium Octeon-based EdgeRouter Lite.

  Two large KVM patchsets didn't make it for this pull request because
  their respective authors are vacationing"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (124 commits)
  MIPS: Kconfig: Add missing MODULES dependency to VPE_LOADER
  MIPS: BCM63xx: CLK: Add dummy clk_{set,round}_rate() functions
  MIPS: SEAD3: Disable L2 cache on SEAD-3.
  MIPS: BCM63xx: Enable second core SMP on BCM6328 if available
  MIPS: BCM63xx: Add SMP support to prom.c
  MIPS: define write{b,w,l,q}_relaxed
  MIPS: Expose missing pci_io{map,unmap} declarations
  MIPS: Malta: Update GCMP detection.
  Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET"
  MIPS: APSP: Remove <asm/kspd.h>
  SSB: Kconfig: Amend SSB_EMBEDDED dependencies
  MIPS: microMIPS: Fix improper definition of ISA exception bit.
  MIPS: Don't try to decode microMIPS branch instructions where they cannot exist.
  MIPS: Declare emulate_load_store_microMIPS as a static function.
  MIPS: Fix typos and cleanup comment
  MIPS: Cleanup indentation and whitespace
  MIPS: BMIPS: support booting from physical CPU other than 0
  MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS
  MIPS: GIC: Fix gic_set_affinity infinite loop
  MIPS: Don't save/restore OCTEON wide multiplier state on syscalls.
  ...

17 files changed:
1  2 
arch/mips/Kconfig
arch/mips/bcm63xx/boards/board_bcm963xx.c
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
arch/mips/kernel/scall32-o32.S
drivers/ata/Kconfig
drivers/edac/Kconfig
drivers/i2c/busses/Kconfig
drivers/net/phy/Kconfig
drivers/rapidio/switches/idt_gen2.c
drivers/spi/Kconfig
drivers/usb/host/Kconfig
drivers/watchdog/Kconfig
include/uapi/linux/Kbuild
kernel/irq/irqdomain.c
lib/Kconfig.debug

diff --combined arch/mips/Kconfig
@@@ -1,6 -1,7 +1,7 @@@
  config MIPS
        bool
        default y
+       select HAVE_CONTEXT_TRACKING
        select HAVE_GENERIC_DMA_COHERENT
        select HAVE_IDE
        select HAVE_OPROFILE
@@@ -27,6 -28,7 +28,7 @@@
        select HAVE_GENERIC_HARDIRQS
        select GENERIC_IRQ_PROBE
        select GENERIC_IRQ_SHOW
+       select GENERIC_PCI_IOMAP
        select HAVE_ARCH_JUMP_LABEL
        select ARCH_WANT_IPC_PARSE_VERSION
        select IRQ_FORCED_THREADING
        select MODULES_USE_ELF_REL if MODULES
        select MODULES_USE_ELF_RELA if MODULES && 64BIT
        select CLONE_BACKWARDS
 +      select HAVE_DEBUG_STACKOVERFLOW
  
  menu "Machine selection"
  
- config ZONE_DMA
-       bool
  choice
        prompt "System type"
        default SGI_IP22
@@@ -124,11 -122,14 +123,14 @@@ config BCM47X
  
  config BCM63XX
        bool "Broadcom BCM63XX based boards"
+       select BOOT_RAW
        select CEVT_R4K
        select CSRC_R4K
        select DMA_NONCOHERENT
        select IRQ_CPU
        select SYS_HAS_CPU_MIPS32_R1
+       select SYS_HAS_CPU_BMIPS4350 if !BCM63XX_CPU_6338 && !BCM63XX_CPU_6345 && !BCM63XX_CPU_6348
+       select NR_CPUS_DEFAULT_2
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_HAS_EARLY_PRINTK
@@@ -341,7 -342,6 +343,6 @@@ config MIPS_SEAD
        select DMA_NONCOHERENT
        select IRQ_CPU
        select IRQ_GIC
-       select MIPS_CPU_SCACHE
        select MIPS_MSC
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
@@@ -420,7 -420,6 +421,6 @@@ config POWERT
        select CSRC_POWERTV
        select DMA_NONCOHERENT
        select HW_HAS_PCI
-       select SYS_HAS_EARLY_PRINTK
        select SYS_HAS_CPU_MIPS32_R2
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@@ -713,46 -712,8 +713,8 @@@ config MIKROTIK_RB53
          Support the Mikrotik(tm) RouterBoard 532 series,
          based on the IDT RC32434 SoC.
  
- config WR_PPMC
-       bool "Wind River PPMC board"
-       select CEVT_R4K
-       select CSRC_R4K
-       select IRQ_CPU
-       select BOOT_ELF32
-       select DMA_NONCOHERENT
-       select HW_HAS_PCI
-       select PCI_GT64XXX_PCI0
-       select SWAP_IO_SPACE
-       select SYS_HAS_CPU_MIPS32_R1
-       select SYS_HAS_CPU_MIPS32_R2
-       select SYS_HAS_CPU_MIPS64_R1
-       select SYS_HAS_CPU_NEVADA
-       select SYS_HAS_CPU_RM7000
-       select SYS_SUPPORTS_32BIT_KERNEL
-       select SYS_SUPPORTS_64BIT_KERNEL
-       select SYS_SUPPORTS_BIG_ENDIAN
-       select SYS_SUPPORTS_LITTLE_ENDIAN
-       help
-         This enables support for the Wind River MIPS32 4KC PPMC evaluation
-         board, which is based on GT64120 bridge chip.
- config CAVIUM_OCTEON_SIMULATOR
-       bool "Cavium Networks Octeon Simulator"
-       select CEVT_R4K
-       select 64BIT_PHYS_ADDR
-       select DMA_COHERENT
-       select SYS_SUPPORTS_64BIT_KERNEL
-       select SYS_SUPPORTS_BIG_ENDIAN
-       select SYS_SUPPORTS_HOTPLUG_CPU
-       select SYS_HAS_CPU_CAVIUM_OCTEON
-       select HOLES_IN_ZONE
-       help
-         The Octeon simulator is software performance model of the Cavium
-         Octeon Processor. It supports simulating Octeon processors on x86
-         hardware.
- config CAVIUM_OCTEON_REFERENCE_BOARD
-       bool "Cavium Networks Octeon reference board"
+ config CAVIUM_OCTEON_SOC
+       bool "Cavium Networks Octeon SoC based boards"
        select CEVT_R4K
        select 64BIT_PHYS_ADDR
        select DMA_COHERENT
@@@ -806,6 -767,8 +768,8 @@@ config NLM_XLR_BOAR
        select SYS_HAS_EARLY_PRINTK
        select USB_ARCH_HAS_OHCI if USB_SUPPORT
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
+       select SYS_SUPPORTS_ZBOOT
+       select SYS_SUPPORTS_ZBOOT_UART16550
        help
          Support for systems based on Netlogic XLR and XLS processors.
          Say Y here if you have a XLR or XLS based board.
@@@ -832,6 -795,8 +796,8 @@@ config NLM_XLP_BOAR
        select SYNC_R4K
        select SYS_HAS_EARLY_PRINTK
        select USE_OF
+       select SYS_SUPPORTS_ZBOOT
+       select SYS_SUPPORTS_ZBOOT_UART16550
        help
          This board is based on Netlogic XLP Processor.
          Say Y here if you have a XLP based board.
@@@ -963,7 -928,7 +929,7 @@@ config SYS_HAS_EARLY_PRINT
  
  config HOTPLUG_CPU
        bool "Support for hot-pluggable CPUs"
 -      depends on SMP && HOTPLUG && SYS_SUPPORTS_HOTPLUG_CPU
 +      depends on SMP && SYS_SUPPORTS_HOTPLUG_CPU
        help
          Say Y here to allow turning CPUs off and on. CPUs can be
          controlled through /sys/devices/system/cpu.
@@@ -1031,7 -996,6 +997,6 @@@ config CPU_BIG_ENDIA
  config CPU_LITTLE_ENDIAN
        bool "Little endian"
        depends on SYS_SUPPORTS_LITTLE_ENDIAN
-       help
  
  endchoice
  
@@@ -1964,7 -1928,7 +1929,7 @@@ config MIPS_MT_FPAF
  
  config MIPS_VPE_LOADER
        bool "VPE loader support."
-       depends on SYS_SUPPORTS_MULTITHREADING
+       depends on SYS_SUPPORTS_MULTITHREADING && MODULES
        select CPU_MIPSR2_IRQ_VI
        select CPU_MIPSR2_IRQ_EI
        select MIPS_MT
@@@ -2382,6 -2346,19 +2347,19 @@@ config SECCOM
  
          If unsure, say Y. Only embedded should say N here.
  
+ config CC_STACKPROTECTOR
+       bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
+       help
+         This option turns on the -fstack-protector GCC feature. This
+         feature puts, at the beginning of functions, a canary value on
+         the stack just before the return address, and validates
+         the value just before actually returning.  Stack based buffer
+         overflows (that need to overwrite this return address) now also
+         overwrite the canary, which gets detected and the attack is then
+         neutralized via a kernel panic.
+         This feature requires gcc version 4.2 or above.
  config USE_OF
        bool
        select OF
@@@ -2413,7 -2390,6 +2391,6 @@@ config PC
        bool "Support for PCI controller"
        depends on HW_HAS_PCI
        select PCI_DOMAINS
-       select GENERIC_PCI_IOMAP
        select NO_GENERIC_PCI_IOPORT_MAP
        help
          Find out whether you have a PCI motherboard. PCI is the name of a
@@@ -2479,6 -2455,9 +2456,9 @@@ config I825
        select CLKEVT_I8253
        select MIPS_EXTERNAL_TIMER
  
+ config ZONE_DMA
+       bool
  config ZONE_DMA32
        bool
  
  #include <bcm63xx_dev_usb_usbd.h>
  #include <board_bcm963xx.h>
  
+ #include <uapi/linux/bcm933xx_hcs.h>
  #define PFX   "board_bcm963xx: "
  
+ #define HCS_OFFSET_128K                       0x20000
  static struct board_info board;
  
+ /*
+  * known 3368 boards
+  */
+ #ifdef CONFIG_BCM63XX_CPU_3368
+ static struct board_info __initdata board_cvg834g = {
+       .name                           = "CVG834G_E15R3921",
+       .expected_cpu_id                = 0x3368,
+       .has_uart0                      = 1,
+       .has_uart1                      = 1,
+       .has_enet0                      = 1,
+       .has_pci                        = 1,
+       .enet0 = {
+               .has_phy                = 1,
+               .use_internal_phy       = 1,
+       },
+       .leds = {
+               {
+                       .name           = "CVG834G:green:power",
+                       .gpio           = 37,
+                       .default_trigger= "default-on",
+               },
+       },
+       .ephy_reset_gpio                = 36,
+       .ephy_reset_gpio_flags          = GPIOF_INIT_HIGH,
+ };
+ #endif
  /*
   * known 6328 boards
   */
@@@ -639,6 -675,9 +675,9 @@@ static struct board_info __initdata boa
   * all boards
   */
  static const struct board_info __initconst *bcm963xx_boards[] = {
+ #ifdef CONFIG_BCM63XX_CPU_3368
+       &board_cvg834g,
+ #endif
  #ifdef CONFIG_BCM63XX_CPU_6328
        &board_96328avng,
  #endif
@@@ -722,8 -761,9 +761,9 @@@ void __init board_prom_init(void
        unsigned int i;
        u8 *boot_addr, *cfe;
        char cfe_version[32];
-       char *board_name;
+       char *board_name = NULL;
        u32 val;
+       struct bcm_hcs *hcs;
  
        /* read base address of boot chip select (0)
         * 6328/6362 do not have MPI but boot from a fixed address
  
        bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET);
  
-       board_name = bcm63xx_nvram_get_name();
+       if (BCMCPU_IS_3368()) {
+               hcs = (struct bcm_hcs *)boot_addr;
+               board_name = hcs->filename;
+       } else {
+               board_name = bcm63xx_nvram_get_name();
+       }
        /* find board by name */
        for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
                if (strncmp(board_name, bcm963xx_boards[i]->name, 16))
@@@ -845,10 -890,6 +890,10 @@@ int __init board_register_devices(void
            !bcm63xx_nvram_get_mac_address(board.enet1.mac_addr))
                bcm63xx_enet_register(1, &board.enet1);
  
 +      if (board.has_enetsw &&
 +          !bcm63xx_nvram_get_mac_address(board.enetsw.mac_addr))
 +              bcm63xx_enetsw_register(&board.enetsw);
 +
        if (board.has_usbd)
                bcm63xx_usbd_register(&board.usbd);
  
  
        platform_device_register(&bcm63xx_gpio_leds);
  
+       if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags)
+               gpio_request_one(board.ephy_reset_gpio,
+                               board.ephy_reset_gpio_flags, "ephy-reset");
        return 0;
  }
@@@ -9,6 -9,7 +9,7 @@@
   * compile time if only one CPU support is enabled (idea stolen from
   * arm mach-types)
   */
+ #define BCM3368_CPU_ID                0x3368
  #define BCM6328_CPU_ID                0x6328
  #define BCM6338_CPU_ID                0x6338
  #define BCM6345_CPU_ID                0x6345
@@@ -22,6 -23,19 +23,19 @@@ u16 __bcm63xx_get_cpu_id(void)
  u8 bcm63xx_get_cpu_rev(void);
  unsigned int bcm63xx_get_cpu_freq(void);
  
+ #ifdef CONFIG_BCM63XX_CPU_3368
+ # ifdef bcm63xx_get_cpu_id
+ #  undef bcm63xx_get_cpu_id
+ #  define bcm63xx_get_cpu_id()        __bcm63xx_get_cpu_id()
+ #  define BCMCPU_RUNTIME_DETECT
+ # else
+ #  define bcm63xx_get_cpu_id()        BCM3368_CPU_ID
+ # endif
+ # define BCMCPU_IS_3368()     (bcm63xx_get_cpu_id() == BCM3368_CPU_ID)
+ #else
+ # define BCMCPU_IS_3368()     (0)
+ #endif
  #ifdef CONFIG_BCM63XX_CPU_6328
  # ifdef bcm63xx_get_cpu_id
  #  undef bcm63xx_get_cpu_id
@@@ -173,10 -187,7 +187,10 @@@ enum bcm63xx_regs_set 
  #define BCM_6358_RSET_SPI_SIZE                1804
  #define BCM_6368_RSET_SPI_SIZE                1804
  #define RSET_ENET_SIZE                        2048
 -#define RSET_ENETDMA_SIZE             2048
 +#define RSET_ENETDMA_SIZE             256
 +#define RSET_6345_ENETDMA_SIZE                64
 +#define RSET_ENETDMAC_SIZE(chans)     (16 * (chans))
 +#define RSET_ENETDMAS_SIZE(chans)     (16 * (chans))
  #define RSET_ENETSW_SIZE              65536
  #define RSET_UART_SIZE                        24
  #define RSET_UDC_SIZE                 256
  #define RSET_XTMDMAS_SIZE(chans)      (16 * (chans))
  #define RSET_RNG_SIZE                 20
  
+ /*
+  * 3368 register sets base address
+  */
+ #define BCM_3368_DSL_LMEM_BASE                (0xdeadbeef)
+ #define BCM_3368_PERF_BASE            (0xfff8c000)
+ #define BCM_3368_TIMER_BASE           (0xfff8c040)
+ #define BCM_3368_WDT_BASE             (0xfff8c080)
+ #define BCM_3368_UART0_BASE           (0xfff8c100)
+ #define BCM_3368_UART1_BASE           (0xfff8c120)
+ #define BCM_3368_GPIO_BASE            (0xfff8c080)
+ #define BCM_3368_SPI_BASE             (0xfff8c800)
+ #define BCM_3368_HSSPI_BASE           (0xdeadbeef)
+ #define BCM_3368_UDC0_BASE            (0xdeadbeef)
+ #define BCM_3368_USBDMA_BASE          (0xdeadbeef)
+ #define BCM_3368_OHCI0_BASE           (0xdeadbeef)
+ #define BCM_3368_OHCI_PRIV_BASE               (0xdeadbeef)
+ #define BCM_3368_USBH_PRIV_BASE               (0xdeadbeef)
+ #define BCM_3368_USBD_BASE            (0xdeadbeef)
+ #define BCM_3368_MPI_BASE             (0xfff80000)
+ #define BCM_3368_PCMCIA_BASE          (0xfff80054)
+ #define BCM_3368_PCIE_BASE            (0xdeadbeef)
+ #define BCM_3368_SDRAM_REGS_BASE      (0xdeadbeef)
+ #define BCM_3368_DSL_BASE             (0xdeadbeef)
+ #define BCM_3368_UBUS_BASE            (0xdeadbeef)
+ #define BCM_3368_ENET0_BASE           (0xfff98000)
+ #define BCM_3368_ENET1_BASE           (0xfff98800)
+ #define BCM_3368_ENETDMA_BASE         (0xfff99800)
+ #define BCM_3368_ENETDMAC_BASE                (0xfff99900)
+ #define BCM_3368_ENETDMAS_BASE                (0xfff99a00)
+ #define BCM_3368_ENETSW_BASE          (0xdeadbeef)
+ #define BCM_3368_EHCI0_BASE           (0xdeadbeef)
+ #define BCM_3368_SDRAM_BASE           (0xdeadbeef)
+ #define BCM_3368_MEMC_BASE            (0xfff84000)
+ #define BCM_3368_DDR_BASE             (0xdeadbeef)
+ #define BCM_3368_M2M_BASE             (0xdeadbeef)
+ #define BCM_3368_ATM_BASE             (0xdeadbeef)
+ #define BCM_3368_XTM_BASE             (0xdeadbeef)
+ #define BCM_3368_XTMDMA_BASE          (0xdeadbeef)
+ #define BCM_3368_XTMDMAC_BASE         (0xdeadbeef)
+ #define BCM_3368_XTMDMAS_BASE         (0xdeadbeef)
+ #define BCM_3368_PCM_BASE             (0xfff9c200)
+ #define BCM_3368_PCMDMA_BASE          (0xdeadbeef)
+ #define BCM_3368_PCMDMAC_BASE         (0xdeadbeef)
+ #define BCM_3368_PCMDMAS_BASE         (0xdeadbeef)
+ #define BCM_3368_RNG_BASE             (0xdeadbeef)
+ #define BCM_3368_MISC_BASE            (0xdeadbeef)
  /*
   * 6328 register sets base address
   */
  #define BCM_6328_PCMDMAS_BASE         (0xdeadbeef)
  #define BCM_6328_RNG_BASE             (0xdeadbeef)
  #define BCM_6328_MISC_BASE            (0xb0001800)
+ #define BCM_6328_OTP_BASE             (0xb0000600)
  /*
   * 6338 register sets base address
   */
  #define BCM_6345_USBDMA_BASE          (0xfffe2800)
  #define BCM_6345_ENET0_BASE           (0xfffe1800)
  #define BCM_6345_ENETDMA_BASE         (0xfffe2800)
 -#define BCM_6345_ENETDMAC_BASE                (0xfffe2900)
 +#define BCM_6345_ENETDMAC_BASE                (0xfffe2840)
  #define BCM_6345_ENETDMAS_BASE                (0xfffe2a00)
  #define BCM_6345_ENETSW_BASE          (0xdeadbeef)
  #define BCM_6345_PCMCIA_BASE          (0xfffe2028)
@@@ -623,6 -683,9 +686,9 @@@ static inline unsigned long bcm63xx_reg
  #ifdef BCMCPU_RUNTIME_DETECT
        return bcm63xx_regs_base[set];
  #else
+ #ifdef CONFIG_BCM63XX_CPU_3368
+       __GEN_RSET(3368)
+ #endif
  #ifdef CONFIG_BCM63XX_CPU_6328
        __GEN_RSET(6328)
  #endif
@@@ -689,6 -752,52 +755,52 @@@ enum bcm63xx_irq 
        IRQ_XTM_DMA0,
  };
  
+ /*
+  * 3368 irqs
+  */
+ #define BCM_3368_TIMER_IRQ            (IRQ_INTERNAL_BASE + 0)
+ #define BCM_3368_SPI_IRQ              (IRQ_INTERNAL_BASE + 1)
+ #define BCM_3368_UART0_IRQ            (IRQ_INTERNAL_BASE + 2)
+ #define BCM_3368_UART1_IRQ            (IRQ_INTERNAL_BASE + 3)
+ #define BCM_3368_DSL_IRQ              0
+ #define BCM_3368_UDC0_IRQ             0
+ #define BCM_3368_OHCI0_IRQ            0
+ #define BCM_3368_ENET0_IRQ            (IRQ_INTERNAL_BASE + 8)
+ #define BCM_3368_ENET1_IRQ            (IRQ_INTERNAL_BASE + 6)
+ #define BCM_3368_ENET_PHY_IRQ         (IRQ_INTERNAL_BASE + 9)
+ #define BCM_3368_ENET0_RXDMA_IRQ      (IRQ_INTERNAL_BASE + 15)
+ #define BCM_3368_ENET0_TXDMA_IRQ      (IRQ_INTERNAL_BASE + 16)
+ #define BCM_3368_HSSPI_IRQ            0
+ #define BCM_3368_EHCI0_IRQ            0
+ #define BCM_3368_USBD_IRQ             0
+ #define BCM_3368_USBD_RXDMA0_IRQ      0
+ #define BCM_3368_USBD_TXDMA0_IRQ      0
+ #define BCM_3368_USBD_RXDMA1_IRQ      0
+ #define BCM_3368_USBD_TXDMA1_IRQ      0
+ #define BCM_3368_USBD_RXDMA2_IRQ      0
+ #define BCM_3368_USBD_TXDMA2_IRQ      0
+ #define BCM_3368_ENET1_RXDMA_IRQ        (IRQ_INTERNAL_BASE + 17)
+ #define BCM_3368_ENET1_TXDMA_IRQ        (IRQ_INTERNAL_BASE + 18)
+ #define BCM_3368_PCI_IRQ              (IRQ_INTERNAL_BASE + 31)
+ #define BCM_3368_PCMCIA_IRQ           0
+ #define BCM_3368_ATM_IRQ              0
+ #define BCM_3368_ENETSW_RXDMA0_IRQ    0
+ #define BCM_3368_ENETSW_RXDMA1_IRQ    0
+ #define BCM_3368_ENETSW_RXDMA2_IRQ    0
+ #define BCM_3368_ENETSW_RXDMA3_IRQ    0
+ #define BCM_3368_ENETSW_TXDMA0_IRQ    0
+ #define BCM_3368_ENETSW_TXDMA1_IRQ    0
+ #define BCM_3368_ENETSW_TXDMA2_IRQ    0
+ #define BCM_3368_ENETSW_TXDMA3_IRQ    0
+ #define BCM_3368_XTM_IRQ              0
+ #define BCM_3368_XTM_DMA0_IRQ         0
+ #define BCM_3368_EXT_IRQ0             (IRQ_INTERNAL_BASE + 25)
+ #define BCM_3368_EXT_IRQ1             (IRQ_INTERNAL_BASE + 26)
+ #define BCM_3368_EXT_IRQ2             (IRQ_INTERNAL_BASE + 27)
+ #define BCM_3368_EXT_IRQ3             (IRQ_INTERNAL_BASE + 28)
  /*
   * 6328 irqs
   */
  /* Clock Control register */
  #define PERF_CKCTL_REG                        0x4
  
+ #define CKCTL_3368_MAC_EN             (1 << 3)
+ #define CKCTL_3368_TC_EN              (1 << 5)
+ #define CKCTL_3368_US_TOP_EN          (1 << 6)
+ #define CKCTL_3368_DS_TOP_EN          (1 << 7)
+ #define CKCTL_3368_APM_EN             (1 << 8)
+ #define CKCTL_3368_SPI_EN             (1 << 9)
+ #define CKCTL_3368_USBS_EN            (1 << 10)
+ #define CKCTL_3368_BMU_EN             (1 << 11)
+ #define CKCTL_3368_PCM_EN             (1 << 12)
+ #define CKCTL_3368_NTP_EN             (1 << 13)
+ #define CKCTL_3368_ACP_B_EN           (1 << 14)
+ #define CKCTL_3368_ACP_A_EN           (1 << 15)
+ #define CKCTL_3368_EMUSB_EN           (1 << 17)
+ #define CKCTL_3368_ENET0_EN           (1 << 18)
+ #define CKCTL_3368_ENET1_EN           (1 << 19)
+ #define CKCTL_3368_USBU_EN            (1 << 20)
+ #define CKCTL_3368_EPHY_EN            (1 << 21)
+ #define CKCTL_3368_ALL_SAFE_EN                (CKCTL_3368_MAC_EN | \
+                                        CKCTL_3368_TC_EN | \
+                                        CKCTL_3368_US_TOP_EN | \
+                                        CKCTL_3368_DS_TOP_EN | \
+                                        CKCTL_3368_APM_EN | \
+                                        CKCTL_3368_SPI_EN | \
+                                        CKCTL_3368_USBS_EN | \
+                                        CKCTL_3368_BMU_EN | \
+                                        CKCTL_3368_PCM_EN | \
+                                        CKCTL_3368_NTP_EN | \
+                                        CKCTL_3368_ACP_B_EN | \
+                                        CKCTL_3368_ACP_A_EN | \
+                                        CKCTL_3368_EMUSB_EN | \
+                                        CKCTL_3368_USBU_EN)
  #define CKCTL_6328_PHYMIPS_EN         (1 << 0)
  #define CKCTL_6328_ADSL_QPROC_EN      (1 << 1)
  #define CKCTL_6328_ADSL_AFE_EN                (1 << 2)
  #define SYS_PLL_SOFT_RESET            0x1
  
  /* Interrupt Mask register */
+ #define PERF_IRQMASK_3368_REG         0xc
  #define PERF_IRQMASK_6328_REG         0x20
  #define PERF_IRQMASK_6338_REG         0xc
  #define PERF_IRQMASK_6345_REG         0xc
  #define PERF_IRQMASK_6368_REG         0x20
  
  /* Interrupt Status register */
+ #define PERF_IRQSTAT_3368_REG         0x10
  #define PERF_IRQSTAT_6328_REG         0x28
  #define PERF_IRQSTAT_6338_REG         0x10
  #define PERF_IRQSTAT_6345_REG         0x10
  #define PERF_IRQSTAT_6368_REG         0x28
  
  /* External Interrupt Configuration register */
+ #define PERF_EXTIRQ_CFG_REG_3368      0x14
  #define PERF_EXTIRQ_CFG_REG_6328      0x18
  #define PERF_EXTIRQ_CFG_REG_6338      0x14
  #define PERF_EXTIRQ_CFG_REG_6345      0x14
  #define PERF_SOFTRESET_6362_REG               0x10
  #define PERF_SOFTRESET_6368_REG               0x10
  
+ #define SOFTRESET_3368_SPI_MASK               (1 << 0)
+ #define SOFTRESET_3368_ENET_MASK      (1 << 2)
+ #define SOFTRESET_3368_MPI_MASK               (1 << 3)
+ #define SOFTRESET_3368_EPHY_MASK      (1 << 6)
+ #define SOFTRESET_3368_USBS_MASK      (1 << 11)
+ #define SOFTRESET_3368_PCM_MASK               (1 << 13)
  #define SOFTRESET_6328_SPI_MASK               (1 << 0)
  #define SOFTRESET_6328_EPHY_MASK      (1 << 1)
  #define SOFTRESET_6328_SAR_MASK               (1 << 2)
  /*************************************************************************
   * _REG relative to RSET_ENETDMA
   *************************************************************************/
 +#define ENETDMA_CHAN_WIDTH            0x10
 +#define ENETDMA_6345_CHAN_WIDTH               0x40
  
  /* Controller Configuration Register */
  #define ENETDMA_CFG_REG                       (0x0)
  /* State Ram Word 4 */
  #define ENETDMA_SRAM4_REG(x)          (0x20c + (x) * 0x10)
  
 +/* Broadcom 6345 ENET DMA definitions */
 +#define ENETDMA_6345_CHANCFG_REG      (0x00)
 +
 +#define ENETDMA_6345_MAXBURST_REG     (0x40)
 +
 +#define ENETDMA_6345_RSTART_REG               (0x08)
 +
 +#define ENETDMA_6345_LEN_REG          (0x0C)
 +
 +#define ENETDMA_6345_IR_REG           (0x14)
 +
 +#define ENETDMA_6345_IRMASK_REG               (0x18)
 +
 +#define ENETDMA_6345_FC_REG           (0x1C)
 +
 +#define ENETDMA_6345_BUFALLOC_REG     (0x20)
 +
 +/* Shift down for EOP, SOP and WRAP bits */
 +#define ENETDMA_6345_DESC_SHIFT               (3)
  
  /*************************************************************************
   * _REG relative to RSET_ENETDMAC
   *************************************************************************/
  
  /* Channel Configuration register */
 -#define ENETDMAC_CHANCFG_REG(x)               ((x) * 0x10)
 +#define ENETDMAC_CHANCFG_REG          (0x0)
  #define ENETDMAC_CHANCFG_EN_SHIFT     0
  #define ENETDMAC_CHANCFG_EN_MASK      (1 << ENETDMAC_CHANCFG_EN_SHIFT)
  #define ENETDMAC_CHANCFG_PKTHALT_SHIFT        1
  #define ENETDMAC_CHANCFG_PKTHALT_MASK (1 << ENETDMAC_CHANCFG_PKTHALT_SHIFT)
  #define ENETDMAC_CHANCFG_BUFHALT_SHIFT        2
  #define ENETDMAC_CHANCFG_BUFHALT_MASK (1 << ENETDMAC_CHANCFG_BUFHALT_SHIFT)
 +#define ENETDMAC_CHANCFG_CHAINING_SHIFT       2
 +#define ENETDMAC_CHANCFG_CHAINING_MASK        (1 << ENETDMAC_CHANCFG_CHAINING_SHIFT)
 +#define ENETDMAC_CHANCFG_WRAP_EN_SHIFT        3
 +#define ENETDMAC_CHANCFG_WRAP_EN_MASK (1 << ENETDMAC_CHANCFG_WRAP_EN_SHIFT)
 +#define ENETDMAC_CHANCFG_FLOWC_EN_SHIFT       4
 +#define ENETDMAC_CHANCFG_FLOWC_EN_MASK        (1 << ENETDMAC_CHANCFG_FLOWC_EN_SHIFT)
  
  /* Interrupt Control/Status register */
 -#define ENETDMAC_IR_REG(x)            (0x4 + (x) * 0x10)
 +#define ENETDMAC_IR_REG                       (0x4)
  #define ENETDMAC_IR_BUFDONE_MASK      (1 << 0)
  #define ENETDMAC_IR_PKTDONE_MASK      (1 << 1)
  #define ENETDMAC_IR_NOTOWNER_MASK     (1 << 2)
  
  /* Interrupt Mask register */
 -#define ENETDMAC_IRMASK_REG(x)                (0x8 + (x) * 0x10)
 +#define ENETDMAC_IRMASK_REG           (0x8)
  
  /* Maximum Burst Length */
 -#define ENETDMAC_MAXBURST_REG(x)      (0xc + (x) * 0x10)
 +#define ENETDMAC_MAXBURST_REG         (0xc)
  
  
  /*************************************************************************
   *************************************************************************/
  
  /* Ring Start Address register */
 -#define ENETDMAS_RSTART_REG(x)                ((x) * 0x10)
 +#define ENETDMAS_RSTART_REG           (0x0)
  
  /* State Ram Word 2 */
 -#define ENETDMAS_SRAM2_REG(x)         (0x4 + (x) * 0x10)
 +#define ENETDMAS_SRAM2_REG            (0x4)
  
  /* State Ram Word 3 */
 -#define ENETDMAS_SRAM3_REG(x)         (0x8 + (x) * 0x10)
 +#define ENETDMAS_SRAM3_REG            (0x8)
  
  /* State Ram Word 4 */
 -#define ENETDMAS_SRAM4_REG(x)         (0xc + (x) * 0x10)
 +#define ENETDMAS_SRAM4_REG            (0xc)
  
  
  /*************************************************************************
   * _REG relative to RSET_ENETSW
   *************************************************************************/
  
 +/* Port traffic control */
 +#define ENETSW_PTCTRL_REG(x)          (0x0 + (x))
 +#define ENETSW_PTCTRL_RXDIS_MASK      (1 << 0)
 +#define ENETSW_PTCTRL_TXDIS_MASK      (1 << 1)
 +
 +/* Switch mode register */
 +#define ENETSW_SWMODE_REG             (0xb)
 +#define ENETSW_SWMODE_FWD_EN_MASK     (1 << 1)
 +
 +/* IMP override Register */
 +#define ENETSW_IMPOV_REG              (0xe)
 +#define ENETSW_IMPOV_FORCE_MASK               (1 << 7)
 +#define ENETSW_IMPOV_TXFLOW_MASK      (1 << 5)
 +#define ENETSW_IMPOV_RXFLOW_MASK      (1 << 4)
 +#define ENETSW_IMPOV_1000_MASK                (1 << 3)
 +#define ENETSW_IMPOV_100_MASK         (1 << 2)
 +#define ENETSW_IMPOV_FDX_MASK         (1 << 1)
 +#define ENETSW_IMPOV_LINKUP_MASK      (1 << 0)
 +
 +/* Port override Register */
 +#define ENETSW_PORTOV_REG(x)          (0x58 + (x))
 +#define ENETSW_PORTOV_ENABLE_MASK     (1 << 6)
 +#define ENETSW_PORTOV_TXFLOW_MASK     (1 << 5)
 +#define ENETSW_PORTOV_RXFLOW_MASK     (1 << 4)
 +#define ENETSW_PORTOV_1000_MASK               (1 << 3)
 +#define ENETSW_PORTOV_100_MASK                (1 << 2)
 +#define ENETSW_PORTOV_FDX_MASK                (1 << 1)
 +#define ENETSW_PORTOV_LINKUP_MASK     (1 << 0)
 +
 +/* MDIO control register */
 +#define ENETSW_MDIOC_REG              (0xb0)
 +#define ENETSW_MDIOC_EXT_MASK         (1 << 16)
 +#define ENETSW_MDIOC_REG_SHIFT                20
 +#define ENETSW_MDIOC_PHYID_SHIFT      25
 +#define ENETSW_MDIOC_RD_MASK          (1 << 30)
 +#define ENETSW_MDIOC_WR_MASK          (1 << 31)
 +
 +/* MDIO data register */
 +#define ENETSW_MDIOD_REG              (0xb4)
 +
 +/* Global Management Configuration Register */
 +#define ENETSW_GMCR_REG                       (0x200)
 +#define ENETSW_GMCR_RST_MIB_MASK      (1 << 0)
 +
  /* MIB register */
  #define ENETSW_MIB_REG(x)             (0x2800 + (x) * 4)
  #define ENETSW_MIB_REG_COUNT          47
  
 +/* Jumbo control register port mask register */
 +#define ENETSW_JMBCTL_PORT_REG                (0x4004)
 +
 +/* Jumbo control mib good frame register */
 +#define ENETSW_JMBCTL_MAXSIZE_REG     (0x4008)
 +
  
  /*************************************************************************
   * _REG relative to RSET_OHCI_PRIV
  #define SPI_6348_RX_DATA              0x80
  #define SPI_6348_RX_DATA_SIZE         0x3f
  
- /* BCM 6358/6262/6368 SPI core */
+ /* BCM 3368/6358/6262/6368 SPI core */
  #define SPI_6358_MSG_CTL              0x00    /* 16-bits register */
  #define SPI_6358_MSG_CTL_WIDTH                16
  #define SPI_6358_MSG_DATA             0x02
  
  #define PCIE_DEVICE_OFFSET            0x8000
  
+ /*************************************************************************
+  * _REG relative to RSET_OTP
+  *************************************************************************/
+ #define OTP_USER_BITS_6328_REG(i)     (0x20 + (i) * 4)
+ #define   OTP_6328_REG3_TP1_DISABLED  BIT(9)
  #endif /* BCM63XX_REGS_H_ */
@@@ -24,7 -24,6 +24,7 @@@ struct board_info 
        /* enabled feature/device */
        unsigned int    has_enet0:1;
        unsigned int    has_enet1:1;
 +      unsigned int    has_enetsw:1;
        unsigned int    has_pci:1;
        unsigned int    has_pccard:1;
        unsigned int    has_ohci0:1;
@@@ -37,7 -36,6 +37,7 @@@
        /* ethernet config */
        struct bcm63xx_enet_platform_data enet0;
        struct bcm63xx_enet_platform_data enet1;
 +      struct bcm63xx_enetsw_platform_data enetsw;
  
        /* USB config */
        struct bcm63xx_usbd_platform_data usbd;
  
        /* GPIO LEDs */
        struct gpio_led leds[5];
+       /* External PHY reset GPIO */
+       unsigned int ephy_reset_gpio;
+       /* External PHY reset GPIO flags from gpio.h */
+       unsigned long ephy_reset_gpio_flags;
  };
  
  #endif /* ! BOARD_BCM963XX_H_ */
@@@ -52,7 -52,7 +52,7 @@@ NESTED(handle_sys, PT_SIZE, sp
  
  stack_done:
        lw      t0, TI_FLAGS($28)       # syscall tracing enabled?
-       li      t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
+       li      t1, _TIF_WORK_SYSCALL_ENTRY
        and     t0, t1
        bnez    t0, syscall_trace_entry # -> yes
  
@@@ -476,9 -476,8 +476,9 @@@ einval: li v0, -ENOSY
        /*
         * For FPU affinity scheduling on MIPS MT processors, we need to
         * intercept sys_sched_xxxaffinity() calls until we get a proper hook
 -       * in kernel/sched.c.  Considered only temporary we only support these
 -       * hooks for the 32-bit kernel - there is no MIPS64 MT processor atm.
 +       * in kernel/sched/core.c.  Considered only temporary we only support
 +       * these hooks for the 32-bit kernel - there is no MIPS64 MT processor
 +       * atm.
         */
        sys     mipsmt_sys_sched_setaffinity    3
        sys     mipsmt_sys_sched_getaffinity    3
diff --combined drivers/ata/Kconfig
@@@ -160,7 -160,7 +160,7 @@@ config PDC_ADM
  
  config PATA_OCTEON_CF
        tristate "OCTEON Boot Bus Compact Flash support"
-       depends on CPU_CAVIUM_OCTEON
+       depends on CAVIUM_OCTEON_SOC
        help
          This option enables a polled compact flash driver for use with
          compact flash cards attached to the OCTEON boot bus.
@@@ -263,6 -263,7 +263,6 @@@ config SATA_PROMIS
  
  config SATA_RCAR
        tristate "Renesas R-Car SATA support"
 -      depends on ARCH_SHMOBILE && ARCH_R8A7779
        help
          This option enables support for Renesas R-Car Serial ATA.
  
diff --combined drivers/edac/Kconfig
@@@ -145,7 -145,7 +145,7 @@@ config EDAC_E7XX
  
  config EDAC_E752X
        tristate "Intel e752x (e7520, e7525, e7320) and 3100"
 -      depends on EDAC_MM_EDAC && PCI && X86 && HOTPLUG
 +      depends on EDAC_MM_EDAC && PCI && X86
        help
          Support for error detection and correction on the Intel
          E7520, E7525, E7320 server chipsets.
@@@ -349,21 -349,21 +349,21 @@@ config EDAC_OCTEON_P
  
  config EDAC_OCTEON_L2C
        tristate "Cavium Octeon Secondary Caches (L2C)"
-       depends on EDAC_MM_EDAC && CPU_CAVIUM_OCTEON
+       depends on EDAC_MM_EDAC && CAVIUM_OCTEON_SOC
        help
          Support for error detection and correction on the
          Cavium Octeon family of SOCs.
  
  config EDAC_OCTEON_LMC
        tristate "Cavium Octeon DRAM Memory Controller (LMC)"
-       depends on EDAC_MM_EDAC && CPU_CAVIUM_OCTEON
+       depends on EDAC_MM_EDAC && CAVIUM_OCTEON_SOC
        help
          Support for error detection and correction on the
          Cavium Octeon family of SOCs.
  
  config EDAC_OCTEON_PCI
        tristate "Cavium Octeon PCI Controller"
-       depends on EDAC_MM_EDAC && PCI && CPU_CAVIUM_OCTEON
+       depends on EDAC_MM_EDAC && PCI && CAVIUM_OCTEON_SOC
        help
          Support for error detection and correction on the
          Cavium Octeon family of SOCs.
@@@ -108,7 -108,6 +108,7 @@@ config I2C_I80
            Lynx Point-LP (PCH)
            Avoton (SOC)
            Wellsburg (PCH)
 +          Coleto Creek (PCH)
  
          This driver can also be built as a module.  If so, the module
          will be called i2c-i801.
@@@ -151,7 -150,6 +151,7 @@@ config I2C_PIIX
            ATI SB700/SP5100
            ATI SB800
            AMD Hudson-2
 +          AMD CZ
            Serverworks OSB4
            Serverworks CSB5
            Serverworks CSB6
@@@ -476,6 -474,16 +476,6 @@@ config I2C_IM
          This driver can also be built as a module.  If so, the module
          will be called i2c-imx.
  
 -config I2C_INTEL_MID
 -      tristate "Intel Moorestown/Medfield Platform I2C controller"
 -      depends on PCI
 -      help
 -        Say Y here if you have an Intel Moorestown/Medfield platform I2C
 -        controller.
 -
 -        This support is also available as a module. If so, the module
 -        will be called i2c-intel-mid.
 -
  config I2C_IOP3XX
        tristate "Intel IOPx3xx and IXP4xx on-chip I2C interface"
        depends on ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || ARCH_IOP13XX
          This driver can also be built as a module.  If so, the module
          will be called i2c-iop3xx.
  
 +config I2C_KEMPLD
 +      tristate "Kontron COM I2C Controller"
 +      depends on MFD_KEMPLD
 +      help
 +        This enables support for the I2C bus interface on some Kontron ETX
 +        and COMexpress (ETXexpress) modules.
 +
 +        This driver can also be built as a module. If so, the module
 +        will be called i2c-kempld.
 +
  config I2C_MPC
        tristate "MPC107/824x/85xx/512x/52xx/83xx/86xx"
        depends on PPC
  
  config I2C_MV64XXX
        tristate "Marvell mv64xxx I2C Controller"
 -      depends on (MV64X60 || PLAT_ORION)
 +      depends on (MV64X60 || PLAT_ORION || ARCH_SUNXI)
        help
          If you say yes to this option, support will be included for the
          built-in I2C interface on the Marvell 64xxx line of host bridges.
 +        This driver is also used for Allwinner SoCs I2C controllers.
  
          This driver can also be built as a module.  If so, the module
          will be called i2c-mv64xxx.
@@@ -688,7 -685,7 +688,7 @@@ config I2C_SIMTE
  
  config I2C_SIRF
        tristate "CSR SiRFprimaII I2C interface"
 -      depends on ARCH_PRIMA2
 +      depends on ARCH_SIRF
        help
          If you say yes to this option, support will be included for the
          CSR SiRFprimaII I2C interface.
@@@ -727,19 -724,9 +727,19 @@@ config I2C_VERSATIL
          This driver can also be built as a module.  If so, the module
          will be called i2c-versatile.
  
 +config I2C_WMT
 +      tristate "Wondermedia WM8xxx SoC I2C bus support"
 +      depends on ARCH_VT8500
 +      help
 +        Say yes if you want to support the I2C bus on Wondermedia 8xxx-series
 +        SoCs.
 +
 +        This driver can also be built as a module. If so, the module will be
 +        called i2c-wmt.
 +
  config I2C_OCTEON
        tristate "Cavium OCTEON I2C bus support"
-       depends on CPU_CAVIUM_OCTEON
+       depends on CAVIUM_OCTEON_SOC
        help
          Say yes if you want to support the I2C serial bus on Cavium
          OCTEON SOC.
diff --combined drivers/net/phy/Kconfig
@@@ -135,7 -135,7 +135,7 @@@ config MDIO_GPI
  
  config MDIO_OCTEON
        tristate "Support for MDIO buses on Octeon SOCs"
-       depends on  CPU_CAVIUM_OCTEON
+       depends on CAVIUM_OCTEON_SOC
        default y
        help
  
  
          If in doubt, say Y.
  
 +config MDIO_SUN4I
 +      tristate "Allwinner sun4i MDIO interface support"
 +      depends on ARCH_SUNXI
 +      select REGULATOR
 +      select REGULATOR_FIXED_VOLTAGE
 +      help
 +        This driver supports the MDIO interface found in the network
 +        interface units of the Allwinner SoC that have an EMAC (A10,
 +        A12, A10s, etc.)
 +
  config MDIO_BUS_MUX
        tristate
        depends on OF_MDIO
   */
  
  #include <linux/stat.h>
 +#include <linux/module.h>
  #include <linux/rio.h>
  #include <linux/rio_drv.h>
  #include <linux/rio_ids.h>
  #include <linux/delay.h>
+ #include <asm/page.h>
  #include "../rio.h"
  
  #define LOCAL_RTE_CONF_DESTID_SEL     0x010070
@@@ -388,12 -389,12 +390,12 @@@ idtg2_show_errlog(struct device *dev, s
  
  static DEVICE_ATTR(errlog, S_IRUGO, idtg2_show_errlog, NULL);
  
 -static int idtg2_sysfs(struct rio_dev *rdev, int create)
 +static int idtg2_sysfs(struct rio_dev *rdev, bool create)
  {
        struct device *dev = &rdev->dev;
        int err = 0;
  
 -      if (create == RIO_SW_SYSFS_CREATE) {
 +      if (create) {
                /* Initialize sysfs entries */
                err = device_create_file(dev, &dev_attr_errlog);
                if (err)
        return err;
  }
  
 -static int idtg2_switch_init(struct rio_dev *rdev, int do_enum)
 +static struct rio_switch_ops idtg2_switch_ops = {
 +      .owner = THIS_MODULE,
 +      .add_entry = idtg2_route_add_entry,
 +      .get_entry = idtg2_route_get_entry,
 +      .clr_table = idtg2_route_clr_table,
 +      .set_domain = idtg2_set_domain,
 +      .get_domain = idtg2_get_domain,
 +      .em_init = idtg2_em_init,
 +      .em_handle = idtg2_em_handler,
 +};
 +
 +static int idtg2_probe(struct rio_dev *rdev, const struct rio_device_id *id)
  {
        pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev));
 -      rdev->rswitch->add_entry = idtg2_route_add_entry;
 -      rdev->rswitch->get_entry = idtg2_route_get_entry;
 -      rdev->rswitch->clr_table = idtg2_route_clr_table;
 -      rdev->rswitch->set_domain = idtg2_set_domain;
 -      rdev->rswitch->get_domain = idtg2_get_domain;
 -      rdev->rswitch->em_init = idtg2_em_init;
 -      rdev->rswitch->em_handle = idtg2_em_handler;
 -      rdev->rswitch->sw_sysfs = idtg2_sysfs;
 -
 -      if (do_enum) {
 +
 +      spin_lock(&rdev->rswitch->lock);
 +
 +      if (rdev->rswitch->ops) {
 +              spin_unlock(&rdev->rswitch->lock);
 +              return -EINVAL;
 +      }
 +
 +      rdev->rswitch->ops = &idtg2_switch_ops;
 +
 +      if (rdev->do_enum) {
                /* Ensure that default routing is disabled on startup */
                rio_write_config_32(rdev,
                                    RIO_STD_RTE_DEFAULT_PORT, IDT_NO_ROUTE);
        }
  
 +      /* Create device-specific sysfs attributes */
 +      idtg2_sysfs(rdev, true);
 +
 +      spin_unlock(&rdev->rswitch->lock);
        return 0;
  }
  
 -DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1848, idtg2_switch_init);
 -DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1616, idtg2_switch_init);
 -DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTVPS1616, idtg2_switch_init);
 -DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTSPS1616, idtg2_switch_init);
 -DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1432, idtg2_switch_init);
 +static void idtg2_remove(struct rio_dev *rdev)
 +{
 +      pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev));
 +      spin_lock(&rdev->rswitch->lock);
 +      if (rdev->rswitch->ops != &idtg2_switch_ops) {
 +              spin_unlock(&rdev->rswitch->lock);
 +              return;
 +      }
 +      rdev->rswitch->ops = NULL;
 +
 +      /* Remove device-specific sysfs attributes */
 +      idtg2_sysfs(rdev, false);
 +
 +      spin_unlock(&rdev->rswitch->lock);
 +}
 +
 +static struct rio_device_id idtg2_id_table[] = {
 +      {RIO_DEVICE(RIO_DID_IDTCPS1848, RIO_VID_IDT)},
 +      {RIO_DEVICE(RIO_DID_IDTCPS1616, RIO_VID_IDT)},
 +      {RIO_DEVICE(RIO_DID_IDTVPS1616, RIO_VID_IDT)},
 +      {RIO_DEVICE(RIO_DID_IDTSPS1616, RIO_VID_IDT)},
 +      {RIO_DEVICE(RIO_DID_IDTCPS1432, RIO_VID_IDT)},
 +      { 0, }  /* terminate list */
 +};
 +
 +static struct rio_driver idtg2_driver = {
 +      .name = "idt_gen2",
 +      .id_table = idtg2_id_table,
 +      .probe = idtg2_probe,
 +      .remove = idtg2_remove,
 +};
 +
 +static int __init idtg2_init(void)
 +{
 +      return rio_register_driver(&idtg2_driver);
 +}
 +
 +static void __exit idtg2_exit(void)
 +{
 +      pr_debug("RIO: %s\n", __func__);
 +      rio_unregister_driver(&idtg2_driver);
 +      pr_debug("RIO: %s done\n", __func__);
 +}
 +
 +device_initcall(idtg2_init);
 +module_exit(idtg2_exit);
 +
 +MODULE_DESCRIPTION("IDT CPS Gen.2 Serial RapidIO switch family driver");
 +MODULE_AUTHOR("Integrated Device Technology, Inc.");
 +MODULE_LICENSE("GPL");
diff --combined drivers/spi/Kconfig
@@@ -266,7 -266,7 +266,7 @@@ config SPI_OC_TIN
  
  config SPI_OCTEON
        tristate "Cavium OCTEON SPI controller"
-       depends on CPU_CAVIUM_OCTEON
+       depends on CAVIUM_OCTEON_SOC
        help
          SPI host driver for the hardware found on some Cavium OCTEON
          SOCs.
@@@ -404,7 -404,7 +404,7 @@@ config SPI_SH_HSP
  
  config SPI_SIRF
        tristate "CSR SiRFprimaII SPI controller"
 -      depends on ARCH_PRIMA2
 +      depends on ARCH_SIRF
        select SPI_BITBANG
        help
          SPI driver for CSR SiRFprimaII SoCs
diff --combined drivers/usb/host/Kconfig
@@@ -17,6 -17,7 +17,6 @@@ config USB_C67X00_HC
  
  config USB_XHCI_HCD
        tristate "xHCI HCD (USB 3.0) support"
 -      depends on USB_ARCH_HAS_XHCI
        ---help---
          The eXtensible Host Controller Interface (xHCI) is standard for USB 3.0
          "SuperSpeed" host controller hardware.
@@@ -42,6 -43,7 +42,6 @@@ endif # USB_XHCI_HC
  
  config USB_EHCI_HCD
        tristate "EHCI HCD (USB 2.0) support"
 -      depends on USB_ARCH_HAS_EHCI
        ---help---
          The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
          "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
@@@ -198,7 -200,7 +198,7 @@@ config USB_EHCI_MS
          has an external PHY.
  
  config USB_EHCI_TEGRA
 -       boolean "NVIDIA Tegra HCD support"
 +       tristate "NVIDIA Tegra HCD support"
         depends on ARCH_TEGRA
         select USB_EHCI_ROOT_HUB_TT
         select USB_PHY
@@@ -223,7 -225,7 +223,7 @@@ config USB_EHCI_S
  
  config USB_EHCI_S5P
         tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
 -       depends on PLAT_S5P
 +       depends on PLAT_S5P || ARCH_EXYNOS
         help
        Enable support for the Samsung S5Pxxxx and Exynos3/4/5 SOC's
        on-chip EHCI controller.
@@@ -283,7 -285,7 +283,7 @@@ config USB_EHCI_HCD_PLATFOR
  
  config USB_OCTEON_EHCI
        bool "Octeon on-chip EHCI support"
-       depends on CPU_CAVIUM_OCTEON
+       depends on CAVIUM_OCTEON_SOC
        default n
        select USB_EHCI_BIG_ENDIAN_MMIO
        help
@@@ -343,19 -345,9 +343,19 @@@ config USB_ISP1362_HC
          To compile this driver as a module, choose M here: the
          module will be called isp1362-hcd.
  
 +config USB_FUSBH200_HCD
 +      tristate "FUSBH200 HCD support"
 +      depends on USB
 +      default N
 +      ---help---
 +      Faraday FUSBH200 is designed to meet USB2.0 EHCI specification
 +      with minor modification.
 +
 +      To compile this driver as a module, choose M here: the
 +      module will be called fusbh200-hcd.
 +
  config USB_OHCI_HCD
 -      tristate "OHCI HCD support"
 -      depends on USB_ARCH_HAS_OHCI
 +      tristate "OHCI HCD (USB 1.1) support"
        select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
        depends on USB_ISP1301 || !ARCH_LPC32XX
        ---help---
@@@ -423,8 -415,8 +423,8 @@@ config USB_OHCI_HCD_PPC_O
        default USB_OHCI_HCD_PPC_OF_BE || USB_OHCI_HCD_PPC_OF_LE
  
  config USB_OHCI_HCD_PCI
 -      bool "OHCI support for PCI-bus USB controllers"
 -      depends on PCI && (STB03xxx || PPC_MPC52xx || USB_OHCI_HCD_PPC_OF)
 +      tristate "OHCI support for PCI-bus USB controllers"
 +      depends on PCI
        default y
        select USB_OHCI_LITTLE_ENDIAN
        ---help---
@@@ -478,7 -470,7 +478,7 @@@ config USB_CNS3XXX_OHC
          It is needed for low-speed USB 1.0 device support.
  
  config USB_OHCI_HCD_PLATFORM
 -      bool "Generic OHCI driver for a platform device"
 +      tristate "Generic OHCI driver for a platform device"
        default n
        ---help---
          Adds an OHCI host driver for a generic platform device, which
  
  config USB_OCTEON_OHCI
        bool "Octeon on-chip OHCI support"
-       depends on CPU_CAVIUM_OCTEON
+       depends on CAVIUM_OCTEON_SOC
        default USB_OCTEON_EHCI
        select USB_OHCI_BIG_ENDIAN_MMIO
        select USB_OHCI_LITTLE_ENDIAN
diff --combined drivers/watchdog/Kconfig
@@@ -221,6 -221,15 +221,6 @@@ config DW_WATCHDO
          To compile this driver as a module, choose M here: the
          module will be called dw_wdt.
  
 -config MPCORE_WATCHDOG
 -      tristate "MPcore watchdog"
 -      depends on HAVE_ARM_TWD
 -      help
 -        Watchdog timer embedded into the MPcore system.
 -
 -        To compile this driver as a module, choose M here: the
 -        module will be called mpcore_wdt.
 -
  config EP93XX_WATCHDOG
        tristate "EP93xx Watchdog"
        depends on ARCH_EP93XX
@@@ -282,7 -291,7 +282,7 @@@ config DAVINCI_WATCHDO
  
  config ORION_WATCHDOG
        tristate "Orion watchdog"
 -      depends on ARCH_ORION5X || ARCH_KIRKWOOD
 +      depends on ARCH_ORION5X || ARCH_KIRKWOOD || ARCH_DOVE
        select WATCHDOG_CORE
        help
          Say Y here if to include support for the watchdog timer
@@@ -678,17 -687,6 +678,17 @@@ config HP_WATCHDO
          To compile this driver as a module, choose M here: the module will be
          called hpwdt.
  
 +config KEMPLD_WDT
 +      tristate "Kontron COM Watchdog Timer"
 +      depends on MFD_KEMPLD
 +      select WATCHDOG_CORE
 +      help
 +        Support for the PLD watchdog on some Kontron ETX and COMexpress
 +        (ETXexpress) modules
 +
 +        This driver can also be built as a module. If so, the module will be
 +        called kempld_wdt.
 +
  config HPWDT_NMI_DECODING
        bool "NMI decoding support for the HP ProLiant iLO2+ Hardware Watchdog Timer"
        depends on HP_WATCHDOG
@@@ -1074,7 -1072,7 +1074,7 @@@ config TXX9_WD
  
  config OCTEON_WDT
        tristate "Cavium OCTEON SOC family Watchdog Timer"
-       depends on CPU_CAVIUM_OCTEON
+       depends on CAVIUM_OCTEON_SOC
        default y
        select EXPORT_UASM if OCTEON_WDT = m
        help
@@@ -1100,17 -1098,6 +1100,17 @@@ config BCM63XX_WD
          To compile this driver as a loadable module, choose M here.
          The module will be called bcm63xx_wdt.
  
 +config BCM2835_WDT
 +      tristate "Broadcom BCM2835 hardware watchdog"
 +      depends on ARCH_BCM2835
 +      select WATCHDOG_CORE
 +      help
 +        Watchdog driver for the built in watchdog hardware in Broadcom
 +        BCM2835 SoC.
 +
 +        To compile this driver as a loadable module, choose M here.
 +        The module will be called bcm2835_wdt.
 +
  config LANTIQ_WDT
        tristate "Lantiq SoC watchdog"
        depends on LANTIQ
@@@ -1185,18 -1172,6 +1185,18 @@@ config BOOKE_WDT_DEFAULT_TIMEOU
  
          The value can be overridden by the wdt_period command-line parameter.
  
 +config MEN_A21_WDT
 +       tristate "MEN A21 VME CPU Carrier Board Watchdog Timer"
 +       select WATCHDOG_CORE
 +       depends on GPIOLIB
 +       help
 +        Watchdog driver for MEN A21 VMEbus CPU Carrier Boards.
 +
 +      The driver can also be built as a module. If so, the module will be
 +      called mena21_wdt.
 +
 +      If unsure select N here.
 +
  # PPC64 Architecture
  
  config WATCHDOG_RTAS
@@@ -62,6 -62,7 +62,7 @@@ header-y += auxvec.
  header-y += ax25.h
  header-y += b1lli.h
  header-y += baycom.h
+ header-y += bcm933xx_hcs.h
  header-y += bfs_fs.h
  header-y += binfmts.h
  header-y += blkpg.h
@@@ -261,7 -262,6 +262,7 @@@ header-y += net_dropmon.
  header-y += net_tstamp.h
  header-y += netconf.h
  header-y += netdevice.h
 +header-y += netlink_diag.h
  header-y += netfilter.h
  header-y += netfilter_arp.h
  header-y += netfilter_bridge.h
diff --combined kernel/irq/irqdomain.c
  #include <linux/smp.h>
  #include <linux/fs.h>
  
 -#define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
 -                               * ie. legacy 8259, gets irqs 1..15 */
 -#define IRQ_DOMAIN_MAP_NOMAP 1 /* no fast reverse mapping */
 -#define IRQ_DOMAIN_MAP_LINEAR 2 /* linear map of interrupts */
 -#define IRQ_DOMAIN_MAP_TREE 3 /* radix tree */
 -
  static LIST_HEAD(irq_domain_list);
  static DEFINE_MUTEX(irq_domain_mutex);
  
@@@ -23,11 -29,9 +23,11 @@@ static DEFINE_MUTEX(revmap_trees_mutex)
  static struct irq_domain *irq_default_domain;
  
  /**
 - * irq_domain_alloc() - Allocate a new irq_domain data structure
 + * __irq_domain_add() - Allocate a new irq_domain data structure
   * @of_node: optional device-tree node of the interrupt controller
 - * @revmap_type: type of reverse mapping to use
 + * @size: Size of linear map; 0 for radix mapping only
 + * @direct_max: Maximum value of direct maps; Use ~0 for no limit; 0 for no
 + *              direct mapping
   * @ops: map/unmap domain callbacks
   * @host_data: Controller private data pointer
   *
   * register allocated irq_domain with irq_domain_register().  Returns pointer
   * to IRQ domain, or NULL on failure.
   */
 -static struct irq_domain *irq_domain_alloc(struct device_node *of_node,
 -                                         unsigned int revmap_type,
 -                                         const struct irq_domain_ops *ops,
 -                                         void *host_data)
 +struct irq_domain *__irq_domain_add(struct device_node *of_node, int size,
 +                                  irq_hw_number_t hwirq_max, int direct_max,
 +                                  const struct irq_domain_ops *ops,
 +                                  void *host_data)
  {
        struct irq_domain *domain;
  
 -      domain = kzalloc_node(sizeof(*domain), GFP_KERNEL,
 -                            of_node_to_nid(of_node));
 +      domain = kzalloc_node(sizeof(*domain) + (sizeof(unsigned int) * size),
 +                            GFP_KERNEL, of_node_to_nid(of_node));
        if (WARN_ON(!domain))
                return NULL;
  
        /* Fill structure */
 -      domain->revmap_type = revmap_type;
 +      INIT_RADIX_TREE(&domain->revmap_tree, GFP_KERNEL);
        domain->ops = ops;
        domain->host_data = host_data;
        domain->of_node = of_node_get(of_node);
 +      domain->hwirq_max = hwirq_max;
 +      domain->revmap_size = size;
 +      domain->revmap_direct_max_irq = direct_max;
  
 -      return domain;
 -}
 -
 -static void irq_domain_free(struct irq_domain *domain)
 -{
 -      of_node_put(domain->of_node);
 -      kfree(domain);
 -}
 -
 -static void irq_domain_add(struct irq_domain *domain)
 -{
        mutex_lock(&irq_domain_mutex);
        list_add(&domain->link, &irq_domain_list);
        mutex_unlock(&irq_domain_mutex);
 -      pr_debug("Allocated domain of type %d @0x%p\n",
 -               domain->revmap_type, domain);
 +
 +      pr_debug("Added domain %s\n", domain->name);
 +      return domain;
  }
 +EXPORT_SYMBOL_GPL(__irq_domain_add);
  
  /**
   * irq_domain_remove() - Remove an irq domain.
@@@ -77,12 -87,29 +77,12 @@@ void irq_domain_remove(struct irq_domai
  {
        mutex_lock(&irq_domain_mutex);
  
 -      switch (domain->revmap_type) {
 -      case IRQ_DOMAIN_MAP_LEGACY:
 -              /*
 -               * Legacy domains don't manage their own irq_desc
 -               * allocations, we expect the caller to handle irq_desc
 -               * freeing on their own.
 -               */
 -              break;
 -      case IRQ_DOMAIN_MAP_TREE:
 -              /*
 -               * radix_tree_delete() takes care of destroying the root
 -               * node when all entries are removed. Shout if there are
 -               * any mappings left.
 -               */
 -              WARN_ON(domain->revmap_data.tree.height);
 -              break;
 -      case IRQ_DOMAIN_MAP_LINEAR:
 -              kfree(domain->revmap_data.linear.revmap);
 -              domain->revmap_data.linear.size = 0;
 -              break;
 -      case IRQ_DOMAIN_MAP_NOMAP:
 -              break;
 -      }
 +      /*
 +       * radix_tree_delete() takes care of destroying the root
 +       * node when all entries are removed. Shout if there are
 +       * any mappings left.
 +       */
 +      WARN_ON(domain->revmap_tree.height);
  
        list_del(&domain->link);
  
  
        mutex_unlock(&irq_domain_mutex);
  
 -      pr_debug("Removed domain of type %d @0x%p\n",
 -               domain->revmap_type, domain);
 +      pr_debug("Removed domain %s\n", domain->name);
  
 -      irq_domain_free(domain);
 +      of_node_put(domain->of_node);
 +      kfree(domain);
  }
  EXPORT_SYMBOL_GPL(irq_domain_remove);
  
 -static unsigned int irq_domain_legacy_revmap(struct irq_domain *domain,
 -                                           irq_hw_number_t hwirq)
 -{
 -      irq_hw_number_t first_hwirq = domain->revmap_data.legacy.first_hwirq;
 -      int size = domain->revmap_data.legacy.size;
 -
 -      if (WARN_ON(hwirq < first_hwirq || hwirq >= first_hwirq + size))
 -              return 0;
 -      return hwirq - first_hwirq + domain->revmap_data.legacy.first_irq;
 -}
 -
  /**
 - * irq_domain_add_simple() - Allocate and register a simple irq_domain.
 + * irq_domain_add_simple() - Register an irq_domain and optionally map a range of irqs
   * @of_node: pointer to interrupt controller's device tree node.
   * @size: total number of irqs in mapping
   * @first_irq: first number of irq block assigned to the domain,
 - *    pass zero to assign irqs on-the-fly. This will result in a
 - *    linear IRQ domain so it is important to use irq_create_mapping()
 - *    for each used IRQ, especially when SPARSE_IRQ is enabled.
 + *    pass zero to assign irqs on-the-fly. If first_irq is non-zero, then
 + *    pre-map all of the irqs in the domain to virqs starting at first_irq.
   * @ops: map/unmap domain callbacks
   * @host_data: Controller private data pointer
   *
 - * Allocates a legacy irq_domain if irq_base is positive or a linear
 - * domain otherwise. For the legacy domain, IRQ descriptors will also
 - * be allocated.
 + * Allocates an irq_domain, and optionally if first_irq is positive then also
 + * allocate irq_descs and map all of the hwirqs to virqs starting at first_irq.
   *
   * This is intended to implement the expected behaviour for most
 - * interrupt controllers which is that a linear mapping should
 - * normally be used unless the system requires a legacy mapping in
 - * order to support supplying interrupt numbers during non-DT
 - * registration of devices.
 + * interrupt controllers. If device tree is used, then first_irq will be 0 and
 + * irqs get mapped dynamically on the fly. However, if the controller requires
 + * static virq assignments (non-DT boot) then it will set that up correctly.
   */
  struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
                                         unsigned int size,
                                         const struct irq_domain_ops *ops,
                                         void *host_data)
  {
 -      if (first_irq > 0) {
 -              int irq_base;
 +      struct irq_domain *domain;
  
 +      domain = __irq_domain_add(of_node, size, size, 0, ops, host_data);
 +      if (!domain)
 +              return NULL;
 +
 +      if (first_irq > 0) {
                if (IS_ENABLED(CONFIG_SPARSE_IRQ)) {
 -                      /*
 -                       * Set the descriptor allocator to search for a
 -                       * 1-to-1 mapping, such as irq_alloc_desc_at().
 -                       * Use of_node_to_nid() which is defined to
 -                       * numa_node_id() on platforms that have no custom
 -                       * implementation.
 -                       */
 -                      irq_base = irq_alloc_descs(first_irq, first_irq, size,
 -                                                 of_node_to_nid(of_node));
 -                      if (irq_base < 0) {
 +                      /* attempt to allocated irq_descs */
 +                      int rc = irq_alloc_descs(first_irq, first_irq, size,
 +                                               of_node_to_nid(of_node));
 +                      if (rc < 0)
                                pr_info("Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n",
                                        first_irq);
 -                              irq_base = first_irq;
 -                      }
 -              } else
 -                      irq_base = first_irq;
 -
 -              return irq_domain_add_legacy(of_node, size, irq_base, 0,
 -                                           ops, host_data);
 +              }
 +              irq_domain_associate_many(domain, first_irq, 0, size);
        }
  
 -      /* A linear domain is the default */
 -      return irq_domain_add_linear(of_node, size, ops, host_data);
 +      return domain;
  }
  EXPORT_SYMBOL_GPL(irq_domain_add_simple);
  
@@@ -170,18 -219,130 +170,18 @@@ struct irq_domain *irq_domain_add_legac
                                         void *host_data)
  {
        struct irq_domain *domain;
 -      unsigned int i;
  
 -      domain = irq_domain_alloc(of_node, IRQ_DOMAIN_MAP_LEGACY, ops, host_data);
 +      domain = __irq_domain_add(of_node, first_hwirq + size,
 +                                first_hwirq + size, 0, ops, host_data);
        if (!domain)
                return NULL;
  
 -      domain->revmap_data.legacy.first_irq = first_irq;
 -      domain->revmap_data.legacy.first_hwirq = first_hwirq;
 -      domain->revmap_data.legacy.size = size;
 -
 -      mutex_lock(&irq_domain_mutex);
 -      /* Verify that all the irqs are available */
 -      for (i = 0; i < size; i++) {
 -              int irq = first_irq + i;
 -              struct irq_data *irq_data = irq_get_irq_data(irq);
 -
 -              if (WARN_ON(!irq_data || irq_data->domain)) {
 -                      mutex_unlock(&irq_domain_mutex);
 -                      irq_domain_free(domain);
 -                      return NULL;
 -              }
 -      }
 -
 -      /* Claim all of the irqs before registering a legacy domain */
 -      for (i = 0; i < size; i++) {
 -              struct irq_data *irq_data = irq_get_irq_data(first_irq + i);
 -              irq_data->hwirq = first_hwirq + i;
 -              irq_data->domain = domain;
 -      }
 -      mutex_unlock(&irq_domain_mutex);
 -
 -      for (i = 0; i < size; i++) {
 -              int irq = first_irq + i;
 -              int hwirq = first_hwirq + i;
 -
 -              /* IRQ0 gets ignored */
 -              if (!irq)
 -                      continue;
 +      irq_domain_associate_many(domain, first_irq, first_hwirq, size);
  
 -              /* Legacy flags are left to default at this point,
 -               * one can then use irq_create_mapping() to
 -               * explicitly change them
 -               */
 -              if (ops->map)
 -                      ops->map(domain, irq, hwirq);
 -
 -              /* Clear norequest flags */
 -              irq_clear_status_flags(irq, IRQ_NOREQUEST);
 -      }
 -
 -      irq_domain_add(domain);
        return domain;
  }
  EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
  
 -/**
 - * irq_domain_add_linear() - Allocate and register a linear revmap irq_domain.
 - * @of_node: pointer to interrupt controller's device tree node.
 - * @size: Number of interrupts in the domain.
 - * @ops: map/unmap domain callbacks
 - * @host_data: Controller private data pointer
 - */
 -struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
 -                                       unsigned int size,
 -                                       const struct irq_domain_ops *ops,
 -                                       void *host_data)
 -{
 -      struct irq_domain *domain;
 -      unsigned int *revmap;
 -
 -      revmap = kzalloc_node(sizeof(*revmap) * size, GFP_KERNEL,
 -                            of_node_to_nid(of_node));
 -      if (WARN_ON(!revmap))
 -              return NULL;
 -
 -      domain = irq_domain_alloc(of_node, IRQ_DOMAIN_MAP_LINEAR, ops, host_data);
 -      if (!domain) {
 -              kfree(revmap);
 -              return NULL;
 -      }
 -      domain->revmap_data.linear.size = size;
 -      domain->revmap_data.linear.revmap = revmap;
 -      irq_domain_add(domain);
 -      return domain;
 -}
 -EXPORT_SYMBOL_GPL(irq_domain_add_linear);
 -
 -struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
 -                                       unsigned int max_irq,
 -                                       const struct irq_domain_ops *ops,
 -                                       void *host_data)
 -{
 -      struct irq_domain *domain = irq_domain_alloc(of_node,
 -                                      IRQ_DOMAIN_MAP_NOMAP, ops, host_data);
 -      if (domain) {
 -              domain->revmap_data.nomap.max_irq = max_irq ? max_irq : ~0;
 -              irq_domain_add(domain);
 -      }
 -      return domain;
 -}
 -EXPORT_SYMBOL_GPL(irq_domain_add_nomap);
 -
 -/**
 - * irq_domain_add_tree()
 - * @of_node: pointer to interrupt controller's device tree node.
 - * @ops: map/unmap domain callbacks
 - *
 - * Note: The radix tree will be allocated later during boot automatically
 - * (the reverse mapping will use the slow path until that happens).
 - */
 -struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
 -                                       const struct irq_domain_ops *ops,
 -                                       void *host_data)
 -{
 -      struct irq_domain *domain = irq_domain_alloc(of_node,
 -                                      IRQ_DOMAIN_MAP_TREE, ops, host_data);
 -      if (domain) {
 -              INIT_RADIX_TREE(&domain->revmap_data.tree, GFP_KERNEL);
 -              irq_domain_add(domain);
 -      }
 -      return domain;
 -}
 -EXPORT_SYMBOL_GPL(irq_domain_add_tree);
 -
  /**
   * irq_find_host() - Locates a domain for a given device node
   * @node: device-tree node of the interrupt controller
@@@ -230,108 -391,125 +230,108 @@@ void irq_set_default_host(struct irq_do
  }
  EXPORT_SYMBOL_GPL(irq_set_default_host);
  
 -static void irq_domain_disassociate_many(struct irq_domain *domain,
 -                                       unsigned int irq_base, int count)
 +static void irq_domain_disassociate(struct irq_domain *domain, unsigned int irq)
  {
 -      /*
 -       * disassociate in reverse order;
 -       * not strictly necessary, but nice for unwinding
 -       */
 -      while (count--) {
 -              int irq = irq_base + count;
 -              struct irq_data *irq_data = irq_get_irq_data(irq);
 -              irq_hw_number_t hwirq;
 +      struct irq_data *irq_data = irq_get_irq_data(irq);
 +      irq_hw_number_t hwirq;
  
 -              if (WARN_ON(!irq_data || irq_data->domain != domain))
 -                      continue;
 +      if (WARN(!irq_data || irq_data->domain != domain,
 +               "virq%i doesn't exist; cannot disassociate\n", irq))
 +              return;
  
 -              hwirq = irq_data->hwirq;
 -              irq_set_status_flags(irq, IRQ_NOREQUEST);
 +      hwirq = irq_data->hwirq;
 +      irq_set_status_flags(irq, IRQ_NOREQUEST);
  
 -              /* remove chip and handler */
 -              irq_set_chip_and_handler(irq, NULL, NULL);
 +      /* remove chip and handler */
 +      irq_set_chip_and_handler(irq, NULL, NULL);
  
 -              /* Make sure it's completed */
 -              synchronize_irq(irq);
 +      /* Make sure it's completed */
 +      synchronize_irq(irq);
  
 -              /* Tell the PIC about it */
 -              if (domain->ops->unmap)
 -                      domain->ops->unmap(domain, irq);
 -              smp_mb();
 +      /* Tell the PIC about it */
 +      if (domain->ops->unmap)
 +              domain->ops->unmap(domain, irq);
 +      smp_mb();
  
 -              irq_data->domain = NULL;
 -              irq_data->hwirq = 0;
 +      irq_data->domain = NULL;
 +      irq_data->hwirq = 0;
  
 -              /* Clear reverse map */
 -              switch(domain->revmap_type) {
 -              case IRQ_DOMAIN_MAP_LINEAR:
 -                      if (hwirq < domain->revmap_data.linear.size)
 -                              domain->revmap_data.linear.revmap[hwirq] = 0;
 -                      break;
 -              case IRQ_DOMAIN_MAP_TREE:
 -                      mutex_lock(&revmap_trees_mutex);
 -                      radix_tree_delete(&domain->revmap_data.tree, hwirq);
 -                      mutex_unlock(&revmap_trees_mutex);
 -                      break;
 -              }
 +      /* Clear reverse map for this hwirq */
 +      if (hwirq < domain->revmap_size) {
 +              domain->linear_revmap[hwirq] = 0;
 +      } else {
 +              mutex_lock(&revmap_trees_mutex);
 +              radix_tree_delete(&domain->revmap_tree, hwirq);
 +              mutex_unlock(&revmap_trees_mutex);
        }
  }
  
 -int irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base,
 -                            irq_hw_number_t hwirq_base, int count)
 +int irq_domain_associate(struct irq_domain *domain, unsigned int virq,
 +                       irq_hw_number_t hwirq)
  {
 -      unsigned int virq = irq_base;
 -      irq_hw_number_t hwirq = hwirq_base;
 -      int i, ret;
 +      struct irq_data *irq_data = irq_get_irq_data(virq);
 +      int ret;
  
 -      pr_debug("%s(%s, irqbase=%i, hwbase=%i, count=%i)\n", __func__,
 -              of_node_full_name(domain->of_node), irq_base, (int)hwirq_base, count);
 +      if (WARN(hwirq >= domain->hwirq_max,
 +               "error: hwirq 0x%x is too large for %s\n", (int)hwirq, domain->name))
 +              return -EINVAL;
 +      if (WARN(!irq_data, "error: virq%i is not allocated", virq))
 +              return -EINVAL;
 +      if (WARN(irq_data->domain, "error: virq%i is already associated", virq))
 +              return -EINVAL;
  
 -      for (i = 0; i < count; i++) {
 -              struct irq_data *irq_data = irq_get_irq_data(virq + i);
 -
 -              if (WARN(!irq_data, "error: irq_desc not allocated; "
 -                       "irq=%i hwirq=0x%x\n", virq + i, (int)hwirq + i))
 -                      return -EINVAL;
 -              if (WARN(irq_data->domain, "error: irq_desc already associated; "
 -                       "irq=%i hwirq=0x%x\n", virq + i, (int)hwirq + i))
 -                      return -EINVAL;
 -      };
 -
 -      for (i = 0; i < count; i++, virq++, hwirq++) {
 -              struct irq_data *irq_data = irq_get_irq_data(virq);
 -
 -              irq_data->hwirq = hwirq;
 -              irq_data->domain = domain;
 -              if (domain->ops->map) {
 -                      ret = domain->ops->map(domain, virq, hwirq);
 -                      if (ret != 0) {
 -                              /*
 -                               * If map() returns -EPERM, this interrupt is protected
 -                               * by the firmware or some other service and shall not
 -                               * be mapped.
 -                               *
 -                               * Since on some platforms we blindly try to map everything
 -                               * we end up with a log full of backtraces.
 -                               *
 -                               * So instead, we silently fail on -EPERM, it is the
 -                               * responsibility of the PIC driver to display a relevant
 -                               * message if needed.
 -                               */
 -                              if (ret != -EPERM) {
 -                                      pr_err("irq-%i==>hwirq-0x%lx mapping failed: %d\n",
 -                                             virq, hwirq, ret);
 -                                      WARN_ON(1);
 -                              }
 -                              irq_data->domain = NULL;
 -                              irq_data->hwirq = 0;
 -                              goto err_unmap;
 +      mutex_lock(&irq_domain_mutex);
 +      irq_data->hwirq = hwirq;
 +      irq_data->domain = domain;
 +      if (domain->ops->map) {
 +              ret = domain->ops->map(domain, virq, hwirq);
 +              if (ret != 0) {
 +                      /*
 +                       * If map() returns -EPERM, this interrupt is protected
 +                       * by the firmware or some other service and shall not
 +                       * be mapped. Don't bother telling the user about it.
 +                       */
 +                      if (ret != -EPERM) {
 +                              pr_info("%s didn't like hwirq-0x%lx to VIRQ%i mapping (rc=%d)\n",
 +                                     domain->name, hwirq, virq, ret);
                        }
 +                      irq_data->domain = NULL;
 +                      irq_data->hwirq = 0;
 +                      mutex_unlock(&irq_domain_mutex);
 +                      return ret;
                }
  
 -              switch (domain->revmap_type) {
 -              case IRQ_DOMAIN_MAP_LINEAR:
 -                      if (hwirq < domain->revmap_data.linear.size)
 -                              domain->revmap_data.linear.revmap[hwirq] = virq;
 -                      break;
 -              case IRQ_DOMAIN_MAP_TREE:
 -                      mutex_lock(&revmap_trees_mutex);
 -                      radix_tree_insert(&domain->revmap_data.tree, hwirq, irq_data);
 -                      mutex_unlock(&revmap_trees_mutex);
 -                      break;
 -              }
 +              /* If not already assigned, give the domain the chip's name */
 +              if (!domain->name && irq_data->chip)
 +                      domain->name = irq_data->chip->name;
 +      }
  
 -              irq_clear_status_flags(virq, IRQ_NOREQUEST);
 +      if (hwirq < domain->revmap_size) {
 +              domain->linear_revmap[hwirq] = virq;
 +      } else {
 +              mutex_lock(&revmap_trees_mutex);
 +              radix_tree_insert(&domain->revmap_tree, hwirq, irq_data);
 +              mutex_unlock(&revmap_trees_mutex);
        }
 +      mutex_unlock(&irq_domain_mutex);
 +
 +      irq_clear_status_flags(virq, IRQ_NOREQUEST);
  
        return 0;
 +}
 +EXPORT_SYMBOL_GPL(irq_domain_associate);
  
 - err_unmap:
 -      irq_domain_disassociate_many(domain, irq_base, i);
 -      return -EINVAL;
 +void irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base,
 +                             irq_hw_number_t hwirq_base, int count)
 +{
 +      int i;
 +
 +      pr_debug("%s(%s, irqbase=%i, hwbase=%i, count=%i)\n", __func__,
 +              of_node_full_name(domain->of_node), irq_base, (int)hwirq_base, count);
 +
 +      for (i = 0; i < count; i++) {
 +              irq_domain_associate(domain, irq_base + i, hwirq_base + i);
 +      }
  }
  EXPORT_SYMBOL_GPL(irq_domain_associate_many);
  
   *
   * This routine is used for irq controllers which can choose the hardware
   * interrupt numbers they generate. In such a case it's simplest to use
 - * the linux irq as the hardware interrupt number.
 + * the linux irq as the hardware interrupt number. It still uses the linear
 + * or radix tree to store the mapping, but the irq controller can optimize
 + * the revmap path by using the hwirq directly.
   */
  unsigned int irq_create_direct_mapping(struct irq_domain *domain)
  {
        if (domain == NULL)
                domain = irq_default_domain;
  
 -      if (WARN_ON(!domain || domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP))
 -              return 0;
 -
        virq = irq_alloc_desc_from(1, of_node_to_nid(domain->of_node));
        if (!virq) {
                pr_debug("create_direct virq allocation failed\n");
                return 0;
        }
 -      if (virq >= domain->revmap_data.nomap.max_irq) {
 +      if (virq >= domain->revmap_direct_max_irq) {
                pr_err("ERROR: no free irqs available below %i maximum\n",
 -                      domain->revmap_data.nomap.max_irq);
 +                      domain->revmap_direct_max_irq);
                irq_free_desc(virq);
                return 0;
        }
@@@ -396,7 -575,9 +396,7 @@@ unsigned int irq_create_mapping(struct 
        if (domain == NULL)
                domain = irq_default_domain;
        if (domain == NULL) {
 -              pr_warning("irq_create_mapping called for"
 -                         " NULL domain, hwirq=%lx\n", hwirq);
 -              WARN_ON(1);
 +              WARN(1, "%s(, %lx) called with NULL domain\n", __func__, hwirq);
                return 0;
        }
        pr_debug("-> using domain @%p\n", domain);
                return virq;
        }
  
 -      /* Get a virtual interrupt number */
 -      if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
 -              return irq_domain_legacy_revmap(domain, hwirq);
 -
        /* Allocate a virtual interrupt number */
        hint = hwirq % nr_irqs;
        if (hint == 0)
@@@ -460,7 -645,12 +460,7 @@@ int irq_create_strict_mappings(struct i
        if (unlikely(ret < 0))
                return ret;
  
 -      ret = irq_domain_associate_many(domain, irq_base, hwirq_base, count);
 -      if (unlikely(ret < 0)) {
 -              irq_free_descs(irq_base, count);
 -              return ret;
 -      }
 -
 +      irq_domain_associate_many(domain, irq_base, hwirq_base, count);
        return 0;
  }
  EXPORT_SYMBOL_GPL(irq_create_strict_mappings);
@@@ -475,20 -665,8 +475,8 @@@ unsigned int irq_create_of_mapping(stru
  
        domain = controller ? irq_find_host(controller) : irq_default_domain;
        if (!domain) {
- #ifdef CONFIG_MIPS
-               /*
-                * Workaround to avoid breaking interrupt controller drivers
-                * that don't yet register an irq_domain.  This is temporary
-                * code. ~~~gcl, Feb 24, 2012
-                *
-                * Scheduled for removal in Linux v3.6.  That should be enough
-                * time.
-                */
-               if (intsize > 0)
-                       return intspec[0];
- #endif
 -              pr_warning("no irq domain found for %s !\n",
 -                         of_node_full_name(controller));
 +              pr_warn("no irq domain found for %s !\n",
 +                      of_node_full_name(controller));
                return 0;
        }
  
  
        /* Set type if specified and different than the current one */
        if (type != IRQ_TYPE_NONE &&
 -          type != (irqd_get_trigger_type(irq_get_irq_data(virq))))
 +          type != irq_get_trigger_type(virq))
                irq_set_irq_type(virq, type);
        return virq;
  }
@@@ -530,7 -708,11 +518,7 @@@ void irq_dispose_mapping(unsigned int v
        if (WARN_ON(domain == NULL))
                return;
  
 -      /* Never unmap legacy interrupts */
 -      if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
 -              return;
 -
 -      irq_domain_disassociate_many(domain, virq, 1);
 +      irq_domain_disassociate(domain, virq);
        irq_free_desc(virq);
  }
  EXPORT_SYMBOL_GPL(irq_dispose_mapping);
@@@ -551,51 -733,63 +539,51 @@@ unsigned int irq_find_mapping(struct ir
        if (domain == NULL)
                return 0;
  
 -      switch (domain->revmap_type) {
 -      case IRQ_DOMAIN_MAP_LEGACY:
 -              return irq_domain_legacy_revmap(domain, hwirq);
 -      case IRQ_DOMAIN_MAP_LINEAR:
 -              return irq_linear_revmap(domain, hwirq);
 -      case IRQ_DOMAIN_MAP_TREE:
 -              rcu_read_lock();
 -              data = radix_tree_lookup(&domain->revmap_data.tree, hwirq);
 -              rcu_read_unlock();
 -              if (data)
 -                      return data->irq;
 -              break;
 -      case IRQ_DOMAIN_MAP_NOMAP:
 +      if (hwirq < domain->revmap_direct_max_irq) {
                data = irq_get_irq_data(hwirq);
                if (data && (data->domain == domain) && (data->hwirq == hwirq))
                        return hwirq;
 -              break;
        }
  
 -      return 0;
 -}
 -EXPORT_SYMBOL_GPL(irq_find_mapping);
 -
 -/**
 - * irq_linear_revmap() - Find a linux irq from a hw irq number.
 - * @domain: domain owning this hardware interrupt
 - * @hwirq: hardware irq number in that domain space
 - *
 - * This is a fast path that can be called directly by irq controller code to
 - * save a handful of instructions.
 - */
 -unsigned int irq_linear_revmap(struct irq_domain *domain,
 -                             irq_hw_number_t hwirq)
 -{
 -      BUG_ON(domain->revmap_type != IRQ_DOMAIN_MAP_LINEAR);
 -
 -      /* Check revmap bounds; complain if exceeded */
 -      if (WARN_ON(hwirq >= domain->revmap_data.linear.size))
 -              return 0;
 +      /* Check if the hwirq is in the linear revmap. */
 +      if (hwirq < domain->revmap_size)
 +              return domain->linear_revmap[hwirq];
  
 -      return domain->revmap_data.linear.revmap[hwirq];
 +      rcu_read_lock();
 +      data = radix_tree_lookup(&domain->revmap_tree, hwirq);
 +      rcu_read_unlock();
 +      return data ? data->irq : 0;
  }
 -EXPORT_SYMBOL_GPL(irq_linear_revmap);
 +EXPORT_SYMBOL_GPL(irq_find_mapping);
  
  #ifdef CONFIG_IRQ_DOMAIN_DEBUG
  static int virq_debug_show(struct seq_file *m, void *private)
  {
        unsigned long flags;
        struct irq_desc *desc;
 -      const char *p;
 -      static const char none[] = "none";
 -      void *data;
 +      struct irq_domain *domain;
 +      struct radix_tree_iter iter;
 +      void *data, **slot;
        int i;
  
 -      seq_printf(m, "%-5s  %-7s  %-15s  %-*s  %s\n", "irq", "hwirq",
 +      seq_printf(m, " %-16s  %-6s  %-10s  %-10s  %s\n",
 +                 "name", "mapped", "linear-max", "direct-max", "devtree-node");
 +      mutex_lock(&irq_domain_mutex);
 +      list_for_each_entry(domain, &irq_domain_list, link) {
 +              int count = 0;
 +              radix_tree_for_each_slot(slot, &domain->revmap_tree, &iter, 0)
 +                      count++;
 +              seq_printf(m, "%c%-16s  %6u  %10u  %10u  %s\n",
 +                         domain == irq_default_domain ? '*' : ' ', domain->name,
 +                         domain->revmap_size + count, domain->revmap_size,
 +                         domain->revmap_direct_max_irq,
 +                         domain->of_node ? of_node_full_name(domain->of_node) : "");
 +      }
 +      mutex_unlock(&irq_domain_mutex);
 +
 +      seq_printf(m, "%-5s  %-7s  %-15s  %-*s  %6s  %-14s  %s\n", "irq", "hwirq",
                      "chip name", (int)(2 * sizeof(void *) + 2), "chip data",
 -                    "domain name");
 +                    "active", "type", "domain");
  
        for (i = 1; i < nr_irqs; i++) {
                desc = irq_to_desc(i);
                        continue;
  
                raw_spin_lock_irqsave(&desc->lock, flags);
 +              domain = desc->irq_data.domain;
  
 -              if (desc->action && desc->action->handler) {
 +              if (domain) {
                        struct irq_chip *chip;
 +                      int hwirq = desc->irq_data.hwirq;
 +                      bool direct;
  
                        seq_printf(m, "%5d  ", i);
 -                      seq_printf(m, "0x%05lx  ", desc->irq_data.hwirq);
 +                      seq_printf(m, "0x%05x  ", hwirq);
  
                        chip = irq_desc_get_chip(desc);
 -                      if (chip && chip->name)
 -                              p = chip->name;
 -                      else
 -                              p = none;
 -                      seq_printf(m, "%-15s  ", p);
 +                      seq_printf(m, "%-15s  ", (chip && chip->name) ? chip->name : "none");
  
                        data = irq_desc_get_chip_data(desc);
                        seq_printf(m, data ? "0x%p  " : "  %p  ", data);
  
 -                      if (desc->irq_data.domain)
 -                              p = of_node_full_name(desc->irq_data.domain->of_node);
 -                      else
 -                              p = none;
 -                      seq_printf(m, "%s\n", p);
 +                      seq_printf(m, "   %c    ", (desc->action && desc->action->handler) ? '*' : ' ');
 +                      direct = (i == hwirq) && (i < domain->revmap_direct_max_irq);
 +                      seq_printf(m, "%6s%-8s  ",
 +                                 (hwirq < domain->revmap_size) ? "LINEAR" : "RADIX",
 +                                 direct ? "(DIRECT)" : "");
 +                      seq_printf(m, "%s\n", desc->irq_data.domain->name);
                }
  
                raw_spin_unlock_irqrestore(&desc->lock, flags);
@@@ -721,3 -915,18 +709,3 @@@ const struct irq_domain_ops irq_domain_
        .xlate = irq_domain_xlate_onetwocell,
  };
  EXPORT_SYMBOL_GPL(irq_domain_simple_ops);
 -
 -#ifdef CONFIG_OF_IRQ
 -void irq_domain_generate_simple(const struct of_device_id *match,
 -                              u64 phys_base, unsigned int irq_start)
 -{
 -      struct device_node *node;
 -      pr_debug("looking for phys_base=%llx, irq_start=%i\n",
 -              (unsigned long long) phys_base, (int) irq_start);
 -      node = of_find_matching_node_by_address(NULL, match, phys_base);
 -      if (node)
 -              irq_domain_add_legacy(node, 32, irq_start, 0,
 -                                    &irq_domain_simple_ops, NULL);
 -}
 -EXPORT_SYMBOL_GPL(irq_domain_generate_simple);
 -#endif
diff --combined lib/Kconfig.debug
@@@ -1,4 -1,3 +1,4 @@@
 +menu "printk and dmesg options"
  
  config PRINTK_TIME
        bool "Show timing information on printks"
@@@ -26,123 -25,6 +26,123 @@@ config DEFAULT_MESSAGE_LOGLEVE
          that are auditing their logs closely may want to set it to a lower
          priority.
  
 +config BOOT_PRINTK_DELAY
 +      bool "Delay each boot printk message by N milliseconds"
 +      depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
 +      help
 +        This build option allows you to read kernel boot messages
 +        by inserting a short delay after each one.  The delay is
 +        specified in milliseconds on the kernel command line,
 +        using "boot_delay=N".
 +
 +        It is likely that you would also need to use "lpj=M" to preset
 +        the "loops per jiffie" value.
 +        See a previous boot log for the "lpj" value to use for your
 +        system, and then set "lpj=M" before setting "boot_delay=N".
 +        NOTE:  Using this option may adversely affect SMP systems.
 +        I.e., processors other than the first one may not boot up.
 +        BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect
 +        what it believes to be lockup conditions.
 +
 +config DYNAMIC_DEBUG
 +      bool "Enable dynamic printk() support"
 +      default n
 +      depends on PRINTK
 +      depends on DEBUG_FS
 +      help
 +
 +        Compiles debug level messages into the kernel, which would not
 +        otherwise be available at runtime. These messages can then be
 +        enabled/disabled based on various levels of scope - per source file,
 +        function, module, format string, and line number. This mechanism
 +        implicitly compiles in all pr_debug() and dev_dbg() calls, which
 +        enlarges the kernel text size by about 2%.
 +
 +        If a source file is compiled with DEBUG flag set, any
 +        pr_debug() calls in it are enabled by default, but can be
 +        disabled at runtime as below.  Note that DEBUG flag is
 +        turned on by many CONFIG_*DEBUG* options.
 +
 +        Usage:
 +
 +        Dynamic debugging is controlled via the 'dynamic_debug/control' file,
 +        which is contained in the 'debugfs' filesystem. Thus, the debugfs
 +        filesystem must first be mounted before making use of this feature.
 +        We refer the control file as: <debugfs>/dynamic_debug/control. This
 +        file contains a list of the debug statements that can be enabled. The
 +        format for each line of the file is:
 +
 +              filename:lineno [module]function flags format
 +
 +        filename : source file of the debug statement
 +        lineno : line number of the debug statement
 +        module : module that contains the debug statement
 +        function : function that contains the debug statement
 +          flags : '=p' means the line is turned 'on' for printing
 +          format : the format used for the debug statement
 +
 +        From a live system:
 +
 +              nullarbor:~ # cat <debugfs>/dynamic_debug/control
 +              # filename:lineno [module]function flags format
 +              fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
 +              fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
 +              fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
 +
 +        Example usage:
 +
 +              // enable the message at line 1603 of file svcsock.c
 +              nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
 +                                              <debugfs>/dynamic_debug/control
 +
 +              // enable all the messages in file svcsock.c
 +              nullarbor:~ # echo -n 'file svcsock.c +p' >
 +                                              <debugfs>/dynamic_debug/control
 +
 +              // enable all the messages in the NFS server module
 +              nullarbor:~ # echo -n 'module nfsd +p' >
 +                                              <debugfs>/dynamic_debug/control
 +
 +              // enable all 12 messages in the function svc_process()
 +              nullarbor:~ # echo -n 'func svc_process +p' >
 +                                              <debugfs>/dynamic_debug/control
 +
 +              // disable all 12 messages in the function svc_process()
 +              nullarbor:~ # echo -n 'func svc_process -p' >
 +                                              <debugfs>/dynamic_debug/control
 +
 +        See Documentation/dynamic-debug-howto.txt for additional information.
 +
 +endmenu # "printk and dmesg options"
 +
 +menu "Compile-time checks and compiler options"
 +
 +config DEBUG_INFO
 +      bool "Compile the kernel with debug info"
 +      depends on DEBUG_KERNEL
 +      help
 +          If you say Y here the resulting kernel image will include
 +        debugging info resulting in a larger kernel image.
 +        This adds debug symbols to the kernel and modules (gcc -g), and
 +        is needed if you intend to use kernel crashdump or binary object
 +        tools like crash, kgdb, LKCD, gdb, etc on the kernel.
 +        Say Y here only if you plan to debug the kernel.
 +
 +        If unsure, say N.
 +
 +config DEBUG_INFO_REDUCED
 +      bool "Reduce debugging information"
 +      depends on DEBUG_INFO
 +      help
 +        If you say Y here gcc is instructed to generate less debugging
 +        information for structure types. This means that tools that
 +        need full debugging information (like kgdb or systemtap) won't
 +        be happy. But if you merely need debugging information to
 +        resolve line numbers there is no loss. Advantage is that
 +        build directory object sizes shrink dramatically over a full
 +        DEBUG_INFO build and compile times are reduced too.
 +        Only works with newer gcc versions.
 +
  config ENABLE_WARN_DEPRECATED
        bool "Enable __deprecated logic"
        default y
@@@ -170,6 -52,20 +170,6 @@@ config FRAME_WAR
          Setting it to 0 disables the warning.
          Requires gcc 4.4
  
 -config MAGIC_SYSRQ
 -      bool "Magic SysRq key"
 -      depends on !UML
 -      help
 -        If you say Y here, you will have some control over the system even
 -        if the system crashes for example during kernel debugging (e.g., you
 -        will be able to flush the buffer cache to disk, reboot the system
 -        immediately or dump some status information). This is accomplished
 -        by pressing various keys while holding SysRq (Alt+PrintScreen). It
 -        also works on a serial console (on PC hardware at least), if you
 -        send a BREAK and then within 5 seconds a command keypress. The
 -        keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
 -        unless you really know what this hack does.
 -
  config STRIP_ASM_SYMS
        bool "Strip assembler-generated symbols during link"
        default n
@@@ -210,390 -106,61 +210,390 @@@ config DEBUG_F
          debugging files into.  Enable this option to be able to read and
          write to these files.
  
 -        For detailed documentation on the debugfs API, see
 -        Documentation/DocBook/filesystems.
 +        For detailed documentation on the debugfs API, see
 +        Documentation/DocBook/filesystems.
 +
 +        If unsure, say N.
 +
 +config HEADERS_CHECK
 +      bool "Run 'make headers_check' when building vmlinux"
 +      depends on !UML
 +      help
 +        This option will extract the user-visible kernel headers whenever
 +        building the kernel, and will run basic sanity checks on them to
 +        ensure that exported files do not attempt to include files which
 +        were not exported, etc.
 +
 +        If you're making modifications to header files which are
 +        relevant for userspace, say 'Y', and check the headers
 +        exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
 +        your build tree), to make sure they're suitable.
 +
 +config DEBUG_SECTION_MISMATCH
 +      bool "Enable full Section mismatch analysis"
 +      help
 +        The section mismatch analysis checks if there are illegal
 +        references from one section to another section.
 +        During linktime or runtime, some sections are dropped;
 +        any use of code/data previously in these sections would
 +        most likely result in an oops.
 +        In the code, functions and variables are annotated with
 +        __init, __cpuinit, etc. (see the full list in include/linux/init.h),
 +        which results in the code/data being placed in specific sections.
 +        The section mismatch analysis is always performed after a full
 +        kernel build, and enabling this option causes the following
 +        additional steps to occur:
 +        - Add the option -fno-inline-functions-called-once to gcc commands.
 +          When inlining a function annotated with __init in a non-init
 +          function, we would lose the section information and thus
 +          the analysis would not catch the illegal reference.
 +          This option tells gcc to inline less (but it does result in
 +          a larger kernel).
 +        - Run the section mismatch analysis for each module/built-in.o file.
 +          When we run the section mismatch analysis on vmlinux.o, we
 +          lose valueble information about where the mismatch was
 +          introduced.
 +          Running the analysis for each module/built-in.o file
 +          tells where the mismatch happens much closer to the
 +          source. The drawback is that the same mismatch is
 +          reported at least twice.
 +        - Enable verbose reporting from modpost in order to help resolve
 +          the section mismatches that are reported.
 +
 +#
 +# Select this config option from the architecture Kconfig, if it
 +# is preferred to always offer frame pointers as a config
 +# option on the architecture (regardless of KERNEL_DEBUG):
 +#
 +config ARCH_WANT_FRAME_POINTERS
 +      bool
 +      help
 +
 +config FRAME_POINTER
 +      bool "Compile the kernel with frame pointers"
 +      depends on DEBUG_KERNEL && \
 +              (CRIS || M68K || FRV || UML || \
 +               AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \
 +              ARCH_WANT_FRAME_POINTERS
 +      default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
 +      help
 +        If you say Y here the resulting kernel image will be slightly
 +        larger and slower, but it gives very useful debugging information
 +        in case of kernel bugs. (precise oopses/stacktraces/warnings)
 +
 +config DEBUG_FORCE_WEAK_PER_CPU
 +      bool "Force weak per-cpu definitions"
 +      depends on DEBUG_KERNEL
 +      help
 +        s390 and alpha require percpu variables in modules to be
 +        defined weak to work around addressing range issue which
 +        puts the following two restrictions on percpu variable
 +        definitions.
 +
 +        1. percpu symbols must be unique whether static or not
 +        2. percpu variables can't be defined inside a function
 +
 +        To ensure that generic code follows the above rules, this
 +        option forces all percpu variables to be defined as weak.
 +
 +endmenu # "Compiler options"
 +
 +config MAGIC_SYSRQ
 +      bool "Magic SysRq key"
 +      depends on !UML
 +      help
 +        If you say Y here, you will have some control over the system even
 +        if the system crashes for example during kernel debugging (e.g., you
 +        will be able to flush the buffer cache to disk, reboot the system
 +        immediately or dump some status information). This is accomplished
 +        by pressing various keys while holding SysRq (Alt+PrintScreen). It
 +        also works on a serial console (on PC hardware at least), if you
 +        send a BREAK and then within 5 seconds a command keypress. The
 +        keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
 +        unless you really know what this hack does.
 +
 +config DEBUG_KERNEL
 +      bool "Kernel debugging"
 +      help
 +        Say Y here if you are developing drivers or trying to debug and
 +        identify kernel problems.
 +
 +menu "Memory Debugging"
 +
 +source mm/Kconfig.debug
 +
 +config DEBUG_OBJECTS
 +      bool "Debug object operations"
 +      depends on DEBUG_KERNEL
 +      help
 +        If you say Y here, additional code will be inserted into the
 +        kernel to track the life time of various objects and validate
 +        the operations on those objects.
 +
 +config DEBUG_OBJECTS_SELFTEST
 +      bool "Debug objects selftest"
 +      depends on DEBUG_OBJECTS
 +      help
 +        This enables the selftest of the object debug code.
 +
 +config DEBUG_OBJECTS_FREE
 +      bool "Debug objects in freed memory"
 +      depends on DEBUG_OBJECTS
 +      help
 +        This enables checks whether a k/v free operation frees an area
 +        which contains an object which has not been deactivated
 +        properly. This can make kmalloc/kfree-intensive workloads
 +        much slower.
 +
 +config DEBUG_OBJECTS_TIMERS
 +      bool "Debug timer objects"
 +      depends on DEBUG_OBJECTS
 +      help
 +        If you say Y here, additional code will be inserted into the
 +        timer routines to track the life time of timer objects and
 +        validate the timer operations.
 +
 +config DEBUG_OBJECTS_WORK
 +      bool "Debug work objects"
 +      depends on DEBUG_OBJECTS
 +      help
 +        If you say Y here, additional code will be inserted into the
 +        work queue routines to track the life time of work objects and
 +        validate the work operations.
 +
 +config DEBUG_OBJECTS_RCU_HEAD
 +      bool "Debug RCU callbacks objects"
 +      depends on DEBUG_OBJECTS
 +      help
 +        Enable this to turn on debugging of RCU list heads (call_rcu() usage).
 +
 +config DEBUG_OBJECTS_PERCPU_COUNTER
 +      bool "Debug percpu counter objects"
 +      depends on DEBUG_OBJECTS
 +      help
 +        If you say Y here, additional code will be inserted into the
 +        percpu counter routines to track the life time of percpu counter
 +        objects and validate the percpu counter operations.
 +
 +config DEBUG_OBJECTS_ENABLE_DEFAULT
 +      int "debug_objects bootup default value (0-1)"
 +        range 0 1
 +        default "1"
 +        depends on DEBUG_OBJECTS
 +        help
 +          Debug objects boot parameter default value
 +
 +config DEBUG_SLAB
 +      bool "Debug slab memory allocations"
 +      depends on DEBUG_KERNEL && SLAB && !KMEMCHECK
 +      help
 +        Say Y here to have the kernel do limited verification on memory
 +        allocation as well as poisoning memory on free to catch use of freed
 +        memory. This can make kmalloc/kfree-intensive workloads much slower.
 +
 +config DEBUG_SLAB_LEAK
 +      bool "Memory leak debugging"
 +      depends on DEBUG_SLAB
 +
 +config SLUB_DEBUG_ON
 +      bool "SLUB debugging on by default"
 +      depends on SLUB && SLUB_DEBUG && !KMEMCHECK
 +      default n
 +      help
 +        Boot with debugging on by default. SLUB boots by default with
 +        the runtime debug capabilities switched off. Enabling this is
 +        equivalent to specifying the "slub_debug" parameter on boot.
 +        There is no support for more fine grained debug control like
 +        possible with slub_debug=xxx. SLUB debugging may be switched
 +        off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
 +        "slub_debug=-".
 +
 +config SLUB_STATS
 +      default n
 +      bool "Enable SLUB performance statistics"
 +      depends on SLUB && SYSFS
 +      help
 +        SLUB statistics are useful to debug SLUBs allocation behavior in
 +        order find ways to optimize the allocator. This should never be
 +        enabled for production use since keeping statistics slows down
 +        the allocator by a few percentage points. The slabinfo command
 +        supports the determination of the most active slabs to figure
 +        out which slabs are relevant to a particular load.
 +        Try running: slabinfo -DA
 +
 +config HAVE_DEBUG_KMEMLEAK
 +      bool
 +
 +config DEBUG_KMEMLEAK
 +      bool "Kernel memory leak detector"
 +      depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
 +      select DEBUG_FS
 +      select STACKTRACE if STACKTRACE_SUPPORT
 +      select KALLSYMS
 +      select CRC32
 +      help
 +        Say Y here if you want to enable the memory leak
 +        detector. The memory allocation/freeing is traced in a way
 +        similar to the Boehm's conservative garbage collector, the
 +        difference being that the orphan objects are not freed but
 +        only shown in /sys/kernel/debug/kmemleak. Enabling this
 +        feature will introduce an overhead to memory
 +        allocations. See Documentation/kmemleak.txt for more
 +        details.
 +
 +        Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
 +        of finding leaks due to the slab objects poisoning.
 +
 +        In order to access the kmemleak file, debugfs needs to be
 +        mounted (usually at /sys/kernel/debug).
 +
 +config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
 +      int "Maximum kmemleak early log entries"
 +      depends on DEBUG_KMEMLEAK
 +      range 200 40000
 +      default 400
 +      help
 +        Kmemleak must track all the memory allocations to avoid
 +        reporting false positives. Since memory may be allocated or
 +        freed before kmemleak is initialised, an early log buffer is
 +        used to store these actions. If kmemleak reports "early log
 +        buffer exceeded", please increase this value.
 +
 +config DEBUG_KMEMLEAK_TEST
 +      tristate "Simple test for the kernel memory leak detector"
 +      depends on DEBUG_KMEMLEAK && m
 +      help
 +        This option enables a module that explicitly leaks memory.
 +
 +        If unsure, say N.
 +
 +config DEBUG_KMEMLEAK_DEFAULT_OFF
 +      bool "Default kmemleak to off"
 +      depends on DEBUG_KMEMLEAK
 +      help
 +        Say Y here to disable kmemleak by default. It can then be enabled
 +        on the command line via kmemleak=on.
 +
 +config DEBUG_STACK_USAGE
 +      bool "Stack utilization instrumentation"
 +      depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG
 +      help
 +        Enables the display of the minimum amount of free stack which each
 +        task has ever had available in the sysrq-T and sysrq-P debug output.
 +
 +        This option will slow down process creation somewhat.
 +
 +config DEBUG_VM
 +      bool "Debug VM"
 +      depends on DEBUG_KERNEL
 +      help
 +        Enable this to turn on extended checks in the virtual-memory system
 +          that may impact performance.
 +
 +        If unsure, say N.
 +
 +config DEBUG_VM_RB
 +      bool "Debug VM red-black trees"
 +      depends on DEBUG_VM
 +      help
 +        Enable this to turn on more extended checks in the virtual-memory
 +        system that may impact performance.
 +
 +        If unsure, say N.
 +
 +config DEBUG_VIRTUAL
 +      bool "Debug VM translations"
 +      depends on DEBUG_KERNEL && X86
 +      help
 +        Enable some costly sanity checks in virtual to page code. This can
 +        catch mistakes with virt_to_page() and friends.
 +
 +        If unsure, say N.
 +
 +config DEBUG_NOMMU_REGIONS
 +      bool "Debug the global anon/private NOMMU mapping region tree"
 +      depends on DEBUG_KERNEL && !MMU
 +      help
 +        This option causes the global tree of anonymous and private mapping
 +        regions to be regularly checked for invalid topology.
 +
 +config DEBUG_MEMORY_INIT
 +      bool "Debug memory initialisation" if EXPERT
 +      default !EXPERT
 +      help
 +        Enable this for additional checks during memory initialisation.
 +        The sanity checks verify aspects of the VM such as the memory model
 +        and other information provided by the architecture. Verbose
 +        information will be printed at KERN_DEBUG loglevel depending
 +        on the mminit_loglevel= command-line option.
 +
 +        If unsure, say Y
 +
 +config MEMORY_NOTIFIER_ERROR_INJECT
 +      tristate "Memory hotplug notifier error injection module"
 +      depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
 +      help
 +        This option provides the ability to inject artificial errors to
 +        memory hotplug notifier chain callbacks.  It is controlled through
 +        debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
 +
 +        If the notifier call chain should be failed with some events
 +        notified, write the error code to "actions/<notifier event>/error".
 +
 +        Example: Inject memory hotplug offline error (-12 == -ENOMEM)
 +
 +        # cd /sys/kernel/debug/notifier-error-inject/memory
 +        # echo -12 > actions/MEM_GOING_OFFLINE/error
 +        # echo offline > /sys/devices/system/memory/memoryXXX/state
 +        bash: echo: write error: Cannot allocate memory
 +
 +        To compile this code as a module, choose M here: the module will
 +        be called memory-notifier-error-inject.
  
          If unsure, say N.
  
 -config HEADERS_CHECK
 -      bool "Run 'make headers_check' when building vmlinux"
 -      depends on !UML
 +config DEBUG_PER_CPU_MAPS
 +      bool "Debug access to per_cpu maps"
 +      depends on DEBUG_KERNEL
 +      depends on SMP
        help
 -        This option will extract the user-visible kernel headers whenever
 -        building the kernel, and will run basic sanity checks on them to
 -        ensure that exported files do not attempt to include files which
 -        were not exported, etc.
 +        Say Y to verify that the per_cpu map being accessed has
 +        been set up. This adds a fair amount of code to kernel memory
 +        and decreases performance.
  
 -        If you're making modifications to header files which are
 -        relevant for userspace, say 'Y', and check the headers
 -        exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
 -        your build tree), to make sure they're suitable.
 +        Say N if unsure.
  
 -config DEBUG_SECTION_MISMATCH
 -      bool "Enable full Section mismatch analysis"
 +config DEBUG_HIGHMEM
 +      bool "Highmem debugging"
 +      depends on DEBUG_KERNEL && HIGHMEM
        help
 -        The section mismatch analysis checks if there are illegal
 -        references from one section to another section.
 -        During linktime or runtime, some sections are dropped;
 -        any use of code/data previously in these sections would
 -        most likely result in an oops.
 -        In the code, functions and variables are annotated with
 -        __init, __cpuinit, etc. (see the full list in include/linux/init.h),
 -        which results in the code/data being placed in specific sections.
 -        The section mismatch analysis is always performed after a full
 -        kernel build, and enabling this option causes the following
 -        additional steps to occur:
 -        - Add the option -fno-inline-functions-called-once to gcc commands.
 -          When inlining a function annotated with __init in a non-init
 -          function, we would lose the section information and thus
 -          the analysis would not catch the illegal reference.
 -          This option tells gcc to inline less (but it does result in
 -          a larger kernel).
 -        - Run the section mismatch analysis for each module/built-in.o file.
 -          When we run the section mismatch analysis on vmlinux.o, we
 -          lose valueble information about where the mismatch was
 -          introduced.
 -          Running the analysis for each module/built-in.o file
 -          tells where the mismatch happens much closer to the
 -          source. The drawback is that the same mismatch is
 -          reported at least twice.
 -        - Enable verbose reporting from modpost in order to help resolve
 -          the section mismatches that are reported.
 +        This options enables addition error checking for high memory systems.
 +        Disable for production systems.
  
 -config DEBUG_KERNEL
 -      bool "Kernel debugging"
 -      help
 -        Say Y here if you are developing drivers or trying to debug and
 -        identify kernel problems.
 +config HAVE_DEBUG_STACKOVERFLOW
 +      bool
 +
 +config DEBUG_STACKOVERFLOW
 +      bool "Check for stack overflows"
 +      depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW
 +      ---help---
 +        Say Y here if you want to check for overflows of kernel, IRQ
 +        and exception stacks (if your archicture uses them). This
 +        option will show detailed messages if free stack space drops
 +        below a certain limit.
 +
 +        These kinds of bugs usually occur when call-chains in the
 +        kernel get too deep, especially when interrupts are
 +        involved.
 +
 +        Use this in cases where you see apparently random memory
 +        corruption, especially if it appears in 'struct thread_info'
 +
 +        If in doubt, say "N".
 +
 +source "lib/Kconfig.kmemcheck"
 +
 +endmenu # "Memory Debugging"
  
  config DEBUG_SHIRQ
        bool "Debug shared IRQ handlers"
          Drivers ought to be able to handle interrupts coming in at those
          points; some don't and need to be caught.
  
 +menu "Debug Lockups and Hangs"
 +
  config LOCKUP_DETECTOR
        bool "Detect Hard and Soft Lockups"
        depends on DEBUG_KERNEL && !S390
@@@ -677,6 -242,25 +677,6 @@@ config BOOTPARAM_SOFTLOCKUP_PANIC_VALU
        default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
        default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
  
 -config PANIC_ON_OOPS
 -      bool "Panic on Oops"
 -      help
 -        Say Y here to enable the kernel to panic when it oopses. This
 -        has the same effect as setting oops=panic on the kernel command
 -        line.
 -
 -        This feature is useful to ensure that the kernel does not do
 -        anything erroneous after an oops which could result in data
 -        corruption or other issues.
 -
 -        Say N if unsure.
 -
 -config PANIC_ON_OOPS_VALUE
 -      int
 -      range 0 1
 -      default 0 if !PANIC_ON_OOPS
 -      default 1 if PANIC_ON_OOPS
 -
  config DETECT_HUNG_TASK
        bool "Detect Hung Tasks"
        depends on DEBUG_KERNEL
@@@ -726,66 -310,197 +726,66 @@@ config BOOTPARAM_HUNG_TASK_PANI
  
  config BOOTPARAM_HUNG_TASK_PANIC_VALUE
        int
 -      depends on DETECT_HUNG_TASK
 -      range 0 1
 -      default 0 if !BOOTPARAM_HUNG_TASK_PANIC
 -      default 1 if BOOTPARAM_HUNG_TASK_PANIC
 -
 -config SCHED_DEBUG
 -      bool "Collect scheduler debugging info"
 -      depends on DEBUG_KERNEL && PROC_FS
 -      default y
 -      help
 -        If you say Y here, the /proc/sched_debug file will be provided
 -        that can help debug the scheduler. The runtime overhead of this
 -        option is minimal.
 -
 -config SCHEDSTATS
 -      bool "Collect scheduler statistics"
 -      depends on DEBUG_KERNEL && PROC_FS
 -      help
 -        If you say Y here, additional code will be inserted into the
 -        scheduler and related routines to collect statistics about
 -        scheduler behavior and provide them in /proc/schedstat.  These
 -        stats may be useful for both tuning and debugging the scheduler
 -        If you aren't debugging the scheduler or trying to tune a specific
 -        application, you can say N to avoid the very slight overhead
 -        this adds.
 -
 -config TIMER_STATS
 -      bool "Collect kernel timers statistics"
 -      depends on DEBUG_KERNEL && PROC_FS
 -      help
 -        If you say Y here, additional code will be inserted into the
 -        timer routines to collect statistics about kernel timers being
 -        reprogrammed. The statistics can be read from /proc/timer_stats.
 -        The statistics collection is started by writing 1 to /proc/timer_stats,
 -        writing 0 stops it. This feature is useful to collect information
 -        about timer usage patterns in kernel and userspace. This feature
 -        is lightweight if enabled in the kernel config but not activated
 -        (it defaults to deactivated on bootup and will only be activated
 -        if some application like powertop activates it explicitly).
 -
 -config DEBUG_OBJECTS
 -      bool "Debug object operations"
 -      depends on DEBUG_KERNEL
 -      help
 -        If you say Y here, additional code will be inserted into the
 -        kernel to track the life time of various objects and validate
 -        the operations on those objects.
 -
 -config DEBUG_OBJECTS_SELFTEST
 -      bool "Debug objects selftest"
 -      depends on DEBUG_OBJECTS
 -      help
 -        This enables the selftest of the object debug code.
 -
 -config DEBUG_OBJECTS_FREE
 -      bool "Debug objects in freed memory"
 -      depends on DEBUG_OBJECTS
 -      help
 -        This enables checks whether a k/v free operation frees an area
 -        which contains an object which has not been deactivated
 -        properly. This can make kmalloc/kfree-intensive workloads
 -        much slower.
 -
 -config DEBUG_OBJECTS_TIMERS
 -      bool "Debug timer objects"
 -      depends on DEBUG_OBJECTS
 -      help
 -        If you say Y here, additional code will be inserted into the
 -        timer routines to track the life time of timer objects and
 -        validate the timer operations.
 -
 -config DEBUG_OBJECTS_WORK
 -      bool "Debug work objects"
 -      depends on DEBUG_OBJECTS
 -      help
 -        If you say Y here, additional code will be inserted into the
 -        work queue routines to track the life time of work objects and
 -        validate the work operations.
 -
 -config DEBUG_OBJECTS_RCU_HEAD
 -      bool "Debug RCU callbacks objects"
 -      depends on DEBUG_OBJECTS
 -      help
 -        Enable this to turn on debugging of RCU list heads (call_rcu() usage).
 -
 -config DEBUG_OBJECTS_PERCPU_COUNTER
 -      bool "Debug percpu counter objects"
 -      depends on DEBUG_OBJECTS
 -      help
 -        If you say Y here, additional code will be inserted into the
 -        percpu counter routines to track the life time of percpu counter
 -        objects and validate the percpu counter operations.
 -
 -config DEBUG_OBJECTS_ENABLE_DEFAULT
 -      int "debug_objects bootup default value (0-1)"
 -        range 0 1
 -        default "1"
 -        depends on DEBUG_OBJECTS
 -        help
 -          Debug objects boot parameter default value
 -
 -config DEBUG_SLAB
 -      bool "Debug slab memory allocations"
 -      depends on DEBUG_KERNEL && SLAB && !KMEMCHECK
 -      help
 -        Say Y here to have the kernel do limited verification on memory
 -        allocation as well as poisoning memory on free to catch use of freed
 -        memory. This can make kmalloc/kfree-intensive workloads much slower.
 -
 -config DEBUG_SLAB_LEAK
 -      bool "Memory leak debugging"
 -      depends on DEBUG_SLAB
 -
 -config SLUB_DEBUG_ON
 -      bool "SLUB debugging on by default"
 -      depends on SLUB && SLUB_DEBUG && !KMEMCHECK
 -      default n
 -      help
 -        Boot with debugging on by default. SLUB boots by default with
 -        the runtime debug capabilities switched off. Enabling this is
 -        equivalent to specifying the "slub_debug" parameter on boot.
 -        There is no support for more fine grained debug control like
 -        possible with slub_debug=xxx. SLUB debugging may be switched
 -        off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
 -        "slub_debug=-".
 -
 -config SLUB_STATS
 -      default n
 -      bool "Enable SLUB performance statistics"
 -      depends on SLUB && SYSFS
 -      help
 -        SLUB statistics are useful to debug SLUBs allocation behavior in
 -        order find ways to optimize the allocator. This should never be
 -        enabled for production use since keeping statistics slows down
 -        the allocator by a few percentage points. The slabinfo command
 -        supports the determination of the most active slabs to figure
 -        out which slabs are relevant to a particular load.
 -        Try running: slabinfo -DA
 -
 -config HAVE_DEBUG_KMEMLEAK
 -      bool
 -
 -config DEBUG_KMEMLEAK
 -      bool "Kernel memory leak detector"
 -      depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
 -      select DEBUG_FS
 -      select STACKTRACE if STACKTRACE_SUPPORT
 -      select KALLSYMS
 -      select CRC32
 -      help
 -        Say Y here if you want to enable the memory leak
 -        detector. The memory allocation/freeing is traced in a way
 -        similar to the Boehm's conservative garbage collector, the
 -        difference being that the orphan objects are not freed but
 -        only shown in /sys/kernel/debug/kmemleak. Enabling this
 -        feature will introduce an overhead to memory
 -        allocations. See Documentation/kmemleak.txt for more
 -        details.
 -
 -        Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
 -        of finding leaks due to the slab objects poisoning.
 +      depends on DETECT_HUNG_TASK
 +      range 0 1
 +      default 0 if !BOOTPARAM_HUNG_TASK_PANIC
 +      default 1 if BOOTPARAM_HUNG_TASK_PANIC
  
 -        In order to access the kmemleak file, debugfs needs to be
 -        mounted (usually at /sys/kernel/debug).
 +endmenu # "Debug lockups and hangs"
  
 -config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
 -      int "Maximum kmemleak early log entries"
 -      depends on DEBUG_KMEMLEAK
 -      range 200 40000
 -      default 400
 +config PANIC_ON_OOPS
 +      bool "Panic on Oops"
        help
 -        Kmemleak must track all the memory allocations to avoid
 -        reporting false positives. Since memory may be allocated or
 -        freed before kmemleak is initialised, an early log buffer is
 -        used to store these actions. If kmemleak reports "early log
 -        buffer exceeded", please increase this value.
 +        Say Y here to enable the kernel to panic when it oopses. This
 +        has the same effect as setting oops=panic on the kernel command
 +        line.
  
 -config DEBUG_KMEMLEAK_TEST
 -      tristate "Simple test for the kernel memory leak detector"
 -      depends on DEBUG_KMEMLEAK && m
 +        This feature is useful to ensure that the kernel does not do
 +        anything erroneous after an oops which could result in data
 +        corruption or other issues.
 +
 +        Say N if unsure.
 +
 +config PANIC_ON_OOPS_VALUE
 +      int
 +      range 0 1
 +      default 0 if !PANIC_ON_OOPS
 +      default 1 if PANIC_ON_OOPS
 +
 +config SCHED_DEBUG
 +      bool "Collect scheduler debugging info"
 +      depends on DEBUG_KERNEL && PROC_FS
 +      default y
        help
 -        This option enables a module that explicitly leaks memory.
 +        If you say Y here, the /proc/sched_debug file will be provided
 +        that can help debug the scheduler. The runtime overhead of this
 +        option is minimal.
  
 -        If unsure, say N.
 +config SCHEDSTATS
 +      bool "Collect scheduler statistics"
 +      depends on DEBUG_KERNEL && PROC_FS
 +      help
 +        If you say Y here, additional code will be inserted into the
 +        scheduler and related routines to collect statistics about
 +        scheduler behavior and provide them in /proc/schedstat.  These
 +        stats may be useful for both tuning and debugging the scheduler
 +        If you aren't debugging the scheduler or trying to tune a specific
 +        application, you can say N to avoid the very slight overhead
 +        this adds.
  
 -config DEBUG_KMEMLEAK_DEFAULT_OFF
 -      bool "Default kmemleak to off"
 -      depends on DEBUG_KMEMLEAK
 +config TIMER_STATS
 +      bool "Collect kernel timers statistics"
 +      depends on DEBUG_KERNEL && PROC_FS
        help
 -        Say Y here to disable kmemleak by default. It can then be enabled
 -        on the command line via kmemleak=on.
 +        If you say Y here, additional code will be inserted into the
 +        timer routines to collect statistics about kernel timers being
 +        reprogrammed. The statistics can be read from /proc/timer_stats.
 +        The statistics collection is started by writing 1 to /proc/timer_stats,
 +        writing 0 stops it. This feature is useful to collect information
 +        about timer usage patterns in kernel and userspace. This feature
 +        is lightweight if enabled in the kernel config but not activated
 +        (it defaults to deactivated on bootup and will only be activated
 +        if some application like powertop activates it explicitly).
  
  config DEBUG_PREEMPT
        bool "Debug preemptible kernel"
          if kernel code uses it in a preemption-unsafe way. Also, the kernel
          will detect preemption count underflows.
  
 +menu "Lock Debugging (spinlocks, mutexes, etc...)"
 +
  config DEBUG_RT_MUTEXES
        bool "RT Mutex debugging, deadlock detection"
        depends on DEBUG_KERNEL && RT_MUTEXES
@@@ -834,19 -547,6 +834,19 @@@ config DEBUG_MUTEXE
         This feature allows mutex semantics violations to be detected and
         reported.
  
 +config DEBUG_WW_MUTEX_SLOWPATH
 +      bool "Wait/wound mutex debugging: Slowpath testing"
 +      depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
 +      select DEBUG_LOCK_ALLOC
 +      select DEBUG_SPINLOCK
 +      select DEBUG_MUTEXES
 +      help
 +       This feature enables slowpath testing for w/w mutex users by
 +       injecting additional -EDEADLK wound/backoff cases. Together with
 +       the full mutex checks enabled with (CONFIG_PROVE_LOCKING) this
 +       will test all possible w/w mutex interface abuse with the
 +       exception of simply not acquiring all the required locks.
 +
  config DEBUG_LOCK_ALLOC
        bool "Lock debugging: detect incorrect freeing of live locks"
        depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
@@@ -941,6 -641,12 +941,6 @@@ config DEBUG_LOCKDE
          additional runtime checks to debug itself, at the price
          of more runtime overhead.
  
 -config TRACE_IRQFLAGS
 -      bool
 -      help
 -        Enables hooks to interrupt enabling and disabling for
 -        either tracing or lock debugging.
 -
  config DEBUG_ATOMIC_SLEEP
        bool "Sleep inside atomic section checking"
        select PREEMPT_COUNT
@@@ -962,17 -668,18 +962,17 @@@ config DEBUG_LOCKING_API_SELFTEST
          The following locking APIs are covered: spinlocks, rwlocks,
          mutexes and rwsems.
  
 -config STACKTRACE
 -      bool
 -      depends on STACKTRACE_SUPPORT
 +endmenu # lock debugging
  
 -config DEBUG_STACK_USAGE
 -      bool "Stack utilization instrumentation"
 -      depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG
 +config TRACE_IRQFLAGS
 +      bool
        help
 -        Enables the display of the minimum amount of free stack which each
 -        task has ever had available in the sysrq-T and sysrq-P debug output.
 +        Enables hooks to interrupt enabling and disabling for
 +        either tracing or lock debugging.
  
 -        This option will slow down process creation somewhat.
 +config STACKTRACE
 +      bool
 +      depends on STACKTRACE_SUPPORT
  
  config DEBUG_KOBJECT
        bool "kobject debugging"
          If you say Y here, some extra kobject debugging messages will be sent
          to the syslog. 
  
 -config DEBUG_HIGHMEM
 -      bool "Highmem debugging"
 -      depends on DEBUG_KERNEL && HIGHMEM
 -      help
 -        This options enables addition error checking for high memory systems.
 -        Disable for production systems.
 -
  config HAVE_DEBUG_BUGVERBOSE
        bool
  
@@@ -993,6 -707,66 +993,6 @@@ config DEBUG_BUGVERBOS
          of the BUG call as well as the EIP and oops trace.  This aids
          debugging but costs about 70-100K of memory.
  
 -config DEBUG_INFO
 -      bool "Compile the kernel with debug info"
 -      depends on DEBUG_KERNEL
 -      help
 -          If you say Y here the resulting kernel image will include
 -        debugging info resulting in a larger kernel image.
 -        This adds debug symbols to the kernel and modules (gcc -g), and
 -        is needed if you intend to use kernel crashdump or binary object
 -        tools like crash, kgdb, LKCD, gdb, etc on the kernel.
 -        Say Y here only if you plan to debug the kernel.
 -
 -        If unsure, say N.
 -
 -config DEBUG_INFO_REDUCED
 -      bool "Reduce debugging information"
 -      depends on DEBUG_INFO
 -      help
 -        If you say Y here gcc is instructed to generate less debugging
 -        information for structure types. This means that tools that
 -        need full debugging information (like kgdb or systemtap) won't
 -        be happy. But if you merely need debugging information to
 -        resolve line numbers there is no loss. Advantage is that
 -        build directory object sizes shrink dramatically over a full
 -        DEBUG_INFO build and compile times are reduced too.
 -        Only works with newer gcc versions.
 -
 -config DEBUG_VM
 -      bool "Debug VM"
 -      depends on DEBUG_KERNEL
 -      help
 -        Enable this to turn on extended checks in the virtual-memory system
 -          that may impact performance.
 -
 -        If unsure, say N.
 -
 -config DEBUG_VM_RB
 -      bool "Debug VM red-black trees"
 -      depends on DEBUG_VM
 -      help
 -        Enable this to turn on more extended checks in the virtual-memory
 -        system that may impact performance.
 -
 -        If unsure, say N.
 -
 -config DEBUG_VIRTUAL
 -      bool "Debug VM translations"
 -      depends on DEBUG_KERNEL && X86
 -      help
 -        Enable some costly sanity checks in virtual to page code. This can
 -        catch mistakes with virt_to_page() and friends.
 -
 -        If unsure, say N.
 -
 -config DEBUG_NOMMU_REGIONS
 -      bool "Debug the global anon/private NOMMU mapping region tree"
 -      depends on DEBUG_KERNEL && !MMU
 -      help
 -        This option causes the global tree of anonymous and private mapping
 -        regions to be regularly checked for invalid topology.
 -
  config DEBUG_WRITECOUNT
        bool "Debug filesystem writers count"
        depends on DEBUG_KERNEL
  
          If unsure, say N.
  
 -config DEBUG_MEMORY_INIT
 -      bool "Debug memory initialisation" if EXPERT
 -      default !EXPERT
 -      help
 -        Enable this for additional checks during memory initialisation.
 -        The sanity checks verify aspects of the VM such as the memory model
 -        and other information provided by the architecture. Verbose
 -        information will be printed at KERN_DEBUG loglevel depending
 -        on the mminit_loglevel= command-line option.
 -
 -        If unsure, say Y
 -
  config DEBUG_LIST
        bool "Debug linked list manipulation"
        depends on DEBUG_KERNEL
  
          If unsure, say N.
  
 -config TEST_LIST_SORT
 -      bool "Linked list sorting test"
 -      depends on DEBUG_KERNEL
 -      help
 -        Enable this to turn on 'list_sort()' function test. This test is
 -        executed only once during system boot, so affects only boot time.
 -
 -        If unsure, say N.
 -
  config DEBUG_SG
        bool "Debug SG table operations"
        depends on DEBUG_KERNEL
@@@ -1047,6 -842,45 +1047,6 @@@ config DEBUG_CREDENTIAL
  
          If unsure, say N.
  
 -#
 -# Select this config option from the architecture Kconfig, if it
 -# is preferred to always offer frame pointers as a config
 -# option on the architecture (regardless of KERNEL_DEBUG):
 -#
 -config ARCH_WANT_FRAME_POINTERS
 -      bool
 -      help
 -
 -config FRAME_POINTER
 -      bool "Compile the kernel with frame pointers"
 -      depends on DEBUG_KERNEL && \
 -              (CRIS || M68K || FRV || UML || \
 -               AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \
 -              ARCH_WANT_FRAME_POINTERS
 -      default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
 -      help
 -        If you say Y here the resulting kernel image will be slightly
 -        larger and slower, but it gives very useful debugging information
 -        in case of kernel bugs. (precise oopses/stacktraces/warnings)
 -
 -config BOOT_PRINTK_DELAY
 -      bool "Delay each boot printk message by N milliseconds"
 -      depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
 -      help
 -        This build option allows you to read kernel boot messages
 -        by inserting a short delay after each one.  The delay is
 -        specified in milliseconds on the kernel command line,
 -        using "boot_delay=N".
 -
 -        It is likely that you would also need to use "lpj=M" to preset
 -        the "loops per jiffie" value.
 -        See a previous boot log for the "lpj" value to use for your
 -        system, and then set "lpj=M" before setting "boot_delay=N".
 -        NOTE:  Using this option may adversely affect SMP systems.
 -        I.e., processors other than the first one may not boot up.
 -        BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect
 -        what it believes to be lockup conditions.
 -
  menu "RCU Debugging"
  
  config PROVE_RCU
@@@ -1172,19 -1006,46 +1172,19 @@@ config RCU_CPU_STALL_INF
  
          Say Y if you want to enable such diagnostics.
  
 -config RCU_TRACE
 -      bool "Enable tracing for RCU"
 -      depends on DEBUG_KERNEL
 -      select TRACE_CLOCK
 -      help
 -        This option provides tracing in RCU which presents stats
 -        in debugfs for debugging RCU implementation.
 -
 -        Say Y here if you want to enable RCU tracing
 -        Say N if you are unsure.
 -
 -endmenu # "RCU Debugging"
 -
 -config KPROBES_SANITY_TEST
 -      bool "Kprobes sanity tests"
 -      depends on DEBUG_KERNEL
 -      depends on KPROBES
 -      default n
 -      help
 -        This option provides for testing basic kprobes functionality on
 -        boot. A sample kprobe, jprobe and kretprobe are inserted and
 -        verified for functionality.
 -
 -        Say N if you are unsure.
 -
 -config BACKTRACE_SELF_TEST
 -      tristate "Self test for the backtrace code"
 +config RCU_TRACE
 +      bool "Enable tracing for RCU"
        depends on DEBUG_KERNEL
 -      default n
 +      select TRACE_CLOCK
        help
 -        This option provides a kernel module that can be used to test
 -        the kernel stack backtrace code. This option is not useful
 -        for distributions or general kernels, but only for kernel
 -        developers working on architecture code.
 -
 -        Note that if you want to also test saved backtraces, you will
 -        have to enable STACKTRACE as well.
 +        This option provides tracing in RCU which presents stats
 +        in debugfs for debugging RCU implementation.
  
 +        Say Y here if you want to enable RCU tracing
          Say N if you are unsure.
  
 +endmenu # "RCU Debugging"
 +
  config DEBUG_BLOCK_EXT_DEVT
          bool "Force extended block device numbers and spread them"
        depends on DEBUG_KERNEL
  
          Say N if you are unsure.
  
 -config DEBUG_FORCE_WEAK_PER_CPU
 -      bool "Force weak per-cpu definitions"
 -      depends on DEBUG_KERNEL
 -      help
 -        s390 and alpha require percpu variables in modules to be
 -        defined weak to work around addressing range issue which
 -        puts the following two restrictions on percpu variable
 -        definitions.
 -
 -        1. percpu symbols must be unique whether static or not
 -        2. percpu variables can't be defined inside a function
 -
 -        To ensure that generic code follows the above rules, this
 -        option forces all percpu variables to be defined as weak.
 -
 -config DEBUG_PER_CPU_MAPS
 -      bool "Debug access to per_cpu maps"
 -      depends on DEBUG_KERNEL
 -      depends on SMP
 -      help
 -        Say Y to verify that the per_cpu map being accessed has
 -        been set up. This adds a fair amount of code to kernel memory
 -        and decreases performance.
 -
 -        Say N if unsure.
 -
 -config LKDTM
 -      tristate "Linux Kernel Dump Test Tool Module"
 -      depends on DEBUG_FS
 -      depends on BLOCK
 -      default n
 -      help
 -      This module enables testing of the different dumping mechanisms by
 -      inducing system failures at predefined crash points.
 -      If you don't need it: say N
 -      Choose M here to compile this code as a module. The module will be
 -      called lkdtm.
 -
 -      Documentation on how to use the module can be found in
 -      Documentation/fault-injection/provoke-crashes.txt
 -
  config NOTIFIER_ERROR_INJECTION
        tristate "Notifier error injection"
        depends on DEBUG_KERNEL
@@@ -1271,6 -1173,29 +1271,6 @@@ config PM_NOTIFIER_ERROR_INJEC
  
          If unsure, say N.
  
 -config MEMORY_NOTIFIER_ERROR_INJECT
 -      tristate "Memory hotplug notifier error injection module"
 -      depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
 -      help
 -        This option provides the ability to inject artificial errors to
 -        memory hotplug notifier chain callbacks.  It is controlled through
 -        debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
 -
 -        If the notifier call chain should be failed with some events
 -        notified, write the error code to "actions/<notifier event>/error".
 -
 -        Example: Inject memory hotplug offline error (-12 == -ENOMEM)
 -
 -        # cd /sys/kernel/debug/notifier-error-inject/memory
 -        # echo -12 > actions/MEM_GOING_OFFLINE/error
 -        # echo offline > /sys/devices/system/memory/memoryXXX/state
 -        bash: echo: write error: Cannot allocate memory
 -
 -        To compile this code as a module, choose M here: the module will
 -        be called memory-notifier-error-inject.
 -
 -        If unsure, say N.
 -
  config OF_RECONFIG_NOTIFIER_ERROR_INJECT
        tristate "OF reconfig notifier error injection module"
        depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
@@@ -1347,7 -1272,7 +1347,7 @@@ config FAULT_INJECTION_STACKTRACE_FILTE
        depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
        depends on !X86_64
        select STACKTRACE
-       select FRAME_POINTER if !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND
+       select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND
        help
          Provide stacktrace filter for fault-injection capabilities
  
@@@ -1385,61 -1310,9 +1385,61 @@@ config DEBUG_STRICT_USER_COPY_CHECK
  
          If unsure, say N.
  
 -source mm/Kconfig.debug
  source kernel/trace/Kconfig
  
 +menu "Runtime Testing"
 +
 +config LKDTM
 +      tristate "Linux Kernel Dump Test Tool Module"
 +      depends on DEBUG_FS
 +      depends on BLOCK
 +      default n
 +      help
 +      This module enables testing of the different dumping mechanisms by
 +      inducing system failures at predefined crash points.
 +      If you don't need it: say N
 +      Choose M here to compile this code as a module. The module will be
 +      called lkdtm.
 +
 +      Documentation on how to use the module can be found in
 +      Documentation/fault-injection/provoke-crashes.txt
 +
 +config TEST_LIST_SORT
 +      bool "Linked list sorting test"
 +      depends on DEBUG_KERNEL
 +      help
 +        Enable this to turn on 'list_sort()' function test. This test is
 +        executed only once during system boot, so affects only boot time.
 +
 +        If unsure, say N.
 +
 +config KPROBES_SANITY_TEST
 +      bool "Kprobes sanity tests"
 +      depends on DEBUG_KERNEL
 +      depends on KPROBES
 +      default n
 +      help
 +        This option provides for testing basic kprobes functionality on
 +        boot. A sample kprobe, jprobe and kretprobe are inserted and
 +        verified for functionality.
 +
 +        Say N if you are unsure.
 +
 +config BACKTRACE_SELF_TEST
 +      tristate "Self test for the backtrace code"
 +      depends on DEBUG_KERNEL
 +      default n
 +      help
 +        This option provides a kernel module that can be used to test
 +        the kernel stack backtrace code. This option is not useful
 +        for distributions or general kernels, but only for kernel
 +        developers working on architecture code.
 +
 +        Note that if you want to also test saved backtraces, you will
 +        have to enable STACKTRACE as well.
 +
 +        Say N if you are unsure.
 +
  config RBTREE_TEST
        tristate "Red-Black tree test"
        depends on m && DEBUG_KERNEL
@@@ -1453,34 -1326,6 +1453,34 @@@ config INTERVAL_TREE_TES
        help
          A benchmark measuring the performance of the interval tree library
  
 +config ATOMIC64_SELFTEST
 +      bool "Perform an atomic64_t self-test at boot"
 +      help
 +        Enable this option to test the atomic64_t functions at boot.
 +
 +        If unsure, say N.
 +
 +config ASYNC_RAID6_TEST
 +      tristate "Self test for hardware accelerated raid6 recovery"
 +      depends on ASYNC_RAID6_RECOV
 +      select ASYNC_MEMCPY
 +      ---help---
 +        This is a one-shot self test that permutes through the
 +        recovery of all the possible two disk failure scenarios for a
 +        N-disk array.  Recovery is performed with the asynchronous
 +        raid6 recovery routines, and will optionally use an offload
 +        engine if one is available.
 +
 +        If unsure, say N.
 +
 +config TEST_STRING_HELPERS
 +      tristate "Test functions located in the string_helpers module at runtime"
 +
 +config TEST_KSTRTOX
 +      tristate "Test kstrto*() family of functions at runtime"
 +
 +endmenu # runtime tests
 +
  config PROVIDE_OHCI1394_DMA_INIT
        bool "Remote debugging over FireWire early on boot"
        depends on PCI && X86
@@@ -1530,6 -1375,75 +1530,6 @@@ config BUILD_DOCSR
  
          Say N if you are unsure.
  
 -config DYNAMIC_DEBUG
 -      bool "Enable dynamic printk() support"
 -      default n
 -      depends on PRINTK
 -      depends on DEBUG_FS
 -      help
 -
 -        Compiles debug level messages into the kernel, which would not
 -        otherwise be available at runtime. These messages can then be
 -        enabled/disabled based on various levels of scope - per source file,
 -        function, module, format string, and line number. This mechanism
 -        implicitly compiles in all pr_debug() and dev_dbg() calls, which
 -        enlarges the kernel text size by about 2%.
 -
 -        If a source file is compiled with DEBUG flag set, any
 -        pr_debug() calls in it are enabled by default, but can be
 -        disabled at runtime as below.  Note that DEBUG flag is
 -        turned on by many CONFIG_*DEBUG* options.
 -
 -        Usage:
 -
 -        Dynamic debugging is controlled via the 'dynamic_debug/control' file,
 -        which is contained in the 'debugfs' filesystem. Thus, the debugfs
 -        filesystem must first be mounted before making use of this feature.
 -        We refer the control file as: <debugfs>/dynamic_debug/control. This
 -        file contains a list of the debug statements that can be enabled. The
 -        format for each line of the file is:
 -
 -              filename:lineno [module]function flags format
 -
 -        filename : source file of the debug statement
 -        lineno : line number of the debug statement
 -        module : module that contains the debug statement
 -        function : function that contains the debug statement
 -          flags : '=p' means the line is turned 'on' for printing
 -          format : the format used for the debug statement
 -
 -        From a live system:
 -
 -              nullarbor:~ # cat <debugfs>/dynamic_debug/control
 -              # filename:lineno [module]function flags format
 -              fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
 -              fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
 -              fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
 -
 -        Example usage:
 -
 -              // enable the message at line 1603 of file svcsock.c
 -              nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
 -                                              <debugfs>/dynamic_debug/control
 -
 -              // enable all the messages in file svcsock.c
 -              nullarbor:~ # echo -n 'file svcsock.c +p' >
 -                                              <debugfs>/dynamic_debug/control
 -
 -              // enable all the messages in the NFS server module
 -              nullarbor:~ # echo -n 'module nfsd +p' >
 -                                              <debugfs>/dynamic_debug/control
 -
 -              // enable all 12 messages in the function svc_process()
 -              nullarbor:~ # echo -n 'func svc_process +p' >
 -                                              <debugfs>/dynamic_debug/control
 -
 -              // disable all 12 messages in the function svc_process()
 -              nullarbor:~ # echo -n 'func svc_process -p' >
 -                                              <debugfs>/dynamic_debug/control
 -
 -        See Documentation/dynamic-debug-howto.txt for additional information.
 -
  config DMA_API_DEBUG
        bool "Enable debugging of DMA-API usage"
        depends on HAVE_DMA_API_DEBUG
          This option causes a performance degredation.  Use only if you want
          to debug device drivers. If unsure, say N.
  
 -config ATOMIC64_SELFTEST
 -      bool "Perform an atomic64_t self-test at boot"
 -      help
 -        Enable this option to test the atomic64_t functions at boot.
 -
 -        If unsure, say N.
 -
 -config ASYNC_RAID6_TEST
 -      tristate "Self test for hardware accelerated raid6 recovery"
 -      depends on ASYNC_RAID6_RECOV
 -      select ASYNC_MEMCPY
 -      ---help---
 -        This is a one-shot self test that permutes through the
 -        recovery of all the possible two disk failure scenarios for a
 -        N-disk array.  Recovery is performed with the asynchronous
 -        raid6 recovery routines, and will optionally use an offload
 -        engine if one is available.
 -
 -        If unsure, say N.
 -
  source "samples/Kconfig"
  
  source "lib/Kconfig.kgdb"
  
 -source "lib/Kconfig.kmemcheck"
 -
 -config TEST_STRING_HELPERS
 -      tristate "Test functions located in the string_helpers module at runtime"
 -
 -config TEST_KSTRTOX
 -      tristate "Test kstrto*() family of functions at runtime"