Commit Graph

1928 Commits

Author SHA1 Message Date
Linus Torvalds 154dd78d30 Merge branches 'kbuild', 'packaging' and 'misc' 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:
  genksyms: Use same type in loop comparison
  kbuild: silence generated makefile message
  kernel: prevent unnecessary rebuilding due to config_data.gz
  headers_install: fix __packed in exported kernel headers
  dtc: regen parser
  dtc: migrate parser to implicit rules
  kconfig: regen parser
  kconfig: migrate parser to implicit rules
  kconfig/zconf.l: do not ask to generate backup
  kconfig: kill no longer needed reference to YYDEBUG
  kconfig: constify `kconf_id_lookup'
  genksym: regen parser
  genksyms: migrate parser to implicit rules
  genksyms: drop -Wno-uninitialized from HOSTCFLAGS_parse.tab.o
  genksyms: pass hash and lookup functions name and target language though the input file
  kbuild: simplify the %_shipped rule
  kbuild: add implicit rules for parser generation
  kbuild: add `baseprereq'
  kbuild: Fix reference to vermagic.h

* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  package: Makefile: fix perf target bug

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  gitignore: ignore debian build directory
2011-07-25 20:01:57 -07:00
Linus Torvalds d3ec4844d4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  fs: Merge split strings
  treewide: fix potentially dangerous trailing ';' in #defined values/expressions
  uwb: Fix misspelling of neighbourhood in comment
  net, netfilter: Remove redundant goto in ebt_ulog_packet
  trivial: don't touch files that are removed in the staging tree
  lib/vsprintf: replace link to Draft by final RFC number
  doc: Kconfig: `to be' -> `be'
  doc: Kconfig: Typo: square -> squared
  doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
  drivers/net: static should be at beginning of declaration
  drivers/media: static should be at beginning of declaration
  drivers/i2c: static should be at beginning of declaration
  XTENSA: static should be at beginning of declaration
  SH: static should be at beginning of declaration
  MIPS: static should be at beginning of declaration
  ARM: static should be at beginning of declaration
  rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
  Update my e-mail address
  PCIe ASPM: forcedly -> forcibly
  gma500: push through device driver tree
  ...

Fix up trivial conflicts:
 - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
 - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
 - drivers/net/r8169.c (just context changes)
2011-07-25 13:56:39 -07:00
Michal Marek bac6aa865b xconfig: Abort close if configuration cannot be saved
Give the user an opportunity to fix the error or save the configuration
under a different path.

Reported-by: Hiromu Yakura <hiromu1996@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-25 15:50:34 +02:00
Jesper Juhl 1ae14703e7 genksyms: Use same type in loop comparison
The ARRAY_SIZE macro in scripts/genksyms/genksyms.c returns a value of
type size_t. That value is being compared to a variable of type int in
a loop in read_node(). Change the int variable to size_t type as well,
so we don't do signed vs unsigned type comparisons with all the
potential promotion/sign extension trouble that can cause (also
silences compiler warnings at high levels of warnings).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-25 14:55:17 +02:00
Alessio Igor Bogani 62a2635610 modpost: Fix modpost's license checking V3
The commit f02e8a6 sorts symbols placing each of them in its own elf section.
The sorting and merging into the canonical sections are done by the linker.
Unfortunately modpost to generate Module.symvers file parses vmlinux
(already linked) and all modules object files (which aren't linked yet).
These aren't sanitized by the linker yet. That breaks modpost that can't
detect license properly for modules. This patch makes modpost aware of
the new exported symbols structure.

Thanks to Arnaud Lacombe <lacombar@gmail.com> and Anders Kaseorg
<andersk@ksplice.com> for providing useful suggestions about code.

This work was supported by a hardware donation from the CE Linux Forum.

Reported-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-07-24 22:06:05 +09:30
Peter Foley 0ff35771fc kbuild: silence generated makefile message
This patch silences the "make -C /usr/src/git O=/usr/src/git/build/."
message shown when using the generated makefile in KBUILD_OUTDIR.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-20 17:08:08 +02:00
Arnaud Lacombe eb4cf5a642 kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.h
The specialized printer for headers (espectially autoconf.h) is missing
fixup code for S_HEX symbol's "0x" prefix. As long as kconfig does not
warn for such missing prefix, this code is needed. Fix this.

In the same time, fix some nits in `header_print_symbol()'.

Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>

Broken-by: Arnaud Lacombe <lacombar@gmail.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-18 16:29:29 +02:00
Linus Torvalds 6ac556daa7 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: Do not write to builddir in modules_install
2011-07-13 14:16:53 -07:00
Arnaud Lacombe a1e806550e kconfig/nconf: remove useless conditionnal
After the test

	if (!submenu || ...)
		continue;

the variable `submenu' can _not_ be NULL, so do not test for this
situation.

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:54:01 +02:00
Arnaud Lacombe f98ee76955 kconfig/nconf: prevent segfault on empty menu
nconf does not check the validity of the current menu when help is
requested (with either <F2>, '?' or 'h'). This leads to a NULL pointer
dereference when an empty menu is encountered.

The following reduced testcase exposes the problem:

config DEP
        bool

menu "FOO"

config BAR
        bool "BAR"
        depends on DEP

endmenu

Issue will happen when entering menu "FOO" and requesting help.

nconf is the only front-end which do not filter the validity of the
current menu. Such filter can not really happen beforehand as other key
which does not deals with the current menu might be entered by the user,
so just bails out earlier if we encounter an invalid menu.

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:48:11 +02:00
Arnaud Lacombe 5416857867 kconfig/nconf: use the generic menu_get_ext_help()
nconf is the only front-end which does not use this helper, but prefer
to copy/paste the code. The test wrt. menu validity added in this
version of the code is bogus anyway as an invalid menu will get
dereferenced a few line below by calling menu_get_prompt().

For now, convert nconf to use menu_get_ext_help(), as do every other
front-end. We will deals with menu validity checks properly in a
separate commit.

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:48:08 +02:00
Raghavendra D Prabhu e9882ac0e5 nconfig: Avoid Wunused-but-set warning
I am seeing Wunused-but-set warning while make nconfig.  Looks like
active_menu is not used. Removing it fixes the warning.

Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:47:09 +02:00
Michal Marek 8fc62e5942 kbuild: Do not write to builddir in modules_install
Let depmod.sh create a temporary directory in /tmp instead of writing to
the build directory as root. The mktemp utility should be available on
any recent system (and there is already scripts/gen_initramfs_list.sh
relying on it).

Reported-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-12 13:36:30 +02:00
Jiri Kosina b7e9c223be Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that
are based on newer code already present upstream.
2011-07-11 14:15:55 +02:00
Michal Marek 5c74cd4cc7 Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig 2011-07-04 11:24:10 +02:00
Arnaud Lacombe ab63f58f25 kconfig/conf: mark xfgets() private
This function has not much reason to be public. In the mean time, convert
declaration from K&R C to ISO C.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:40 -04:00
Arnaud Lacombe 131c60a95e kconfig: remove pending prototypes for kconfig_load()
Commit 5a6f8d2bd9 removed `kconfig_load()',
however, it missed an hidden prototypes in `lkc.h'. Fix this.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:39 -04:00
Arnaud Lacombe 32543999f3 kconfig/conf: add command line options' description
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:39 -04:00
Arnaud Lacombe 275744cc8d kconfig/conf: reduce the scope of `defconfig_file'
This variable is not used outside of main() so there is not much reason keeping
it global. Ensure it is initialized as gcc has no way to know that normal
execution path expect only one option switch to be given on the command line
(except when we request help). As a result, we always initialize
`defconfig_file' before using it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:38 -04:00
Arnaud Lacombe 8494453ad5 kconfig: use calloc() for expr allocation
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:37 -04:00
Arnaud Lacombe e54e692ba6 kconfig: introduce specialized printer
Make conf_write_symbol() grammar agnostic to be able to use it from different
code path. These path pass a printer callback which will print a symbol's name
and its value in different format.

conf_write_symbol()'s job become mostly only to prepare a string for the
printer. This avoid to have to pass specialized flag to generic
functions

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
[mmarek: rebased on top of de12518 (kconfig: autogenerated config_is_xxx
macro)]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-01 16:23:27 +02:00
Arnaud Lacombe ec6452a5ec kconfig: do not overwrite symbol direct dependency in assignment
Considering the following configuration:

config F
    bool "F"

choice AB
    bool "AB"
config A
    bool "A"
config B
    bool "B"
endchoice

if A
config D
    bool
    default y if F
    select E
config E
    bool "E"
endif

if B
config D
    bool
    default y if F
    select E
config E
    bool "E"
endif

The following configuration:

 CONFIG_F=y
 CONFIG_A=y
 # CONFIG_B is not set
 CONFIG_D=y
 CONFIG_E=y

emits a spurious warning:

(D) selects E which has unmet direct dependencies (B)

If a symbol appears in two different branch of the tree, it should inherit the
dependency of both parent, not just the last one.

Reported-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
Tested-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-24 17:21:27 +02:00
Markus Trippelsdorf f210735fe2 headers_install: fix __packed in exported kernel headers
checkpatch.pl warns about using __attribute__((packed)) in kernel
headers: "__packed is preferred over __attribute__((packed))". If one
follows that advice it could cause problems in the exported header
files, because the outside world doesn't know about this shortcut.

For example busybox will fail to compile:
 CC      miscutils/ubi_attach_detach.o
 In file included from miscutils/ubi_attach_detach.c:27:0:
 /usr/include/mtd/ubi-user.h:330:3: error: conflicting types for ‘__packed’
 /usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here
...

Fix the problem by substituting __packed with __attribute__((packed)) in
the header_install.pl script.

Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
CC: Joe Perches <joe@perches.com>
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-24 16:56:05 +02:00
matt mooney 3bdccc880b package: Makefile: fix perf target bug
Specify --git-dir when building perf targets to allow out-of-tree
builds using O=<build-dir>.

The shell command in `git archive' had to be modified to allow proper
file name expansion of the files listed in MANIFEST.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-24 15:20:55 +02:00
Michal Marek 5e05981b5b Merge branch 'kbuild-implicit-parser-rule' of git://github.com/lacombar/linux-2.6 into kbuild/kbuild 2011-06-23 23:00:16 +02:00
Jesper Juhl f0f3ca8d96 docproc: cleanup brace placement
The placement of the opening brace "{" after 'if' statements in
scripts/docproc.c is inconsistent. Most are placed on the same line as the 'if'
statement itself as per CodingStyle, but a few are not.  This patch cleans up
the inconsistency. We save a few source lines and the file then uses the same
style throughout, which is nice.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-16 20:40:03 +02:00
Jonathan Neuschäfer df0a92c206 scripts/gcc-goto.sh: fix a typo ("suport")
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-16 11:15:22 +02:00
Joe Perches 17441227f6 checkpatch: add warning for uses of printk_ratelimit
Warn about uses of printk_ratelimit() because it uses a global state and
can hide subsequent useful messages.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-15 20:03:59 -07:00
Andrew Murray c443453c6d bootgraph.pl: relax timing information requirements
This patch removes the assumption of the bootgraph.pl script that the
timing information reported by PRINTK_TIME will contain at least one
entry with a time of less than 100 seconds.

Not all boards correctly reset the system timer and in many cases the
inital times reported by PRINTK_TIME is high. When this occurs the
bootchart.pl script fails to give any useful output.

This patch sets the $firsttime variable to the largest value expected
by PRINTK_TIME

Signed-off-by: Andrew Murray <amurray@mpc-data.co.uk>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-13 00:04:57 +02:00
Michal Marek bfe5424a8b kbuild: Hack for depmod not handling X.Y versions
depmod from module-init-tools < 3.13 and the busybox depmod check if the
kernel release starts with <num>.<num>.<num>. To support these versions,
we create a symlink with two numbers prepended.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-09 23:05:54 +02:00
Michal Marek fc4da9a3e6 kbuild: Move depmod call to a separate script
Do not bloat the Makefile with multiline shell statements. No
user-visible change intended.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-09 23:05:54 +02:00
Arnaud Lacombe edfc86aada dtc: regen parser
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:47 -04:00
Arnaud Lacombe 95abef888a dtc: migrate parser to implicit rules
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:46 -04:00
Arnaud Lacombe 2f76b358f9 kconfig: regen parser
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:45 -04:00
Arnaud Lacombe 378dbb2cf5 kconfig: migrate parser to implicit rules
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:44 -04:00
Arnaud Lacombe 674eed8a6a kconfig/zconf.l: do not ask to generate backup
This avoids the creation of a top-level `lex.backup' when the lexer gets
re-generated.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:44 -04:00
Arnaud Lacombe b96a0d0c78 kconfig: kill no longer needed reference to YYDEBUG
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:43 -04:00
Arnaud Lacombe 61f956f576 kconfig: constify `kconf_id_lookup'
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:42 -04:00
Arnaud Lacombe 58ef81c5cf genksym: regen parser
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:42 -04:00
Arnaud Lacombe 880f4499bb genksyms: migrate parser to implicit rules
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:41 -04:00
Arnaud Lacombe 6b19e7e49e genksyms: drop -Wno-uninitialized from HOSTCFLAGS_parse.tab.o
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:40 -04:00
Arnaud Lacombe 45c47d9668 genksyms: pass hash and lookup functions name and target language though the input file
Renaming hash and lookup functions on the command line would reduces its
genericity. Use the .gperf file to pass this information. Do the same for the
target language.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:40 -04:00
Arnaud Lacombe 991d76c950 kbuild: simplify the %_shipped rule
This is needed to have make(1) correctly link the implicit rules which
generate the _shipped file from the lexer/parser to the final file.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:39 -04:00
Arnaud Lacombe 7373f4f83c kbuild: add implicit rules for parser generation
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:38 -04:00
Arnaud Lacombe e0318d85be kbuild: add `baseprereq'
On the same model as `basetarget', it represents the filename of first
prerequisite with directory and extension stripped.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:38 -04:00
Peter Foley 181e976327 kbuild: silence Nothing to be done for 'all' message
This patch silences a Makefile.asm-generic message
by defining a dummy rule for all.

make -f /usr/src/git/scripts/Makefile.asm-generic \
            obj=arch/x86/include/generated/asm
make[1]: Nothing to be done for `all'.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-09 11:48:19 +02:00
Michal Marek 36fee53510 Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig 2011-06-08 18:03:57 +02:00
Michal Marek a61944c251 Merge commit 'v3.0-rc1' into kbuild/kconfig 2011-06-08 16:01:34 +02:00
Michal Marek 2e483528ce Merge commit 'v3.0-rc1' into kbuild/kbuild 2011-06-07 15:37:51 +02:00
Arnaud Lacombe 1ea3ad4e93 kconfig/gconf: silent missing prototype warnings
As the `gconf' frontend is un-maintained, go the easy way by silencing
the "warning: no previous prototype for '<fn>'" warnings.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:23 -04:00
Arnaud Lacombe f8aea775c1 kconfig/gconf: kill deadcode
The only call site of renderer_toggled() has been commented out since Apr. 2003,
as per Linus' Linux history repository:

 commit e7f67eb3c0570aa50c1cc0707b478a6d93bdc255
 Author: Roman Zippel <zippel@linux-m68k.org>
 Date:   Fri Apr 4 04:18:05 2003 -0800

    [PATCH] gconf update

    A gconf update by Romain Li<C3><A9>vin <roms@tilp.info>
    - fixed bug when double-clicking for changing value.
    - expand row when enabling a row with a submenu.
    - various bug fixes

As this result in a warning:

scripts/kconfig/gconf.c:891:13: warning: 'renderer_toggled' defined but not used

just nuke that code.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:22 -04:00
Arnaud Lacombe 5a6f8d2bd9 kconfig: nuke LKC_DIRECT_LINK cruft
This interface is not (and has never been ?) used by any frontend, just get rid
of it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:20 -04:00
Arnaud Lacombe 84250386ef kconfig: nuke reference to SWIG
SWIG is not used (yet?) to create kconfig binding, so there is no point
referencing it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:18 -04:00
Arnaud Lacombe 02d95c96c3 kconfig: add missing <stdlib.h> inclusion
This header is needed when using {m,re}alloc(3) and free(3) function family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:16 -04:00
Arnaud Lacombe dd003306a4 kconfig: add missing <ctype.h> inclusion
This header is needed when using isspace(3) function family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:15 -04:00
Arnaud Lacombe 10a4b2772e kconfig: add missing <stdarg.h> inclusion
This header is needed when using va_{start,end,copy}(3) functions family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:13 -04:00
Arnaud Lacombe 75f1468bea kconfig: fix return code for invalid boolean symbol in conf_set_sym_val()
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:11 -04:00
Arnaud Lacombe d8fc320079 kconfig: annotate non-trivial fall-trough
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:10 -04:00
Linus Torvalds c4a227d89f Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits)
  perf: Fix SIGIO handling
  perf top: Don't stop if no kernel symtab is found
  perf top: Handle kptr_restrict
  perf top: Remove unused macro
  perf events: initialize fd array to -1 instead of 0
  perf tools: Make sure kptr_restrict warnings fit 80 col terms
  perf tools: Fix build on older systems
  perf symbols: Handle /proc/sys/kernel/kptr_restrict
  perf: Remove duplicate headers
  ftrace: Add internal recursive checks
  tracing: Update btrfs's tracepoints to use u64 interface
  tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machine
  ftrace: Set ops->flag to enabled even on static function tracing
  tracing: Have event with function tracer check error return
  ftrace: Have ftrace_startup() return failure code
  jump_label: Check entries limit in __jump_label_update
  ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM
  scripts/tags.sh: Add magic for trace-events for etags too
  scripts/tags.sh: Fix ctags for DEFINE_EVENT()
  x86/ftrace: Fix compiler warning in ftrace.c
  ...
2011-05-28 12:55:55 -07:00
Linus Torvalds e52e713ec3 Merge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs
* 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs:
  Create Documentation/security/, move LSM-, credentials-, and keys-related files from Documentation/   to Documentation/security/, add Documentation/security/00-INDEX, and update all occurrences of Documentation/<moved_file>   to Documentation/security/<moved_file>.
2011-05-27 10:25:02 -07:00
Ingo Molnar d6a72fe465 Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent 2011-05-27 14:28:09 +02:00
Rabin Vincent 9905ce8ad7 ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM
While find_secsym_ndx often finds the unamed local STT_SECTION, if a
section has only one function in it, the ARM toolchain generates the
STT_FUNC symbol before the STT_SECTION, and recordmcount finds this
instead.

This is problematic on ARM because in ARM ELFs, "if a [STT_FUNC] symbol
addresses a Thumb instruction, its value is the address of the
instruction with bit zero set (in a relocatable object, the section
offset with bit zero set)".  This leads to incorrect mcount addresses
being recorded.

Fix this by not using STT_FUNC symbols as the base on ARM.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Link: http://lkml.kernel.org/r/1305134631-31617-1-git-send-email-rabin@rab.in
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-25 19:56:33 -04:00
Steven Rostedt 4d7a2fa876 scripts/tags.sh: Add magic for trace-events for etags too
Seems that Peter Zijlstra treats us emacs users as second class
citizens and the commit:

 commit 15664125f7
 Author: Peter Zijlstra <peterz@infradead.org>
 scripts/tags.sh: Add magic for trace-events

only updated ctags (for vim) and did not do the work to let us
lowly emacs users benefit from such a change.

Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-25 19:56:31 -04:00
Steven Rostedt 50d6828e89 scripts/tags.sh: Fix ctags for DEFINE_EVENT()
The regex to handle DEFINE_EVENT() should not be the same as
the TRACE_EVENT() as the first parameter in DEFINE_EVENT is the
template name, not the event name. We need the second parameter
as that is what the trace_... will use.

Tested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-25 19:56:28 -04:00
Linus Torvalds f3ae1c7520 Merge branch 'kconfig-for-40' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kconfig-for-40' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  xconfig: merge code path to conf_write()
  kconfig: do not record timestamp in .config
  gconfig: Hide unused left treeview when start up the interface
  gconfig: enable rules hint for main treeviews
  MAINTAINERS: Update KCONFIG entry
  kconfig-language: add to hints
  kconfig: Document the new "visible if" syntax
  kconfig: quiet commands when V=0
  kconfig: change update-po-config to reflect new layout of arch/um
  kconfig: make update-po-config work in KBUILD_OUTPUT
  kconfig: rearrange clean-files
  kconfig: change gconf to modify hostprogs-y like nconf and mconf
  kconfig: change qconf to modify hostprogs-y like nconf and mconf
  kconfig: only build kxgettext when needed
  nconfig: Silence unused return values from wattrset
  kconfig: Do not record timestamp in auto.conf and autoconf.h
  kconfig: get rid of unused flags
  kconfig: allow multiple inclusion of the same file
  kconfig: Avoid buffer underrun in choice input
2011-05-25 16:54:01 -07:00
Linus Torvalds 51b550a41c 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:
  export_report: use warn() to issue WARNING, so they go to stderr
  export_report: sort SECTION 2 output
  export_report: do collectcfiles work in perl itself
  kbuild: make versioncheck work in KBUILD_OUTDIR
  kbuild: make includecheck work in KBUILD_OUTDIR
  kbuild: make headerdep work in KBUILD_OUTDIR
  kbuild: add targets to PHONY
  kbuild: don't warn about include/linux/version.h not including itself
  eradicate bashisms in scripts/patch-kernel
2011-05-25 12:04:15 -07:00
Linus Torvalds 62af8163f9 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:
  kbuild: Create a kernel-headers RPM
  rpm-pkg: Fix when current directory is a symlink
  Replace '-' in kernel version with '_'
2011-05-25 12:03:47 -07:00
Joe Perches 0fccc62218 checkpatch: fix defect in printk(KERN_<LEVEL> 80 column exceptions
Currently, printk lines with a only KERN_PREFIX and a quoted string
without a comma or close paren that exceed 80 columns are flagged with a
warning.

ie:
	printk(KERN_WARNING "some long string that extends beond 80 cols..."
	       "and is continued on another line\n");

Allow this form instead of emitting a warning.

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>
2011-05-25 08:39:56 -07:00
Joe Perches b05317221b checkpatch: add <foo>_<level> and MODULE_<BAR> to 80 column exceptions
Many module or file local logging functions use specific prefixes other
than pr|dev|netdev.  Allow all forms like foo_printk and foo_err to be
longer than 80 columns.

Also allow MODULE_<BAR> declarations to be longer than 80 columns.

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>
2011-05-25 08:39:55 -07:00
Joe Perches 428e2fdc4e checkpatch: add check for line continuations in quoted strings
Add a warning for unterminated quoted strings with line continuations as
these frequently add unwanted whitespace.

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>
2011-05-25 08:39:55 -07:00
Michal Marek ac9a126571 Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfig 2011-05-25 15:33:20 +02:00
Michal Marek 4c54f0f846 kconfig: Only generate config_is_xxx for bool and tristate options
For strings and integers, the config_is_xxx macros are useless and
sometimes misleading:

  #define CONFIG_INITRAMFS_SOURCE ""
  #define config_is_initramfs_source() 1

Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-25 15:26:25 +02:00
Arnaud Lacombe d49e46875c xconfig: merge code path to conf_write()
Avoid to have multiple path saving the config. This fixes an error check
miss when the window is being closed and the user requested the config
to be written.

Reported-by: Hiromu Yakura <hiromu1996@gmail.com>
Pointed-out-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-25 15:05:07 +02:00
Geert Uytterhoeven 163d3fe6a2 kbuild: Fix reference to vermagic.h
It's "include/linux/vermagic.h", not "include/vermagic.h"

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-25 12:07:52 +02:00
Linus Torvalds 2bb732cdb4 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:
  kbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o
  scripts/kallsyms.c: fix potential segfault
  scripts/gen_initramfs_list.sh: Convert to a /bin/sh script
  kbuild: Fix GNU make v3.80 compatibility
  kbuild: Fix passing -Wno-* options to gcc 4.4+
  kbuild: move scripts/basic/docproc.c to scripts/docproc.c
  kbuild: Fix Makefile.asm-generic for um
  kbuild: Allow to combine multiple W= levels
  kbuild: Disable -Wunused-but-set-variable for gcc 4.6.0
  Fix handling of backlash character in LINUX_COMPILE_BY name
  kbuild: asm-generic support
  kbuild: implement several W= levels
  kbuild: Fix build with binutils <= 2.19
  initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entries
  kbuild: Allow to override LINUX_COMPILE_BY and LINUX_COMPILE_HOST macros
  kbuild: Drop unused LINUX_COMPILE_TIME and LINUX_COMPILE_DOMAIN macros
  kbuild: Use the deterministic mode of ar
  kbuild: Call gzip with -n
  kbuild: move KALLSYMS_EXTRA_PASS from Kconfig to Makefile
  Kconfig: improve KALLSYMS_ALL documentation

Fix up trivial conflict in Makefile
2011-05-24 13:31:37 -07:00
Arun Sharma 0bd41dfc9f kbuild: Create a kernel-headers RPM
To compile binaries which depend on new kernel interfaces, we need a
kernel-headers RPM

Signed-off-by: Arun Sharma <asharma@fb.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 18:28:29 +02:00
Michal Marek 857c7e4387 rpm-pkg: Fix when current directory is a symlink
The better fix would be to stop using the parent directory (principle of
least surprise), but as long as we use it, use it consistently.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 17:44:00 +02:00
Michal Marek 51f31afd12 Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfig 2011-05-24 17:16:21 +02:00
Arnaud Lacombe bdebd4892e kconfig: do not record timestamp in .config
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 16:13:40 +02:00
Jim Cromie ca995cbf77 export_report: use warn() to issue WARNING, so they go to stderr
Also count CONFIG_MODVERSIONS warnings, and print a NOTE at start of
SECTION 2 if any were issued.  Section 2 will be empty if the build is
lacking this CONFIG_ item, and user may have missed the warnings, as
they're off screen.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 16:07:07 +02:00
Jim Cromie bdabc7a345 export_report: sort SECTION 2 output
Sort SECTION 2 modules by name.  Within those module listings, sort
the symbol providers by name, and remove the count, as it is
misleading; its the kernel-wide count of uses of that symbol, not the
count pertaining to the module being outlined.  (this can be seen by
grepping the output for a single symbol).  The count is still used to
sort the symbols.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 16:07:07 +02:00
Jim Cromie de7b0b4110 export_report: do collectcfiles work in perl itself
Avoid spawning a shell pipeline doing cat, grep, sed, and do it all
inside perl.  The <*.c> globbing construct works at least as far back
as 5.8.9

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

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

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

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
cc: Michal Marek <mmarek@suse.cz>,
cc: linux-kbuild@vger.kernel.org
cc: Arnaud Lacombe lacombar@gmail.com
cc: Stephen Hemminger shemminger@vyatta.com
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 16:07:07 +02:00
Eduardo Silva 6ef3d36eee gconfig: Hide unused left treeview when start up the interface
When the gconfig program starts in full mode view, it shows the
left treeview which belongs to the 'split mode view'. The patch
fix this visual issue.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 15:41:51 +02:00
Eduardo Silva 2626e67402 gconfig: enable rules hint for main treeviews
Due to the large amount of rows in the treeviews, is difficult to
match columns with rows, setting the rules hint to 'true' allows the
treeview to alternate background colors in the rows making the data
more readable.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 15:41:51 +02:00
Linus Torvalds 57d19e80f4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  b43: fix comment typo reqest -> request
  Haavard Skinnemoen has left Atmel
  cris: typo in mach-fs Makefile
  Kconfig: fix copy/paste-ism for dell-wmi-aio driver
  doc: timers-howto: fix a typo ("unsgined")
  perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
  md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
  treewide: fix a few typos in comments
  regulator: change debug statement be consistent with the style of the rest
  Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
  audit: acquire creds selectively to reduce atomic op overhead
  rtlwifi: don't touch with treewide double semicolon removal
  treewide: cleanup continuations and remove logging message whitespace
  ath9k_hw: don't touch with treewide double semicolon removal
  include/linux/leds-regulator.h: fix syntax in example code
  tty: fix typo in descripton of tty_termios_encode_baud_rate
  xtensa: remove obsolete BKL kernel option from defconfig
  m68k: fix comment typo 'occcured'
  arch:Kconfig.locks Remove unused config option.
  treewide: remove extra semicolons
  ...
2011-05-23 09:12:26 -07:00
Linus Torvalds 06f4e926d2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
  macvlan: fix panic if lowerdev in a bond
  tg3: Add braces around 5906 workaround.
  tg3: Fix NETIF_F_LOOPBACK error
  macvlan: remove one synchronize_rcu() call
  networking: NET_CLS_ROUTE4 depends on INET
  irda: Fix error propagation in ircomm_lmp_connect_response()
  irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
  irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
  rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
  be2net: Kill set but unused variable 'req' in lancer_fw_download()
  irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
  atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
  rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
  rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
  rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
  rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
  pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
  isdn: capi: Use pr_debug() instead of ifdefs.
  tg3: Update version to 3.119
  tg3: Apply rx_discards fix to 5719/5720
  ...

Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
as per Davem.
2011-05-20 13:43:21 -07:00
Linus Torvalds df48d8716e 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: (107 commits)
  perf stat: Add more cache-miss percentage printouts
  perf stat: Add -d -d and -d -d -d options to show more CPU events
  ftrace/kbuild: Add recordmcount files to force full build
  ftrace: Add self-tests for multiple function trace users
  ftrace: Modify ftrace_set_filter/notrace to take ops
  ftrace: Allow dynamically allocated function tracers
  ftrace: Implement separate user function filtering
  ftrace: Free hash with call_rcu_sched()
  ftrace: Have global_ops store the functions that are to be traced
  ftrace: Add ops parameter to ftrace_startup/shutdown functions
  ftrace: Add enabled_functions file
  ftrace: Use counters to enable functions to trace
  ftrace: Separate hash allocation and assignment
  ftrace: Create a global_ops to hold the filter and notrace hashes
  ftrace: Use hash instead for FTRACE_FL_FILTER
  ftrace: Replace FTRACE_FL_NOTRACE flag with a hash of ignored functions
  perf bench, x86: Add alternatives-asm.h wrapper
  x86, 64-bit: Fix copy_[to/from]_user() checks for the userspace address limit
  x86, mem: memset_64.S: Optimize memset by enhanced REP MOVSB/STOSB
  x86, mem: memmove_64.S: Optimize memmove by enhanced REP MOVSB/STOSB
  ...
2011-05-19 17:36:08 -07:00
Randy Dunlap d410fa4ef9 Create Documentation/security/,
move LSM-, credentials-, and keys-related files from Documentation/
  to Documentation/security/,
add Documentation/security/00-INDEX, and
update all occurrences of Documentation/<moved_file>
  to Documentation/security/<moved_file>.
2011-05-19 15:59:38 -07:00
Michal Marek d6971822c2 ftrace/kbuild: Add recordmcount files to force full build
Modifications to recordmcount must be performed on all object
files to stay consistent with what the kernel code may expect.
Add the recordmcount files to the main dependencies to make sure
any change to them causes a full recompile.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Link: http://lkml.kernel.org/r/20110517133646.GP13293@sepie.suse.cz
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-19 07:58:28 -04:00
Anders Kaseorg 6845756b29 modpost: Update 64k section support for binutils 2.18.50
Binutils 2.18.50 made a backwards-incompatible change in the way it
writes ELF objects with over 65280 sections, to improve conformance
with the ELF specification and interoperability with other ELF tools.
Specifically, it no longer adds 256 to section indices SHN_LORESERVE
and higher to skip over the reserved range SHN_LORESERVE through
SHN_HIRESERVE; those values are only considered special in the
st_shndx field, and not in other places where section indices are
stored.  See:

http://sourceware.org/bugzilla/show_bug.cgi?id=5900
http://groups.google.com/group/generic-abi/browse_thread/thread/e8bb63714b072e67/6c63738f12cc8a17

Signed-off-by: Anders Kaseorg <andersk@ksplice.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-05-19 16:55:28 +09:30
Alessio Igor Bogani f02e8a6596 module: Sort exported symbols
This patch places every exported symbol in its own section
(i.e. "___ksymtab+printk").  Thus the linker will use its SORT() directive
to sort and finally merge all symbol in the right and final section
(i.e. "__ksymtab").

The symbol prefixed archs use an underscore as prefix for symbols.
To avoid collision we use a different character to create the temporary
section names.

This work was supported by a hardware donation from the CE Linux Forum.

Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (folded in '+' fixup)
Tested-by: Dirk Behme <dirk.behme@googlemail.com>
2011-05-19 16:55:27 +09:30
Jean Delvare e05503ef11 Haavard Skinnemoen has left Atmel
Haavard's e-mail address at Atmel is no longer valid.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-18 23:24:50 +02:00
Jean-Christophe PLAGNIOL-VILLARD de125187dc kconfig: autogenerated config_is_xxx macro
this will allow to use to use

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

in the code instead of

	#ifdef CONFIG_xxx
	#ifdef CONFIG_xxx_MODULE

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

as done in the mach-types for arm as exmaple

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-17 15:59:23 +02:00
John W. Linville e00cf3b9eb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn-tx.c
	net/mac80211/sta_info.h
2011-05-16 19:32:19 -04:00
Martin Schwidefsky f296388682 ftrace/s390: mcount offset calculation
Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch]
at compile time and not in ftrace_call_adjust at run time.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-16 15:05:06 -04:00
Martin Schwidefsky 521ccb5c4a ftrace/x86: mcount offset calculation
Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch]
at compile time and not in ftrace_call_adjust at run time.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-16 14:55:57 -04:00
Martin Schwidefsky 07d8b595f3 ftrace/recordmcount: mcount address adjustment
Introduce mcount_adjust{,_32,_64} to the C implementation of
recordmcount analog to $mcount_adjust in the perl script.
The adjustment is added to the address of the relocations
against the mcount symbol. If this adjustment is done by
recordmcount at compile time the ftrace_call_adjust function
can be turned into a nop.

Cc: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-16 14:53:22 -04:00
Steven Rostedt 41b402a201 ftrace/recordmcount: Add helper function get_sym_str_and_relp()
The code to get the symbol, string, and relp pointers in the two functions
sift_rel_mcount() and nop_mcount() are identical and also non-trivial.
Moving this duplicate code into a single helper function makes the code
easier to read and more maintainable.

Cc: John Reiser <jreiser@bitwagon.com>
Link: http://lkml.kernel.org/r/20110421023739.723658553@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-16 14:48:55 -04:00
Steven Rostedt 37762cb997 ftrace/recordmcount: Remove duplicate code to find mcount symbol
The code in sift_rel_mcount() and nop_mcount() to get the mcount symbol
number is identical. Replace the two locations with a call to a function
that does the work.

Cc: John Reiser <jreiser@bitwagon.com>
Link: http://lkml.kernel.org/r/20110421023739.488093407@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-16 14:48:02 -04:00
Steven Rostedt 85356f8022 kbuild/recordmcount: Add RECORDMCOUNT_WARN to warn about mcount callers
When mcount is called in a section that ftrace will not modify it into
a nop, we want to warn about this. But not warn about this always. Now
if the user builds the kernel with the option RECORDMCOUNT_WARN=1 then
the build will warn about mcount callers that are ignored and will just
waste execution time.

Acked-by: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Link: http://lkml.kernel.org/r/20110421023738.714956282@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-16 14:45:03 -04:00