Commit graph

54163 commits

Author SHA1 Message Date
Alex Landau c299ec2d8e kbuild: handle compressed cpio initramfs-es
Make kbuild handle compressed cpio initramfs-es.  An already compressed
cpio is copied directly to usr/, while a non-compressed cpio is filtered
through gzip (no changes here) on its way to usr/.

If the user has created a compressed cpio by other means, this saves him
from uncompressing it, just to be compressed again by kbuild.

Signed-off-by: Alex Landau <landau.alex@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Sam Ravnborg b4d5171ac7 kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
Added on request from:  Rusty Russell <rusty@rustcorp.com.au>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Rusty Russell <rusty@rustcorp.com.au>
2007-05-02 20:58:10 +02:00
Sam Ravnborg 66bd32e443 kbuild: remove stale comment in modpost.c
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Uwe kleine-König f03e1666d6 kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
I'm currently using CROSS_COMPILE="ccache arm-linux-".  With that the bash
builtin command "type" searches for ccache and arm-linux-mkimage and so sets
MKIMAGE="/path/to/ccache" as I don't have arm-linux-mkimage.  Then the script
dies with an error, that ccache doesn't support the argument -A.

This patch adds some quoting such that it works again for me.

Please note that this patch doesn't help you if you use ${CROSSCOMPILE}-mkimage
and ccache as mkuboot.sh now searches for the command
"ccache arm-linux-mkimage".

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Sam Ravnborg e711db3edf kbuild: fix make mrproper for Documentation/DocBook/man
"make mandocs" generate > 2000 files in Documentation/DocBook/man
and this caused kbuild to barf out during make mrproper like this:

make -f scripts/Makefile.clean obj=Documentation/DocBook
make -f scripts/Makefile.clean obj=Documentation/DocBook/man/
make[2]: execvp: /bin/sh: Argument list too long
make[2]: *** [__clean] Error 127
make[1]: *** [Documentation/DocBook/man/] Error 2
make: *** [_mrproper_Documentation/DocBook] Error 2

The man directory were solely used for output
so the fix is to remove it entirely during the
make mrproper process.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
2007-05-02 20:58:10 +02:00
Sam Ravnborg 145c90475f kbuild: remove kconfig binaries during make mrproper
Nigel Cunningham <nigel@nigel.suspend2.net> noticed
that 'make mrproper' did not remove mconf.
Fixed so we now remove all relevant binaries.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Nigel Cunningham <nigel@nigel.suspend2.net>
2007-05-02 20:58:10 +02:00
Sam Ravnborg d802b50f0d kconfig/menuconfig: do not hardcode '.config'
Export and use the function conf_get_configname()
to retreive the default configuration filename.

Suggested by: Roman Zippel <zippel@linux-m68k.org>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg 87c94bfb8a kbuild: override build timestamp & version
Introduce KBUILD_BUILD_VERSION to make it
possible to override kernel build version
during build time.

Introduce KBUILD_BUILD_TIMESTAMP to make it
possible to override kernel build timestamp
during build time.

But variables are useful mainly by distros
that want to pass info from an SCM when
building the kernel. Timestamp could be last
checkin date for a file etc.

The idea came from Olaf Hering <olaf@aepfle.de>

Cc: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Andreas Dilger b72e53f8bb kconfig.debug: clarify CONFIG_DEBUG_INFO help text
The following patch adds some extra clarification to the CONFIG_DEBUG_INFO
Kconfig help text.  The current text is mostly a recursive definition and
doesn't really say much of anything.  When I first read this I thought it
was going to enable extra verbosity in debug messages or something, but it
is only enabling the "gcc -g" compile option in the Makefile.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg c53aeca059 kbuild: complain about missing system calls
Most system calls seems to get added to i386 first. This patch
automatically generates a warning for any new system call which is
implemented on i386 but not the architecture currently being compiled.
On PowerPC at the moment, for example, it results in these warnings:
init/missing_syscalls.h:935:3: warning: #warning syscall sync_file_range not implemented
init/missing_syscalls.h:947:3: warning: #warning syscall getcpu not implemented
init/missing_syscalls.h:950:3: warning: #warning syscall epoll_pwait not implemented

