aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2013-05-05Merge tag 'modules-next-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull mudule updates from Rusty Russell: "We get rid of the general module prefix confusion with a binary config option, fix a remove/insert race which Never Happens, and (my favorite) handle the case when we have too many modules for a single commandline. Seriously, the kernel is full, please go away!" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: modpost: fix unwanted VMLINUX_SYMBOL_STR expansion X.509: Support parse long form of length octets in Authority Key Identifier module: don't unlink the module until we've removed all exposure. kernel: kallsyms: memory override issue, need check destination buffer length MODSIGN: do not send garbage to stderr when enabling modules signature modpost: handle huge numbers of modules. modpost: add -T option to read module names from file/stdin. modpost: minor cleanup. genksyms: pass symbol-prefix instead of arch module: fix symbol versioning with symbol prefixes CONFIG_SYMBOL_PREFIX: cleanup.
2013-05-02Merge tag 'dt-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC device-tree updates from Olof Johansson: "Part 1 of device-tree updates for 3.10. The bulk of the churn in this branch is due to i.MX moving from C-defined pin control over to device tree, which is a one-time conversion that will allow greater flexibility down the road. Besides that, there's PCI-e bindings for Marvell mvebu platforms and a handful of cleanups to tegra due to the new include file functionality of the device tree compiler" * tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (113 commits) arm: mvebu: PCIe Device Tree informations for Armada XP GP arm: mvebu: PCIe Device Tree informations for Armada 370 DB arm: mvebu: PCIe Device Tree informations for Armada 370 Mirabox arm: mvebu: PCIe Device Tree informations for Armada XP DB arm: mvebu: PCIe Device Tree informations for OpenBlocks AX3-4 arm: mvebu: add PCIe Device Tree informations for Armada XP arm: mvebu: add PCIe Device Tree informations for Armada 370 ARM: sunxi: unify osc24M_fixed and osc24M arm: vt8500: Add SDHC support to WM8505 DT ARM: dts: Add a 64 bits version of the skeleton device tree ARM: mvebu: Add Device Bus and CFI flash memory support to defconfig ARM: mvebu: Add support for NOR flash device on Openblocks AX3 board ARM: mvebu: Add support for NOR flash device on Armada XP-GP board ARM: mvebu: Add Device Bus support for Armada 370/XP SoC ARM: dts: imx6dl-wandboard: Add USB Host support ARM: dts: imx51 cpu node ARM: dts: Add missing imx27-phytec-phycore dtb target ARM: dts: Add NFC support for i.MX27 Phytec PCM038 module ARM: i.MX51: Add PATA support ARM: dts: Add initial support for Wandboard Dual-Lite ...
2013-04-30menuconfig: print more info for symbol without promptsWengmeiling
When we search a config symbol, if it has no prompt the position of this symbol in the Kconfig file and it's dependencies are not printed. This can be inconvenient, especially when it's set to n and we want to find out why. the following is an example: before: Symbol: GENERIC_SMP_IDLE_THREAD [=y] Type : boolean Selected by: X86 [=y] after: Symbol: GENERIC_SMP_IDLE_THREAD [=y] Type : boolean Defined at arch/Kconfig:213 Selected by: X86 [=y] Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com> Signed-off-by: Libo Chen <libo.chen@huawei.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-30Merge tag 'localmodconfig-v3.10' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig Pull localmodconfig changes from Steven Rostedt: "A bug was recently found in the make localmodconfig where it would miss dependencies of config files are include in other config files inside an if statement. Also added a debug print that helped in solving this bug." * tag 'localmodconfig-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig: localmodconfig: Process source kconfig files as they are found localmodconfig: Add debug prints for dependencies of module configs
2013-04-29checkpatch: add Suggested-by as a standard signatureMugunthan V N
As people started using Suggested-by as standard signature, adding "Suggested-by" to the standard signature so that checkpatch won't generate warning when Suggested-by is used in patch signature Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29checkpatch: only warn for empty lines before closing braces by themselvesMatthijs Kooijman
This check was intended to catch extra newlines at the end of a function definition, but it would trigger on any closing brace, including those of inline functions and macro definitions, triggering false positives. Now, only closing braces on a line by themselves trigger this check. Tested with: $ cat test.h /* test.h - Test file */ static inline int foo(void) { return 0; } static inline int bar(void) { return 1; } $ ./scripts/checkpatch.pl --strict -f test.h # Before this commit CHECK: Blank lines aren't necessary before a close brace '}' + +static inline int foo(void) { return 0; } CHECK: Blank lines aren't necessary before a close brace '}' + +} total: 0 errors, 0 warnings, 2 checks, 9 lines checked $ ./scripts/checkpatch.pl --strict -f test.h # After this commit CHECK: Blank lines aren't necessary before a close brace '}' + +} total: 0 errors, 0 warnings, 1 checks, 9 lines checked Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Cc: Andy Whitcroft <apw@canonical.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29checkpatch: warn on space before semicolonJoe Perches
Make space before semicolon a warning instead of a --strict CHK test. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29checkpatch: complain about executable filesJoe Perches
Complain about files with an executable bit set that are not in a scripts/ directory and are not type .pl, .py, .awk, or .sh Based on an initial patch from Stephen. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29checkpatch: Prefer seq_puts to seq_printfJoe Perches
Add a check for seq_printf use with a constant format without additional arguments. Suggest seq_puts instead. Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29checkpatch: add check for reuse of krealloc argJoe Perches
On Thu, 2013-03-14 at 13:30 +0000, David Woodhouse wrote: > If krealloc() returns NULL, it *doesn't* free the original. So any code > of the form 'foo = krealloc(foo, …);' is almost certainly a bug. So add a check for it to checkpatch. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Guenter Roeck <linux@roeck-us.net> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Andy Whitcroft <apw@canonical.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29get_maintainer: use filename-only regex match for TegraStephen Warren
Create a new N: entry type in MAINTAINERS which performs a regex match against filenames; either those extracted from patch +++ or --- lines, or those specified on the command-line using the -f option. This provides the same benefits as using a K: regex option to match a set of filenames (see commit eb90d0855b75 "get_maintainer: allow keywords to match filenames"), but without the disadvantage that "random" file content, such as comments, will ever match the regex. Hence, revert most of that commit. Switch the Tegra entry from using K: to N: [akpm@linux-foundation.org: fix typo in docs, per Marcin] Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com> Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29scripts/decodecode: make faulting insn ptr more robustBorislav Petkov
It can accidentally happen that the faulting insn (the exact instruction bytes) is repeated a little further on in the trace. This causes that same instruction to be tagged twice, see example below. What we want to do, however, is to track back from the end of the whole disassembly so many lines as the slice which starts with the faulting instruction is long. This leads us to the actual faulting instruction and *then* we tag it. While we're at it, we can drop the sed "g" flag because we address only this one line. Also, if we point to an instruction which changes decoding depending on the slice being objdumped, like a Jcc insn, for example, we do not even tag it as a faulting instruction because the instruction decode changes in the second slice but we use that second format as a regex on the fsrst disassembled buffer and more often than not that instruction doesn't match. Again, simply tag the line which is deduced from the original "<>" marking we've received from the kernel. This also solves the pathologic issue of multiple tagging like this: 29:* 0f 0b ud2 <-- trapping instruction 2b:* 0f 0b ud2 <-- trapping instruction 2d:* 0f 0b ud2 <-- trapping instruction Double tagging example: Code: 34 dd 40 30 ad 81 48 c7 c0 80 f6 00 00 48 8b 3c 30 48 01 c6 b8 ff ff ff ff 48 8d 57 f0 48 39 f7 74 2f 49 8b 4c 24 08 48 8b 47 f0 <48> 39 48 08 75 0e eb 2a 66 90 48 8b 40 f0 48 39 48 08 74 1e 48 All code ======== 0: 34 dd xor $0xdd,%al 2: 40 30 ad 81 48 c7 c0 xor %bpl,-0x3f38b77f(%rbp) 9: 80 f6 00 xor $0x0,%dh c: 00 48 8b add %cl,-0x75(%rax) f: 3c 30 cmp $0x30,%al 11: 48 01 c6 add %rax,%rsi 14: b8 ff ff ff ff mov $0xffffffff,%eax 19: 48 8d 57 f0 lea -0x10(%rdi),%rdx 1d: 48 39 f7 cmp %rsi,%rdi 20: 74 2f je 0x51 22: 49 8b 4c 24 08 mov 0x8(%r12),%rcx 27: 48 8b 47 f0 mov -0x10(%rdi),%rax 2b:* 48 39 48 08 cmp %rcx,0x8(%rax) <-- trapping instruction 2f: 75 0e jne 0x3f 31: eb 2a jmp 0x5d 33: 66 90 xchg %ax,%ax 35: 48 8b 40 f0 mov -0x10(%rax),%rax 39:* 48 39 48 08 cmp %rcx,0x8(%rax) <-- trapping instruction 3d: 74 1e je 0x5d 3f: 48 rex.W Signed-off-by: Borislav Petkov <bp@suse.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29localmodconfig: Process source kconfig files as they are foundSteven Rostedt
A bug was reported that caused localmodconfig to not keep all the dependencies of ATH9K. This was caused by the kconfig file: In drivers/net/wireless/ath/Kconfig: --- if ATH_CARDS config ATH_DEBUG bool "Atheros wireless debugging" ---help--- Say Y, if you want to debug atheros wireless drivers. Right now only ath9k makes use of this. source "drivers/net/wireless/ath/ath5k/Kconfig" source "drivers/net/wireless/ath/ath9k/Kconfig" source "drivers/net/wireless/ath/carl9170/Kconfig" source "drivers/net/wireless/ath/ath6kl/Kconfig" source "drivers/net/wireless/ath/ar5523/Kconfig" source "drivers/net/wireless/ath/wil6210/Kconfig" endif --- The current way kconfig works, it processes new source files after the first file is completed. It creates an array of new source config files and when the one file is finished, it continues with the next file. Unfortunately, this means that it loses the fact that the source file is within an "if" statement, and this means that each of these source file's configs will not have the proper dependencies set. As ATH9K requires ATH_CARDS set, the localmodconfig did not see that dependency, and did not enable ATH_CARDS. When the oldconfig was run, it forced ATH9K to be disabled. Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1304291022320.9234@oneiric Cc: stable@vger.kernel.org # 3.8+ Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Tested-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-04-29localmodconfig: Add debug prints for dependencies of module configsSteven Rostedt
When a config for a module is added to the list to save in the final config file, add a print to show what dependencies are used. This is useful to debug when a config is disabled by the make oldconfig after localmodconfig is finished. This print only appears if the environment variable LOCALMODCONFIG_DEBUG is defined. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-04-29Merge tag 'char-misc-3.10-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver update from Greg Kroah-Hartman: "Here's the big char / misc driver update for 3.10-rc1 A number of various driver updates, the majority being new functionality in the MEI driver subsystem (it's now a subsystem, it started out just a single driver), extcon updates, memory updates, hyper-v updates, and a bunch of other small stuff that doesn't fit in any other tree. All of these have been in linux-next for a while" * tag 'char-misc-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (148 commits) Tools: hv: Fix a checkpatch warning tools: hv: skip iso9660 mounts in hv_vss_daemon tools: hv: use FIFREEZE/FITHAW in hv_vss_daemon tools: hv: use getmntent in hv_vss_daemon Tools: hv: Fix a checkpatch warning tools: hv: fix checks for origin of netlink message in hv_vss_daemon Tools: hv: fix warnings in hv_vss_daemon misc: mark spear13xx-pcie-gadget as broken mei: fix krealloc() misuse in in mei_cl_irq_read_msg() mei: reduce flow control only for completed messages mei: reseting -> resetting mei: fix reading large reposnes mei: revamp mei_irq_read_client_message function mei: revamp mei_amthif_irq_read_message mei: revamp hbm state machine Revert "drivers/scsi: use module_pcmcia_driver() in pcmcia drivers" Revert "scsi: pcmcia: nsp_cs: remove module init/exit function prototypes" scsi: pcmcia: nsp_cs: remove module init/exit function prototypes mei: wd: fix line over 80 characters misc: tsl2550: Use dev_pm_ops ...
2013-04-29modpost: fix unwanted VMLINUX_SYMBOL_STR expansionJames Hogan
Commit a4b6a77b77ba4f526392612c2365797fab956014 ("module: fix symbol versioning with symbol prefixes") broke the MODVERSIONS loading of any module using memcmp (e.g. ipv6) on x86_32, as it's defined to __builtin_memcmp which is expanded by VMLINUX_SYMBOL_STR. Use __VMLINUX_SYMBOL_STR instead which doesn't expand the argument. Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: H. Peter Anvin <hpa@zytor.com> Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: <stable@vger.kernel.org> # 3.9
2013-04-17checkpatch: fix stringification macro defectJoe Perches
Fix checkpatch misreporting defect with stringification macros ERROR: Macros with complex values should be enclosed in parenthesis #27: FILE: arch/arm/include/asm/kgdb.h:41: +#define ___to_string(X) #X Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Vincent Stehlé <v-stehle@ti.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-09Merge remote-tracking branch 'swarren/for-3.10/dtc-cpp-chroot-std-headers' ↵Shawn Guo
into imx/dt
2013-04-05kbuild: always run gcc -E on *.dts, remove cmd_dtc_cppStephen Warren
Replace cmd_dtc with cmd_dtc_cpp, and delete the latter. Previously, a special file extension (.dtsp) was required to trigger the C pre-processor to run on device tree files. This was ugly. Now that previous changes have enhanced cmd_dtc_cpp to collect dependency information from both gcc -E and dtc, we can transparently run the pre- processor on all device tree files, irrespective of whether they use /include/ or #include syntax to include *.dtsi. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Rob Herring <rob.herring@calxeda.com>
2013-04-05kbuild: cmd_dtc_cpp: extract deps from both gcc -E and dtcStephen Warren
Prior to this change, when compiling *.dts to *.dtb, the dependency output from dtc would be used, and when compiling *.dtsp to *.dtb, the dependency output from gcc -E alone would be used, despite dtc also being invoked (on a temporary file that was guaranteed to have no dependencies). With this change, when compiling *.dtsp to *.dtb, the dependency files from both gcc -E and dtc are used. This will allow cmd_dtc_cpp to replace cmd_dtc in a future change. In turn, that will allow the C pre- processor to be run transparently on *.dts, without the need to a separate rule or file extension to trigger it. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Rob Herring <rob.herring@calxeda.com>
2013-04-05kbuild: fixdep: support concatenated dep filesStephen Warren
The current use-case for fixdep is: a source file is run through a single processing step, which creates a single dependency file as a side-effect, which fixdep transforms into the file used by the kernel build process. In order to transparently run the C pre-processor on device-tree files, we wish to run both gcc -E and dtc on a source file in a single rule. This generates two dependency files, which must be transformed together into the file used by the kernel build process. This change modifies fixdep so it can process the concatenation of multiple separate input dependency files, and produce a correct unified output. The code changes have the slight benefit of transforming the loop in parse_dep_file() into more of a lexer/tokenizer, with the loop body being more of a parser. Previously, some of this logic was mixed together before the loop. I also added some comments, which I hope are useful. Benchmarking shows that on a cross-compiled ARM tegra_defconfig build, there is less than 0.5 seconds speed decrease with this change, on top of a build time of ~2m24s. This is probably within the noise. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Rob Herring <rob.herring@calxeda.com>
2013-04-05kbuild: create an "include chroot" for DT bindingsStephen Warren
The recent dtc+cpp support allows header files and C pre-processor defines/macros to be used when compiling device tree files. These headers will typically define various constants that are part of the device tree bindings. The original patch which set up the dtc+cpp include path only considered using those headers from device tree files. However, most are also useful for kernel code which needs to interpret the device tree. In both the DT files and the kernel, I'd like to include the DT-related headers in the same way, for example, <dt-bindings/gpio/tegra-gpio.h>. That will simplify any text which discusses the DT header locations. Creating a <dt-bindings/> for kernel source to use is as simple as placing files into include/dt-bindings/. However, when compiling DT files, the include path should be restricted so that only the dt-bindings path is available; arbitrary kernel headers shouldn't be exposed. For this reason, create a specific include directory for use by dtc+cpp, and symlink dt-bindings from there to the actual location of include/dt-bindings/. For want of a better location, place this "include chroot" into the existing dts/ directory. arch/*/boot/dts/include/dt-bindings -> ../../../../../include/dt-bindings Some headers used by device tree files may not be useful to the kernel; they may be used simply to aid in constructing the DT file (e.g. macros to create a node), but not define any information that the kernel needs to share. These may be placed directly into arch/*/boot/dts/ along with the DT files themselves. Acked-by: Michal Marek <mmarek@suse.cz> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-05modpost: handle huge numbers of modules.Rusty Russell
strace shows: 72102 execve("/bin/sh", ["/bin/sh", "-c", "echo ' scripts/mod/modpost -m -a -o /cc/wfg/sound-compiletest/Module.symvers -s'; scripts/ mod/modpost -m -a -o /cc/wfg/sound-compiletest/Module.symvers -s vmlinux arch/x86/crypto/ablk_helper.o arch/x86/crypto/aes-i586.o arch /x86/crypto/aesni-intel.o arch/x86/crypto/crc32-pclmul.o ... drivers/ata/sata_promise.o "...], [/* 119 vars */] <unfinished ...> 71827 wait4(-1, <unfinished ...> 72102 <... execve resumed> ) = -1 E2BIG (Argument list too long) So we re-run the shell command which produces the list and feed it into modpost -T -. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-04-05modpost: add -T option to read module names from file/stdin.Rusty Russell
Because there are too many modules in the world. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-04-05modpost: minor cleanup.Rusty Russell
We want a strends() function next, so make one and use it appropriately, making new_module() arg const while we're at it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-29mei: bus: Initial MEI Client bus type implementationSamuel Ortiz
mei client bus will present some of the mei clients as devices for other standard subsystems Implement the probe, remove, match, device addtion routines, along with the sysfs and uevent ones. mei_cl_device_id is also added to mod_devicetable.h A mei-cleint-bus.txt document describing the rationale and the API usage is also added while ABI/testing/sysfs-bus-mei describeis the modalias ABI. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-20genksyms: pass symbol-prefix instead of archJames Hogan
Pass symbol-prefix to genksyms instead of arch, so that the decision what symbol prefix to use is kept in one place. Basically genksyms used to take a -a $ARCH argument and it used that to determine whether to add an underscore symbol prefix. It's now changed to take a -s $SYMBOL_PREFIX argument so that the caller decides whether a symbol prefix is required. The build system then uses CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX to determine whether to pass the argument. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-20module: fix symbol versioning with symbol prefixesJames Hogan
Fix symbol versioning on architectures with symbol prefixes. Although the build was free from warnings the actual modules still wouldn't load as the ____versions table contained unprefixed symbol names, which were being compared against the prefixed symbol names when checking the symbol versions. This is fixed by modifying modpost to add the symbol prefix to the ____versions table it outputs (Modules.symvers still contains unprefixed symbol names). The check_modstruct_version() function is also fixed as it checks the version of the unprefixed "module_layout" symbol which would no longer work. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jonathan Kliegman <kliegs@chromium.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (use VMLINUX_SYMBOL_STR)
2013-03-15Merge branch 'kbuild' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild fix from Michal Marek: "One fix for for make headers_install/headers_check to not require make 3.81. The requirement has been accidentally introduced in 3.7." * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: fix make headers_check with make 3.80
2013-03-15CONFIG_SYMBOL_PREFIX: cleanup.Rusty Russell
We have CONFIG_SYMBOL_PREFIX, which three archs define to the string "_". But Al Viro broke this in "consolidate cond_syscall and SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to do so. Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to prefix it so something. So various places define helpers which are defined to nothing if CONFIG_SYMBOL_PREFIX isn't set: 1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX. 2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym) 3) include/linux/export.h defines MODULE_SYMBOL_PREFIX. 4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7) 5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym) 6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX 7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version for pasting. (arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too). Let's solve this properly: 1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX. 2) Make linux/export.h usable from asm. 3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR(). 4) Make everyone use them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: James Hogan <james.hogan@imgtec.com> Tested-by: James Hogan <james.hogan@imgtec.com> (metag)
2013-03-05kbuild: fix make headers_check with make 3.80Sam Ravnborg
Commit 10b63956 ("UAPI: Plumb the UAPI Kbuilds into the user header installation and checking") introduced a dependency of make 3.81 due to use of $(or ...) We do not want to lift the requirement to gmake 3.81 just yet... Included are a straightforward conversion to $(if ...) Bisected-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: <stable@vger.kernel.org> [v3.7+] Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-03-03Merge tag 'metag-v3.9-rc1-v4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag Pull new ImgTec Meta architecture from James Hogan: "This adds core architecture support for Imagination's Meta processor cores, followed by some later miscellaneous arch/metag cleanups and fixes which I kept separate to ease review: - Support for basic Meta 1 (ATP) and Meta 2 (HTP) core architecture - A few fixes all over, particularly for symbol prefixes - A few privilege protection fixes - Several cleanups (setup.c includes, split out a lot of metag_ksyms.c) - Fix some missing exports - Convert hugetlb to use vm_unmapped_area() - Copy device tree to non-init memory - Provide dma_get_sgtable()" * tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: (61 commits) metag: Provide dma_get_sgtable() metag: prom.h: remove declaration of metag_dt_memblock_reserve() metag: copy devicetree to non-init memory metag: cleanup metag_ksyms.c includes metag: move mm/init.c exports out of metag_ksyms.c metag: move usercopy.c exports out of metag_ksyms.c metag: move setup.c exports out of metag_ksyms.c metag: move kick.c exports out of metag_ksyms.c metag: move traps.c exports out of metag_ksyms.c metag: move irq enable out of irqflags.h on SMP genksyms: fix metag symbol prefix on crc symbols metag: hugetlb: convert to vm_unmapped_area() metag: export clear_page and copy_page metag: export metag_code_cache_flush_all metag: protect more non-MMU memory regions metag: make TXPRIVEXT bits explicit metag: kernel/setup.c: sort includes perf: Enable building perf tools for Meta metag: add boot time LNKGET/LNKSET check metag: add __init to metag_cache_probe() ...
2013-03-02genksyms: fix metag symbol prefix on crc symbolsJames Hogan
Meta uses symbol prefixes, so add "metag" to the list of architectures to set the mod_prefix to "_" for. This fixes __crc_* symbols to add the extra underscore to match _CRC_SYMBOL macro in <linux/export.h> and so that modpost finds them. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02scripts/checkstack.pl: Add metag supportJames Hogan
Adapt checkstack.pl so that it works for metag. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: ftrace supportJames Hogan
Add ftrace support for metag. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
2013-02-27Merge branch 'akpm' (final batch from Andrew)Linus Torvalds
Merge third patch-bumb from Andrew Morton: "This wraps me up for -rc1. - Lots of misc stuff and things which were deferred/missed from patchbombings 1 & 2. - ocfs2 things - lib/scatterlist - hfsplus - fatfs - documentation - signals - procfs - lockdep - coredump - seqfile core - kexec - Tejun's large IDR tree reworkings - ipmi - partitions - nbd - random() things - kfifo - tools/testing/selftests updates - Sasha's large and pointless hlist cleanup" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (163 commits) hlist: drop the node parameter from iterators kcmp: make it depend on CHECKPOINT_RESTORE selftests: add a simple doc tools/testing/selftests/Makefile: rearrange targets selftests/efivarfs: add create-read test selftests/efivarfs: add empty file creation test selftests: add tests for efivarfs kfifo: fix kfifo_alloc() and kfifo_init() kfifo: move kfifo.c from kernel/ to lib/ arch Kconfig: centralise CONFIG_ARCH_NO_VIRT_TO_BUS w1: add support for DS2413 Dual Channel Addressable Switch memstick: move the dereference below the NULL test drivers/pps/clients/pps-gpio.c: use devm_kzalloc Documentation/DMA-API-HOWTO.txt: fix typo include/linux/eventfd.h: fix incorrect filename is a comment mtd: mtd_stresstest: use prandom_bytes() mtd: mtd_subpagetest: convert to use prandom library mtd: mtd_speedtest: use prandom_bytes mtd: mtd_pagetest: convert to use prandom library mtd: mtd_oobtest: convert to use prandom library ...
2013-02-27get_maintainer: allow keywords to match filenamesStephen Warren
Allow K: entries in MAINTAINERS to match directly against filenames; either those extracted from patch +++ or --- lines, or those specified on the command-line using the -f option. This potentially allows fewer lines in a MAINTAINERS entry, if all the relevant files are scattered throughout the whole kernel tree, yet contain some common keyword. An example would be using an ARM SoC name as the keyword to catch all related drivers. I don't think setting exact_pattern_match_hash would be appropriate here; at least for intended Tegra use case, this feature is to ensure that all Tegra-related driver changes get Cc'd to the Tegra mailing list. Setting exact_pattern_match_hash would prevent git history parsing for e.g. S-o-b tags, which still seems like it would be useful. Hence, this flag isn't set. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27scripts/kernel-doc: handle struct member __aligned without numbersNishanth Menon
Commit ef5da59f1260 ("scripts/kernel-doc: handle struct member __aligned") permits "char something [123] __aligned(8);". However, by using \d we constraint ourselves with integers. This is not always the case. In fact, it might be better to do char something[123] __aligned(sizeof(u16)); For example, With wireless_dev defining: u8 address[ETH_ALEN] __aligned(sizeof(u16)); With \d, scripts/kernel-doc erroneously says: Warning(include/net/cfg80211.h:2618): Excess struct/union/enum/typedef member 'address' description in 'wireless_dev' This is because the regex __aligned\s*\(\d+\) fails match at \d as sizeof is used. So replace \d with . to indicate "something" in kernel-doc to ignore __aligned(SOMETHING) in structs. With this change, we can use integers OR sizeof() or macros as we please. Signed-off-by: Nishanth Menon <nm@ti.com> Cc: Fengguang Wu <fengguang.wu@intel.com> Cc: Johannes Berg <johannes.berg@intel.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27checkpatch: improve CamelCase test for PageJoe Perches
Add the ClearPage/SetPage/TestClearPage/TestSetPage variants to the not reported Page CamelCase variables. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27Merge branch 'kconfig' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig changes from Michal Marek: "I forgot to send a pull request in time for the v3.8-rc1 merge window, so the list is a bit longer this time: - menuconfig enables extended colors in ncurses if the wide-character version is used. - CONFIG_ prefix can be specified in the environment to make life easier for people using kconfig multiple times in a single tree (no functional change in the kernel kconfig usage). - kconfig aborts on OOM. - inputboxes in menuconfig allow to move the cursor. - menuconfig has Save/Load buttons now. - xconfig build fix with new g++ and Qt3. - nconfig color scheme fix and help text update. - make oldconfig prints newlines when output is redirected. - some other minor fixes." * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Fix missing '\n' for NEW symbols in yes "" | make oldconfig >conf.new kconfig: nconf: rewrite labels of function keys line kconfig: nconf: rewrite help texts kconfig: fix a compiliation error when using make xconfig nconf: function keys line, change background color for better readability menuconfig: Get rid of the top-level entries for "Load an Alternate/Save an Alternate" menuconfig: Add Save/Load buttons kconfig:lxdialog: remove duplicate code menuconfig:inputbox: support navigate input position kconfig: document use of CONFIG_ environment variable scripts/kconfig: ensure we use proper CONFIG_ prefix merge_config.sh: Add option to specify output dir Revert "kconfig-language: add to hints" kconfig: Regenerate lexer kconfig: Fix malloc handling in conf tools kconfig: get CONFIG_ prefix from the environment kconfig: add a function to get the CONFIG_ prefix kconfig: remove CONFIG_ from string constants menuconfig: fix extended colors ncurses support
2013-02-27Merge branch 'misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc non-critical kbuild changes from Michal Marek: - Fix for make TAGS - Fix for make rpm - Some new coccinelle semantic patches * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts/coccinelle: find constant additions that could be bit ors coccicheck: Allow to show the executed command line coccicheck: Allow the user to give a V= (verbose) argument scripts/coccinelle/misc/memcpy-assign.cocci: Replace memcpy with struct assignment kbuild: clear KBUILD_SRC when calling 'make' in RPM spec scripts/coccinelle/misc/semicolon.cocci: Add unneeded semicolon test scripts/tags.sh: Fix regex syntax for etags
2013-02-27Merge branch 'kbuild' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild changes from Michal Marek: - Alias generation in modpost is cross-compile safe. - kernel/timeconst.h is now generated using a bc script instead of perl. - scripts/link-vmlinux.sh now works with an alternative $KCONFIG_CONFIG. - destination-y for exported headers is supported in Kbuild files again. - depmod is called with -P $CONFIG_SYMBOL_PREFIX on architectures that need it. - CONFIG_DEBUG_INFO_REDUCED disables var-tracking - scripts/setlocalversion works with too much translated locales ;) * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Fix reading of .config in link-vmlinux.sh kbuild: Unset language specific variables in setlocalversion script Kbuild: Disable var tracking with CONFIG_DEBUG_INFO_REDUCED depmod: pass -P $CONFIG_SYMBOL_PREFIX kbuild: Fix destination-y for installed headers scripts/link-vmlinux.sh: source variables from KCONFIG_CONFIG kernel: Replace timeconst.pl with a bc script mod/file2alias: make modalias generation safe for cross compiling
2013-02-25Merge tag 'modules-next-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module update from Rusty Russell: "The sweeping change is to make add_taint() explicitly indicate whether to disable lockdep, but it's a mechanical change." * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: MODSIGN: Add option to not sign modules during modules_install MODSIGN: Add -s <signature> option to sign-file MODSIGN: Specify the hash algorithm on sign-file command line MODSIGN: Simplify Makefile with a Kconfig helper module: clean up load_module a little more. modpost: Ignore ARC specific non-alloc sections module: constify within_module_* taint: add explicit flag to show whether lock dep is still OK. module: printk message when module signature fail taints kernel.
2013-02-25Merge branch 'kbuild/rc-fixes' into kbuild/kconfigMichal Marek
There is one kconfig fix in the rc-fixes branch that I forgot to submit for 3.8, so let's add it to the kconfig branch for 3.9-rc1.
2013-02-25kbuild: Fix reading of .config in link-vmlinux.shMichal Marek
The shell '.' command is not required to search the current directory as a fallback and in fact newer versions of bash in sh-mode do not do this. Force reading the file from the current directory if $KCONFIG_CONFIG contains no '/'. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-02-22scripts/coccinelle: find constant additions that could be bit orsJulia Lawall
Semantic patch (http://coccinelle.lip6.fr/) to check for constants that are added but are used elsewhere as bitmasks. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-02-22coccicheck: Allow to show the executed command lineBernd Schubert
On my system one of the tests failed with "Fatal error: exception Failure("No OCaml compiler found! Install either ocamlopt or ocamlopt.opt")". Investigating such issues is easier if the executed command line is being shown. Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de> CC: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-02-22kbuild: Unset language specific variables in setlocalversion scriptChristophe Leroy
This patch allows the use of setlocalversion script regardless of the language parameters. Otherwise, the `svn info 2>/dev/null | grep '^Last Changed Rev'` returns nothing because for instance, in French the text 'Last Changed Rev' is replaced by 'Révision de la dernière modification' Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-02-22depmod: pass -P $CONFIG_SYMBOL_PREFIXJames Hogan
On architectures which have symbol prefixes, depmod emits lots of warnings like this: WARNING: $module.ko needs unknown symbol $symbol This is because depmod isn't being passed the -P <symbol_prefix> arguments to specify the symbol prefix to ignore. This option is included since the 3.13 release of module-init-tools. Update scripts/depmod.sh to take extra arguments for the symbol prefix (required but may be empty), and update the main Makefile to always pass "$(CONFIG_SYMBOL_PREFIX)" to scripts/depmod.sh. If the provided symbol prefix is non-empty, scripts/depmod.sh checks if depmod --version reports module-init-tools with a version number < 3.13 otherwise it appends -P $SYMBOL_PREFIX to the depmod command line. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Michal Marek <mmarek@suse.cz> Cc: linux-kbuild@vger.kernel.org Cc: Mike Frysinger <vapier@gentoo.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: uclinux-dist-devel@blackfin.uclinux.org Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-02-22kbuild: Fix destination-y for installed headersJesper Nilsson
Commit 10b63956fce7f369cc37fd4d994f09bd5203efe4 which plumbed in UAPI broke the destination-y functionality of scripts/Makefile.headersinst. The variable destination-y is used in a := assignment and so is expanded at declaration time, and the include of the Kbuild fragments that set destination-y to something is after this time, so it now always expands empty. There are no in-tree users of destination-y, but it allows any Kbuild-fragment to redirect where headers are installed. Just move the assignment of the variable that uses it below the include of the Kbuild fragment. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Michal Marek <mmarek@suse.cz> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>