Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
fd0881a2
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
fd0881a2
编写于
8月 21, 2015
作者:
V
Vineet Gupta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARC: Eliminate some ARCv2 specific code for ARCompact build
Signed-off-by:
N
Vineet Gupta
<
vgupta@synopsys.com
>
上级
09074950
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
34 addition
and
28 deletion
+34
-28
arch/arc/mm/cache.c
arch/arc/mm/cache.c
+32
-26
arch/arc/mm/dma.c
arch/arc/mm/dma.c
+2
-2
未找到文件。
arch/arc/mm/cache.c
浏览文件 @
fd0881a2
...
...
@@ -52,6 +52,9 @@ char *arc_cache_mumbojumbo(int c, char *buf, int len)
PR_CACHE
(
&
cpuinfo_arc700
[
c
].
icache
,
CONFIG_ARC_HAS_ICACHE
,
"I-Cache"
);
PR_CACHE
(
&
cpuinfo_arc700
[
c
].
dcache
,
CONFIG_ARC_HAS_DCACHE
,
"D-Cache"
);
if
(
!
is_isa_arcv2
())
return
buf
;
p
=
&
cpuinfo_arc700
[
c
].
slc
;
if
(
p
->
ver
)
n
+=
scnprintf
(
buf
+
n
,
len
-
n
,
...
...
@@ -70,18 +73,9 @@ char *arc_cache_mumbojumbo(int c, char *buf, int len)
* the cpuinfo structure for later use.
* No Validation done here, simply read/convert the BCRs
*/
void
read_decode_cache_bcr
(
void
)
static
void
read_decode_cache_bcr_arcv2
(
int
cpu
)
{
struct
cpuinfo_arc_cache
*
p_ic
,
*
p_dc
,
*
p_slc
;
unsigned
int
cpu
=
smp_processor_id
();
struct
bcr_cache
{
#ifdef CONFIG_CPU_BIG_ENDIAN
unsigned
int
pad
:
12
,
line_len
:
4
,
sz
:
4
,
config
:
4
,
ver
:
8
;
#else
unsigned
int
ver
:
8
,
config
:
4
,
sz
:
4
,
line_len
:
4
,
pad
:
12
;
#endif
}
ibcr
,
dbcr
;
struct
cpuinfo_arc_cache
*
p_slc
=
&
cpuinfo_arc700
[
cpu
].
slc
;
struct
bcr_generic
sbcr
;
struct
bcr_slc_cfg
{
...
...
@@ -100,6 +94,31 @@ void read_decode_cache_bcr(void)
#endif
}
cbcr
;
READ_BCR
(
ARC_REG_SLC_BCR
,
sbcr
);
if
(
sbcr
.
ver
)
{
READ_BCR
(
ARC_REG_SLC_CFG
,
slc_cfg
);
p_slc
->
ver
=
sbcr
.
ver
;
p_slc
->
sz_k
=
128
<<
slc_cfg
.
sz
;
l2_line_sz
=
p_slc
->
line_len
=
(
slc_cfg
.
lsz
==
0
)
?
128
:
64
;
}
READ_BCR
(
ARC_REG_CLUSTER_BCR
,
cbcr
);
if
(
cbcr
.
c
&&
ioc_enable
)
ioc_exists
=
1
;
}
void
read_decode_cache_bcr
(
void
)
{
struct
cpuinfo_arc_cache
*
p_ic
,
*
p_dc
;
unsigned
int
cpu
=
smp_processor_id
();
struct
bcr_cache
{
#ifdef CONFIG_CPU_BIG_ENDIAN
unsigned
int
pad
:
12
,
line_len
:
4
,
sz
:
4
,
config
:
4
,
ver
:
8
;
#else
unsigned
int
ver
:
8
,
config
:
4
,
sz
:
4
,
line_len
:
4
,
pad
:
12
;
#endif
}
ibcr
,
dbcr
;
p_ic
=
&
cpuinfo_arc700
[
cpu
].
icache
;
READ_BCR
(
ARC_REG_IC_BCR
,
ibcr
);
...
...
@@ -142,21 +161,8 @@ void read_decode_cache_bcr(void)
p_dc
->
ver
=
dbcr
.
ver
;
slc_chk:
if
(
!
is_isa_arcv2
())
return
;
p_slc
=
&
cpuinfo_arc700
[
cpu
].
slc
;
READ_BCR
(
ARC_REG_SLC_BCR
,
sbcr
);
if
(
sbcr
.
ver
)
{
READ_BCR
(
ARC_REG_SLC_CFG
,
slc_cfg
);
p_slc
->
ver
=
sbcr
.
ver
;
p_slc
->
sz_k
=
128
<<
slc_cfg
.
sz
;
l2_line_sz
=
p_slc
->
line_len
=
(
slc_cfg
.
lsz
==
0
)
?
128
:
64
;
}
READ_BCR
(
ARC_REG_CLUSTER_BCR
,
cbcr
);
if
(
cbcr
.
c
&&
ioc_enable
)
ioc_exists
=
1
;
if
(
is_isa_arcv2
())
read_decode_cache_bcr_arcv2
(
cpu
);
}
/*
...
...
arch/arc/mm/dma.c
浏览文件 @
fd0881a2
...
...
@@ -65,7 +65,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
* -For coherent data, Read/Write to buffers terminate early in cache
* (vs. always going to memory - thus are faster)
*/
if
(
ioc_exists
)
if
(
i
s_isa_arcv2
()
&&
i
oc_exists
)
return
dma_alloc_noncoherent
(
dev
,
size
,
dma_handle
,
gfp
);
/* This is linear addr (0x8000_0000 based) */
...
...
@@ -100,7 +100,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
void
dma_free_coherent
(
struct
device
*
dev
,
size_t
size
,
void
*
kvaddr
,
dma_addr_t
dma_handle
)
{
if
(
ioc_exists
)
if
(
i
s_isa_arcv2
()
&&
i
oc_exists
)
return
dma_free_noncoherent
(
dev
,
size
,
kvaddr
,
dma_handle
);
iounmap
((
void
__force
__iomem
*
)
kvaddr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录