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
Kirill Smelkov
linux
Commits
9ce93086
Commit
9ce93086
authored
Jun 13, 2023
by
Hans de Goede
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'intel-speed-select/intel-sst' into review-hans
parents
b77b75fc
7244720a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
13 deletions
+43
-13
tools/power/x86/intel-speed-select/isst-config.c
tools/power/x86/intel-speed-select/isst-config.c
+8
-5
tools/power/x86/intel-speed-select/isst-core-tpmi.c
tools/power/x86/intel-speed-select/isst-core-tpmi.c
+35
-8
No files found.
tools/power/x86/intel-speed-select/isst-config.c
View file @
9ce93086
...
...
@@ -15,7 +15,7 @@ struct process_cmd_struct {
int
arg
;
};
static
const
char
*
version_str
=
"v1.1
5
"
;
static
const
char
*
version_str
=
"v1.1
6
"
;
static
const
int
supported_api_ver
=
2
;
static
struct
isst_if_platform_info
isst_platform_info
;
...
...
@@ -2113,7 +2113,6 @@ static void set_fact_enable(int arg)
else
for_each_online_power_domain_in_set
(
set_fact_for_cpu
,
NULL
,
NULL
,
NULL
,
&
enable
);
isst_ctdp_display_information_end
(
outf
);
if
(
!
fact_enable_fail
&&
enable
&&
auto_mode
)
{
/*
...
...
@@ -2192,10 +2191,13 @@ static void set_fact_enable(int arg)
isst_display_result
(
&
id
,
outf
,
"turbo-freq --auto"
,
"enable"
,
0
);
}
isst_ctdp_display_information_end
(
outf
);
return
;
error_disp:
isst_display_result
(
&
id
,
outf
,
"turbo-freq --auto"
,
"enable"
,
ret
);
isst_ctdp_display_information_end
(
outf
);
}
...
...
@@ -2261,9 +2263,6 @@ static void dump_clos_config_for_cpu(struct isst_id *id, void *arg1, void *arg2,
struct
isst_clos_config
clos_config
;
int
ret
;
if
(
id
->
cpu
<
0
)
return
;
ret
=
isst_pm_get_clos
(
id
,
current_clos
,
&
clos_config
);
if
(
ret
)
isst_display_error_info_message
(
1
,
"isst_pm_get_clos failed"
,
0
,
0
);
...
...
@@ -2437,12 +2436,16 @@ static void set_clos_assoc(int arg)
isst_display_error_info_message
(
1
,
"Invalid clos id
\n
"
,
0
,
0
);
exit
(
0
);
}
isst_ctdp_display_information_start
(
outf
);
if
(
max_target_cpus
)
for_each_online_target_cpu_in_set
(
set_clos_assoc_for_cpu
,
NULL
,
NULL
,
NULL
,
NULL
);
else
{
isst_display_error_info_message
(
1
,
"Invalid target cpu. Specify with [-c|--cpu]"
,
0
,
0
);
}
isst_ctdp_display_information_end
(
outf
);
}
static
void
get_clos_assoc_for_cpu
(
struct
isst_id
*
id
,
void
*
arg1
,
void
*
arg2
,
void
*
arg3
,
...
...
tools/power/x86/intel-speed-select/isst-core-tpmi.c
View file @
9ce93086
...
...
@@ -641,16 +641,30 @@ static int tpmi_pm_qos_config(struct isst_id *id, int enable_clos,
int
priority_type
)
{
struct
isst_core_power
info
;
int
re
t
;
int
i
,
ret
,
saved_puni
t
;
info
.
get_set
=
1
;
info
.
socket_id
=
id
->
pkg
;
info
.
power_domain_id
=
id
->
punit
;
info
.
enable
=
enable_clos
;
info
.
priority_type
=
priority_type
;
saved_punit
=
id
->
punit
;
/* Set for all other dies also. This is per package setting */
for
(
i
=
0
;
i
<
MAX_PUNIT_PER_DIE
;
i
++
)
{
id
->
punit
=
i
;
if
(
isst_is_punit_valid
(
id
))
{
info
.
power_domain_id
=
i
;
ret
=
tpmi_process_ioctl
(
ISST_IF_CORE_POWER_STATE
,
&
info
);
if
(
ret
==
-
1
)
if
(
ret
==
-
1
)
{
id
->
punit
=
saved_punit
;
return
ret
;
}
}
}
id
->
punit
=
saved_punit
;
return
0
;
}
...
...
@@ -686,7 +700,7 @@ int tpmi_set_clos(struct isst_id *id, int clos,
struct
isst_clos_config
*
clos_config
)
{
struct
isst_clos_param
info
;
int
re
t
;
int
i
,
ret
,
saved_puni
t
;
info
.
get_set
=
1
;
info
.
socket_id
=
id
->
pkg
;
...
...
@@ -702,9 +716,22 @@ int tpmi_set_clos(struct isst_id *id, int clos,
if
(
info
.
max_freq_mhz
<=
0xff
)
info
.
max_freq_mhz
*=
100
;
saved_punit
=
id
->
punit
;
/* Set for all other dies also. This is per package setting */
for
(
i
=
0
;
i
<
MAX_PUNIT_PER_DIE
;
i
++
)
{
id
->
punit
=
i
;
if
(
isst_is_punit_valid
(
id
))
{
info
.
power_domain_id
=
i
;
ret
=
tpmi_process_ioctl
(
ISST_IF_CLOS_PARAM
,
&
info
);
if
(
ret
==
-
1
)
if
(
ret
==
-
1
)
{
id
->
punit
=
saved_punit
;
return
ret
;
}
}
}
id
->
punit
=
saved_punit
;
debug_printf
(
"set cpu:%d clos:%d min:%d max:%d
\n
"
,
id
->
cpu
,
clos
,
clos_config
->
clos_min
,
clos_config
->
clos_max
);
...
...
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