cascardo/linux.git
13 years agoCoccinelle: Use new comment format to explain kfree.cocci
Nicolas Palix [Fri, 8 Oct 2010 19:27:39 +0000 (21:27 +0200)]
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>
13 years agoCoccinelle: Improve user information with a new kind of comment
Nicolas Palix [Fri, 8 Oct 2010 19:27:38 +0000 (21:27 +0200)]
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>
13 years agoCoccinelle: Update documentation
Nicolas Palix [Tue, 12 Oct 2010 22:49:07 +0000 (00:49 +0200)]
Coccinelle: Update documentation

 - Add information about use of the C={1,2} make flag
 - Add a description of the new chain mode mechanism
 - Add a link to the wiki

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>
13 years agoMAINTAINERS: Coccinelle: Update email address
Nicolas Palix [Fri, 8 Oct 2010 19:27:36 +0000 (21:27 +0200)]
MAINTAINERS: Coccinelle: Update email address

Update my email address

Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoDocumentation/kbuild: modules.txt cleanup
matt mooney [Sat, 2 Oct 2010 04:21:55 +0000 (21:21 -0700)]
Documentation/kbuild: modules.txt cleanup

A few modifications done for consistency, such as adding the shell
prompt for command line examples and trailing slash for directories.
Also corrects the module include header and fixes a few grammar
issues that I introduced.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoDocumentation/kbuild: major edit of modules.txt sections 5-8
matt mooney [Mon, 20 Sep 2010 06:06:36 +0000 (23:06 -0700)]
Documentation/kbuild: major edit of modules.txt sections 5-8

A follow-up to my edit of the first 4 sections.

Shift sections down by one due to the deletion of section 3; grammar
corrections along with some rewording; margin width cleanup; and
change EXTRA_CFLAGS -> ccflags-y.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoDocumentation/kbuild: major edit of modules.txt sections 1-4
matt mooney [Sun, 19 Sep 2010 01:33:57 +0000 (18:33 -0700)]
Documentation/kbuild: major edit of modules.txt sections 1-4

Omit needless words and sentences; reorganize and tighten sentence structure;
swap sections 2.2 and 2.3 for a more logical flow; remove section 3, therefore
shifting 4->3; add to explanations; and add section on building multiple modules.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoCoccinelle: Add misc/ifcol.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:12 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Add misc/doubleinit.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:11 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Move alloc directory into api directory
Nicolas Palix [Tue, 24 Aug 2010 15:39:10 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Move resource_size.cocci to the api directory
Nicolas Palix [Tue, 24 Aug 2010 15:39:09 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Move err_cast.cocci to the api directory
Nicolas Palix [Tue, 24 Aug 2010 15:39:08 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Add api/memdup_user
Nicolas Palix [Tue, 24 Aug 2010 15:39:07 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Add api/memdup.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:06 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Add api/kstrdup.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:05 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Add free/kfree.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:04 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Add iterators/list_entry_update.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:03 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Add iterators/itnull.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:02 +0000 (17:39 +0200)]
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>
13 years agoCoccinelle: Add iterators/fen.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:01 +0000 (17:39 +0200)]
Coccinelle: Add iterators/fen.cocci

for_each_node iterators only exit normally when the loop cursor is
NULL, so there is no point to call of_node_put on the final value.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoCoccinelle: Add locks/mini_lock.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:39:00 +0000 (17:39 +0200)]
Coccinelle: Add locks/mini_lock.cocci

Find missing unlocks.  This semantic match considers the specific case
where the unlock is missing from an if branch, and there is a lock
before the if and an unlock after the if.  False positives are due to
cases where the if branch represents a case where the function is
supposed to exit with the lock held, or where there is some preceding
function call that releases the lock.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoCoccinelle: Add locks/double_lock.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:38:59 +0000 (17:38 +0200)]
Coccinelle: Add locks/double_lock.cocci

Find double locks.  False positives may occur when some paths cannot
occur at execution, due to the values of variables, and when there is
an intervening function call that releases the lock.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoCoccinelle: Add locks/call_kern.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:38:58 +0000 (17:38 +0200)]
Coccinelle: Add locks/call_kern.cocci

Find functions that refer to GFP_KERNEL but are called with locks held.
The proposed change of converting the GFP_KERNEL is not necessarily the
correct one.  It may be desired to unlock the lock, or to not call the
function under the lock in the first place.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoCoccinelle: Move deref_null.cocci to a more appropriate directory
Nicolas Palix [Tue, 24 Aug 2010 15:38:57 +0000 (17:38 +0200)]
Coccinelle: Move deref_null.cocci to a more appropriate directory

deref_null.cocci is moved to the 'null' directory
which contains other null related rules.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoCoccinelle: Add null/kmerr.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:38:56 +0000 (17:38 +0200)]
Coccinelle: Add null/kmerr.cocci

This semantic patch looks for kmalloc etc that are not followed by a
NULL check.  It only gives a report in the case where there is some
error handling code later in the function, which may be helpful
in determining what the error handling code for the call to kmalloc etc
should be.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoCoccinelle: Add null/eno.cocci
Nicolas Palix [Tue, 24 Aug 2010 15:38:55 +0000 (17:38 +0200)]
Coccinelle: Add null/eno.cocci

The various basic memory allocation functions don't return ERR_PTR

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoscripts/dtc: Fix a resource leak
Martin Ettl [Sun, 21 Feb 2010 08:31:44 +0000 (09:31 +0100)]
scripts/dtc: Fix a resource leak

during a check of the current git head of the linux kernel with the
static code analysis tool cppcheck
(http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page)
the tool discovered a resource leak in linux-2.6/scripts/dtc/fstree.c.

Please refer the attached patch, that fixes the issue.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15363
Signed-off-by: Martin Ettl <ettl.martin@gmx.de>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoDocumentation: fix ubuntu distro name
Kulikov Vasiliy [Tue, 29 Jun 2010 12:31:16 +0000 (16:31 +0400)]
Documentation: fix ubuntu distro name

10.04 is Lucid, not Karmic.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoMAINTAINERS: Update kbuild git URLs
Michal Marek [Tue, 29 Jun 2010 09:58:42 +0000 (11:58 +0200)]
MAINTAINERS: Update kbuild git URLs

The kbuild tree was moved to git.kernel.org so that people can find it
more easily.

Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoAdd support for the C variable in the coccicheck script
Nicolas Palix [Sun, 13 Jun 2010 07:26:34 +0000 (09:26 +0200)]
Add support for the C variable in the coccicheck script

This patch makes it possible to use the Coccinelle checker with the C
variable of the build system. To check only newly edited code, the
following command may be used:

'make C={1,2} CHECK="scripts/coccicheck"'

This runs every semantic patch in scripts/coccinelle by default. The
COCCI variable may additionally be used to only apply a single
semantic patch.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoMerge branch 'kbuild/coccinelle' into kbuild/misc
Michal Marek [Fri, 11 Jun 2010 22:01:31 +0000 (00:01 +0200)]
Merge branch 'kbuild/coccinelle' into kbuild/misc

13 years agoAdd scripts/coccinelle/deref_null.cocci
Nicolas Palix [Sun, 6 Jun 2010 15:15:07 +0000 (17:15 +0200)]
Add scripts/coccinelle/deref_null.cocci

Add a Coccinelle file to identify the dereferences of NULL variables

This semantic patch identifies when a variable is known to be NULL
after a test, but it is still dereferenced later.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoAdd scripts/coccinelle/err_cast.cocci
Nicolas Palix [Sun, 6 Jun 2010 15:15:06 +0000 (17:15 +0200)]
Add scripts/coccinelle/err_cast.cocci

Add a Coccinelle file to use the ERR_CAST function

Before the release 2.6.25, one had to use ERR_PTR(PTR_ERR(...))  to
convert the pointer type of an error. Since then, the function
ERR_CAST has been available for that purpose.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoAdd scripts/coccinelle/resource_size.cocci
Nicolas Palix [Sun, 6 Jun 2010 15:15:05 +0000 (17:15 +0200)]
Add scripts/coccinelle/resource_size.cocci

