pandora-kernel.git
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Wed, 25 May 2011 10:16:29 +0000 (10:16 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: Fix reference to vermagic.h
Geert Uytterhoeven [Wed, 25 May 2011 09:09:59 +0000 (11:09 +0200)]
kbuild: Fix reference to vermagic.h

It's "include/linux/vermagic.h", not "include/vermagic.h"

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'packaging' into for-next
Michal Marek [Tue, 24 May 2011 16:38:18 +0000 (16:38 +0000)]
Merge branch 'packaging' into for-next

14 years agokbuild: Create a kernel-headers RPM
Arun Sharma [Tue, 17 May 2011 17:36:16 +0000 (10:36 -0700)]
kbuild: Create a kernel-headers RPM

To compile binaries which depend on new kernel interfaces, we need a
kernel-headers RPM

Signed-off-by: Arun Sharma <asharma@fb.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'packaging' into for-next
Michal Marek [Tue, 24 May 2011 15:48:32 +0000 (15:48 +0000)]
Merge branch 'packaging' into for-next

14 years agorpm-pkg: Fix when current directory is a symlink
Michal Marek [Wed, 4 May 2011 22:37:13 +0000 (00:37 +0200)]
rpm-pkg: Fix when current directory is a symlink

The better fix would be to stop using the parent directory (principle of
least surprise), but as long as we use it, use it consistently.

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Tue, 24 May 2011 15:16:38 +0000 (15:16 +0000)]
Merge branch 'kconfig' into for-next

14 years agoMerge branch 'kbuild/kconfig-for-40' into kbuild/kconfig
Michal Marek [Tue, 24 May 2011 15:16:21 +0000 (17:16 +0200)]
Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfig

14 years agokconfig: do not record timestamp in .config
Arnaud Lacombe [Mon, 16 May 2011 03:22:56 +0000 (23:22 -0400)]
kconfig: do not record timestamp in .config

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'misc' into for-next
Michal Marek [Tue, 24 May 2011 14:10:31 +0000 (14:10 +0000)]
Merge branch 'misc' into for-next

14 years agoexport_report: use warn() to issue WARNING, so they go to stderr
Jim Cromie [Mon, 23 May 2011 18:44:57 +0000 (12:44 -0600)]
export_report: use warn() to issue WARNING, so they go to stderr

Also count CONFIG_MODVERSIONS warnings, and print a NOTE at start of
SECTION 2 if any were issued.  Section 2 will be empty if the build is
lacking this CONFIG_ item, and user may have missed the warnings, as
they're off screen.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoexport_report: sort SECTION 2 output
Jim Cromie [Mon, 23 May 2011 18:44:56 +0000 (12:44 -0600)]
export_report: sort SECTION 2 output

Sort SECTION 2 modules by name.  Within those module listings, sort
the symbol providers by name, and remove the count, as it is
misleading; its the kernel-wide count of uses of that symbol, not the
count pertaining to the module being outlined.  (this can be seen by
grepping the output for a single symbol).  The count is still used to
sort the symbols.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoexport_report: do collectcfiles work in perl itself
Jim Cromie [Mon, 23 May 2011 18:44:55 +0000 (12:44 -0600)]
export_report: do collectcfiles work in perl itself

Avoid spawning a shell pipeline doing cat, grep, sed, and do it all
inside perl.  The <*.c> globbing construct works at least as far back
as 5.8.9

Note that this is not just an optimization; the sed command
in the pipeline was unterminated, due to lack of escape on the
end-of-line (\$) in the regex, resulting in this:

    $ perl ../linux-2.6/scripts/export_report.pl  > /dev/null
    sed: -e expression #1, char 5: unterminated `s' command
    sh: .mod.c/: not found

Comments on an earlier patch sought an all-perl implementation.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
cc: Michal Marek <mmarek@suse.cz>,
cc: linux-kbuild@vger.kernel.org
cc: Arnaud Lacombe lacombar@gmail.com
cc: Stephen Hemminger shemminger@vyatta.com
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agogconfig: Hide unused left treeview when start up the interface
Eduardo Silva [Thu, 19 May 2011 12:38:25 +0000 (08:38 -0400)]
gconfig: Hide unused left treeview when start up the interface

