Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Sep 2009 16:51:09 +0000 (09:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Sep 2009 16:51:09 +0000 (09:51 -0700)
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (134 commits)
  powerpc/nvram: Enable use Generic NVRAM driver for different size chips
  powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline
  powerpc/ps3: Workaround for flash memory I/O error
  powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead
  powerpc/perf_counters: Reduce stack usage of power_check_constraints
  powerpc: Fix bug where perf_counters breaks oprofile
  powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops
  powerpc/irq: Improve nanodoc
  powerpc: Fix some late PowerMac G5 with PCIe ATI graphics
  powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT
  powerpc/book3e: Add missing page sizes
  powerpc/pseries: Fix to handle slb resize across migration
  powerpc/powermac: Thermal control turns system off too eagerly
  powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan()
  powerpc/405ex: support cuImage via included dtb
  powerpc/405ex: provide necessary fixup function to support cuImage
  powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC
  powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support.
  powerpc/44x: Update Arches defconfig
  powerpc/44x: Update Arches dts
  ...

Fix up conflicts in drivers/char/agp/uninorth-agp.c

1  2 
arch/powerpc/Kconfig
arch/powerpc/include/asm/device.h
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/vmlinux.lds.S
drivers/char/agp/uninorth-agp.c
include/linux/pci_ids.h
lib/Kconfig.debug

diff --combined arch/powerpc/Kconfig
index 2c42e1526d03a1fa280b80d1fc12d4f8f1cd8dd3,9e03991dc878ea808b14779787974ab07af28478..8250902265c61c3c4da07c74e56d7b165793ceb4
@@@ -49,9 -49,6 +49,9 @@@ config GENERIC_HARDIRQS_NO__DO_IR
  config HAVE_SETUP_PER_CPU_AREA
        def_bool PPC64
  
 +config NEED_PER_CPU_EMBED_FIRST_CHUNK
 +      def_bool PPC64
 +
  config IRQ_PER_CPU
        bool
        default y
@@@ -123,7 -120,8 +123,8 @@@ config PP
        select HAVE_KRETPROBES
        select HAVE_ARCH_TRACEHOOK
        select HAVE_LMB
-       select HAVE_DMA_ATTRS if PPC64
+       select HAVE_DMA_ATTRS
+       select HAVE_DMA_API_DEBUG
        select USE_GENERIC_SMP_HELPERS if SMP
        select HAVE_OPROFILE
        select HAVE_SYSCALL_WRAPPERS if PPC64
@@@ -310,10 -308,6 +311,6 @@@ config SWIOTL
          platforms where the size of a physical address is larger
          than the bus address.  Not all platforms support this.
  
- config PPC_NEED_DMA_SYNC_OPS
-       def_bool y
-       depends on (NOT_COHERENT_CACHE || SWIOTLB)
  config HOTPLUG_CPU
        bool "Support for enabling/disabling CPUs"
        depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC)
@@@ -475,7 -469,7 +472,7 @@@ config PPC_16K_PAGE
        bool "16k page size" if 44x
  
  config PPC_64K_PAGES
-       bool "64k page size" if 44x || PPC_STD_MMU_64
+       bool "64k page size" if 44x || PPC_STD_MMU_64 || PPC_BOOK3E_64
        select PPC_HAS_HASH_64K if PPC_STD_MMU_64
  
  config PPC_256K_PAGES
@@@ -495,16 -489,16 +492,16 @@@ endchoic
  
  config FORCE_MAX_ZONEORDER
        int "Maximum zone order"
-       range 9 64 if PPC_STD_MMU_64 && PPC_64K_PAGES
-       default "9" if PPC_STD_MMU_64 && PPC_64K_PAGES
-       range 13 64 if PPC_STD_MMU_64 && !PPC_64K_PAGES
-       default "13" if PPC_STD_MMU_64 && !PPC_64K_PAGES
-       range 9 64 if PPC_STD_MMU_32 && PPC_16K_PAGES
-       default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES
-       range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES
-       default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES
-       range 5 64 if PPC_STD_MMU_32 && PPC_256K_PAGES
-       default "5" if PPC_STD_MMU_32 && PPC_256K_PAGES
+       range 9 64 if PPC64 && PPC_64K_PAGES
+       default "9" if PPC64 && PPC_64K_PAGES
+       range 13 64 if PPC64 && !PPC_64K_PAGES
+       default "13" if PPC64 && !PPC_64K_PAGES
+       range 9 64 if PPC32 && PPC_16K_PAGES
+       default "9" if PPC32 && PPC_16K_PAGES
+       range 7 64 if PPC32 && PPC_64K_PAGES
+       default "7" if PPC32 && PPC_64K_PAGES
+       range 5 64 if PPC32 && PPC_256K_PAGES
+       default "5" if PPC32 && PPC_256K_PAGES
        range 11 64
        default "11"
        help
index e3e06e0f7fc0b14d78b0205bc74a865768554305,67fcd7f89d99a7bc41eafa32d3bc791dc46ba632..9dade15d1ab48c8475bc912752b57cc047a90226
@@@ -6,7 -6,7 +6,7 @@@
  #ifndef _ASM_POWERPC_DEVICE_H
  #define _ASM_POWERPC_DEVICE_H
  
- struct dma_mapping_ops;
+ struct dma_map_ops;
  struct device_node;
  
  struct dev_archdata {
        struct device_node      *of_node;
  
        /* DMA operations on that device */
-       struct dma_mapping_ops  *dma_ops;
+       struct dma_map_ops      *dma_ops;
        void                    *dma_data;
+ #ifdef CONFIG_SWIOTLB
+       dma_addr_t              max_direct_dma_addr;
+ #endif
  };
  
  static inline void dev_archdata_set_node(struct dev_archdata *ad,
@@@ -30,7 -33,4 +33,7 @@@ dev_archdata_get_node(const struct dev_
        return ad->of_node;
  }
  
 +struct pdev_archdata {
 +};
 +
  #endif /* _ASM_POWERPC_DEVICE_H */
index aa6e4500635fc0d2899b1ca2d36a4c2992659c1d,87df51720641ac7447e89cfdfc1759f185c9bf78..797ea95aae2e66858f9a8dbb1ac47d8e1de6b02a
  #include <asm/cache.h>
  #include <asm/page.h>
  #include <asm/mmu.h>
 +#include <asm/mmu-hash64.h>
  #include <asm/firmware.h>
  #include <asm/xmon.h>
  #include <asm/udbg.h>
  #include <asm/kexec.h>
  #include <asm/swiotlb.h>
+ #include <asm/mmu_context.h>
  
  #include "setup.h"
  
@@@ -143,11 -143,14 +144,14 @@@ early_param("smt-enabled", early_smt_en
  #define check_smt_enabled()
  #endif /* CONFIG_SMP */
  
- /* Put the paca pointer into r13 and SPRG3 */
+ /* Put the paca pointer into r13 and SPRG_PACA */
  void __init setup_paca(int cpu)
  {
        local_paca = &paca[cpu];
-       mtspr(SPRN_SPRG3, local_paca);
+       mtspr(SPRN_SPRG_PACA, local_paca);
+ #ifdef CONFIG_PPC_BOOK3E
+       mtspr(SPRN_SPRG_TLB_EXFRAME, local_paca->extlb);
+ #endif
  }
  
  /*
@@@ -231,9 -234,6 +235,6 @@@ void early_setup_secondary(void
  #endif /* CONFIG_SMP */
  
  #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
- extern unsigned long __secondary_hold_spinloop;
- extern void generic_secondary_smp_init(void);
  void smp_release_cpus(void)
  {
        unsigned long *ptr;
@@@ -454,6 -454,24 +455,24 @@@ static void __init irqstack_early_init(
  #define irqstack_early_init()
  #endif
  
+ #ifdef CONFIG_PPC_BOOK3E
+ static void __init exc_lvl_early_init(void)
+ {
+       unsigned int i;
+       for_each_possible_cpu(i) {
+               critirq_ctx[i] = (struct thread_info *)
+                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+               dbgirq_ctx[i] = (struct thread_info *)
+                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+               mcheckirq_ctx[i] = (struct thread_info *)
+                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+       }
+ }
+ #else
+ #define exc_lvl_early_init()
+ #endif
  /*
   * Stack space used when we detect a bad kernel stack pointer, and
   * early in SMP boots before relocation is enabled.
@@@ -513,6 -531,7 +532,7 @@@ void __init setup_arch(char **cmdline_p
        init_mm.brk = klimit;
        
        irqstack_early_init();
+       exc_lvl_early_init();
        emergency_stack_init();
  
  #ifdef CONFIG_PPC_STD_MMU_64
  #endif
  
        paging_init();
+       /* Initialize the MMU context management stuff */
+       mmu_context_init();
        ppc64_boot_msg(0x15, "Setup Done");
  }
  
@@@ -570,53 -593,25 +594,53 @@@ void cpu_die(void
  }
  
  #ifdef CONFIG_SMP
 -void __init setup_per_cpu_areas(void)
 +#define PCPU_DYN_SIZE         ()
 +
 +static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size, size_t align)
  {
 -      int i;
 -      unsigned long size;
 -      char *ptr;
 -
 -      /* Copy section for each CPU (we discard the original) */
 -      size = ALIGN(__per_cpu_end - __per_cpu_start, PAGE_SIZE);
 -#ifdef CONFIG_MODULES
 -      if (size < PERCPU_ENOUGH_ROOM)
 -              size = PERCPU_ENOUGH_ROOM;
 -#endif
 +      return __alloc_bootmem_node(NODE_DATA(cpu_to_node(cpu)), size, align,
 +                                  __pa(MAX_DMA_ADDRESS));
 +}
  
 -      for_each_possible_cpu(i) {
 -              ptr = alloc_bootmem_pages_node(NODE_DATA(cpu_to_node(i)), size);
 +static void __init pcpu_fc_free(void *ptr, size_t size)
 +{
 +      free_bootmem(__pa(ptr), size);
 +}
  
 -              paca[i].data_offset = ptr - __per_cpu_start;
 -              memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
 -      }
 +static int pcpu_cpu_distance(unsigned int from, unsigned int to)
 +{
 +      if (cpu_to_node(from) == cpu_to_node(to))
 +              return LOCAL_DISTANCE;
 +      else
 +              return REMOTE_DISTANCE;
 +}
 +
 +void __init setup_per_cpu_areas(void)
 +{
 +      const size_t dyn_size = PERCPU_MODULE_RESERVE + PERCPU_DYNAMIC_RESERVE;
 +      size_t atom_size;
 +      unsigned long delta;
 +      unsigned int cpu;
 +      int rc;
 +
 +      /*
 +       * Linear mapping is one of 4K, 1M and 16M.  For 4K, no need
 +       * to group units.  For larger mappings, use 1M atom which
 +       * should be large enough to contain a number of units.
 +       */
 +      if (mmu_linear_psize == MMU_PAGE_4K)
 +              atom_size = PAGE_SIZE;
 +      else
 +              atom_size = 1 << 20;
 +
 +      rc = pcpu_embed_first_chunk(0, dyn_size, atom_size, pcpu_cpu_distance,
 +                                  pcpu_fc_alloc, pcpu_fc_free);
 +      if (rc < 0)
 +              panic("cannot initialize percpu area (err=%d)", rc);
 +
 +      delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start;
 +      for_each_possible_cpu(cpu)
 +              paca[cpu].data_offset = delta + pcpu_unit_offsets[cpu];
  }
  #endif
  
index 244e3658983c226352721e23d1c13d858b2e05b1,3bb09975e34292ca47821e555451e94451cc25e0..58da4070723df37108247c2a01838ddbd4295610
@@@ -37,6 -37,12 +37,6 @@@ jiffies = jiffies_64 + 4
  #endif
  SECTIONS
  {
 -      /* Sections to be discarded. */
 -      /DISCARD/ : {
 -      *(.exitcall.exit)
 -      EXIT_DATA
 -      }
 -
        . = KERNELBASE;
  
  /*
        }
  #endif
  
-       . = ALIGN(PAGE_SIZE);
-       _edata  =  .;
-       PROVIDE32 (edata = .);
        /* The initial task and kernel stack */
  #ifdef CONFIG_PPC32
        . = ALIGN(8192);
                __nosave_end = .;
        }
  
+       . = ALIGN(PAGE_SIZE);
+       _edata  =  .;
+       PROVIDE32 (edata = .);
  /*
   * And finally the bss
   */
        . = ALIGN(PAGE_SIZE);
        _end = . ;
        PROVIDE32 (end = .);
 +
 +      /* Sections to be discarded. */
 +      DISCARDS
  }
index 4317a5588dafb2c26ad853e91ac27275fe709a30,bba29abe917f96293f7aaec46e243988b8e7bef5..20ef1bf5e726070103e70beb9b71be5424c42dcd
@@@ -7,6 -7,7 +7,7 @@@
  #include <linux/pagemap.h>
  #include <linux/agp_backend.h>
  #include <linux/delay.h>
+ #include <linux/vmalloc.h>
  #include <asm/uninorth.h>
  #include <asm/pci-bridge.h>
  #include <asm/prom.h>
@@@ -27,6 -28,8 +28,8 @@@
  static int uninorth_rev;
  static int is_u3;
  
+ #define DEFAULT_APERTURE_SIZE 256
+ #define DEFAULT_APERTURE_STRING "256"
  static char *aperture = NULL;
  
  static int uninorth_fetch_size(void)
@@@ -55,7 -58,7 +58,7 @@@
  
        if (!size) {
                for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++)
-                       if (values[i].size == 32)
+                       if (values[i].size == DEFAULT_APERTURE_SIZE)
                                break;
        }
  
@@@ -135,7 -138,7 +138,7 @@@ static int uninorth_configure(void
        if (is_u3) {
                pci_write_config_dword(agp_bridge->dev,
                                       UNI_N_CFG_GART_DUMMY_PAGE,
 -                                     agp_bridge->scratch_page_real >> 12);
 +                                     page_to_phys(agp_bridge->scratch_page_page) >> 12);
        }
  
        return 0;
@@@ -179,8 -182,6 +182,6 @@@ static int uninorth_insert_memory(struc
        }
        (void)in_le32((volatile u32*)&agp_bridge->gatt_table[pg_start]);
        mb();
-       flush_dcache_range((unsigned long)&agp_bridge->gatt_table[pg_start],
-               (unsigned long)&agp_bridge->gatt_table[pg_start + mem->page_count]);
  
        uninorth_tlbflush(mem);
        return 0;
@@@ -224,7 -225,6 +225,6 @@@ static int u3_insert_memory(struct agp_
                                   (unsigned long)__va(page_to_phys(mem->pages[i]))+0x1000);
        }
        mb();
-       flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]);
        uninorth_tlbflush(mem);
  
        return 0;
@@@ -243,7 -243,6 +243,6 @@@ int u3_remove_memory(struct agp_memory 
        for (i = 0; i < mem->page_count; ++i)
                gp[i] = 0;
        mb();
-       flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]);
        uninorth_tlbflush(mem);
  
        return 0;
@@@ -396,6 -395,7 +395,7 @@@ static int uninorth_create_gatt_table(s
        int i;
        void *temp;
        struct page *page;
+       struct page **pages;
  
        /* We can't handle 2 level gatt's */
        if (bridge->driver->size_type == LVL2_APER_SIZE)
        if (table == NULL)
                return -ENOMEM;
  
+       pages = kmalloc((1 << page_order) * sizeof(struct page*), GFP_KERNEL);
+       if (pages == NULL)
+               goto enomem;
        table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1);
  
-       for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
+       for (page = virt_to_page(table), i = 0; page <= virt_to_page(table_end);
+            page++, i++) {
                SetPageReserved(page);
+               pages[i] = page;
+       }
  
        bridge->gatt_table_real = (u32 *) table;
-       bridge->gatt_table = (u32 *)table;
+       /* Need to clear out any dirty data still sitting in caches */
+       flush_dcache_range((unsigned long)table,
+                          (unsigned long)(table_end + PAGE_SIZE));
+       bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG);
+       if (bridge->gatt_table == NULL)
+               goto enomem;
 -      bridge->gatt_bus_addr = virt_to_gart(table);
 +      bridge->gatt_bus_addr = virt_to_phys(table);
  
        for (i = 0; i < num_entries; i++)
                bridge->gatt_table[i] = 0;
  
-       flush_dcache_range((unsigned long)table, (unsigned long)table_end);
        return 0;
+ enomem:
+       kfree(pages);
+       if (table)
+               free_pages((unsigned long)table, page_order);
+       return -ENOMEM;
  }
  
  static int uninorth_free_gatt_table(struct agp_bridge_data *bridge)
         * from the table.
         */
  
+       vunmap(bridge->gatt_table);
        table = (char *) bridge->gatt_table_real;
        table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1);
  
@@@ -474,13 -493,11 +493,11 @@@ void null_cache_flush(void
  
  /* Setup function */
  
- static const struct aper_size_info_32 uninorth_sizes[7] =
+ static const struct aper_size_info_32 uninorth_sizes[] =
  {
- #if 0 /* Not sure uninorth supports that high aperture sizes */
        {256, 65536, 6, 64},
        {128, 32768, 5, 32},
        {64, 16384, 4, 16},
- #endif
        {32, 8192, 3, 8},
        {16, 4096, 2, 4},
        {8, 2048, 1, 2},
   * Not sure that u3 supports that high aperture sizes but it
   * would strange if it did not :)
   */
- static const struct aper_size_info_32 u3_sizes[8] =
+ static const struct aper_size_info_32 u3_sizes[] =
  {
        {512, 131072, 7, 128},
        {256, 65536, 6, 64},
@@@ -507,7 -524,7 +524,7 @@@ const struct agp_bridge_driver uninorth
        .owner                  = THIS_MODULE,
        .aperture_sizes         = (void *)uninorth_sizes,
        .size_type              = U32_APER_SIZE,
-       .num_aperture_sizes     = 4,
+       .num_aperture_sizes     = ARRAY_SIZE(uninorth_sizes),
        .configure              = uninorth_configure,
        .fetch_size             = uninorth_fetch_size,
        .cleanup                = uninorth_cleanup,
@@@ -534,7 -551,7 +551,7 @@@ const struct agp_bridge_driver u3_agp_d
        .owner                  = THIS_MODULE,
        .aperture_sizes         = (void *)u3_sizes,
        .size_type              = U32_APER_SIZE,
-       .num_aperture_sizes     = 8,
+       .num_aperture_sizes     = ARRAY_SIZE(u3_sizes),
        .configure              = uninorth_configure,
        .fetch_size             = uninorth_fetch_size,
        .cleanup                = uninorth_cleanup,
@@@ -717,7 -734,7 +734,7 @@@ module_param(aperture, charp, 0)
  MODULE_PARM_DESC(aperture,
                 "Aperture size, must be power of two between 4MB and an\n"
                 "\t\tupper limit specific to the UniNorth revision.\n"
-                "\t\tDefault: 32M");
+                "\t\tDefault: " DEFAULT_APERTURE_STRING "M");
  
  MODULE_AUTHOR("Ben Herrenschmidt & Paul Mackerras");
  MODULE_LICENSE("GPL");
diff --combined include/linux/pci_ids.h
index 555a8262fbc2b8ce407e156327a5939b5ceba4c5,c86bb6e3dfccc966b065ca6c6486224e9477976b..0d96be93b926c345ac731efa7926c7006b472549
  #define PCI_DEVICE_ID_ATI_IXP600_IDE  0x438c
  #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390
  #define PCI_DEVICE_ID_ATI_IXP700_IDE  0x439c
 +/* AMD SB Chipset */
 +#define PCI_DEVICE_ID_AMD_SB900_IDE    0x780c
 +#define PCI_DEVICE_ID_AMD_SB900_SATA_IDE 0x7800
  
  #define PCI_VENDOR_ID_VLSI            0x1004
  #define PCI_DEVICE_ID_VLSI_82C592     0x0005
  #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450
  #define PCI_DEVICE_ID_AMD_8131_APIC   0x7451
  #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458
 +#define PCI_DEVICE_ID_AMD_CS5535_IDE    0x208F
  #define PCI_DEVICE_ID_AMD_CS5536_ISA    0x2090
  #define PCI_DEVICE_ID_AMD_CS5536_FLASH  0x2091
  #define PCI_DEVICE_ID_AMD_CS5536_AUDIO  0x2093
  #define PCI_DEVICE_ID_APPLE_SH_SUNGEM   0x0051
  #define PCI_DEVICE_ID_APPLE_U3L_AGP   0x0058
  #define PCI_DEVICE_ID_APPLE_U3H_AGP   0x0059
+ #define PCI_DEVICE_ID_APPLE_U4_PCIE   0x005b
  #define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066
  #define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069
  #define PCI_DEVICE_ID_APPLE_IPID2_FW  0x006a
  
  #define PCI_VENDOR_ID_SAMSUNG         0x144d
  
 +#define PCI_VENDOR_ID_GIGABYTE                0x1458
 +
  #define PCI_VENDOR_ID_AMBIT           0x1468
  
  #define PCI_VENDOR_ID_MYRICOM         0x14c1
  #define PCI_DEVICE_ID_TIGON3_5787M    0x1693
  #define PCI_DEVICE_ID_TIGON3_5782     0x1696
  #define PCI_DEVICE_ID_TIGON3_5784     0x1698
 -#define PCI_DEVICE_ID_TIGON3_5785     0x1699
  #define PCI_DEVICE_ID_TIGON3_5786     0x169a
  #define PCI_DEVICE_ID_TIGON3_5787     0x169b
  #define PCI_DEVICE_ID_TIGON3_5788     0x169c
diff --combined lib/Kconfig.debug
index 55d2acc607a1b052cf8e6d9474585e543e84d9cc,d5ca9a5a31c6b694fe0f839554d788f8fa35ce7a..d57b12f59c8c3f0686eca5cbd416e5378177da8b
@@@ -338,7 -338,7 +338,7 @@@ config SLUB_STAT
  
  config DEBUG_KMEMLEAK
        bool "Kernel memory leak detector"
-       depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM) && \
+       depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM || PPC) && \
                !MEMORY_HOTPLUG
        select DEBUG_FS if SYSFS
        select STACKTRACE if STACKTRACE_SUPPORT
