summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2014-06-05Merge branch 'linux-3.10.40' into rel-21Ishan Mittal
Bug 200004122 Conflicts: drivers/cpufreq/cpufreq.c drivers/regulator/core.c sound/soc/codecs/max98090.c Change-Id: I9418a05ad5c56b2e902249218bac2fa594d99f56 Signed-off-by: Ishan Mittal <imittal@nvidia.com>
2014-05-12PM / tools: new tool for suspend/resume performance optimizationTodd E Brandt
This tool is designed to assist kernel and OS developers in optimizing their linux stack's suspend/resume time. Using a kernel image built with a few extra options enabled, the tool will execute a suspend and will capture dmesg and ftrace data until resume is complete. This data is transformed into a device timeline and a callgraph to give a quick and detailed view of which devices and callbacks are taking the most time in suspend/resume. The output is a single html file which can be viewed in firefox or chrome. References: https://01.org/suspendresume Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit ee8b09cd60bfe45d856e7c3bef8742835686bf4e) Change-Id: Ie4bf1a39cb854be70dbe52991ea0bfcf15ae2339 Reviewed-on: http://git-master/r/406861 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2014-04-14kbuild: fix make headers_install when path is too longNicolas Dichtel
commit c0ff68f1611d6855a06d672989ad5cfea160a4eb upstream. If headers_install is executed from a deep/long directory structure, the shell's maximum argument length can be execeeded, which breaks the operation with: | make[2]: execvp: /bin/sh: Argument list too long | make[2]: *** Instead of passing each files name with the entire path, I give only the file name without the source path and give this path as a new argument to headers_install.pl. Because there is three possible paths, I have tree input-files list, one per path. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Tested-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Michal Marek <mmarek@suse.cz> Cc: Wang Nan <wangnan0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-31deb-pkg: Fix cross-building linux-headers packageBen Hutchings
commit f8ce239dfc7ba9add41d9ecdc5e7810738f839fa upstream. builddeb generates a control file that says the linux-headers package can only be built for the build system primary architecture. This breaks cross-building configurations. We should use $debarch for this instead. Since $debarch is not yet set when generating the control file, set Architecture: any and use control file variables to fill in the description. Fixes: cd8d60a20a45 ('kbuild: create linux-headers package in deb-pkg') Reported-and-tested-by: "Niew, Sh." <shniew@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-13Merge branch 'linux-3.10.33' into dev-kernel-3.10Deepak Nibade
Bug 1456092 Change-Id: I3021247ec68a3c2dddd9e98cde13d70a45191d53 Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
2014-02-22Modpost: fixed USB alias generation for ranges including 0x9 and 0xAJan Moskyto Matejka
commit 03b56329f9bb5a1cb73d7dc659d529a9a9bf3acc upstream. Commit afe2dab4f6 ("USB: add hex/bcd detection to usb modalias generation") changed the routine that generates alias ranges. Before that change, only digits 0-9 were supported; the commit tried to fix the case when the range includes higher values than 0x9. Unfortunately, the commit didn't fix the case when the range includes both 0x9 and 0xA, meaning that the final range must look like [x-9A-y] where x <= 0x9 and y >= 0xA -- instead the [x-9A-x] range was produced. Modprobe doesn't complain as it sees no difference between no-match and bad-pattern results of fnmatch(). Fixing this simple bug to fix the aliases. Also changing the hardcoded beginning of the range to uppercase as all the other letters are also uppercase in the device version numbers. Fortunately, this affects only the dvb-usb-dib0700 module, AFAIK. Signed-off-by: Jan Moskyto Matejka <mq@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-21arm64: dts: T132: enable reuse of T124 dtsi filesDaniel Fu
T132 shares most of the SoC components of T124. To enable inclusion of T124 dtsi files from T132 dts files, specify "arch/arm/boot/dts" as an include path for arm64 dts files. Change-Id: If7426acae664022a53dc507473b35be617a62526 Signed-off-by: Daniel Fu <danifu@nvidia.com> Reviewed-on: http://git-master/r/347472 Reviewed-by: Hayden Du <haydend@nvidia.com> Tested-by: Hayden Du <haydend@nvidia.com> Reviewed-by: Johnny Qiu <joqiu@nvidia.com>
2013-12-16Merge tag 'v3.10.24' into HEADAjay Nandakumar
This is the 3.10.24 stable release Change-Id: Ibd2734f93d44385ab86867272a1359158635133b
2013-11-13scripts/kallsyms: filter symbols not in kernel address spaceMing Lei
commit f6537f2f0eba4eba3354e48dbe3047db6d8b6254 upstream. This patch uses CONFIG_PAGE_OFFSET to filter symbols which are not in kernel address space because these symbols are generally for generating code purpose and can't be run at kernel mode, so we needn't keep them in /proc/kallsyms. For example, on ARM there are some symbols which may be linked in relocatable code section, then perf can't parse symbols any more from /proc/kallsyms, this patch fixes the problem (introduced b9b32bf70f2fb710b07c94e13afbc729afe221da) Cc: Russell King <linux@arm.linux.org.uk> Cc: linux-arm-kernel@lists.infradead.org Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26scripts: tool for visualizing DMA mapping API ftrace dumpKonsta Holtta
Add a tool for parsing and plotting data from dmadebug:* ftrace events. Bug 1173494 Change-Id: Id7e175fda4c1ef42ef6a0403f1bece36b273cd99 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/268051 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
2013-09-14UPSTREAM Revert Android "ARM: convert build of appended dtb zImage to list ↵Dan Willemsen
of dtbs" This reverts commit 5e9468632ea81e7d17fc9bd4457acbaffda7b370. Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
2013-09-14scripts: Make git commit info always presentTao Hu
LOCALVERSION_AUTO is set by default. And git commit will be part of the version. E.g. "3.1.10-g0fe9b4a" where 0fe9b4a is the commit. The version will appear in kpanic logs. It would help developers to know the exact kernel version. But a tagged commit (main-ics-2012.06.07-A5) will lead to no git info. E.g. "3.1.10" This patch will solve the issue. Change-Id: I28370ada903b4be12bfc51eb3626512572e15c20 wChange-Id: I9dbb6c0a9e2964ead92114197a6d5c457ed7aab9 Signed-off-by: Tao Hu <taoh@nvidia.com> Reviewed-on: http://git-master/r/123670 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Scott Peterson <speterson@nvidia.com> Rebase-Id: R4634652e8627a86f7d4034e7657e45d10eb1f33f
2013-07-01kconfig: Fix defconfig when one choice menu selects options that another ↵Arve Hjønnevåg
choice menu depends on The defconfig and Kconfig combination below, which is based on 3.10-rc4 Kconfigs, resulted in several options getting set to "m" instead of "y". defconfig: --- CONFIG_MODULES=y CONFIG_USB_GADGET=y CONFIG_USB_ZERO=y --- Kconfig: --- menuconfig MODULES bool "Enable loadable module support" config CONFIGFS_FS tristate "Userspace-driven configuration filesystem" config OCFS2_FS tristate "OCFS2 file system support" depends on CONFIGFS_FS select CRC32 config USB_LIBCOMPOSITE tristate select CONFIGFS_FS choice tristate "USB Gadget Drivers" default USB_ETH config USB_ZERO tristate "Gadget Zero (DEVELOPMENT)" select USB_LIBCOMPOSITE config USB_ETH tristate "Ethernet Gadget (with CDC Ethernet support)" select USB_LIBCOMPOSITE endchoice config CRC32 tristate "CRC32/CRC32c functions" default y choice prompt "CRC32 implementation" depends on CRC32 default CRC32_SLICEBY8 config CRC32_SLICEBY8 bool "Slice by 8 bytes" endchoice --- Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01ARM: convert build of appended dtb zImage to list of dtbsColin Cross
Allow CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES to specify a space separated list of dtbs to append to the zImage, and name the resulting file zImage-dtb Change-Id: I36d9108a2349bdbb373e95076dcb1417d8c7dce6 Signed-off-by: Colin Cross <ccross@android.com> Conflicts: arch/arm/boot/Makefile scripts/Makefile.lib
2013-06-13dtc: ensure #line directives don't consume data from the next lineGrant Likely
Previously, the #line parsing regex ended with ({WS}+[0-9]+)?. The {WS} could match line-break characters. If the #line directive did not contain the optional flags field at the end, this could cause any integer data on the next line to be consumed as part of the #line directive parsing. This could cause syntax errors (i.e. #line parsing consuming the leading 0 from a hex literal 0x1234, leaving x1234 to be parsed as cell data, which is a syntax error), or invalid compilation results (i.e. simply consuming literal 1234 as part of the #line processing, thus removing it from the cell data). Fix this by replacing {WS} with [ \t] so that it can't match line-breaks. Convert all instances of {WS}, even though the other instances should be irrelevant for any well-formed #line directive. This is done for consistency and ultimate safety. [Cherry picked from DTC commit a1ee6f068e1c8dbc62873645037a353d7852d5cc] Reported-by: Ian Campbell <Ian.Campbell@citrix.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2013-06-13dtc: Update generated files to output from Bison 2.5Grant Likely
This patch merely updates the generated dtc parser and lexer files to the output generated by Bison 2.5. The previous versions were generated from version 2.4.1. The only reason for this commit is to minimize the diff on the next commit which fixes a bug in the DTC #line directive parsing. Otherwise the Bison changes would be intermingled with the functional changes. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2013-06-13kbuild: make sure we clean up DTB temporary filesIan Campbell
Various temporary files used when building DTB files were not suffixed with .tmp and therefore were not cleaned up by "make clean". Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
2013-05-30Merge branch 'yem-kconfig-rc-fixes' of ↵Michal Marek
git://gitorious.org/linux-kconfig/linux-kconfig into kbuild/rc-fixes
2013-05-30kconfig/menu.c: fix multiple references to expressions in menu_add_prop()Dirk Gouders
menu_add_prop() applies upper menus' visibilities to actual prompts by AND-ing the prompts visibilities with the upper menus ones. This creates a further reference to the menu's visibilities and when the expression reduction functions do their work, they may remove or modify expressions that have multiple references, thus causing unpredictable side-effects. The following example Kconfig constructs a case where this causes problems: a menu and a prompt which's visibilities depend on the same symbol. When invoking mconf with this Kconfig and pressing "Z" we see a problem caused by a free'd expression still referenced by the menu's visibility: ------------------------------------------------------------------------ mainmenu "Kconfig Testing Configuration" config VISIBLE def_bool n config Placeholder bool "Place holder" menu "Invisible" visible if VISIBLE config TEST_VAR bool "Test option" if VISIBLE endmenu ------------------------------------------------------------------------ This patch fixes this problem by creating copies of the menu's visibility expressions before AND-ing them with the prompt's one. Signed-off-by: Dirk Gouders <dirk@gouders.net> [yann.morin.1998@free.fr: move variable into its block-scope, keep lines <80 chars, typo] Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-05-30mconf: handle keys in empty dialogsDirk Gouders
When entering an empty dialog, using the movement keys resulted in unexpected characters beeing displayed, other keys like "z" and "h" did not work as expected. This patch handles the movement keys as well as other keys, especially "z", "h" and "/". Signed-off-by: Dirk Gouders <dirk@gouders.net> [yann.morin.1998@free.fr: keep lines <80 chars, so reorder test] Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-05-23kbuild: Don't assume dts files live in arch/*/boot/dtsMatthijs Kooijman
In commit b40b25ff (kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp), dts building was changed to always use the C preprocessor. This meant that the .dts file passed to dtc is not the original, but the preprocessed one. When compiling with a separate build directory (i.e., with O=), this preprocessed file will not live in the same directory as the original. When the .dts file includes .dtsi files, dtc will look for them in the build directory, not in the source directory and compilation will fail. The commit referenced above tried to fix this by passing arch/*/boot/dts as an include path to dtc. However, for mips, the .dts files are not in this directory, so dts compilation on mips breaks for some targets. Instead of hardcoding this particular include path, this commit just uses the directory of the .dts file that is being compiled, which effectively restores the previous behaviour wrt includes. For most .dts files, this path is just the same as the previous hardcoded arch/*/boot/dts path. This was tested on a mips (rt3052) and an arm (bcm2835) target. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-05-20scripts/config: fix assignment of parameters for short version of --*-after ↵Clement Chauplannaz
options When --*-after options are used, two parameters are parsed from the command-line before the adequate function is called: - the `before' option, after which the new option will be inserted, - the name of the option to enable/disable/modularise. With the short version of --*-after options (namely -E, -D, -M), the parsing step is not performed which leads to processing unset variables. Add options -E, -D, -M to the test that triggers assignment of parameters for --*-after options. Signed-off-by: Clement Chauplannaz <chauplac@gmail.com> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2013-05-16package: Makefile: unbreak binrpm-pkg targetLuiz Capitulino
Commit 6501320311664e11ad5489fedb17ea1f817c2617 dropped the rpm spec as a prerequisite for the binrpm-pkg target but forgot to update $< usage, which causes the rule to break. This commit fixes that by replacing $< with the spec name. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-05-07Merge branch 'misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild updates from Michal Marek: "Non-critical kbuild changes: - make coccicheck improvements, but no new semantic patches this time - make rpm improvements - make tar-pkg change to include the architecture in the filename. This is a deliberate incompatibility, but nobody has complained so far and it is useful if you build for different architectures. It also matches what the deb-pkg and rpm-pkg targets produce. - kbuild documentation fix" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: rpm-pkg: Remove pointless set -e statements rpm-pkg: Always regenerate the specfile rpm-pkg: Do not write to the parent directory rpm-pkg: Do not package the whole source directory buildtar: Add ARCH to the archive name Coccinelle: Fix patch output when coccicheck is used with M= and C= Coccinelle: Add support to the SPFLAGS variable Coccinelle: Cleanup the setting of the FLAGS and OPTIONS variables Coccinelle: Restore coccicheck verbosity in ONLINE mode (C=1 or C=2) scripts/package/Makefile: compare objtree with srctree instead of test KBUILD_OUTPUT doc: change example to existing Makefile fragment scripts/tags.sh: Add magic for OFFSET and DEFINE
2013-05-07Merge branch 'kconfig' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig updates from Michal Marek: - use pkg-config to detect curses libraries - clean up the way curses headers are searched - Some randconfig fixes, of which one had to be reverted - KCONFIG_SEED for randconfig debugging - memuconfig memory leak plugged - menuconfig > breadcrumbs > navigation - xconfig compilation fix - Other minor fixes * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: fix lists definition for C++ Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" kconfig: implement KCONFIG_PROBABILITY for randconfig kconfig: allow specifying the seed for randconfig kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG kconfig: do not override symbols already set kconfig: fix randconfig tristate detection kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h menuconfig: Add "breadcrumbs" navigation aid menuconfig: Fix memory leak introduced by jump keys feature merge_config.sh: Avoid creating unnessary source softlinks kconfig: optionally use pkg-config to detect ncurses libs menuconfig: optionally use pkg-config to detect ncurses libs
2013-05-07Merge branch 'kbuild' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild changes from Michal Marek: "Kbuild commits for v3.10-rc1: - Fix make mrproper after mod/file2alias rework - Fix ld-option Makefile function - Rewrite headers_install to shell to drop Perl dependency. There are some more patches I have to look at, so I might send another pull request later. Or just queue them for 3.11." * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: Fix cleaning in scripts/mod headers_install.pl: convert to headers_install.sh kbuild: fix ld-option function
2013-05-07menuconfig: fix NULL pointer dereference when searching a symbolLi Zefan
Searching for PPC_EFIKA results in a segmentation fault, and it's because get_symbol_prop() returns NULL. In this case CONFIG_PPC_EFIKA is defined in arch/powerpc/platforms/ 52xx/Kconfig, so it won't be parsed if ARCH!=PPC, but menuconfig knows this symbol when it parses sound/soc/fsl/Kconfig: config SND_MPC52xx_SOC_EFIKA tristate "SoC AC97 Audio support for bbplan Efika and STAC9766" depends on PPC_EFIKA This bug was introduced by commit bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts"). Reported-and-tested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Li Zefan <lizefan@huawei.com> Tested-by: Libo Chen <libo.chen@huawei.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-05-06Fix cleaning in scripts/modAndreas Schwab
Make sure devicetable-offsets.h is cleaned in the scripts/mod directory Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
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-29kconfig: fix lists definition for C++Yann E. MORIN
The C++ compiler is more strict in that it refuses to assign a void* to a struct list_head*. Fix that by explicitly casting the poisonning constants. (Tested with all 5 frontends, now.) Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Benjamin Poirier <bpoirier@suse.de>
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-26Revert "kconfig: fix randomising choice entries in presence of ↵Yann E. MORIN
KCONFIG_ALLCONFIG" This reverts commit 422c809f03f043d0950d8362214818e956a9daee. It causes more harm than it solves issues. Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Cc: Sedat Dilek <sedat.dilek@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Michal Marek <mmarek@suse.cz> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Greg KH <greg@kroah.com>
2013-04-25kconfig: implement KCONFIG_PROBABILITY for randconfigYann E. MORIN
Currently the odds to set each symbol is (rounded): booleans: y: 50% n: 50% tristates: y: 33% m: 33% n: 33% Introduce a KCONFIG_PROBABILITY environment variable to tweak the probabilities (in percentage), as such: KCONFIG_PROBABILITY y:n split y:m:n split ----------------------------------------------------------------- [1] unset or empty 50 : 50 33 : 33 : 34 [2] N N : 100-N N/2 : N/2 : 100-N N:M N+M : 100-(N+M) N : M : 100-(N+M) N:M:L N : 100-N M : L : 100-(M+L) [1] The current behaviour is kept as default, for backward compatibility [2] The solution initially implemented by Peter for Buildroot, see: http://git.buildroot.org/buildroot/commit/?id=3435c1afb5 Signed-off-by: Peter Korsgaard <jacmet@uclibc.org> [yann.morin.1998@free.fr: add to Documentation/] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-04-25kconfig: allow specifying the seed for randconfigYann E. MORIN
For reproducibility, it can be useful to be able to specify the seed to use to seed the RNG. Add a new KCONFIG_SEED environment variable which can be set to the seed to use: $ make KCONFIG_SEED=42 randconfig $ sha1sum .config 70a128c8dcc61303069e1be352cce64114dfcbca .config $ make KCONFIG_SEED=42 randconfig $ sha1sum .config 70a128c8dcc61303069e1be352cce64114dfcbca .config It's very usefull for eg. debugging the kconfig parser. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-04-25kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIGYann E. MORIN
Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG is specified. For example, given those two files (Thomas' test-case): ---8<--- Config.test.in config OPTIONA bool "Option A" choice prompt "This is a choice" config CHOICE_OPTIONA bool "Choice Option A" config CHOICE_OPTIONB bool "Choice Option B" endchoice config OPTIONB bool "Option B" ---8<--- Config.test.in ---8<--- config.defaults CONFIG_OPTIONA=y ---8<--- config.defaults And running: ./scripts/kconfig/conf --randconfig Config.test.in does properly randomise the two choice symbols (and the two booleans). However, running: KCONFIG_ALLCONFIG=config.defaults \ ./scripts/kconfig/conf --randconfig Config.test.in does *not* reandomise the two choice entries, and only CHOICE_OPTIONA will ever be selected. (OPTIONA will always be set (expected), and OPTIONB will be be properly randomised (expected).) This patch defers setting that a choice has a value until a symbol for that choice is indeed set, so that choices are properly randomised when KCONFIG_ALLCONFIG is set, but not if a symbol for that choice is set. Also, as a side-efect, this patch fixes the following case: ---8<--- choice config OPTION_A bool "Option A" config OPTION_B bool "Option B" config OPTION_C bool "Option C" endchoice ---8<--- which could previously generate such .config files: ---8<--- ---8<--- CONFIG_OPTION_A=y CONFIG_OPTION_A=y CONFIG_OPTION_B=y # CONFIG_OPTION_B is not set # CONFIG_OPTION_C is not set CONFIG_OPTION_C=y ---8<--- ---8<--- Ie., the first entry in a choice is always set, plus zero or one of the other options may be set. This patch ensures that only one option may be set for a choice. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Arnaud Lacombe <lacombar@gmail.com> --- Changes v2 -> v3 - ensure only one symbol is set in a choice Changes v1 -> v2: - further postpone setting that a choice has a value until one is indeed set - do not print symbols that are part of an invisible choice
2013-04-25kconfig: do not override symbols already setYann E. MORIN
For randconfig, if a list of required symbols is specified with KCONFIG_ALLCONFIG, such symbols do not "have a value" as per sym_has_value(), but have the "valid" flag set. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>