Re: [PATCH v5 RESEND 1/3] ARM: EXYNOS: Move code from hotplug.c to platsmp.c
W dniu 26.09.2014 o 23:13, Arnd Bergmann pisze: On Friday 05 September 2014, Krzysztof Kozlowski wrote: The commit only moves code around with one additional observable change: the hotplug.c was compiled with custom CFLAGS (-march=armv7-a). These CFLAGS are not necessary any more. This turns out to be wrong, and your change broke 'allmodconfig' builds in linux-next. Please apply this patch on top. My patch definitely needed more testing. I posted a fix here: https://lkml.org/lkml/2014/9/24/163 However it seems that it wasn't picked up by anyone yet. Russell, could you pick up the patch (with acks from Nicolas and Kukjin)? Best regards, Krzysztof Arnd 8-- From 4ba6bf8806caec386e35930314dbad071284c837 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann a...@arndb.de Date: Fri, 26 Sep 2014 23:09:38 +0200 Subject: [PATCH] ARM: EXYNOS: fix build error in platsmp.c /tmp/ccYeWL3V.s: Assembler messages: /tmp/ccYeWL3V.s:659: Error: selected processor does not support ARM mode `isb ' /tmp/ccYeWL3V.s:664: Error: selected processor does not support ARM mode `isb ' /tmp/ccYeWL3V.s:665: Error: selected processor does not support ARM mode `dsb ' make[3]: *** [arch/arm/mach-exynos/platsmp.o] Error 1 Signed-off-by: Arnd Bergmann a...@arndb.de Fixes: 17342534e1d932 (ARM: EXYNOS: Move code from hotplug.c to platsmp.c) diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 4e49d4efb264..64324bf5edb4 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_PM_SLEEP)+= suspend.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o +CFLAGS_platsmp.o := -march=armv7-a plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 RESEND 1/3] ARM: EXYNOS: Move code from hotplug.c to platsmp.c
On 09/27/14 17:39, Krzysztof Kozlowski wrote: W dniu 26.09.2014 o 23:13, Arnd Bergmann pisze: On Friday 05 September 2014, Krzysztof Kozlowski wrote: The commit only moves code around with one additional observable change: the hotplug.c was compiled with custom CFLAGS (-march=armv7-a). These CFLAGS are not necessary any more. This turns out to be wrong, and your change broke 'allmodconfig' builds in linux-next. Please apply this patch on top. Arnd, Krzysztof commented its fix has been submitted and landed in my -test tree not -next because it should be handled in rmk's tree I think. I sent the patch to RMK patch tracking system just now and it should be fine in there. BTW, I just applied the fix in my -next until its ladning in RMK tree but as you know it will be not be sent to arm-soc via samsung tree... One more, Arnd please pull my pull-request 2nd round and 3rd round for samsung stuff for 3.18. My patch definitely needed more testing. I posted a fix here: https://lkml.org/lkml/2014/9/24/163 However it seems that it wasn't picked up by anyone yet. Russell, could you pick up the patch (with acks from Nicolas and Kukjin)? I believe Russell will take the patch in his tree. Thanks, Kukjin 8-- From 4ba6bf8806caec386e35930314dbad071284c837 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann a...@arndb.de Date: Fri, 26 Sep 2014 23:09:38 +0200 Subject: [PATCH] ARM: EXYNOS: fix build error in platsmp.c /tmp/ccYeWL3V.s: Assembler messages: /tmp/ccYeWL3V.s:659: Error: selected processor does not support ARM mode `isb ' /tmp/ccYeWL3V.s:664: Error: selected processor does not support ARM mode `isb ' /tmp/ccYeWL3V.s:665: Error: selected processor does not support ARM mode `dsb ' make[3]: *** [arch/arm/mach-exynos/platsmp.o] Error 1 Signed-off-by: Arnd Bergmann a...@arndb.de Fixes: 17342534e1d932 (ARM: EXYNOS: Move code from hotplug.c to platsmp.c) diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 4e49d4efb264..64324bf5edb4 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_PM_SLEEP) += suspend.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o +CFLAGS_platsmp.o := -march=armv7-a plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 RESEND 1/3] ARM: EXYNOS: Move code from hotplug.c to platsmp.c
On Friday 05 September 2014, Krzysztof Kozlowski wrote: The commit only moves code around with one additional observable change: the hotplug.c was compiled with custom CFLAGS (-march=armv7-a). These CFLAGS are not necessary any more. This turns out to be wrong, and your change broke 'allmodconfig' builds in linux-next. Please apply this patch on top. Arnd 8-- From 4ba6bf8806caec386e35930314dbad071284c837 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann a...@arndb.de Date: Fri, 26 Sep 2014 23:09:38 +0200 Subject: [PATCH] ARM: EXYNOS: fix build error in platsmp.c /tmp/ccYeWL3V.s: Assembler messages: /tmp/ccYeWL3V.s:659: Error: selected processor does not support ARM mode `isb ' /tmp/ccYeWL3V.s:664: Error: selected processor does not support ARM mode `isb ' /tmp/ccYeWL3V.s:665: Error: selected processor does not support ARM mode `dsb ' make[3]: *** [arch/arm/mach-exynos/platsmp.o] Error 1 Signed-off-by: Arnd Bergmann a...@arndb.de Fixes: 17342534e1d932 (ARM: EXYNOS: Move code from hotplug.c to platsmp.c) diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 4e49d4efb264..64324bf5edb4 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_PM_SLEEP)+= suspend.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o +CFLAGS_platsmp.o := -march=armv7-a plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_exynos-smc.o:=-Wa,-march=armv7-a$(plus_sec) -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v5 RESEND 1/3] ARM: EXYNOS: Move code from hotplug.c to platsmp.c
Krzysztof Kozlowski wrote: Cleanup a little the SMP/hotplug code for Exynos by: 1. Moving completely all functions from hotplug.c into the platsmp.c; 2. Deleting the hotplug.c file. After recent cleanups (e.g. 75ad2ab28f0f ARM: EXYNOS: use v7_exit_coherency_flush macro for cache disabling) there was only CPU power down related code in hotplug.c file. Rationale behind the code movement and benefits: 1. The file platsmp.c is the only user of code located in hotplug.c. Keeping code in hotplug.c required declaring exynos_cpu_die() in common.h. Such dependencies and mentioned exynos_cpu_die() declaration can be removed. 2. In next patches exynos_set_delayed_reset_assertion() will be introduced. This function will be called by: - cpu_leave_power (hotplug.c), - platform_do_lowpower (hotplug.c), - exynos_boot_secondary (platsmp.c). Merging hotplug.c into platsmp.c leads to simpler and cleaner code with less dependencies between files. The commit only moves code around with one additional observable change: the hotplug.c was compiled with custom CFLAGS (-march=armv7-a). These CFLAGS are not necessary any more. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Tomasz Figa t.f...@samsung.com --- Changes since v4: 1. Rebase on linux-next-20140804. 2. Add Reviewed-by Tomasz Figa. --- arch/arm/mach-exynos/Makefile | 3 -- arch/arm/mach-exynos/common.h | 2 - arch/arm/mach-exynos/hotplug.c | 91 -- arch/arm/mach-exynos/platsmp.c | 74 ++ 4 files changed, 74 insertions(+), 96 deletions(-) delete mode 100644 arch/arm/mach-exynos/hotplug.c [...] OK, I will take this series but I'm not sure what conflicts will be happened with other pm related patches. If anything, I'll let you know ;) Thanks, Kukjin -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 RESEND 1/3] ARM: EXYNOS: Move code from hotplug.c to platsmp.c
Cleanup a little the SMP/hotplug code for Exynos by: 1. Moving completely all functions from hotplug.c into the platsmp.c; 2. Deleting the hotplug.c file. After recent cleanups (e.g. 75ad2ab28f0f ARM: EXYNOS: use v7_exit_coherency_flush macro for cache disabling) there was only CPU power down related code in hotplug.c file. Rationale behind the code movement and benefits: 1. The file platsmp.c is the only user of code located in hotplug.c. Keeping code in hotplug.c required declaring exynos_cpu_die() in common.h. Such dependencies and mentioned exynos_cpu_die() declaration can be removed. 2. In next patches exynos_set_delayed_reset_assertion() will be introduced. This function will be called by: - cpu_leave_power (hotplug.c), - platform_do_lowpower (hotplug.c), - exynos_boot_secondary (platsmp.c). Merging hotplug.c into platsmp.c leads to simpler and cleaner code with less dependencies between files. The commit only moves code around with one additional observable change: the hotplug.c was compiled with custom CFLAGS (-march=armv7-a). These CFLAGS are not necessary any more. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Tomasz Figa t.f...@samsung.com --- Changes since v4: 1. Rebase on linux-next-20140804. 2. Add Reviewed-by Tomasz Figa. --- arch/arm/mach-exynos/Makefile | 3 -- arch/arm/mach-exynos/common.h | 2 - arch/arm/mach-exynos/hotplug.c | 91 -- arch/arm/mach-exynos/platsmp.c | 74 ++ 4 files changed, 74 insertions(+), 96 deletions(-) delete mode 100644 arch/arm/mach-exynos/hotplug.c diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 788f26d21141..0095de99d703 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -21,9 +21,6 @@ obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o -CFLAGS_hotplug.o += -march=armv7-a - plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_exynos-smc.o:=-Wa,-march=armv7-a$(plus_sec) diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 47b904b3b973..3d3e6af9d015 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -130,8 +130,6 @@ extern void exynos_cpu_resume(void); extern struct smp_operations exynos_smp_ops; -extern void exynos_cpu_die(unsigned int cpu); - /* PMU(Power Management Unit) support */ #define PMU_TABLE_END (-1U) diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c deleted file mode 100644 index 4d86961a7957.. --- a/arch/arm/mach-exynos/hotplug.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Cloned from linux/arch/arm/mach-realview/hotplug.c - * - * Copyright (C) 2002 ARM Ltd. - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#include linux/kernel.h -#include linux/errno.h -#include linux/smp.h -#include linux/io.h - -#include asm/cacheflush.h -#include asm/cp15.h -#include asm/smp_plat.h - -#include common.h -#include regs-pmu.h - -static inline void cpu_leave_lowpower(void) -{ - unsigned int v; - - asm volatile( - mrcp15, 0, %0, c1, c0, 0\n - orr %0, %0, %1\n - mcr p15, 0, %0, c1, c0, 0\n - mrc p15, 0, %0, c1, c0, 1\n - orr %0, %0, %2\n - mcr p15, 0, %0, c1, c0, 1\n - : =r (v) - : Ir (CR_C), Ir (0x40) - : cc); -} - -static inline void platform_do_lowpower(unsigned int cpu, int *spurious) -{ - u32 mpidr = cpu_logical_map(cpu); - u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); - - for (;;) { - - /* Turn the CPU off on next WFI instruction. */ - exynos_cpu_power_down(core_id); - - wfi(); - - if (pen_release == core_id) { - /* -* OK, proper wakeup, we're done -*/ - break; - } - - /* -* Getting here, means that we have come out of WFI without -* having been woken up - this shouldn't happen -* -* Just note it happening - when we're woken, we can report -* its occurrence. -*/ - (*spurious)++; - } -} - -/* - * platform-specific code to shutdown a CPU - * - * Called with IRQs disabled - */ -void __ref exynos_cpu_die(unsigned int cpu) -{ - int spurious = 0; - - v7_exit_coherency_flush(louis); - - platform_do_lowpower(cpu, spurious); - - /* -* bring this CPU back into the world of cache -* coherency,