This semantic patch replaces explicit computations
of resource size by a call to resource_size.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoAdd scripts/coccinelle/alloc/kzalloc-simple.cocci
Nicolas Palix [Sun, 6 Jun 2010 15:15:04 +0000 (17:15 +0200)]
Add scripts/coccinelle/alloc/kzalloc-simple.cocci

This semantic patch replaces a pair of calls to kmalloc and memset
by a single call to kzalloc.

It only looks for simple cases to avoid 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>
13 years agoAdd scripts/coccinelle/alloc/drop_kmalloc_cast.cocci
Nicolas Palix [Sun, 6 Jun 2010 15:15:03 +0000 (17:15 +0200)]
Add scripts/coccinelle/alloc/drop_kmalloc_cast.cocci

The purpose of this semantic patch is to remove
useless casts, as mentioned in the Linux documentation.
See Chapter 14 in Documentation/CodingStyle for more information.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoAdd Documentation/coccinelle.txt
Nicolas Palix [Sun, 6 Jun 2010 15:15:02 +0000 (17:15 +0200)]
Add Documentation/coccinelle.txt

The purpose of this file is to document how to use Coccinelle and its
spatch tool to check the Linux kernel.

It gives information on where and how to retrieve Coccinelle, and how
to use it with the Coccinelle scripts integrated in the Linux kernel.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoAdd a target to use the Coccinelle checker
Nicolas Palix [Sun, 6 Jun 2010 15:15:01 +0000 (17:15 +0200)]
Add a target to use the Coccinelle checker

A 'coccicheck' target is added. It can be called with four different
modes. Each one generates a different kind of output, i.e. context,
patch, org, report, according to the corresponding mode to be
activated.

The new target calls the 'coccicheck' front-end in the 'scripts'
directory with the MODE argument. Every SmPL file in the
subdirectories of 'scripts/coccinelle' is then given to the front-end
and applied to the entire source tree.

The four modes behave as follows:

'report' generates a list in the following format:
  file:line:column-column: message

'patch' proposes a fix, when possible.

'context' highlights lines of interest and their context in a
diff-like style. Lines of interest are indicated with '-'.

'org' generates a report in the Org mode format of Emacs.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoscripts: decodecode: remove bashisms
Rabin Vincent [Thu, 3 Jun 2010 17:18:12 +0000 (22:48 +0530)]
scripts: decodecode: remove bashisms

Remove bashisms to make scripts/decodecode work with other shells.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoMakefile: clarify a comment
Michal Marek [Thu, 3 Jun 2010 08:54:58 +0000 (10:54 +0200)]
Makefile: clarify a comment

os user <gnusercn@gmail.com> writes:
From the last comment, arch makefile will override vmlinux. It seems
vmlinux will not be checked by `make'. But from my test, although
`all:' will be re-defined in arch Makefile (ARM arch), vmlinux will
still be checked and the commands associated will be executed. Should
we use another word instead of "overridden"?

Reported-by: os user <gnusercn@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agocheckkconfigsymbols.sh: Kconfig symbols sometimes have lowercase letters
Roland Dreier [Wed, 2 Jun 2010 20:56:36 +0000 (13:56 -0700)]
checkkconfigsymbols.sh: Kconfig symbols sometimes have lowercase letters

Quite a few Kconfig symbols contain lowercase letters.  The current
checkkconfigsymbols.sh code only contains A-Z in the regexp it uses to
find config symbols in source code, so it comes up with the wrong symbol
to look for in Kconfig files and then generates false positives when it
doesn't find that wrong symbol.  For example checking drivers/net
generates a false positive for MAC89 because the the actual config
option is MAC89x0.

Fix this by also adding a-z to the regexp.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoscripts: add nconf into gitignore file
Américo Wang [Thu, 3 Jun 2010 02:50:39 +0000 (10:50 +0800)]
scripts: add nconf into gitignore file

