Recordmcount utility under scripts is run, after compiling each object,
to find out all the locations of calling _mcount() and put them into
specific seciton named __mcount_loc.
Then linker collects all such information into a table in the kernel image
(between __start_mcount_loc and __stop_mcount_loc) for later use by ftrace.
This patch adds arm64 specific definitions to identify such locations.
There are two types of implementation, C and Perl. On arm64, only C version
is used to build the kernel now that CONFIG_HAVE_C_RECORDMCOUNT is on.
But Perl version is also maintained.
This patch also contains a workaround just in case where a header file,
elf.h, on host machine doesn't have definitions of EM_AARCH64 nor
R_AARCH64_ABS64. Without them, compiling C version of recordmcount will
fail.
Change-Id: I2507f85dd5d9803102766320c12fede6ee338956
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: af64d2aa872a174772ffc00e2558083f70193acb
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
* commit 'v3.10.40': (203 commits)
Linux 3.10.40
ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe
drm: cirrus: add power management support
Input: synaptics - add min/max quirk for ThinkPad Edge E431
Input: synaptics - add min/max quirk for ThinkPad T431s, L440, L540, S1 Yoga and X1
lockd: ensure we tear down any live sockets when socket creation fails during lockd_up
dm thin: fix dangling bio in process_deferred_bios error path
dm transaction manager: fix corruption due to non-atomic transaction commit
Skip intel_crt_init for Dell XPS 8700
mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes()
mtd: nuc900_nand: NULL dereference in nuc900_nand_enable()
mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC
tgafb: fix data copying
gpio: mxs: Allow for recursive enable_irq_wake() call
rtlwifi: rtl8188ee: initialize packet_beacon
rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbb
rtlwifi: rtl8192se: Fix too long disable of IRQs
rtlwifi: rtl8192cu: Fix too long disable of IRQs
rtlwifi: rtl8188ee: Fix too long disable of IRQs
rtlwifi: rtl8723ae: Fix too long disable of IRQs
...
Change-Id: If5388cf980cb123e35e1b29275ba288c89c5aa18
Signed-off-by: Ian Maund <imaund@codeaurora.org>
This reverts commit 71f613a0a5. Upstream
has corrected the same bug with a different solution. Removing our
implementation to stay in sync with upstream. This is corrected in
upstream commit 3246a0352e.
Change-Id: I06fc01cfe30d3259e7e39d8e863312c3ff3b33e2
Signed-off-by: Ian Maund <imaund@codeaurora.org>
This reverts commit 69005c760d. This commit
was a bugfix on top of commit 71f613a0a5.
As this commit is also being reverted, we no longer need this bugfix.
Change-Id: I7f9a29d78e1e0ddf25f84c993365fcabdc0880e7
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Currently when UAPI headers for a staging driver are kept under the
drivers/staging directory, `make headers_install' installs them to
<install_prefix>/drivers instead of the usual <install_prefix>/usr. This
is a non-standard and unexpected location. Fix this by doing the
necessary string substitutions so that the UAPI headers for staging
drivers end up in <install_prefix>/usr/include/linux/staging.
Change-Id: Ibf6b813e69eea78fc59a4a505c75c6093eca70dd
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Split out the common msm_defconfig into MSM8994 specific
defconfig. Also update the build-all script to reflect the
changes.
Change-Id: I5df7a0d1f74f843bd2a353a389d42290b8b70590
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
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>
Instead of passing -jn directly through to make, and then building
each target in sequence, use the -j and -l options to determine a
number of threads to perform parallel invocations of make in.
The build results are collected, and printed when each build finishes,
which eliminates the interleaving that would otherwise occur between
builds.
Change-Id: Ieef0dcc8adfc72cbe043a3491d4d6f6c23fede31
Signed-off-by: David Brown <davidb@codeaurora.org>
Build all consists of a mismash of figuring out variables, running
shutils, and actually executing commands. In preparation for parallel
builds, change this to build up the commands in advance, and then have
a tracker go through and actually run the commands.
Change-Id: I24215b14e5d045f8269bbdc2af9989ab21b2310b
Signed-off-by: David Brown <davidb@codeaurora.org>
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: cd8d60a20a ('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>
3rd party Google-common code contains the following forbidden warning when
compiling. Once the remote corrects this warning, this change should be
removed.
ping.c:87:27: warning: assignment from incompatible pointer type
Change-Id: I278bc583884576ded13585f35f8be5ab9b2c5eef
Signed-off-by: Ian Maund <imaund@codeaurora.org>
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>
Linux-stable v 3.10.28 contains the following forbidden warning when
compiling for 64-bit architectures. Once the remote corrects this warning,
this change should be removed.
arch/arm64/include/asm/cmpxchg.h:162:3: warning: value computed is not used
Change-Id: Ia1c530a9821ee69623950b43a6a7fe130cbaaa04
Signed-off-by: Ian Maund <imaund@codeaurora.org>
As is done for other architectures, sort the exception table at
build-time rather than during boot.
Since sortextable appears to be a standalone C program relying on the
host elf.h to provide EM_AARCH64, I've had to add a conditional check in
order to allow cross-compilation on machines that aren't running a
bleeding-edge libc-dev.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: adace89562c7a9645b8dc84f6e1ac7ba8756094e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Use a different set of defconfig patterns for 64-bit targets.
Currently, msm_defconfig needs to not be built for 32-bit, and is the
only defconfig for the 64-bit target.
Change-Id: I2c3840fd668aa9a1dbd304c64484f6735f1aeea1
Signed-off-by: David Brown <davidb@codeaurora.org>
Instead of wiping the log file for each make target, only wipe it
initially, and then continue to append to it. Instead of closing
between files, just flush. Although the last use doesn't ever close
the file, it is flushed, and will be closed on exit.
Change-Id: Ic4b38cdad993bc32711f832ce30ca8d8dead0db6
Signed-off-by: David Brown <davidb@codeaurora.org>
Move most of the build work into a Builder class, which is given a
name and a specific defconfig. If the arch contains arm64, build
using the CROSS_COMPILE64 compiler rather than the CROSS_COMPILE
compiler.
Defconfigs that match the globs in arm64 will have a "-64" appended to
the name, to avoid conflicts when the same target has both a 32-bit
and a 64-bit build.
The main visible change to this is that CROSS_COMPILE now must be set
before invoking this script. If CROSS_COMPILE64 isn't set, it won't
be willing to build any 64-bit targets.
Change-Id: I0bd9a7bff22f9c21371c663aff9e8be5116fcdae
Signed-off-by: David Brown <davidb@codeaurora.org>
Introduce mdm9630 as the official name for msmkrypton.
Change-Id: I0fd861f30bb461ea575084bfe241d8ded1d0c484
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
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)
Change-Id: I3d6321b7d87727c7c2802b3924f2e89a28e4b9ca
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>
Cc: stable@vger.kernel.org
Git-commit: f6537f2f0eba4eba3354e48dbe3047db6d8b6254
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
CRs-fixed: 583755
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
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>
Do not bleat a message on nominally acceptable CamelCase uses that are
separated by an _ like drm_core_has_MTRR.
CamelCase tests are also a bit noisy against certain types of code
acceptable to some kernel developers.
Make the test applicable only with --strict.
Change-Id: I025ce70b6df030b462a659ca82cd797e638dff38
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: be79794bc116fc0c264be1a599433c92ec9e34f5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
mpq8092_defconfig does not match the existing msm pattern
because of not having its name started with msm prefix.
Compile it too.
Change-Id: I1b758e33fa550fdac539a18cc61a6a8348f61f71
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
* tools-3.10: (53 commits)
scripts/Makefile.headersinst: make scratch file parallel safe
scripts/Makefile.headersinst: install headers from scratch file
Update gcc-wrapper for 3.10
scripts: only set CROSS_COMPILE when unset to begin with
build-all.py: Add support for msmkrypton_defconfig
gcc-wrapper: trim whitelist for gcc 4.7
Update gcc-wrapper for 3.10-rc5
Remove the build of omap2plus from build-all.py
checkpatch: Excuse reverts from "summary line over 75 characters" check
checkpatch: add new message type string
checkpatch: recognize only specific tags when ending commit text
checkpatch: require commit text
checkpatch: Add check for vreg_xxx api in opensource drivers
checkpatch: Add check for gpiomux usage in msm board files
checkpatch: complain about the use of dsb().
checkpatch: close filp_open loophole.
checkpatch: Handle long multi-line macros better.
checkpatch: deprecate unbounded string functions.
checkpatch: forbid implied-barrier I/O functions.
checkpatch: Merge continuation-header handling from .38.
...
* qandroid-3.10: (636 commits)
netfilter: xt_qtaguid: Protect iface list access with necessary lock
HID: magicmouse: Fix build warning
USB: gadget: mtp: Fix OUT endpoint request length usage in read
USB: gadget: f_mtp: Fix using tx buffer pointer
msm: Fix race condition in domain lookup
msm: Add null-pointer checks for domains
base: sync: increase size of sync_timeline name
USB: gadget: mtp: Add module parameters for Tx transfer length
msm: iommu: Lock the genpool allocation
gpu: ion: fix page offset in dma_buf_kmap()
gpu: ion: Fix bug in ion_system_heap map_user
gpu: ion: Only map as much of the vma as the user requested
gpu: ion: use vmalloc to allocate page array to map kernel
gpu: ion: Remove dead comments
gpu: ion: Minimize allocation fallback delay
mmc: sd: Set the card removed if card detect fails
gpu: ion: don't fault in individual pages for the CP heap
gpu: ion: do not ask for compound pages in system heap
gpu: ion: Modify the system heap to try to allocate large/huge pages
gpu: ion: Set the dma_address of the sg list at alloc time
...
Conflicts:
arch/arm/Kconfig
arch/arm/include/asm/hardware/cache-l2x0.h
arch/arm/mm/cache-l2x0.c
drivers/mmc/card/block.c
drivers/usb/gadget/udc-core.c
If the scratch file used to store input files is not named in
a unique way, a parallel build will not work.
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
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]: ***
By dumping the input files to a scratch file and using xargs to read the
input list from the scratch file, we can avoid blowing out the maximum
argument size and install headers in a long path name environment.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Don't mess with CROSS_COMPILE if it's already set up in the user's
environment. This allows the user to specify the cross compiler that
they wish to use.
Change-Id: I15873f79a30e1da91ee34eb31c713e5cd767c372
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
There is an msmkrypton_defconfig which does not match the
existing msm pattern by virtue of not containing a number
after the 'msm' prefix. Compile it too.
Change-Id: I19535afe7912487cb6882adec89e3fd8138ed904
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
With recent code and defconfig changes, the number warnings needing to
be ignored has gone done. Update the wrapper accordingly.
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
This tree doesn't maintain support for omap2plus, thus it makes
sense to remove omap2plus build from build-all script.
Change-Id: I54de554a0bc12f5fc26af589dc58c1beb532994f
Signed-off-by: Adrian Alexei <aalexei@codeaurora.org>
Rather than forcing authors of reverts to truncate the summary line
because the "Revert" prefix added pushes it over the character limit,
excuse reverts from this rule.
Change-Id: I395dfff3327e360ef935d4a685c38df6577e3867
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Many messsages are missing the new message type parameter, which
causes warning messages and a lack of the line number from the
offending line in the patch.
Change-Id: I69f2283c3dc27edd66fd2676c8be45664699dba6
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
There are some very frequently used tags that checkpatch can look
for as an ending to the commit text rather than using a pattern,
which can generate false positives in the "no commit text" rule.
Change-Id: I5b4400017b8273bcd9f5a59b3e28965c0062bef4
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 336a3ae6253031d6a0de11882ac24a11f83d3323)
Commit text is almost always necessary to explain why a change is
needed. Exceptions are rare enough that these can be granted through
manual checkpatch overrides.
Change-Id: I926b2276f717940c2fec77a6709fa3088b1bf0c3
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit d3b3b64c907dbf2244250fc4b389562f2efedee2)
Vreg API implementation is deprecated. We are using
Linux regulator framework now. Hence vreg API should
not be used.
Change-Id: I8e31dac66592d2d195d190b770a436e93206cf8b
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
(cherry picked from commit adfb933a24911e3514a2f1b6fe1b1a9151fec56d)
MSM has a board-*-gpiomux file where all the gpiomux configs reside.
Warn if a non gpiomux board file tries to add gpiomux configs.
The camera board file is an exception to this rule.
Change-Id: Ibab190dcbd7ea78e7ca150142c68c5ae881e4e06
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
(cherry picked from commit 60d78bb9809e7d4d1c3dc1425cbfd9e649e87c1c)
Now that mb() does what we want, dsb() should be discouraged.
Change-Id: Ib8fe8f44f669753c3d91fac3c6e598e117d6d90e
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 9c0619be7b93ad114d6f33a749d905ddff93df7d)
filp_open allows people to get around the ban on sys_open.
Close the loophole.
Change-Id: I6e2be62e848cbc064e07008d0886c0d003c8be4b
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit bb181a18a813a70176f71a0c64aa572fcfbef0f0)
Improve parsing of multiline macros which run beyond the available
diff context. These beyond-the-horizon macros previously caused
two distinct naughty behaviors:
- The scanner, confused by the trailing backslash, would grab
the header of the next context hunk and treat it as the last
line of the preceding macro.
- The analyzer, unable to fully reduce the macro, would blame
the patch for submitting an unbalanced or unprotected macro.
Change-Id: I6b7dd3d577c524d30b59dff7b20393bb5135f16d
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit ddd028c47b4d91aa9c0e97445eb584b2de367769)
Unbounded string functions are overflow risks. The 'n'
versions of those functions should be used instead.
Change-Id: Ice0fb3ebdae9aa88cc7e764ffdf68cbed857febf
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 15e1e97d66dd6a6039c1ec2bd549a632fe361128)
Forbid read[bwl], write[bwl], in[bwl], and out[bwl], as they
contain a 'stealth barrier' which can harm performance.
Developers are expected to call appropriate __raw_* or *_relaxed
APIs and manage barriers explicitly.
Change-Id: Ie4da221c91a0505917199db9e2fdb704c3e47d44
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 032fd4ba09e195d9913c08f460130da9905936ef)
This commit is a cherry pick and squash of commits:
85c2ee62d37c19456c6dc83db262123956f010ac
4bc7c6001daba7d4037f54f67bae7fa90f759402
checkpatch: Handle continuation headers.
Continuation headers baffle checkpatch, as it can only operate
on one line of context at a time. When continuation headers are found,
put them up with the header they're continuing so the whole thing
can be parsed in a single line of context.
checkpatch: Don't treat diffs as patches.
The patch-header cleanup code assumed that it would only ever
see patches, which was of course hogwash. This lead to crazy
results as it tried to wrap what it thought were continuation
lines at the beginnings of raw diffs.
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 57d50ae730a057ee1099a94a397475bfd147d97b)
Conflicts:
scripts/checkpatch.pl
Change-Id: I60b2d914ada9a8690b89ffb8c1e32a8b81a5e715