Commit 46fa5eec authored by Graf Yang's avatar Graf Yang Committed by Bryan Wu

Blackfin arch: SMP supporting patchset: some other misc code

Blackfin dual core BF561 processor can support SMP like features.
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like

In this patch, we provide SMP extend to some other misc code
Singed-off-by: default avatarGraf Yang <graf.yang@analog.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 8f65873e
...@@ -200,6 +200,32 @@ config BF561 ...@@ -200,6 +200,32 @@ config BF561
endchoice endchoice
config SMP
depends on BF561
bool "Symmetric multi-processing support"
---help---
This enables support for systems with more than one CPU,
like the dual core BF561. If you have a system with only one
CPU, say N. If you have a system with more than one CPU, say Y.
If you don't know what to do here, say N.
config NR_CPUS
int
depends on SMP
default 2 if BF561
config IRQ_PER_CPU
bool
depends on SMP
default y
config TICK_SOURCE_SYSTMR0
bool
select BFIN_GPTIMERS
depends on SMP
default y
config BF_REV_MIN config BF_REV_MIN
int int
default 0 if (BF51x || BF52x || BF54x) default 0 if (BF51x || BF52x || BF54x)
...@@ -502,6 +528,7 @@ source kernel/Kconfig.hz ...@@ -502,6 +528,7 @@ source kernel/Kconfig.hz
config GENERIC_TIME config GENERIC_TIME
bool "Generic time" bool "Generic time"
depends on !SMP
default y default y
config GENERIC_CLOCKEVENTS config GENERIC_CLOCKEVENTS
...@@ -576,6 +603,7 @@ endmenu ...@@ -576,6 +603,7 @@ endmenu
menu "Blackfin Kernel Optimizations" menu "Blackfin Kernel Optimizations"
depends on !SMP
comment "Memory Optimizations" comment "Memory Optimizations"
...@@ -738,7 +766,6 @@ config BFIN_INS_LOWOVERHEAD ...@@ -738,7 +766,6 @@ config BFIN_INS_LOWOVERHEAD
endmenu endmenu
choice choice
prompt "Kernel executes from" prompt "Kernel executes from"
help help
...@@ -804,9 +831,11 @@ config BFIN_ICACHE_LOCK ...@@ -804,9 +831,11 @@ config BFIN_ICACHE_LOCK
choice choice
prompt "Policy" prompt "Policy"
depends on BFIN_DCACHE depends on BFIN_DCACHE
default BFIN_WB default BFIN_WB if !SMP
default BFIN_WT if SMP
config BFIN_WB config BFIN_WB
bool "Write back" bool "Write back"
depends on !SMP
help help
Write Back Policy: Write Back Policy:
Cached data will be written back to SDRAM only when needed. Cached data will be written back to SDRAM only when needed.
......
...@@ -109,7 +109,7 @@ SECTIONS ...@@ -109,7 +109,7 @@ SECTIONS
#endif #endif
DATA_DATA DATA_DATA
*(.data.*) *(.data)
CONSTRUCTORS CONSTRUCTORS
/* make sure the init_task is aligned to the /* make sure the init_task is aligned to the
...@@ -161,6 +161,7 @@ SECTIONS ...@@ -161,6 +161,7 @@ SECTIONS
*(.con_initcall.init) *(.con_initcall.init)
___con_initcall_end = .; ___con_initcall_end = .;
} }
PERCPU(4)
SECURITY_INIT SECURITY_INIT
.init.ramfs : .init.ramfs :
{ {
...@@ -236,7 +237,6 @@ SECTIONS ...@@ -236,7 +237,6 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
__ebss_l2 = .; __ebss_l2 = .;
} }
/* Force trailing alignment of our init section so that when we /* Force trailing alignment of our init section so that when we
* free our init memory, we don't leave behind a partial page. * free our init memory, we don't leave behind a partial page.
*/ */
......
...@@ -99,4 +99,19 @@ ...@@ -99,4 +99,19 @@
#define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_START 0xFFB00000
#define L1_SCRATCH_LENGTH 0x1000 #define L1_SCRATCH_LENGTH 0x1000
#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
#define get_l1_code_start_cpu(cpu) L1_CODE_START
#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
#define get_l1_scratch_start() L1_SCRATCH_START
#define get_l1_code_start() L1_CODE_START
#define get_l1_data_a_start() L1_DATA_A_START
#define get_l1_data_b_start() L1_DATA_B_START
#define GET_PDA_SAFE(preg) \
preg.l = _cpu_pda; \
preg.h = _cpu_pda;
#define GET_PDA(preg, dreg) GET_PDA_SAFE(preg)
#endif /* _MEM_MAP_518_H_ */ #endif /* _MEM_MAP_518_H_ */
...@@ -99,4 +99,19 @@ ...@@ -99,4 +99,19 @@
#define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_START 0xFFB00000
#define L1_SCRATCH_LENGTH 0x1000 #define L1_SCRATCH_LENGTH 0x1000
#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
#define get_l1_code_start_cpu(cpu) L1_CODE_START
#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
#define get_l1_scratch_start() L1_SCRATCH_START
#define get_l1_code_start() L1_CODE_START
#define get_l1_data_a_start() L1_DATA_A_START
#define get_l1_data_b_start() L1_DATA_B_START
#define GET_PDA_SAFE(preg) \
preg.l = _cpu_pda; \
preg.h = _cpu_pda;
#define GET_PDA(preg, dreg) GET_PDA_SAFE(preg)
#endif /* _MEM_MAP_527_H_ */ #endif /* _MEM_MAP_527_H_ */
...@@ -168,4 +168,19 @@ ...@@ -168,4 +168,19 @@
#define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_START 0xFFB00000
#define L1_SCRATCH_LENGTH 0x1000 #define L1_SCRATCH_LENGTH 0x1000
#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
#define get_l1_code_start_cpu(cpu) L1_CODE_START
#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
#define get_l1_scratch_start() L1_SCRATCH_START
#define get_l1_code_start() L1_CODE_START
#define get_l1_data_a_start() L1_DATA_A_START
#define get_l1_data_b_start() L1_DATA_B_START
#define GET_PDA_SAFE(preg) \
preg.l = _cpu_pda; \
preg.h = _cpu_pda;
#define GET_PDA(preg, dreg) GET_PDA_SAFE(preg)
#endif /* _MEM_MAP_533_H_ */ #endif /* _MEM_MAP_533_H_ */
...@@ -176,4 +176,19 @@ ...@@ -176,4 +176,19 @@
#define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_START 0xFFB00000
#define L1_SCRATCH_LENGTH 0x1000 #define L1_SCRATCH_LENGTH 0x1000
#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
#define get_l1_code_start_cpu(cpu) L1_CODE_START
#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
#define get_l1_scratch_start() L1_SCRATCH_START
#define get_l1_code_start() L1_CODE_START
#define get_l1_data_a_start() L1_DATA_A_START
#define get_l1_data_b_start() L1_DATA_B_START
#define GET_PDA_SAFE(preg) \
preg.l = _cpu_pda; \
preg.h = _cpu_pda;
#define GET_PDA(preg, dreg) GET_PDA_SAFE(preg)
#endif /* _MEM_MAP_537_H_ */ #endif /* _MEM_MAP_537_H_ */
...@@ -104,4 +104,19 @@ ...@@ -104,4 +104,19 @@
#define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_START 0xFFB00000
#define L1_SCRATCH_LENGTH 0x1000 #define L1_SCRATCH_LENGTH 0x1000
#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
#define get_l1_code_start_cpu(cpu) L1_CODE_START
#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
#define get_l1_scratch_start() L1_SCRATCH_START
#define get_l1_code_start() L1_CODE_START
#define get_l1_data_a_start() L1_DATA_A_START
#define get_l1_data_b_start() L1_DATA_B_START
#define GET_PDA_SAFE(preg) \
preg.l = _cpu_pda; \
preg.h = _cpu_pda;
#define GET_PDA(preg, dreg) GET_PDA_SAFE(preg)
#endif /* _MEM_MAP_538_H_ */ #endif /* _MEM_MAP_538_H_ */
...@@ -108,4 +108,19 @@ ...@@ -108,4 +108,19 @@
#define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_START 0xFFB00000
#define L1_SCRATCH_LENGTH 0x1000 #define L1_SCRATCH_LENGTH 0x1000
#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
#define get_l1_code_start_cpu(cpu) L1_CODE_START
#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
#define get_l1_scratch_start() L1_SCRATCH_START
#define get_l1_code_start() L1_CODE_START
#define get_l1_data_a_start() L1_DATA_A_START
#define get_l1_data_b_start() L1_DATA_B_START
#define GET_PDA_SAFE(preg) \
preg.l = _cpu_pda; \
preg.h = _cpu_pda;
#define GET_PDA(preg, dreg) GET_PDA_SAFE(preg)
#endif/* _MEM_MAP_548_H_ */ #endif/* _MEM_MAP_548_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment