Commit Graph

1739 Commits

Author SHA1 Message Date
Rabin Vincent cd3478f2bd ARM: 6509/1: ftrace: ignore any ftrace.o in C version of recordmcount
arch/arm/kernel/ftrace.c references mcount like kernel/tracing/ftrace.c,
so change the exclusion filter to match any ftrace.o.

Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-04 11:30:26 +00:00
Julia Lawall a1087ef6ab scripts/coccinelle: update for compatability with Coccinelle 0.2.4
For doubleinit.cocci, Coccinelle 0.2.4 requires a comma after ... in a
field list.  Coccinelle also now behaves gracefully when a definition is
provided for a virtual that doesn't exist, so there is no need for the
semantic patch code to check for this case.

Updated the documentation to reflect the fact that the best results will
now be obtained with Coccinelle version 0.2.4 or later.

Signed-off-by: Julia Lawall <julia@diku.dk>
2010-12-03 12:27:01 +01:00
John Reiser e63233f75a ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO
It looks to me like the change which introduced "virtual functions"
forgot about cross-platform endianness.

Thank you to Arnaud for supplying before+after data files do_mounts*.o.

This fixes a MIPS build failure triggered by recordmcount.

Reported-by: Arnaud Lacombe <lacombar@gmail.com>
Tested-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John Reiser <jreiser@BitWagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-12-02 10:37:48 -05:00
Peter Zijlstra 15664125f7 scripts/tags.sh: Add magic for trace-events
Make tags find the trace-event definitions

Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1290591835.2072.438.camel@laptop>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-12-02 09:39:48 -05:00
Uwe Kleine-König 0a18a9386c tags: put function prototypes back!
Commit 7db86dc (ctags: usability fix) removed function prototypes from
tags file claiming "It makes no real sense to include function
prototypes".
But it is useful for quickly determining which header file developer
needs to include to fix compilation.

Now if someone wants to remove forward declarations (which I agree are
baggage), write a postprocessing script.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-02 12:46:18 +01:00
Arnaud Lacombe 01660dfc37 scripts/genksyms: fix header usage
FreeBSD does not like <malloc.h> when __STDC__ is defined, use the standard
<stdlib.h> instead.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 16:25:06 +01:00
Andi Kleen 45f53cc90e Kconfig: fix single letter command in scripts/config
The one letter commands in scripts/config didn't work and always
printed usage. Fix this here.

Cc: erick@openchill.org
Reported-by: erick@openchill.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 15:51:42 +01:00
Américo Wang 6e5b86924a gitignore: add scripts/recordmcount
This file is generated, should be ignored by git.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 15:49:50 +01:00
Asbjoern Sloth Toennesen 10f26fa642 kbuild, deb-pkg: select userland architecture based on UTS_MACHINE
Instead of creating the debian package for the compiling userland,
create it for a userland matching the kernel thats being compiled.

This patch supports all Lenny release architectures,
and Linux-based architecture candidates for Squeeze.

If it can't find a proper Debian userspace it displays a warning,
and fallback to let deb-gencontrol use the host's userspace arch.

Eg. with this patch the following make command:

	make ARCH=i386 deb-pkg

will output an i386 Debian package instead of an amd64 one,
when run on an amd64 machine.

Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 15:32:05 +01:00
Mel Gorman 27af038494 scripts: fix gfp-translate for recent changes to gfp.h
The recent changes to gfp.h to satisfy sparse broke scripts/gfp-translate.
This patch fixes it up to work with old and new versions of gfp.h .

[akpm@linux-foundation.org: use `grep -q', per WANG Cong]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Namhyung Kim <namhyung@gmail.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-25 06:50:49 +09:00
Arnaud Lacombe 09899c93b1 kconfig: regen parser
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-22 11:27:32 -02:00
Arnaud Lacombe 86e187ff9b kconfig: add an option to determine a menu's visibility
This option is aimed to add the possibility to control a menu's visibility
without adding dependency to the expression to all the submenu.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-22 11:27:17 -02:00
Randy Dunlap 2b35f4d9ca kernel-doc: escape xml for structs
scripts/kernel-doc was leaving unescaped '<', '>', and '&' in
generated xml output for structs.  This causes xml parser errors.
Convert these characters to "&lt;", "&gt;", and "&amp;" as needed
to prevent errors.

Most of the conversion was already done; complete it just before
output.

Documentation/DocBook/device-drivers.xml:41883: parser error : StartTag: invalid element name
#define INPUT_KEYMAP_BY_INDEX	(1 << 0)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-18 15:00:46 -08:00
Wu Zhangjin 45677454dd ftrace: Speed up recordmcount
cmd_record_mcount is used to locate the _mcount symbols in the object
files, only the files compiled with -pg has the _mcount symbol, so, it
is only needed for such files, but the current cmd_record_mcount is used
for all of the object files, so, we need to fix it and speed it up.

Since -pg may be removed by the method used in kernel/trace/Makefile:

ORIG_CFLAGS := $(KBUILD_CFLAGS)
KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))

Or may be removed by the method used in arch/x86/kernel/Makefile:

CFLAGS_REMOVE_file.o = -pg

So, we must check the last variable stores the compiling flags, that is
c_flags(Please refer to cmd_cc_o_c and rule_cc_o_c defined in
scripts/Makefile.build) and since the CFLAGS_REMOVE_file.o is already
filtered in _c_flags(Please refer to scripts/Makefile.lib) and _c_flags
has less symbols, therefore, we only need to check _c_flags.

---------------
Changes from v1:

  o Don't touch Makefile for CONFIG_FTRACE_MCOUNT_RECORD is enough
  o Use _c_flags intead of KBUILD_CFLAGS to cover CONFIG_REMOVE_file.o = -pg
  (feedback from Steven Rostedt <rostedt@goodmis.org>)

Acked-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
LKML-Reference: <3dc8cddf022eb7024f9f2cf857529a15bee8999a.1288196498.git.wuzhangjin@gmail.com>

[ changed if [ .. == .. ] to if [ .. = .. ] to handle dash environments ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-11-18 17:16:05 -05:00
Eric Dumazet 8af27e1dc4 fixdep: use hash table instead of a single array
I noticed fixdep uses ~2% of cpu time in kernel build, in function
use_config()

fixdep spends a lot of cpu cycles in linear searches in its internal
string array. With about 400 stored strings per dep file, this begins to
be noticeable.

Convert fixdep to use a hash table.

kbuild results on my x86_64 allmodconfig

Before patch :

real	10m30.414s
user	61m51.456s
sys	8m28.200s

real	10m12.334s
user	61m50.236s
sys	8m30.448s

real	10m42.947s
user	61m50.028s
sys	8m32.380s

After:

real	10m8.180s
user	61m22.506s
sys	8m32.384s

real	10m35.039s
user	61m21.654s
sys	8m32.212s

real	10m14.487s
user	61m23.498s
sys	8m32.312s

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-11 17:12:06 +01:00
maximilian attems e86c2412c8 kbuild, deb-pkg: Fix build with paranoid umask
umask 077
make deb-pkg
<snipp ..>
dpkg-deb: building package `linux-image-2.6.36+' in `../linux-image-2.6.36+_2.6.36+-4_amd64.deb'.
dpkg-deb: control directory has bad permissions 700 (must be >=0755 and <=0775)
make[1]: *** [deb-pkg] Error 2

Reported-by: Bastian Blank <waldi@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-11 16:32:43 +01:00
Andy Whitcroft 020e773f6b kconfig: sym_expand_string_value: allow for string termination when reallocing
When expanding a parameterised string we may run out of space, this
triggers a realloc.  When computing the new allocation size we do not
allow for the terminating '\0'.  Allow for this when calculating the new
length.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-01 17:06:00 -04:00
Uwe Kleine-König b595076a18 tree-wide: fix comment/printk typos
"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-01 15:38:34 -04:00
Linus Torvalds 82279e6bd7 Merge branches 'irq-core-for-linus' and 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Fix up irq_node() for irq_data changes.
  genirq: Add single IRQ reservation helper
  genirq: Warn if enable_irq is called before irq is set up

* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  semaphore: Remove mutex emulation
  staging: Final semaphore cleanup
  jbd2: Convert jbd2_slab_create_sem to mutex
  hpfs: Convert sbi->hpfs_creation_de to mutex

Fix up trivial change/delete conflicts with deleted 'dream' drivers
(drivers/staging/dream/camera/{mt9d112.c,mt9p012_fox.c,mt9t013.c,s5k3e2fx.c})
2010-10-31 20:40:24 -04:00
Thomas Gleixner 4882720b26 semaphore: Remove mutex emulation
Semaphores used as mutexes have been deprecated for years. Now that
all users are either converted to real semaphores or to mutexes remove
the cruft.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
LKML-Reference: <20100907125057.562399240@linutronix.de>
2010-10-30 12:12:50 +02:00
Linus Torvalds b7bdcc4711 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
  kconfig: Have streamline_config process menuconfigs too
  kconfig: Fix streamline_config to read multi line deps in Kconfig files
  kconfig: Fix missing declaration of variable $dir in streamline_config.pl
  kconfig: Fix variable name typo %prompts in streamline_config.pl
  kconfig: Make localmodconfig handle environment variables
2010-10-29 14:43:30 -07:00
Wu Zhangjin 412910cd04 ftrace/MIPS: Add module support for C version of recordmcount
Since MIPS modules' address space differs from the core kernel space, to access
the _mcount in the core kernel, the kernel functions in modules must use long
call (-mlong-calls): load the _mcount address into one register and jump to the
address stored by the register:

 c:  3c030000        lui     v1,0x0  <-------->  b label
           c: R_MIPS_HI16  _mcount
           c: R_MIPS_NONE  *ABS*
           c: R_MIPS_NONE  *ABS*
10:  64630000        daddiu  v1,v1,0
          10: R_MIPS_LO16 _mcount
          10: R_MIPS_NONE *ABS*
          10: R_MIPS_NONE *ABS*
14:	03e0082d 	move	at,ra
18:	0060f809 	jalr	v1
label:

In the old Perl version of recordmcount, we only need to record the position of
the 1st R_MIPS_HI16 type of _mcount, and later, in ftrace_make_nop(), replace
the instruction in this position by a "b label" and in ftrace_make_call(),
replace it back.

But, the default C version of recordmcount records all of the _mcount symbols,
so, we must filter the 2nd _mcount like the Perl version of recordmcount does.

The C version of recordmcount copes with the symbols before they are linked, So
It doesn't know the type of the symbols and therefore can not filter the
symbols as the Perl version of recordmcount does. But as we can see above, the
2nd _mcount symbols of the long call alawys follows the 1st _mcount symbol of
the same long call, which means the offset from the 1st to the 2nd is fixed, it
is 0x10-0xc = 4 here, 4 is the length of the 1st load instruciton, for MIPS has
fixed length of instructions, this offset is always 4.

And as we know, the _mcount is inserted into the entry of every kernel
function, the offset between the other _mcount's is expected to be always
bigger than 4. So, to filter the 2ns _mcount symbol of the long call, we can
simply check the offset between two _mcount symbols, If it is 4, then, filter
the 2nd _mcount symbol.

To avoid touching too much code, an 'empty' function fn_is_fake_mcount() is
added for all of the archs, and the specific archs can override it via chaning
the function pointer: is_fake_mcount in do_file() with the e_machine. e.g. This
patch adds MIPS_is_fake_mcount() to override the default fn_is_fake_mcount()
pointed by is_fake_mcount.

This fn_is_fake_mcount() checks if the _mcount symbol is fake, e.g. the 2nd
_mcount symbol of the long call is fake, for there are 2 _mcount symbols mapped
to one real mcount call, so, one of them is fake and must be filtered.

This fn_is_fake_mcount() is called in sift_rel_mcount() after finding the
_mcount symbols and before adding the _mcount symbol into mrelp, so, it can
prevent the fake mcount symbol going into the last __mcount_loc table.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
LKML-Reference: <b866f0138224340a132d31861fa3f9300dee30ac.1288176026.git.wuzhangjin@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-10-29 19:08:55 +01:00
John Reiser a2d49358ba ftrace/MIPS: Add MIPS64 support for C version of recordmcount
MIPS64 has 'weird' Elf64_Rel.r_info[1,2], which must be used instead of
the generic Elf64_Rel.r_info, otherwise, the C version of recordmcount
will not work for "segmentation fault".

Usage of "union mips_r_info" and the functions MIPS64_r_sym() and
MIPS64_r_info() written by Maciej W. Rozycki <macro@linux-mips.org>

----
[1] http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
[2] arch/mips/include/asm/module.h

Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: John Reiser <jreiser@BitWagon.com>
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
LKML-Reference: <AANLkTinwXjLAYACUfhLYaocHD_vBbiErLN3NjwN8JqSy@mail.gmail.com>
LKML-Reference: <910dc2d5ae1ed042df4f96815fe4a433078d1c2a.1288176026.git.wuzhangjin@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-10-29 19:08:54 +01:00
Steven Rostedt 8ef17fa2ef kconfig: Have streamline_config process menuconfigs too
Some menuconfigs in the Kconfig files have prompts and dependencies.
Currently, streamline_config misses these, and this can cause
streamline_config to keep modules enabled that should not be, and
even worse, not enable those that should.

This patch makes streamline_config process menuconfigs just like it
would process a config.

Reported-by: member graysky <graysky@archlinux.us>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29 01:07:23 -04:00
Steven Rostedt 20d1904733 kconfig: Fix streamline_config to read multi line deps in Kconfig files
I noticed that some Kconfig files have multi line dependencies
that continue with a backslash. Those dependencies on the next
line will be missed by streamline_config.

For example:

config CS89x0
	tristate "CS89x0 support"
	depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \
		|| ARCH_IXDP2X01 || MACH_MX31ADS)

The "|| ARCH_IXDP2X01 || MACH_MX31ADS)" will not be processed.

This patch adds code to handle this case.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29 01:07:10 -04:00
hiromu cf5a189d4a kconfig: Fix missing declaration of variable $dir in streamline_config.pl
On Fri, Aug 17, 2010 at 01:43PM +0800, Américo Wang wrote:
> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
>
> BTW, I think we should add "use strict;" too.

Then I added "use strict;" to streamline_config.pl, I saw another
warning.

> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 286.
> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 287.
> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 288.

Then I added "my $dir;" to line 285.

Cc: Américo Wang <xiyou.wangcong@gmail.com>
Cc: Toralf Foerster <toralf.foerster@gmx.de>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hiromu Yakura <hiromu1996@gmail.com>
LKML-Reference: <1282042158.7160.9.camel@hiromu-Macbook>

