aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2010-02-02Improve kconfig symbol hashingAndi Kleen4-17/+21
While looking for something else I noticed that the symbol hash function used by kconfig is quite poor. It doesn't use any of the standard hash techniques but simply adds up the string and then uses power of two masking, which is both known to perform poorly. The current x86 kconfig has over 7000 symbols. When I instrumented it showed that the minimum hash chain length was 16 and a significant number of them was over 30. It didn't help that the hash table size was only 256 buckets. This patch increases the hash table size to a larger prime and switches to a FNV32 hash. I played around with a couple of hash functions, but that one seemed to perform best with reasonable hash table sizes. Increasing the hash table size even further didn't seem like a good idea, because there are a couple of global walks which walk the complete hash table. I also moved the unnamed bucket to 0. It's still the longest of all the buckets (44 entries), but hopefully it's not often hit except for the global walk which doesn't care. The result is a much nicer distribution: (first column bucket length, second number of buckets with that length) 1: 3505 2: 1236 3: 294 4: 52 5: 3 47: 1 <--- this is the unnamed symbols bucket There are still some 5+ buckets, but increasing the hash table even more would be likely not worth it. This also cleans up the code slightly by removing hard coded magic numbers. I didn't notice a big performance difference either way on my Nehalem system, but I presume it'll help somewhat on slower systems. Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02nconfig: minor fixNir Tzachar1-3/+3
This patch fixes two problems reported by Jan Engelhardt: 1) Border is now properly placed, to always be visible 2) Long menu items are properly displayed Reported-by: Jan Engelhardt <[email protected]> Signed-off-by: Nir Tzachar <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02nconfig: mark local functions as suchMichal Marek2-15/+15
scripts/kconfig/nconf.gui.c:23: warning: no previous prototype for 'set_normal_colors' scripts/kconfig/nconf.gui.c:68: warning: no previous prototype for 'normal_color_theme' scripts/kconfig/nconf.gui.c:100: warning: no previous prototype for 'no_colors_theme' scripts/kconfig/nconf.c:455: warning: no previous prototype for 'process_special_keys' scripts/kconfig/nconf.c:487: warning: no previous prototype for 'get_next_hot' scripts/kconfig/nconf.c:506: warning: no previous prototype for 'canbhot' scripts/kconfig/nconf.c:514: warning: no previous prototype for 'is_hot' scripts/kconfig/nconf.c:522: warning: no previous prototype for 'make_hot' scripts/kconfig/nconf.c:582: warning: no previous prototype for 'item_make' scripts/kconfig/nconf.c:626: warning: no previous prototype for 'item_add_str' scripts/kconfig/nconf.c:656: warning: no previous prototype for 'item_tag' scripts/kconfig/nconf.c:668: warning: no previous prototype for 'curses_item_index' scripts/kconfig/nconf.c:673: warning: no previous prototype for 'item_data' scripts/kconfig/nconf.c:684: warning: no previous prototype for 'item_is_tag' scripts/kconfig/nconf.c:691: warning: no previous prototype for 'set_config_filename' Signed-off-by: Michal Marek <[email protected]>
2010-02-02kconfig: new configuration interface (nconfig)[email protected]10-20/+2314
This patch was inspired by the kernel projects page, where an ncurses replacement for menuconfig was mentioned (by Sam Ravnborg). Building on menuconfig, this patch implements a more modern look interface using ncurses and ncurses' satellite libraries (menu, panel, form). The implementation does not depend on lxdialog, which is currently distributed with the kernel. Signed-off-by: Nir Tzachar <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02genksyms: close ref_file after useAlexander Beregalov1-1/+3
It is the last place when the file is read, so close it. Signed-off-by: Alexander Beregalov <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02menuconfig: wrap long help linesVadim Bendebury (вб)4-2/+33
Help text for certain config options is very extensive (the text includes the names of all other options the option in question depends on). Long lines are not wrapped, making it impossible to see the list without scrolling horizontally. This patch adds some logic which wraps help screen lines at word boundaries to prevent truncating. Tested by running ARCH=powerpc make menuconfig O=/tmp/build which shows that the long lines are now wrapped, and ARCH=powerpc make xconfig O=/tmp/build to demonstrate that it still compiles and operates as expected. Signed-off-by: Vadim Bendebury <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02scripts: add ARM support to decodecodeRabin Vincent1-13/+35
This patch adds support for decoding ARM oopses to scripts/decodecode. The following things are handled: - ARCH and CROSS_COMPILE environment variables are respected. - The Code: in x86 oopses is in bytes, while it is in either words (4 bytes) or halfwords for ARM. - Some versions of ARM objdump refuse to disassemble instructions generated by literal constants (".word 0x..."). The workaround is to strip the object file first. - The faulting instruction is marked (liked so) in ARM, but <like so> in x86. - ARM mnemonics may include characters such as [] which need to be escaped before being passed to sed for the "<- trapping instruction" substitution. Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02kbuild: Fix linking error built-in.o no such file or directoryJiafu He1-1/+1
This patch fixes the link error "built-in.o: no such file or directory". The problem happens if "dirx/Makefile" contains only "obj-m += diry/ dirz/" and the empty "dirx/built-in.o" is missing. Adding $(subdir-m) into check for builtin-target fixes this error. Signed-off-by: Jiafu He <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-01-30modpost: don't allow *driver to reference .init.*Uwe Kleine-König1-1/+10
Signed-off-by: Uwe Kleine-König <[email protected]>
2010-01-30modpost: make symbol white list a per mismatch type variableUwe Kleine-König1-18/+31
Signed-off-by: Uwe Kleine-König <[email protected]>
2010-01-30modpost: remove now unused NO_MISMATCH constantUwe Kleine-König1-3/+0
Signed-off-by: Uwe Kleine-König <[email protected]>
2010-01-30modpost: pass around const struct sectioncheck * instead of enum mismatchUwe Kleine-König1-7/+9
This prepares having a per-check whitelist of symbol names. Signed-off-by: Uwe Kleine-König <[email protected]>
2010-01-30modpost: give most mismatch constants a better nameUwe Kleine-König1-28/+28
Signed-off-by: Uwe Kleine-König <[email protected]>
2010-01-29modpost: define ALL_XXX{IN,EX}IT_SECTIONSUwe Kleine-König1-6/+9
Signed-off-by: Uwe Kleine-König <[email protected]>
2010-01-29modpost: members of *driver structs should not point to __init functionsUwe Kleine-König1-1/+1
Either the functions referred to in a driver struct should live in .devinit or the driver should be registered using platform_driver_probe (or equivalent for different driver types) with ->probe being NULL. Signed-off-by: Uwe Kleine-König <[email protected]>
2010-01-17modpost: fix segfault in sym_is() with prefixed archesMike Frysinger1-1/+1
The sym_is() compares a symbol in an attempt to automatically skip symbol prefixes. It does this first by searching the real symbol with the normal unprefixed symbol. But then it uses the length of the original symbol to check the end of the substring instead of the length of the symbol it is looking for. On non-prefixed arches, this is effectively the same thing, so there is no problem. On prefixed-arches, since this is exceeds by just one byte, a crash is rare and it is usually a NUL byte anyways. But every once in a blue moon, you get the right page alignment and it segfaults. For example, on the Blackfin arch, sym_is() will be called with the real symbol "___mod_usb_device_table" as "symbol" when looking for the normal symbol "__mod_usb_device_table" as "name". The substring will thus return one byte into "symbol" and store it into "match". But then "match" will be indexed with the length of "symbol" instead of "name" and so we will exceed the storage. i.e. the code ends up doing: char foo[] = "abc"; return foo[strlen(foo)+1] == '\0'; Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Rusty Russell <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-01-16Merge branch 'tracing-fixes-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: tracing/filters: Add comment for match callbacks tracing/filters: Fix MATCH_FULL filter matching for PTR_STRING tracing/filters: Fix MATCH_MIDDLE_ONLY filter matching lib: Introduce strnstr() tracing/filters: Fix MATCH_END_ONLY filter matching tracing/filters: Fix MATCH_FRONT_ONLY filter matching ftrace: Fix MATCH_END_ONLY function filter tracing/x86: Derive arch from bits argument in recordmcount.pl ring-buffer: Add rb_list_head() wrapper around new reader page next field ring-buffer: Wrap a list.next reference with rb_list_head()
2010-01-16markup_oops.pl: fix error with x86Hui Zhu1-1/+1
When I try to use markup_oops.pl in x86, I always get: cat 1 | perl markup_oops.pl ./vmlinux objdump: --start-address: bad number: NaN No matching code found This is because in line: if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) { $function = $1; $func_offset = $2; } $func_offset will get a number like "0x2" But in follow code: my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset"); It add other ox to ox2. Then this value will be set to NaN. So I made a small patch to fix it. Signed-off-by: Hui Zhu <[email protected]> Acked-by: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-01-13kbuild: really fix bzImage build with non-bash shJonathan Nieder1-2/+7
In an x86 build with CONFIG_KERNEL_LZMA enabled and dash as sh, arch/x86/boot/compressed/vmlinux.bin.lzma ends with '\xf0\x7d\x39\x00' (16 bytes) instead of the 4 bytes intended and the resulting vmlinuz fails to boot. This improves on the previous behavior, in which the file contained the characters '-ne ' as well, but not by much. Previous commits replaced "echo -ne" first with "/bin/echo -ne", then "printf" in the hope of improving portability, but none of these commands is guaranteed to support hexadecimal escapes on POSIX systems. So use the shell to convert from hexadecimal to octal. With this change, an LZMA-compressed kernel built with dash as sh boots correctly again. Reported-by: Sebastian Dalfuß <[email protected]> Reported-by: Oliver Hartkopp <[email protected]> Reported-by: Michael Guntsche <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Cc: Michael Tokarev <[email protected]> Cc: Alek Du <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-01-12remove my email address from checkpatch.Dave Jones1-1/+1
Maybe this will stop people emailing me about it. Signed-off-by: Dave Jones <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-01-11tracing/x86: Derive arch from bits argument in recordmcount.plJan Kiszka1-1/+1
Let the arch argument be overruled by bits. Otherwise, building of external modules against a i386 target on a x86-64 host (and likely vice versa as well) fails unless ARCH=i386 is explicitly passed to make. Signed-off-by: Jan Kiszka <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-01-11scripts/get_maintainer.pl: fix file exclusion X: logicJoe Perches1-30/+54
The following command doesn't generate any output. `./scripts/get_maintainer.pl --no-git -f drivers/net/wireless/wl12xx/wl1271_acx.c` An excluded "X:" pattern match in any section would cause a file not to match any other section. Signed-off-by: Joe Perches <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-01-11lib: add support for LZO-compressed kernelsAlbin Tonnerre1-0/+5
This patch series adds generic support for creating and extracting LZO-compressed kernel images, as well as support for using such images on the x86 and ARM architectures, and support for creating and using LZO-compressed initrd and initramfs images. Russell King said: : Testing on a Cortex A9 model: : - lzo decompressor is 65% of the time gzip takes to decompress a kernel : - lzo kernel is 9% larger than a gzip kernel : : which I'm happy to say confirms your figures when comparing the two. : : However, when comparing your new gzip code to the old gzip code: : - new is 99% of the size of the old code : - new takes 42% of the time to decompress than the old code : : What this means is that for a proper comparison, the results get even better: : - lzo is 7.5% larger than the old gzip'd kernel image : - lzo takes 28% of the time that the old gzip code took : : So the expense seems definitely worth the effort. The only reason I : can think of ever using gzip would be if you needed the additional : compression (eg, because you have limited flash to store the image.) : : I would argue that the default for ARM should therefore be LZO. This patch: The lzo compressor is worse than gzip at compression, but faster at extraction. Here are some figures for an ARM board I'm working on: Uncompressed size: 3.24Mo gzip 1.61Mo 0.72s lzo 1.75Mo 0.48s So for a compression ratio that is still relatively close to gzip, it's much faster to extract, at least in that case. This part contains: - Makefile routine to support lzo compression - Fixes to the existing lzo compressor so that it can be used in compressed kernels - wrapper around the existing lzo1x_decompress, as it only extracts one block at a time, while we need to extract a whole file here - config dialog for kernel compression [[email protected]: coding-style fixes] [[email protected]: cleanup] Signed-off-by: Albin Tonnerre <[email protected]> Tested-by: Wu Zhangjin <[email protected]> Acked-by: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Tested-by: Russell King <[email protected]> Acked-by: Russell King <[email protected]> Cc: Ralf Baechle <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-01-06tracing: Use appropriate perl constructs in recordmcount.plWolfram Sang1-18/+11
Modified recordmcount.pl to use perl constructs that are still understandable by C hackers that are not perl programmers. Signed-off-by: Wolfram Sang <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-01-06kconfig: Check for if conditions in Kconfig for localmodconfigSteven Rostedt1-0/+26
The streamline_config.pl misses the if conditions for checking dependencies. For Kconfigs with the following construct: if MEDIA_SUPPORT config VIDEO_DEV [...] If VIDEO_DEV was enabled, the script will miss the fact that MEDIA_SUPPORT is also needed. This patch changes streamline_config.pl to include if conditions into the dependencies of configs. Reported-by: Anton Blanchard <[email protected]> Tested-by: Anton Blanchard <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-01-06kconfig: Create include/generated for localmodconfigSteven Rostedt1-0/+2
If someone downloads a brand new kernel and runs localmodconfig or localyesconfig, the ending result will report: *** Error during update of the kernel configuration. This is because localmodconfig and localyesconfig must create the include/generated directory to place the autoconf.h file. Signed-off-by: Steven Rostedt <[email protected]>
2010-01-06tracing: optimize recordmcount.pl for offsets-handlingWolfram Sang1-9/+9
- move check for open file in front of the writing loop - use perl-constructs to access the array Signed-off-by: Wolfram Sang <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2009-12-17Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds2-3/+56
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (71 commits) MIPS: Lasat: Fix botched changes to sysctl code. RTC: rtc-cmos.c: Fix warning on MIPS MIPS: Cleanup random differences beween lmo and Linus' kernel. MIPS: No longer hardwire CONFIG_EMBEDDED to y MIPS: Fix and enhance built-in kernel command line MIPS: eXcite: Remove platform. MIPS: Loongson: Cleanups of serial port support MIPS: Lemote 2F: Suspend CS5536 MFGPT Timer MIPS: Excite: move iodev_remove to .devexit.text MIPS: Lasat: Convert to proc_fops / seq_file MIPS: Cleanup signal code initialization MIPS: Modularize COP2 handling MIPS: Move EARLY_PRINTK to Kconfig.debug MIPS: Yeeloong 2F: Cleanup reset logic using the new ec_write function MIPS: Yeeloong 2F: Add LID open event as the wakeup event MIPS: Yeeloong 2F: Add basic EC operations MIPS: Move several variables from .bss to .init.data MIPS: Tracing: Make function graph tracer work with -mmcount-ra-address MIPS: Tracing: Reserve $12(t0) for mcount-ra-address of gcc 4.5 MIPS: Tracing: Make ftrace for MIPS work without -fno-omit-frame-pointer ...
2009-12-17Merge branch 'for-33' of git://repo.or.cz/linux-kbuildLinus Torvalds15-243/+429
* 'for-33' of git://repo.or.cz/linux-kbuild: (29 commits) net: fix for utsrelease.h moving to generated gen_init_cpio: fixed fwrite warning kbuild: fix make clean after mismerge kbuild: generate modules.builtin genksyms: properly consider EXPORT_UNUSED_SYMBOL{,_GPL}() score: add asm/asm-offsets.h wrapper unifdef: update to upstream revision 1.190 kbuild: specify absolute paths for cscope kbuild: create include/generated in silentoldconfig scripts/package: deb-pkg: use fakeroot if available scripts/package: add KBUILD_PKG_ROOTCMD variable scripts/package: tar-pkg: use tar --owner=root Kbuild: clean up marker net: add net_tstamp.h to headers_install kbuild: move utsrelease.h to include/generated kbuild: move autoconf.h to include/generated drop explicit include of autoconf.h kbuild: move compile.h to include/generated kbuild: drop include/asm kbuild: do not check for include/asm-$ARCH ... Fixed non-conflicting clean merge of modpost.c as per comments from Stephen Rothwell (modpost.c had grown an include of linux/autoconf.h that needed to be changed to generated/autoconf.h)
2009-12-17MIPS: Tracing: Add dynamic function tracer supportWu Zhangjin1-0/+52
With dynamic function tracer, by default, _mcount is defined as an "empty" function, it returns directly without any more action . When enabling it in user-space, it will jump to a real tracing function(ftrace_caller), and do the real job for us. Differ from the static function tracer, dynamic function tracer provides two functions ftrace_make_call()/ftrace_make_nop() to enable/disable the tracing of some indicated kernel functions(set_ftrace_filter). In the -v4 version, the implementation of this support is basically the same as X86 version does: _mcount is implemented as an empty function and ftrace_caller is implemented as a real tracing function respectively. But in this version, to support module tracing with the help of -mlong-calls in arch/mips/Makefile: MODFLAGS += -mlong-calls. The stuff becomes a little more complex. We need to cope with two different type of calling to _mcount. For the kernel part, the calling to _mcount(result of "objdump -hdr vmlinux"). is like this: 108: 03e0082d move at,ra 10c: 0c000000 jal 0 <fpcsr_pending> 10c: R_MIPS_26 _mcount 10c: R_MIPS_NONE *ABS* 10c: R_MIPS_NONE *ABS* 110: 00020021 nop For the module with -mlong-calls, it looks like this: c: 3c030000 lui v1,0x0 c: R_MIPS_HI16 _mcount c: R_MIPS_NONE *ABS* c: R_MIPS_NONE *ABS* 10: 64630000 daddiu v1,v1,0 10: R_MIPS_LO16 _mcount 10: R_MIPS_NONE *ABS* 10: R_MIPS_NONE *ABS* 14: 03e0082d move at,ra 18: 0060f809 jalr v1 In the kernel version, there is only one "_mcount" string for every kernel function, so, we just need to match this one in mcount_regex of scripts/recordmcount.pl, but in the module version, we need to choose one of the two to match. Herein, I choose the first one with "R_MIPS_HI16 _mcount". and In the kernel verion, without module tracing support, we just need to replace "jal _mcount" by "jal ftrace_caller" to do real tracing, and filter the tracing of some kernel functions via replacing it by a nop instruction. but as we have described before, the instruction "jal ftrace_caller" only left 32bit length for the address of ftrace_caller, it will fail when calling from the module space. so, herein, we must replace something else. the basic idea is loading the address of ftrace_caller to v1 via changing these two instructions: lui v1,0x0 addiu v1,v1,0 If we want to enable the tracing, we need to replace the above instructions to: lui v1, HI_16BIT_ftrace_caller addiu v1, v1, LOW_16BIT_ftrace_caller If we want to stop the tracing of the indicated kernel functions, we just need to replace the "jalr v1" to a nop instruction. but we need to replace two instructions and encode the above two instructions oursevles. Is there a simpler solution? Yes! Here it is, in this version, we put _mcount and ftrace_caller together, which means the address of _mcount and ftrace_caller is the same: _mcount: ftrace_caller: j ftrace_stub nop ...(do real tracing here)... ftrace_stub: jr ra move ra, at By default, the kernel functions call _mcount, and then jump to ftrace_stub and return. and when we want to do real tracing, we just need to remove that "j ftrace_stub", and it will run through the two "nop" instructions and then do the real tracing job. what about filtering job? we just need to do this: lui v1, hi_16bit_of_mcount <--> b 1f (0x10000004) addiu v1, v1, low_16bit_of_mcount move at, ra jalr v1 nop 1f: (rec->ip + 12) In linux-mips64, there will be some local symbols, whose name are prefixed by $L, which need to be filtered. thanks goes to Steven for writing the mips64-specific function_regex. In a conclusion, with RISC, things becomes easier with such a "stupid" trick, RISC is something like K.I.S.S, and also, there are lots of "simple" tricks in the whole ftrace support, thanks goes to Steven and the other folks for providing such a wonderful tracing framework! Signed-off-by: Wu Zhangjin <[email protected]> Cc: Nicholas Mc Guire <[email protected]> Cc: [email protected] Cc: Wu Zhangjin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: http://patchwork.linux-mips.org/patch/675/ Acked-by: Steven Rostedt <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-12-17MIPS: Tracing: Add an endian argument to scripts/recordmcount.plWu Zhangjin2-3/+4
MIPS and some other architectures need this argument to handle big/little endian respectively. Signed-off-by: Wu Zhangjin <[email protected]> Cc: Nicholas Mc Guire <[email protected]> Cc: [email protected] Cc: Wu Zhangjin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: http://patchwork.linux-mips.org/patch/674/ Acked-by: Steven Rostedt <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-12-16Merge branch 'module' of ↵Linus Torvalds5-179/+17
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * 'module' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: modpost: fix segfault with short symbol names module: handle ppc64 relocating kcrctabs when CONFIG_RELOCATABLE=y Kbuild: clear marker out of modpost module: make MODULE_SYMBOL_PREFIX into a CONFIG option ARM: unexport symbols used to implement floating point emulation ARM: use unified discard definition in linker script x86: don't export inline function sparc64: don't export static inline pci_ functions
2009-12-15scripts/get_maintainer.pl: support multiple VCSs - add mercurialJoe Perches1-93/+168
Restructure a bit for multiple version control systems support. Use a hash for each supported VCS that contains the commands and patterns used to find commits, logs, and signers. --git command line options are still used for hg except for --git-since. Use --hg-since instead. The number of commits can differ for git and hg, so --rolestats might be different. Style changes: Use common push style push(@foo...), simplify a return Bumped version to 0.23. Signed-off-by: Joe Perches <[email protected]> Cc: Marti Raudsepp <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-12-15scripts/get_maintainer.pl: fix --non with --git-blame and cleanupsJoe Perches1-94/+104
Fix email matching without name --n and --git-blame Using --non and --git-blame caused maintainer signature matching to fail. Fixed that by adding 3rd argument to sub format_email to control show/hide name portion of address Slurp -f file instead of reading line-by-line for K: pattern matching. Suggested by Wolfram Sang as more efficient Refactor git command execution Break into 2 functions, execute/analyze Share code between --git and --git-blame Don't warn multiple times when git isn't installed Improve stats reporting --git-min-percent and -- rolestats now count the total number of commits for either the period of --git-since or if using --git-blame the commits used by the current file and calculate commit % as # of commits signed / total commits * 100 Code style cleaning Use consistent sub foo { my (args...) = @_; Signed-off-by: Joe Perches <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Greg KH <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Wolfram Sang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-12-15scripts/get_maintainer.pl: add --roles and --rolestatsJoe Perches1-18/+176
--roles shows the role of each email address, i.e. why it was selected. --rolestats selects --roles and adds git log/blame signers #'s and % Multiple roles are possible (supporter, maintainer, git-signer...) --roles or --rolestats is meant to help identify appropriate maintainers to notify and should not be used with "git send-email --cc-cmd" Example output: Existing: $ ./scripts/get_maintainer.pl -f arch/x86/kernel/acpi/boot.c Corentin Chary <[email protected]> Karol Kozimor <[email protected]> Len Brown <[email protected]> Pavel Machek <[email protected]> Rafael J. Wysocki <[email protected]> Thomas Gleixner <[email protected]> Ingo Molnar <[email protected]> H. Peter Anvin <[email protected]> [email protected] Yinghai Lu <[email protected]> Jeremy Fitzhardinge <[email protected]> [email protected] [email protected] [email protected] With --roles $ ./scripts/get_maintainer.pl --roles -f arch/x86/kernel/acpi/boot.c Corentin Chary <[email protected]> (maintainer:ASUS ACPI EXTRAS...) Karol Kozimor <[email protected]> (maintainer:ASUS ACPI EXTRAS...) Len Brown <[email protected]> (supporter:SUSPEND TO RAM,git-signer) Pavel Machek <[email protected]> (supporter:SUSPEND TO RAM) Rafael J. Wysocki <[email protected]> (supporter:SUSPEND TO RAM) Thomas Gleixner <[email protected]> (maintainer:X86 ARCHITECTURE...) Ingo Molnar <[email protected]> (maintainer:X86 ARCHITECTURE...,git-signer) H. Peter Anvin <[email protected]> (maintainer:X86 ARCHITECTURE...) [email protected] (maintainer:X86 ARCHITECTURE...) Yinghai Lu <[email protected]> (git-signer) Jeremy Fitzhardinge <[email protected]> (git-signer) [email protected] (open list:ASUS ACPI EXTRAS...) [email protected] (open list:SUSPEND TO RAM) [email protected] (open list) With --rolestats $ ./scripts/get_maintainer.pl --rolestats -f arch/x86/kernel/acpi/boot.c Corentin Chary <[email protected]> (maintainer:ASUS ACPI EXTRAS...) Karol Kozimor <[email protected]> (maintainer:ASUS ACPI EXTRAS...) Len Brown <[email protected]> (supporter:SUSPEND TO RAM,git-signer:16/79=20%) Pavel Machek <[email protected]> (supporter:SUSPEND TO RAM) Rafael J. Wysocki <[email protected]> (supporter:SUSPEND TO RAM) Thomas Gleixner <[email protected]> (maintainer:X86 ARCHITECTURE...) Ingo Molnar <[email protected]> (maintainer:X86 ARCHITECTURE...,git-signer:29/79=37%) H. Peter Anvin <[email protected]> (maintainer:X86 ARCHITECTURE...) [email protected] (maintainer:X86 ARCHITECTURE...) Yinghai Lu <[email protected]> (git-signer:12/79=15%) Jeremy Fitzhardinge <[email protected]> (git-signer:6/79=8%) [email protected] (open list:ASUS ACPI EXTRAS...) [email protected] (open list:SUSPEND TO RAM) [email protected] (open list) With --rolestats and --git-blame $ ./scripts/get_maintainer.pl --rolestats --git-blame -f arch/x86/kernel/acpi/boot.c Corentin Chary <[email protected]> (maintainer:ASUS ACPI EXTRAS...) Karol Kozimor <[email protected]> (maintainer:ASUS ACPI EXTRAS...) Len Brown <[email protected]> (supporter:SUSPEND TO RAM,git-signer:16/79=20%,commits:22/154=14%) Pavel Machek <[email protected]> (supporter:SUSPEND TO RAM) Rafael J. Wysocki <[email protected]> (supporter:SUSPEND TO RAM) Thomas Gleixner <[email protected]> (maintainer:X86 ARCHITECTURE...) Ingo Molnar <[email protected]> (maintainer:X86 ARCHITECTURE...,git-signer:29/79=37%,commits:36/154=23%) H. Peter Anvin <[email protected]> (maintainer:X86 ARCHITECTURE...) [email protected] (maintainer:X86 ARCHITECTURE...) Yinghai Lu <[email protected]> (git-signer:12/79=15%,commits:9/154=6%) Jeremy Fitzhardinge <[email protected]> (git-signer:6/79=8%) Andi Kleen <[email protected]> (commits:11/154=7%) Andrew Morton <[email protected]> (commits:10/154=6%) [email protected] (open list:ASUS ACPI EXTRAS...) [email protected] (open list:SUSPEND TO RAM) [email protected] (open list) Other changes: Format git-signers email addresses a bit to reduce bad signatures Command line bad arguments emitted a verbose usage(), just show --help Version number bumped to .22 Ben Hutchings had the idea and created a good deal of this implementation. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> Cc: Greg KH <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-12-15modpost: fix segfault with short symbol namesMichal Marek1-2/+2
memcmp() is wrong here, the symbol name can be shorter than KSYMTAB_PFX or CRC_PFX. Signed-off-by: Michal Marek <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2009-12-15Kbuild: clear marker out of modpostWenji Huang2-167/+0
Remove the unnecessary functions and variables. Signed-off-by: Wenji Huang <[email protected]> Signed-off-by: Michal Marek <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2009-12-15module: make MODULE_SYMBOL_PREFIX into a CONFIG optionAlan Jenkins4-10/+15
The next commit will require the use of MODULE_SYMBOL_PREFIX in .tmp_exports-asm.S. Currently it is mixed in with C structure definitions in "asm/module.h". Move the definition of this arch option into Kconfig, so it can be easily accessed by any code. This also lets modpost.c use the same definition. Previously modpost relied on a hardcoded list of architectures in mk_elfconfig.c. A build test for blackfin, one of the two MODULE_SYMBOL_PREFIX archs, showed the generated code was unchanged. vmlinux was identical save for build ids, and an apparently randomized suffix on a single "__key" symbol in the kallsyms data). Signed-off-by: Alan Jenkins <[email protected]> Acked-by: Mike Frysinger <[email protected]> (blackfin) CC: Sam Ravnborg <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2009-12-14microblaze: ftrace: Add dynamic trace supportMichal Simek1-0/+3
With dynamic function tracer, by default, _mcount is defined as an "empty" function, it returns directly without any more action. When enabling it in user-space, it will jump to a real tracing function(ftrace_caller), and do the real job for us. Differ from the static function tracer, dynamic function tracer provides two functions ftrace_make_call()/ftrace_make_nop() to enable/disable the tracing of some indicated kernel functions(set_ftrace_filter). In the kernel version, there is only one "_mcount" string for every kernel function, so, we just need to match this one in mcount_regex of scripts/recordmcount.pl. For more information please look at code and Documentation/trace folder. Steven ACK that scripts/recordmcount.pl part. Acked-by: Steven Rostedt <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-12-12kbuild: generate modules.builtinMichal Marek3-1/+82
To make it easier for module-init-tools and scripts like mkinitrd to distinguish builtin and missing modules, install a modules.builtin file listing all builtin modules. This is done by generating an additional config file (tristate.conf) with tristate options set to uppercase 'Y' or 'M'. If we source that config file, the builtin modules appear in obj-Y. Signed-off-by: Michal Marek <[email protected]>
2009-12-12genksyms: properly consider EXPORT_UNUSED_SYMBOL{,_GPL}()Jan Beulich2-94/+99
Despite being unused these should also get a CRC calculated. Primarily I view this as a consistency thing. But I also think this is one of the reasons why __crc_* need to be weak (which I think should be avoided, and hence we should have the goal to eliminate this so that failure to calculate a proper CRC for a symbol causes the build to fail). Signed-off-by: Jan Beulich <[email protected]> Cc: Anibal Monsalve Salazar <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Sam Ravnborg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2009-12-12unifdef: update to upstream revision 1.190Tony Finch1-134/+207
Fix handling of input files (e.g. with no newline at EOF) that could make unifdef get into an unexpected state and call abort(). The new -B option compresses blank lines around a deleted section so that blank lines around "paragraphs" of code don't get doubled. The evaluator can now handle macros with arguments, and unbracketed arguments to the "defined" operator. Add myself to MAINTAINERS for unifdef. Signed-off-by: Tony Finch <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2009-12-12kbuild: specify absolute paths for cscopeDaniel Vetter1-1/+7
Cscope doesn't hadle relative paths when cscope.out is not in $PWD. Use absolute paths when generating cscope.files, which seems to be the recommended way to generate cscope.out, anyway (at least according to cscope.sf.net). The speed and size differences are minimal, the only drawback is that the database needs to be regenerated if the source directory is moved. [mmarek: fixed for O= builds, modified changelog] Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2009-12-12kbuild: create include/generated in silentoldconfigMichal Marek1-0/+1
The toplevel Makefile creates the directory if it runs silentoldconfig automatically, but if run manually, it fails: $ make mrproper $ make defconfig && make silentoldconfig *** Default configuration is based on 'x86_64_defconfig' # # configuration written to .config # scripts/kconfig/conf -s arch/x86/Kconfig *** Error during update of the kernel configuration. ... Move the mkdir command to the silentoldconfig target to make it work. Signed-off-by: Michal Marek <[email protected]>
2009-12-12scripts/package: deb-pkg: use fakeroot if availableJonathan Nieder1-2/+19
Running "make deb-pkg" requires setting KBUILD_PKG_ROOTCMD or becoming root oneself or it errors out. Unless already running as root or KBUILD_PKG_ROOTCMD is already set, use fakeroot as a good default. With this patch applied, you can run "make oldconfig deb-pkg" as an ordinary user to build a binary package for an updated kernel tree and it should just work. fakeroot is too zealous by default in treating files as owned by root. Its wrapped stat() sets st_uid and st_gid to 0 for all files, which causes Git to go on a wild goose chase if CONFIG_LOCALVERSION_AUTO is set, checking if any file's content has changed along with its stat information. Avoid this by telling fakeroot to use the actual owner and group for preexisting files, by passing it the -u option. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2009-12-12scripts/package: add KBUILD_PKG_ROOTCMD variableJonathan Nieder1-1/+2
Let the deb-pkg target acquire (fake) root privileges before running commands that need them. Without such privileges, deb-pkg errors out because chown fails. The new KBUILD_PKG_ROOTCMD variable, if defined, is used as a command to run other commands with possibly fake elevated privileges. Since this is not needed for the tar-pkg and rpm-pkg targets, it is only used by deb-pkg. If it is not defined, the behavior is as before, and the user will have to rerun make as root. In other words, as a shortcut, instead of running 'make oldconfig && make && fakeroot -u make deb-pkg', one can use the single command 'make oldconfig deb-pkg KBUILD_PKG_ROOTCMD="fakeroot -u"'. Suggested-by: Ryan Anderson <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2009-12-12scripts/package: tar-pkg: use tar --owner=rootMichal Marek1-1/+5
Use the --owner= and --group= options to make sure the entries in the built tar file are owned by root. Without this change, a careless sysadmin using the tar-pkg target can easily end up installing a kernel that is writable by the unprivileged user account used to build the kernel. Test that these options are understood before using them so that non-GNU versions of tar can still be used if the operator is appropriately cautious. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2009-12-12kbuild: move autoconf.h to include/generatedSam Ravnborg3-7/+7
Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2009-12-12kbuild: do not check for include/asm-$ARCHSam Ravnborg1-2/+0
No architectures uses include/asm-$ARCH now. So drop check for location of include files Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2009-12-12kbuild: fix bzImage build for x86Michael Tokarev1-1/+1
As has been discussed previously (and Sam has been CC'ed), the fix is still incorrect. It replaces "echo -ne" with "/bin/echo -ne", but neither of the two are guaranteed to support the necessary arguments and necessary (hexadecimal) escape sequences. What should be used here is printf(1). The trivial patch below (on top of these kbuild changes) fixes this issue. Signed-Off-By: Michael Tokarev <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: Michal Marek <[email protected]>