aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/netlogic/common/smp.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-03MIPS: Netlogic: Call xlp_mmu_init on all threadsJayachandran C1-3/+1
The config7/config4 register has to be written on all the threads. This does not cause any problems in XLP, but is needed for XLPII Signed-off-by: Jayachandran C <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/5700/ Signed-off-by: Ralf Baechle <[email protected]>
2013-07-14MIPS: Delete __cpuinit/__CPUINIT usage from MIPS codePaul Gortmaker1-2/+2
commit 3747069b25e419f6b51395f48127e9812abc3596 upstream. The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. Note that some harmless section mismatch warnings may result, since notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c) and are flagged as __cpuinit -- so if we remove the __cpuinit from the arch specific callers, we will also get section mismatch warnings. As an intermediate step, we intend to turn the linux/init.h cpuinit related content into no-ops as early as possible, since that will get rid of these warnings. In any case, they are temporary and harmless. Here, we remove all the MIPS __cpuinit from C code and __CPUINIT from asm files. MIPS is interesting in this respect, because there are also uasm users hiding behind their own renamed versions of the __cpuinit macros. [1] https://lkml.org/lkml/2013/5/20/589 [[email protected]: Folded in Paul's followup fix.] Signed-off-by: Paul Gortmaker <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/5494/ Patchwork: https://patchwork.linux-mips.org/patch/5495/ Patchwork: https://patchwork.linux-mips.org/patch/5509/ Signed-off-by: Ralf Baechle <[email protected]>
2013-06-13MIPS: Netlogic: move cpu_ready array to boot areaJayachandran C1-3/+3
Move the nlm_cpu_ready[] array used by the cpu wakeup code to the boot area, along with rest of the boot parameter code. Signed-off-by: Jayachandran C <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/5425/ Signed-off-by: Ralf Baechle <[email protected]>
2013-06-13MIPS: Netlogic: Add nlm_get_boot_data() helperJayachandran C1-3/+3
This moves the calculation and casting needed to access the CPU initialization data to a function nlm_get_boot_data() Signed-off-by: Jayachandran C <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/5426/ Signed-off-by: Ralf Baechle <[email protected]>
2013-06-13MIPS: Netlogic: Initialization when !CONFIG_SMPJayachandran C1-6/+0
The core initialization and reset vector setup needs to be done even when booting uniprocessor. Move this code from smp.c to setup.c Signed-off-by: Jayachandran C <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/5428/ Signed-off-by: Ralf Baechle <[email protected]>
2013-05-08MIPS: Netlogic: print cpumask with cpumask_scnprintfJayachandran C1-9/+12
Use standard function to print cpumask. Also fixup the name of the variable used and make it static. Signed-off-by: Jayachandran C <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5024/ Acked-by: John Crispin <[email protected]>
2013-02-17MIPS: Netlogic: Optimize EIMR/EIRR accesses in 32-bitJayachandran C1-2/+6
Provide functions ack_c0_eirr(), set_c0_eimr(), clear_c0_eimr() and read_c0_eirr_and_eimr() that do the EIMR and EIRR operations and update the interrupt handling code to use these functions. Also, use the EIMR register functions to mask interrupts in the irq code. The 64-bit interrupt request and mask registers (EIRR and EIMR) are accessed when the interrupts are off, and the common operations are to set or clear a bit in these registers. Using the 64-bit c0 access functions for these operations is not optimal in 32-bit, because it will disable/restore interrupts and split/join the 64-bit value during each register access. Signed-off-by: Jayachandran C <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4790/ Signed-off-by: John Crispin <[email protected]>
2012-11-09MIPS: Netlogic: Support for XLR/XLS Fast Message NetworkGanesan Ramalingam1-3/+1
On XLR/XLS, the cpu cores communicate with fast on-chip devices (e.g. network accelerator, security engine etc.) using the Fast Messaging Network(FMN). The FMN queues and credits needs to be configured and intialized before it can be used. The co-processor 2 on XLR/XLS CPU cores has registers for FMN access, and the XLR/XLS has custom instructions for sending and loading messages. The FMN can deliver also per-cpu interrupts when messages are available at the CPU. This patch adds FMN initialization, adds interrupt setup and handling, and also provides support for sending and receiving FMN messages. Signed-off-by: Ganesan Ramalingam <[email protected]> Signed-off-by: Jayachandran C <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4468 Signed-off-by: John Crispin <[email protected]>
2012-11-09MIPS: Netlogic: PIC IRQ handling update for multi-chipJayachandran C1-2/+5
Create struct nlm_pic_irq for interrupts handled by the PIC. This simplifies IRQ handling for multi-SoC as well as the single SoC cases. Also split the setup of percpu and PIC interrupts so that we can configure the PIC interrupts for every node. Signed-off-by: Jayachandran C <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4467 Signed-off-by: John Crispin <[email protected]>
2012-11-09MIPS: Netlogic: Support for multi-chip configurationJayachandran C1-18/+29
Upto 4 Netlogic XLP SoCs can be connected over ICI links to form a coherent multi-node system. Each SoC has its own set of on-chip devices including PIC. To support this, add a per SoC stucture and use it for the PIC and SYS block addresses instead of using global variables. Signed-off-by: Jayachandran C <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4469 Signed-off-by: John Crispin <[email protected]>
2012-11-09MIPS: Netlogic: Move from u32 cpumask to cpumask_tJayachandran C1-19/+20
Initial code to support more than 32 cpus. The platform CPU mask is updated from 32-bit mask to cpumask_t. Convert places that use cpu_/cpus_ functions to use cpumask_* functions. Signed-off-by: Jayachandran C <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4464 Signed-off-by: John Crispin <[email protected]>
2012-11-09MIPS: Netlogic: Pass cpuid to early_init_secondaryJayachandran C1-1/+1
The cpuid was not passed into early_init_secondary even though the comment indicated that it will be. Fix this. Signed-off-by: Jayachandran C <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4458 Signed-off-by: John Crispin <[email protected]>
2012-03-29remove references to cpu_*_map in arch/Rusty Russell1-3/+3
This has been obsolescent for a while; time for the final push. In adjacent context, replaced old cpus_* with cpumask_*. Signed-off-by: Rusty Russell <[email protected]> Acked-by: David S. Miller <[email protected]> (arch/sparc) Acked-by: Chris Metcalf <[email protected]> (arch/tile) Cc: [email protected] Cc: Russell King <[email protected]> Cc: [email protected] Cc: Richard Kuo <[email protected]> Cc: [email protected] Cc: Ralf Baechle <[email protected]> Cc: [email protected] Cc: Kyle McMartin <[email protected]> Cc: Helge Deller <[email protected]> Cc: [email protected]
2011-12-07MIPS: Netlogic: Mark Netlogic chips as SMT capableHillf Danton1-4/+7
Netlogic XLR chip has multiple cores. Each core includes four integrated hardware threads, and they share L1 data and instruction caches. If the chip is marked to be SMT capable, scheduler then could do more, say, idle load balancing. Changes are now confined only to the code of XLR, and hardware is probed to get core ID for correct setup. [jayachandranc: simplified and adapted for new merged XLR/XLP code] Signed-off-by: Hillf Danton <[email protected]> Signed-off-by: Jayachandran C <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2972/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-07MIPS: Netlogic: Merge some of XLR/XLP wakup codeJayachandran C1-2/+73
Create a common NMI and reset handler in smpboot.S and use this for both XLR and XLP. In the earlier code, the woken up CPUs would busy wait until released, switch this to wakeup by NMI. The initial wakeup code or XLR and XLP are differ since they are started from different bootloaders (XLP from u-boot and XLR from netlogic bootloader). But in both platforms the woken up CPUs wait and are released by sending an NMI. Add support for starting XLR and XLP in 1/2/4 threads per core. Signed-off-by: Jayachandran C <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2970/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-07MIPS: Netlogic: Add XLP platform files for XLP SoCJayachandran C1-4/+12
- Update common files to support XLP. - Add arch/mips/include/asm/netlogic/xlp-hal for register definitions and access macros - Add arch/mips/netlogic/xlp/ for XLP specific files. Signed-off-by: Jayachandran C <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2967/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-07MIPS: Netlogic: Move code common with XLP to common/Jayachandran C1-0/+188
- Move code that can be shared with XLP (irq.c, smp.c, time.c and xlr_console.c) to arch/mips/netlogic/common - Add asm/netlogic/haldefs.h and asm/netlogic/common.h for common and io functions shared with XLP - remove type 'nlm_reg_t *' and use uint64_t for mmio offsets - Move XLR specific code in smp.c to xlr/wakeup.c - Move XLR specific PCI code from irq.c to mips/pci/pci-xlr.c - Provide API for pic functions called from common/irq.c Signed-off-by: Jayachandran C <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2964/ Signed-off-by: Ralf Baechle <[email protected]>