Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d0be6b16
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看板
提交
d0be6b16
编写于
5月 19, 2012
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sparc32: Remove completely unused code from asm/cache.h
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
74c7b289
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
114 deletion
+0
-114
arch/sparc/include/asm/cache.h
arch/sparc/include/asm/cache.h
+0
-114
未找到文件。
arch/sparc/include/asm/cache.h
浏览文件 @
d0be6b16
...
...
@@ -22,118 +22,4 @@
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
#ifdef CONFIG_SPARC32
#include <asm/asi.h>
/* Direct access to the instruction cache is provided through and
* alternate address space. The IDC bit must be off in the ICCR on
* HyperSparcs for these accesses to work. The code below does not do
* any checking, the caller must do so. These routines are for
* diagnostics only, but could end up being useful. Use with care.
* Also, you are asking for trouble if you execute these in one of the
* three instructions following a %asr/%psr access or modification.
*/
/* First, cache-tag access. */
static
inline
unsigned
int
get_icache_tag
(
int
setnum
,
int
tagnum
)
{
unsigned
int
vaddr
,
retval
;
vaddr
=
((
setnum
&
1
)
<<
12
)
|
((
tagnum
&
0x7f
)
<<
5
);
__asm__
__volatile__
(
"lda [%1] %2, %0
\n\t
"
:
"=r"
(
retval
)
:
"r"
(
vaddr
),
"i"
(
ASI_M_TXTC_TAG
));
return
retval
;
}
static
inline
void
put_icache_tag
(
int
setnum
,
int
tagnum
,
unsigned
int
entry
)
{
unsigned
int
vaddr
;
vaddr
=
((
setnum
&
1
)
<<
12
)
|
((
tagnum
&
0x7f
)
<<
5
);
__asm__
__volatile__
(
"sta %0, [%1] %2
\n\t
"
:
:
"r"
(
entry
),
"r"
(
vaddr
),
"i"
(
ASI_M_TXTC_TAG
)
:
"memory"
);
}
/* Second cache-data access. The data is returned two-32bit quantities
* at a time.
*/
static
inline
void
get_icache_data
(
int
setnum
,
int
tagnum
,
int
subblock
,
unsigned
int
*
data
)
{
unsigned
int
value1
,
value2
,
vaddr
;
vaddr
=
((
setnum
&
0x1
)
<<
12
)
|
((
tagnum
&
0x7f
)
<<
5
)
|
((
subblock
&
0x3
)
<<
3
);
__asm__
__volatile__
(
"ldda [%2] %3, %%g2
\n\t
"
"or %%g0, %%g2, %0
\n\t
"
"or %%g0, %%g3, %1
\n\t
"
:
"=r"
(
value1
),
"=r"
(
value2
)
:
"r"
(
vaddr
),
"i"
(
ASI_M_TXTC_DATA
)
:
"g2"
,
"g3"
);
data
[
0
]
=
value1
;
data
[
1
]
=
value2
;
}
static
inline
void
put_icache_data
(
int
setnum
,
int
tagnum
,
int
subblock
,
unsigned
int
*
data
)
{
unsigned
int
value1
,
value2
,
vaddr
;
vaddr
=
((
setnum
&
0x1
)
<<
12
)
|
((
tagnum
&
0x7f
)
<<
5
)
|
((
subblock
&
0x3
)
<<
3
);
value1
=
data
[
0
];
value2
=
data
[
1
];
__asm__
__volatile__
(
"or %%g0, %0, %%g2
\n\t
"
"or %%g0, %1, %%g3
\n\t
"
"stda %%g2, [%2] %3
\n\t
"
:
:
"r"
(
value1
),
"r"
(
value2
),
"r"
(
vaddr
),
"i"
(
ASI_M_TXTC_DATA
)
:
"g2"
,
"g3"
,
"memory"
/* no joke */
);
}
/* Different types of flushes with the ICACHE. Some of the flushes
* affect both the ICACHE and the external cache. Others only clear
* the ICACHE entries on the cpu itself. V8's (most) allow
* granularity of flushes on the packet (element in line), whole line,
* and entire cache (ie. all lines) level. The ICACHE only flushes are
* ROSS HyperSparc specific and are in ross.h
*/
/* Flushes which clear out both the on-chip and external caches */
static
inline
void
flush_ei_page
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_PAGE
)
:
"memory"
);
}
static
inline
void
flush_ei_seg
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_SEG
)
:
"memory"
);
}
static
inline
void
flush_ei_region
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_REGION
)
:
"memory"
);
}
static
inline
void
flush_ei_ctx
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_CTX
)
:
"memory"
);
}
static
inline
void
flush_ei_user
(
unsigned
int
addr
)
{
__asm__
__volatile__
(
"sta %%g0, [%0] %1
\n\t
"
:
:
"r"
(
addr
),
"i"
(
ASI_M_FLUSH_USER
)
:
"memory"
);
}
#endif
/* CONFIG_SPARC32 */
#endif
/* !(_SPARC_CACHE_H) */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录