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
f1b23714
Commit
f1b23714
authored
Dec 05, 2011
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ucode' of
git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
into x86/urgent
parents
1ef03890
ce37defc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
arch/x86/include/asm/msr.h
arch/x86/include/asm/msr.h
+8
-1
arch/x86/kernel/microcode_core.c
arch/x86/kernel/microcode_core.c
+19
-9
No files found.
arch/x86/include/asm/msr.h
View file @
f1b23714
...
...
@@ -169,7 +169,14 @@ static inline int wrmsr_safe(unsigned msr, unsigned low, unsigned high)
return
native_write_msr_safe
(
msr
,
low
,
high
);
}
/* rdmsr with exception handling */
/*
* rdmsr with exception handling.
*
* Please note that the exception handling works only after we've
* switched to the "smart" #GP handler in trap_init() which knows about
* exception tables - using this macro earlier than that causes machine
* hangs on boxes which do not implement the @msr in the first argument.
*/
#define rdmsr_safe(msr, p1, p2) \
({ \
int __err; \
...
...
arch/x86/kernel/microcode_core.c
View file @
f1b23714
...
...
@@ -256,7 +256,7 @@ static int __init microcode_dev_init(void)
return
0
;
}
static
void
microcode_dev_exit
(
void
)
static
void
__exit
microcode_dev_exit
(
void
)
{
misc_deregister
(
&
microcode_dev
);
}
...
...
@@ -519,10 +519,8 @@ static int __init microcode_init(void)
microcode_pdev
=
platform_device_register_simple
(
"microcode"
,
-
1
,
NULL
,
0
);
if
(
IS_ERR
(
microcode_pdev
))
{
microcode_dev_exit
();
if
(
IS_ERR
(
microcode_pdev
))
return
PTR_ERR
(
microcode_pdev
);
}
get_online_cpus
();
mutex_lock
(
&
microcode_mutex
);
...
...
@@ -532,14 +530,12 @@ static int __init microcode_init(void)
mutex_unlock
(
&
microcode_mutex
);
put_online_cpus
();
if
(
error
)
{
platform_device_unregister
(
microcode_pdev
);
return
error
;
}
if
(
error
)
goto
out_pdev
;
error
=
microcode_dev_init
();
if
(
error
)
return
erro
r
;
goto
out_sysdev_drive
r
;
register_syscore_ops
(
&
mc_syscore_ops
);
register_hotcpu_notifier
(
&
mc_cpu_notifier
);
...
...
@@ -548,6 +544,20 @@ static int __init microcode_init(void)
" <tigran@aivazian.fsnet.co.uk>, Peter Oruba
\n
"
);
return
0
;
out_sysdev_driver:
get_online_cpus
();
mutex_lock
(
&
microcode_mutex
);
sysdev_driver_unregister
(
&
cpu_sysdev_class
,
&
mc_sysdev_driver
);
mutex_unlock
(
&
microcode_mutex
);
put_online_cpus
();
out_pdev:
platform_device_unregister
(
microcode_pdev
);
return
error
;
}
module_init
(
microcode_init
);
...
...
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