The file scripts/checksyscalls.sh list a number of legacy system calls
that are ignored because they only makes sense on i386 systems.

Other contributors to this patch are Russell King <rmk+lkml@arm.linux.org.uk>
and Stéphane Jourdois <kwisatz@rubis.org>

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Anton Blanchard ded2e1640f kbuild: small documentation fix in Documentation/kbuild/modules.txt
The Makefile fragment in Documentation/kbuild/modules.txt looks to be
missing some braces.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg 4be40e2223 kbuild: do not emit src version warning for non-modules
modpost is now called with .o files that are not modules.
So do not warn if there is no corresponding .mod
file listing .o files (in .tmp_versions/).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg 95e30f9593 menuconfig: remember alternate config filename
When loading an alternate configuration use that file as
current configuration filename.
Make the filename visible in the dialog.
Default continue to be .config.

Inspired by patch from: Cyrill Gorcunov <gorcunov@gmail.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Cyrill Gorcunov <gorcunov@gmail.com>
2007-05-02 20:58:09 +02:00
Don Mullis dd7e54ade8 kbuild: move tags from ARCH and include/ ahead of drivers
Move tags extracted from the ARCH and include/ sub-trees ahead of
those from device drivers, so that the former will appear first
during searches.

Saves user time during interactive searches for certain patterns
that happen to find unwanted matches in driver files.

Example in emacs:
	 "M-x find-tag PAGE_SIZE"
	 "M-1 M-." (repeated until definition from asm-i386/page.h appears)

Signed-off-by: Don Mullis <dwm@meer.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Matthew Wilcox 2a11665945 kbuild: distinguish between errors and warnings in modpost
Some of modpost's warnings are fatal, and some are not.  Adopt the
compiler distinction between errors and warnings by calling merror()
for fatal diagnostics and warn() for non-fatal ones.
merror() was used as replacemtn for error() to avoid clash with glibc

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Marco Costalba 63431e7569 kconfig/xconfig: sync main view with search dialog current menu
When changing current menu in search dialog update also main view

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Mike Frysinger f88d205501 menuconfig: dont use obsolete index() function in lxdialog
The index() function is obsolete, use strchr() instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Uwe Zeisberger 2462566f21 kbuild: add a missing slash in the comments
Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
H. Peter Anvin 6e019b001d cleanpatch: a script to clean up stealth whitespace added by a patch
This script is a companion to the "cleanfile" script.  This cleans
up a patch in unified diff format *before* it is applied.  Note that
the empty lines at the end of file detection *requires* that the diff was
taken with at least one line of context around each hunk, or bad things
will happen.

This script cleans up various classes of stealth whitespace.  In
particular, it cleans up:

- Whitespace (spaces or tabs)before newline;
- DOS line endings (CR before LF);
- Space before tab (spaces are deleted or converted to tabs);
- Empty lines at end of file.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
H. Peter Anvin 12b315603a cleanfile: a script to clean up stealth whitespace
This script cleans up various classes of stealth whitespace.  In
particular, it cleans up:

- Whitespace (spaces or tabs)before newline;
- DOS line endings (CR before LF);
- Space before tab (spaces are deleted or converted to tabs);
- Empty lines at end of file.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Sam Ravnborg dc24f0e708 kbuild: remove dependency on input.h from file2alias
Almost all definitions used by file2alias was already
present in mod_devicetable.h.
Added the last definition and killed the input.h usage.

