Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
24cae793
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
24cae793
编写于
9月 28, 2014
作者:
G
Geert Uytterhoeven
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
m68k: Reformat arch/m68k/mm/hwtest.c
No functional changes Signed-off-by:
N
Geert Uytterhoeven
<
geert@linux-m68k.org
>
上级
e4dc601b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
38 deletion
+40
-38
arch/m68k/mm/hwtest.c
arch/m68k/mm/hwtest.c
+40
-38
未找到文件。
arch/m68k/mm/hwtest.c
浏览文件 @
24cae793
...
...
@@ -25,32 +25,32 @@
#include <linux/module.h>
int
hwreg_present
(
volatile
void
*
regp
)
int
hwreg_present
(
volatile
void
*
regp
)
{
int
ret
=
0
;
unsigned
long
flags
;
long
save_sp
,
save_vbr
;
long
tmp_vectors
[
3
];
int
ret
=
0
;
unsigned
long
flags
;
long
save_sp
,
save_vbr
;
long
tmp_vectors
[
3
];
local_irq_save
(
flags
);
__asm__
__volatile__
(
"movec
%/vbr,%2
\n\t
"
"movel
#Lberr1,%4@(8)
\n\t
"
"movec
%4,%/vbr
\n\t
"
"movel
%/sp,%1
\n\t
"
"moveq
#0,%0
\n\t
"
"tstb
%3@
\n\t
"
local_irq_save
(
flags
);
__asm__
__volatile__
(
"movec
%/vbr,%2
\n\t
"
"movel
#Lberr1,%4@(8)
\n\t
"
"movec
%4,%/vbr
\n\t
"
"movel
%/sp,%1
\n\t
"
"moveq
#0,%0
\n\t
"
"tstb
%3@
\n\t
"
"nop
\n\t
"
"moveq
#1,%0
\n
"
"Lberr1:
\n\t
"
"movel
%1,%/sp
\n\t
"
"movec
%2,%/vbr"
"moveq
#1,%0
\n
"
"Lberr1:
\n\t
"
"movel
%1,%/sp
\n\t
"
"movec
%2,%/vbr"
:
"=&d"
(
ret
),
"=&r"
(
save_sp
),
"=&r"
(
save_vbr
)
:
"a"
(
regp
),
"a"
(
tmp_vectors
)
);
local_irq_restore
(
flags
);
);
local_irq_restore
(
flags
);
return
(
ret
)
;
return
ret
;
}
EXPORT_SYMBOL
(
hwreg_present
);
...
...
@@ -58,34 +58,36 @@ EXPORT_SYMBOL(hwreg_present);
* by a bus error handler. Returns 1 if successful, 0 otherwise.
*/
int
hwreg_write
(
volatile
void
*
regp
,
unsigned
short
val
)
int
hwreg_write
(
volatile
void
*
regp
,
unsigned
short
val
)
{
int
ret
;
int
ret
;
unsigned
long
flags
;
long
save_sp
,
save_vbr
;
long
tmp_vectors
[
3
];
long
save_sp
,
save_vbr
;
long
tmp_vectors
[
3
];
local_irq_save
(
flags
);
__asm__
__volatile__
(
"movec %/vbr,%2
\n\t
"
"movel #Lberr2,%4@(8)
\n\t
"
"movec %4,%/vbr
\n\t
"
"movel %/sp,%1
\n\t
"
"moveq #0,%0
\n\t
"
"movew %5,%3@
\n\t
"
"nop
\n\t
"
/* If this nop isn't present, 'ret' may already be
* loaded with 1 at the time the bus error
* happens! */
"moveq #1,%0
\n
"
__asm__
__volatile__
(
"movec %/vbr,%2
\n\t
"
"movel #Lberr2,%4@(8)
\n\t
"
"movec %4,%/vbr
\n\t
"
"movel %/sp,%1
\n\t
"
"moveq #0,%0
\n\t
"
"movew %5,%3@
\n\t
"
"nop
\n\t
"
/*
* If this nop isn't present, 'ret' may already be loaded
* with 1 at the time the bus error happens!
*/
"moveq #1,%0
\n
"
"Lberr2:
\n\t
"
"movel
%1,%/sp
\n\t
"
"movec
%2,%/vbr"
"movel
%1,%/sp
\n\t
"
"movec
%2,%/vbr"
:
"=&d"
(
ret
),
"=&r"
(
save_sp
),
"=&r"
(
save_vbr
)
:
"a"
(
regp
),
"a"
(
tmp_vectors
),
"g"
(
val
)
);
local_irq_restore
(
flags
);
return
(
ret
)
;
return
ret
;
}
EXPORT_SYMBOL
(
hwreg_write
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录