aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kbuild/kbuild.txt16
-rw-r--r--Documentation/kbuild/makefiles.txt20
-rw-r--r--Makefile62
-rw-r--r--arch/arm/Makefile6
-rw-r--r--arch/arm/boot/install.sh4
-rw-r--r--arch/arm/kernel/Makefile3
-rw-r--r--arch/arm/kernel/init_task.c5
-rw-r--r--arch/avr32/kernel/init_task.c5
-rw-r--r--arch/avr32/mm/init.c4
-rw-r--r--arch/blackfin/Makefile4
-rw-r--r--arch/blackfin/boot/install.sh6
-rw-r--r--arch/cris/Makefile2
-rw-r--r--arch/cris/kernel/Makefile1
-rw-r--r--arch/cris/kernel/process.c5
-rw-r--r--arch/frv/kernel/init_task.c5
-rw-r--r--arch/h8300/kernel/init_task.c5
-rw-r--r--arch/ia64/install.sh4
-rw-r--r--arch/ia64/kernel/Makefile.gate2
-rw-r--r--arch/ia64/kernel/init_task.c3
-rw-r--r--arch/m32r/boot/compressed/install.sh4
-rw-r--r--arch/m32r/kernel/init_task.c5
-rw-r--r--arch/m68k/install.sh4
-rw-r--r--arch/m68k/kernel/process.c6
-rw-r--r--arch/m68knommu/kernel/init_task.c5
-rw-r--r--arch/microblaze/kernel/init_task.c5
-rw-r--r--arch/mips/Makefile27
-rw-r--r--arch/mips/kernel/init_task.c5
-rw-r--r--arch/mips/kernel/vmlinux.lds.S13
-rw-r--r--arch/mn10300/kernel/init_task.c5
-rw-r--r--arch/parisc/Makefile4
-rw-r--r--arch/parisc/install.sh4
-rw-r--r--arch/parisc/kernel/init_task.c4
-rw-r--r--arch/powerpc/Makefile6
-rw-r--r--arch/powerpc/boot/install.sh4
-rw-r--r--arch/powerpc/kernel/init_task.c5
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c5
-rw-r--r--arch/powerpc/kernel/vdso.c3
-rw-r--r--arch/powerpc/kernel/vdso32/Makefile2
-rw-r--r--arch/powerpc/kernel/vdso32/vdso32_wrapper.S3
-rw-r--r--arch/powerpc/kernel/vdso64/Makefile2
-rw-r--r--arch/powerpc/kernel/vdso64/vdso64_wrapper.S3
-rw-r--r--arch/s390/boot/install.sh4
-rw-r--r--arch/s390/kernel/init_task.c5
-rw-r--r--arch/s390/kernel/vdso.c2
-rw-r--r--arch/s390/kernel/vdso32/Makefile2
-rw-r--r--arch/s390/kernel/vdso32/vdso32_wrapper.S3
-rw-r--r--arch/s390/kernel/vdso64/Makefile2
-rw-r--r--arch/s390/kernel/vdso64/vdso64_wrapper.S3
-rw-r--r--arch/score/kernel/init_task.c5
-rw-r--r--arch/sh/boot/compressed/install.sh4
-rw-r--r--arch/sh/kernel/init_task.c5
-rw-r--r--arch/sh/kernel/irq.c6
-rw-r--r--arch/sh/kernel/vsyscall/Makefile2
-rw-r--r--arch/sparc/Makefile4
-rw-r--r--arch/sparc/kernel/Makefile6
-rw-r--r--arch/sparc/kernel/init_task.c5
-rw-r--r--arch/um/Makefile9
-rw-r--r--arch/um/kernel/Makefile3
-rw-r--r--arch/um/kernel/init_task.c5
-rw-r--r--arch/um/kernel/vmlinux.lds.S3
-rw-r--r--arch/x86/Makefile4
-rw-r--r--arch/x86/boot/install.sh4
-rw-r--r--arch/x86/include/asm/cache.h4
-rw-r--r--arch/x86/kernel/head_32.S4
-rw-r--r--arch/x86/kernel/head_64.S2
-rw-r--r--arch/x86/kernel/init_task.c5
-rw-r--r--arch/x86/vdso/Makefile2
-rw-r--r--arch/xtensa/kernel/Makefile3
-rw-r--r--arch/xtensa/kernel/head.S2
-rw-r--r--arch/xtensa/kernel/init_task.c5
-rw-r--r--include/linux/linkage.h2
-rw-r--r--init/Kconfig8
-rw-r--r--lib/Kconfig.debug8
-rw-r--r--scripts/Kbuild.include16
-rw-r--r--scripts/Makefile.build6
-rw-r--r--scripts/basic/docproc.c34
-rw-r--r--scripts/basic/fixdep.c26
-rw-r--r--scripts/basic/hash.c4
-rwxr-xr-xscripts/checkincludes.pl71
-rw-r--r--scripts/kconfig/conf.c24
-rw-r--r--scripts/kconfig/confdata.c2
-rw-r--r--scripts/kconfig/expr.c6
-rw-r--r--scripts/kconfig/gconf.c21
-rw-r--r--scripts/kconfig/gconf.glade4
-rw-r--r--scripts/kconfig/kxgettext.c4
-rw-r--r--scripts/kconfig/lkc_proto.h2
-rw-r--r--scripts/kconfig/mconf.c78
-rw-r--r--scripts/kconfig/menu.c84
-rw-r--r--scripts/kconfig/qconf.cc10
-rw-r--r--scripts/kconfig/symbol.c6
-rw-r--r--scripts/markup_oops.pl5
-rwxr-xr-xscripts/tags.sh3
-rw-r--r--usr/.gitignore2
-rw-r--r--usr/Makefile2
94 files changed, 473 insertions, 354 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index f3355b6812df..bb3bf38f03da 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -65,6 +65,22 @@ INSTALL_PATH
65INSTALL_PATH specifies where to place the updated kernel and system map 65INSTALL_PATH specifies where to place the updated kernel and system map
66images. Default is /boot, but you can set it to other values. 66images. Default is /boot, but you can set it to other values.
67 67
68INSTALLKERNEL
69--------------------------------------------------
70Install script called when using "make install".
71The default name is "installkernel".
72
73The script will be called with the following arguments:
74 $1 - kernel version
75 $2 - kernel image file
76 $3 - kernel map file
77 $4 - default install path (use root directory if blank)
78
79The implmentation of "make install" is architecture specific
80and it may differ from the above.
81
82INSTALLKERNEL is provided to enable the possibility to
83specify a custom installer when cross compiling a kernel.
68 84
69MODLIB 85MODLIB
70-------------------------------------------------- 86--------------------------------------------------
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index d76cfd8712e1..71c602d61680 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -18,6 +18,7 @@ This document describes the Linux kernel Makefiles.
18 --- 3.9 Dependency tracking 18 --- 3.9 Dependency tracking
19 --- 3.10 Special Rules 19 --- 3.10 Special Rules
20 --- 3.11 $(CC) support functions 20 --- 3.11 $(CC) support functions
21 --- 3.12 $(LD) support functions
21 22
22 === 4 Host Program support 23 === 4 Host Program support
23 --- 4.1 Simple Host Program 24 --- 4.1 Simple Host Program
@@ -435,14 +436,14 @@ more details, with real examples.
435 The second argument is optional, and if supplied will be used 436 The second argument is optional, and if supplied will be used
436 if first argument is not supported. 437 if first argument is not supported.
437 438
438 ld-option 439 cc-ldoption
439 ld-option is used to check if $(CC) when used to link object files 440 cc-ldoption is used to check if $(CC) when used to link object files
440 supports the given option. An optional second option may be 441 supports the given option. An optional second option may be
441 specified if first option are not supported. 442 specified if first option are not supported.
442 443
443 Example: 444 Example:
444 #arch/i386/kernel/Makefile 445 #arch/i386/kernel/Makefile
445 vsyscall-flags += $(call ld-option, -Wl$(comma)--hash-style=sysv) 446 vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
446 447
447 In the above example, vsyscall-flags will be assigned the option 448 In the above example, vsyscall-flags will be assigned the option
448 -Wl$(comma)--hash-style=sysv if it is supported by $(CC). 449 -Wl$(comma)--hash-style=sysv if it is supported by $(CC).
@@ -570,6 +571,19 @@ more details, with real examples.
570 endif 571 endif
571 endif 572 endif
572 573
574--- 3.12 $(LD) support functions
575
576 ld-option
577 ld-option is used to check if $(LD) supports the supplied option.
578 ld-option takes two options as arguments.
579 The second argument is an optional option that can be used if the
580 first option is not supported by $(LD).
581
582 Example:
583 #Makefile
584 LDFLAGS_vmlinux += $(call really-ld-option, -X)
585
586
573=== 4 Host Program support 587=== 4 Host Program support
574 588
575Kbuild supports building executables on the host for use during the 589Kbuild supports building executables on the host for use during the
diff --git a/Makefile b/Makefile
index 433493a2b77b..f908accd332b 100644
--- a/Makefile
+++ b/Makefile
@@ -179,9 +179,46 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
179# Alternatively CROSS_COMPILE can be set in the environment. 179# Alternatively CROSS_COMPILE can be set in the environment.
180# Default value for CROSS_COMPILE is not to prefix executables 180# Default value for CROSS_COMPILE is not to prefix executables
181# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile 181# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
182#
183# To force ARCH and CROSS_COMPILE settings include kernel.* files
184# in the kernel tree - do not patch this file.
182export KBUILD_BUILDHOST := $(SUBARCH) 185export KBUILD_BUILDHOST := $(SUBARCH)
183ARCH ?= $(SUBARCH) 186
184CROSS_COMPILE ?= 187# Kbuild save the ARCH and CROSS_COMPILE setting in kernel.* files.
188# Restore these settings and check that user did not specify
189# conflicting values.
190
191saved_arch := $(shell cat include/generated/kernel.arch 2> /dev/null)
192saved_cross := $(shell cat include/generated/kernel.cross 2> /dev/null)
193
194ifneq ($(CROSS_COMPILE),)
195 ifneq ($(saved_cross),)
196 ifneq ($(CROSS_COMPILE),$(saved_cross))
197 $(error CROSS_COMPILE changed from \
198 "$(saved_cross)" to \
199 to "$(CROSS_COMPILE)". \
200 Use "make mrproper" to fix it up)
201 endif
202 endif
203else
204 CROSS_COMPILE := $(saved_cross)
205endif
206
207ifneq ($(ARCH),)
208 ifneq ($(saved_arch),)
209 ifneq ($(saved_arch),$(ARCH))
210 $(error ARCH changed from \
211 "$(saved_arch)" to "$(ARCH)". \
212 Use "make mrproper" to fix it up)
213 endif
214 endif
215else
216 ifneq ($(saved_arch),)
217 ARCH := $(saved_arch)
218 else
219 ARCH := $(SUBARCH)
220 endif
221endif
185 222
186# Architecture as present in compile.h 223# Architecture as present in compile.h
187UTS_MACHINE := $(ARCH) 224UTS_MACHINE := $(ARCH)
@@ -315,6 +352,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
315OBJDUMP = $(CROSS_COMPILE)objdump 352OBJDUMP = $(CROSS_COMPILE)objdump
316AWK = awk 353AWK = awk
317GENKSYMS = scripts/genksyms/genksyms 354GENKSYMS = scripts/genksyms/genksyms
355INSTALLKERNEL := installkernel
318DEPMOD = /sbin/depmod 356DEPMOD = /sbin/depmod
319KALLSYMS = scripts/kallsyms 357KALLSYMS = scripts/kallsyms
320PERL = perl 358PERL = perl
@@ -353,7 +391,8 @@ KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
353 391
354export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION 392export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
355export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC 393export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
356export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE 394export CPP AR NM STRIP OBJCOPY OBJDUMP
395export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE
357export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 396export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
358 397
359export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 398export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
@@ -444,6 +483,11 @@ ifeq ($(config-targets),1)
444include $(srctree)/arch/$(SRCARCH)/Makefile 483include $(srctree)/arch/$(SRCARCH)/Makefile
445export KBUILD_DEFCONFIG KBUILD_KCONFIG 484export KBUILD_DEFCONFIG KBUILD_KCONFIG
446 485
486# save ARCH & CROSS_COMPILE settings
487$(shell mkdir -p include/generated && \
488 echo $(ARCH) > include/generated/kernel.arch && \
489 echo $(CROSS_COMPILE) > include/generated/kernel.cross)
490
447config: scripts_basic outputmakefile FORCE 491config: scripts_basic outputmakefile FORCE
448 $(Q)mkdir -p include/linux include/config 492 $(Q)mkdir -p include/linux include/config
449 $(Q)$(MAKE) $(build)=scripts/kconfig $@ 493 $(Q)$(MAKE) $(build)=scripts/kconfig $@
@@ -571,6 +615,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
571# revert to pre-gcc-4.4 behaviour of .eh_frame 615# revert to pre-gcc-4.4 behaviour of .eh_frame
572KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) 616KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
573 617
618# conserve stack if available
619KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
620
574# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments 621# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
575# But warn user when we do so 622# But warn user when we do so
576warn-assign = \ 623warn-assign = \
@@ -591,12 +638,12 @@ endif
591 638
592# Use --build-id when available. 639# Use --build-id when available.
593LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ 640LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
594 $(call ld-option, -Wl$(comma)--build-id,)) 641 $(call cc-ldoption, -Wl$(comma)--build-id,))
595LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 642LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
596LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 643LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
597 644
598ifeq ($(CONFIG_STRIP_ASM_SYMS),y) 645ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
599LDFLAGS_vmlinux += -X 646LDFLAGS_vmlinux += $(call ld-option, -X,)
600endif 647endif
601 648
602# Default kernel image to build when no specific target is given. 649# Default kernel image to build when no specific target is given.
@@ -980,11 +1027,6 @@ prepare0: archprepare FORCE
980# All the preparing.. 1027# All the preparing..
981prepare: prepare0 1028prepare: prepare0
982 1029
983# Leave this as default for preprocessing vmlinux.lds.S, which is now
984# done in arch/$(ARCH)/kernel/Makefile
985
986export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
987
988# The asm symlink changes when $(ARCH) changes. 1030# The asm symlink changes when $(ARCH) changes.
989# Detect this and ask user to run make mrproper 1031# Detect this and ask user to run make mrproper
990# If asm is a stale symlink (point to dir that does not exist) remove it 1032# If asm is a stale symlink (point to dir that does not exist) remove it
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 54661125a8bf..a73caaf66763 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -14,7 +14,7 @@ LDFLAGS_vmlinux :=-p --no-undefined -X
14ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) 14ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
15LDFLAGS_vmlinux += --be8 15LDFLAGS_vmlinux += --be8
16endif 16endif
17CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) 17
18OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 18OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
19GZFLAGS :=-9 19GZFLAGS :=-9
20#KBUILD_CFLAGS +=-pipe 20#KBUILD_CFLAGS +=-pipe
@@ -279,7 +279,7 @@ define archhelp
279 echo ' (supply initrd image via make variable INITRD=<path>)' 279 echo ' (supply initrd image via make variable INITRD=<path>)'
280 echo ' install - Install uncompressed kernel' 280 echo ' install - Install uncompressed kernel'
281 echo ' zinstall - Install compressed kernel' 281 echo ' zinstall - Install compressed kernel'
282 echo ' Install using (your) ~/bin/installkernel or' 282 echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or'
283 echo ' (distribution) /sbin/installkernel or' 283 echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
284 echo ' install to $$(INSTALL_PATH) and run lilo' 284 echo ' install to $$(INSTALL_PATH) and run lilo'
285endef 285endef
diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh
index 9f9bed207345..06ea7d42ce8e 100644
--- a/arch/arm/boot/install.sh
+++ b/arch/arm/boot/install.sh
@@ -21,8 +21,8 @@
21# 21#
22 22
23# User may have a custom install script 23# User may have a custom install script
24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 24if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 25if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
26 26
27if [ "$(basename $2)" = "zImage" ]; then 27if [ "$(basename $2)" = "zImage" ]; then
28# Compressed install 28# Compressed install
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 3213c9382b17..c446aeff7b89 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -2,7 +2,8 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) 5CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
6AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
6 7
7ifdef CONFIG_DYNAMIC_FTRACE 8ifdef CONFIG_DYNAMIC_FTRACE
8CFLAGS_REMOVE_ftrace.o = -pg 9CFLAGS_REMOVE_ftrace.o = -pg
diff --git a/arch/arm/kernel/init_task.c b/arch/arm/kernel/init_task.c
index 3f470866bb89..e7cbb50dc356 100644
--- a/arch/arm/kernel/init_task.c
+++ b/arch/arm/kernel/init_task.c
@@ -24,9 +24,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
24 * 24 *
25 * The things we do for performance.. 25 * The things we do for performance..
26 */ 26 */
27union thread_union init_thread_union 27union thread_union init_thread_union __init_task_data =
28 __attribute__((__section__(".data.init_task"))) = 28 { INIT_THREAD_INFO(init_task) };
29 { INIT_THREAD_INFO(init_task) };
30 29
31/* 30/*
32 * Initial task structure. 31 * Initial task structure.
diff --git a/arch/avr32/kernel/init_task.c b/arch/avr32/kernel/init_task.c
index 57ec9f2dcd95..6b2343e6fe33 100644
--- a/arch/avr32/kernel/init_task.c
+++ b/arch/avr32/kernel/init_task.c
@@ -18,9 +18,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
18/* 18/*
19 * Initial thread structure. Must be aligned on an 8192-byte boundary. 19 * Initial thread structure. Must be aligned on an 8192-byte boundary.
20 */ 20 */
21union thread_union init_thread_union 21union thread_union init_thread_union __init_task_data =
22 __attribute__((__section__(".data.init_task"))) = 22 { INIT_THREAD_INFO(init_task) };
23 { INIT_THREAD_INFO(init_task) };
24 23
25/* 24/*
26 * Initial task structure. 25 * Initial task structure.
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index 376f18c4a6cb..94925641e53e 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -24,11 +24,9 @@
24#include <asm/setup.h> 24#include <asm/setup.h>
25#include <asm/sections.h> 25#include <asm/sections.h>
26 26
27#define __page_aligned __attribute__((section(".data.page_aligned")))
28
29DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 27DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
30 28
31pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned; 29pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_data;
32 30
33struct page *empty_zero_page; 31struct page *empty_zero_page;
34EXPORT_SYMBOL(empty_zero_page); 32EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 6f9533c3d752..f063b772934b 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -155,7 +155,7 @@ define archhelp
155 echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)' 155 echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)'
156 echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)' 156 echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)'
157 echo ' install - Install kernel using' 157 echo ' install - Install kernel using'
158 echo ' (your) ~/bin/$(CROSS_COMPILE)installkernel or' 158 echo ' (your) ~/bin/$(INSTALLKERNEL) or'
159 echo ' (distribution) PATH: $(CROSS_COMPILE)installkernel or' 159 echo ' (distribution) PATH: $(INSTALLKERNEL) or'
160 echo ' install to $$(INSTALL_PATH)' 160 echo ' install to $$(INSTALL_PATH)'
161endef 161endef
diff --git a/arch/blackfin/boot/install.sh b/arch/blackfin/boot/install.sh
index 9560a6b29100..e2c6e40902b7 100644
--- a/arch/blackfin/boot/install.sh
+++ b/arch/blackfin/boot/install.sh
@@ -36,9 +36,9 @@ verify "$3"
36 36
37# User may have a custom install script 37# User may have a custom install script
38 38
39if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 39if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
40if which ${CROSS_COMPILE}installkernel >/dev/null 2>&1; then 40if which ${INSTALLKERNEL} >/dev/null 2>&1; then
41 exec ${CROSS_COMPILE}installkernel "$@" 41 exec ${INSTALLKERNEL} "$@"
42fi 42fi
43 43
44# Default install - same as make zlilo 44# Default install - same as make zlilo
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
index 71e17d3eeddb..29c2ceb38a76 100644
--- a/arch/cris/Makefile
+++ b/arch/cris/Makefile
@@ -42,8 +42,6 @@ LD = $(CROSS_COMPILE)ld -mcrislinux
42 42
43OBJCOPYFLAGS := -O binary -R .note -R .comment -S 43OBJCOPYFLAGS := -O binary -R .note -R .comment -S
44 44
45CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
46
47KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc) 45KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc)
48KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc) 46KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc)
49KBUILD_CPPFLAGS += $(inc) 47KBUILD_CPPFLAGS += $(inc)
diff --git a/arch/cris/kernel/Makefile b/arch/cris/kernel/Makefile
index ee7bcd4d20b2..b45640b3e600 100644
--- a/arch/cris/kernel/Makefile
+++ b/arch/cris/kernel/Makefile
@@ -3,6 +3,7 @@
3# Makefile for the linux kernel. 3# Makefile for the linux kernel.
4# 4#
5 5
6CPPFLAGS_vmlinux.lds := -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
6extra-y := vmlinux.lds 7extra-y := vmlinux.lds
7 8
8obj-y := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o 9obj-y := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 51dcd04d2777..c99aeab7cef7 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -45,9 +45,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
45 * way process stacks are handled. This is done by having a special 45 * way process stacks are handled. This is done by having a special
46 * "init_task" linker map entry.. 46 * "init_task" linker map entry..
47 */ 47 */
48union thread_union init_thread_union 48union thread_union init_thread_union __init_task_data =
49 __attribute__((__section__(".data.init_task"))) = 49 { INIT_THREAD_INFO(init_task) };
50 { INIT_THREAD_INFO(init_task) };
51 50
52/* 51/*
53 * Initial task structure. 52 * Initial task structure.
diff --git a/arch/frv/kernel/init_task.c b/arch/frv/kernel/init_task.c
index 1d3df1d9495c..3c3e0b336a9d 100644
--- a/arch/frv/kernel/init_task.c
+++ b/arch/frv/kernel/init_task.c
@@ -19,9 +19,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
19 * way process stacks are handled. This is done by having a special 19 * way process stacks are handled. This is done by having a special
20 * "init_task" linker map entry.. 20 * "init_task" linker map entry..
21 */ 21 */
22union thread_union init_thread_union 22union thread_union init_thread_union __init_task_data =
23 __attribute__((__section__(".data.init_task"))) = 23 { INIT_THREAD_INFO(init_task) };
24 { INIT_THREAD_INFO(init_task) };
25 24
26/* 25/*
27 * Initial task structure. 26 * Initial task structure.
diff --git a/arch/h8300/kernel/init_task.c b/arch/h8300/kernel/init_task.c
index 089c65ed6eb3..54c1062ee80e 100644
--- a/arch/h8300/kernel/init_task.c
+++ b/arch/h8300/kernel/init_task.c
@@ -31,7 +31,6 @@ EXPORT_SYMBOL(init_task);
31 * way process stacks are handled. This is done by having a special 31 * way process stacks are handled. This is done by having a special
32 * "init_task" linker map entry.. 32 * "init_task" linker map entry..
33 */ 33 */
34union thread_union init_thread_union 34union thread_union init_thread_union __init_task_data =
35 __attribute__((__section__(".data.init_task"))) = 35 { INIT_THREAD_INFO(init_task) };
36 { INIT_THREAD_INFO(init_task) };
37 36
diff --git a/arch/ia64/install.sh b/arch/ia64/install.sh
index 929e780026d1..0e932f5dcd1a 100644
--- a/arch/ia64/install.sh
+++ b/arch/ia64/install.sh
@@ -21,8 +21,8 @@
21 21
22# User may have a custom install script 22# User may have a custom install script
23 23
24if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi 24if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi 25if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
26 26
27# Default install - same as make zlilo 27# Default install - same as make zlilo
28 28
diff --git a/arch/ia64/kernel/Makefile.gate b/arch/ia64/kernel/Makefile.gate
index 1d87f84069b3..ab9b03a9adcc 100644
--- a/arch/ia64/kernel/Makefile.gate
+++ b/arch/ia64/kernel/Makefile.gate
@@ -10,7 +10,7 @@ quiet_cmd_gate = GATE $@
10 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ 10 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
11 11
12GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ 12GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
13 $(call ld-option, -Wl$(comma)--hash-style=sysv) 13 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
14$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE 14$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
15 $(call if_changed,gate) 15 $(call if_changed,gate)
16 16
diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c
index c475fc281be7..e253ab8fcbc8 100644
--- a/arch/ia64/kernel/init_task.c
+++ b/arch/ia64/kernel/init_task.c
@@ -33,7 +33,8 @@ union {
33 struct thread_info thread_info; 33 struct thread_info thread_info;
34 } s; 34 } s;
35 unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)]; 35 unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
36} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{ 36} init_task_mem asm ("init_task") __init_task_data =
37 {{
37 .task = INIT_TASK(init_task_mem.s.task), 38 .task = INIT_TASK(init_task_mem.s.task),
38 .thread_info = INIT_THREAD_INFO(init_task_mem.s.task) 39 .thread_info = INIT_THREAD_INFO(init_task_mem.s.task)
39}}; 40}};
diff --git a/arch/m32r/boot/compressed/install.sh b/arch/m32r/boot/compressed/install.sh
index 6d72e9e72697..16e5a0a13437 100644
--- a/arch/m32r/boot/compressed/install.sh
+++ b/arch/m32r/boot/compressed/install.sh
@@ -24,8 +24,8 @@
24 24
25# User may have a custom install script 25# User may have a custom install script
26 26
27if [ -x /sbin/installkernel ]; then 27if [ -x /sbin/${INSTALLKERNEL} ]; then
28 exec /sbin/installkernel "$@" 28 exec /sbin/${INSTALLKERNEL} "$@"
29fi 29fi
30 30
31if [ "$2" = "zImage" ]; then 31if [ "$2" = "zImage" ]; then
diff --git a/arch/m32r/kernel/init_task.c b/arch/m32r/kernel/init_task.c
index fce57e5d3f91..6c42d5f8df50 100644
--- a/arch/m32r/kernel/init_task.c
+++ b/arch/m32r/kernel/init_task.c
@@ -20,9 +20,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
20 * way process stacks are handled. This is done by having a special 20 * way process stacks are handled. This is done by having a special
21 * "init_task" linker map entry.. 21 * "init_task" linker map entry..
22 */ 22 */
23union thread_union init_thread_union 23union thread_union init_thread_union __init_task_data =
24 __attribute__((__section__(".data.init_task"))) = 24 { INIT_THREAD_INFO(init_task) };
25 { INIT_THREAD_INFO(init_task) };
26 25
27/* 26/*
28 * Initial task structure. 27 * Initial task structure.
diff --git a/arch/m68k/install.sh b/arch/m68k/install.sh
index 9c6bae6112e3..57d640d4382c 100644
--- a/arch/m68k/install.sh
+++ b/arch/m68k/install.sh
@@ -33,8 +33,8 @@ verify "$3"
33 33
34# User may have a custom install script 34# User may have a custom install script
35 35
36if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 36if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
37if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 37if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
38 38
39# Default install - same as make zlilo 39# Default install - same as make zlilo
40 40
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 72bad65dba3a..41230c595a8e 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -42,9 +42,9 @@
42 */ 42 */
43static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 43static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
44static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 44static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
45union thread_union init_thread_union 45union thread_union init_thread_union __init_task_data
46__attribute__((section(".data.init_task"), aligned(THREAD_SIZE))) 46 __attribute__((aligned(THREAD_SIZE))) =
47 = { INIT_THREAD_INFO(init_task) }; 47 { INIT_THREAD_INFO(init_task) };
48 48
49/* initial task structure */ 49/* initial task structure */
50struct task_struct init_task = INIT_TASK(init_task); 50struct task_struct init_task = INIT_TASK(init_task);
diff --git a/arch/m68knommu/kernel/init_task.c b/arch/m68knommu/kernel/init_task.c
index 45e97a207fed..cbf9dc3cc51d 100644
--- a/arch/m68knommu/kernel/init_task.c
+++ b/arch/m68knommu/kernel/init_task.c
@@ -31,7 +31,6 @@ EXPORT_SYMBOL(init_task);
31 * way process stacks are handled. This is done by having a special 31 * way process stacks are handled. This is done by having a special
32 * "init_task" linker map entry.. 32 * "init_task" linker map entry..
33 */ 33 */
34union thread_union init_thread_union 34union thread_union init_thread_union __init_task_data =
35 __attribute__((__section__(".data.init_task"))) = 35 { INIT_THREAD_INFO(init_task) };
36 { INIT_THREAD_INFO(init_task) };
37 36
diff --git a/arch/microblaze/kernel/init_task.c b/arch/microblaze/kernel/init_task.c
index 67da22579b62..b5d711f94ff8 100644
--- a/arch/microblaze/kernel/init_task.c
+++ b/arch/microblaze/kernel/init_task.c
@@ -19,9 +19,8 @@
19static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 19static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
20static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 20static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
21 21
22union thread_union init_thread_union 22union thread_union init_thread_union __init_task_data =
23 __attribute__((__section__(".data.init_task"))) = 23 { INIT_THREAD_INFO(init_task) };
24{ INIT_THREAD_INFO(init_task) };
25 24
26struct task_struct init_task = INIT_TASK(init_task); 25struct task_struct init_task = INIT_TASK(init_task);
27EXPORT_SYMBOL(init_task); 26EXPORT_SYMBOL(init_task);
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index c825b14b4ed0..77f5021218d3 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -627,16 +627,6 @@ endif
627cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 627cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
628drivers-$(CONFIG_PCI) += arch/mips/pci/ 628drivers-$(CONFIG_PCI) += arch/mips/pci/
629 629
630ifdef CONFIG_32BIT
631ifdef CONFIG_CPU_LITTLE_ENDIAN
632JIFFIES = jiffies_64
633else
634JIFFIES = jiffies_64 + 4
635endif
636else
637JIFFIES = jiffies_64
638endif
639
640# 630#
641# Automatically detect the build format. By default we choose 631# Automatically detect the build format. By default we choose
642# the elf format according to the load address. 632# the elf format according to the load address.
@@ -660,8 +650,9 @@ ifdef CONFIG_64BIT
660endif 650endif
661 651
662KBUILD_AFLAGS += $(cflags-y) 652KBUILD_AFLAGS += $(cflags-y)
663KBUILD_CFLAGS += $(cflags-y) \ 653KBUILD_CFLAGS += $(cflags-y)
664 -D"VMLINUX_LOAD_ADDRESS=$(load-y)" 654KBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
655KBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
665 656
666LDFLAGS += -m $(ld-emul) 657LDFLAGS += -m $(ld-emul)
667 658
@@ -676,18 +667,6 @@ endif
676 667
677OBJCOPYFLAGS += --remove-section=.reginfo 668OBJCOPYFLAGS += --remove-section=.reginfo
678 669
679#
680# Choosing incompatible machines durings configuration will result in
681# error messages during linking. Select a default linkscript if
682# none has been choosen above.
683#
684
685CPPFLAGS_vmlinux.lds := \
686 $(KBUILD_CFLAGS) \
687 -D"LOADADDR=$(load-y)" \
688 -D"JIFFIES=$(JIFFIES)" \
689 -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
690
691head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o 670head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
692 671
693libs-y += arch/mips/lib/ 672libs-y += arch/mips/lib/
diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c
index 5b457a40c784..6d6ca5305895 100644
--- a/arch/mips/kernel/init_task.c
+++ b/arch/mips/kernel/init_task.c
@@ -21,9 +21,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
21 * 21 *
22 * The things we do for performance.. 22 * The things we do for performance..
23 */ 23 */
24union thread_union init_thread_union 24union thread_union init_thread_union __init_task_data
25 __attribute__((__section__(".data.init_task"), 25 __attribute__((__aligned__(THREAD_SIZE))) =
26 __aligned__(THREAD_SIZE))) =
27 { INIT_THREAD_INFO(init_task) }; 26 { INIT_THREAD_INFO(init_task) };
28 27
29/* 28/*
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 2769bed3d2af..9bf0e3df7c5a 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -10,7 +10,16 @@ PHDRS {
10 text PT_LOAD FLAGS(7); /* RWX */ 10 text PT_LOAD FLAGS(7); /* RWX */
11 note PT_NOTE FLAGS(4); /* R__ */ 11 note PT_NOTE FLAGS(4); /* R__ */
12} 12}
13jiffies = JIFFIES; 13
14ifdef CONFIG_32BIT
15 ifdef CONFIG_CPU_LITTLE_ENDIAN
16 jiffies = jiffies_64;
17 else
18 jiffies = jiffies_64 + 4;
19 endif
20else
21 jiffies = jiffies_64;
22endif
14 23
15SECTIONS 24SECTIONS
16{ 25{
@@ -29,7 +38,7 @@ SECTIONS
29 /* . = 0xa800000000300000; */ 38 /* . = 0xa800000000300000; */
30 . = 0xffffffff80300000; 39 . = 0xffffffff80300000;
31#endif 40#endif
32 . = LOADADDR; 41 . = VMLINUX_LOAD_ADDRESS;
33 /* read-only */ 42 /* read-only */
34 _text = .; /* Text and read-only data */ 43 _text = .; /* Text and read-only data */
35 .text : { 44 .text : {
diff --git a/arch/mn10300/kernel/init_task.c b/arch/mn10300/kernel/init_task.c
index 80d423b80af3..a481b043bea7 100644
--- a/arch/mn10300/kernel/init_task.c
+++ b/arch/mn10300/kernel/init_task.c
@@ -27,9 +27,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
27 * way process stacks are handled. This is done by having a special 27 * way process stacks are handled. This is done by having a special
28 * "init_task" linker map entry.. 28 * "init_task" linker map entry..
29 */ 29 */
30union thread_union init_thread_union 30union thread_union init_thread_union __init_task_data =
31 __attribute__((__section__(".data.init_task"))) = 31 { INIT_THREAD_INFO(init_task) };
32 { INIT_THREAD_INFO(init_task) };
33 32
34/* 33/*
35 * Initial task structure. 34 * Initial task structure.
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index da6f66901c92..55cca1dac431 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -118,8 +118,8 @@ define archhelp
118 @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' 118 @echo '* vmlinux - Uncompressed kernel image (./vmlinux)'
119 @echo ' palo - Bootable image (./lifimage)' 119 @echo ' palo - Bootable image (./lifimage)'
120 @echo ' install - Install kernel using' 120 @echo ' install - Install kernel using'
121 @echo ' (your) ~/bin/installkernel or' 121 @echo ' (your) ~/bin/$(INSTALLKERNEL) or'
122 @echo ' (distribution) /sbin/installkernel or' 122 @echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
123 @echo ' copy to $$(INSTALL_PATH)' 123 @echo ' copy to $$(INSTALL_PATH)'
124endef 124endef
125 125
diff --git a/arch/parisc/install.sh b/arch/parisc/install.sh
index 9632b3e164c7..e593fc8d58bc 100644
--- a/arch/parisc/install.sh
+++ b/arch/parisc/install.sh
@@ -21,8 +21,8 @@
21 21
22# User may have a custom install script 22# User may have a custom install script
23 23
24if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi 24if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi 25if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
26 26
27# Default install 27# Default install
28 28
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
index 82974b20fc10..d020eae6525c 100644
--- a/arch/parisc/kernel/init_task.c
+++ b/arch/parisc/kernel/init_task.c
@@ -43,8 +43,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
43 * way process stacks are handled. This is done by having a special 43 * way process stacks are handled. This is done by having a special
44 * "init_task" linker map entry.. 44 * "init_task" linker map entry..
45 */ 45 */
46union thread_union init_thread_union 46union thread_union init_thread_union __init_task_data
47 __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = 47 __attribute__((aligned(128))) =
48 { INIT_THREAD_INFO(init_task) }; 48 { INIT_THREAD_INFO(init_task) };
49 49
50#if PT_NLEVELS == 3 50#if PT_NLEVELS == 3
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 952a3963e9e8..aacf629c1a9f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -158,8 +158,6 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
158# Default to zImage, override when needed 158# Default to zImage, override when needed
159all: zImage 159all: zImage
160 160
161CPPFLAGS_vmlinux.lds := -Upowerpc
162
163BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.% 161BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.%
164 162
165PHONY += $(BOOT_TARGETS) 163PHONY += $(BOOT_TARGETS)
@@ -182,8 +180,8 @@ define archhelp
182 @echo ' simpleImage.<dt> - Firmware independent image.' 180 @echo ' simpleImage.<dt> - Firmware independent image.'
183 @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)' 181 @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)'
184 @echo ' install - Install kernel using' 182 @echo ' install - Install kernel using'
185 @echo ' (your) ~/bin/installkernel or' 183 @echo ' (your) ~/bin/$(INSTALLKERNEL) or'
186 @echo ' (distribution) /sbin/installkernel or' 184 @echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
187 @echo ' install to $$(INSTALL_PATH) and run lilo' 185 @echo ' install to $$(INSTALL_PATH) and run lilo'
188 @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' 186 @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs'
189 @echo '' 187 @echo ''
diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh
index 98312d169c85..b6a256bc96ee 100644
--- a/arch/powerpc/boot/install.sh
+++ b/arch/powerpc/boot/install.sh
@@ -23,8 +23,8 @@ set -e
23 23
24# User may have a custom install script 24# User may have a custom install script
25 25
26if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 26if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
27if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 27if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
28 28
29# Default install 29# Default install
30 30
diff --git a/arch/powerpc/kernel/init_task.c b/arch/powerpc/kernel/init_task.c
index ffc4253fef55..2375b7eb1c76 100644
--- a/arch/powerpc/kernel/init_task.c
+++ b/arch/powerpc/kernel/init_task.c
@@ -16,9 +16,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
16 * way process stacks are handled. This is done by having a special 16 * way process stacks are handled. This is done by having a special
17 * "init_task" linker map entry.. 17 * "init_task" linker map entry..
18 */ 18 */
19union thread_union init_thread_union 19union thread_union init_thread_union __init_task_data =
20 __attribute__((__section__(".data.init_task"))) = 20 { INIT_THREAD_INFO(init_task) };
21 { INIT_THREAD_INFO(init_task) };
22 21
23/* 22/*
24 * Initial task structure. 23 * Initial task structure.
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 49e705fcee6d..040bd1de8d99 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -13,6 +13,7 @@
13#include <linux/kexec.h> 13#include <linux/kexec.h>
14#include <linux/smp.h> 14#include <linux/smp.h>
15#include <linux/thread_info.h> 15#include <linux/thread_info.h>
16#include <linux/init_task.h>
16#include <linux/errno.h> 17#include <linux/errno.h>
17 18
18#include <asm/page.h> 19#include <asm/page.h>
@@ -249,8 +250,8 @@ static void kexec_prepare_cpus(void)
249 * We could use a smaller stack if we don't care about anything using 250 * We could use a smaller stack if we don't care about anything using
250 * current, but that audit has not been performed. 251 * current, but that audit has not been performed.
251 */ 252 */
252static union thread_union kexec_stack 253static union thread_union kexec_stack __init_task_data =
253 __attribute__((__section__(".data.init_task"))) = { }; 254 { };
254 255
255/* Our assembly helper, in kexec_stub.S */ 256/* Our assembly helper, in kexec_stub.S */
256extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start, 257extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index a0abce251d0a..3faaf29bdb29 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -1,3 +1,4 @@
1
1/* 2/*
2 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. 3 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.
3 * <benh@kernel.crashing.org> 4 * <benh@kernel.crashing.org>
@@ -74,7 +75,7 @@ static int vdso_ready;
74static union { 75static union {
75 struct vdso_data data; 76 struct vdso_data data;
76 u8 page[PAGE_SIZE]; 77 u8 page[PAGE_SIZE];
77} vdso_data_store __attribute__((__section__(".data.page_aligned"))); 78} vdso_data_store __page_aligned_data;
78struct vdso_data *vdso_data = &vdso_data_store.data; 79struct vdso_data *vdso_data = &vdso_data_store.data;
79 80
80/* Format of the patch table */ 81/* Format of the patch table */
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
index b54b81688132..51ead52141bd 100644
--- a/arch/powerpc/kernel/vdso32/Makefile
+++ b/arch/powerpc/kernel/vdso32/Makefile
@@ -16,7 +16,7 @@ GCOV_PROFILE := n
16 16
17EXTRA_CFLAGS := -shared -fno-common -fno-builtin 17EXTRA_CFLAGS := -shared -fno-common -fno-builtin
18EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 18EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
19 $(call ld-option, -Wl$(comma)--hash-style=sysv) 19 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
20EXTRA_AFLAGS := -D__VDSO32__ -s 20EXTRA_AFLAGS := -D__VDSO32__ -s
21 21
22obj-y += vdso32_wrapper.o 22obj-y += vdso32_wrapper.o
diff --git a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
index 556f0caa5d84..6e8f507ed32b 100644
--- a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
@@ -1,7 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/linkage.h>
2#include <asm/page.h> 3#include <asm/page.h>
3 4
4 .section ".data.page_aligned" 5 __PAGE_ALIGNED_DATA
5 6
6 .globl vdso32_start, vdso32_end 7 .globl vdso32_start, vdso32_end
7 .balign PAGE_SIZE 8 .balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
index dd0c8e936775..79da65d44a2a 100644
--- a/arch/powerpc/kernel/vdso64/Makefile
+++ b/arch/powerpc/kernel/vdso64/Makefile
@@ -11,7 +11,7 @@ GCOV_PROFILE := n
11 11
12EXTRA_CFLAGS := -shared -fno-common -fno-builtin 12EXTRA_CFLAGS := -shared -fno-common -fno-builtin
13EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 13EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
14 $(call ld-option, -Wl$(comma)--hash-style=sysv) 14 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
15EXTRA_AFLAGS := -D__VDSO64__ -s 15EXTRA_AFLAGS := -D__VDSO64__ -s
16 16
17obj-y += vdso64_wrapper.o 17obj-y += vdso64_wrapper.o
diff --git a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
index 0529cb9e3b97..b8553d62b792 100644
--- a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
@@ -1,7 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/linkage.h>
2#include <asm/page.h> 3#include <asm/page.h>
3 4
4 .section ".data.page_aligned" 5 __PAGE_ALIGNED_DATA
5 6
6 .globl vdso64_start, vdso64_end 7 .globl vdso64_start, vdso64_end
7 .balign PAGE_SIZE 8 .balign PAGE_SIZE
diff --git a/arch/s390/boot/install.sh b/arch/s390/boot/install.sh
index d4026f62cb06..aed3069699bd 100644
--- a/arch/s390/boot/install.sh
+++ b/arch/s390/boot/install.sh
@@ -21,8 +21,8 @@
21 21
22# User may have a custom install script 22# User may have a custom install script
23 23
24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 24if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 25if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
26 26
27# Default install - same as make zlilo 27# Default install - same as make zlilo
28 28
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c
index fe787f9e5f3f..4d1c9fb0b540 100644
--- a/arch/s390/kernel/init_task.c
+++ b/arch/s390/kernel/init_task.c
@@ -25,9 +25,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
25 * way process stacks are handled. This is done by having a special 25 * way process stacks are handled. This is done by having a special
26 * "init_task" linker map entry.. 26 * "init_task" linker map entry..
27 */ 27 */
28union thread_union init_thread_union 28union thread_union init_thread_union __init_task_data =
29 __attribute__((__section__(".data.init_task"))) = 29 { INIT_THREAD_INFO(init_task) };
30 { INIT_THREAD_INFO(init_task) };
31 30
32/* 31/*
33 * Initial task structure. 32 * Initial task structure.
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 45e1708b70fd..45a3e9a7ae21 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -75,7 +75,7 @@ __setup("vdso=", vdso_setup);
75static union { 75static union {
76 struct vdso_data data; 76 struct vdso_data data;
77 u8 page[PAGE_SIZE]; 77 u8 page[PAGE_SIZE];
78} vdso_data_store __attribute__((__section__(".data.page_aligned"))); 78} vdso_data_store __page_aligned_data;
79struct vdso_data *vdso_data = &vdso_data_store.data; 79struct vdso_data *vdso_data = &vdso_data_store.data;
80 80
81/* 81/*
diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile
index ca78ad60ba24..d13e8755a8cc 100644
--- a/arch/s390/kernel/vdso32/Makefile
+++ b/arch/s390/kernel/vdso32/Makefile
@@ -13,7 +13,7 @@ KBUILD_AFLAGS_31 += -m31 -s
13KBUILD_CFLAGS_31 := $(filter-out -m64,$(KBUILD_CFLAGS)) 13KBUILD_CFLAGS_31 := $(filter-out -m64,$(KBUILD_CFLAGS))
14KBUILD_CFLAGS_31 += -m31 -fPIC -shared -fno-common -fno-builtin 14KBUILD_CFLAGS_31 += -m31 -fPIC -shared -fno-common -fno-builtin
15KBUILD_CFLAGS_31 += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 15KBUILD_CFLAGS_31 += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
16 $(call ld-option, -Wl$(comma)--hash-style=sysv) 16 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
17 17
18$(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_31) 18$(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_31)
19$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_31) 19$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_31)
diff --git a/arch/s390/kernel/vdso32/vdso32_wrapper.S b/arch/s390/kernel/vdso32/vdso32_wrapper.S
index 61639a89e70b..ae42f8ce350b 100644
--- a/arch/s390/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/s390/kernel/vdso32/vdso32_wrapper.S
@@ -1,7 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/linkage.h>
2#include <asm/page.h> 3#include <asm/page.h>
3 4
4 .section ".data.page_aligned" 5 __PAGE_ALIGNED_DATA
5 6
6 .globl vdso32_start, vdso32_end 7 .globl vdso32_start, vdso32_end
7 .balign PAGE_SIZE 8 .balign PAGE_SIZE
diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile
index 6fc8e829258c..449352dda9cd 100644
--- a/arch/s390/kernel/vdso64/Makefile
+++ b/arch/s390/kernel/vdso64/Makefile
@@ -13,7 +13,7 @@ KBUILD_AFLAGS_64 += -m64 -s
13KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS)) 13KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS))
14KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin 14KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin
15KBUILD_CFLAGS_64 += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 15KBUILD_CFLAGS_64 += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
16 $(call ld-option, -Wl$(comma)--hash-style=sysv) 16 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
17 17
18$(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_64) 18$(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_64)
19$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_64) 19$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_64)
diff --git a/arch/s390/kernel/vdso64/vdso64_wrapper.S b/arch/s390/kernel/vdso64/vdso64_wrapper.S
index d8e2ac14d564..c245842b516f 100644
--- a/arch/s390/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/s390/kernel/vdso64/vdso64_wrapper.S
@@ -1,7 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/linkage.h>
2#include <asm/page.h> 3#include <asm/page.h>
3 4
4 .section ".data.page_aligned" 5 __PAGE_ALIGNED_DATA
5 6
6 .globl vdso64_start, vdso64_end 7 .globl vdso64_start, vdso64_end
7 .balign PAGE_SIZE 8 .balign PAGE_SIZE
diff --git a/arch/score/kernel/init_task.c b/arch/score/kernel/init_task.c
index ff952f6c63fd..baa03ee217d1 100644
--- a/arch/score/kernel/init_task.c
+++ b/arch/score/kernel/init_task.c
@@ -34,9 +34,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
34 * way process stacks are handled. This is done by having a special 34 * way process stacks are handled. This is done by having a special
35 * "init_task" linker map entry.. 35 * "init_task" linker map entry..
36 */ 36 */
37union thread_union init_thread_union 37union thread_union init_thread_union __init_task_data =
38 __attribute__((__section__(".data.init_task"), __aligned__(THREAD_SIZE))) = 38 { INIT_THREAD_INFO(init_task) };
39 { INIT_THREAD_INFO(init_task) };
40 39
41/* 40/*
42 * Initial task structure. 41 * Initial task structure.
diff --git a/arch/sh/boot/compressed/install.sh b/arch/sh/boot/compressed/install.sh
index 90589f0fec12..f9f41818b17e 100644
--- a/arch/sh/boot/compressed/install.sh
+++ b/arch/sh/boot/compressed/install.sh
@@ -23,8 +23,8 @@
23 23
24# User may have a custom install script 24# User may have a custom install script
25 25
26if [ -x /sbin/installkernel ]; then 26if [ -x /sbin/${INSTALLKERNEL} ]; then
27 exec /sbin/installkernel "$@" 27 exec /sbin/${INSTALLKERNEL} "$@"
28fi 28fi
29 29
30if [ "$2" = "zImage" ]; then 30if [ "$2" = "zImage" ]; then
diff --git a/arch/sh/kernel/init_task.c b/arch/sh/kernel/init_task.c
index 1719957c0a69..11f2ea556a6b 100644
--- a/arch/sh/kernel/init_task.c
+++ b/arch/sh/kernel/init_task.c
@@ -17,9 +17,8 @@ struct pt_regs fake_swapper_regs;
17 * way process stacks are handled. This is done by having a special 17 * way process stacks are handled. This is done by having a special
18 * "init_task" linker map entry.. 18 * "init_task" linker map entry..
19 */ 19 */
20union thread_union init_thread_union 20union thread_union init_thread_union __init_task_data =
21 __attribute__((__section__(".data.init_task"))) = 21 { INIT_THREAD_INFO(init_task) };
22 { INIT_THREAD_INFO(init_task) };
23 22
24/* 23/*
25 * Initial task structure. 24 * Initial task structure.
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 60f8af4497c7..7cb933ba4957 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -165,11 +165,9 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
165} 165}
166 166
167#ifdef CONFIG_IRQSTACKS 167#ifdef CONFIG_IRQSTACKS
168static char softirq_stack[NR_CPUS * THREAD_SIZE] 168static char softirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;
169 __attribute__((__section__(".bss.page_aligned")));
170 169
171static char hardirq_stack[NR_CPUS * THREAD_SIZE] 170static char hardirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;
172 __attribute__((__section__(".bss.page_aligned")));
173 171
174/* 172/*
175 * allocate per-cpu stacks for hardirq and for softirq processing 173 * allocate per-cpu stacks for hardirq and for softirq processing
diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile
index 4bbce1cfa359..8f0ea5fc835c 100644
--- a/arch/sh/kernel/vsyscall/Makefile
+++ b/arch/sh/kernel/vsyscall/Makefile
@@ -15,7 +15,7 @@ quiet_cmd_syscall = SYSCALL $@
15export CPPFLAGS_vsyscall.lds += -P -C -Ush 15export CPPFLAGS_vsyscall.lds += -P -C -Ush
16 16
17vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \ 17vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \
18 $(call ld-option, -Wl$(comma)--hash-style=sysv) 18 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
19 19
20SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags) 20SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags)
21 21
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 467221dd5702..dfe272d14465 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -31,7 +31,6 @@ export BITS := 32
31#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 31#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
32KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 32KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
33KBUILD_AFLAGS += -m32 33KBUILD_AFLAGS += -m32
34CPPFLAGS_vmlinux.lds += -m32
35 34
36#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 35#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
37# Since 2.5.40, the first stage is left not btfix-ed. 36# Since 2.5.40, the first stage is left not btfix-ed.
@@ -45,9 +44,6 @@ else
45 44
46CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64 45CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64
47 46
48# Undefine sparc when processing vmlinux.lds - it is used
49# And teach CPP we are doing 64 bit builds (for this case)
50CPPFLAGS_vmlinux.lds += -m64 -Usparc
51LDFLAGS := -m elf64_sparc 47LDFLAGS := -m elf64_sparc
52export BITS := 64 48export BITS := 64
53 49
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index 3a048fad7ee2..5b47fab9966e 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -7,7 +7,11 @@ ccflags-y := -Werror
7 7
8extra-y := head_$(BITS).o 8extra-y := head_$(BITS).o
9extra-y += init_task.o 9extra-y += init_task.o
10extra-y += vmlinux.lds 10
11# Undefine sparc when processing vmlinux.lds - it is used
12# And teach CPP we are doing $(BITS) builds (for this case)
13CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS)
14extra-y += vmlinux.lds
11 15
12obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o 16obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o
13obj-$(CONFIG_SPARC32) += etrap_32.o 17obj-$(CONFIG_SPARC32) += etrap_32.o
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c
index 28125c5b3d3c..5fe3d65581f7 100644
--- a/arch/sparc/kernel/init_task.c
+++ b/arch/sparc/kernel/init_task.c
@@ -18,6 +18,5 @@ EXPORT_SYMBOL(init_task);
18 * If this is not aligned on a 8k boundry, then you should change code 18 * If this is not aligned on a 8k boundry, then you should change code
19 * in etrap.S which assumes it. 19 * in etrap.S which assumes it.
20 */ 20 */
21union thread_union init_thread_union 21union thread_union init_thread_union __init_task_data =
22 __attribute__((section (".data.init_task"))) 22 { INIT_THREAD_INFO(init_task) };
23 = { INIT_THREAD_INFO(init_task) };
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 0728def32234..fc633dbacf84 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -96,11 +96,10 @@ CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,)
96 $(call cc-option, -fno-stack-protector,) \ 96 $(call cc-option, -fno-stack-protector,) \
97 $(call cc-option, -fno-stack-protector-all,) 97 $(call cc-option, -fno-stack-protector-all,)
98 98
99CONFIG_KERNEL_STACK_ORDER ?= 2 99# Options used by linker script
100STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) 100export LDS_START := $(START)
101 101export LDS_ELF_ARCH := $(ELF_ARCH)
102CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ 102export LDS_ELF_FORMAT := $(ELF_FORMAT)
103 -DELF_FORMAT="$(ELF_FORMAT)" -DKERNEL_STACK_SIZE=$(STACK_SIZE)
104 103
105# The wrappers will select whether using "malloc" or the kernel allocator. 104# The wrappers will select whether using "malloc" or the kernel allocator.
106LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc 105LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 388ec0a3ea9b..1119233597a1 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -3,6 +3,9 @@
3# Licensed under the GPL 3# Licensed under the GPL
4# 4#
5 5
6CPPFLAGS_vmlinux.lds := -U$(SUBARCH) -DSTART=$(LDS_START) \
7 -DELF_ARCH=$(LDS_ELF_ARCH) \
8 -DELF_FORMAT=$(LDS_ELF_FORMAT)
6extra-y := vmlinux.lds 9extra-y := vmlinux.lds
7clean-files := 10clean-files :=
8 11
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index b25121b537d8..8aa77b61a5ff 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -30,9 +30,8 @@ EXPORT_SYMBOL(init_task);
30 * "init_task" linker map entry.. 30 * "init_task" linker map entry..
31 */ 31 */
32 32
33union thread_union init_thread_union 33union thread_union init_thread_union __init_task_data =
34 __attribute__((__section__(".data.init_task"))) = 34 { INIT_THREAD_INFO(init_task) };
35 { INIT_THREAD_INFO(init_task) };
36 35
37union thread_union cpu0_irqstack 36union thread_union cpu0_irqstack
38 __attribute__((__section__(".data.init_irqstack"))) = 37 __attribute__((__section__(".data.init_irqstack"))) =
diff --git a/arch/um/kernel/vmlinux.lds.S b/arch/um/kernel/vmlinux.lds.S
index f8aeb448aab6..16e49bfa2b42 100644
--- a/arch/um/kernel/vmlinux.lds.S
+++ b/arch/um/kernel/vmlinux.lds.S
@@ -1,3 +1,6 @@
1
2KERNEL_STACK_SIZE = 4096 * (1 << CONFIG_KERNEL_STACK_ORDER);
3
1#ifdef CONFIG_LD_SCRIPT_STATIC 4#ifdef CONFIG_LD_SCRIPT_STATIC
2#include "uml.lds.S" 5#include "uml.lds.S"
3#else 6#else
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 7983c420eaf2..a012ee8ef803 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -179,8 +179,8 @@ archclean:
179define archhelp 179define archhelp
180 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' 180 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
181 echo ' install - Install kernel using' 181 echo ' install - Install kernel using'
182 echo ' (your) ~/bin/installkernel or' 182 echo ' (your) ~/bin/$(INSTALLKERNEL) or'
183 echo ' (distribution) /sbin/installkernel or' 183 echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
184 echo ' install to $$(INSTALL_PATH) and run lilo' 184 echo ' install to $$(INSTALL_PATH) and run lilo'
185 echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 185 echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
186 echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 186 echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
diff --git a/arch/x86/boot/install.sh b/arch/x86/boot/install.sh
index 8d60ee15dfd9..d13ec1c38640 100644
--- a/arch/x86/boot/install.sh
+++ b/arch/x86/boot/install.sh
@@ -33,8 +33,8 @@ verify "$3"
33 33
34# User may have a custom install script 34# User may have a custom install script
35 35
36if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 36if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
37if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 37if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
38 38
39# Default install - same as make zlilo 39# Default install - same as make zlilo
40 40
diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h
index 5d367caa0e36..549860d3be8f 100644
--- a/arch/x86/include/asm/cache.h
+++ b/arch/x86/include/asm/cache.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_X86_CACHE_H 1#ifndef _ASM_X86_CACHE_H
2#define _ASM_X86_CACHE_H 2#define _ASM_X86_CACHE_H
3 3
4#include <linux/linkage.h>
5
4/* L1 cache line size */ 6/* L1 cache line size */
5#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) 7#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
6#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
@@ -13,7 +15,7 @@
13#ifdef CONFIG_SMP 15#ifdef CONFIG_SMP
14#define __cacheline_aligned_in_smp \ 16#define __cacheline_aligned_in_smp \
15 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \ 17 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
16 __attribute__((__section__(".data.page_aligned"))) 18 __page_aligned_data
17#endif 19#endif
18#endif 20#endif
19 21
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index b766e8c7252d..218aad7ee76e 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -608,7 +608,7 @@ ENTRY(initial_code)
608/* 608/*
609 * BSS section 609 * BSS section
610 */ 610 */
611.section ".bss.page_aligned","wa" 611__PAGE_ALIGNED_BSS
612 .align PAGE_SIZE_asm 612 .align PAGE_SIZE_asm
613#ifdef CONFIG_X86_PAE 613#ifdef CONFIG_X86_PAE
614swapper_pg_pmd: 614swapper_pg_pmd:
@@ -626,7 +626,7 @@ ENTRY(empty_zero_page)
626 * This starts the data section. 626 * This starts the data section.
627 */ 627 */
628#ifdef CONFIG_X86_PAE 628#ifdef CONFIG_X86_PAE
629.section ".data.page_aligned","wa" 629__PAGE_ALIGNED_DATA
630 /* Page-aligned for the benefit of paravirt? */ 630 /* Page-aligned for the benefit of paravirt? */
631 .align PAGE_SIZE_asm 631 .align PAGE_SIZE_asm
632ENTRY(swapper_pg_dir) 632ENTRY(swapper_pg_dir)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index fa54f78e2a05..d0bc0a13a437 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -418,7 +418,7 @@ ENTRY(phys_base)
418ENTRY(idt_table) 418ENTRY(idt_table)
419 .skip IDT_ENTRIES * 16 419 .skip IDT_ENTRIES * 16
420 420
421 .section .bss.page_aligned, "aw", @nobits 421 __PAGE_ALIGNED_BSS
422 .align PAGE_SIZE 422 .align PAGE_SIZE
423ENTRY(empty_zero_page) 423ENTRY(empty_zero_page)
424 .skip PAGE_SIZE 424 .skip PAGE_SIZE
diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
index 270ff83efc11..3a54dcb9cd0e 100644
--- a/arch/x86/kernel/init_task.c
+++ b/arch/x86/kernel/init_task.c
@@ -20,9 +20,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
20 * way process stacks are handled. This is done by having a special 20 * way process stacks are handled. This is done by having a special
21 * "init_task" linker map entry.. 21 * "init_task" linker map entry..
22 */ 22 */
23union thread_union init_thread_union 23union thread_union init_thread_union __init_task_data =
24 __attribute__((__section__(".data.init_task"))) = 24 { INIT_THREAD_INFO(init_task) };
25 { INIT_THREAD_INFO(init_task) };
26 25
27/* 26/*
28 * Initial task structure. 27 * Initial task structure.
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 88112b49f02c..6b4ffedb93c9 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -122,7 +122,7 @@ quiet_cmd_vdso = VDSO $@
122 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 122 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
123 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) 123 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
124 124
125VDSO_LDFLAGS = -fPIC -shared $(call ld-option, -Wl$(comma)--hash-style=sysv) 125VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
126GCOV_PROFILE := n 126GCOV_PROFILE := n
127 127
128# 128#
diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile
index fe3186de6a33..6f56d95f2c1e 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -27,7 +27,8 @@ sed-y = -e 's/(\(\.[a-z]*it\|\.ref\|\)\.text)/(\1.literal \1.text)/g' \
27 -e 's/(\(\.text\.[a-z]*\))/(\1.literal \1)/g' 27 -e 's/(\(\.text\.[a-z]*\))/(\1.literal \1)/g'
28 28
29quiet_cmd__cpp_lds_S = LDS $@ 29quiet_cmd__cpp_lds_S = LDS $@
30 cmd__cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ $< | sed $(sed-y) >$@ 30 cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \
31 | sed $(sed-y) >$@
31 32
32$(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE 33$(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE
33 $(call if_changed_dep,_cpp_lds_S) 34 $(call if_changed_dep,_cpp_lds_S)
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index d9ddc1ba761c..d215adcfd4ea 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -235,7 +235,7 @@ should_never_return:
235 * BSS section 235 * BSS section
236 */ 236 */
237 237
238.section ".bss.page_aligned", "w" 238__PAGE_ALIGNED_BSS
239#ifdef CONFIG_MMU 239#ifdef CONFIG_MMU
240ENTRY(swapper_pg_dir) 240ENTRY(swapper_pg_dir)
241 .fill PAGE_SIZE, 1, 0 241 .fill PAGE_SIZE, 1, 0
diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c
index c4302f0e4ba0..cd122fb7e48a 100644
--- a/arch/xtensa/kernel/init_task.c
+++ b/arch/xtensa/kernel/init_task.c
@@ -23,9 +23,8 @@
23 23
24static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 24static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
25static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 25static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
26union thread_union init_thread_union 26union thread_union init_thread_union __init_task_data =
27 __attribute__((__section__(".data.init_task"))) = 27 { INIT_THREAD_INFO(init_task) };
28{ INIT_THREAD_INFO(init_task) };
29 28
30struct task_struct init_task = INIT_TASK(init_task); 29struct task_struct init_task = INIT_TASK(init_task);
31 30
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 691f59171c6c..5126cceb6ae9 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -57,6 +57,7 @@
57 57
58#ifdef __ASSEMBLY__ 58#ifdef __ASSEMBLY__
59 59
60#ifndef LINKER_SCRIPT
60#define ALIGN __ALIGN 61#define ALIGN __ALIGN
61#define ALIGN_STR __ALIGN_STR 62#define ALIGN_STR __ALIGN_STR
62 63
@@ -66,6 +67,7 @@
66 ALIGN; \ 67 ALIGN; \
67 name: 68 name:
68#endif 69#endif
70#endif /* LINKER_SCRIPT */
69 71
70#ifndef WEAK 72#ifndef WEAK
71#define WEAK(name) \ 73#define WEAK(name) \
diff --git a/init/Kconfig b/init/Kconfig
index 0aa6579504cc..c7bac39d6c61 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1006,14 +1006,6 @@ config SLUB_DEBUG
1006 SLUB sysfs support. /sys/slab will not exist and there will be 1006 SLUB sysfs support. /sys/slab will not exist and there will be
1007 no support for cache validation etc. 1007 no support for cache validation etc.
1008 1008
1009config STRIP_ASM_SYMS
1010 bool "Strip assembler-generated symbols during link"
1011 default n
1012 help
1013 Strip internal assembler-generated symbols during a link (symbols
1014 that look like '.Lxxx') so they don't pollute the output of
1015 get_wchan() and suchlike.
1016
1017config COMPAT_BRK 1009config COMPAT_BRK
1018 bool "Disable heap randomization" 1010 bool "Disable heap randomization"
1019 default y 1011 default y
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d57b12f59c8c..891155817bc6 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -50,6 +50,14 @@ config MAGIC_SYSRQ
50 keys are documented in <file:Documentation/sysrq.txt>. Don't say Y 50 keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
51 unless you really know what this hack does. 51 unless you really know what this hack does.
52 52
53config STRIP_ASM_SYMS
54 bool "Strip assembler-generated symbols during link"
55 default n
56 help
57 Strip internal assembler-generated symbols during a link (symbols
58 that look like '.Lxxx') so they don't pollute the output of
59 get_wchan() and suchlike.
60
53config UNUSED_SYMBOLS 61config UNUSED_SYMBOLS
54 bool "Enable unused/obsolete exported symbols" 62 bool "Enable unused/obsolete exported symbols"
55 default y if X86 63 default y if X86
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index c29be8f90248..4f9c1908593b 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -83,11 +83,12 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
83# is automatically cleaned up. 83# is automatically cleaned up.
84try-run = $(shell set -e; \ 84try-run = $(shell set -e; \
85 TMP="$(TMPOUT).$$$$.tmp"; \ 85 TMP="$(TMPOUT).$$$$.tmp"; \
86 TMPO="$(TMPOUT).$$$$.o"; \
86 if ($(1)) >/dev/null 2>&1; \ 87 if ($(1)) >/dev/null 2>&1; \
87 then echo "$(2)"; \ 88 then echo "$(2)"; \
88 else echo "$(3)"; \ 89 else echo "$(3)"; \
89 fi; \ 90 fi; \
90 rm -f "$$TMP") 91 rm -f "$$TMP" "$$TMPO")
91 92
92# as-option 93# as-option
93# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) 94# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
@@ -105,12 +106,12 @@ as-instr = $(call try-run,\
105# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) 106# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
106 107
107cc-option = $(call try-run,\ 108cc-option = $(call try-run,\
108 $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) 109 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
109 110
110# cc-option-yn 111# cc-option-yn
111# Usage: flag := $(call cc-option-yn,-march=winchip-c6) 112# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
112cc-option-yn = $(call try-run,\ 113cc-option-yn = $(call try-run,\
113 $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) 114 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
114 115
115# cc-option-align 116# cc-option-align
116# Prefix align with either -falign or -malign 117# Prefix align with either -falign or -malign
@@ -130,10 +131,15 @@ cc-fullversion = $(shell $(CONFIG_SHELL) \
130# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) 131# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
131cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) 132cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
132 133
134# cc-ldoption
135# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
136cc-ldoption = $(call try-run,\
137 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
138
133# ld-option 139# ld-option
134# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both) 140# Usage: LDFLAGS += $(call ld-option, -X)
135ld-option = $(call try-run,\ 141ld-option = $(call try-run,\
136 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) 142 $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
137 143
138###### 144######
139 145
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5c4b7a400c18..341b58902ffc 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -206,7 +206,7 @@ cmd_modversions = \
206endif 206endif
207 207
208ifdef CONFIG_FTRACE_MCOUNT_RECORD 208ifdef CONFIG_FTRACE_MCOUNT_RECORD
209cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ 209cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
210 "$(if $(CONFIG_64BIT),64,32)" \ 210 "$(if $(CONFIG_64BIT),64,32)" \
211 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ 211 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
212 "$(if $(part-of-module),1,0)" "$(@)"; 212 "$(if $(part-of-module),1,0)" "$(@)";
@@ -216,6 +216,7 @@ define rule_cc_o_c
216 $(call echo-cmd,checksrc) $(cmd_checksrc) \ 216 $(call echo-cmd,checksrc) $(cmd_checksrc) \
217 $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ 217 $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \
218 $(cmd_modversions) \ 218 $(cmd_modversions) \
219 $(call echo-cmd,record_mcount) \
219 $(cmd_record_mcount) \ 220 $(cmd_record_mcount) \
220 scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ 221 scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \
221 $(dot-target).tmp; \ 222 $(dot-target).tmp; \
@@ -269,7 +270,8 @@ targets += $(extra-y) $(MAKECMDGOALS) $(always)
269# Linker scripts preprocessor (.lds.S -> .lds) 270# Linker scripts preprocessor (.lds.S -> .lds)
270# --------------------------------------------------------------------------- 271# ---------------------------------------------------------------------------
271quiet_cmd_cpp_lds_S = LDS $@ 272quiet_cmd_cpp_lds_S = LDS $@
272 cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $< 273 cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
274 -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
273 275
274$(obj)/%.lds: $(src)/%.lds.S FORCE 276$(obj)/%.lds: $(src)/%.lds.S FORCE
275 $(call if_changed_dep,cpp_lds_S) 277 $(call if_changed_dep,cpp_lds_S)
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index 99ca7a698687..79ab973fb43a 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -71,7 +71,7 @@ FILELINE * docsection;
71 71
72static char *srctree, *kernsrctree; 72static char *srctree, *kernsrctree;
73 73
74void usage (void) 74static void usage (void)
75{ 75{
76 fprintf(stderr, "Usage: docproc {doc|depend} file\n"); 76 fprintf(stderr, "Usage: docproc {doc|depend} file\n");
77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); 77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
@@ -84,7 +84,7 @@ void usage (void)
84/* 84/*
85 * Execute kernel-doc with parameters given in svec 85 * Execute kernel-doc with parameters given in svec
86 */ 86 */
87void exec_kernel_doc(char **svec) 87static void exec_kernel_doc(char **svec)
88{ 88{
89 pid_t pid; 89 pid_t pid;
90 int ret; 90 int ret;
@@ -129,7 +129,7 @@ struct symfile
129struct symfile symfilelist[MAXFILES]; 129struct symfile symfilelist[MAXFILES];
130int symfilecnt = 0; 130int symfilecnt = 0;
131 131
132void add_new_symbol(struct symfile *sym, char * symname) 132static void add_new_symbol(struct symfile *sym, char * symname)
133{ 133{
134 sym->symbollist = 134 sym->symbollist =
135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); 135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
@@ -137,14 +137,14 @@ void add_new_symbol(struct symfile *sym, char * symname)
137} 137}
138 138
139/* Add a filename to the list */ 139/* Add a filename to the list */
140struct symfile * add_new_file(char * filename) 140static struct symfile * add_new_file(char * filename)
141{ 141{
142 symfilelist[symfilecnt++].filename = strdup(filename); 142 symfilelist[symfilecnt++].filename = strdup(filename);
143 return &symfilelist[symfilecnt - 1]; 143 return &symfilelist[symfilecnt - 1];
144} 144}
145 145
146/* Check if file already are present in the list */ 146/* Check if file already are present in the list */
147struct symfile * filename_exist(char * filename) 147static struct symfile * filename_exist(char * filename)
148{ 148{
149 int i; 149 int i;
150 for (i=0; i < symfilecnt; i++) 150 for (i=0; i < symfilecnt; i++)
@@ -157,20 +157,20 @@ struct symfile * filename_exist(char * filename)
157 * List all files referenced within the template file. 157 * List all files referenced within the template file.
158 * Files are separated by tabs. 158 * Files are separated by tabs.
159 */ 159 */
160void adddep(char * file) { printf("\t%s", file); } 160static void adddep(char * file) { printf("\t%s", file); }
161void adddep2(char * file, char * line) { line = line; adddep(file); } 161static void adddep2(char * file, char * line) { line = line; adddep(file); }
162void noaction(char * line) { line = line; } 162static void noaction(char * line) { line = line; }
163void noaction2(char * file, char * line) { file = file; line = line; } 163static void noaction2(char * file, char * line) { file = file; line = line; }
164 164
165/* Echo the line without further action */ 165/* Echo the line without further action */
166void printline(char * line) { printf("%s", line); } 166static void printline(char * line) { printf("%s", line); }
167 167
168/* 168/*
169 * Find all symbols in filename that are exported with EXPORT_SYMBOL & 169 * Find all symbols in filename that are exported with EXPORT_SYMBOL &
170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly). 170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
171 * All symbols located are stored in symfilelist. 171 * All symbols located are stored in symfilelist.
172 */ 172 */
173void find_export_symbols(char * filename) 173static void find_export_symbols(char * filename)
174{ 174{
175 FILE * fp; 175 FILE * fp;
176 struct symfile *sym; 176 struct symfile *sym;
@@ -227,7 +227,7 @@ void find_export_symbols(char * filename)
227 * intfunc uses -nofunction 227 * intfunc uses -nofunction
228 * extfunc uses -function 228 * extfunc uses -function
229 */ 229 */
230void docfunctions(char * filename, char * type) 230static void docfunctions(char * filename, char * type)
231{ 231{
232 int i,j; 232 int i,j;
233 int symcnt = 0; 233 int symcnt = 0;
@@ -258,15 +258,15 @@ void docfunctions(char * filename, char * type)
258 fflush(stdout); 258 fflush(stdout);
259 free(vec); 259 free(vec);
260} 260}
261void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); } 261static void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
262void extfunc(char * filename) { docfunctions(filename, FUNCTION); } 262static void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
263 263
264/* 264/*
265 * Document specific function(s) in a file. 265 * Document specific function(s) in a file.
266 * Call kernel-doc with the following parameters: 266 * Call kernel-doc with the following parameters:
267 * kernel-doc -docbook -function function1 [-function function2] 267 * kernel-doc -docbook -function function1 [-function function2]
268 */ 268 */
269void singfunc(char * filename, char * line) 269static void singfunc(char * filename, char * line)
270{ 270{
271 char *vec[200]; /* Enough for specific functions */ 271 char *vec[200]; /* Enough for specific functions */
272 int i, idx = 0; 272 int i, idx = 0;
@@ -297,7 +297,7 @@ void singfunc(char * filename, char * line)
297 * Call kernel-doc with the following parameters: 297 * Call kernel-doc with the following parameters:
298 * kernel-doc -docbook -function "doc section" filename 298 * kernel-doc -docbook -function "doc section" filename
299 */ 299 */
300void docsect(char *filename, char *line) 300static void docsect(char *filename, char *line)
301{ 301{
302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */ 302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */
303 char *s; 303 char *s;
@@ -324,7 +324,7 @@ void docsect(char *filename, char *line)
324 * 5) Lines containing !P 324 * 5) Lines containing !P
325 * 6) Default lines - lines not matching the above 325 * 6) Default lines - lines not matching the above
326 */ 326 */
327void parse_file(FILE *infile) 327static void parse_file(FILE *infile)
328{ 328{
329 char line[MAXLINESZ]; 329 char line[MAXLINESZ];
330 char * s; 330 char * s;
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 8ab448611680..6bf21f83837d 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -124,7 +124,7 @@ char *target;
124char *depfile; 124char *depfile;
125char *cmdline; 125char *cmdline;
126 126
127void usage(void) 127static void usage(void)
128{ 128{
129 fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n"); 129 fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n");
130 exit(1); 130 exit(1);
@@ -133,7 +133,7 @@ void usage(void)
133/* 133/*
134 * Print out the commandline prefixed with cmd_<target filename> := 134 * Print out the commandline prefixed with cmd_<target filename> :=
135 */ 135 */
136void print_cmdline(void) 136static void print_cmdline(void)
137{ 137{
138 printf("cmd_%s := %s\n\n", target, cmdline); 138 printf("cmd_%s := %s\n\n", target, cmdline);
139} 139}
@@ -146,7 +146,7 @@ int len_config = 0;
146 * Grow the configuration string to a desired length. 146 * Grow the configuration string to a desired length.
147 * Usually the first growth is plenty. 147 * Usually the first growth is plenty.
148 */ 148 */
149void grow_config(int len) 149static void grow_config(int len)
150{ 150{
151 while (len_config + len > size_config) { 151 while (len_config + len > size_config) {
152 if (size_config == 0) 152 if (size_config == 0)
@@ -162,7 +162,7 @@ void grow_config(int len)
162/* 162/*
163 * Lookup a value in the configuration string. 163 * Lookup a value in the configuration string.
164 */ 164 */
165int is_defined_config(const char * name, int len) 165static int is_defined_config(const char * name, int len)
166{ 166{
167 const char * pconfig; 167 const char * pconfig;
168 const char * plast = str_config + len_config - len; 168 const char * plast = str_config + len_config - len;
@@ -178,7 +178,7 @@ int is_defined_config(const char * name, int len)
178/* 178/*
179 * Add a new value to the configuration string. 179 * Add a new value to the configuration string.
180 */ 180 */
181void define_config(const char * name, int len) 181static void define_config(const char * name, int len)
182{ 182{
183 grow_config(len + 1); 183 grow_config(len + 1);
184 184
@@ -190,7 +190,7 @@ void define_config(const char * name, int len)
190/* 190/*
191 * Clear the set of configuration strings. 191 * Clear the set of configuration strings.
192 */ 192 */
193void clear_config(void) 193static void clear_config(void)
194{ 194{
195 len_config = 0; 195 len_config = 0;
196 define_config("", 0); 196 define_config("", 0);
@@ -199,7 +199,7 @@ void clear_config(void)
199/* 199/*
200 * Record the use of a CONFIG_* word. 200 * Record the use of a CONFIG_* word.
201 */ 201 */
202void use_config(char *m, int slen) 202static void use_config(char *m, int slen)
203{ 203{
204 char s[PATH_MAX]; 204 char s[PATH_MAX];
205 char *p; 205 char *p;
@@ -220,7 +220,7 @@ void use_config(char *m, int slen)
220 printf(" $(wildcard include/config/%s.h) \\\n", s); 220 printf(" $(wildcard include/config/%s.h) \\\n", s);
221} 221}
222 222
223void parse_config_file(char *map, size_t len) 223static void parse_config_file(char *map, size_t len)
224{ 224{
225 int *end = (int *) (map + len); 225 int *end = (int *) (map + len);
226 /* start at +1, so that p can never be < map */ 226 /* start at +1, so that p can never be < map */
@@ -254,7 +254,7 @@ void parse_config_file(char *map, size_t len)
254} 254}
255 255
256/* test is s ends in sub */ 256/* test is s ends in sub */
257int strrcmp(char *s, char *sub) 257static int strrcmp(char *s, char *sub)
258{ 258{
259 int slen = strlen(s); 259 int slen = strlen(s);
260 int sublen = strlen(sub); 260 int sublen = strlen(sub);
@@ -265,7 +265,7 @@ int strrcmp(char *s, char *sub)
265 return memcmp(s + slen - sublen, sub, sublen); 265 return memcmp(s + slen - sublen, sub, sublen);
266} 266}
267 267
268void do_config_file(char *filename) 268static void do_config_file(char *filename)
269{ 269{
270 struct stat st; 270 struct stat st;
271 int fd; 271 int fd;
@@ -296,7 +296,7 @@ void do_config_file(char *filename)
296 close(fd); 296 close(fd);
297} 297}
298 298
299void parse_dep_file(void *map, size_t len) 299static void parse_dep_file(void *map, size_t len)
300{ 300{
301 char *m = map; 301 char *m = map;
302 char *end = m + len; 302 char *end = m + len;
@@ -336,7 +336,7 @@ void parse_dep_file(void *map, size_t len)
336 printf("$(deps_%s):\n", target); 336 printf("$(deps_%s):\n", target);
337} 337}
338 338
339void print_deps(void) 339static void print_deps(void)
340{ 340{
341 struct stat st; 341 struct stat st;
342 int fd; 342 int fd;
@@ -368,7 +368,7 @@ void print_deps(void)
368 close(fd); 368 close(fd);
369} 369}
370 370
371void traps(void) 371static void traps(void)
372{ 372{
373 static char test[] __attribute__((aligned(sizeof(int)))) = "CONF"; 373 static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
374 int *p = (int *)test; 374 int *p = (int *)test;
diff --git a/scripts/basic/hash.c b/scripts/basic/hash.c
index 3299ad7fc8c0..2ef5d3f666b8 100644
--- a/scripts/basic/hash.c
+++ b/scripts/basic/hash.c
@@ -21,7 +21,7 @@ static void usage(void)
21 * http://www.cse.yorku.ca/~oz/hash.html 21 * http://www.cse.yorku.ca/~oz/hash.html
22 */ 22 */
23 23
24unsigned int djb2_hash(char *str) 24static unsigned int djb2_hash(char *str)
25{ 25{
26 unsigned long hash = 5381; 26 unsigned long hash = 5381;
27 int c; 27 int c;
@@ -34,7 +34,7 @@ unsigned int djb2_hash(char *str)
34 return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1)); 34 return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1));
35} 35}
36 36
37unsigned int r5_hash(char *str) 37static unsigned int r5_hash(char *str)
38{ 38{
39 unsigned long hash = 0; 39 unsigned long hash = 0;
40 int c; 40 int c;
diff --git a/scripts/checkincludes.pl b/scripts/checkincludes.pl
index 8e6b716c191c..676ddc07d6fa 100755
--- a/scripts/checkincludes.pl
+++ b/scripts/checkincludes.pl
@@ -1,24 +1,85 @@
1#!/usr/bin/perl 1#!/usr/bin/perl
2# 2#
3# checkincludes: Find files included more than once in (other) files. 3# checkincludes: find/remove files included more than once
4#
4# Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>. 5# Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>.
6# Copyright 2009 Luis R. Rodriguez <mcgrof@gmail.com>
7#
8# This script checks for duplicate includes. It also has support
9# to remove them in place. Note that this will not take into
10# consideration macros so you should run this only if you know
11# you do have real dups and do not have them under #ifdef's. You
12# could also just review the results.
13
14sub usage {
15 print "Usage: checkincludes.pl [-r]\n";
16 print "By default we just warn of duplicates\n";
17 print "To remove duplicated includes in place use -r\n";
18 exit 1;
19}
20
21my $remove = 0;
22
23if ($#ARGV < 0) {
24 usage();
25}
26
27if ($#ARGV >= 1) {
28 if ($ARGV[0] =~ /^-/) {
29 if ($ARGV[0] eq "-r") {
30 $remove = 1;
31 shift;
32 } else {
33 usage();
34 }
35 }
36}
5 37
6foreach $file (@ARGV) { 38foreach $file (@ARGV) {
7 open(FILE, $file) or die "Cannot open $file: $!.\n"; 39 open(FILE, $file) or die "Cannot open $file: $!.\n";
8 40
9 my %includedfiles = (); 41 my %includedfiles = ();
42 my @file_lines = ();
10 43
11 while (<FILE>) { 44 while (<FILE>) {
12 if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) { 45 if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) {
13 ++$includedfiles{$1}; 46 ++$includedfiles{$1};
14 } 47 }
48 push(@file_lines, $_);
15 } 49 }
16 50
17 foreach $filename (keys %includedfiles) { 51 close(FILE);
18 if ($includedfiles{$filename} > 1) { 52
19 print "$file: $filename is included more than once.\n"; 53 if (!$remove) {
54 foreach $filename (keys %includedfiles) {
55 if ($includedfiles{$filename} > 1) {
56 print "$file: $filename is included more than once.\n";
57 }
20 } 58 }
59 next;
21 } 60 }
22 61
62 open(FILE,">$file") || die("Cannot write to $file: $!");
63
64 my $dups = 0;
65 foreach (@file_lines) {
66 if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) {
67 foreach $filename (keys %includedfiles) {
68 if ($1 eq $filename) {
69 if ($includedfiles{$filename} > 1) {
70 $includedfiles{$filename}--;
71 $dups++;
72 } else {
73 print FILE $_;
74 }
75 }
76 }
77 } else {
78 print FILE $_;
79 }
80 }
81 if ($dups > 0) {
82 print "$file: removed $dups duplicate includes\n";
83 }
23 close(FILE); 84 close(FILE);
24} 85}
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 3baaaecd6b13..9960d1c303f8 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -38,14 +38,14 @@ static int conf_cnt;
38static char line[128]; 38static char line[128];
39static struct menu *rootEntry; 39static struct menu *rootEntry;
40 40
41static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); 41static void print_help(struct menu *menu)
42
43static const char *get_help(struct menu *menu)
44{ 42{
45 if (menu_has_help(menu)) 43 struct gstr help = str_new();
46 return _(menu_get_help(menu)); 44
47 else 45 menu_get_ext_help(menu, &help);
48 return nohelp_text; 46
47 printf("\n%s\n", str_get(&help));
48 str_free(&help);
49} 49}
50 50
51static void strip(char *str) 51static void strip(char *str)
@@ -121,7 +121,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
121 return 1; 121 return 1;
122} 122}
123 123
124int conf_string(struct menu *menu) 124static int conf_string(struct menu *menu)
125{ 125{
126 struct symbol *sym = menu->sym; 126 struct symbol *sym = menu->sym;
127 const char *def; 127 const char *def;
@@ -140,7 +140,7 @@ int conf_string(struct menu *menu)
140 case '?': 140 case '?':
141 /* print help */ 141 /* print help */
142 if (line[1] == '\n') { 142 if (line[1] == '\n') {
143 printf("\n%s\n", get_help(menu)); 143 print_help(menu);
144 def = NULL; 144 def = NULL;
145 break; 145 break;
146 } 146 }
@@ -220,7 +220,7 @@ static int conf_sym(struct menu *menu)
220 if (sym_set_tristate_value(sym, newval)) 220 if (sym_set_tristate_value(sym, newval))
221 return 0; 221 return 0;
222help: 222help:
223 printf("\n%s\n", get_help(menu)); 223 print_help(menu);
224 } 224 }
225} 225}
226 226
@@ -307,7 +307,7 @@ static int conf_choice(struct menu *menu)
307 fgets(line, 128, stdin); 307 fgets(line, 128, stdin);
308 strip(line); 308 strip(line);
309 if (line[0] == '?') { 309 if (line[0] == '?') {
310 printf("\n%s\n", get_help(menu)); 310 print_help(menu);
311 continue; 311 continue;
312 } 312 }
313 if (!line[0]) 313 if (!line[0])
@@ -331,7 +331,7 @@ static int conf_choice(struct menu *menu)
331 if (!child) 331 if (!child)
332 continue; 332 continue;
333 if (line[strlen(line) - 1] == '?') { 333 if (line[strlen(line) - 1] == '?') {
334 printf("\n%s\n", get_help(child)); 334 print_help(child);
335 continue; 335 continue;
336 } 336 }
337 sym_set_choice_value(sym, child->sym); 337 sym_set_choice_value(sym, child->sym);
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index a04da3459f0f..b55e72ff2fc6 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -560,7 +560,7 @@ int conf_write(const char *name)
560 return 0; 560 return 0;
561} 561}
562 562
563int conf_split_config(void) 563static int conf_split_config(void)
564{ 564{
565 const char *name; 565 const char *name;
566 char path[128]; 566 char path[128];
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 579ece4fa584..edd3f39a080a 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -348,7 +348,7 @@ struct expr *expr_trans_bool(struct expr *e)
348/* 348/*
349 * e1 || e2 -> ? 349 * e1 || e2 -> ?
350 */ 350 */
351struct expr *expr_join_or(struct expr *e1, struct expr *e2) 351static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
352{ 352{
353 struct expr *tmp; 353 struct expr *tmp;
354 struct symbol *sym1, *sym2; 354 struct symbol *sym1, *sym2;
@@ -412,7 +412,7 @@ struct expr *expr_join_or(struct expr *e1, struct expr *e2)
412 return NULL; 412 return NULL;
413} 413}
414 414
415struct expr *expr_join_and(struct expr *e1, struct expr *e2) 415static struct expr *expr_join_and(struct expr *e1, struct expr *e2)
416{ 416{
417 struct expr *tmp; 417 struct expr *tmp;
418 struct symbol *sym1, *sym2; 418 struct symbol *sym1, *sym2;
@@ -1098,6 +1098,8 @@ void expr_fprint(struct expr *e, FILE *out)
1098static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) 1098static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
1099{ 1099{
1100 str_append((struct gstr*)data, str); 1100 str_append((struct gstr*)data, str);
1101 if (sym)
1102 str_printf((struct gstr*)data, " [=%s]", sym_get_string_value(sym));
1101} 1103}
1102 1104
1103void expr_gstr_print(struct expr *e, struct gstr *gs) 1105void expr_gstr_print(struct expr *e, struct gstr *gs)
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 199b22bb49e2..65464366fe38 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -456,19 +456,9 @@ static void text_insert_help(struct menu *menu)
456 GtkTextBuffer *buffer; 456 GtkTextBuffer *buffer;
457 GtkTextIter start, end; 457 GtkTextIter start, end;
458 const char *prompt = _(menu_get_prompt(menu)); 458 const char *prompt = _(menu_get_prompt(menu));
459 gchar *name; 459 struct gstr help = str_new();
460 const char *help;
461 460
462 help = menu_get_help(menu); 461 menu_get_ext_help(menu, &help);
463
464 /* Gettextize if the help text not empty */
465 if ((help != 0) && (help[0] != 0))
466 help = _(help);
467
468 if (menu->sym && menu->sym->name)
469 name = g_strdup_printf(menu->sym->name);
470 else
471 name = g_strdup("");
472 462
473 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); 463 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
474 gtk_text_buffer_get_bounds(buffer, &start, &end); 464 gtk_text_buffer_get_bounds(buffer, &start, &end);
@@ -478,14 +468,11 @@ static void text_insert_help(struct menu *menu)
478 gtk_text_buffer_get_end_iter(buffer, &end); 468 gtk_text_buffer_get_end_iter(buffer, &end);
479 gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, 469 gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1,
480 NULL); 470 NULL);
481 gtk_text_buffer_insert_at_cursor(buffer, " ", 1);
482 gtk_text_buffer_get_end_iter(buffer, &end);
483 gtk_text_buffer_insert_with_tags(buffer, &end, name, -1, tag1,
484 NULL);
485 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); 471 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
486 gtk_text_buffer_get_end_iter(buffer, &end); 472 gtk_text_buffer_get_end_iter(buffer, &end);
487 gtk_text_buffer_insert_with_tags(buffer, &end, help, -1, tag2, 473 gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2,
488 NULL); 474 NULL);
475 str_free(&help);
489} 476}
490 477
491 478
diff --git a/scripts/kconfig/gconf.glade b/scripts/kconfig/gconf.glade
index 803233fdd6dd..b1c86c19292c 100644
--- a/scripts/kconfig/gconf.glade
+++ b/scripts/kconfig/gconf.glade
@@ -547,7 +547,7 @@
547 <property name="headers_visible">True</property> 547 <property name="headers_visible">True</property>
548 <property name="rules_hint">False</property> 548 <property name="rules_hint">False</property>
549 <property name="reorderable">False</property> 549 <property name="reorderable">False</property>
550 <property name="enable_search">True</property> 550 <property name="enable_search">False</property>
551 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/> 551 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/>
552 <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/> 552 <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/>
553 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/> 553 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/>
@@ -582,7 +582,7 @@
582 <property name="headers_visible">True</property> 582 <property name="headers_visible">True</property>
583 <property name="rules_hint">False</property> 583 <property name="rules_hint">False</property>
584 <property name="reorderable">False</property> 584 <property name="reorderable">False</property>
585 <property name="enable_search">True</property> 585 <property name="enable_search">False</property>
586 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/> 586 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/>
587 <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/> 587 <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/>
588 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/> 588 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
diff --git a/scripts/kconfig/kxgettext.c b/scripts/kconfig/kxgettext.c
index 8d9ce22b0fc5..dcc3fcc0cc9a 100644
--- a/scripts/kconfig/kxgettext.c
+++ b/scripts/kconfig/kxgettext.c
@@ -166,7 +166,7 @@ static int message__add(const char *msg, char *option, char *file, int lineno)
166 return rc; 166 return rc;
167} 167}
168 168
169void menu_build_message_list(struct menu *menu) 169static void menu_build_message_list(struct menu *menu)
170{ 170{
171 struct menu *child; 171 struct menu *child;
172 172
@@ -211,7 +211,7 @@ static void message__print_gettext_msgid_msgstr(struct message *self)
211 "msgstr \"\"\n", self->msg); 211 "msgstr \"\"\n", self->msg);
212} 212}
213 213
214void menu__xgettext(void) 214static void menu__xgettext(void)
215{ 215{
216 struct message *m = message__list; 216 struct message *m = message__list;
217 217
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index 8e69461313d1..ffeb532b2cff 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -17,6 +17,8 @@ P(menu_get_root_menu,struct menu *,(struct menu *menu));
17P(menu_get_parent_menu,struct menu *,(struct menu *menu)); 17P(menu_get_parent_menu,struct menu *,(struct menu *menu));
18P(menu_has_help,bool,(struct menu *menu)); 18P(menu_has_help,bool,(struct menu *menu));
19P(menu_get_help,const char *,(struct menu *menu)); 19P(menu_get_help,const char *,(struct menu *menu));
20P(get_symbol_str,void,(struct gstr *r, struct symbol *sym));
21P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));
20 22
21/* symbol.c */ 23/* symbol.c */
22P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); 24P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 25b60bc117f7..d82953573588 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -199,8 +199,6 @@ inputbox_instructions_string[] = N_(
199setmod_text[] = N_( 199setmod_text[] = N_(
200 "This feature depends on another which has been configured as a module.\n" 200 "This feature depends on another which has been configured as a module.\n"
201 "As a result, this feature will be built as a module."), 201 "As a result, this feature will be built as a module."),
202nohelp_text[] = N_(
203 "There is no help available for this kernel option.\n"),
204load_config_text[] = N_( 202load_config_text[] = N_(
205 "Enter the name of the configuration file you wish to load. " 203 "Enter the name of the configuration file you wish to load. "
206 "Accept the name shown to restore the configuration you " 204 "Accept the name shown to restore the configuration you "
@@ -284,66 +282,6 @@ static void show_textbox(const char *title, const char *text, int r, int c);
284static void show_helptext(const char *title, const char *text); 282static void show_helptext(const char *title, const char *text);
285static void show_help(struct menu *menu); 283static void show_help(struct menu *menu);
286 284
287static void get_prompt_str(struct gstr *r, struct property *prop)
288{
289 int i, j;
290 struct menu *submenu[8], *menu;
291
292 str_printf(r, _("Prompt: %s\n"), _(prop->text));
293 str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
294 prop->menu->lineno);
295 if (!expr_is_yes(prop->visible.expr)) {
296 str_append(r, _(" Depends on: "));
297 expr_gstr_print(prop->visible.expr, r);
298 str_append(r, "\n");
299 }
300 menu = prop->menu->parent;
301 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
302 submenu[i++] = menu;
303 if (i > 0) {
304 str_printf(r, _(" Location:\n"));
305 for (j = 4; --i >= 0; j += 2) {
306 menu = submenu[i];
307 str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
308 if (menu->sym) {
309 str_printf(r, " (%s [=%s])", menu->sym->name ?
310 menu->sym->name : _("<choice>"),
311 sym_get_string_value(menu->sym));
312 }
313 str_append(r, "\n");
314 }
315 }
316}
317
318static void get_symbol_str(struct gstr *r, struct symbol *sym)
319{
320 bool hit;
321 struct property *prop;
322
323 if (sym && sym->name)
324 str_printf(r, "Symbol: %s [=%s]\n", sym->name,
325 sym_get_string_value(sym));
326 for_all_prompts(sym, prop)
327 get_prompt_str(r, prop);
328 hit = false;
329 for_all_properties(sym, prop, P_SELECT) {
330 if (!hit) {
331 str_append(r, " Selects: ");
332 hit = true;
333 } else
334 str_printf(r, " && ");
335 expr_gstr_print(prop->expr, r);
336 }
337 if (hit)
338 str_append(r, "\n");
339 if (sym->rev_dep.expr) {
340 str_append(r, _(" Selected by: "));
341 expr_gstr_print(sym->rev_dep.expr, r);
342 str_append(r, "\n");
343 }
344 str_append(r, "\n\n");
345}
346
347static struct gstr get_relations_str(struct symbol **sym_arr) 285static struct gstr get_relations_str(struct symbol **sym_arr)
348{ 286{
349 struct symbol *sym; 287 struct symbol *sym;
@@ -699,19 +637,9 @@ static void show_helptext(const char *title, const char *text)
699static void show_help(struct menu *menu) 637static void show_help(struct menu *menu)
700{ 638{
701 struct gstr help = str_new(); 639 struct gstr help = str_new();
702 struct symbol *sym = menu->sym; 640
703 641 menu_get_ext_help(menu, &help);
704 if (menu_has_help(menu)) 642
705 {
706 if (sym->name) {
707 str_printf(&help, "CONFIG_%s:\n\n", sym->name);
708 str_append(&help, _(menu_get_help(menu)));
709 str_append(&help, "\n");
710 }
711 } else {
712 str_append(&help, nohelp_text);
713 }
714 get_symbol_str(&help, sym);
715 show_helptext(_(menu_get_prompt(menu)), str_get(&help)); 643 show_helptext(_(menu_get_prompt(menu)), str_get(&help));
716 str_free(&help); 644 str_free(&help);
717} 645}
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 07ff8d105c9d..059a2465c574 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -9,6 +9,9 @@
9#define LKC_DIRECT_LINK 9#define LKC_DIRECT_LINK
10#include "lkc.h" 10#include "lkc.h"
11 11
12static const char nohelp_text[] = N_(
13 "There is no help available for this kernel option.\n");
14
12struct menu rootmenu; 15struct menu rootmenu;
13static struct menu **last_entry_ptr; 16static struct menu **last_entry_ptr;
14 17
@@ -74,7 +77,7 @@ void menu_end_menu(void)
74 current_menu = current_menu->parent; 77 current_menu = current_menu->parent;
75} 78}
76 79
77struct expr *menu_check_dep(struct expr *e) 80static struct expr *menu_check_dep(struct expr *e)
78{ 81{
79 if (!e) 82 if (!e)
80 return e; 83 return e;
@@ -184,7 +187,7 @@ static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
184 (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); 187 (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name));
185} 188}
186 189
187void sym_check_prop(struct symbol *sym) 190static void sym_check_prop(struct symbol *sym)
188{ 191{
189 struct property *prop; 192 struct property *prop;
190 struct symbol *sym2; 193 struct symbol *sym2;
@@ -451,3 +454,80 @@ const char *menu_get_help(struct menu *menu)
451 else 454 else
452 return ""; 455 return "";
453} 456}
457
458static void get_prompt_str(struct gstr *r, struct property *prop)
459{
460 int i, j;
461 struct menu *submenu[8], *menu;
462
463 str_printf(r, _("Prompt: %s\n"), _(prop->text));
464 str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
465 prop->menu->lineno);
466 if (!expr_is_yes(prop->visible.expr)) {
467 str_append(r, _(" Depends on: "));
468 expr_gstr_print(prop->visible.expr, r);
469 str_append(r, "\n");
470 }
471 menu = prop->menu->parent;
472 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
473 submenu[i++] = menu;
474 if (i > 0) {
475 str_printf(r, _(" Location:\n"));
476 for (j = 4; --i >= 0; j += 2) {
477 menu = submenu[i];
478 str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
479 if (menu->sym) {
480 str_printf(r, " (%s [=%s])", menu->sym->name ?
481 menu->sym->name : _("<choice>"),
482 sym_get_string_value(menu->sym));
483 }
484 str_append(r, "\n");
485 }
486 }
487}
488
489void get_symbol_str(struct gstr *r, struct symbol *sym)
490{
491 bool hit;
492 struct property *prop;
493
494 if (sym && sym->name)
495 str_printf(r, "Symbol: %s [=%s]\n", sym->name,
496 sym_get_string_value(sym));
497 for_all_prompts(sym, prop)
498 get_prompt_str(r, prop);
499 hit = false;
500 for_all_properties(sym, prop, P_SELECT) {
501 if (!hit) {
502 str_append(r, " Selects: ");
503 hit = true;
504 } else
505 str_printf(r, " && ");
506 expr_gstr_print(prop->expr, r);
507 }
508 if (hit)
509 str_append(r, "\n");
510 if (sym->rev_dep.expr) {
511 str_append(r, _(" Selected by: "));
512 expr_gstr_print(sym->rev_dep.expr, r);
513 str_append(r, "\n");
514 }
515 str_append(r, "\n\n");
516}
517
518void menu_get_ext_help(struct menu *menu, struct gstr *help)
519{
520 struct symbol *sym = menu->sym;
521
522 if (menu_has_help(menu)) {
523 if (sym->name) {
524 str_printf(help, "CONFIG_%s:\n\n", sym->name);
525 str_append(help, _(menu_get_help(menu)));
526 str_append(help, "\n");
527 }
528 } else {
529 str_append(help, nohelp_text);
530 }
531 if (sym)
532 get_symbol_str(help, sym);
533}
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index ce7d508c7520..00c51507cfcc 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1042,12 +1042,10 @@ void ConfigInfoView::menuInfo(void)
1042 if (showDebug()) 1042 if (showDebug())
1043 debug = debug_info(sym); 1043 debug = debug_info(sym);
1044 1044
1045 help = menu_get_help(menu); 1045 struct gstr help_gstr = str_new();
1046 /* Gettextize if the help text not empty */ 1046 menu_get_ext_help(menu, &help_gstr);
1047 if (help.isEmpty()) 1047 help = print_filter(str_get(&help_gstr));
1048 help = print_filter(menu_get_help(menu)); 1048 str_free(&help_gstr);
1049 else
1050 help = print_filter(_(menu_get_help(menu)));
1051 } else if (menu->prompt) { 1049 } else if (menu->prompt) {
1052 head += "<big><b>"; 1050 head += "<big><b>";
1053 head += print_filter(_(menu->prompt->text)); 1051 head += print_filter(_(menu->prompt->text));
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 18f3e5c33634..6c8fbbb66ebc 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -36,7 +36,7 @@ tristate modules_val;
36 36
37struct expr *sym_env_list; 37struct expr *sym_env_list;
38 38
39void sym_add_default(struct symbol *sym, const char *def) 39static void sym_add_default(struct symbol *sym, const char *def)
40{ 40{
41 struct property *prop = prop_alloc(P_DEFAULT, sym); 41 struct property *prop = prop_alloc(P_DEFAULT, sym);
42 42
@@ -125,7 +125,7 @@ struct property *sym_get_default_prop(struct symbol *sym)
125 return NULL; 125 return NULL;
126} 126}
127 127
128struct property *sym_get_range_prop(struct symbol *sym) 128static struct property *sym_get_range_prop(struct symbol *sym)
129{ 129{
130 struct property *prop; 130 struct property *prop;
131 131
@@ -943,7 +943,7 @@ const char *prop_get_type_name(enum prop_type type)
943 return "unknown"; 943 return "unknown";
944} 944}
945 945
946void prop_add_env(const char *env) 946static void prop_add_env(const char *env)
947{ 947{
948 struct symbol *sym, *sym2; 948 struct symbol *sym, *sym2;
949 struct property *prop; 949 struct property *prop;
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 89774011965d..5f0fcb712e29 100644
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -184,10 +184,7 @@ if ($target eq "0") {
184 184
185# if it's a module, we need to find the .ko file and calculate a load offset 185# if it's a module, we need to find the .ko file and calculate a load offset
186if ($module ne "") { 186if ($module ne "") {
187 my $dir = dirname($filename); 187 my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`;
188 $dir = $dir . "/";
189 my $mod = $module . ".ko";
190 my $modulefile = `find $dir -name $mod | head -1`;
191 chomp($modulefile); 188 chomp($modulefile);
192 $filename = $modulefile; 189 $filename = $modulefile;
193 if ($filename eq "") { 190 if ($filename eq "") {
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 4a34ec591e8c..d52f7a01557c 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -101,7 +101,8 @@ exuberant()
101 -I ____cacheline_aligned_in_smp \ 101 -I ____cacheline_aligned_in_smp \
102 -I ____cacheline_internodealigned_in_smp \ 102 -I ____cacheline_internodealigned_in_smp \
103 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ 103 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
104 --extra=+f --c-kinds=+px \ 104 -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
105 --extra=+f --c-kinds=-px \
105 --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' \ 106 --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' \
106 --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' 107 --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/'
107 108
diff --git a/usr/.gitignore b/usr/.gitignore
index 69b2e89fa165..8e48117a3f3d 100644
--- a/usr/.gitignore
+++ b/usr/.gitignore
@@ -4,5 +4,7 @@
4gen_init_cpio 4gen_init_cpio
5initramfs_data.cpio 5initramfs_data.cpio
6initramfs_data.cpio.gz 6initramfs_data.cpio.gz
7initramfs_data.cpio.bz2
8initramfs_data.cpio.lzma
7initramfs_list 9initramfs_list
8include 10include
diff --git a/usr/Makefile b/usr/Makefile
index 245145a99c10..1e6a9e4a72cc 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -6,7 +6,7 @@ klibcdirs:;
6PHONY += klibcdirs 6PHONY += klibcdirs
7 7
8 8
9# Gzip, but no bzip2 9# Gzip
10suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz 10suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz
11 11
12# Bzip2 12# Bzip2