From a74e33535fa27c758d2a23ebf5f8964bf19940bc Mon Sep 17 00:00:00 2001 From: Jayachandran C Date: Wed, 22 Jun 2011 01:37:05 +0530 Subject: MIPS:Netlogic:Fix section mismatch warnings. Add __init and __cpuinit annotation to functions that need it. Signed-off-by: Jayachandran C To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2535/ Signed-off-by: Ralf Baechle --- arch/mips/netlogic/xlr/setup.c | 4 ++-- arch/mips/netlogic/xlr/smp.c | 2 +- arch/mips/netlogic/xlr/smpboot.S | 16 +++++++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) (limited to 'arch/mips/netlogic') diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c index 482802569e74..cee25ddd0887 100644 --- a/arch/mips/netlogic/xlr/setup.c +++ b/arch/mips/netlogic/xlr/setup.c @@ -53,7 +53,7 @@ unsigned long netlogic_io_base = (unsigned long)(DEFAULT_NETLOGIC_IO_BASE); unsigned long nlm_common_ebase = 0x0; struct psb_info nlm_prom_info; -static void nlm_early_serial_setup(void) +static void __init nlm_early_serial_setup(void) { struct uart_port s; nlm_reg_t *uart_base; @@ -101,7 +101,7 @@ void __init prom_free_prom_memory(void) /* Nothing yet */ } -static void build_arcs_cmdline(int *argv) +static void __init build_arcs_cmdline(int *argv) { int i, remain, len; char *arg; diff --git a/arch/mips/netlogic/xlr/smp.c b/arch/mips/netlogic/xlr/smp.c index d842bce5c940..e2372121307c 100644 --- a/arch/mips/netlogic/xlr/smp.c +++ b/arch/mips/netlogic/xlr/smp.c @@ -191,7 +191,7 @@ struct plat_smp_ops nlm_smp_ops = { unsigned long secondary_entry_point; -int nlm_wakeup_secondary_cpus(u32 wakeup_mask) +int __cpuinit nlm_wakeup_secondary_cpus(u32 wakeup_mask) { unsigned int tid, pid, ipi, i, boot_cpu; void *reset_vec; diff --git a/arch/mips/netlogic/xlr/smpboot.S b/arch/mips/netlogic/xlr/smpboot.S index b8e074402c99..8cb7889ce0cc 100644 --- a/arch/mips/netlogic/xlr/smpboot.S +++ b/arch/mips/netlogic/xlr/smpboot.S @@ -32,17 +32,19 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include #include #include #include - -/* Don't jump to linux function from Bootloader stack. Change it - * here. Kernel might allocate bootloader memory before all the CPUs are - * brought up (eg: Inode cache region) and we better don't overwrite this - * memory +/* + * Early code for secondary CPUs. This will get them out of the bootloader + * code and into linux. Needed because the bootloader area will be taken + * and initialized by linux. */ + __CPUINIT NESTED(prom_pre_boot_secondary_cpus, 16, sp) .set mips64 mfc0 t0, $15, 1 # read ebase @@ -73,7 +75,11 @@ NESTED(prom_pre_boot_secondary_cpus, 16, sp) jr t0 nop END(prom_pre_boot_secondary_cpus) + __FINIT +/* + * NMI code, used for CPU wakeup, copied to reset entry + */ NESTED(nlm_boot_smp_nmi, 0, sp) .set push .set noat -- cgit v1.2.3 From 39ad56805a3bcf259d7549e73a3c9d557c2efd7b Mon Sep 17 00:00:00 2001 From: Jayachandran C Date: Wed, 22 Jun 2011 01:36:33 +0530 Subject: MIPS: Netlogic: Specify architecture CFLAGS Use -march=xlr if available, otherwise fallback to mips64. This allows us to support compilation with MIPS toolchains which are not customized for XLR. [ralf@linux-mips.org: And more importantly it works around a gas bug in binutils 2.21 which otherwise may result in an assertion failure building arch/mips/kernel/genex.S. See http://sourceware.org/bugzilla/show_bug.cgi?id=12915 for details.] Signed-off-by: Jayachandran C To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2534/ Signed-off-by: Ralf Baechle --- arch/mips/netlogic/Platform | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/mips/netlogic') diff --git a/arch/mips/netlogic/Platform b/arch/mips/netlogic/Platform index f87c1640abb5..b648b487fd66 100644 --- a/arch/mips/netlogic/Platform +++ b/arch/mips/netlogic/Platform @@ -4,6 +4,11 @@ cflags-$(CONFIG_NLM_COMMON) += -I$(srctree)/arch/mips/include/asm/mach-netlogic cflags-$(CONFIG_NLM_COMMON) += -I$(srctree)/arch/mips/include/asm/netlogic +# +# use mips64 if xlr is not available +# +cflags-$(CONFIG_NLM_XLR) += $(call cc-option,-march=xlr,-march=mips64) + # # NETLOGIC XLR/XLS SoC, Simulator and boards # -- cgit v1.2.3 From b2788965baed868ce48ebd6d67f00acf617c9ee6 Mon Sep 17 00:00:00 2001 From: Hillf Danton Date: Sat, 24 Sep 2011 02:29:54 +0200 Subject: MIPS: XLR, XLS: Add comment for smp setup It seems that BSP could be setup twice, but the nlm_cpu_ready array is only set for ASPs in smpboot.S, not including BSP. Signed-off-by: Hillf Danton Cc: "Jayachandran C." Cc: LKML Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2695/ Signed-off-by: Ralf Baechle , --- arch/mips/netlogic/xlr/smp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/mips/netlogic') diff --git a/arch/mips/netlogic/xlr/smp.c b/arch/mips/netlogic/xlr/smp.c index e2372121307c..080284ded508 100644 --- a/arch/mips/netlogic/xlr/smp.c +++ b/arch/mips/netlogic/xlr/smp.c @@ -158,6 +158,10 @@ void __init nlm_smp_setup(void) num_cpus = 1; for (i = 0; i < NR_CPUS; i++) { + /* + * BSP is not set in nlm_cpu_ready array, it is only for + * ASPs (goto see smpboot.S) + */ if (nlm_cpu_ready[i]) { cpu_set(i, phys_cpu_present_map); __cpu_number_map[i] = num_cpus; -- cgit v1.2.3