scripts/kconfig/nconf is generated by 'make nconfig',
add it into .gitignore.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agokbuild: Revert part of e8d400a to resolve a conflict
Michal Marek [Thu, 27 May 2010 14:07:37 +0000 (16:07 +0200)]
kbuild: Revert part of e8d400a to resolve a conflict

A more complete patch in the kernel-doc tree also contains this change.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agokbuild: Fix checking of scm-identifier variable
Greg Thelen [Wed, 5 May 2010 17:41:44 +0000 (10:41 -0700)]
kbuild: Fix checking of scm-identifier variable

I'm looking Makefile in the -mm branch (dated 2010-04-28-16-53) and
seeing what looks like a bug in the checking of scm-identifier.  The
"ifneq ($scm-identifier)" seems to always execute "ifeq
($(LOCALVERSION,)) ...".  This patch fixes the checking of
scm-identifier.

Signed-off-by: Greg Thelen <gthelen@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agogconfig: add support to show hidden options that have prompts
Li Zefan [Wed, 14 Apr 2010 03:46:24 +0000 (11:46 +0800)]
gconfig: add support to show hidden options that have prompts

There's a button in gconfig to "Show all options", but I think
normally we are not interested in those configs which have no
prompt and thus can't be changed, so here I add a new button to
show hidden options which have prompts.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agomenuconfig: add support to show hidden options which have prompts
Li Zefan [Wed, 14 Apr 2010 03:46:02 +0000 (11:46 +0800)]
menuconfig: add support to show hidden options which have prompts

Usage:
  Press <Z> to show all config symbols which have prompts.

Quote Tim Bird:

| I've been bitten by this numerous times.  I most often
| use ftrace on ARM, but when I go back to x86, I almost
| always go through a sequence of searching for the
| function graph tracer in the menus, then realizing it's
| completely missing until I disable CC_OPTIMIZE_FOR_SIZE.
|
| Is there any way to have the menu item appear, but be
| unsettable unless the SIZE option is disabled?  I'm
| not a Kconfig guru...

I myself found this useful too. For example, I need to test
ftrace/tracing and want to be sure all the tracing features are
enabled, so I  enter the "Tracers" menu, and press <Z> to
see if there is any config hidden.

I also noticed gconfig and xconfig have a button "Show all options",
but that's a bit too much, and I think normally what we are not
interested in those configs which have no prompt thus can't be
changed by users.

Exmaple:

      --- Tracers
      -*-   Kernel Function Tracer
      - -     Kernel Function Graph Tracer
      [*]   Interrupts-off Latency Tracer
      - -   Preemption-off Latency Tracer
      [*]   Sysprof Tracer

Here you can see 2 tracers are not selectable, and then can find
out how to make them selectable.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agogconfig: remove show_debug option
Li Zefan [Wed, 14 Apr 2010 03:44:51 +0000 (11:44 +0800)]
gconfig: remove show_debug option

This option is a no-op, so remove it.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agogconfig: remove dbg_print_ptype() and dbg_print_stype()
Li Zefan [Wed, 14 Apr 2010 03:44:34 +0000 (11:44 +0800)]
gconfig: remove dbg_print_ptype() and dbg_print_stype()

Just use sym_get_type() and prop_get_type_name().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: fix zconfdump()
Li Zefan [Wed, 14 Apr 2010 03:44:20 +0000 (11:44 +0800)]
kconfig: fix zconfdump()

zconfdump(), which is used for debugging, can't recognize P_SELECT,
P_RANGE and P_MENU (if associated with a symbol, aka "menuconfig"),
and output something like this:

config X86
  boolean
  default y
  unknown prop 6!
  unknown prop 6!
  unknown prop 6!
  ...

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: some small fixes
Li Zefan [Wed, 14 Apr 2010 03:44:05 +0000 (11:44 +0800)]
kconfig: some small fixes

- fix a typo in documentation
- fix a typo in a printk on error
- fix comments in dialog_inputbox()

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoadd random binaries to .gitignore
Jan III Sobieski [Sun, 28 Mar 2010 13:38:31 +0000 (15:38 +0200)]
add random binaries to .gitignore

Signed-off-by: Jan III Sobieski <jan3sobi3ski@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: Include gen_initramfs_list.sh and the file list in the .d file
Jason Gunthorpe [Mon, 22 Mar 2010 22:49:32 +0000 (16:49 -0600)]
kbuild: Include gen_initramfs_list.sh and the file list in the .d file

Expand the dependency set used for the initrd to include the
CONFIG_INITRAMFS_SOURCE file and the generator script itself.
Otherwise changing the initramfs file list does not rebuild the CPIO.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokconfig: recalc symbol value before showing search results
Li Zefan [Fri, 19 Mar 2010 06:57:47 +0000 (14:57 +0800)]
kconfig: recalc symbol value before showing search results

A symbol's value won't be recalc-ed until we save config file or
enter the menu where the symbol sits.

So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:

  Symbol: FUNCTION_GRAPH_TRACER [=y]
  Prompt: Kernel Function Graph Tracer
    Defined at kernel/trace/Kconfig:140
    Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])
    ...

From the dependency it should result in FUNCTION_GRAPH_TRACER=n,
but it still shows FUNCTION_GRAPH_TRACER=y.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years ago.gitignore: ignore *.lzo files
Philipp Kohlbecher [Wed, 17 Mar 2010 18:52:12 +0000 (19:52 +0100)]
.gitignore: ignore *.lzo files

Ignore files compressed with lzop.

Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoheaderdep: perlcritic warning
Stephen Hemminger [Mon, 8 Mar 2010 16:24:27 +0000 (08:24 -0800)]
headerdep: perlcritic warning

Minor perlcritic warning:
headerdep.pl: "return" statement with explicit "undef" at line 84, column 2.  See page 199 of PBP.  (Severity: 5)