When the gconfig program starts in full mode view, it shows the
left treeview which belongs to the 'split mode view'. The patch
fix this visual issue.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agogconfig: enable rules hint for main treeviews
Eduardo Silva [Thu, 19 May 2011 12:37:01 +0000 (08:37 -0400)]
gconfig: enable rules hint for main treeviews

Due to the large amount of rows in the treeviews, is difficult to
match columns with rows, setting the rules hint to 'true' allows the
treeview to alternate background colors in the rows making the data
more readable.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Tue, 17 May 2011 14:31:32 +0000 (14:31 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig: autogenerated config_is_xxx macro
Jean-Christophe PLAGNIOL-VILLARD [Fri, 6 May 2011 05:03:49 +0000 (07:03 +0200)]
kconfig: autogenerated config_is_xxx macro

this will allow to use to use

if(config_is_xxx())
if(config_is_xxx_module())

in the code instead of

#ifdef CONFIG_xxx
#ifdef CONFIG_xxx_MODULE

and now let the compiler remove the non usefull code and not the
pre-processor

as done in the mach-types for arm as exmaple

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Mon, 16 May 2011 14:40:35 +0000 (14:40 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o
Michal Marek [Mon, 16 May 2011 14:37:34 +0000 (16:37 +0200)]
kbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o

Based on a patch by Rabin Vincent.

Fix building with KBUILD_NOCMDDEP=1, which currently does not work
because it does not build built-in.o with no dependencies:

  LD      fs/notify/built-in.o
ld: cannot find fs/notify/dnotify/built-in.o: No such file or directory
ld: cannot find fs/notify/inotify/built-in.o: No such file or directory
ld: cannot find fs/notify/fanotify/built-in.o: No such file or directory

Reported-and-tested-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Thu, 12 May 2011 15:24:20 +0000 (15:24 +0000)]
Merge branch 'kbuild' into for-next

14 years agoscripts/kallsyms.c: fix potential segfault
Xiaochen Wang [Sun, 1 May 2011 03:41:41 +0000 (11:41 +0800)]
scripts/kallsyms.c: fix potential segfault

Description:
This bug hardly appears during real kernel compiling,
 because the vmlinux symbols table is huge.

But we can still catch it under strict condition , as follows.
   $ echo "c101b97b T do_fork" | ./scripts/kallsyms --all-symbols
   #include <asm/types.h>
   ......
   ......
   .globl kallsyms_token_table
           ALGN
   kallsyms_token_table:
   Segmentation fault (core dumped)
   $

If symbols table is small, all entries in token_profit[0x10000] may
decrease to 0 after several calls of compress_symbols() in optimize_result().
In that case, find_best_token() always return 0 and
best_table[i] is set to "\0\0" and best_table_len[i] is set to 2.

As a result, expand_symbol(best_table[0]="\0\0", best_table_len[0]=2, buf)
in write_src() will run in infinite recursion until stack overflows,
causing segfault.

This patch checks the find_best_token() return value. If all entries in
token_profit[0x10000] become 0 according to return value, it breaks the loop
in optimize_result().
And expand_symbol() works well when best_table_len[i] is 0.

Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com>
Acked-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Thu, 12 May 2011 14:59:38 +0000 (14:59 +0000)]
Merge branch 'kbuild' into for-next

14 years agoscripts/gen_initramfs_list.sh: Convert to a /bin/sh script
Jamey Sharp [Thu, 5 May 2011 19:03:47 +0000 (12:03 -0700)]
scripts/gen_initramfs_list.sh: Convert to a /bin/sh script

Replace bashisms with POSIX-compatible shell scripting.

Notably, de-duplicate '/' using a sed command from elsewhere in the same script
rather than "${name//\/\///}".

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'misc' into for-next
Michal Marek [Thu, 12 May 2011 14:33:19 +0000 (14:33 +0000)]
Merge branch 'misc' into for-next

14 years agokbuild: make versioncheck work in KBUILD_OUTDIR
Peter Foley [Tue, 26 Apr 2011 21:19:28 +0000 (17:19 -0400)]
kbuild: make versioncheck work in KBUILD_OUTDIR

