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
eb9809b9
Commit
eb9809b9
authored
Nov 10, 2019
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back cpufreq changes for v5.5.
parents
c31432fa
e6e8df07
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
20 deletions
+38
-20
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq.c
+10
-1
drivers/cpufreq/intel_pstate.c
drivers/cpufreq/intel_pstate.c
+15
-15
drivers/cpufreq/powernv-cpufreq.c
drivers/cpufreq/powernv-cpufreq.c
+13
-4
No files found.
drivers/cpufreq/cpufreq.c
View file @
eb9809b9
...
...
@@ -933,6 +933,9 @@ static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf)
struct
freq_attr
*
fattr
=
to_attr
(
attr
);
ssize_t
ret
;
if
(
!
fattr
->
show
)
return
-
EIO
;
down_read
(
&
policy
->
rwsem
);
ret
=
fattr
->
show
(
policy
,
buf
);
up_read
(
&
policy
->
rwsem
);
...
...
@@ -947,6 +950,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
struct
freq_attr
*
fattr
=
to_attr
(
attr
);
ssize_t
ret
=
-
EINVAL
;
if
(
!
fattr
->
store
)
return
-
EIO
;
/*
* cpus_read_trylock() is used here to work around a circular lock
* dependency problem with respect to the cpufreq_register_driver().
...
...
@@ -2385,7 +2391,10 @@ int cpufreq_set_policy(struct cpufreq_policy *policy,
new_policy
->
min
=
freq_qos_read_value
(
&
policy
->
constraints
,
FREQ_QOS_MIN
);
new_policy
->
max
=
freq_qos_read_value
(
&
policy
->
constraints
,
FREQ_QOS_MAX
);
/* verify the cpu speed can be set within this limit */
/*
* Verify that the CPU speed can be set within these limits and make sure
* that min <= max.
*/
ret
=
cpufreq_driver
->
verify
(
new_policy
);
if
(
ret
)
return
ret
;
...
...
drivers/cpufreq/intel_pstate.c
View file @
eb9809b9
...
...
@@ -2662,21 +2662,21 @@ enum {
/* Hardware vendor-specific info that has its own power management modes */
static
struct
acpi_platform_list
plat_info
[]
__initdata
=
{
{
"HP "
,
"ProLiant"
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PSS
},
{
"ORACLE"
,
"X4-2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X4-2L "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X4-2B "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X3-2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X3-2L "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X3-2B "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X4470M2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X4270M3 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X4270M2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X4170M2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X4170 M3"
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X4275 M3"
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"X6-2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"ORACLE"
,
"Sudbury "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
0
,
PPC
},
{
"HP "
,
"ProLiant"
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PSS
},
{
"ORACLE"
,
"X4-2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X4-2L "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X4-2B "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X3-2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X3-2L "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X3-2B "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X4470M2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X4270M3 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X4270M2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X4170M2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X4170 M3"
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X4275 M3"
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"X6-2 "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
"ORACLE"
,
"Sudbury "
,
0
,
ACPI_SIG_FADT
,
all_versions
,
NULL
,
PPC
},
{
}
/* End */
};
...
...
drivers/cpufreq/powernv-cpufreq.c
View file @
eb9809b9
...
...
@@ -1041,9 +1041,14 @@ static struct cpufreq_driver powernv_cpufreq_driver = {
static
int
init_chip_info
(
void
)
{
unsigned
int
chip
[
256
]
;
unsigned
int
*
chip
;
unsigned
int
cpu
,
i
;
unsigned
int
prev_chip_id
=
UINT_MAX
;
int
ret
=
0
;
chip
=
kcalloc
(
num_possible_cpus
(),
sizeof
(
*
chip
),
GFP_KERNEL
);
if
(
!
chip
)
return
-
ENOMEM
;
for_each_possible_cpu
(
cpu
)
{
unsigned
int
id
=
cpu_to_chip_id
(
cpu
);
...
...
@@ -1055,8 +1060,10 @@ static int init_chip_info(void)
}
chips
=
kcalloc
(
nr_chips
,
sizeof
(
struct
chip
),
GFP_KERNEL
);
if
(
!
chips
)
return
-
ENOMEM
;
if
(
!
chips
)
{
ret
=
-
ENOMEM
;
goto
free_and_return
;
}
for
(
i
=
0
;
i
<
nr_chips
;
i
++
)
{
chips
[
i
].
id
=
chip
[
i
];
...
...
@@ -1066,7 +1073,9 @@ static int init_chip_info(void)
per_cpu
(
chip_info
,
cpu
)
=
&
chips
[
i
];
}
return
0
;
free_and_return:
kfree
(
chip
);
return
ret
;
}
static
inline
void
clean_chip_info
(
void
)
...
...
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