With a recent change "d4019f0 cpufreq: move freq change notifications to cpufreq
core" few variables (r & ret) are removed by mistake and hence these warnings:
drivers/cpufreq/omap-cpufreq.c: In function omap_target:
drivers/cpufreq/omap-cpufreq.c:64:2: error: ret undeclared (first use in this function)
drivers/cpufreq/omap-cpufreq.c:64:2: note: each undeclared identifier is reported only once for each function it appears in
drivers/cpufreq/omap-cpufreq.c:94:3: error: r undeclared (first use in this function)
drivers/cpufreq/omap-cpufreq.c:116:1: warning: control reaches end of non-void function [-Wreturn-type]
Lets fix them by declaring those variables again.
Reported-by: Sebastian Capella <sebastian.capella(a)linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
drivers/cpufreq/omap-cpufreq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index be6d143..a0acd0b 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -53,6 +53,7 @@ static unsigned int omap_getspeed(unsigned int cpu)
static int omap_target(struct cpufreq_policy *policy, unsigned int index)
{
+ int r, ret;
struct dev_pm_opp *opp;
unsigned long freq, volt = 0, volt_old = 0, tol = 0;
unsigned int old_freq, new_freq;
--
1.7.12.rc2.18.g61b472e
Copying a function with memcpy() and then trying to execute the
result isn't trivially portable to Thumb.
This patch modifies the kexec soft restart code to copy its
assembler trampoline relocate_new_kernel() using fncpy() instead,
so that relocate_new_kernel can be in the same ISA as the rest of
the kernel without problems.
Signed-off-by: Dave Martin <Dave.Martin(a)arm.com>
---
Changes since v1:
* Move ENDPROC() after relocate_new_kernel's literals, to be
consistent the location of relocate_new_kernel_end and with the way
GCC sets ELF symbol sizes for functions. This is just a tidyup,
with no functional impact.
arch/arm/kernel/machine_kexec.c | 17 ++++++++++-------
arch/arm/kernel/relocate_kernel.S | 8 ++++++--
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index 57221e3..f0d180d 100644
--- a/arch/arm/kernel/machine_kexec.c
+++ b/arch/arm/kernel/machine_kexec.c
@@ -14,11 +14,12 @@
#include <asm/pgalloc.h>
#include <asm/mmu_context.h>
#include <asm/cacheflush.h>
+#include <asm/fncpy.h>
#include <asm/mach-types.h>
#include <asm/smp_plat.h>
#include <asm/system_misc.h>
-extern const unsigned char relocate_new_kernel[];
+extern void relocate_new_kernel(void);
extern const unsigned int relocate_new_kernel_size;
extern unsigned long kexec_start_address;
@@ -142,6 +143,8 @@ void machine_kexec(struct kimage *image)
{
unsigned long page_list;
unsigned long reboot_code_buffer_phys;
+ unsigned long reboot_entry = (unsigned long)relocate_new_kernel;
+ unsigned long reboot_entry_phys;
void *reboot_code_buffer;
/*
@@ -168,16 +171,16 @@ void machine_kexec(struct kimage *image)
/* copy our kernel relocation code to the control code page */
- memcpy(reboot_code_buffer,
- relocate_new_kernel, relocate_new_kernel_size);
+ reboot_entry = fncpy(reboot_code_buffer,
+ reboot_entry,
+ relocate_new_kernel_size);
+ reboot_entry_phys = (unsigned long)reboot_entry +
+ (reboot_code_buffer_phys - (unsigned long)reboot_code_buffer);
-
- flush_icache_range((unsigned long) reboot_code_buffer,
- (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);
printk(KERN_INFO "Bye!\n");
if (kexec_reinit)
kexec_reinit();
- soft_restart(reboot_code_buffer_phys);
+ soft_restart(reboot_entry_phys);
}
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S
index d0cdedf..9585896 100644
--- a/arch/arm/kernel/relocate_kernel.S
+++ b/arch/arm/kernel/relocate_kernel.S
@@ -2,10 +2,12 @@
* relocate_kernel.S - put the kernel image in place to boot
*/
+#include <linux/linkage.h>
#include <asm/kexec.h>
- .globl relocate_new_kernel
-relocate_new_kernel:
+ .align 3 /* not needed for this code, but keeps fncpy() happy */
+
+ENTRY(relocate_new_kernel)
ldr r0,kexec_indirection_page
ldr r1,kexec_start_address
@@ -79,6 +81,8 @@ kexec_mach_type:
kexec_boot_atags:
.long 0x0
+ENDPROC(relocate_new_kernel)
+
relocate_new_kernel_end:
.globl relocate_new_kernel_size
--
1.7.9.5
Automated DT boot report for various ARM defconfigs.
Tree/Branch: queue
Git describe: v3.11.8-13-g6fe7f75
Failed boot tests (console logs at the end)
===========================================
omap4-panda: FAIL: omap2plus_defconfig
omap4-panda: FAIL: multi_v7_defconfig
Full Report
===========
omap2plus_defconfig
-------------------
omap3-beagle-xm PASS: 0 min 52.6 sec
am335x-bone PASS: 0 min 26.5 sec
omap4-panda FAIL: 1 min 43.5 sec
omap4-panda-es PASS: 1 min 3.0 sec
omap3-tobi,3730storm PASS: 0 min 24.4 sec
omap3-tobi,3530overo PASS: 0 min 21.8 sec
tegra_defconfig
---------------
tegra30-beaver PASS: 0 min 15.5 sec
imx_v6_v7_defconfig
-------------------
imx6dl-wandboard,wand-dual PASS: 0 min 15.9 sec
imx6dl-wandboard,wand-solo PASS: 0 min 15.6 sec
mvebu_defconfig
---------------
armada-xp-openblocks-ax3-4 PASS: 0 min 22.0 sec
armada-370-mirabox PASS: 0 min 19.9 sec
exynos_defconfig
----------------
exynos5250-arndale PASS: 0 min 29.8 sec
multi_v7_defconfig
------------------
tegra30-beaver PASS: 0 min 16.7 sec
omap3-beagle-xm PASS: 0 min 52.7 sec
armada-370-mirabox PASS: 0 min 20.5 sec
am335x-bone PASS: 0 min 33.6 sec
armada-xp-openblocks-ax3-4 PASS: 0 min 22.7 sec
sun4i-a10-cubieboard PASS: 0 min 12.8 sec
imx6dl-wandboard,wand-solo PASS: 0 min 16.1 sec
omap4-panda FAIL: 1 min 43.5 sec
omap4-panda-es PASS: 1 min 6.2 sec
omap3-tobi,3730storm PASS: 0 min 19.8 sec
imx6dl-wandboard,wand-dual PASS: 0 min 16.3 sec
omap3-tobi,3530overo PASS: 0 min 20.0 sec
sama5_defconfig
---------------
sama5d35ek PASS: 0 min 17.2 sec
Console logs for failures
=========================
omap2plus_defconfig
-------------------
omap4-panda: FAIL: last 24 lines of boot log:
---------------------------------------------
Panda #if test -n ${initenv}; then run initenv; fi
if test -n ${initenv}; then run initenv; fi
Panda # 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... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
scanning usb for ethernet devices... 1 Ethernet Device(s) found
Panda # setenv autoload no; setenv autoboot no
setenv autoload no; setenv autoboot no
Panda # dhcp
dhcp
Waiting for Ethernet connection... unable to connect.
Panda # dhcp
dhcp
Waiting for Ethernet connection... unable to connect.
Panda # dhcp
dhcp
Waiting for Ethernet connection... unable to connect.
Panda # ~$off
# PYBOOT: Exception: u-boot: ERROR: timeout getting DHCP address.
# PYBOOT: Time: 103.45 seconds.
# PYBOOT: Result: FAIL
multi_v7_defconfig
------------------
omap4-panda: FAIL: last 24 lines of boot log:
---------------------------------------------
Panda # if test -n ${initenv}; then run initenv; fi
if test -n ${initenv}; then run initenv; fi
Panda # 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... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
scanning usb for ethernet devices... 1 Ethernet Device(s) found
Panda # setenv autoload no; setenv autoboot no
setenv autoload no; setenv autoboot no
Panda # dhcp
dhcp
Waiting for Ethernet connection... unable to connect.
Panda # dhcp
dhcp
Waiting for Ethernet connection... unable to connect.
Panda # dhcp
dhcp
Waiting for Ethernet connection... unable to connect.
Panda # ~$off
# PYBOOT: Exception: u-boot: ERROR: timeout getting DHCP address.
# PYBOOT: Time: 103.52 seconds.
# PYBOOT: Result: FAIL