Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
b89bd1f4
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
169
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看板
提交
b89bd1f4
编写于
1月 22, 2016
作者:
V
Vineet Gupta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARC: shrink cpuinfo by not saving full timer BCR
Signed-off-by:
N
Vineet Gupta
<
vgupta@synopsys.com
>
上级
d584f0fb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
9 deletion
+13
-9
arch/arc/include/asm/arcregs.h
arch/arc/include/asm/arcregs.h
+1
-2
arch/arc/kernel/setup.c
arch/arc/kernel/setup.c
+12
-7
未找到文件。
arch/arc/include/asm/arcregs.h
浏览文件 @
b89bd1f4
...
@@ -349,14 +349,13 @@ struct cpuinfo_arc {
...
@@ -349,14 +349,13 @@ struct cpuinfo_arc {
struct
cpuinfo_arc_bpu
bpu
;
struct
cpuinfo_arc_bpu
bpu
;
struct
bcr_identity
core
;
struct
bcr_identity
core
;
struct
bcr_isa
isa
;
struct
bcr_isa
isa
;
struct
bcr_timer
timers
;
unsigned
int
vec_base
;
unsigned
int
vec_base
;
struct
cpuinfo_arc_ccm
iccm
,
dccm
;
struct
cpuinfo_arc_ccm
iccm
,
dccm
;
struct
{
struct
{
unsigned
int
swap
:
1
,
norm
:
1
,
minmax
:
1
,
barrel
:
1
,
crc
:
1
,
pad1
:
3
,
unsigned
int
swap
:
1
,
norm
:
1
,
minmax
:
1
,
barrel
:
1
,
crc
:
1
,
pad1
:
3
,
fpu_sp:
1
,
fpu_dp
:
1
,
pad2
:
6
,
fpu_sp:
1
,
fpu_dp
:
1
,
pad2
:
6
,
debug:
1
,
ap
:
1
,
smart
:
1
,
rtt
:
1
,
pad3
:
4
,
debug:
1
,
ap
:
1
,
smart
:
1
,
rtt
:
1
,
pad3
:
4
,
pad4:
8
;
timer0:
1
,
timer1
:
1
,
rtc
:
1
,
gfrc
:
1
,
pad4
:
4
;
}
extn
;
}
extn
;
struct
bcr_mpy
extn_mpy
;
struct
bcr_mpy
extn_mpy
;
struct
bcr_extn_xymem
extn_xymem
;
struct
bcr_extn_xymem
extn_xymem
;
...
...
arch/arc/kernel/setup.c
浏览文件 @
b89bd1f4
...
@@ -45,6 +45,7 @@ struct cpuinfo_arc cpuinfo_arc700[NR_CPUS];
...
@@ -45,6 +45,7 @@ struct cpuinfo_arc cpuinfo_arc700[NR_CPUS];
static
void
read_arc_build_cfg_regs
(
void
)
static
void
read_arc_build_cfg_regs
(
void
)
{
{
struct
bcr_perip
uncached_space
;
struct
bcr_perip
uncached_space
;
struct
bcr_timer
timer
;
struct
bcr_generic
bcr
;
struct
bcr_generic
bcr
;
struct
cpuinfo_arc
*
cpu
=
&
cpuinfo_arc700
[
smp_processor_id
()];
struct
cpuinfo_arc
*
cpu
=
&
cpuinfo_arc700
[
smp_processor_id
()];
unsigned
long
perip_space
;
unsigned
long
perip_space
;
...
@@ -53,7 +54,11 @@ static void read_arc_build_cfg_regs(void)
...
@@ -53,7 +54,11 @@ static void read_arc_build_cfg_regs(void)
READ_BCR
(
AUX_IDENTITY
,
cpu
->
core
);
READ_BCR
(
AUX_IDENTITY
,
cpu
->
core
);
READ_BCR
(
ARC_REG_ISA_CFG_BCR
,
cpu
->
isa
);
READ_BCR
(
ARC_REG_ISA_CFG_BCR
,
cpu
->
isa
);
READ_BCR
(
ARC_REG_TIMERS_BCR
,
cpu
->
timers
);
READ_BCR
(
ARC_REG_TIMERS_BCR
,
timer
);
cpu
->
extn
.
timer0
=
timer
.
t0
;
cpu
->
extn
.
timer1
=
timer
.
t1
;
cpu
->
extn
.
rtc
=
timer
.
rtc
;
cpu
->
vec_base
=
read_aux_reg
(
AUX_INTR_VEC_BASE
);
cpu
->
vec_base
=
read_aux_reg
(
AUX_INTR_VEC_BASE
);
READ_BCR
(
ARC_REG_D_UNCACH_BCR
,
uncached_space
);
READ_BCR
(
ARC_REG_D_UNCACH_BCR
,
uncached_space
);
...
@@ -208,9 +213,9 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
...
@@ -208,9 +213,9 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
(
unsigned
int
)(
arc_get_core_freq
()
/
10000
)
%
100
);
(
unsigned
int
)(
arc_get_core_freq
()
/
10000
)
%
100
);
n
+=
scnprintf
(
buf
+
n
,
len
-
n
,
"Timers
\t\t
: %s%s%s%s
\n
ISA Extn
\t
: "
,
n
+=
scnprintf
(
buf
+
n
,
len
-
n
,
"Timers
\t\t
: %s%s%s%s
\n
ISA Extn
\t
: "
,
IS_AVAIL1
(
cpu
->
timers
.
t
0
,
"Timer0 "
),
IS_AVAIL1
(
cpu
->
extn
.
timer
0
,
"Timer0 "
),
IS_AVAIL1
(
cpu
->
timers
.
t
1
,
"Timer1 "
),
IS_AVAIL1
(
cpu
->
extn
.
timer
1
,
"Timer1 "
),
IS_AVAIL2
(
cpu
->
timers
.
rtc
,
"64-bit RTC
"
,
IS_AVAIL2
(
cpu
->
extn
.
rtc
,
"Local-64-bit-Ctr
"
,
CONFIG_ARC_HAS_RTC
));
CONFIG_ARC_HAS_RTC
));
n
+=
i
=
scnprintf
(
buf
+
n
,
len
-
n
,
"%s%s%s%s%s"
,
n
+=
i
=
scnprintf
(
buf
+
n
,
len
-
n
,
"%s%s%s%s%s"
,
...
@@ -293,13 +298,13 @@ static void arc_chk_core_config(void)
...
@@ -293,13 +298,13 @@ static void arc_chk_core_config(void)
struct
cpuinfo_arc
*
cpu
=
&
cpuinfo_arc700
[
smp_processor_id
()];
struct
cpuinfo_arc
*
cpu
=
&
cpuinfo_arc700
[
smp_processor_id
()];
int
fpu_enabled
;
int
fpu_enabled
;
if
(
!
cpu
->
timers
.
t
0
)
if
(
!
cpu
->
extn
.
timer
0
)
panic
(
"Timer0 is not present!
\n
"
);
panic
(
"Timer0 is not present!
\n
"
);
if
(
!
cpu
->
timers
.
t
1
)
if
(
!
cpu
->
extn
.
timer
1
)
panic
(
"Timer1 is not present!
\n
"
);
panic
(
"Timer1 is not present!
\n
"
);
if
(
IS_ENABLED
(
CONFIG_ARC_HAS_RTC
)
&&
!
cpu
->
timers
.
rtc
)
if
(
IS_ENABLED
(
CONFIG_ARC_HAS_RTC
)
&&
!
cpu
->
extn
.
rtc
)
panic
(
"RTC is not present
\n
"
);
panic
(
"RTC is not present
\n
"
);
#ifdef CONFIG_ARC_HAS_DCCM
#ifdef CONFIG_ARC_HAS_DCCM
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录