The rationale according to PBP is that an explicit return of undef
(contrary to most people's expectations) doesn't
always evaluate as false. It has to with the fact that perl return value
depends on context the function is called. If function is used in
list context, the appropriate return value for false is an empty list;
whereas in scalar context the return value for false is undefined.
By just using a "return" both cases are handled.

In the context of a trivial script this doesn't matter. But one script
may be cut-paste into later code (most people like me only know 50%
of perl), that is why perlcritic always complains

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoscripts/Makefile.lib: Align the output of LZO
Wu Zhangjin [Thu, 11 Mar 2010 09:42:14 +0000 (17:42 +0800)]
scripts/Makefile.lib: Align the output of LZO

The output of LZO is not aligned with the other output:
  ...
  CC      drivers/usb/mon/usbmon.mod.o
  LZO    arch/mips/boot/compressed/vmlinux.lzo
  ...

This patch fixes it.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: Generate modules.builtin in make modules_install
Michal Marek [Wed, 10 Mar 2010 11:28:58 +0000 (12:28 +0100)]
kbuild: Generate modules.builtin in make modules_install

The previous approach didn't work if one did
make modules && make modules_install
Add modules.builtin as dependency of _modinst_, which is the target that
actually needs the file.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRevert "kbuild: specify absolute paths for cscope"
Michal Marek [Mon, 8 Mar 2010 09:26:22 +0000 (10:26 +0100)]
Revert "kbuild: specify absolute paths for cscope"

This reverts commit eb8f844c0a41c4529a7d06b7801296eca9ae67aa. Ian
Campbell writes:
> I keep my kernel source tree on a more powerful build box where I run my
> builds etc (including "make cscope") but run my editor from my
> workstation with an NFS mount to the source. This worked fine for me
> using relative paths for cscope. Using absolute paths in cscope breaks
> this previously working setup because the root path is not the same on
> both systems. I guess this is similar to moving the source tree around.
>
> Without wanting to start a flamewar it really sounds to me like we are
> working around a vim (or cscope) bug here, emacs with cscope bindings
> works fine in this configuration.

Given that absolute paths can be forced by make O=. cscope, change the
default back to relative paths.

Ian Campbell <ijc@hellion.org.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: Do not unnecessarily regenerate modules.builtin
Michal Marek [Mon, 8 Mar 2010 09:07:12 +0000 (10:07 +0100)]
kbuild: Do not unnecessarily regenerate modules.builtin

Only regenerate it if the configuration has changed. Also, do this after
the modules build to fix errors with some weird Makefiles that are
generated during build.

Reported-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoheaders_install: use local file handles
Stephen Hemminger [Mon, 22 Feb 2010 23:17:26 +0000 (15:17 -0800)]
headers_install: use local file handles

Better practice to use 3 arg open and local file handles.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <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>
14 years agoheaders_check: fix perl warnings
Stephen Hemminger [Mon, 22 Feb 2010 23:17:24 +0000 (15:17 -0800)]
headers_check: fix perl warnings

According to PBP; best way practice is to use local reference for file
handle and three argument open. Also perl prototypes are a mistake.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <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>
14 years agoexport_report: fix perl warnings
Stephen Hemminger [Mon, 22 Feb 2010 23:17:22 +0000 (15:17 -0800)]
export_report: fix perl warnings

Use local file handles, use three argument open.
Don't modify arguments in perl grep (use sed instead)

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <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>
14 years agoprofile2linkerlist: fix perl warnings
Stephen Hemminger [Mon, 22 Feb 2010 23:17:20 +0000 (15:17 -0800)]
profile2linkerlist: fix perl warnings

Turn on strict checking.
Simplify code by using "unless" statement.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <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>
14 years agonamespace: perlcritic warnings
Stephen Hemminger [Mon, 22 Feb 2010 23:17:18 +0000 (15:17 -0800)]
namespace: perlcritic warnings

Use local file handle not global.
Make loop and other variables local in scope.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Hui Zhu <teawater@gmail.com>
Cc: Cong 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>
14 years agocheckversion: perl cleanup
Stephen Hemminger [Mon, 22 Feb 2010 23:17:14 +0000 (15:17 -0800)]
checkversion: perl cleanup

Turn on strict checking.
Use three arguement open
Standard practice in perl is to use undef not zero for false

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agocheckincludes: fix perlcritic warnings
Stephen Hemminger [Mon, 22 Feb 2010 23:17:12 +0000 (15:17 -0800)]
checkincludes: fix perlcritic warnings

Turn on strict checking.
Use local file handles.
Use three argument open.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Cong 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>
14 years agoscripts: improve checkstack
Stephen Hemminger [Mon, 22 Feb 2010 23:17:09 +0000 (15:17 -0800)]
scripts: improve checkstack

Cleanup checkstack script:
  * Turn on strict checking
  * Fix resulting error message because the declaration syntax
    was incorrect.
  * Remove incorrect and misleading use of prototype
     - prototype not required for this type of sort function
       because $a and $b are being used in this contex
     - if prototype was being used it should be for both arguments
  * Use closure for sort function

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Cong 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>
14 years agokbuild: deb-pkg md5sums
FEJES Jozsef [Fri, 5 Mar 2010 17:19:36 +0000 (18:19 +0100)]
kbuild: deb-pkg md5sums

This patch creates the standard md5sums file for 'make deb-pkg' just
like the dh_md5sums debhelper script.

Signed-off-by: Jozsef Fejes <fejes@joco.name>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .text.start to .text..start.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:57 +0000 (01:03 +0100)]
Rename .text.start to .text..start.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename special text sections in arch/frv from .text.XXX to .text..XXX.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:56 +0000 (01:03 +0100)]
Rename special text sections in arch/frv from .text.XXX to .text..XXX.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.lock_aligned to .data..lock_aligned.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:55 +0000 (01:03 +0100)]
Rename .data.lock_aligned to .data..lock_aligned.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.initvect to .data..initvect.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:54 +0000 (01:03 +0100)]
Rename .data.initvect to .data..initvect.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.init to .data..init.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:53 +0000 (01:03 +0100)]
Rename .data.init to .data..init.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.nosave to .data..nosave.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:52 +0000 (01:03 +0100)]
Rename .data.nosave to .data..nosave.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .text.startup to .text..startup.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:51 +0000 (01:03 +0100)]
Rename .text.startup to .text..startup.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .text.page_aligned to .text..page_aligned.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:49 +0000 (01:03 +0100)]
Rename .text.page_aligned to .text..page_aligned.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .text.lock to .text..lock.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:48 +0000 (01:03 +0100)]
Rename .text.lock to .text..lock.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .text.ivt to .text..ivt.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:47 +0000 (01:03 +0100)]
Rename .text.ivt to .text..ivt.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .rodata.compressed to .rodata..compressed.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:46 +0000 (01:03 +0100)]
Rename .rodata.compressed to .rodata..compressed.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.vmpages and .data.vm0.XXX to .data..vmpages and .data..vm0.XXX.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:45 +0000 (01:03 +0100)]
Rename .data.vmpages and .data.vm0.XXX to .data..vmpages and .data..vm0.XXX.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.read_mostly to .data..read_mostly.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:44 +0000 (01:03 +0100)]
Rename .data.read_mostly to .data..read_mostly.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data[.percpu][.XXX] to .data[..percpu][..XXX].
Denys Vlasenko [Sat, 20 Feb 2010 00:03:43 +0000 (01:03 +0100)]
Rename .data[.percpu][.XXX] to .data[..percpu][..XXX].

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data..patch.XXX to .data..patch.XXX.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:42 +0000 (01:03 +0100)]
Rename .data..patch.XXX to .data..patch.XXX.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.init_irqstack to .data..init_irqstack.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:41 +0000 (01:03 +0100)]
Rename .data.init_irqstack to .data..init_irqstack.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.gate to .data..gate.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:40 +0000 (01:03 +0100)]
Rename .data.gate to .data..gate.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .bss.stack to .bss..stack.
Denys Vlasenko [Sat, 20 Feb 2010 00:03:39 +0000 (01:03 +0100)]
Rename .bss.stack to .bss..stack.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .bss.page_aligned to .bss..page_aligned.
Tim Abbott [Sat, 20 Feb 2010 00:03:38 +0000 (01:03 +0100)]
Rename .bss.page_aligned to .bss..page_aligned.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.page_aligned to .data..page_aligned.
Tim Abbott [Sat, 20 Feb 2010 00:03:37 +0000 (01:03 +0100)]
Rename .data.page_aligned to .data..page_aligned.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agopowerpc: remove unused __page_aligned definition.
Tim Abbott [Sat, 20 Feb 2010 00:03:36 +0000 (01:03 +0100)]
powerpc: remove unused __page_aligned definition.

There is already an architecture-independent __page_aligned_data macro
for this purpose, so removing the powerpc-specific macro should be
harmless.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.init_task to .data..init_task.
Tim Abbott [Sat, 20 Feb 2010 00:03:35 +0000 (01:03 +0100)]
Rename .data.init_task to .data..init_task.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoRename .data.cacheline_aligned to .data..cacheline_aligned.
Tim Abbott [Sat, 20 Feb 2010 00:03:34 +0000 (01:03 +0100)]
Rename .data.cacheline_aligned to .data..cacheline_aligned.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agotags: Add the ability to make tags for all archs using "all"
John Kacur [Tue, 2 Mar 2010 15:57:52 +0000 (16:57 +0100)]
tags: Add the ability to make tags for all archs using "all"

make ALLSOURCE_ARCHS=all tags
- Document this in kbuild.txt
Without this change you have to type each arch separately.

Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agotags: Fix spelling error in comment (is->if)
John Kacur [Tue, 2 Mar 2010 14:38:10 +0000 (15:38 +0100)]
tags: Fix spelling error in comment (is->if)

Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agotags: Use $SRCARCH
Michal Marek [Fri, 19 Feb 2010 15:18:41 +0000 (16:18 +0100)]
tags: Use $SRCARCH

$ make mrproper
$ make tags
  GEN     tags
  find: `arch/x86_64/': No such file or directory

Caused by commit f81b1be (tags: include headers before source files)

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: fix a couple of typos in Documentation
Kirill Smelkov [Wed, 17 Feb 2010 08:45:33 +0000 (11:45 +0300)]
kbuild: fix a couple of typos in Documentation

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agotags: include headers before source files
Guennadi Liakhovetski [Sun, 7 Feb 2010 23:25:59 +0000 (00:25 +0100)]
tags: include headers before source files

Currently looking up a structure definition in TAGS / tags takes one to
one of multiple "static struct X" definitions in arch sources, which makes
it for many structs practically impossible to get to the required header.
This patch changes the order of sources being tagged to first scan
architecture includes, then the top-level include/ directory, and only
then the rest. It also takes into account, that many architectures have
more than one include directory, i.e., not only arch/$ARCH/include, but
also arch/$ARCH/mach-X/include etc.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
[mmarek@suse.cz: fix 'var+=text' bashism]
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agokbuild: move -fno-dwarf2-cfi-asm to powerpc only
Andi Kleen [Tue, 2 Feb 2010 22:40:02 +0000 (14:40 -0800)]
kbuild: move -fno-dwarf2-cfi-asm to powerpc only

Better dwarf2 unwind information is a good thing, it allows better
debugging with kgdb and crash and helps systemtap.

Commit 003086497f07f7f1e67c0c295e261740f822b377 ("Build with
-fno-dwarf2-cfi-asm") disabled some CFI information globally to work
around a module loader bug on powerpc.

But this disables the better unwind tables for all architectures, not just
powerpc.  Move the workaround to powerpc and also add a suitable comment
that's it really a workaround.

This improves dwarf2 unwind tables on x86 at least.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agomarkup_oops.pl: minor fixes
Hui Zhu [Mon, 1 Feb 2010 05:41:22 +0000 (13:41 +0800)]
markup_oops.pl: minor fixes

1. Fix a little format issue.
2. Check the return of "Getopt::Long::GetOptions".  Output usage and
   exit if it get error.
3. Change $ARGV[$#ARGV] to $ARGV[0].
4. Change the code which get $modulefile from modinfo.  Replace the
   pipeline with `modinfo -F filename $module`.
4. Change usage from "Specify the module directory name" to "Specify the
   module filename".

Signed-off-by: Hui Zhu <teawater@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agomarkup_oops.pl: add options to improve cross-sompilation environments
Hui Zhu [Tue, 26 Jan 2010 09:13:07 +0000 (17:13 +0800)]
markup_oops.pl: add options to improve cross-sompilation environments

The markup_oops.pl have 3 troubles to support cross-compiler environment:
1.  It use objdump directly.
2.  It use modinfo to get the message of module.
3.  It use hex function that cannot support 64-bit number in 32-bit arch.

This patch add 3 options to markup_oops.pl:
1. -c CROSS_COMPILE Specify the prefix used for toolchain.
2. -m MODULE_DIRNAME Specify the module directory name.
3. Change hex function to Math::BigInt->from_hex.

After this patch, parse the x8664 oops in x86, we can:
cat amd64m | perl ~/kernel/tmp/m.pl -c /home/teawater/kernel/bin/x8664- -m ./e.ko vmlinux

Thanks,
Hui

Signed-off-by: Hui Zhu <teawater@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: ozan@pardus.org.tr
Cc: Matthew Wilcox <willy@linux.intel.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMerge branch 'modpost' of git://git.pengutronix.de/git/ukl/linux-2.6 into kbuild...
Michal Marek [Tue, 2 Feb 2010 15:21:08 +0000 (16:21 +0100)]
Merge branch 'modpost' of git://git.pengutronix.de/git/ukl/linux-2.6 into kbuild/for-next

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
14 years agoMAINTAINERS: add a few more patterns to kbuild
Michal Marek [Fri, 29 Jan 2010 13:22:43 +0000 (14:22 +0100)]
MAINTAINERS: add a few more patterns to kbuild

Also, add a note that "unmaintained" files below scripts/ should go via
the kbuild tree (best current practice).

Signed-off-by: Michal Marek <mmarek@suse.cz>