Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22b970371
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22b970371
Commits
167c3ad2
Commit
167c3ad2
authored
11 years ago
by
Zhang Rui
Browse files
Options
Downloads
Plain Diff
Merge branch 'x86_pkg_temp' of .git into for-rc
parents
6ddcb7e6
7bed1b3c
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/thermal/x86_pkg_temp_thermal.c
+8
-6
8 additions, 6 deletions
drivers/thermal/x86_pkg_temp_thermal.c
with
8 additions
and
6 deletions
drivers/thermal/x86_pkg_temp_thermal.c
+
8
−
6
View file @
167c3ad2
...
...
@@ -316,18 +316,19 @@ static void pkg_temp_thermal_threshold_work_fn(struct work_struct *work)
int
phy_id
=
topology_physical_package_id
(
cpu
);
struct
phy_dev_entry
*
phdev
=
pkg_temp_thermal_get_phy_entry
(
cpu
);
bool
notify
=
false
;
unsigned
long
flags
;
if
(
!
phdev
)
return
;
spin_lock
(
&
pkg_work_lock
);
spin_lock
_irqsave
(
&
pkg_work_lock
,
flags
);
++
pkg_work_cnt
;
if
(
unlikely
(
phy_id
>
max_phy_id
))
{
spin_unlock
(
&
pkg_work_lock
);
spin_unlock
_irqrestore
(
&
pkg_work_lock
,
flags
);
return
;
}
pkg_work_scheduled
[
phy_id
]
=
0
;
spin_unlock
(
&
pkg_work_lock
);
spin_unlock
_irqrestore
(
&
pkg_work_lock
,
flags
);
enable_pkg_thres_interrupt
();
rdmsrl
(
MSR_IA32_PACKAGE_THERM_STATUS
,
msr_val
);
...
...
@@ -397,6 +398,7 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
int
thres_count
;
u32
eax
,
ebx
,
ecx
,
edx
;
u8
*
temp
;
unsigned
long
flags
;
cpuid
(
6
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
thres_count
=
ebx
&
0x07
;
...
...
@@ -420,19 +422,19 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
goto
err_ret_unlock
;
}
spin_lock
(
&
pkg_work_lock
);
spin_lock
_irqsave
(
&
pkg_work_lock
,
flags
);
if
(
topology_physical_package_id
(
cpu
)
>
max_phy_id
)
max_phy_id
=
topology_physical_package_id
(
cpu
);
temp
=
krealloc
(
pkg_work_scheduled
,
(
max_phy_id
+
1
)
*
sizeof
(
u8
),
GFP_ATOMIC
);
if
(
!
temp
)
{
spin_unlock
(
&
pkg_work_lock
);
spin_unlock
_irqrestore
(
&
pkg_work_lock
,
flags
);
err
=
-
ENOMEM
;
goto
err_ret_free
;
}
pkg_work_scheduled
=
temp
;
pkg_work_scheduled
[
topology_physical_package_id
(
cpu
)]
=
0
;
spin_unlock
(
&
pkg_work_lock
);
spin_unlock
_irqrestore
(
&
pkg_work_lock
,
flags
);
phy_dev_entry
->
phys_proc_id
=
topology_physical_package_id
(
cpu
);
phy_dev_entry
->
first_cpu
=
cpu
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment