Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b89bd1f4
Commit
b89bd1f4
authored
Jan 22, 2016
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARC: shrink cpuinfo by not saving full timer BCR
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
d584f0fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+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
No files found.
arch/arc/include/asm/arcregs.h
View file @
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
View file @
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment