Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
3afd64b9
Commit
3afd64b9
authored
Aug 29, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'processor-procfs-2.6.32' into test
parents
e9578d84
b188e4ce
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
9 deletions
+38
-9
drivers/acpi/Kconfig
drivers/acpi/Kconfig
+5
-1
drivers/acpi/processor_core.c
drivers/acpi/processor_core.c
+21
-4
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+8
-2
drivers/acpi/processor_thermal.c
drivers/acpi/processor_thermal.c
+2
-1
drivers/acpi/processor_throttling.c
drivers/acpi/processor_throttling.c
+2
-1
No files found.
drivers/acpi/Kconfig
View file @
3afd64b9
...
...
@@ -60,7 +60,11 @@ config ACPI_PROCFS
/proc/acpi/fadt (/sys/firmware/acpi/tables/FACP)
/proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer)
/proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level)
/proc/acpi/processor/*/power (/sys/devices/system/cpu/*/cpuidle/*)
/proc/acpi/processor/*/performance (/sys/devices/system/cpu/*/
cpufreq/*)
/proc/acpi/processor/*/throttling (/sys/class/thermal/
cooling_device*/*)
This option has no effect on /proc/acpi/ files
and functions which do not yet exist in /sys.
...
...
drivers/acpi/processor_core.c
View file @
3afd64b9
...
...
@@ -82,7 +82,9 @@ MODULE_LICENSE("GPL");
static
int
acpi_processor_add
(
struct
acpi_device
*
device
);
static
int
acpi_processor_remove
(
struct
acpi_device
*
device
,
int
type
);
#ifdef CONFIG_ACPI_PROCFS
static
int
acpi_processor_info_open_fs
(
struct
inode
*
inode
,
struct
file
*
file
);
#endif
static
void
acpi_processor_notify
(
struct
acpi_device
*
device
,
u32
event
);
static
acpi_status
acpi_processor_hotadd_init
(
acpi_handle
handle
,
int
*
p_cpu
);
static
int
acpi_processor_handle_eject
(
struct
acpi_processor
*
pr
);
...
...
@@ -110,7 +112,7 @@ static struct acpi_driver acpi_processor_driver = {
#define INSTALL_NOTIFY_HANDLER 1
#define UNINSTALL_NOTIFY_HANDLER 2
#ifdef CONFIG_ACPI_PROCFS
static
const
struct
file_operations
acpi_processor_info_fops
=
{
.
owner
=
THIS_MODULE
,
.
open
=
acpi_processor_info_open_fs
,
...
...
@@ -118,6 +120,7 @@ static const struct file_operations acpi_processor_info_fops = {
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
};
#endif
DEFINE_PER_CPU
(
struct
acpi_processor
*
,
processors
);
struct
acpi_processor_errata
errata
__read_mostly
;
...
...
@@ -316,6 +319,7 @@ static int acpi_processor_set_pdc(struct acpi_processor *pr)
FS Interface (/proc)
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_PROCFS
static
struct
proc_dir_entry
*
acpi_processor_dir
=
NULL
;
static
int
acpi_processor_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
...
...
@@ -388,7 +392,6 @@ static int acpi_processor_add_fs(struct acpi_device *device)
return
-
EIO
;
return
0
;
}
static
int
acpi_processor_remove_fs
(
struct
acpi_device
*
device
)
{
...
...
@@ -405,6 +408,16 @@ static int acpi_processor_remove_fs(struct acpi_device *device)
return
0
;
}
#else
static
inline
int
acpi_processor_add_fs
(
struct
acpi_device
*
device
)
{
return
0
;
}
static
inline
int
acpi_processor_remove_fs
(
struct
acpi_device
*
device
)
{
return
0
;
}
#endif
/* Use the acpiid in MADT to map cpus in case of SMP */
...
...
@@ -1134,11 +1147,11 @@ static int __init acpi_processor_init(void)
(
struct
acpi_table_header
**
)
&
madt
)))
madt
=
NULL
;
#endif
#ifdef CONFIG_ACPI_PROCFS
acpi_processor_dir
=
proc_mkdir
(
ACPI_PROCESSOR_CLASS
,
acpi_root_dir
);
if
(
!
acpi_processor_dir
)
return
-
ENOMEM
;
#endif
/*
* Check whether the system is DMI table. If yes, OSPM
* should not use mwait for CPU-states.
...
...
@@ -1166,7 +1179,9 @@ out_cpuidle:
cpuidle_unregister_driver
(
&
acpi_idle_driver
);
out_proc:
#ifdef CONFIG_ACPI_PROCFS
remove_proc_entry
(
ACPI_PROCESSOR_CLASS
,
acpi_root_dir
);
#endif
return
result
;
}
...
...
@@ -1186,7 +1201,9 @@ static void __exit acpi_processor_exit(void)
cpuidle_unregister_driver
(
&
acpi_idle_driver
);
#ifdef CONFIG_ACPI_PROCFS
remove_proc_entry
(
ACPI_PROCESSOR_CLASS
,
acpi_root_dir
);
#endif
return
;
}
...
...
drivers/acpi/processor_idle.c
View file @
3afd64b9
...
...
@@ -682,6 +682,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
return
0
;
}
#ifdef CONFIG_ACPI_PROCFS
static
int
acpi_processor_power_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
struct
acpi_processor
*
pr
=
seq
->
private
;
...
...
@@ -761,7 +762,7 @@ static const struct file_operations acpi_processor_power_fops = {
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
};
#endif
/**
* acpi_idle_bm_check - checks if bus master activity was detected
...
...
@@ -1162,7 +1163,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
{
acpi_status
status
=
0
;
static
int
first_run
;
#ifdef CONFIG_ACPI_PROCFS
struct
proc_dir_entry
*
entry
=
NULL
;
#endif
unsigned
int
i
;
if
(
boot_option_idle_override
)
...
...
@@ -1219,7 +1222,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
pr
->
power
.
states
[
i
].
type
);
printk
(
")
\n
"
);
}
#ifdef CONFIG_ACPI_PROCFS
/* 'power' [R] */
entry
=
proc_create_data
(
ACPI_PROCESSOR_FILE_POWER
,
S_IRUGO
,
acpi_device_dir
(
device
),
...
...
@@ -1227,6 +1230,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
acpi_driver_data
(
device
));
if
(
!
entry
)
return
-
EIO
;
#endif
return
0
;
}
...
...
@@ -1239,9 +1243,11 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
cpuidle_unregister_device
(
&
pr
->
power
.
dev
);
pr
->
flags
.
power_setup_done
=
0
;
#ifdef CONFIG_ACPI_PROCFS
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
ACPI_PROCESSOR_FILE_POWER
,
acpi_device_dir
(
device
));
#endif
return
0
;
}
drivers/acpi/processor_thermal.c
View file @
3afd64b9
...
...
@@ -440,7 +440,7 @@ struct thermal_cooling_device_ops processor_cooling_ops = {
};
/* /proc interface */
#ifdef CONFIG_ACPI_PROCFS
static
int
acpi_processor_limit_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
seq
->
private
;
...
...
@@ -519,3 +519,4 @@ const struct file_operations acpi_processor_limit_fops = {
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
};
#endif
drivers/acpi/processor_throttling.c
View file @
3afd64b9
...
...
@@ -1218,7 +1218,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
}
/* proc interface */
#ifdef CONFIG_ACPI_PROCFS
static
int
acpi_processor_throttling_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
...
...
@@ -1326,3 +1326,4 @@ const struct file_operations acpi_processor_throttling_fops = {
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
};
#endif
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