Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
fbfa26ae
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fbfa26ae
编写于
10月 13, 2014
作者:
V
Vineet Gupta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARC: entry.S: common'ize scrtach reg freeup in intr + exceptions
Signed-off-by:
N
Vineet Gupta
<
vgupta@synopsys.com
>
上级
11e14896
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
27 deletion
+18
-27
arch/arc/include/asm/entry.h
arch/arc/include/asm/entry.h
+16
-19
arch/arc/kernel/entry.S
arch/arc/kernel/entry.S
+2
-8
未找到文件。
arch/arc/include/asm/entry.h
浏览文件 @
fbfa26ae
...
...
@@ -360,26 +360,26 @@
.
endm
/*--------------------------------------------------------------
* For early Exception Prologue, a core reg is temporarily needed to
* For early Exception
/ISR
Prologue, a core reg is temporarily needed to
* code the rest of prolog (stack switching). This is done by stashing
* it to memory (non-SMP case) or SCRATCH0 Aux Reg (SMP).
*
* Before saving the full regfile - this reg is restored back, only
* to be saved again on kernel mode stack, as part of pt_regs.
*-------------------------------------------------------------*/
.
macro
EXCPN_PROLOG_FREEUP_REG
reg
.
macro
PROLOG_FREEUP_REG
reg
,
mem
#ifdef CONFIG_SMP
sr
\
reg
,
[
ARC_REG_SCRATCH_DATA0
]
#else
st
\
reg
,
[
@
ex_saved_reg1
]
st
\
reg
,
[
\
mem
]
#endif
.
endm
.
macro
EXCPN_PROLOG_RESTORE_REG
reg
.
macro
PROLOG_RESTORE_REG
reg
,
mem
#ifdef CONFIG_SMP
lr
\
reg
,
[
ARC_REG_SCRATCH_DATA0
]
#else
ld
\
reg
,
[
@
ex_saved_reg1
]
ld
\
reg
,
[
\
mem
]
#endif
.
endm
...
...
@@ -393,7 +393,7 @@
.
macro
EXCEPTION_PROLOGUE
/* Need at least 1 reg to code the early exception prologue */
EXCPN_PROLOG_FREEUP_REG
r9
PROLOG_FREEUP_REG
r9
,
@
ex_saved_reg1
/* U/K mode at time of exception (stack not switched if already K) */
lr
r9
,
[
erstatus
]
...
...
@@ -421,7 +421,7 @@
st
r0
,
[
sp
,
4
]
/* orig_r0, needed only for sys calls */
/* Restore r9 used to code the early prologue */
EXCPN_PROLOG_RESTORE_REG
r9
PROLOG_RESTORE_REG
r9
,
@
ex_saved_reg1
SAVE_R0_TO_R12
PUSH
gp
...
...
@@ -471,12 +471,8 @@
*-------------------------------------------------------------*/
.
macro
SAVE_ALL_INT1
/* restore original r9 to be saved as part of reg-file */
#ifdef CONFIG_SMP
lr
r9
,
[
ARC_REG_SCRATCH_DATA0
]
#else
ld
r9
,
[
@
int1_saved_reg
]
#endif
/* restore original r9 */
PROLOG_RESTORE_REG
r9
,
@
int1_saved_reg
/* now we are ready to save the remaining context :) */
st
event_IRQ1
,
[
sp
,
8
]
/* Dummy ECR */
...
...
@@ -496,12 +492,13 @@
.
macro
SAVE_ALL_INT2
/* TODO-vineetg: SMP we can't use global nor can we use
* SCRATCH0 as we do for int1 because while int1 is using
* it, int2 can come
*/
/* retsore original r9 , saved in sys_saved_r9 */
ld
r9
,
[
@
int2_saved_reg
]
/*
* In SMP we can't use mem nor can we use SCRARCH_DATA0
* as we do for int1 because int2 can clobber it
* Hence 2 levels of intr are NOT allowed in SMP (by Kconfig)
*/
/* restore original r9 */
PROLOG_RESTORE_REG
r9
,
@
int2_saved_reg
/* now we are ready to save the remaining context :) */
st
event_IRQ2
,
[
sp
,
8
]
/* Dummy ECR */
...
...
arch/arc/kernel/entry.S
浏览文件 @
fbfa26ae
...
...
@@ -186,9 +186,8 @@ reserved: ; processor restart
; ---------------------------------------------
ENTRY
(
handle_interrupt_level2
)
; TODO-vineetg for SMP this wont work
; free up r9 as scratchpad
st
r9
,
[
@
int2_saved_reg
]
PROLOG_FREEUP_REG
r9
,
@
int2_saved_reg
;Which mode (user/kernel) was the system in when intr occured
lr
r9
,
[
status32_l2
]
...
...
@@ -234,12 +233,7 @@ END(handle_interrupt_level2)
; ---------------------------------------------
ENTRY
(
handle_interrupt_level1
)
/
*
free
up
r9
as
scratchpad
*/
#ifdef CONFIG_SMP
sr
r9
,
[
ARC_REG_SCRATCH_DATA0
]
#else
st
r9
,
[
@
int1_saved_reg
]
#endif
PROLOG_FREEUP_REG
r9
,
@
int1_saved_reg
;Which mode (user/kernel) was the system in when intr occured
lr
r9
,
[
status32_l1
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录