@@@ -653,21 -653,6 +653,21 @@@ config DEBUG_NOTIFIER
          This is a relatively cheap check but if you care about maximum
          performance, say N.
  
 +config DEBUG_CREDENTIALS
 +      bool "Debug credential management"
 +      depends on DEBUG_KERNEL
 +      help
 +        Enable this to turn on some debug checking for credential
 +        management.  The additional code keeps track of the number of
 +        pointers from task_structs to any given cred struct, and checks to
 +        see that this number never exceeds the usage count of the cred
 +        struct.
 +
 +        Furthermore, if SELinux is enabled, this also checks that the
 +        security pointer in the cred struct is never seen to be invalid.
 +
 +        If unsure, say N.
 +
  #
  # Select this config option from the architecture Kconfig, if it
  # it is preferred to always offer frame pointers as a config
@@@ -740,7 -725,7 +740,7 @@@ config RCU_TORTURE_TEST_RUNNABL
  
  config RCU_CPU_STALL_DETECTOR
        bool "Check for stalled CPUs delaying RCU grace periods"
 -      depends on CLASSIC_RCU || TREE_RCU
 +      depends on TREE_RCU || TREE_PREEMPT_RCU
        default n
        help
          This option causes RCU to printk information on which
@@@ -805,21 -790,6 +805,21 @@@ config DEBUG_BLOCK_EXT_DEV
  
          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 LKDTM
        tristate "Linux Kernel Dump Test Tool Module"
        depends on DEBUG_KERNEL