On ARM the debug info is not present in the .eh_frame sections but
in .debug_frame instead, in dwarf format.
This patch set uses libunwind to load and parse the dwarf debug info from
the .debug_frame section if no .eh_frame_hdr section is found; also it
sets the hooks in the perf_regs and libunwind code for ARMv7.
Dependencies:
. if present, libunwind >= 1.1 is needed to prevent a segfault when
parsing the dwarf info,
. libunwind needs to be configured with --enable-debug-frame
to prevent a linkage error. Note: --enable-debug-frame is automatically
selected on ARM).
The generated perf has been tested on ARMv7/OMAP4 and x86_64, using the
following commands:
perf record -g [dwarf] -- <binary>
perf report --sort symbol --call-graph --stdio
Jean Pihet (1):
perf: parse the .debug_frame section in case .eh_frame is not present
Will Deacon (2):
ARM: perf: add support for perf registers API
ARM: perf: wire up perf_regs and unwind support for ARM
arch/arm/Kconfig | 2 +
arch/arm/include/uapi/asm/Kbuild | 1 +
arch/arm/include/uapi/asm/perf_regs.h | 23 +++++++++++
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/perf_regs.c | 30 ++++++++++++++
tools/perf/arch/arm/Makefile | 3 ++
tools/perf/arch/arm/include/perf_regs.h | 54 +++++++++++++++++++++++++
tools/perf/arch/arm/util/unwind.c | 48 ++++++++++++++++++++++
tools/perf/config/Makefile | 9 +++--
tools/perf/util/unwind.c | 71 +++++++++++++++++++++++++--------
10 files changed, 223 insertions(+), 19 deletions(-)
create mode 100644 arch/arm/include/uapi/asm/perf_regs.h
create mode 100644 arch/arm/kernel/perf_regs.c
create mode 100644 tools/perf/arch/arm/include/perf_regs.h
create mode 100644 tools/perf/arch/arm/util/unwind.c
--
1.7.11.7
This broke after a recent change "cedb70a cpufreq: Split __cpufreq_remove_dev()
into two parts" from Srivatsa..
Consider a scenario where we have two CPUs in a policy (0 & 1) and we are
removing cpu 1. On the call to __cpufreq_remove_dev_prepare() we have cleared 1
from policy->cpus and now on a call to __cpufreq_remove_dev_finish() we read
cpumask_weight of policy->cpus, which will come as 1 and this code will behave
as if we are removing the last cpu from policy :)
Fix it by clearing cpu mask in __cpufreq_remove_dev_finish() instead of
__cpufreq_remove_dev_prepare().
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat(a)linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
V1->V2:
- sent separately without cleanup patches
- use cpumask_any_but() instead of cpumask_first()
drivers/cpufreq/cpufreq.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 43c24aa..dbfe219 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1125,7 +1125,7 @@ static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *policy,
int ret;
/* first sibling now owns the new sysfs dir */
- cpu_dev = get_cpu_device(cpumask_first(policy->cpus));
+ cpu_dev = get_cpu_device(cpumask_any_but(policy->cpus, old_cpu));
/* Don't touch sysfs files during light-weight tear-down */
if (frozen)
@@ -1189,12 +1189,9 @@ static int __cpufreq_remove_dev_prepare(struct device *dev,
policy->governor->name, CPUFREQ_NAME_LEN);
#endif
- WARN_ON(lock_policy_rwsem_write(cpu));
+ lock_policy_rwsem_read(cpu);
cpus = cpumask_weight(policy->cpus);
-
- if (cpus > 1)
- cpumask_clear_cpu(cpu, policy->cpus);
- unlock_policy_rwsem_write(cpu);
+ unlock_policy_rwsem_read(cpu);
if (cpu != policy->cpu) {
if (!frozen)
@@ -1237,9 +1234,12 @@ static int __cpufreq_remove_dev_finish(struct device *dev,
return -EINVAL;
}
- lock_policy_rwsem_read(cpu);
+ WARN_ON(lock_policy_rwsem_write(cpu));
cpus = cpumask_weight(policy->cpus);
- unlock_policy_rwsem_read(cpu);
+
+ if (cpus > 1)
+ cpumask_clear_cpu(cpu, policy->cpus);
+ unlock_policy_rwsem_write(cpu);
/* If cpu is last user of policy, free policy */
if (cpus == 1) {
--
1.7.12.rc2.18.g61b472e
From: Mark Brown <broonie(a)linaro.org>
Rather than requiring each board to explicitly disable the I2S controllers
it is not using instead require boards to enable those that they are using.
This is required for audio operation on Arndale, one of the unused I2S
controllers is pinmuxed with the LDO enable GPIOs for the WM1811A.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
This seems like a more robust approach to handling the externally
visible IPs - if this is OK I can go through and do further updates for
other devices.
arch/arm/boot/dts/exynos5250-arndale.dts | 4 ++++
arch/arm/boot/dts/exynos5250-smdk5250.dts | 8 --------
arch/arm/boot/dts/exynos5250.dtsi | 3 +++
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts
index cee55fa..4687fa0 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -412,6 +412,10 @@
status = "disabled";
};
+ i2s0: i2s@03830000 {
+ status = "okay";
+ };
+
spi_0: spi@12d20000 {
status = "disabled";
};
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts
index 2538b32..f86d567 100644
--- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
@@ -231,14 +231,6 @@
status = "okay";
};
- i2s1: i2s@12D60000 {
- status = "disabled";
- };
-
- i2s2: i2s@12D70000 {
- status = "disabled";
- };
-
sound {
compatible = "samsung,smdk-wm8994";
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 7d7cc77..c863113 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -417,6 +417,7 @@
i2s0: i2s@03830000 {
compatible = "samsung,s5pv210-i2s";
+ status = "disabled";
reg = <0x03830000 0x100>;
dmas = <&pdma0 10
&pdma0 9
@@ -433,6 +434,7 @@
i2s1: i2s@12D60000 {
compatible = "samsung,s3c6410-i2s";
+ status = "disabled";
reg = <0x12D60000 0x100>;
dmas = <&pdma1 12
&pdma1 11>;
@@ -445,6 +447,7 @@
i2s2: i2s@12D70000 {
compatible = "samsung,s3c6410-i2s";
+ status = "disabled";
reg = <0x12D70000 0x100>;
dmas = <&pdma0 12
&pdma0 11>;
--
1.8.4.rc3
This patchset adds DT nodes for FIMD and DP controller for Exynos5420
based SMDK.
It moves all common properties of FIMD and DP controller DT node specific to
Exynos5 Socs like 5250 and 5420 to exynos5.dtsi file.
It also adds required PM domain DT nodes for exynos5420.
Is rebased on branch kgene's "for-next"
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h…
The DP PHY DT Node is based on Jingoo Han's inflight patchset at
http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/66…
changes since v1:
- Addressed comments given by Tomasz Figa <tomasz.figa(a)gmail.com>
and Ajay kumar <ajaynumb(a)gmail.com>
Vikas Sajjan (6):
ARM: dts: Move display-timimg information inside FIMD DT node for
exynos5250
ARM: dts: Update FIMD DT node for Exynos5 SoCs
ARM: dts: Add FIMD DT node to exynos5420 DTS files
ARM: dts: Update DP controller DT Node for Exynos5 based SoCs
ARM: dts: Add DP controller DT node to exynos5420 SoC
ARM: dts: Add pin state information for DP HPD support to Exynos5420
Yadwinder Singh Brar (1):
ARM: dts: Add basic PM domains for EXYNOS5420
arch/arm/boot/dts/exynos5.dtsi | 21 +++++++++++
arch/arm/boot/dts/exynos5250-arndale.dts | 4 ++-
arch/arm/boot/dts/exynos5250-smdk5250.dts | 32 +++++++++--------
arch/arm/boot/dts/exynos5250.dtsi | 28 ++++++---------
arch/arm/boot/dts/exynos5420-pinctrl.dtsi | 7 ++++
arch/arm/boot/dts/exynos5420-smdk5420.dts | 31 ++++++++++++++++
arch/arm/boot/dts/exynos5420.dtsi | 55 +++++++++++++++++++++++++++++
7 files changed, 145 insertions(+), 33 deletions(-)
--
1.7.9.5
Automated build results for all ARM defconfigs. Summarizes all build
errors, warnings and section mismatches followed by a per-defconfig
summary.
Tree/Branch: next-20130912
Git describe: next-20130912
Commit: c2bbc01ff5 Add linux-next specific files for 20130912
Build Time: 106 min 36 sec
Passed: 129 / 129 (100.00 %)
Failed: 0 / 129 ( 0.00 %)
Errors: 0
Warnings: 17
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
arm-spitz_defconfig: 1 warnings 0 mismatches
arm-mini2440_defconfig: 1 warnings 0 mismatches
arm-multi_v7_defconfig+lpae.config: 16 warnings 0 mismatches
arm-iop13xx_defconfig: 1 warnings 0 mismatches
arm-corgi_defconfig: 1 warnings 0 mismatches
arm-iop32x_defconfig: 1 warnings 0 mismatches
-------------------------------------------------------------------------------
Warnings Summary: 17
5 crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 drivers/tty/serial/imx.c:1542:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 drivers/gpu/host1x/hw/debug_hw.c:175:10: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘dma_addr_t’ [-Wformat]
1 drivers/gpu/host1x/hw/cdma_hw.c:57:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-sdma.c:1166:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-sdma.c:1092:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:960:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:960:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:930:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:930:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:603:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:593:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:579:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:579:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 arch/arm/mach-omap2/gpmc.c:1495:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_t’ [-Wformat]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm-spitz_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-mini2440_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-multi_v7_defconfig+lpae.config : PASS, 0 errors, 16 warnings, 0 section mismatches
Warnings:
arch/arm/mach-omap2/gpmc.c:1495:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_t’ [-Wformat]
drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-sdma.c:1092:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-sdma.c:1166:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:579:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:579:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:593:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:603:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:930:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:930:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:960:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:960:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/gpu/host1x/hw/cdma_hw.c:57:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
drivers/gpu/host1x/hw/debug_hw.c:175:10: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘dma_addr_t’ [-Wformat]
drivers/tty/serial/imx.c:1542:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
-------------------------------------------------------------------------------
arm-iop13xx_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-corgi_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-iop32x_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm-realview-smp_defconfig
arm-at91rm9200_defconfig
arm-pcm027_defconfig
arm-rmk-omap3430-ldp.config
arm-bcm2835_defconfig
arm-ixp4xx_defconfig
arm-dove_defconfig
arm-nuc950_defconfig
arm-ebsa110_defconfig
arm-at91sam9261_9g10_defconfig
arm-omap2plus_defconfig
arm-bockw_defconfig
arm-hackkit_defconfig
arm-cns3420vb_defconfig
arm-u300_defconfig
arm-bcm_defconfig
arm-exynos_defconfig
arm-imx_v4_v5_defconfig
arm-zeus_defconfig
arm-rmk-sa11x0-neponset.config
arm-davinci_all_defconfig
arm-badge4_defconfig
arm-exynos_defconfig+lpae.config
arm-nuc960_defconfig
arm-shark_defconfig
arm-allnoconfig
arm-em_x270_defconfig
arm-armadillo800eva_defconfig
arm-trizeps4_defconfig
arm-acs5k_defconfig
arm-rmk-realview.config
arm-at91sam9260_9g20_defconfig
arm-lpc32xx_defconfig
arm-rmk-omap4430-ldp-allnoconfig.config
arm-rmk-versatile.config
arm-vexpress_defconfig
arm-ape6evm_defconfig
arm-netx_defconfig
arm-socfpga_defconfig
arm-orion5x_defconfig
arm-cm_x2xx_defconfig
arm-da8xx_omapl_defconfig
arm-omap2plus_defconfig+pm.config
arm-at91x40_defconfig
arm-cerfcube_defconfig
arm-versatile_defconfig
arm-am200epdkit_defconfig
arm-rmk-omap3430-ldp-allnoconfig.config
arm-simpad_defconfig
arm-pxa910_defconfig
arm-acs5k_tiny_defconfig
arm-xcep_defconfig
arm-s5pv210_defconfig
arm-at91_dt_defconfig
arm-palmz72_defconfig
arm-ezx_defconfig
arm-imote2_defconfig
arm-netwinder_defconfig
arm-iop33x_defconfig
arm-rmk-pxa.config
arm-assabet_defconfig
arm-magician_defconfig
arm-mainstone_defconfig
arm-s5pc100_defconfig
arm-lager_defconfig
arm-spear3xx_defconfig
arm-shannon_defconfig
arm-at91sam9g45_defconfig
arm-prima2_defconfig
arm-jornada720_defconfig
arm-s3c2410_defconfig
arm-pxa255-idp_defconfig
arm-h3600_defconfig
arm-colibri_pxa270_defconfig
arm-nhk8815_defconfig
arm-nuc910_defconfig
arm-viper_defconfig
arm-colibri_pxa300_defconfig
arm-pleb_defconfig
arm-mmp2_defconfig
arm-spear6xx_defconfig
arm-eseries_pxa_defconfig
arm-ks8695_defconfig
arm-raumfeld_defconfig
arm-integrator_defconfig
arm-footbridge_defconfig
arm-pxa168_defconfig
arm-multi_v7_defconfig
arm-s5p64x0_defconfig
arm-rpc_defconfig
arm-mxs_defconfig
arm-pxa3xx_defconfig
arm-omap1_defconfig
arm-kzm9d_defconfig
arm-rmk-vexpress-ct9x4.config
arm-ep93xx_defconfig
arm-keystone_defconfig
arm-at91sam9rl_defconfig
arm-lubbock_defconfig
arm-s3c6400_defconfig
arm-imx_v6_v7_defconfig
arm-at91sam9263_defconfig
arm-mackerel_defconfig
arm-clps711x_defconfig
arm-collie_defconfig
arm-tegra_defconfig
arm-lart_defconfig
arm-marzen_defconfig
arm-kzm9g_defconfig
arm-tct_hammer_defconfig
arm-mv78xx0_defconfig
arm-realview_defconfig
arm-msm_defconfig
arm-u8500_defconfig
arm-cm_x300_defconfig
arm-h5000_defconfig
arm-kirkwood_defconfig
arm-mvebu_defconfig
arm-lpd270_defconfig
arm-rmk-omap4430-ldp.config
arm-sama5_defconfig
arm-neponset_defconfig
arm-spear13xx_defconfig
Hi Ben, Dave, Russell,
This is addtion to previously posted patch 'ARM: signal: sigreturn_codes
should be endian neutral'
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/195176.ht…
Ben, who graciously agreed to include my above V3 version of patch into his
BE series, reported that above patch breaks build of some old architectures.
I believe I am able to reproduce the issue using rpc_defconfig. Build
fails with messages like these (full gcc invocation could be found
below in Apendix 1):
arch/arm/kernel/sigreturn_codes.S: Assembler messages:
arch/arm/kernel/sigreturn_codes.S:46: Error: selected processor does not support THUMB opcodes
arch/arm/kernel/sigreturn_codes.S:47: Error: selected processor does not support Thumb mode `movs r7,#((0x900000+119)-0x900000)'
<snip>
When I proposed first version of the patch using asm/opcodes.h
macros
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/191543.ht…
we discussed that it is better to use separate assembler file with
right asm mnemonics and let toolchain to do right thing - byte
swapping instructions depending on endianity. It was highlighted
the assumption is that we have sufficiently thumb-capable tools.
In sigreturn_codes.S I explicitly used asm '.thumb' directive.
However I failed to realize that even toolchain is thumb-capable it
depends on -march=XXX gcc command line option whether gas takes
.thumb opcodes or not. For architectures below v6, non t variants
(like -march=armv3 used by rpc_defconfig) it fails to compile .S file
with .thumb directive in it. Please see below Apendix 2 for
small examples.
To fix the issue I considered several options. I created fix patch
with my preferred choice, which follows this cover letter, but I
am looking for other folks feedback and opinions and/or maybe
suggestions for other better ways to address it.
Switch arch with explicity .arch asm directive
----------------------------------------------
The idea of this approach is to switch arm architecture
explicitly with '.arch' asm directive inside of sigreturn_codes.S
if arch that set by Makefile is too low
Diff will look like this:
diff --git a/arch/arm/kernel/sigreturn_codes.S b/arch/arm/kernel/sigreturn_codes.S
index c888c43..3c5d0f2 100644
--- a/arch/arm/kernel/sigreturn_codes.S
+++ b/arch/arm/kernel/sigreturn_codes.S
@@ -30,6 +30,17 @@
* snippets.
*/
+#if __LINUX_ARM_ARCH__ <= 4
+ /*
+ * Note we manually set minimally required arch that supports
+ * required thumb opcodes for early arch versions. It is OK
+ * for this file to be used in combination with other
+ * lower arch variants, since these code snippets are only
+ * used as input data.
+ */
+ .arch armv4t
+#endif
+
.section .rodata
.global sigreturn_codes
.type sigreturn_codes, #object
Note with this approach if modern abi is used and explicit '.arch armv4t'
is used, gas generate "File Attributes" that contain 'Tag_CPU_name: "4T"'
and 'Tag_CPU_arch: v4T' tag records. I would like not to have mismatch
with other object file so '.arch armv4t' usage is conditional - only for
old arch values. Note for rpc_defconfig test case old '-mabi=apcs-gnu'
option is used, and in this case no "File Attributes" is generated. Although
mixing .o file with different Tag_CPU_arch tags may not be big issue as long
as valuea are compatible. I do see in CONFIG_ARCH_MULTIPLATFORM case .o files
with 'Tag_CPU_arch: v6K' are mixed with object files with 'Tag_CPU_arch: v7'.
This is my preferred approach. Complete proposed diff follows this
cover letter.
Conditional compilation based on __LINUX_ARM_ARCH__ value
---------------------------------------------------------
Use '#if __LINUX_ARM_ARCH__ >= 6' condition around .thumb
asm sequences, if not, fallback to constructing opcode manually
as original sigretun_codes did. Code will look something like
this:
+#if __LINUX_ARM_ARCH__ >= 5
.thumb
movs r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE)
swi #0
+#else
+ /*
+ * gas will not take .thumb opcodes for older arch,
+ * construct them manually
+ */
+ .long (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
+#endif
this approach is safe bet but manually generated opcodes seems to
be step backward
Use asm/opcodes.h macros
------------------------
With this approach we can abandon use of separate .S file and use
macros from <asm/opcodes.h>. Effectively it will back out my v3
version of patch and apply v1 version as I posted here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/191543.ht…
Any other suggestions?
----------------------
Testing
-------
I tested LE and BE pandaboard in Linaro tree and BE patch series. Original
LTP ./rt_sigactionNN tests have been run.
Tested build of rpc_defconfig which has CONFIG_CPU_32v3 and exhibited build
problem. Beyond that I struggle to find old machine that would fail to build.
Also I looked at
kirkwood_defconfig there was no issue with original patch, it is
CONFIG_CPU_32v5 which implies -march=armv5te or -march=armv4t, both OK with
.thumb
integrator_defconfig there was no issue with original patch, it is
CONFIG_CPU_32v4t which implies -march=armv4t, which is OK with .thumb
ixp4xx_defconfig there was no issue with original patch, it is CONFIG_CPU_32v5
and it is in CONFIG_CPU_BIG_ENDIAN=y (BE32). This is compiled with
-march=armv5te. sigreturn_codes look OK. Before original patch thumb instrs
were swapped.
Any other suggestions for old boards configs to test?
Apendix 1 full failed compile line
----------------------------------
arm-linux-gnueabihf-gcc -Wp,-MD,arch/arm/kernel/.sigreturn_codes.o.d \
-nostdinc -isystem /run/media/kamensky/wd/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/include \
-I/run/media/kamensky/wd/linaro/linux-linaro-core-tracking/091013/linux-linaro-tracking-be/arch/arm/include -Iarch/arm/include/generated \
-Iinclude -I/run/media/kamensky/wd/linaro/linux-linaro-core-tracking/091013/linux-linaro-tracking-be/arch/arm/include/uapi -Iarch/arm/include/generated/uapi \
-I/run/media/kamensky/wd/linaro/linux-linaro-core-tracking/091013/linux-linaro-tracking-be/include/uapi -Iinclude/generated/uapi -include \
/run/media/kamensky/wd/linaro/linux-linaro-core-tracking/091013/linux-linaro-tracking-be/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian \
-Iarch/arm/mach-rpc/include -D__ASSEMBLY__ -mabi=apcs-gnu -mno-thumb-interwork -marm -D__LINUX_ARM_ARCH__=3 -march=armv3 -mtune=strongarm110 \
-include asm/unified.h -msoft-float -gdwarf-2 -c -o arch/arm/kernel/sigreturn_codes.o arch/arm/kernel/sigreturn_codes.S
arch/arm/kernel/sigreturn_codes.S: Assembler messages:
arch/arm/kernel/sigreturn_codes.S:46: Error: selected processor does not support THUMB opcodes
arch/arm/kernel/sigreturn_codes.S:47: Error: selected processor does not support Thumb mode `movs r7,#((0x900000+119)-0x900000)'
<snip>
Apendix 2 -march and .thumb simple test case
--------------------------------------------
[kamensky@kamensky-w530 linux-linaro-tracking-be]$ cat t.S
sigreturn_codes:
.thumb
movs r7, #157
[kamensky@kamensky-w530 linux-linaro-tracking-be]$ arm-linux-gnueabihf-gcc -nostdinc -mlittle-endian -mno-thumb-interwork -mabi=apcs-gnu -marm -march=armv3 -msoft-float -c -o t.o t.S
t.S: Assembler messages:
t.S:2: Error: selected processor does not support THUMB opcodes
t.S:3: Error: selected processor does not support Thumb mode `movs r7,#157'
[kamensky@kamensky-w530 linux-linaro-tracking-be]$ arm-linux-gnueabihf-gcc -nostdinc -mlittle-endian -mno-thumb-interwork -mabi=apcs-gnu -marm -march=armv5 -msoft-float -c -o t.o t.S
t.S: Assembler messages:
t.S:2: Error: selected processor does not support THUMB opcodes
t.S:3: Error: selected processor does not support Thumb mode `movs r7,#157'
[kamensky@kamensky-w530 linux-linaro-tracking-be]$ arm-linux-gnueabihf-gcc -nostdinc -mlittle-endian -mno-thumb-interwork -mabi=apcs-gnu -marm -march=armv6 -msoft-float -c -o t.o t.S
[kamensky@kamensky-w530 linux-linaro-tracking-be]$ arm-linux-gnueabihf-gcc -nostdinc -mlittle-endian -mno-thumb-interwork -mabi=apcs-gnu -march=armv7 -msoft-float -c -o t.o t.S
Thanks,
Victor
Victor Kamensky (1):
ARM: signal: sigreturn_codes fix build breakage for old arch
arch/arm/kernel/sigreturn_codes.S | 11 +++++++++++
1 file changed, 11 insertions(+)
--
1.8.1.4
Automated DT boot report for various ARM defconfigs.
Boot test simply checks if kernel can boot to initramfs with busybox
and run some basic commands (e.g. 'cat /proc/cpuinfo').
Tree/Branch: linus/HEAD
Git describe: v3.11-9420-gd5d04bb
Commit: d5d04bb48f Bye, bye, WfW flag
Failed boot tests (console logs at the end)
===========================================
exynos5250-arndale: FAIL: arm-exynos_defconfig
Full Report
===========
arm-imx_v6_v7_defconfig
-----------------------
imx6dl-wandboard,wand-dual PASS: 0 min 16.4 sec
imx6dl-wandboard,wand-solo PASS: 0 min 16.2 sec
imx6q-wandboard PASS: 0 min 15.0 sec
arm-multi_v7_defconfig
----------------------
omap4-panda-es PASS: 1 min 7.7 sec
omap3-beagle-xm PASS: 0 min 51.9 sec
am335x-bone PASS: 0 min 33.3 sec
sun4i-a10-cubieboard PASS: 0 min 11.5 sec
imx6dl-wandboard,wand-solo PASS: 0 min 16.3 sec
omap3-tobi,3530overo PASS: 0 min 40.7 sec
omap4-panda PASS: 0 min 59.4 sec
imx6q-wandboard PASS: 0 min 15.7 sec
omap3-tobi,3730storm PASS: 0 min 40.1 sec
imx6dl-wandboard,wand-dual PASS: 0 min 16.5 sec
omap3-beagle PASS: 0 min 56.3 sec
arm-exynos_defconfig
--------------------
exynos5250-arndale FAIL: 0 min 0.0 sec
arm-omap2plus_defconfig
-----------------------
omap3-beagle-xm PASS: 0 min 52.3 sec
am335x-bone PASS: 0 min 26.3 sec
omap3-tobi,3530overo PASS: 0 min 42.4 sec
omap4-panda PASS: 1 min 3.7 sec
omap4-panda-es PASS: 1 min 10.5 sec
omap3-tobi,3730storm PASS: 0 min 41.3 sec
omap3-beagle PASS: 0 min 52.0 sec
Console logs for failures
=========================
arm-exynos_defconfig
--------------------
exynos5250-arndale: FAIL: last 24 lines of boot log:
----------------------------------------------------
ARNDALE5250 # setenv bootargs console=tty0 console=ttySAC2,115200n8 rw root=/dev/mmcblk1p3 rootwait rootfstype=ext4
setenv bootargs console=tty0 console=ttySAC2,115200n8 rw root=/dev/mmcblk1p3 rootwait rootfstype=ext4
ARNDALE5250 # setenv netargs 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::::192.168.1.254:none'
setenv netargs 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::::192.168.1.254:none'
ARNDALE5250 # if test -n ${initenv}; then run initenv; fi
if test -n ${initenv}; then run initenv; fi
ARNDALE5250 # if test -n ${preboot}; then run preboot; fi
if test -n ${preboot}; then run preboot; fi
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
scanning usb for ethernet devices... 1 Ethernet Device(s) found
ARNDALE5250 # setenv autoload no; setenv autoboot no
setenv autoload no; setenv autoboot no
ARNDALE5250 # dhcp
dhcp
Waiting for Ethernet connection... done.
BOOTP broadcast 1
BOOTP broadcast 2
~$off
# PYBOOT: Exception: u-boot: ERROR: timed-out getting DHCP address.
# PYBOOT: Time: 0.00 seconds.
# PYBOOT: Result: FAIL