Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
dcb76f88
Commit
dcb76f88
authored
Jul 22, 2007
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull throttle into release branch
parents
08e31686
6c5cf8aa
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
445 additions
and
18 deletions
+445
-18
drivers/acpi/processor_core.c
drivers/acpi/processor_core.c
+6
-0
drivers/acpi/processor_throttling.c
drivers/acpi/processor_throttling.c
+395
-15
include/acpi/processor.h
include/acpi/processor.h
+44
-3
No files found.
drivers/acpi/processor_core.c
View file @
dcb76f88
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
#define ACPI_PROCESSOR_FILE_LIMIT "limit"
#define ACPI_PROCESSOR_FILE_LIMIT "limit"
#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
#define ACPI_PROCESSOR_NOTIFY_POWER 0x81
#define ACPI_PROCESSOR_NOTIFY_POWER 0x81
#define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82
#define ACPI_PROCESSOR_LIMIT_USER 0
#define ACPI_PROCESSOR_LIMIT_USER 0
#define ACPI_PROCESSOR_LIMIT_THERMAL 1
#define ACPI_PROCESSOR_LIMIT_THERMAL 1
...
@@ -84,6 +85,8 @@ static int acpi_processor_info_open_fs(struct inode *inode, struct file *file);
...
@@ -84,6 +85,8 @@ static int acpi_processor_info_open_fs(struct inode *inode, struct file *file);
static
void
acpi_processor_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
);
static
void
acpi_processor_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
);
static
acpi_status
acpi_processor_hotadd_init
(
acpi_handle
handle
,
int
*
p_cpu
);
static
acpi_status
acpi_processor_hotadd_init
(
acpi_handle
handle
,
int
*
p_cpu
);
static
int
acpi_processor_handle_eject
(
struct
acpi_processor
*
pr
);
static
int
acpi_processor_handle_eject
(
struct
acpi_processor
*
pr
);
extern
int
acpi_processor_tstate_has_changed
(
struct
acpi_processor
*
pr
);
static
struct
acpi_driver
acpi_processor_driver
=
{
static
struct
acpi_driver
acpi_processor_driver
=
{
.
name
=
"processor"
,
.
name
=
"processor"
,
...
@@ -696,6 +699,9 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
...
@@ -696,6 +699,9 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
acpi_processor_cst_has_changed
(
pr
);
acpi_processor_cst_has_changed
(
pr
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_event
(
device
,
event
,
0
);
break
;
break
;
case
ACPI_PROCESSOR_NOTIFY_THROTTLING
:
acpi_processor_tstate_has_changed
(
pr
);
acpi_bus_generate_event
(
device
,
event
,
0
);
default:
default:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Unsupported event [0x%x]
\n
"
,
event
));
"Unsupported event [0x%x]
\n
"
,
event
));
...
...
drivers/acpi/processor_throttling.c
View file @
dcb76f88
This diff is collapsed.
Click to expand it.
include/acpi/processor.h
View file @
dcb76f88
...
@@ -21,6 +21,8 @@
...
@@ -21,6 +21,8 @@
#define ACPI_PSD_REV0_REVISION 0
/* Support for _PSD as in ACPI 3.0 */
#define ACPI_PSD_REV0_REVISION 0
/* Support for _PSD as in ACPI 3.0 */
#define ACPI_PSD_REV0_ENTRIES 5
#define ACPI_PSD_REV0_ENTRIES 5
#define ACPI_TSD_REV0_REVISION 0
/* Support for _PSD as in ACPI 3.0 */
#define ACPI_TSD_REV0_ENTRIES 5
/*
/*
* Types of coordination defined in ACPI 3.0. Same macros can be used across
* Types of coordination defined in ACPI 3.0. Same macros can be used across
* P, C and T states
* P, C and T states
...
@@ -125,17 +127,53 @@ struct acpi_processor_performance {
...
@@ -125,17 +127,53 @@ struct acpi_processor_performance {
/* Throttling Control */
/* Throttling Control */
struct
acpi_tsd_package
{
acpi_integer
num_entries
;
acpi_integer
revision
;
acpi_integer
domain
;
acpi_integer
coord_type
;
acpi_integer
num_processors
;
}
__attribute__
((
packed
));
struct
acpi_ptc_register
{
u8
descriptor
;
u16
length
;
u8
space_id
;
u8
bit_width
;
u8
bit_offset
;
u8
reserved
;
u64
address
;
}
__attribute__
((
packed
));
struct
acpi_processor_tx_tss
{
acpi_integer
freqpercentage
;
/* */
acpi_integer
power
;
/* milliWatts */
acpi_integer
transition_latency
;
/* microseconds */
acpi_integer
control
;
/* control value */
acpi_integer
status
;
/* success indicator */
};
struct
acpi_processor_tx
{
struct
acpi_processor_tx
{
u16
power
;
u16
power
;
u16
performance
;
u16
performance
;
};
};
struct
acpi_processor
;
struct
acpi_processor_throttling
{
struct
acpi_processor_throttling
{
int
state
;
unsigned
int
state
;
unsigned
int
platform_limit
;
struct
acpi_pct_register
control_register
;
struct
acpi_pct_register
status_register
;
unsigned
int
state_count
;
struct
acpi_processor_tx_tss
*
states_tss
;
struct
acpi_tsd_package
domain_info
;
cpumask_t
shared_cpu_map
;
int
(
*
acpi_processor_get_throttling
)
(
struct
acpi_processor
*
pr
);
int
(
*
acpi_processor_set_throttling
)
(
struct
acpi_processor
*
pr
,
int
state
);
u32
address
;
u32
address
;
u8
duty_offset
;
u8
duty_offset
;
u8
duty_width
;
u8
duty_width
;
int
state_count
;
struct
acpi_processor_tx
states
[
ACPI_PROCESSOR_MAX_THROTTLING
];
struct
acpi_processor_tx
states
[
ACPI_PROCESSOR_MAX_THROTTLING
];
};
};
...
@@ -169,6 +207,9 @@ struct acpi_processor {
...
@@ -169,6 +207,9 @@ struct acpi_processor {
u32
id
;
u32
id
;
u32
pblk
;
u32
pblk
;
int
performance_platform_limit
;
int
performance_platform_limit
;
int
throttling_platform_limit
;
/* 0 - states 0..n-th state available */
struct
acpi_processor_flags
flags
;
struct
acpi_processor_flags
flags
;
struct
acpi_processor_power
power
;
struct
acpi_processor_power
power
;
struct
acpi_processor_performance
*
performance
;
struct
acpi_processor_performance
*
performance
;
...
@@ -270,7 +311,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
...
@@ -270,7 +311,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
/* in processor_throttling.c */
/* in processor_throttling.c */
int
acpi_processor_get_throttling_info
(
struct
acpi_processor
*
pr
);
int
acpi_processor_get_throttling_info
(
struct
acpi_processor
*
pr
);
int
acpi_processor_set_throttling
(
struct
acpi_processor
*
pr
,
int
state
);
extern
int
acpi_processor_set_throttling
(
struct
acpi_processor
*
pr
,
int
state
);
extern
struct
file_operations
acpi_processor_throttling_fops
;
extern
struct
file_operations
acpi_processor_throttling_fops
;
/* in processor_idle.c */
/* in processor_idle.c */
...
...
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