Commit Graph

2480 Commits

Author SHA1 Message Date
黄涛
fcef60e36f Merge tag 'lsk-v3.10-android-14.07' into develop-3.10
LSK v3.10 Android 14.07 release

Conflicts:
	drivers/clocksource/arm_arch_timer.c
	lib/Makefile
2014-08-06 15:34:14 +08:00
Alex Shi
c30d344580 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-07-07 10:48:56 +08:00
Alex Shi
49bcf50125 Merge tag 'v3.10.47' into linux-linaro-lsk
This is the 3.10.47 stable release
2014-07-07 10:47:18 +08:00
Alex Smith
e16046836e recordmcount/MIPS: Fix possible incorrect mcount_loc table entries in modules
commit 91ad11d7cc upstream.

On MIPS calls to _mcount in modules generate 2 instructions to load
the _mcount address (and therefore 2 relocations). The mcount_loc
table should only reference the first of these, so the second is
filtered out by checking the relocation offset and ignoring ones that
immediately follow the previous one seen.

However if a module has an _mcount call at offset 0, the second
relocation would not be filtered out due to old_r_offset == 0
being taken to mean that the current relocation is the first one
seen, and both would end up in the mcount_loc table.

This results in ftrace_make_nop() patching both (adjacent)
instructions to branches over the _mcount call sequence like so:

  0xffffffffc08a8000:  04 00 00 10     b       0xffffffffc08a8014
  0xffffffffc08a8004:  04 00 00 10     b       0xffffffffc08a8018
  0xffffffffc08a8008:  2d 08 e0 03     move    at,ra
  ...

The second branch is in the delay slot of the first, which is
defined to be unpredictable - on the platform on which this bug was
encountered, it triggers a reserved instruction exception.

Fix by initializing old_r_offset to ~0 and using that instead of 0
to determine whether the current relocation is the first seen.

Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7098/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-06 18:54:13 -07:00
黄涛
06b2951ab6 scripts/checkpatch.pl: update to b43ae21bd1 and enable strict default 2014-07-04 13:00:14 +08:00
黄涛
132c57a600 scripts/checkpatch.pl: update to ae3ccc4678 2014-06-23 19:22:25 +08:00
黄涛
3388a670bd rk: gcc-wrapper.py ignore atags_to_fdt.c:96 2014-06-17 12:53:45 +08:00
Mark Brown
d3538e3017 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-06-16 22:28:02 +01:00
Mark Brown
5f856071c7 Merge remote-tracking branch 'lsk/v3.10/topic/arm64-crypto' into linux-linaro-lsk
Conflicts:
	arch/arm64/Kconfig
2014-06-16 20:14:19 +01:00
Ard Biesheuvel
126ef42a10 cpu: add generic support for CPU feature based module autoloading
This patch adds support for advertising optional CPU features over udev
using the modalias, and for declaring compatibility with/dependency upon
such a feature in a module.

The mapping between feature numbers and actual features should be provided
by the architecture in a file called <asm/cpufeature.h> which exports the
following functions/macros:
- cpu_feature(FEAT), a preprocessor macro that maps token FEAT to a
  numeric index;
- bool cpu_have_feature(n), returning whether this CPU has support for
  feature #n;
- MAX_CPU_FEATURES, an upper bound for 'n' in the previous function.

The feature can then be enabled by setting CONFIG_GENERIC_CPU_AUTOPROBE
for the architecture.

For instance, a module that registers its module init function using

  module_cpu_feature_match(FEAT_X, module_init_function)

will be probed automatically when the CPU's support for the 'FEAT_X'
feature is advertised over udev, and will only allow the module to be
loaded by hand if the 'FEAT_X' feature is supported.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 67bad2fdb7)
Signed-off-by: Mark Brown <broonie@linaro.org>

Conflicts:
	drivers/base/cpu.c
2014-06-16 18:00:10 +01:00
黄涛
e9fa201a63 rk: add gcc-wrapper 2014-06-16 22:03:54 +08:00
黄涛
ee25a425b9 Merge tag 'lsk-android-14.05' into develop-3.10
lsk 14.05 android release

Conflicts:
	arch/arm/common/Kconfig
	arch/arm64/include/asm/arch_timer.h
	drivers/staging/android/fiq_debugger/fiq_debugger.c
	drivers/usb/Kconfig
