Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
3b6947ec
Commit
3b6947ec
authored
Jun 16, 2017
by
davidcunado-arm
Committed by
GitHub
Jun 16, 2017
Browse files
Merge pull request #986 from jagadeeshujja/jagujj/fix-get-power-state
CSS:Fix scpi "get_power_state" when ARM_PLAT_MT is set
parents
5808ed85
878a8bdf
Changes
2
Show whitespace changes
Inline
Side-by-side
plat/arm/css/drivers/scp/css_pm_scpi.c
View file @
3b6947ec
...
@@ -93,7 +93,16 @@ int css_scp_get_power_state(u_register_t mpidr, unsigned int power_level)
...
@@ -93,7 +93,16 @@ int css_scp_get_power_state(u_register_t mpidr, unsigned int power_level)
* The CPU state returned by SCP is an 8-bit bit mask
* The CPU state returned by SCP is an 8-bit bit mask
* corresponding to each CPU in the cluster
* corresponding to each CPU in the cluster
*/
*/
#if ARM_PLAT_MT
/*
* The current SCPI driver only caters for single-threaded
* platforms. Hence we ignore the thread ID (which is always 0)
* for such platforms.
*/
element
=
(
mpidr
>>
MPIDR_AFF1_SHIFT
)
&
MPIDR_AFFLVL_MASK
;
#else
element
=
mpidr
&
MPIDR_AFFLVL_MASK
;
element
=
mpidr
&
MPIDR_AFFLVL_MASK
;
#endif
/* ARM_PLAT_MT */
return
CSS_CPU_PWR_STATE
(
cpu_state
,
element
)
==
return
CSS_CPU_PWR_STATE
(
cpu_state
,
element
)
==
CSS_CPU_PWR_STATE_ON
?
HW_ON
:
HW_OFF
;
CSS_CPU_PWR_STATE_ON
?
HW_ON
:
HW_OFF
;
}
else
{
}
else
{
...
...
plat/arm/css/drivers/scpi/css_scpi.c
View file @
3b6947ec
...
@@ -183,8 +183,17 @@ int scpi_get_css_power_state(unsigned int mpidr, unsigned int *cpu_state_p,
...
@@ -183,8 +183,17 @@ int scpi_get_css_power_state(unsigned int mpidr, unsigned int *cpu_state_p,
* Extract CPU and cluster membership of the given MPIDR. SCPI caters
* Extract CPU and cluster membership of the given MPIDR. SCPI caters
* for only up to 0xf clusters, and 8 CPUs per cluster
* for only up to 0xf clusters, and 8 CPUs per cluster
*/
*/
#if ARM_PLAT_MT
/*
* The current SCPI driver only caters for single-threaded platforms.
* Hence we ignore the thread ID (which is always 0) for such platforms.
*/
cpu
=
(
mpidr
>>
MPIDR_AFF1_SHIFT
)
&
MPIDR_AFFLVL_MASK
;
cluster
=
(
mpidr
>>
MPIDR_AFF2_SHIFT
)
&
MPIDR_AFFLVL_MASK
;
#else
cpu
=
mpidr
&
MPIDR_AFFLVL_MASK
;
cpu
=
mpidr
&
MPIDR_AFFLVL_MASK
;
cluster
=
(
mpidr
>>
MPIDR_AFF1_SHIFT
)
&
MPIDR_AFFLVL_MASK
;
cluster
=
(
mpidr
>>
MPIDR_AFF1_SHIFT
)
&
MPIDR_AFFLVL_MASK
;
#endif
/* ARM_PLAT_MT */
if
(
cpu
>=
8
||
cluster
>=
0xf
)
if
(
cpu
>=
8
||
cluster
>=
0xf
)
return
-
1
;
return
-
1
;
...
...
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