Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
e751b759
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e751b759
编写于
11月 06, 2011
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'atomic-io', 'lockdep', 'misc', 'pm-profile' and 'pnp-cleanup' into acpi
上级
3bf3f8b1
f7f71cfb
c1056b42
362b6460
18fd470a
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
62 addition
and
65 deletion
+62
-65
Documentation/ABI/stable/sysfs-acpi-pmprofile
Documentation/ABI/stable/sysfs-acpi-pmprofile
+22
-0
drivers/acpi/acpica/hwregs.c
drivers/acpi/acpica/hwregs.c
+6
-5
drivers/acpi/bus.c
drivers/acpi/bus.c
+2
-6
drivers/acpi/scan.c
drivers/acpi/scan.c
+1
-2
drivers/acpi/sysfs.c
drivers/acpi/sysfs.c
+13
-1
drivers/pnp/pnpacpi/rsparser.c
drivers/pnp/pnpacpi/rsparser.c
+15
-47
drivers/thermal/thermal_sys.c
drivers/thermal/thermal_sys.c
+2
-2
include/acpi/acpi_drivers.h
include/acpi/acpi_drivers.h
+1
-1
include/acpi/actypes.h
include/acpi/actypes.h
+0
-1
未找到文件。
Documentation/ABI/stable/sysfs-acpi-pmprofile
0 → 100644
浏览文件 @
e751b759
What: /sys/firmware/acpi/pm_profile
Date: 03-Nov-2011
KernelVersion: v3.2
Contact: linux-acpi@vger.kernel.org
Description: The ACPI pm_profile sysfs interface exports the platform
power management (and performance) requirement expectations
as provided by BIOS. The integer value is directly passed as
retrieved from the FADT ACPI table.
Values: For possible values see ACPI specification:
5.2.9 Fixed ACPI Description Table (FADT)
Field: Preferred_PM_Profile
Currently these values are defined by spec:
0 Unspecified
1 Desktop
2 Mobile
3 Workstation
4 Enterprise Server
5 SOHO Server
6 Appliance PC
7 Performance Server
>7 Reserved
drivers/acpi/acpica/hwregs.c
浏览文件 @
e751b759
...
...
@@ -269,16 +269,17 @@ acpi_status acpi_hw_clear_acpi_status(void)
status
=
acpi_hw_register_write
(
ACPI_REGISTER_PM1_STATUS
,
ACPI_BITMASK_ALL_FIXED_STATUS
);
if
(
ACPI_FAILURE
(
status
))
{
goto
unlock_and_exit
;
}
acpi_os_release_lock
(
acpi_gbl_hardware_lock
,
lock_flags
);
if
(
ACPI_FAILURE
(
status
))
goto
exit
;
/* Clear the GPE Bits in all GPE registers in all GPE blocks */
status
=
acpi_ev_walk_gpe_list
(
acpi_hw_clear_gpe_block
,
NULL
);
unlock_and_exit:
acpi_os_release_lock
(
acpi_gbl_hardware_lock
,
lock_flags
);
exit:
return_ACPI_STATUS
(
status
);
}
...
...
drivers/acpi/bus.c
浏览文件 @
e751b759
...
...
@@ -911,10 +911,7 @@ void __init acpi_early_init(void)
}
#endif
status
=
acpi_enable_subsystem
(
~
(
ACPI_NO_HARDWARE_INIT
|
ACPI_NO_ACPI_ENABLE
));
status
=
acpi_enable_subsystem
(
~
ACPI_NO_ACPI_ENABLE
);
if
(
ACPI_FAILURE
(
status
))
{
printk
(
KERN_ERR
PREFIX
"Unable to enable ACPI
\n
"
);
goto
error0
;
...
...
@@ -935,8 +932,7 @@ static int __init acpi_bus_init(void)
acpi_os_initialize1
();
status
=
acpi_enable_subsystem
(
ACPI_NO_HARDWARE_INIT
|
ACPI_NO_ACPI_ENABLE
);
status
=
acpi_enable_subsystem
(
ACPI_NO_ACPI_ENABLE
);
if
(
ACPI_FAILURE
(
status
))
{
printk
(
KERN_ERR
PREFIX
"Unable to start the ACPI Interpreter
\n
"
);
...
...
drivers/acpi/scan.c
浏览文件 @
e751b759
...
...
@@ -1062,13 +1062,12 @@ static void acpi_add_id(struct acpi_device *device, const char *dev_id)
if
(
!
id
)
return
;
id
->
id
=
k
malloc
(
strlen
(
dev_id
)
+
1
,
GFP_KERNEL
);
id
->
id
=
k
strdup
(
dev_id
,
GFP_KERNEL
);
if
(
!
id
->
id
)
{
kfree
(
id
);
return
;
}
strcpy
(
id
->
id
,
dev_id
);
list_add_tail
(
&
id
->
list
,
&
device
->
pnp
.
ids
);
}
...
...
drivers/acpi/sysfs.c
浏览文件 @
e751b759
...
...
@@ -706,11 +706,23 @@ static void __exit interrupt_stats_exit(void)
return
;
}
static
ssize_t
acpi_show_profile
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
return
sprintf
(
buf
,
"%d
\n
"
,
acpi_gbl_FADT
.
preferred_profile
);
}
static
const
struct
device_attribute
pm_profile_attr
=
__ATTR
(
pm_profile
,
S_IRUGO
,
acpi_show_profile
,
NULL
);
int
__init
acpi_sysfs_init
(
void
)
{
int
result
;
result
=
acpi_tables_sysfs_init
();
if
(
result
)
return
result
;
result
=
sysfs_create_file
(
acpi_kobj
,
&
pm_profile_attr
.
attr
);
return
result
;
}
drivers/pnp/pnpacpi/rsparser.c
浏览文件 @
e751b759
...
...
@@ -509,15 +509,12 @@ static __init void pnpacpi_parse_dma_option(struct pnp_dev *dev,
struct
acpi_resource_dma
*
p
)
{
int
i
;
unsigned
char
map
=
0
,
flags
=
0
;
if
(
p
->
channel_count
==
0
)
flags
|=
IORESOURCE_DISABLED
;
unsigned
char
map
=
0
,
flags
;
for
(
i
=
0
;
i
<
p
->
channel_count
;
i
++
)
map
|=
1
<<
p
->
channels
[
i
];
flags
|
=
dma_flags
(
dev
,
p
->
type
,
p
->
bus_master
,
p
->
transfer
);
flags
=
dma_flags
(
dev
,
p
->
type
,
p
->
bus_master
,
p
->
transfer
);
pnp_register_dma_resource
(
dev
,
option_flags
,
map
,
flags
);
}
...
...
@@ -527,17 +524,14 @@ static __init void pnpacpi_parse_irq_option(struct pnp_dev *dev,
{
int
i
;
pnp_irq_mask_t
map
;
unsigned
char
flags
=
0
;
if
(
p
->
interrupt_count
==
0
)
flags
|=
IORESOURCE_DISABLED
;
unsigned
char
flags
;
bitmap_zero
(
map
.
bits
,
PNP_IRQ_NR
);
for
(
i
=
0
;
i
<
p
->
interrupt_count
;
i
++
)
if
(
p
->
interrupts
[
i
])
__set_bit
(
p
->
interrupts
[
i
],
map
.
bits
);
flags
|
=
irq_flags
(
p
->
triggering
,
p
->
polarity
,
p
->
sharable
);
flags
=
irq_flags
(
p
->
triggering
,
p
->
polarity
,
p
->
sharable
);
pnp_register_irq_resource
(
dev
,
option_flags
,
&
map
,
flags
);
}
...
...
@@ -547,10 +541,7 @@ static __init void pnpacpi_parse_ext_irq_option(struct pnp_dev *dev,
{
int
i
;
pnp_irq_mask_t
map
;
unsigned
char
flags
=
0
;
if
(
p
->
interrupt_count
==
0
)
flags
|=
IORESOURCE_DISABLED
;
unsigned
char
flags
;
bitmap_zero
(
map
.
bits
,
PNP_IRQ_NR
);
for
(
i
=
0
;
i
<
p
->
interrupt_count
;
i
++
)
{
...
...
@@ -564,7 +555,7 @@ static __init void pnpacpi_parse_ext_irq_option(struct pnp_dev *dev,
}
}
flags
|
=
irq_flags
(
p
->
triggering
,
p
->
polarity
,
p
->
sharable
);
flags
=
irq_flags
(
p
->
triggering
,
p
->
polarity
,
p
->
sharable
);
pnp_register_irq_resource
(
dev
,
option_flags
,
&
map
,
flags
);
}
...
...
@@ -574,11 +565,8 @@ static __init void pnpacpi_parse_port_option(struct pnp_dev *dev,
{
unsigned
char
flags
=
0
;
if
(
io
->
address_length
==
0
)
flags
|=
IORESOURCE_DISABLED
;
if
(
io
->
io_decode
==
ACPI_DECODE_16
)
flags
|
=
IORESOURCE_IO_16BIT_ADDR
;
flags
=
IORESOURCE_IO_16BIT_ADDR
;
pnp_register_port_resource
(
dev
,
option_flags
,
io
->
minimum
,
io
->
maximum
,
io
->
alignment
,
io
->
address_length
,
flags
);
}
...
...
@@ -587,13 +575,8 @@ static __init void pnpacpi_parse_fixed_port_option(struct pnp_dev *dev,
unsigned
int
option_flags
,
struct
acpi_resource_fixed_io
*
io
)
{
unsigned
char
flags
=
0
;
if
(
io
->
address_length
==
0
)
flags
|=
IORESOURCE_DISABLED
;
pnp_register_port_resource
(
dev
,
option_flags
,
io
->
address
,
io
->
address
,
0
,
io
->
address_length
,
flags
|
IORESOURCE_IO_FIXED
);
0
,
io
->
address_length
,
IORESOURCE_IO_FIXED
);
}
static
__init
void
pnpacpi_parse_mem24_option
(
struct
pnp_dev
*
dev
,
...
...
@@ -602,11 +585,8 @@ static __init void pnpacpi_parse_mem24_option(struct pnp_dev *dev,
{
unsigned
char
flags
=
0
;
if
(
p
->
address_length
==
0
)
flags
|=
IORESOURCE_DISABLED
;
if
(
p
->
write_protect
==
ACPI_READ_WRITE_MEMORY
)
flags
|
=
IORESOURCE_MEM_WRITEABLE
;
flags
=
IORESOURCE_MEM_WRITEABLE
;
pnp_register_mem_resource
(
dev
,
option_flags
,
p
->
minimum
,
p
->
maximum
,
p
->
alignment
,
p
->
address_length
,
flags
);
}
...
...
@@ -617,11 +597,8 @@ static __init void pnpacpi_parse_mem32_option(struct pnp_dev *dev,
{
unsigned
char
flags
=
0
;
if
(
p
->
address_length
==
0
)
flags
|=
IORESOURCE_DISABLED
;
if
(
p
->
write_protect
==
ACPI_READ_WRITE_MEMORY
)
flags
|
=
IORESOURCE_MEM_WRITEABLE
;
flags
=
IORESOURCE_MEM_WRITEABLE
;
pnp_register_mem_resource
(
dev
,
option_flags
,
p
->
minimum
,
p
->
maximum
,
p
->
alignment
,
p
->
address_length
,
flags
);
}
...
...
@@ -632,11 +609,8 @@ static __init void pnpacpi_parse_fixed_mem32_option(struct pnp_dev *dev,
{
unsigned
char
flags
=
0
;
if
(
p
->
address_length
==
0
)
flags
|=
IORESOURCE_DISABLED
;
if
(
p
->
write_protect
==
ACPI_READ_WRITE_MEMORY
)
flags
|
=
IORESOURCE_MEM_WRITEABLE
;
flags
=
IORESOURCE_MEM_WRITEABLE
;
pnp_register_mem_resource
(
dev
,
option_flags
,
p
->
address
,
p
->
address
,
0
,
p
->
address_length
,
flags
);
}
...
...
@@ -656,19 +630,16 @@ static __init void pnpacpi_parse_address_option(struct pnp_dev *dev,
return
;
}
if
(
p
->
address_length
==
0
)
flags
|=
IORESOURCE_DISABLED
;
if
(
p
->
resource_type
==
ACPI_MEMORY_RANGE
)
{
if
(
p
->
info
.
mem
.
write_protect
==
ACPI_READ_WRITE_MEMORY
)
flags
|
=
IORESOURCE_MEM_WRITEABLE
;
flags
=
IORESOURCE_MEM_WRITEABLE
;
pnp_register_mem_resource
(
dev
,
option_flags
,
p
->
minimum
,
p
->
minimum
,
0
,
p
->
address_length
,
flags
);
}
else
if
(
p
->
resource_type
==
ACPI_IO_RANGE
)
pnp_register_port_resource
(
dev
,
option_flags
,
p
->
minimum
,
p
->
minimum
,
0
,
p
->
address_length
,
flags
|
IORESOURCE_IO_FIXED
);
IORESOURCE_IO_FIXED
);
}
static
__init
void
pnpacpi_parse_ext_address_option
(
struct
pnp_dev
*
dev
,
...
...
@@ -678,19 +649,16 @@ static __init void pnpacpi_parse_ext_address_option(struct pnp_dev *dev,
struct
acpi_resource_extended_address64
*
p
=
&
r
->
data
.
ext_address64
;
unsigned
char
flags
=
0
;
if
(
p
->
address_length
==
0
)
flags
|=
IORESOURCE_DISABLED
;
if
(
p
->
resource_type
==
ACPI_MEMORY_RANGE
)
{
if
(
p
->
info
.
mem
.
write_protect
==
ACPI_READ_WRITE_MEMORY
)
flags
|
=
IORESOURCE_MEM_WRITEABLE
;
flags
=
IORESOURCE_MEM_WRITEABLE
;
pnp_register_mem_resource
(
dev
,
option_flags
,
p
->
minimum
,
p
->
minimum
,
0
,
p
->
address_length
,
flags
);
}
else
if
(
p
->
resource_type
==
ACPI_IO_RANGE
)
pnp_register_port_resource
(
dev
,
option_flags
,
p
->
minimum
,
p
->
minimum
,
0
,
p
->
address_length
,
flags
|
IORESOURCE_IO_FIXED
);
IORESOURCE_IO_FIXED
);
}
struct
acpipnp_parse_option_s
{
...
...
drivers/thermal/thermal_sys.c
浏览文件 @
e751b759
...
...
@@ -678,10 +678,10 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz,
return
;
if
(
delay
>
1000
)
schedule_delayed_work
(
&
(
tz
->
poll_queue
),
queue_delayed_work
(
system_freezable_wq
,
&
(
tz
->
poll_queue
),
round_jiffies
(
msecs_to_jiffies
(
delay
)));
else
schedule_delayed_work
(
&
(
tz
->
poll_queue
),
queue_delayed_work
(
system_freezable_wq
,
&
(
tz
->
poll_queue
),
msecs_to_jiffies
(
delay
));
}
...
...
include/acpi/acpi_drivers.h
浏览文件 @
e751b759
...
...
@@ -144,7 +144,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
{
}
static
inline
int
register_hotplug_dock_device
(
acpi_handle
handle
,
struct
acpi_dock_ops
*
ops
,
const
struct
acpi_dock_ops
*
ops
,
void
*
context
)
{
return
-
ENODEV
;
...
...
include/acpi/actypes.h
浏览文件 @
e751b759
...
...
@@ -470,7 +470,6 @@ typedef u64 acpi_integer;
*/
#define ACPI_FULL_INITIALIZATION 0x00
#define ACPI_NO_ADDRESS_SPACE_INIT 0x01
#define ACPI_NO_HARDWARE_INIT 0x02
#define ACPI_NO_EVENT_INIT 0x04
#define ACPI_NO_HANDLER_INIT 0x08
#define ACPI_NO_ACPI_ENABLE 0x10
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录