2014-06-12 21:04:26 +08:00
Mark Brown
7ce4ecc86d Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-06-01 17:31:46 +01:00
Mark Brown
8a98322c1c Merge tag 'v3.10.41' into linux-linaro-lsk
This is the 3.10.41 stable release
2014-06-01 17:31:39 +01:00
Andreas Schwab
70c6edb3bc powerpc: Add vr save/restore functions
commit 8fe9c93e74 upstream.

GCC 4.8 now generates out-of-line vr save/restore functions when
optimizing for size.  They are needed for the raid6 altivec support.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-30 21:52:12 -07:00
Mark Brown
9e2da0c5c8 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-05-30 18:19:45 +01:00
Mark Brown
2521006663 Merge remote-tracking branch 'lsk/v3.10/topic/arm64-ftrace' into linux-linaro-lsk
Conflicts:
	arch/arm64/Kconfig
	arch/arm64/kernel/Makefile
	arch/arm64/kernel/hw_breakpoint.c
	arch/arm64/kernel/ptrace.c
2014-05-30 18:18:44 +01:00
AKASHI Takahiro
6470430d6d ftrace: Add arm64 support to recordmcount
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.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-30 18:15:42 +01:00
Mark Brown
baa60ad55e Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-05-21 18:02:00 +01:00
Mark Brown
016e8cd0ca Merge remote-tracking branch 'lsk/v3.10/topic/arm64-misc' into linux-linaro-lsk 2014-05-21 17:55:59 +01:00
Jiang Liu
eeae892aea arm64, jump label: detect %c support for ARM64
As commit a9468f30b5 "ARM: 7333/2: jump label: detect %c
support for ARM", this patch detects the same thing for ARM64
because some ARM64 GCC versions have the same issue.

Some versions of ARM64 GCC which do support asm goto, do not
support the %c specifier. Since we need the %c to support jump
labels on ARM64, detect that too in the asm goto detection script
to avoid build errors with these versions.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jiang Liu <liuj97@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit f3c003f72d)
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-21 17:54:10 +01:00
Mark Brown
c877dd2854 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Conflicts:
	arch/arm64/Makefile
2014-05-18 18:46:41 +01:00
Mark Brown
a5d53ad243 Merge remote-tracking branch 'lsk/v3.10/topic/arm64-misc' into linux-linaro-lsk
Conflicts:
	Documentation/arm64/tagged-pointers.txt
	arch/arm64/Kconfig
	arch/arm64/boot/dts/Makefile
	arch/arm64/include/asm/arch_timer.h
	arch/arm64/include/asm/elf.h
	arch/arm64/include/asm/spinlock.h
	arch/arm64/kernel/smp.c
2014-05-15 20:29:29 +01:00
Will Deacon
dc1307d294 arm64: extable: sort the exception table at build time
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>
(cherry picked from commit adace89562)
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-15 19:59:53 +01:00
Mark Brown
afaa953324 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-05-08 12:11:39 +01:00
Mark Brown
9b92dfc49a Merge remote-tracking branch 'lsk/v3.10/topic/misc' into linux-linaro-lsk 2014-05-08 12:11:07 +01:00
Mark Brown
17b540de36 dtc: Use general include directory
Since newer DT bindings include references to include/dt-bindings we need
to make this available to build DTs using them. Upstream has a number of
reworkings which are much more invasive but featureful, just include a
minimal fix.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 12:10:16 +01:00
黄涛
7fe47454f2 Merge tag 'lsk-android-14.04' into develop-3.10
lsk-android 14.04

Conflicts:
	Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
	drivers/pinctrl/pinconf-generic.c
	include/linux/pinctrl/consumer.h
	include/linux/pinctrl/pinconf-generic.h
