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
nexedi
linux
Commits
6b3c4f8b
Commit
6b3c4f8b
authored
Oct 22, 2008
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'FW_BUG' into test
parents
3fa8749e
2fd47094
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
21 deletions
+63
-21
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+24
-18
drivers/acpi/processor_perflib.c
drivers/acpi/processor_perflib.c
+15
-3
include/linux/kernel.h
include/linux/kernel.h
+24
-0
No files found.
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
View file @
6b3c4f8b
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
#endif
#endif
#define PFX "powernow-k8: "
#define PFX "powernow-k8: "
#define BFX PFX "BIOS error: "
#define VERSION "version 2.20.00"
#define VERSION "version 2.20.00"
#include "powernow-k8.h"
#include "powernow-k8.h"
...
@@ -536,35 +535,40 @@ static int check_pst_table(struct powernow_k8_data *data, struct pst_s *pst, u8
...
@@ -536,35 +535,40 @@ static int check_pst_table(struct powernow_k8_data *data, struct pst_s *pst, u8
for
(
j
=
0
;
j
<
data
->
numps
;
j
++
)
{
for
(
j
=
0
;
j
<
data
->
numps
;
j
++
)
{
if
(
pst
[
j
].
vid
>
LEAST_VID
)
{
if
(
pst
[
j
].
vid
>
LEAST_VID
)
{
printk
(
KERN_ERR
PFX
"vid %d invalid : 0x%x
\n
"
,
j
,
pst
[
j
].
vid
);
printk
(
KERN_ERR
FW_BUG
PFX
"vid %d invalid : 0x%x
\n
"
,
j
,
pst
[
j
].
vid
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
pst
[
j
].
vid
<
data
->
rvo
)
{
/* vid + rvo >= 0 */
if
(
pst
[
j
].
vid
<
data
->
rvo
)
{
/* vid + rvo >= 0 */
printk
(
KERN_ERR
BFX
"0 vid exceeded with pstate %d
\n
"
,
j
);
printk
(
KERN_ERR
FW_BUG
PFX
"0 vid exceeded with pstate"
" %d
\n
"
,
j
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
if
(
pst
[
j
].
vid
<
maxvid
+
data
->
rvo
)
{
/* vid + rvo >= maxvid */
if
(
pst
[
j
].
vid
<
maxvid
+
data
->
rvo
)
{
/* vid + rvo >= maxvid */
printk
(
KERN_ERR
BFX
"maxvid exceeded with pstate %d
\n
"
,
j
);
printk
(
KERN_ERR
FW_BUG
PFX
"maxvid exceeded with pstate"
" %d
\n
"
,
j
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
if
(
pst
[
j
].
fid
>
MAX_FID
)
{
if
(
pst
[
j
].
fid
>
MAX_FID
)
{
printk
(
KERN_ERR
BFX
"maxfid exceeded with pstate %d
\n
"
,
j
);
printk
(
KERN_ERR
FW_BUG
PFX
"maxfid exceeded with pstate"
" %d
\n
"
,
j
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
if
(
j
&&
(
pst
[
j
].
fid
<
HI_FID_TABLE_BOTTOM
))
{
if
(
j
&&
(
pst
[
j
].
fid
<
HI_FID_TABLE_BOTTOM
))
{
/* Only first fid is allowed to be in "low" range */
/* Only first fid is allowed to be in "low" range */
printk
(
KERN_ERR
BFX
"two low fids - %d : 0x%x
\n
"
,
j
,
pst
[
j
].
fid
);
printk
(
KERN_ERR
FW_BUG
PFX
"two low fids - %d : "
"0x%x
\n
"
,
j
,
pst
[
j
].
fid
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
pst
[
j
].
fid
<
lastfid
)
if
(
pst
[
j
].
fid
<
lastfid
)
lastfid
=
pst
[
j
].
fid
;
lastfid
=
pst
[
j
].
fid
;
}
}
if
(
lastfid
&
1
)
{
if
(
lastfid
&
1
)
{
printk
(
KERN_ERR
B
FX
"lastfid invalid
\n
"
);
printk
(
KERN_ERR
FW_BUG
P
FX
"lastfid invalid
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
lastfid
>
LO_FID_TABLE_TOP
)
if
(
lastfid
>
LO_FID_TABLE_TOP
)
printk
(
KERN_INFO
B
FX
"first fid not from lo freq table
\n
"
);
printk
(
KERN_INFO
FW_BUG
P
FX
"first fid not from lo freq table
\n
"
);
return
0
;
return
0
;
}
}
...
@@ -672,13 +676,13 @@ static int find_psb_table(struct powernow_k8_data *data)
...
@@ -672,13 +676,13 @@ static int find_psb_table(struct powernow_k8_data *data)
dprintk
(
"table vers: 0x%x
\n
"
,
psb
->
tableversion
);
dprintk
(
"table vers: 0x%x
\n
"
,
psb
->
tableversion
);
if
(
psb
->
tableversion
!=
PSB_VERSION_1_4
)
{
if
(
psb
->
tableversion
!=
PSB_VERSION_1_4
)
{
printk
(
KERN_ERR
B
FX
"PSB table is not v1.4
\n
"
);
printk
(
KERN_ERR
FW_BUG
P
FX
"PSB table is not v1.4
\n
"
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
dprintk
(
"flags: 0x%x
\n
"
,
psb
->
flags1
);
dprintk
(
"flags: 0x%x
\n
"
,
psb
->
flags1
);
if
(
psb
->
flags1
)
{
if
(
psb
->
flags1
)
{
printk
(
KERN_ERR
B
FX
"unknown flags
\n
"
);
printk
(
KERN_ERR
FW_BUG
P
FX
"unknown flags
\n
"
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -705,7 +709,7 @@ static int find_psb_table(struct powernow_k8_data *data)
...
@@ -705,7 +709,7 @@ static int find_psb_table(struct powernow_k8_data *data)
}
}
}
}
if
(
cpst
!=
1
)
{
if
(
cpst
!=
1
)
{
printk
(
KERN_ERR
B
FX
"numpst must be 1
\n
"
);
printk
(
KERN_ERR
FW_BUG
P
FX
"numpst must be 1
\n
"
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -1130,17 +1134,19 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
...
@@ -1130,17 +1134,19 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
"ACPI Processor module before starting this "
"ACPI Processor module before starting this "
"driver.
\n
"
);
"driver.
\n
"
);
#else
#else
printk
(
KERN_ERR
PFX
"Your BIOS does not provide ACPI "
printk
(
KERN_ERR
FW_BUG
PFX
"Your BIOS does not provide"
"_PSS objects in a way that Linux understands. "
" ACPI _PSS objects in a way that Linux "
"Please report this to the Linux ACPI maintainers"
"understands. Please report this to the Linux "
" and complain to your BIOS vendor.
\n
"
);
"ACPI maintainers and complain to your BIOS "
"vendor.
\n
"
);
#endif
#endif
kfree
(
data
);
kfree
(
data
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
if
(
pol
->
cpu
!=
0
)
{
if
(
pol
->
cpu
!=
0
)
{
printk
(
KERN_ERR
PFX
"No ACPI _PSS objects for CPU other than "
printk
(
KERN_ERR
FW_BUG
PFX
"No ACPI _PSS objects for "
"CPU0. Complain to your BIOS vendor.
\n
"
);
"CPU other than CPU0. Complain to your BIOS "
"vendor.
\n
"
);
kfree
(
data
);
kfree
(
data
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -1193,7 +1199,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
...
@@ -1193,7 +1199,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
/* min/max the cpu is capable of */
/* min/max the cpu is capable of */
if
(
cpufreq_frequency_table_cpuinfo
(
pol
,
data
->
powernow_table
))
{
if
(
cpufreq_frequency_table_cpuinfo
(
pol
,
data
->
powernow_table
))
{
printk
(
KERN_ERR
PFX
"invalid powernow_table
\n
"
);
printk
(
KERN_ERR
FW_BUG
PFX
"invalid powernow_table
\n
"
);
powernow_k8_cpu_exit_acpi
(
data
);
powernow_k8_cpu_exit_acpi
(
data
);
kfree
(
data
->
powernow_table
);
kfree
(
data
->
powernow_table
);
kfree
(
data
);
kfree
(
data
);
...
...
drivers/acpi/processor_perflib.c
View file @
6b3c4f8b
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#endif
#endif
#include <asm/cpufeature.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_bus.h>
#include <acpi/processor.h>
#include <acpi/processor.h>
...
@@ -334,7 +335,6 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
...
@@ -334,7 +335,6 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
acpi_handle
handle
=
NULL
;
acpi_handle
handle
=
NULL
;
if
(
!
pr
||
!
pr
->
performance
||
!
pr
->
handle
)
if
(
!
pr
||
!
pr
->
performance
||
!
pr
->
handle
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -347,13 +347,25 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
...
@@ -347,13 +347,25 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
result
=
acpi_processor_get_performance_control
(
pr
);
result
=
acpi_processor_get_performance_control
(
pr
);
if
(
result
)
if
(
result
)
return
result
;
goto
update_bios
;
result
=
acpi_processor_get_performance_states
(
pr
);
result
=
acpi_processor_get_performance_states
(
pr
);
if
(
result
)
if
(
result
)
return
result
;
goto
update_bios
;
return
0
;
return
0
;
/*
* Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that
* the BIOS is older than the CPU and does not know its frequencies
*/
update_bios:
if
(
ACPI_SUCCESS
(
acpi_get_handle
(
pr
->
handle
,
"_PPC"
,
&
handle
))){
if
(
boot_cpu_has
(
X86_FEATURE_EST
))
printk
(
KERN_WARNING
FW_BUG
"BIOS needs update for CPU "
"frequency support
\n
"
);
}
return
result
;
}
}
int
acpi_processor_notify_smm
(
struct
module
*
calling_module
)
int
acpi_processor_notify_smm
(
struct
module
*
calling_module
)
...
...
include/linux/kernel.h
View file @
6b3c4f8b
...
@@ -190,6 +190,30 @@ extern int kernel_text_address(unsigned long addr);
...
@@ -190,6 +190,30 @@ extern int kernel_text_address(unsigned long addr);
struct
pid
;
struct
pid
;
extern
struct
pid
*
session_of_pgrp
(
struct
pid
*
pgrp
);
extern
struct
pid
*
session_of_pgrp
(
struct
pid
*
pgrp
);
/*
* FW_BUG
* Add this to a message where you are sure the firmware is buggy or behaves
* really stupid or out of spec. Be aware that the responsible BIOS developer
* should be able to fix this issue or at least get a concrete idea of the
* problem by reading your message without the need of looking at the kernel
* code.
*
* Use it for definite and high priority BIOS bugs.
*
* FW_WARN
* Use it for not that clear (e.g. could the kernel messed up things already?)
* and medium priority BIOS bugs.
*
* FW_INFO
* Use this one if you want to tell the user or vendor about something
* suspicious, but generally harmless related to the firmware.
*
* Use it for information or very low priority BIOS bugs.
*/
#define FW_BUG "[Firmware Bug]: "
#define FW_WARN "[Firmware Warn]: "
#define FW_INFO "[Firmware Info]: "
#ifdef CONFIG_PRINTK
#ifdef CONFIG_PRINTK
asmlinkage
int
vprintk
(
const
char
*
fmt
,
va_list
args
)
asmlinkage
int
vprintk
(
const
char
*
fmt
,
va_list
args
)
__attribute__
((
format
(
printf
,
1
,
0
)));
__attribute__
((
format
(
printf
,
1
,
0
)));
...
...
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