The errornous include was pointed out
by: Jan Engelhardt <jengelh@linux01.gwdg.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Deepak Saxena <dsaxena@plexity.net>
2007-05-02 20:58:08 +02:00
Sam Ravnborg 5a4910fbbe kbuild: whitelist logo references from .text to .init.data
drivers/video/logo has references from .text to .init.data
but function is only used during early init.
So reference is OK and we do not want to warn about them =>
whitelist the reference.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Sam Ravnborg a61b2dfd18 kbuild: fix segmentation fault in modpost
If modpost was called manually with filenames without '/'
then modpost would segfault.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg 9bf8cb9b79 kbuild: fix warnings from .pci_fixup section
Now where we do not pass vmlinux to modpost we started
to see section mismatch warnings from .pci_fixup.
Refactored code a little to include these in the
whitelist again.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg aae5f662a3 kbuild: whitelist section mismatch in init/main.c
In init/main.c we have a reference from rest_init() to .init.text
which is intentional.
Rename the function 'init' to 'kernel_init' to make it a
kernel wide unique symbol and whitelist the reference.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg 85bd2fddd6 kbuild: fix section mismatch check for vmlinux
vmlinux does not contain relocation entries which is
used by the section mismatch checks.
Reported by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Use the individual objects as inputs to overcome
this limitation.
In modpost check the .o files and skip non-ELF files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Thomas Renninger 35060b6a9a [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall
In arch/i386/cpu/common.c there is:
cpu_devs[X86_VENDOR_INTEL]
cpu_devs[X86_VENDOR_CYRIX]
cpu_devs[X86_VENDOR_AMD]
...
They are all filled with data early.
The data (struct) got set to NULL  for all, but Intel in different
late_initcall (exit_cpu_vendor) calls.
I don't see what sense this makes at all, maybe something that got
forgotten with the HOTPLUG_CPU extenstions?

Please check/review whether initdata, cpuinitdata is still ok and this
still works with HOTPLUG_CPU and without, it should...

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: davej@redhat.com
2007-05-02 19:27:22 +02:00
David Rientjes a3193348d4 [PATCH] i386: type may be unused
In the case of !CONFIG_PCI_DIRECT && !CONFIG_PCI_MMCONFIG, type is
unreferened.

Cc: Andi Kleen <ak@suse.de>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:22 +02:00
Olivier Galibert b5229dbb85 [PATCH] i386: Some additional chipset register values validation.
On i945, a mmconfig range hitting the f0000000-ffffffff zone conflicts
with the APIC registers and others.  Consider it invalid.

On E7520, values 0000 and f000 for the window register are defined
invalid in the documentation.

I haven't seen a bios use these values, but who trusts biosen these
days?

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Signed-off-by: Andi Kleen <ak@suse.de>

 arch/i386/pci/mmconfig-shared.c |   25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)
2007-05-02 19:27:22 +02:00
Bill Irwin 6c2af35820 [PATCH] i386: Add missing !X86_PAE dependincy to the 2G/2G split.
Only 1GB-aligned kernel/user splits are now handled for PAE. The
2GB/2GB split attempts to avoid aliasing vmallocspace with the 1:1
mapping for physical memory by using an actual split of 1.875/2.125
to accommodate 128MB of vmallocspace out of what would otherwise
be a full 2GB for userspace. That attempt disturbs the alignment
required by PAE for 2GB/2GB splits, and furthermore does not provide
a 2GB/2GB split as advertised.

This patch resolves the issues here in two manners. The first is
by providing a true 2GB/2GB split in addition to the 1.875/2.125
split. The second is by renaming the 1.875/2.125 split to
CONFIG_VMSPLIT_2G_OPT analogously to CONFIG_VMSPLIT_3G_OPT, which
performs a similar manuever to avoid aliasing vmallocspace with
the 1:1 mapping for physical memory around the 3GB boundary. With
the 1.875/2.125 split properly-named, its config option is then
tagged as depending on !HIGHMEM to express the PAE implementation's
current inability to deal with such unaligned splits.

This patch is essentially a combination of two patches, one written
by Eric Biederman and the other by Eric Dumazet. If they could add
their Signed-off-by: to this, I'd be much obliged.