2014-04-24 19:04:10 +08:00
黄涛
0ffd56dafe Merge tag 'lsk-android-14.03' into develop-3.10
lsk 14.03 Android release
2014-04-15 12:51:10 +08:00
Alex Shi
dca382e80b Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-04-15 09:59:04 +08:00
Nicolas Dichtel
3246a0352e kbuild: fix make headers_install when path is too long
commit c0ff68f161 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-04-14 06:42:14 -07:00
黄涛
b9d78430dc Revert "add pnmtodtsi"
This reverts commit d6cb370f19.
2014-04-09 15:52:13 +08:00
黄涛
d189e01506 Revert "open display kernel log in uboot,just support lvds now"
This reverts commit ade9cca99e.
2014-04-09 15:52:13 +08:00
eddie
ade9cca99e open display kernel log in uboot,just support lvds now 2014-04-09 15:20:02 +08:00
eddie
d6cb370f19 add pnmtodtsi 2014-04-09 14:58:35 +08:00
Mark Brown
0f15ea2dcd Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-03-31 23:51:39 +01:00
Ben Hutchings
573994d38b deb-pkg: Fix cross-building linux-headers package
commit f8ce239dfc 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>
2014-03-31 09:58:13 -07:00
Alex Shi
a0692dda2a Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-02-27 09:39:31 +08:00
Jan Moskyto Matejka
5fbbcae34e Modpost: fixed USB alias generation for ranges including 0x9 and 0xA
commit 03b56329f9 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-02-22 12:41:28 -08:00
Russ Dill
2ecab0b339 PIE: Support embedding position independent executables
This commit adds support for embedding PIEs into the kernel, loading them
into genalloc sections, performing necessary relocations, and running code
from them. This allows platforms that need to run code from SRAM, such
an during suspend/resume, to develop that code in C instead of assembly.

Functions and data for each PIE should be grouped into sections with the
__pie(<group>) and __pie_data(<group>) macros respectively. Any symbols or
functions that are to be accessed from outside the PIE should be marked with
EXPORT_PIE_SYMBOL(<sym>). For example:

static struct ddr_timings xyz_timings __pie_data(platformxyz) = {
	[...]
};

void __pie(platformxyz) xyz_ddr_on(void *addr)
{
	[...]
}
EXPORT_PIE_SYMBOL(xyz_ddr_on);

While the kernel can access exported symbols from the PIE, the PIE cannot
access symbols from the kernel, but can access data from the kernel and
call functions in the kernel so long as addresses are passed into the PIE.

PIEs are loaded from the kernel into a genalloc pool with pie_load_sections.
pie_load_sections allocates space within the pool, copies the neccesary
code/data, and performs any necessary relocations. A chunk identifier is
returned for removing the PIE from the pool, and for translating symbols.

Because the PIEs are dynamically relocated, special accessors must be used
to access PIE symbols from kernel code:

- kern_to_pie(chunk, ptr):   Translate a PIE symbol to the virtual address
                             it is loaded into within the pool.

- fn_to_pie(chunk, ptr):     Same as above, but for function pointers.

- sram_to_phys(chunk, addr): Translate a virtual address within a loaded PIE
                             to a physical address.

Loading a PIE involves three main steps. First a set of common functions to
cover built-ins emitted by gcc (memcpy, memmove, etc) is copied into the pool.
Then the actual PIE code and data is copied into the pool. Because the PIE
code is contained within an overlay with other PIEs, offsets to the common
functions are maintained. Finally, relocations are performed as necessary.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
2013-11-21 13:39:21 +08:00
黄涛
ddcfb41f93 Merge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android+android-common-3.10' into develop-3.10 2013-11-21 13:33:20 +08:00
Mark Brown
4cb518ab3d Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2013-11-13 12:06:53 +00:00
Ming Lei
27b840ea21 scripts/kallsyms: filter symbols not in kernel address space
commit f6537f2f0e 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 b9b32bf70f)

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-11-13 12:05:32 +09:00
黄涛
107d3e5358 Merge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android+android-common-3.10' into develop-3.10 2013-11-11 14:38:40 +08:00
黄涛
ef88c53f60 rk: revert 20f3d0b+v3.0.66 to v3.0 2013-11-08 21:34:05 +08:00
黄涛
8216724bd9 rk: temp revert rk change 2013-11-08 21:33:42 +08:00
黄涛
23694c3621 rk: reset drivers/net/wireless drivers/video/display/display-sysfs.c sound/soc/codecs/spdif_transciever.c drivers/net/usb/asix.c and some file mode 2013-11-08 20:45:48 +08:00
John Stultz
24821455e3 Revert "ARM: convert build of appended dtb zImage to list of dtbs"
This reverts commit 5e9468632ea81e7d17fc9bd4457acbaffda7b370.

Tixy was seeing trouble with "make dtbs" and "make my-boards.dtb",
and found reverting this resolves the issue. So for now lets
revert this.

Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-07-02 14:49:32 -07:00
Arve Hjønnevåg
a88f9e2749 kconfig: Fix defconfig when one choice menu selects options that another 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-01 15:52:05 -07:00
Colin Cross
930d53b7c0 ARM: convert build of appended dtb zImage to list of dtbs
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-07-01 14:16:24 -07:00