[ changed to just add my in front of $dir instead of new line ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29 01:04:16 -04:00
hiromu yagura ccece60ac6 kconfig: Fix variable name typo %prompts in streamline_config.pl
When I added "use strict;" to streamline_config.pl, I saw the following
warnings:

> Global symbol "%prompt" requires explicit package name at
scripts/kconfig/streamline_config.pl line 183.
> Global symbol "%prompt" requires explicit package name at
scripts/kconfig/streamline_config.pl line 368.

The declaration of %prompt was incorrect, and should have been %prompts.

Cc: Toralf Foerster <toralf.foerster@gmx.de>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hiromu Yakura <hiromu1996@gmail.com>
LKML-Reference: <1281845597.11566.5.camel@camp10-laptop>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29 01:04:14 -04:00
Steven Rostedt 4908980b24 kconfig: Make localmodconfig handle environment variables
The commit 838a2e55e6
 kbuild: migrate all arch to the kconfig mainmenu upgrade

Broke make localmodconfig. The reason was that it added a
environment variable to the kconfig source, which the
streamline_config.pl could not handle.

This patch changes streamline_config.pl to handle kconfig sources
using environment variables in their names.

Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29 01:03:42 -04:00
Linus Torvalds 2301b65b86 Merge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  scripts/package: don't break if %{_smp_mflags} isn't set
  kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it
2010-10-28 16:19:38 -07:00
Linus Torvalds e596c79050 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (39 commits)
  Revert "namespace: add source file location exceptions"
  Coccinelle: Add contextual message
  Coccinelle: Fix documentation
  Coccinelle: Find doubled arguments to boolean or bit operators.
  Coccinelle: Find nested lock+irqsave functions that use the same flags variables.
  namespace: add source file location exceptions
  scripts/extract-ikconfig: add support for bzip2, lzma and lzo
  kbuild: check return value of asprintf()
  scripts/namespace.pl: improve to get more correct results
  scripts/namespace.pl: some bug fixes
  scripts/namespace.pl: update file exclusion list
  scripts/namespace.pl: fix wrong source path
  Coccinelle: Use the -no_show_diff option for org and report mode
  Coccinelle: Add a new mode named 'chain'
  Coccinelle: Use new comment format to explain kfree.cocci
  Coccinelle: Improve user information with a new kind of comment
  Coccinelle: Update documentation
  MAINTAINERS: Coccinelle: Update email address
  Documentation/kbuild: modules.txt cleanup
  Documentation/kbuild: major edit of modules.txt sections 5-8
  ...
2010-10-28 16:18:59 -07:00
Linus Torvalds 51399a3919 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (38 commits)
  kbuild: convert `arch/tile' to the kconfig mainmenu upgrade
  README: cite nconfig
  Revert "kconfig: Temporarily disable dependency warnings"
  kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
  kconfig: Fix realloc usage()
  kconfig: Propagate const
  kconfig: Don't go out from read config loop when you read new symbol
  kconfig: fix menuconfig on debian lenny
  kbuild: migrate all arch to the kconfig mainmenu upgrade
  kconfig: expand file names
  kconfig: use the file's name of sourced file
  kconfig: constify file name
  kconfig: don't emit warning upon rootmenu's prompt redefinition
  kconfig: replace KERNELVERSION usage by the mainmenu's prompt
  kconfig: delay gconf window initialization
  kconfig: expand by default the rootmenu's prompt
  kconfig: add a symbol string expansion helper
  kconfig: regen parser
  kconfig: implement the `mainmenu' directive
  kconfig: allow PACKAGE to be defined on the compiler's command-line
  ...

Fix up trivial conflict in arch/mn10300/Kconfig
2010-10-28 16:16:39 -07:00
Linus Torvalds c9e2a72ff1 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  initramfs: Fix build break on symbol-prefixed archs
  initramfs: fix initramfs size calculation
  initramfs: generalize initramfs_data.xxx.S variants
  scripts/kallsyms: Enable error messages while hush up unnecessary warnings
  scripts/setlocalversion: update comment
  kbuild: Use a single clean rule for kernel and external modules
  kbuild: Do not run make clean in $(srctree)
  scripts/mod/modpost.c: fix commentary accordingly to last changes
  kbuild: Really don't clean bounds.h and asm-offsets.h
2010-10-28 15:13:55 -07:00
Mike Frysinger d63f6d1b4d initramfs: Fix build break on symbol-prefixed archs
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 23:21:19 +02:00
Michal Marek 9231d9e02a Revert "namespace: add source file location exceptions"
This reverts commit 24a54f7974.

Stephen Hemminger <shemminger@vyatta.com> writes:
> That patch should not be included. It causes more problems than it
> solves, since then there are duplicate file locations which causes
> false duplicate symbol reports.

Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:59:56 +02:00
Michal Marek 70c74e59db Merge branch 'message-callback' into kbuild/kconfig
Conflicts:
	scripts/kconfig/nconf.c
2010-10-28 00:54:25 +02:00
Nicolas Palix 062c1825a5 Coccinelle: Add contextual message
Change the message displayed to the user according
to the current mode used.

Fix trailing white-space and spelling

Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:32:23 +02:00
Julia Lawall 97c1cf8fdb Coccinelle: Find doubled arguments to boolean or bit operators.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:32:23 +02:00
Julia Lawall 10247179a7 Coccinelle: Find nested lock+irqsave functions that use the same flags variables.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:32:22 +02:00
Stephen Hemminger 24a54f7974 namespace: add source file location exceptions
Teach namespace checker about some special case files where the
source is in unusual location.  This fixes many of the source file
not found errors (more can be added), and also prevents false positives
for functions not being used.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:29:48 +02:00
Dick Streefland 532cf2907a scripts/extract-ikconfig: add support for bzip2, lzma and lzo
Add support for kernels compressed with bzip2, lzma or lzo to the
extract-ikconfig script.

Fixes kernel bugzilla #19852:
https://bugzilla.kernel.org/show_bug.cgi?id=19852

Signed-off-by: Dick Streefland <dick@streefland.net>
Tested-by: Justin <jlec@gentoo.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:22:17 +02:00
Namhyung Kim d0f95c7826 kbuild: check return value of asprintf()
Check return value of asprintf() in docsect() and exit if error
occurs. This removes following warning:

  HOSTCC  scripts/basic/docproc
scripts/basic/docproc.c: In function ‘docsect’:
scripts/basic/docproc.c:336: warning: ignoring return value of ‘asprintf’,
				declared with attribute warn_unused_result

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:17:16 +02:00
Michal Marek b74b953b99 Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c
(commit eda603f).
2010-10-28 00:15:57 +02:00
Amerigo Wang abb4385262 scripts/namespace.pl: improve to get more correct results
Exclude more symbols from arch/x86/vdso/ and arch/x86/boot/; add some more
linker-defined symbols into exception list; add other cond_syscalls
besides "sys_*".

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:07:46 +02:00
Amerigo Wang e8cf981346 scripts/namespace.pl: some bug fixes
1. Teach namespace.pl to understand "V" and "v"
2. cond_syscalls are moved into kernel/sys_ni.c

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:07:46 +02:00
Stephen Hemminger 43f683c9e4 scripts/namespace.pl: update file exclusion list
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:07:45 +02:00
Amerigo Wang c25f415751 scripts/namespace.pl: fix wrong source path
File::Find will do chdir automatically, so we need to get the absolute
patch with $File::Find::dir.

Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:07:45 +02:00
Joe Perches 93ed0e2d07 scripts/checkpatch.pl: add check for declaration of pci_device_id
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:21 -07:00
Joe Perches cb710eca68 scripts/checkpatch.pl: add warnings for static char that could be static const char
Add warnings for possible missing const uses of
	static char foo[] = "bar"
    that could be
	static const char foo[] = "bar"
and
	static const char *foo[] = {"bar", "baz"}
    that could be
	static const char * const foo[] = {"bar", "baz"}

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:21 -07:00
Andy Whitcroft 267ad8f426 checkpatch: version 0.31
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:21 -07:00
Andy Whitcroft 01464f30a9 checkpatch: statement/block context analyser should look at sanitised lines
When tracking context to find a block or statement we need to use the
sanitised lines, else perentheses '(' & ')' and braces '{' & '}' can throw
the scanner out.  Also fix up a couple of error outputs which include
those sanitised lines incorrectly.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:21 -07:00
Andy Whitcroft 3cbf62df3a checkpatch: handle EXPORT_SYMBOL for DEVICE_ATTR and similar
Handly definitions similar to below.  The definition macro spits out a
symbol with a prefix.  Add matching of any identifier prefix:

    DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
            ata_scsi_lpm_show, ata_scsi_lpm_put);
    EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:21 -07:00
Andy Whitcroft 5eaa20b984 checkpatch: clean up structure definition macro handline
Handle definitions such as the following correctly, it is not
a complex statement:

    #define PREALLOC(NAME, START, END, FLAGS) {     \
		    .name = (NAME),                 \
		    .start = (START),               \
		    .end = (END),                   \
		    .flags = (FLAGS)                \
	    },

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Andy Whitcroft 015830be97 checkpatch: update copyright dates
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Joe Perches 03f1df7da5 checkpatch: Add additional attribute #defines
On Wed, 2010-08-11 at 12:35 -0400, Dave Jones wrote:
> I just got this from a patch I merged..
>
> ERROR: need consistent spacing around '*' (ctx:WxV)
> #121: FILE: arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c:113:
> +static struct pcc_cpu __percpu *pcc_cpu_info;
>                                 ^
> which doesn't seem right.

Perhaps these need to be added to checkpatch.

[apw@canonical.com: added tests]
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Rabin Vincent 3bf9a009fc checkpatch: check for incorrect permissions
Throw an error when a source file has been given execute permissions using
the mode change line present in git diffs.  Also alow the filename
matching to use the "diff" line in addition to the "+++" line, since the
mode change lines appear before any "+++" lines.

[apw@canonical.com: simplified filename logic slightly, added tests]
Cc: Andy Whitcroft <apw@canonical.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Andy Whitcroft 9fe287d79b checkpatch: ensure kconfig help checks only apply when we are adding help
When checking the length of the help we need to be sure we are seeing the
whole story before erroring.  Firstly we only want to check when adding
the help in the first place.  Second we need to be sure that we are seeing
the end of the entry, nominally when there is no context below or that
context shows the start of the next entry.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Andy Whitcroft 0c73b4eb7a checkpatch: simplify and consolidate "missing space after" checks
Commonise the code for missing spaces after struct, union, and enum such
that they share the same code.  Ensure we cover all the common cases in
each case.  Check against the sanitised line to ensure we do not report on
comments and strings.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Andy Whitcroft 8cf6de7145 checkpatch: add check for space after struct, union, and enum
Add spacing checks for struct, union, and enum definitions.  Check the
spacing after type and before the equals (=) and open brace ({).

Based on a patch by Joe Perches.

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Andy Whitcroft 53a3c4487a checkpatch: returning errno typically should be negative
Add a (strict mode only) test to check for non-negative returns of what
appear to be errno values as the majority case these should indeed be
negative.

Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Andy Whitcroft 9446ef569c checkpatch: handle casts better fixing false categorisation of : as binary
The following incantation is triggering categorisation of its colon (:) as
a binary form, which it is not:

	return foo ? (s8)bar : baz;

Handle casts differently from types in the categoriser, allowing us to
better track (s8)bar as a value and not a declaration.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:20 -07:00
Andy Whitcroft fb2d2c1b58 checkpatch: ensure we do not collapse bracketed sections into constants
When determining if a return () sequence is a function style bracketing we
simplify the expression one bracket at a time replacing each with a
constant.  However this can trigger a false merge with expressions as
below:

	return (foo)0;

Prevent this false merging.

Reported-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:19 -07:00
Andy Whitcroft d2c0a23514 checkpatch: suggest cleanpatch and cleanfile when appropriate
When we hit types of whitespace which may be fixed by scripts/cleanpatch
and scripts/cleanfile suggest their use in our report.

Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:19 -07:00
Andy Whitcroft e91b6e263e checkpatch: types may sit on a line on their own
When the following form is used we have a type which fully fills a line.
This means that a type may end at the end of line as well as at the
following identifier.

	int **
	foo;

Reported-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:19 -07:00
Andy Whitcroft 6b4c5bebce checkpatch: fix regressions in "fix handling of leading spaces"
The patch "checkpatch: fix handling of leading spaces" added checks for
leading spaces on lines, but this introduces regressions.  Firstly it does
not correctly detect when we are in a comment.  Secondly it does not allow
for preprocessor command spacing.  Finally it does not allow for label
indentation which is required to be less than one tab.  Fix these up:

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:19 -07:00
Joe Perches fae9920676 scripts/get_maintainer.pl: don't deduplicate unnamed addresses ie: mailing lists
Fix a defect with the first mailing list address being used for each
subsequent mailing list.

Updated to 0.26-beta6.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches b9e2331dd1 scripts/get_maintainer.pl: use mailmap in name deduplication and other updates
Use Florian Mickler's mailmap routine to reduce name duplication.

o Add subroutine deduplicate_email to centralize code
o Add hashes for deduplicate_(name|address)_hash
o Remove now unused @interactive_to
o Whitespace neatening
o Add command line --help text
o Add --mailmap command line option control
o Interactive changes:
   - Add toggles for maintainer, git and list selections
   - Default selection is all
   - Add mailmap control

Update to 0.26-beta5

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches 47abc72257 scripts/get_maintainer.pl: correct indentation in a few places
And a miscellaneous conversion of You to you in a help message

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Florian Mickler 7fa8ff2e0c scripts/get_maintainer.pl: fix mailmap handling
Implement it, like it is described in git-shortlog.

Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches 6ef1c52e12 scripts/get_maintainer.pl: use case insensitive name de-duplication
Case insensitive name and email address matching can help reduce
duplication when authors don't always use the exact same signature.

o Add a --interactive per-file exact_match hash so git history
  can be checked on per-file only when there is no direct maintainer
o Make @interactive_to list global so save_commits_by_<foo> can check
  email names & addresses against this list for duplication
o Don't allow --interactive and --sections
o rename subroutine get_maintainer to get_maintainers
o Added help text option to --interactive menu prompt

Update version to 0.26-beta4

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches 683c6f8fcb scripts/get_maintainer.pl: improve --interactive UI
o Added searching by git-blame as well as git-history
o Added different selection toggles
o Added ability to list commits by author or by sign-off-type
o Use custom git and hg formats to make searching for subject/author
  a bit easier.
o Move inlined section matching and searching git/hg history to
  new get_maintainer subroutine
o Added subroutines save_commits_by_author and save_commits_by_signer
o Removed subroutines vcs_get_shortlog and vcs_email_shortlog
o Rename camelcase signaturePattern to signature_pattern

Update to 0.26 beta3

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Florian Mickler dace8e300d scripts/get_maintainer.pl: add interactive mode
This is a first version of an interactive mode for
scripts/get_maintainer.pl.

It allows the user to interact with the script.  Each cc candidate can be
selected and deselected and a shortlog of authored commits can be
displayed for each candidate.

The menu is displayed via STDERR, the end result is outputted to STDOUT.
This unusual mechanism allows using get_maintainer.pl in interactive mode
via git send-email --cc-cmd.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches bcde44ed7d scripts/get_maintainer.pl: use .get_maintainer.conf from . then $HOME then scripts
On Mon, 2010-09-13 at 00:01 -0400, Valdis.Kletnieks@vt.edu wrote:
> Any chance of getting that to be ~/.get_maintainer.conf rather than
> ./.get_maintainer.conf? I've just gotten bit like the 3rd or 4th time by
> "oh but you didn't create that file in *this* tree"
> (I usually have a linus git tree, a linux-next tree, and 3-4 -mm trees)

Sure.

Add a search path for the .conf file.

3 paths are added:

.             customized per-tree configurations
$HOME         user global configuration when per-tree configs don't exist
./scripts     lk defaults to override script

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches e3e9d11479 scripts/get_maintainer.pl: add default --git-fallback, remove default --git
Adding commit signers when there is a listed MAINTAINER for a file
can make the output list longer than necessary.

Change the --git default from on to off.

Add a new --git-fallback option (default on) used to add commit signers
only when there is no MAINTAINER for a file.

git history is used when --git-fallback is enabled and the pattern
directory depth is not the same as the file directory depth.

For instance:

X86 ARCHITECTURE (32-BIT AND 64-BIT)
M:	Thomas Gleixner <tglx@linutronix.de>
M:	Ingo Molnar <mingo@redhat.com>
M:	"H. Peter Anvin" <hpa@zytor.com>
M:	x86@kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
S:	Maintained
F:	Documentation/x86/
F:	arch/x86/

If using "./scripts/get_maintainer -f arch/x86/lib/atomic64_32.c", the pattern
for "arch/x86/" does not match the directory depth of "arch/x86/lib"
so the MAINTAINERS entries and git history is used to produce:

$ ./scripts/get_maintainer.pl -f --rolestats arch/x86/lib/atomic64_32.c
Thomas Gleixner <tglx@linutronix.de> (maintainer:X86 ARCHITECTURE...)
Ingo Molnar <mingo@redhat.com> (maintainer:X86 ARCHITECTURE...)
"H. Peter Anvin" <hpa@zytor.com> (maintainer:X86 ARCHITECTURE...,commit_signer:1/1=100%)
x86@kernel.org (maintainer:X86 ARCHITECTURE...)
Luca Barbieri <luca@luca-barbieri.com> (commit_signer:1/1=100%)
linux-kernel@vger.kernel.org (open list)

Luca Barbieri is added because he signed the only commit to
arch/x86/lib/atomic64_32.c during the last year and he meets the
other default qualifications.
	--git-min-percent (default:10)
	--git-min-signatures (default:1)

If current users of ./scripts/get_maintainers.pl have scripts
that use --nogit that expect git history to be excluded, those
scripts should be updated to include --nogit-fallback or a
.get_maintainer.conf file should be created with --nogit-fallback.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches fab9ed12fc scripts/get_maintainer.pl: don't search MAINTAINERS for keywords or emails
Keyword matching uses K: patterns from MAINTAINERS, so if looking for the
MAINTAINERS maintainer, don't search MAINTAINERS for pattern matches.
MAINTAINERS also has rather a lot of email addresses and is easily
searched using grep "^M:", so skip it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches 6ffd9485f5 scripts/get_maintainer.pl: use correct indentation
Fix an overly indented block.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:17 -07:00
Joe Perches 63ab52db5b scripts/get_maintainer.pl: Add --git-blame --rolestats "Authored lines" information
When options --git-blame and --rolestats are specified, add
the maintainers with the qualifying --git-min-percent amount
of lines authored of the complete file.  Does not add more
authors than specified by --git-max-maintainers.

For anyone using hg, this option works but is _very_ slow.
It's orders of magnitude slower than git slow.

The get_maintainer.pl version was incremented to 0.25.

This can be used with or without --git.

For instance:

$ ./scripts/get_maintainer.pl --git-blame --nogit --rolestats -f lib/bitmap.c
Paul Jackson <pj@sgi.com> (authored lines:406/613=66%,commits:7/20=35%)
Akinobu Mita <mita@miraclelinux.com> (authored lines:87/613=14%,commits:3/20=15%)
Reinette Chatre <reinette.chatre@linux.intel.com> (authored lines:42/613=7%)
Andrew Morton <akpm@linux-foundation.org> (commits:16/20=80%)
Paul Mundt <lethal@linux-sh.org> (commits:3/20=15%)
Randy Dunlap <randy.dunlap@oracle.com> (commits:2/20=10%)

$ ./scripts/get_maintainer.pl --git-blame --git --rolestats -f lib/bitmap.c
Andrew Morton <akpm@linux-foundation.org> (commit_signer:4/5=80%,commits:16/20=80%)
Akinobu Mita <akinobu.mita@gmail.com> (commit_signer:2/5=40%,authored lines:87/613=14%,commits:3/20=15%)
Jack Steiner <steiner@sgi.com> (commit_signer:1/5=20%)
Ben Hutchings <ben@decadent.org.uk> (commit_signer:1/5=20%)
Lee Schermerhorn <lee.schermerhorn@hp.com> (commit_signer:1/5=20%)
Paul Jackson <pj@sgi.com> (authored lines:406/613=66%,commits:7/20=35%)
Reinette Chatre <reinette.chatre@linux.intel.com> (authored lines:42/613=7%)
Paul Mundt <lethal@linux-sh.org> (commits:3/20=15%)
Randy Dunlap <randy.dunlap@oracle.com> (commits:2/20=10%)
linux-kernel@vger.kernel.org (open list)

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:16 -07:00
Linus Torvalds b5153163ed Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (278 commits)
  arm: remove machine_desc.io_pg_offst and .phys_io
  arm: use addruart macro to establish debug mappings
  arm: return both physical and virtual addresses from addruart
  arm/debug: consolidate addruart macros for CONFIG_DEBUG_ICEDCC
  ARM: make struct machine_desc definition coherent with its comment
  eukrea_mbimxsd-baseboard: Pass the correct GPIO to gpio_free
  cpuimx27: fix compile when ULPI is selected
  mach-pcm037_eet: fix compile errors
  Fixing ethernet driver compilation error for i.MX31 ADS board
  cpuimx51: update board support
  mx5: add cpuimx51sd module and its baseboard
  iomux-mx51: fix GPIO_1_xx 's IOMUX configuration
  imx-esdhc: update devices registration
  mx51: add resources for SD/MMC on i.MX51
  iomux-mx51: fix SD1 and SD2's iomux configuration
  clock-mx51: rename CLOCK1 to CLOCK_CCGR for better readability
  clock-mx51: factorize clk_set_parent and clk_get_rate
  eukrea_mbimxsd: add support for DVI displays
  cpuimx25 & cpuimx35: fix OTG port registration in host mode
  i.MX31 and i.MX35 : fix errate TLSbo65953 and ENGcm09472
  ...
2010-10-21 16:42:32 -07:00
Linus Torvalds 5d70f79b5e Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (163 commits)
  tracing: Fix compile issue for trace_sched_wakeup.c
  [S390] hardirq: remove pointless header file includes
  [IA64] Move local_softirq_pending() definition
  perf, powerpc: Fix power_pmu_event_init to not use event->ctx
  ftrace: Remove recursion between recordmcount and scripts/mod/empty
  jump_label: Add COND_STMT(), reducer wrappery
  perf: Optimize sw events
  perf: Use jump_labels to optimize the scheduler hooks
  jump_label: Add atomic_t interface
  jump_label: Use more consistent naming
  perf, hw_breakpoint: Fix crash in hw_breakpoint creation
  perf: Find task before event alloc
  perf: Fix task refcount bugs
  perf: Fix group moving
  irq_work: Add generic hardirq context callbacks
  perf_events: Fix transaction recovery in group_sched_in()
  perf_events: Fix bogus AMD64 generic TLB events
  perf_events: Fix bogus context time tracking
  tracing: Remove parent recording in latency tracer graph options
  tracing: Use one prologue for the preempt irqs off tracer function tracers
  ...
2010-10-21 12:54:49 -07:00
Russell King 809b4e00ba Merge branch 'devel-stable' into devel 2010-10-19 22:06:36 +01:00
Russell King 23beab76b4 Merge branches 'at91', 'dcache', 'ftrace', 'hwbpt', 'misc', 'mmci', 's3c', 'st-ux' and 'unwind' into devel 2010-10-18 22:34:25 +01:00
Steven Rostedt d7b4d6de57 ftrace: Remove recursion between recordmcount and scripts/mod/empty
When DYNAMIC_FTRACE is enabled and we use the C version of recordmcount,
all objects are run through the recordmcount program to create a
separate section that stores all the callers of mcount.

The build process has a special file: scripts/mod/empty.o. This is
built from empty.c which is literally an empty file (except for a
single comment). This file is used to find information about the target
elf format, like endianness and word size.

The problem comes up when we need to build recordmcount. The
build process requires that empty.o is built first. The build rules
for empty.o will try to execute recordmcount on the empty.o file.
We get an error that recordmcount does not exist.

To avoid this recursion, the build file will skip running recordmcount
if the file that it is building is script/mod/empty.o.

[ extra comment Suggested-by: Sam Ravnborg <sam@ravnborg.org> ]

Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-18 17:08:10 -04:00
Steven Rostedt 85caa993d7 ftrace: Use objtree for C version of recordmcount
The C version of recordmcount is compiled to a binary, which will
end up located in the objtree. If the kernel is built with O=path,
the srctree will not include the binary recordmcount caller.

Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-15 12:09:25 -04:00
Steven Rostedt 4447586364 ftrace: Do not process kernel/trace/ftrace.o with C recordmcount program
The file kernel/trace/ftrace.c references the mcount() call to
convert the mcount() callers to nops. But because it references
mcount(), the mcount() address is placed in the relocation table.

The C version of recordmcount reads the relocation table of all
object files, and it will add all references to mcount to the
__mcount_loc table that is used to find the places that call mcount()
and change the call to a nop. When recordmcount finds the mcount reference
in kernel/trace/ftrace.o, it saves that location even though the code
is not a call, but references mcount as data.

On boot up, when all calls are converted to nops, the code has a safety
check to determine what op code it is actually replacing before it
replaces it. If that op code at the address does not match, then
a warning is printed and the function tracer is disabled.

The reference to mcount in ftrace.c, causes this warning to trigger,
since the reference is not a call to mcount(). The ftrace.c file is
not compiled with the -pg flag, so no calls to mcount() should be
expected.

This patch simply makes recordmcount.c skip the kernel/trace/ftrace.c
file. This was the same solution used by the perl version of
recordmcount.

Reported-by: Ingo Molnar <mingo@elte.hu>
Cc: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-15 11:49:47 -04:00
Steven Rostedt c28d5077f8 ftrace: Remove duplicate code for 64 and 32 bit in recordmcount.c
The elf reader for recordmcount.c had duplicate functions for both
32 bit and 64 bit elf handling. This was due to the need of using
the 32 and 64 bit elf structures.

This patch consolidates the two by using macros to define the 32
and 64 bit names in a recordmcount.h file, and then by just defining
a RECORD_MCOUNT_64 macro and including recordmcount.h twice we
create the funtions for both the 32 bit version as well as the
64 bit version using one code source.

Cc: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-14 16:54:00 -04:00
Steven Rostedt 72441cb1fd ftrace/x86: Add support for C version of recordmcount
This patch adds the support for the C version of recordmcount and
compile times show ~ 12% improvement.

After verifying this works, other archs can add:

 HAVE_C_MCOUNT_RECORD

in its Kconfig and it will use the C version of recordmcount
instead of the perl version.

Cc: <linux-arch@vger.kernel.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Cc: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-14 16:52:41 -04:00
John Reiser 81d3858d31 ftrace: Add C version of recordmcount compile time code
Currently, the mcount callers are found with a perl script that does
an objdump on every file in the kernel. This is a C version of that
same code which should increase the performance time of compiling
the kernel with dynamic ftrace enabled.

Signed-off-by: John Reiser <jreiser@bitwagon.com>

[ Updated the code to include .text.unlikely section as well as
  changing the format to follow Linux coding style. ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-14 16:44:34 -04:00
Nishanth Aravamudan c2d5a7300d scripts/package: don't break if %{_smp_mflags} isn't set
Same fix as in 13797b77d4 is needed for the "new"
line invoking _smp_mflags for modules_install. Without the fix, `make
binrpm-pkg` fails with:

+ make '%{_smp_mflags}' KBUILD_SRC= modules_install
make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
make[2]: *** No rule to make target `%{_smp_mflags}'.  Stop.
error: Bad exit status from /var/tmp/rpm-tmp.8S9B9e (%install)

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-14 00:01:16 +02:00
Nicolas Palix 03ee0c42a7 Coccinelle: Use the -no_show_diff option for org and report mode
This allows to write the semantic patches with code sharing
for the matching parts.

Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-13 14:26:06 +02:00
Nicolas Palix 2c1160c874 Coccinelle: Add a new mode named 'chain'
spatch now returns -1 when a virtual rule (given with
-D on the command line) is not defined in the semantic patch.

Using this spatch feature, coccicheck is now
tries several modes by default, in the order:
	patch, report, context, org

Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-13 14:26:06 +02:00
Nicolas Palix e90f659021 Coccinelle: Use new comment format to explain kfree.cocci
Use new comment format to separate proposed commit message
and information about generated false positives

Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-13 14:26:06 +02:00
Nicolas Palix 3c90841767 Coccinelle: Improve user information with a new kind of comment
Improve user information with a new kind of comment
about semantic patch output.

Fix spelling.

Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-13 14:26:06 +02:00
Michal Marek b1f7d6e190 Revert "kconfig: Temporarily disable dependency warnings"
This reverts commit 71ebc01, which was a 2.6.36-only stopgap solution.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-12 15:12:23 +02:00
Michal Marek 239060b93b Merge branch 'kbuild/rc-fixes' into kbuild/kconfig
We need to revert the temporary hack in 71ebc01, hence the merge.
2010-10-12 15:09:06 +02:00
Linus Torvalds 29979aa8bd Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  kbuild: fix oldnoconfig to do the right thing
  kconfig: Temporarily disable dependency warnings
  kconfig: delay symbol direct dependency initialization
2010-10-11 10:19:24 -07:00
Kyle McMartin e9203c9882 kbuild: fix oldnoconfig to do the right thing
Commit 861b4ea4 broke oldnoconfig when removed the oldnoconfig checks on
                       if (input_mode == nonint_oldconfig ||
                           input_mode == oldnoconfig) {
                               if (input_mode == nonint_oldconfig &&
                                   sym->name &&
                                    !sym_is_choice_value(sym)) {
to avoid oldnoconfig chugging through the else stanza.

Fix that to restore expected behaviour (which I've confirmed in the
Fedora kernel build that the configs end up looking the same.)

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-09 23:55:08 +02:00
Michal Marek 71ebc01d3a kconfig: Temporarily disable dependency warnings
After fixing a use-after-free bug in kconfig, a 'make defconfig' or
'make allmodconfig' fills the screen with warnings that were not
detected before. Given that we are close to the release now, disable the
warnings temporarily and deal with them after 2.6.36.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-09 23:19:07 +02:00
Will Newton 1408b15b98 kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
This prevents the buffers being overflowed when using a config
file with a long name. PATH_MAX is used elsewhere in the same
file, so use it here as well.

Signed-off-by: Will Newton <will.newton@imgtec.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-04 15:40:04 +02:00
Arnaud Lacombe ff5ff6060b kconfig: delay symbol direct dependency initialization
This fixes the use-after-free and associated crash in kconfig introduced
in commit 246cf9c26b.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-04 15:13:13 +02:00
Michal Marek 19c29f3260 kconfig: Fix realloc usage()
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-30 22:26:39 +02:00
Michal Marek a01ebe154c kconfig: Propagate const
Commit 2e7a091 made struct file->name a const char*, but forgot to
constify all users of it.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-30 22:17:48 +02:00
Naohiro Aota 8bea7548ee kconfig: Don't go out from read config loop when you read new symbol
commit 8baefd30b5 of linux-next replaced
a `switch()' statement with some `if()' statements, but left `break's
in the `switch()' statement untouched. This cause read config loop to
exit and so "make oldconfig" is not much usable (see below).

> $ make oldconfig
><snip>
> scripts/kconfig/conf --oldconfig Kconfig
> #
> # using defaults found in /boot/config-2.6.34-ccs-r1
> #
> *
> * Restart config...
> *
> *
> * General setup
> *
> Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [N/y/?] (NEW)

(I've already have "CONFIG_EXPERIMENTAL=y" in the old config file. But
that's not read here.)

This patch should fix this problem.

Signed-off-by: Naohiro Aota <naota@elisp.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-30 21:59:32 +02:00
Jean Sacren ef894870c6 scripts/kallsyms: Enable error messages while hush up unnecessary warnings
As no error was handled, we wouldn't be able to know when an error does
occur. The fix preserves error messages while it doesn't let unnecessary
compiling warnings show up.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-29 16:18:27 +02:00
Michal Marek 0455029bea Merge branch 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6 into kbuild/kconfig
* 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6:
  kbuild: migrate all arch to the kconfig mainmenu upgrade
  kconfig: expand file names
  kconfig: use the file's name of sourced file
  kconfig: constify file name
  kconfig: don't emit warning upon rootmenu's prompt redefinition
  kconfig: replace KERNELVERSION usage by the mainmenu's prompt
  kconfig: delay gconf window initialization
  kconfig: expand by default the rootmenu's prompt
  kconfig: add a symbol string expansion helper
  kconfig: regen parser
  kconfig: implement the `mainmenu' directive
  kconfig: allow PACKAGE to be defined on the compiler's command-line
  kconfig: rephrase help texts/comments not to include the package name
  kconfig: allow build-time definition of the internal config prefix
  kconfig: rephrase help text not to mention the internal prefix
  kconfig: replace a `switch()' statement by a more flexible `if()' statement
2010-09-27 23:24:53 +02:00
Ingo Molnar d6dad199a1 jump label: Fix GCC feature check when distcc is used
The following build bug occurs on distcc builds:

   CC      arch/x86/kernel/asm-offsets.s
 In file included from include/linux/module.h:24,
                  from include/linux/crypto.h:22,
                  from arch/x86/kernel/asm-offsets_64.c:9,
                  from arch/x86/kernel/asm-offsets.c:5:
 include/trace/events/module.h: In function 'trace_module_load':
 include/trace/events/module.h:18: error: expected '(' before 'goto'
 include/trace/events/module.h:18: error: expected identifier or '*' before '(' token

It triggers because distcc is invoked by turning $CC into "distcc gcc",
but gcc-goto.sh check script was using $1 not $@ to expand parameters.

Cc: Jason Baron <jbaron@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20100923034910.867858597@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-09-24 09:12:25 +02:00
Jason Baron 52159d98be jump label: Convert dynamic debug to use jump labels
Convert the 'dynamic debug' infrastructure to use jump labels.

Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <b77627358cea3e27d7be4386f45f66219afb8452.1284733808.git.jbaron@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-09-22 16:31:19 -04:00
Jason Baron bf5438fca2 jump label: Base patch for jump label
base patch to implement 'jump labeling'. Based on a new 'asm goto' inline
assembly gcc mechanism, we can now branch to labels from an 'asm goto'
statment. This allows us to create a 'no-op' fastpath, which can subsequently
be patched with a jump to the slowpath code. This is useful for code which
might be rarely used, but which we'd like to be able to call, if needed.
Tracepoints are the current usecase that these are being implemented for.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <ee8b3595967989fdaf84e698dc7447d315ce972a.1284733808.git.jbaron@redhat.com>

[ cleaned up some formating ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-09-22 16:29:41 -04:00
Junio C Hamano 8c41e5e363 kconfig: fix menuconfig on debian lenny
In 60f33b8 (kconfig: get rid of stray a.o, support ncursesw, 2006-01-15),
support to link menuconfig with ncursesw library was added.  To compute
the linker command option -l, we check "libncursesw.{so,a,dylib}" to allow
ncursesw to be used as a replacement ncurses.  However, when checking what
header file to include, we do not check /usr/include/ncursesw directory.

Add /usr/include/ncursesw to the list of directories that are checked.
With this patch, on my Debian Lenny box with libncursesw5-dev package but
not libncurses5-dev package, I can say "make menuconfig".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-20 14:09:31 +02:00
Arnaud Lacombe 838a2e55e6 kbuild: migrate all arch to the kconfig mainmenu upgrade
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 22:54:11 -04:00
Arnaud Lacombe c7abe8630a kconfig: expand file names
This will allow to use the following construct in source files:

config FOO
    string
    default "foo"

source "$FOO/Kconfig"

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 22:54:07 -04:00
Arnaud Lacombe e82dae9083 kconfig: use the file's name of sourced file
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 22:54:04 -04:00
Arnaud Lacombe 2e7a091833 kconfig: constify file name
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 22:54:00 -04:00
Arnaud Lacombe ba6ff60d5e kconfig: don't emit warning upon rootmenu's prompt redefinition
This silences the warning printed upon prompt redefinition for the rootmenu.
We will encounter this redefinition when a "mainmenu" statement is specified and
override the default prompt.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 22:53:57 -04:00
Arnaud Lacombe 0954828fcb kconfig: replace KERNELVERSION usage by the mainmenu's prompt
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 22:53:53 -04:00
Arnaud Lacombe c55c9d571a kconfig: delay gconf window initialization
Delay the window initialization to let the rootmenu's prompt be
initialized as it will be used to get the window's title.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2010-09-19 22:53:49 -04:00
Arnaud Lacombe f6ce00b8cc kconfig: expand by default the rootmenu's prompt
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:53 -04:00
Arnaud Lacombe 76a540958a kconfig: add a symbol string expansion helper
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:48 -04:00
Arnaud Lacombe c0920a1cbd kconfig: regen parser
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:44 -04:00
Arnaud Lacombe 8ea13e2c87 kconfig: implement the `mainmenu' directive
If specified, the directive must be placed at the top of the Kconfig file.

We need to change the grammar to make the mainmenu directive set the
`rootmenu' prompt. This reflect how menu_add_prompt() works internally, ie.
set the prompt of the `current_entry', pointing originally to `rootmenu'.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:39 -04:00
Arnaud Lacombe ef211607ed kconfig: allow PACKAGE to be defined on the compiler's command-line
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:35 -04:00
Arnaud Lacombe 652cf9821d kconfig: rephrase help texts/comments not to include the package name
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@xenotime.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:30 -04:00
Arnaud Lacombe ffb5957bc4 kconfig: allow build-time definition of the internal config prefix
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:26 -04:00
Arnaud Lacombe 59dfa24da7 kconfig: rephrase help text not to mention the internal prefix
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:21 -04:00
Arnaud Lacombe 8baefd30b5 kconfig: replace a `switch()' statement by a more flexible `if()' statement
With the upcoming dynamical configuration prefix, we can no longer assume that
the prefix will start by a 'C'. As such, we can no longer hardcode this value in
the `case ...:', so replace the `switch() { ... }' statement by a more flexible
'if () { ... }' statement.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 18:19:16 -04:00
Justin P. Mattock cec1921ec9 scripts/kconfig/gconf.glade Update broken web addresses.
As discussed, remove the DOCTYPE declaration since libglade validates
the file against itself..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-17 16:54:42 +02:00
Michal Marek 60eab877a9 Merge branch 'kbuild/clean' into kbuild/kbuild 2010-09-13 17:20:59 +02:00
Michal Marek 458452f4a9 kconfig: Simplify Makefile for xconfig
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-13 13:41:31 +02:00
Alexander Stein 20f4ad8a19 Fix QT4 moc, cflags libs detection on dual QT3/Qt4 systems
On system with QT3 and QT4 qmake in PATH may be from QT3. So we use
pkg-config for proper QT4 detection.
By reqesting cflags and libs for either QtCore, QtGui and QtSupport include
dirs and libs get listed several times, but so we won't mis anything

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-13 13:01:30 +02:00
Stephen Boyd aee08ed499 nconfig: Fix help for choice menus
When getting the help for a choice menu with a help section (for example
the "Choose SLAB allocator" menu) nconfig pops up a window with nothing
inside it. This is due to show_help() passing an empty string to
show_scroll_win()'s 3rd argument. The option really does have help
though, but it isn't a config symbol, so just add the help text for
the option, and don't try to add anything else like the config option
name.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-13 12:43:22 +02:00
Johannes Berg eda603f6cd docbook: warn on unused doc entries
When you don't use !E or !I but only !F, then it's very easy to miss
including some functions, structs etc.  in documentation.  To help
finding which ones were missed, allow printing out the unused ones as
warnings.

For example, using this on mac80211 yields a lot of warnings like this:

  Warning: didn't use docs for DOC: mac80211 workqueue
  Warning: didn't use docs for ieee80211_max_queues
  Warning: didn't use docs for ieee80211_bss_change
  Warning: didn't use docs for ieee80211_bss_conf

when generating the documentation for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-11 16:49:21 -07:00
Johannes Berg 1f3a66889c kernel-doc: ignore case when stripping attributes
There are valid attributes that could have upper case letters, but we
still want to remove, like for example
	__attribute__((aligned(NETDEV_ALIGN)))
as encountered in the wireless code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-11 16:49:21 -07:00
Kyle McMartin 71d8066265 kbuild: fix oldnoconfig to do the right thing
Commit 861b4ea4 broke oldnoconfig when removed the oldnoconfig checks on
                       if (input_mode == nonint_oldconfig ||
                           input_mode == oldnoconfig) {
                               if (input_mode == nonint_oldconfig &&
                                   sym->name &&
                                    !sym_is_choice_value(sym)) {
to avoid oldnoconfig chugging through the else stanza.

Fix that to restore expected behaviour (which I've confirmed in the
Fedora kernel build that the configs end up looking the same.)

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-08 13:55:37 +02:00
Michal Marek 76a136c4a6 xconfig: Change the titlebar if using Qt3
Qt4 is now used by default and will get more testing. In case someone
still uses Qt3 and reports a bug, make it easy to recognize that this is
Qt3.

Acked-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-06 13:31:50 +02:00
Guillem Jover 242c5ab08c kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it
Avoid an error when doing cp over the image when it does not contain
the full path to the file.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-06 13:29:02 +02:00
Michael Prokop c3e2f196f9 scripts/setlocalversion: update comment
A tagged repository state isn't enough, git describe only
looks at signed or annotated tags (git tag -a/-s). This
documentation update makes sure the comment matches the
current behaviour.

Signed-off-by: Michael Prokop <mika@grml.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-06 13:26:30 +02:00
Rabin Vincent 72dc43a9eb ARM: 6319/1: ftrace: add Thumb-2 support to dynamic ftrace
Handle the different nop and call instructions for Thumb-2.  Also, we
need to adjust the recorded mcount_loc addresses because they have the
lsb set.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org> [recordmcount.pl change]
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-09-02 15:28:43 +01:00
Rabin Vincent 3b6c223b1b ARM: 6318/1: ftrace: fix and update dynamic ftrace
This adds mcount recording and updates dynamic ftrace for ARM to work
with the new ftrace dyamic tracing implementation.  It also adds support
for the mcount format used by newer ARM compilers.

With dynamic tracing, mcount() is implemented as a nop.  Callsites are
patched on startup with nops, and dynamically patched to call to the
ftrace_caller() routine as needed.

Acked-by: Steven Rostedt <rostedt@goodmis.org> [recordmcount.pl change]
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-09-02 15:27:40 +01:00
Rabin Vincent f9810a8253 ARM: 6317/1: ftrace: pass KBUILD_CFLAGS to record_mcount.pl
On ARM, we have two ABIs, and the ABI used is controlled via a config
option.  Object files built with one ABI can't be merged with object
files built with the other ABI.  So, record_mcount.pl needs to use the
same compiler flags as the kernel when generating the object file with
the mcount locations.  Ensure this by passing CFLAGS to the script.

Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-09-02 15:26:39 +01:00
Alexander Stein 133c5f7c10 kconfig qconf: port to QT4
A straight forward port to QT4 using qt3to4 and compiling against
  qt3support

* Use pkg-config to detect QT4 which is hopefully portable enough
* If no QT4, QT3 will by tried instead
* Classes renamed using qt3to4
  * If build using QT3 renamed to QT3 class names using defines
* ConfigInfoView::menu has to be renamed as QT4 moc strips struct from
  struct menu and creates a name conflict
* QT2 support has been dropped
* The hidden options inserted in 39a4897c1b
  are use in native API

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-01 16:14:29 +02:00
Arnaud Lacombe c94d3fb01f kbuild: use getopt_long(), not its _only() variant
NetBSD lacks getopt_long_only() whereas getopt_long() works just fine.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 13:33:41 +02:00
Nicolas Palix 49ab7a3913 Coccinelle: Add misc/ifcol.cocci
Find confusingly indented code in or after an if.  An if branch should
be indented.  The code following an if should not be indented.
Sometimes, code after an if that is indented is actually intended to be
part of the if branch.

This has a high rate of false positives, because Coccinelle's column
calculation does not distinguish between spaces and tabs, so code that
is not visually aligned may be considered to be in the same column.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:43:13 +02:00
Nicolas Palix 033456e2c5 Coccinelle: Add misc/doubleinit.cocci
Find duplicate field initializations.  This has a high rate of false
positives due to #ifdefs, which Coccinelle is not aware of in a structure
initialization.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:43:13 +02:00
Nicolas Palix be8fe9d451 Coccinelle: Move alloc directory into api directory
alloc contains various semantic patches related
to the allocation APIs

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:43:13 +02:00
Nicolas Palix 77c272fb24 Coccinelle: Move resource_size.cocci to the api directory
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:37:54 +02:00
Nicolas Palix 99d653d4bc Coccinelle: Move err_cast.cocci to the api directory
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:37:54 +02:00
Nicolas Palix 034174598b Coccinelle: Add api/memdup_user
Use kmemdup_user rather than duplicating its implementation
This is a little bit restricted to reduce false positives

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:37:54 +02:00
Nicolas Palix 0426a97c4b Coccinelle: Add api/memdup.cocci
Use kmemdup rather than duplicating its implementation

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:37:54 +02:00
Nicolas Palix 998f552323 Coccinelle: Add api/kstrdup.cocci
Use kstrdup rather than duplicating its implementation

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:37:53 +02:00
Nicolas Palix 43ba21b57a Coccinelle: Add free/kfree.cocci
Find a use after free.  Values of variables may imply that some
execution paths are not possible, resulting in false positives.
Another source of false positives are macros such as
SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:37:53 +02:00
Nicolas Palix 5c34050188 Coccinelle: Add iterators/list_entry_update.cocci
list_for_each_entry uses its first argument to get from one element of
the list to the next, so it is usually not a good idea to reassign it.
The first rule finds such a reassignment and the second rule checks
that there is a path from the reassignment back to the top of the loop.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:37:53 +02:00
Nicolas Palix afc48a82fa Coccinelle: Add iterators/itnull.cocci
Many iterators have the property that the first argument is always bound
to a real list element, never NULL.  False positives arise for some
iterators that do not have this property, or in cases when the loop
cursor is reassigned.  The latter should only happen when the matched
code is on the way to a loop exit (break, goto, or return).

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31 11:37:53 +02:00