Signed-off-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Eric Dumazet <dada1@cosmosbay.com>
Cc: Mark Lord <lkml@rtr.ca>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Andi Kleen <ak@suse.de>
2007-05-02 19:27:22 +02:00
Andi Kleen b466004a66 [PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff
asm-offsets.c is valid source code and needs to be diffed.

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Jan Kiszka c41bf8fa5e [PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu
There are two callers of __unlazy_fpu, unlazy_fpu and __switch_to, and
none of them appear to require additional preempt_disable/enable here.
Let's open-code save_init_fpu in __unlazy_fpu to save a few ops.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Jan Kiszka 02b64dab56 [PATCH] i386: white space fixes in i387.h
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen 1306383282 [PATCH] i386: Drop noisy e820 debugging printks
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen f19cccf366 [PATCH] x86-64: Fix allnoconfig error in genapic_flat.c
Fix:

In file included from include2/asm/apic.h:5,
                 from include2/asm/smp.h:15,
                 from linux/arch/x86_64/kernel/genapic_flat.c:18:
linux/include/linux/pm.h: In function ‘call_platform_enable_wakeup’:
linux/include/linux/pm.h:331: error: ‘EIO’ undeclared (first use in this function)
linux/include/linux/pm.h:331: error: (Each undeclared identifier is reported only once
linux/include/linux/pm.h:331: error: for each function it appears in.)

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen 2724b6db66 [PATCH] x86-64: Shut up warnings for vfat compat ioctls on other file systems
vfat implements compat handlers for these ioctls, but when they
were executed on other file systems the kernel would still complain
about an unknown compat ioctl.  Just declare them as compatible
and let them be rejected when not needed by the normal path.

This makes wine runs a lot quieter

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen fac15a8e4d [PATCH] x86-64: Share identical video.S between i386 and x86-64
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen 2136220d00 [PATCH] x86-64: Remove CONFIG_REORDER
The option never worked well and functionlist wasn't well maintained.
Also it made the build very slow on many binutils version.

So just remove it.

Cc: arjan@linux.intel.com
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen a106009bdf [PATCH] x86-64: Print type and size correctly for unknown compat ioctls
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen c812d6c198 [PATCH] i386: Remove copy_*_user BUG_ONs for (size < 0)
access_ok checks this case anyways, no need to check twice.

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen ec1180db2c [PATCH] i386: Little cleanups in smpboot.c
- Remove #if that is always set
- Fix warning

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen 3bea9c9793 [PATCH] x86-64: Don't enable NUMA for a single node in K8 NUMA scanning
This was supposed to see the full memory on a ASUS A8SX motherboard
with 4GB RAM where the northbridge reports less memory, but it didn't
help there. But it's a reasonable change so let's include it anyways.

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen c5bcb5635a [PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
RDTSCP is already synchronous and doesn't need an explicit CPUID.
This is a little faster and more importantly avoids VMEXITs on Hypervisors.

Original patch from Joerg Roedel, but reworked by AK
Also includes miscompilation fix by Eric Biederman

Cc: "Joerg Roedel" <joerg.roedel@amd.com>

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:21 +02:00
Andi Kleen 9bccb23dc5 [PATCH] i386: Add X86_FEATURE_RDTSCP
Following x86-64
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:20 +02:00
Andi Kleen 3aefbe0746 [PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386
Syncs up with x86-64.

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:20 +02:00
Andi Kleen e859dc553c [PATCH] i386: Implement alternative_io for i386
Ported from x86-64.

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:20 +02:00
Andi Kleen 3671df8572 [PATCH] i386: Evaluate constant cpu features at runtime
Redefine cpu_has() to evaluate cpu features already checked in early
boot at compile time.  This way the compiler might eliminate some dead code.
Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:20 +02:00
Andi Kleen c7f81c9453 [PATCH] i386: Verify important CPUID bits in real mode
Check some CPUID bits that are needed for compiler generated early in boot.
When the system is still in real mode before changing the VESA BIOS mode
it is possible to still display an visible error message on the screen.

Similar to x86-64.

Includes cleanups from Eric Biederman

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:20 +02:00
Andi Kleen 484ad39365 [PATCH] i386: Drop -traditional in arch/i386/boot
Needed for followon patch

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:20 +02:00
Andi Kleen fa0a009109 [PATCH] x86-64: Drop -traditional for arch/x86_64/boot
Follows i386 and useful cleanup.

Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02 19:27:20 +02:00