This patch fixes the versioncheck target so it works when make is
invoked in KBUILD_OUTDIR.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: make includecheck work in KBUILD_OUTDIR
Peter Foley [Tue, 26 Apr 2011 21:18:29 +0000 (17:18 -0400)]
kbuild: make includecheck work in KBUILD_OUTDIR

This patch fixes the includecheck target so it works when make is
invoked in KBUILD_OUTDIR.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: make headerdep work in KBUILD_OUTDIR
Peter Foley [Tue, 26 Apr 2011 21:17:11 +0000 (17:17 -0400)]
kbuild: make headerdep work in KBUILD_OUTDIR

This patch fixes the headerdep target so it works when make is invoked
in KBUILD_OUTDIR.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: add targets to PHONY
Peter Foley [Tue, 26 Apr 2011 21:15:01 +0000 (17:15 -0400)]
kbuild: add targets to PHONY

This patch adds some targets to PHONY so they are built even if a file
with the same name exists.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Wed, 11 May 2011 11:42:11 +0000 (11:42 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: Fix GNU make v3.80 compatibility
Kevin Cernekee [Tue, 10 May 2011 22:47:16 +0000 (15:47 -0700)]
kbuild: Fix GNU make v3.80 compatibility

According to Documentation/Changes, the kernel should be buildable with
GNU make 3.80+.  Commit 88d7be031f9f975bb3f50a0b5ef3796a671e7edf (kbuild:
Use a single clean rule for kernel and external modules) introduced the
"$(or" construct, which requires make 3.81.  This causes "make clean" to
malfunction when it is used with external modules.

Replace "$(or" with an equivalent "$(if" expression, to restore backward
compatibility.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'packaging' into for-next
Michal Marek [Wed, 4 May 2011 21:08:39 +0000 (21:08 +0000)]
Merge branch 'packaging' into for-next

14 years agoReplace '-' in kernel version with '_'
Arun Sharma [Wed, 4 May 2011 20:48:11 +0000 (13:48 -0700)]
Replace '-' in kernel version with '_'

Removing the '-' results in hard to read filenames such as:
kernel-2.6.35.2000042g76e4caf-28.x86_64.rpm

kernel-2.6.35.2_000042_g76e4caf-28.x86_64.rpm is easier to
read.

Signed-off-by: Arun Sharma <asharma@fb.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Wed, 4 May 2011 20:52:36 +0000 (20:52 +0000)]
Merge branch 'kconfig' into for-next

14 years agoMAINTAINERS: Update KCONFIG entry
Michal Marek [Fri, 29 Apr 2011 14:24:20 +0000 (16:24 +0200)]
MAINTAINERS: Update KCONFIG entry

Roman Zippel hasn't been active for several years. Add myself as kconfig
maintainer, but change the mode to "Odd Fixes" to not set expectations
too high. Also, remove the patchwork link, since it is not used for
kbuild/kconfig.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Tue, 3 May 2011 08:51:59 +0000 (08:51 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: Fix passing -Wno-* options to gcc 4.4+
Michal Marek [Mon, 2 May 2011 10:51:15 +0000 (12:51 +0200)]
kbuild: Fix passing -Wno-* options to gcc 4.4+

Starting with 4.4, gcc will happily accept -Wno-<anything> in the
cc-option test and complain later when compiling a file that has some
other warning. This rather unexpected behavior is intentional as per
http://gcc.gnu.org/PR28322, so work around it by testing for support of
the opposite option (without the no-). Introduce a new Makefile function
cc-disable-warning that does this and update two uses of cc-option in
the toplevel Makefile.

Reported-and-tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: move scripts/basic/docproc.c to scripts/docproc.c
Peter Foley [Mon, 2 May 2011 20:48:03 +0000 (22:48 +0200)]
kbuild: move scripts/basic/docproc.c to scripts/docproc.c

Move docproc from scripts/basic to scripts so it is only built for *doc
targets instead of every time the kernel is built.

14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Mon, 2 May 2011 20:32:45 +0000 (20:32 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: Fix Makefile.asm-generic for um
Michal Marek [Mon, 2 May 2011 16:01:06 +0000 (18:01 +0200)]
kbuild: Fix Makefile.asm-generic for um

Do nothing if arch/$(SRCARCH)/include/asm/Kbuild does not exist, which
is the case of um.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Mon, 2 May 2011 15:40:38 +0000 (15:40 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig-language: add to hints
Randy Dunlap [Thu, 28 Apr 2011 17:58:52 +0000 (10:58 -0700)]
kconfig-language: add to hints

Explain a little about kconfig symbol dependencies and symbol
existence given optional kconfig language scenarios.
Yes, I was bitten by this.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Mon, 2 May 2011 15:37:35 +0000 (15:37 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: Allow to combine multiple W= levels
Michal Marek [Fri, 29 Apr 2011 12:45:31 +0000 (14:45 +0200)]
kbuild: Allow to combine multiple W= levels

Add support for make W=12, make W=123 and so on, to enable warnings from
multiple W= levels. Normally, make W=<level> does not include warnings
from the previous level.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-By: Valdis Kletnieks <valdis.kletnieks@vt.edu>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Mon, 2 May 2011 15:32:23 +0000 (15:32 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig: Document the new "visible if" syntax
Michal Marek [Fri, 26 Nov 2010 16:15:11 +0000 (17:15 +0100)]
kconfig: Document the new "visible if" syntax

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'misc' into for-next
Michal Marek [Fri, 29 Apr 2011 15:01:51 +0000 (15:01 +0000)]
Merge branch 'misc' into for-next

14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Fri, 29 Apr 2011 15:01:50 +0000 (15:01 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: Disable -Wunused-but-set-variable for gcc 4.6.0
Dave Jones [Thu, 21 Apr 2011 21:28:13 +0000 (17:28 -0400)]
kbuild: Disable -Wunused-but-set-variable for gcc 4.6.0

Disable the new -Wunused-but-set-variable that was added in gcc 4.6.0
It produces more false positives than useful warnings.

This can still be enabled using W=1

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Fri, 29 Apr 2011 14:00:04 +0000 (14:00 +0000)]
Merge branch 'kbuild' into for-next

14 years agoFix handling of backlash character in LINUX_COMPILE_BY name
Marcin Nowakowski [Mon, 25 Apr 2011 12:35:21 +0000 (13:35 +0100)]
Fix handling of backlash character in LINUX_COMPILE_BY name

When using a domain login, `whoami` returns the login in
user\domain format. This leads to either warnings on unrecognised
escape sequences or escaped characters being generated for the user.
This patch ensures that any backslash is escaped to a double-backslash
to make sure the name is preserved correctly. This patch does not
enforce escaping on the KBUILD_BUILD_USER variable, as this is something
the user has control of and can escape if required.

Signed-off-by: Marcin Nowakowski <marcin.nowakowski.000@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: don't warn about include/linux/version.h not including itself
Peter Foley [Tue, 26 Apr 2011 23:07:56 +0000 (19:07 -0400)]
kbuild: don't warn about include/linux/version.h not including itself

This patch makes checkversion.pl not warn that include/linux/version.h
dosen't include itself.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
[mmarek: simplified to use 'next if' syntax]
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Fri, 29 Apr 2011 12:01:06 +0000 (12:01 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig: quiet commands when V=0
Peter Foley [Tue, 26 Apr 2011 22:16:53 +0000 (18:16 -0400)]
kconfig: quiet commands when V=0

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: change update-po-config to reflect new layout of arch/um
Peter Foley [Tue, 26 Apr 2011 22:13:56 +0000 (18:13 -0400)]
kconfig: change update-po-config to reflect new layout of arch/um

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: make update-po-config work in KBUILD_OUTPUT
Peter Foley [Tue, 26 Apr 2011 22:13:05 +0000 (18:13 -0400)]
kconfig: make update-po-config work in KBUILD_OUTPUT

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: rearrange clean-files
Peter Foley [Tue, 26 Apr 2011 22:06:55 +0000 (18:06 -0400)]
kconfig: rearrange clean-files

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: change gconf to modify hostprogs-y like nconf and mconf
Peter Foley [Tue, 26 Apr 2011 22:02:08 +0000 (18:02 -0400)]
kconfig: change gconf to modify hostprogs-y like nconf and mconf

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: change qconf to modify hostprogs-y like nconf and mconf
Peter Foley [Tue, 26 Apr 2011 22:00:05 +0000 (18:00 -0400)]
kconfig: change qconf to modify hostprogs-y like nconf and mconf

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: only build kxgettext when needed
Peter Foley [Tue, 26 Apr 2011 21:57:38 +0000 (17:57 -0400)]
kconfig: only build kxgettext when needed

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Thu, 28 Apr 2011 16:26:33 +0000 (16:26 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: asm-generic support
Sam Ravnborg [Wed, 27 Apr 2011 20:29:49 +0000 (22:29 +0200)]
kbuild: asm-generic support

There is an increasing amount of header files
shared between individual architectures in asm-generic.
To avoid a lot of dummy wrapper files that just
include the corresponding file in asm-generic provide
some basic support in kbuild for this.

With the following patch an architecture can maintain
a list of files in the file arch/$(ARCH)/include/asm/Kbuild

To use a generic file just add:

        generic-y += <name-of-header-file.h>

For each file listed kbuild will generate the necessary
wrapper in arch/$(ARCH)/include/generated/asm.

When installing userspace headers a wrapper is likewise created.

The original inspiration for this came from the unicore32
patchset - although a different method is used.

The patch includes several improvements from Arnd Bergmann.
Michael Marek contributed Makefile.asm-generic.

Remis Baima did an intial implementation along to achive
the same - see https://patchwork.kernel.org/patch/13352/

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>
Tested-by: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: implement several W= levels
Sam Ravnborg [Wed, 27 Apr 2011 20:15:27 +0000 (22:15 +0200)]
kbuild: implement several W= levels

Building a kernel with "make W=1" produces far too much noise to be
useful.

Divide the warning options in three groups:

    W=1 - warnings that may be relevant and does not occur too often
    W=2 - warnings that occur quite often but may still be relevant
    W=3 - the more obscure warnings, can most likely be ignored

When building the whole kernel, those levels produce:

W=1 - 4859 warnings
W=2 - 1394 warnings
W=3 - 86666 warnings

respectively. Warnings have been counted with Geert's script at

http://www.kernel.org/pub/linux/kernel/people/geert/linux-log/linux-log-summary.pl

Many warnings occur from .h files so fixing one file may have a nice
effect on the total number of warnings.

With these changes I am actually tempted to try W=1 now and then.
Previously there was just too much noise.

Borislav:

- make the W= levels exclusive
- move very noisy and making little sense for the kernel warnings to W=3
- drop -Woverlength-strings due to useless warning message
- copy explanatory text for the different warning levels to 'make help'
- recount warnings per level

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Borislav Petkov <bp@alien8.de>
Cc: Dave Jones <davej@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Wed, 20 Apr 2011 22:27:50 +0000 (22:27 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: Fix build with binutils <= 2.19
Michal Marek [Wed, 20 Apr 2011 11:45:30 +0000 (13:45 +0200)]
kbuild: Fix build with binutils <= 2.19

The D option of ar is only available in newer versions.

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Tue, 19 Apr 2011 07:23:29 +0000 (07:23 +0000)]
Merge branch 'kconfig' into for-next

14 years agonconfig: Silence unused return values from wattrset
Stephen Boyd [Wed, 6 Apr 2011 22:07:49 +0000 (15:07 -0700)]
nconfig: Silence unused return values from wattrset

Ignore the return value from wattrset since we ignore the return
value in nconf.gui.c as well.

scripts/kconfig/nconf.c: In function 'print_function_line':
scripts/kconfig/nconf.c:376: warning: value computed is not used
scripts/kconfig/nconf.c:380: warning: value computed is not used
scripts/kconfig/nconf.c:387: warning: value computed is not used
scripts/kconfig/nconf.c: In function 'show_menu':
scripts/kconfig/nconf.c:956: warning: value computed is not used
scripts/kconfig/nconf.c:961: warning: value computed is not used
scripts/kconfig/nconf.c:963: warning: value computed is not used
scripts/kconfig/nconf.c:965: warning: value computed is not used

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'trivial' into for-next
Michal Marek [Mon, 18 Apr 2011 22:23:55 +0000 (22:23 +0000)]
Merge branch 'trivial' into for-next

14 years agopmcraid: Drop __DATE__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
pmcraid: Drop __DATE__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Cc: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoedac: Drop __DATE__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
edac: Drop __DATE__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Cc: Doug Thompson <dougthompson@xmission.com>
Cc: bluesmoke-devel@lists.sourceforge.net
Cc: linux-edac@vger.kernel.org
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agorio: Drop __DATE__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
rio: Drop __DATE__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time. As the buildDate field is part of the userspace API, I replaced it
with the date of the last code change.

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoscsi/wd33c93: Drop __TIME__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
scsi/wd33c93: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoscsi/in2000: Drop __TIME__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
scsi/in2000: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoaacraid: Drop __TIME__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
aacraid: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Cc: Adaptec OEM Raid Solutions <aacraid@adaptec.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agomedia/cx231xx: Drop __TIME__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
media/cx231xx: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agomedia/radio-maxiradio: Drop __TIME__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
media/radio-maxiradio: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agonozomi: Drop __TIME__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
nozomi: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agocyclades: Drop __TIME__ usage
Michal Marek [Fri, 1 Apr 2011 10:41:20 +0000 (12:41 +0200)]
cyclades: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Mon, 18 Apr 2011 13:03:20 +0000 (13:03 +0000)]
Merge branch 'kconfig' into for-next

14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Mon, 18 Apr 2011 13:03:18 +0000 (13:03 +0000)]
Merge branch 'kbuild' into for-next

14 years agoinitramfs: Use KBUILD_BUILD_TIMESTAMP for generated entries
Michal Marek [Thu, 31 Mar 2011 21:16:42 +0000 (23:16 +0200)]
initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entries

gen_init_cpio gets the current time and uses it for each symlink,
special file, and directory.  Grab the current time once and make it
possible to override it with the KBUILD_BUILD_TIMESTAMP variable for
reproducible builds.

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: Allow to override LINUX_COMPILE_BY and LINUX_COMPILE_HOST macros
Michal Marek [Tue, 5 Apr 2011 12:32:30 +0000 (14:32 +0200)]
kbuild: Allow to override LINUX_COMPILE_BY and LINUX_COMPILE_HOST macros

Make it possible to override the user@host string displayed during boot
and in /proc/version by the environment variables KBUILD_BUILD_USER and
KBUILD_BUILD_HOST. Several distributions patch scripts/mkcompile_h to
achieve this, so let's provide an official way. Also, document the
KBUILD_BUILD_TIMESTAMP variable while at it.

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: Drop unused LINUX_COMPILE_TIME and LINUX_COMPILE_DOMAIN macros
Michal Marek [Thu, 31 Mar 2011 15:13:55 +0000 (17:13 +0200)]
kbuild: Drop unused LINUX_COMPILE_TIME and LINUX_COMPILE_DOMAIN macros

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: Use the deterministic mode of ar
Michal Marek [Thu, 31 Mar 2011 14:09:47 +0000 (16:09 +0200)]
kbuild: Use the deterministic mode of ar

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: Call gzip with -n
Michal Marek [Thu, 31 Mar 2011 13:47:55 +0000 (15:47 +0200)]
kbuild: Call gzip with -n

The timestamps recorded in the .gz files add no value.

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: Do not record timestamp in auto.conf and autoconf.h
Michal Marek [Tue, 28 Apr 2009 13:05:20 +0000 (15:05 +0200)]
kconfig: Do not record timestamp in auto.conf and autoconf.h

Timestamps in file data are useless and there is already one in .config

Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Fri, 15 Apr 2011 14:14:29 +0000 (14:14 +0000)]
Merge branch 'kbuild' into for-next

14 years agokbuild: move KALLSYMS_EXTRA_PASS from Kconfig to Makefile
Artem Bityutskiy [Tue, 5 Apr 2011 10:24:58 +0000 (13:24 +0300)]
kbuild: move KALLSYMS_EXTRA_PASS from Kconfig to Makefile

At the moment we have the CONFIG_KALLSYMS_EXTRA_PASS Kconfig switch,
which users can enable or disable while configuring the kernel. This
option is then used by 'make' to determine whether an extra kallsyms
pass is needed or not.

However, this approach is not nice and confusing, and this patch moves
CONFIG_KALLSYMS_EXTRA_PASS from Kconfig to Makefile instead. The
rationale is below.

1. CONFIG_KALLSYMS_EXTRA_PASS is really about the build time, not
   run-time. There is no real need for it to be in Kconfig. It is
   just an additional work-around which should be used only in rare
   cases, when someone breaks kallsyms, so Kbuild/Makefile is much
   better place for this option.
2. Grepping CONFIG_KALLSYMS_EXTRA_PASS shows that many defconfigs have
   it enabled, probably not because they try to work-around a kallsyms
   bug, but just because the Kconfig help text is confusing and does
   not really make it clear that this option should not be used unless
   except when kallsyms is broken.
3. And since many people have CONFIG_KALLSYMS_EXTRA_PASS enabled in
   their Kconfig, we do might fail to notice kallsyms bugs in time. E.g.,
   many testers use "make allyesconfig" to test builds, which will enable
   CONFIG_KALLSYMS_EXTRA_PASS and kallsyms breakage will not be noticed.

To address that, this patch:

1. Kills CONFIG_KALLSYMS_EXTRA_PASS
2. Changes Makefile so that people can use "make KALLSYMS_EXTRA_PASS=1"
   to enable the extra pass if needed. Additionally, they may define
   KALLSYMS_EXTRA_PASS as an environment variable.
3. By default KALLSYMS_EXTRA_PASS is disabled and if kallsyms has issues,
   "make" should print a warning and suggest using KALLSYMS_EXTRA_PASS

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
[mmarek: Removed make help text, is not necessary]
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoKconfig: improve KALLSYMS_ALL documentation
Artem Bityutskiy [Tue, 5 Apr 2011 10:24:57 +0000 (13:24 +0300)]
Kconfig: improve KALLSYMS_ALL documentation

Dumb users like myself are not able to grasp from the existing KALLSYMS_ALL
documentation that this option is not what they need. Improve the help
message and make it clearer that KALLSYMS is enough in the majority of
use cases, and KALLSYMS_ALL should really be used very rarely.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Fri, 15 Apr 2011 13:33:19 +0000 (13:33 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig: get rid of unused flags
Yann E. MORIN [Thu, 24 Feb 2011 18:36:43 +0000 (19:36 +0100)]
kconfig: get rid of unused flags

Now that we detect recusrion of sourced files, get rid of
now unused flags.

Regenerate lex.zconf.c_shipped file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: allow multiple inclusion of the same file
Yann E. MORIN [Thu, 24 Feb 2011 18:36:42 +0000 (19:36 +0100)]
kconfig: allow multiple inclusion of the same file

Allow 'source'ing the same file from multiple places (eg. from
different files, and/or under different conditions).

To avoid circular inclusion, scan the source-ancestry of the
current file, and abort if already sourced in this branch.

Regenerate the pre-parsed lex.zconf.c_shipped file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kconfig' into for-next
Michal Marek [Fri, 8 Apr 2011 11:20:18 +0000 (11:20 +0000)]
Merge branch 'kconfig' into for-next

14 years agokconfig: Avoid buffer underrun in choice input
Ben Hutchings [Sat, 19 Mar 2011 04:26:10 +0000 (04:26 +0000)]
kconfig: Avoid buffer underrun in choice input

commit 40aee729b350672c2550640622416a855e27938f ('kconfig: fix default
value for choice input') fixed some cases where kconfig would select
the wrong option from a choice with a single valid option and thus
enter an infinite loop.

However, this broke the test for user input of the form 'N?', because
when kconfig selects the single valid option the input is zero-length
and the test will read the byte before the input buffer.  If this
happens to contain '?' (as it will in a mips build on Debian unstable
today) then kconfig again enters an infinite loop.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org [2.6.17+]
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'misc' into for-next
Michal Marek [Mon, 4 Apr 2011 12:59:29 +0000 (12:59 +0000)]
Merge branch 'misc' into for-next

14 years agoeradicate bashisms in scripts/patch-kernel
Andreas Mohr [Sun, 3 Apr 2011 18:58:28 +0000 (20:58 +0200)]
eradicate bashisms in scripts/patch-kernel

Silence a remaining annoying (or worse, irritating - "is my entire patched tree
broken now!?") bashism-related message that occurs when /bin/sh is configured
to instead deploy dash, a POSIX-compliant shell, as is the pretty much
standard case on e.g. Debian.

Current kernel version is 2.6.38 ( Flesh-Eating Bats with Fangs)
===>  linux-2.6.38.patch-kernel_test/scripts/patch-kernel: line 253: [: =: unary operator expected  <===
cannot find patch file: patch-2.6.39

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'kbuild' into for-next
Michal Marek [Thu, 31 Mar 2011 11:58:41 +0000 (11:58 +0000)]
Merge branch 'kbuild' into for-next

14 years agoLinux 2.6.39-rc1 v2.6.39-rc1
Linus Torvalds [Tue, 29 Mar 2011 19:09:47 +0000 (12:09 -0700)]
Linux 2.6.39-rc1

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Linus Torvalds [Tue, 29 Mar 2011 19:09:30 +0000 (12:09 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (26 commits)
  mmc: SDHI should depend on SUPERH || ARCH_SHMOBILE
  mmc: tmio_mmc: Move some defines into a shared header
  mmc: tmio: support aggressive clock gating
  mmc: tmio: fix power-mode interpretation
  mmc: tmio: remove work-around for unmasked SDIO interrupts
  sh: fix SDHI IO address-range
  ARM: mach-shmobile: fix SDHI IO address-range
  mmc: tmio: only access registers above 0xff, if available
  mfd: remove now redundant sh_mobile_sdhi.h header
  sh: convert boards to use linux/mmc/sh_mobile_sdhi.h
  ARM: mach-shmobile: convert boards to use linux/mmc/sh_mobile_sdhi.h
  mmc: tmio: convert the SDHI MMC driver from MFD to a platform driver
  sh: ecovec: use the CONFIG_MMC_TMIO symbols instead of MFD
  mmc: tmio: split core functionality, DMA and MFD glue
  mmc: tmio: use PIO for short transfers
  mmc: tmio-mmc: Improve DMA stability on sh-mobile
  mmc: fix mmc_app_send_scr() for dma transfer
  mmc: sdhci-esdhc: enable esdhc on imx53
  mmc: sdhci-esdhc: use writel/readl as general APIs
  mmc: sdhci: add the abort CMDTYPE bits definition
  ...

14 years agoMerge branch 'frv' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux...
Linus Torvalds [Tue, 29 Mar 2011 18:43:30 +0000 (11:43 -0700)]
Merge branch 'frv' of git://git./linux/kernel/git/dhowells/linux-2.6-frv

* 'frv' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-frv:
  FRV: Use generic show_interrupts()
  FRV: Convert genirq namespace
  frv: Select GENERIC_HARDIRQS_NO_DEPRECATED
  frv: Convert cpu irq_chip to new functions
  frv: Convert mb93493 irq_chip to new functions
  frv: Convert mb93093 irq_chip to new function
  frv: Convert mb93091 irq_chip to new functions
  frv: Fix typo from __do_IRQ overhaul
  frv: Remove stale irq_chip.end
  FRV: Do some cleanups
  FRV: Missing node arg in alloc_thread_info_node() macro
  NOMMU: implement access_remote_vm
  NOMMU: support SMP dynamic percpu_alloc
  NOMMU: percpu should use is_vmalloc_addr().

14 years agoMerge branch 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 29 Mar 2011 18:36:52 +0000 (11:36 -0700)]
Merge branch 'stable/bug-fixes-rc1' of git://git./linux/kernel/git/konrad/xen

* 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen: Use new irq_move functions
  xen: Convert genirq namespace
  xen: fix p2m section mismatches
  xen/p2m: Allocate p2m tracking pages on override
  xen-gntdev: unlock on error path in gntdev_mmap()
  xen-gntdev: return -EFAULT on copy_to_user failure