Merge branch 'master' into for-next
authorTejun Heo <tj@kernel.org>
Fri, 3 Jul 2009 22:13:18 +0000 (07:13 +0900)
committerTejun Heo <tj@kernel.org>
Fri, 3 Jul 2009 22:13:18 +0000 (07:13 +0900)
Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
changes.  As alpha in percpu tree uses 'weak' attribute instead of
inline assembly, there's no need for __used attribute.

Conflicts:
arch/alpha/include/asm/percpu.h
arch/mn10300/kernel/vmlinux.lds.S
include/linux/percpu-defs.h

16 files changed:
1  2 
Makefile
arch/arm/kernel/vmlinux.lds.S
arch/mn10300/kernel/vmlinux.lds.S
arch/powerpc/Kconfig
arch/x86/Kconfig
arch/x86/kernel/cpu/mcheck/mce.c
arch/x86/kernel/cpu/perf_counter.c
block/cfq-iosched.c
include/asm-generic/vmlinux.lds.h
include/linux/percpu-defs.h
init/main.c
kernel/perf_counter.c
kernel/trace/trace_events.c
lib/Kconfig.debug
mm/page-writeback.c
mm/slub.c

diff --cc Makefile
Simple merge
@@@ -82,9 -83,16 +83,17 @@@ SECTION
                EXIT_TEXT
                EXIT_DATA
                *(.exitcall.exit)
 +              *(.discard)
                *(.ARM.exidx.exit.text)
                *(.ARM.extab.exit.text)
+ #ifndef CONFIG_HOTPLUG_CPU
+               *(.ARM.exidx.cpuexit.text)
+               *(.ARM.extab.cpuexit.text)
+ #endif
+ #ifndef CONFIG_HOTPLUG
+               *(.ARM.exidx.devexit.text)
+               *(.ARM.extab.devexit.text)
+ #endif
  #ifndef CONFIG_MMU
                *(.fixup)
                *(__ex_table)
@@@ -145,8 -117,7 +117,8 @@@ SECTION
  
    /* Sections to be discarded */
    /DISCARD/ : {
-       *(.exitcall.exit)
+       EXIT_CALL
 +      *(.discard)
        }
  
    STABS_DEBUG
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
        *(.init.ramfs)                                                  \
        VMLINUX_SYMBOL(__initramfs_end) = .;
  #else
- #define INITRAMFS
+ #define INIT_RAM_FS
  #endif
  
 +#define DISCARDS                                                      \
 +      /DISCARD/ : {                                                   \
 +      EXIT_TEXT                                                       \
 +      EXIT_DATA                                                       \
 +      *(.exitcall.exit)                                               \
 +      *(.discard)                                                     \
 +      }
 +
  /**
   * PERCPU_VADDR - define output section for percpu area
   * @vaddr: explicit base address (optional)
   * linkage errors occur due the compiler generating the wrong code to access
   * that section.
   */
 -#define DECLARE_PER_CPU_SECTION(type, name, section)                  \
 -      extern                                                          \
 -      __attribute__((__section__(PER_CPU_BASE_SECTION section)))      \
 -      PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
 -
 -#define DEFINE_PER_CPU_SECTION(type, name, section)                   \
 -      __attribute__((__section__(PER_CPU_BASE_SECTION section)))      \
 -      PER_CPU_ATTRIBUTES PER_CPU_DEF_ATTRIBUTES                       \
 +#define __PCPU_ATTRS(sec)                                             \
 +      __attribute__((section(PER_CPU_BASE_SECTION sec)))              \
 +      PER_CPU_ATTRIBUTES
 +
 +#define __PCPU_DUMMY_ATTRS                                            \
 +      __attribute__((section(".discard"), unused))
 +
 +/*
 + * s390 and alpha modules require percpu variables to be defined as
 + * weak to force the compiler to generate GOT based external
 + * references for them.  This is necessary because percpu sections
 + * will be located outside of the usually addressable area.
 + *
 + * This definition puts the following two extra restrictions when
 + * defining percpu variables.
 + *
 + * 1. The symbol must be globally unique, even the static ones.
 + * 2. Static percpu variables cannot be defined inside a function.
 + *
 + * Archs which need weak percpu definitions should define
 + * ARCH_NEEDS_WEAK_PER_CPU in asm/percpu.h when necessary.
 + *
 + * To ensure that the generic code observes the above two
 + * restrictions, if CONFIG_DEBUG_FORCE_WEAK_PER_CPU is set weak
 + * definition is used for all cases.
 + */
 +#if defined(ARCH_NEEDS_WEAK_PER_CPU) || defined(CONFIG_DEBUG_FORCE_WEAK_PER_CPU)
 +/*
 + * __pcpu_scope_* dummy variable is used to enforce scope.  It
 + * receives the static modifier when it's used in front of
 + * DEFINE_PER_CPU() and will trigger build failure if
 + * DECLARE_PER_CPU() is used for the same variable.
 + *
 + * __pcpu_unique_* dummy variable is used to enforce symbol uniqueness
 + * such that hidden weak symbol collision, which will cause unrelated
 + * variables to share the same address, can be detected during build.
 + */
 +#define DECLARE_PER_CPU_SECTION(type, name, sec)                      \
 +      extern __PCPU_DUMMY_ATTRS char __pcpu_scope_##name;             \
 +      extern __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name
 +
 +#define DEFINE_PER_CPU_SECTION(type, name, sec)                               \
 +      __PCPU_DUMMY_ATTRS char __pcpu_scope_##name;                    \
 +      __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;                   \
-       __PCPU_ATTRS(sec) __weak __typeof__(type) per_cpu__##name
++      __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak                 \
++      __typeof__(type) per_cpu__##name
 +#else
 +/*
 + * Normal declaration and definition macros.
 + */
 +#define DECLARE_PER_CPU_SECTION(type, name, sec)                      \
 +      extern __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name
 +
 +#define DEFINE_PER_CPU_SECTION(type, name, sec)                               \
-       __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name
++      __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES                        \
+       __typeof__(type) per_cpu__##name
 +#endif
  
  /*
   * Variant on the per-CPU variable declaration/definition theme used for
diff --cc init/main.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc mm/slub.c
Simple merge