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
ad71860a
Commit
ad71860a
authored
Feb 02, 2007
by
Alexey Starikovskiy
Committed by
Len Brown
Feb 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPICA: minimal patch to integrate new tables into Linux
Signed-off-by:
Len Brown
<
len.brown@intel.com
>
parent
a4bbb810
Changes
31
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
191 additions
and
453 deletions
+191
-453
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/acpi/boot.c
+5
-12
arch/ia64/kernel/acpi.c
arch/ia64/kernel/acpi.c
+4
-4
arch/ia64/sn/kernel/io_common.c
arch/ia64/sn/kernel/io_common.c
+12
-5
arch/ia64/sn/kernel/iomv.c
arch/ia64/sn/kernel/iomv.c
+6
-4
arch/x86_64/kernel/time.c
arch/x86_64/kernel/time.c
+9
-9
drivers/acpi/asus_acpi.c
drivers/acpi/asus_acpi.c
+2
-7
drivers/acpi/blacklist.c
drivers/acpi/blacklist.c
+7
-8
drivers/acpi/bus.c
drivers/acpi/bus.c
+12
-13
drivers/acpi/ec.c
drivers/acpi/ec.c
+1
-3
drivers/acpi/motherboard.c
drivers/acpi/motherboard.c
+20
-20
drivers/acpi/osl.c
drivers/acpi/osl.c
+19
-28
drivers/acpi/processor_core.c
drivers/acpi/processor_core.c
+1
-1
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+15
-14
drivers/acpi/processor_perflib.c
drivers/acpi/processor_perflib.c
+10
-17
drivers/acpi/scan.c
drivers/acpi/scan.c
+2
-2
drivers/acpi/sleep/proc.c
drivers/acpi/sleep/proc.c
+19
-17
drivers/acpi/system.c
drivers/acpi/system.c
+6
-9
drivers/acpi/tables.c
drivers/acpi/tables.c
+14
-15
drivers/acpi/tables/Makefile
drivers/acpi/tables/Makefile
+1
-2
drivers/acpi/tables/tbutils.c
drivers/acpi/tables/tbutils.c
+1
-1
drivers/acpi/tables/tbxface.c
drivers/acpi/tables/tbxface.c
+5
-3
include/acpi/acglobal.h
include/acpi/acglobal.h
+2
-0
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+0
-1
include/acpi/actbl.h
include/acpi/actbl.h
+6
-1
include/acpi/actbl2.h
include/acpi/actbl2.h
+0
-49
include/acpi/actbl71.h
include/acpi/actbl71.h
+0
-134
include/asm-i386/acpi.h
include/asm-i386/acpi.h
+4
-4
include/asm-ia64/acpi.h
include/asm-ia64/acpi.h
+4
-4
include/asm-ia64/sn/acpi.h
include/asm-ia64/sn/acpi.h
+0
-16
include/asm-x86_64/acpi.h
include/asm-x86_64/acpi.h
+4
-4
include/linux/acpi.h
include/linux/acpi.h
+0
-46
No files found.
arch/i386/kernel/acpi/boot.c
View file @
ad71860a
...
...
@@ -716,33 +716,26 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
printk
(
KERN_WARNING
PREFIX
"Unable to map FADT
\n
"
);
return
0
;
}
/* initialize sci_int early for INT_SRC_OVR MADT parsing */
acpi_fadt
.
sci_int
=
fadt
->
sci_int
;
/* initialize rev and apic_phys_dest_mode for x86_64 genapic */
acpi_fadt
.
revision
=
fadt
->
revision
;
acpi_fadt
.
force_apic_physical_destination_mode
=
fadt
->
force_apic_physical_destination_mode
;
#ifdef CONFIG_X86_PM_TIMER
/* detect the location of the ACPI PM Timer */
if
(
fadt
->
revision
>=
FADT2_REVISION_ID
)
{
if
(
fadt
->
header
.
revision
>=
FADT2_REVISION_ID
)
{
/* FADT rev. 2 */
if
(
fadt
->
xpm_t
mr_blk
.
address_
space_id
!=
if
(
fadt
->
xpm_t
imer_block
.
space_id
!=
ACPI_ADR_SPACE_SYSTEM_IO
)
return
0
;
pmtmr_ioport
=
fadt
->
xpm_t
mr_bl
k
.
address
;
pmtmr_ioport
=
fadt
->
xpm_t
imer_bloc
k
.
address
;
/*
* "X" fields are optional extensions to the original V1.0
* fields, so we must selectively expand V1.0 fields if the
* corresponding X field is zero.
*/
if
(
!
pmtmr_ioport
)
pmtmr_ioport
=
fadt
->
V1_pm_tmr_bl
k
;
pmtmr_ioport
=
fadt
->
pm_timer_bloc
k
;
}
else
{
/* FADT rev. 1 */
pmtmr_ioport
=
fadt
->
V1_pm_tmr_bl
k
;
pmtmr_ioport
=
fadt
->
pm_timer_bloc
k
;
}
if
(
pmtmr_ioport
)
printk
(
KERN_INFO
PREFIX
"PM-Timer IO Port: %#x
\n
"
,
...
...
arch/ia64/kernel/acpi.c
View file @
ad71860a
...
...
@@ -76,7 +76,7 @@ const char *acpi_get_sysname(void)
{
#ifdef CONFIG_IA64_GENERIC
unsigned
long
rsdp_phys
;
struct
acpi
20
_table_rsdp
*
rsdp
;
struct
acpi_table_rsdp
*
rsdp
;
struct
acpi_table_xsdt
*
xsdt
;
struct
acpi_table_header
*
hdr
;
...
...
@@ -87,8 +87,8 @@ const char *acpi_get_sysname(void)
return
"dig"
;
}
rsdp
=
(
struct
acpi
20
_table_rsdp
*
)
__va
(
rsdp_phys
);
if
(
strncmp
(
rsdp
->
signature
,
RSDP_SIG
,
sizeof
(
RSDP_SIG
)
-
1
))
{
rsdp
=
(
struct
acpi_table_rsdp
*
)
__va
(
rsdp_phys
);
if
(
strncmp
(
rsdp
->
signature
,
ACPI_SIG_RSDP
,
sizeof
(
ACPI_SIG_RSDP
)
-
1
))
{
printk
(
KERN_ERR
"ACPI 2.0 RSDP signature incorrect, default to
\"
dig
\"\n
"
);
return
"dig"
;
...
...
@@ -96,7 +96,7 @@ const char *acpi_get_sysname(void)
xsdt
=
(
struct
acpi_table_xsdt
*
)
__va
(
rsdp
->
xsdt_address
);
hdr
=
&
xsdt
->
header
;
if
(
strncmp
(
hdr
->
signature
,
XSDT_SIG
,
sizeof
(
XSDT_SIG
)
-
1
))
{
if
(
strncmp
(
hdr
->
signature
,
ACPI_SIG_XSDT
,
sizeof
(
ACPI_SIG_XSDT
)
-
1
))
{
printk
(
KERN_ERR
"ACPI 2.0 XSDT signature incorrect, default to
\"
dig
\"\n
"
);
return
"dig"
;
...
...
arch/ia64/sn/kernel/io_common.c
View file @
ad71860a
...
...
@@ -25,7 +25,6 @@
#include "xtalk/xwidgetdev.h"
#include <linux/acpi.h>
#include <asm/sn/sn2/sn_hwperf.h>
#include <asm/sn/acpi.h>
extern
void
sn_init_cpei_timer
(
void
);
extern
void
register_sn_procfs
(
void
);
...
...
@@ -37,7 +36,6 @@ extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64);
extern
void
sn_io_acpi_init
(
void
);
extern
void
sn_io_init
(
void
);
static
struct
list_head
sn_sysdata_list
;
/* sysdata list struct */
...
...
@@ -50,6 +48,15 @@ int sn_ioif_inited; /* SN I/O infrastructure initialized? */
struct
sn_pcibus_provider
*
sn_pci_provider
[
PCIIO_ASIC_MAX_TYPES
];
/* indexed by asic type */
int
sn_acpi_base_support
()
{
struct
acpi_table_header
*
header
;
(
void
)
acpi_get_table_by_index
(
ACPI_TABLE_INDEX_DSDT
,
&
header
);
if
(
header
&&
header
->
oem_revision
>=
0x20101
)
return
1
;
return
0
;
}
/*
* Hooks and struct for unsupported pci providers
*/
...
...
@@ -286,7 +293,7 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
list_add_tail
(
&
pcidev_info
->
pdi_list
,
&
(
SN_PLATFORM_DATA
(
dev
->
bus
)
->
pcidev_info
));
if
(
SN_ACPI_BASE_SUPPORT
())
if
(
sn_acpi_base_support
())
sn_acpi_slot_fixup
(
dev
,
pcidev_info
);
else
sn_more_slot_fixup
(
dev
,
pcidev_info
);
...
...
@@ -498,7 +505,7 @@ void __devinit
sn_pci_fixup_bus
(
struct
pci_bus
*
bus
)
{
if
(
SN_ACPI_BASE_SUPPORT
())
if
(
sn_acpi_base_support
())
sn_acpi_bus_fixup
(
bus
);
else
sn_bus_fixup
(
bus
);
...
...
@@ -546,7 +553,7 @@ sn_io_early_init(void)
printk
(
KERN_INFO
"ACPI DSDT OEM Rev 0x%x
\n
"
,
acpi_gbl_DSDT
->
oem_revision
);
if
(
SN_ACPI_BASE_SUPPORT
())
if
(
sn_acpi_base_support
())
sn_io_acpi_init
();
else
sn_io_init
();
...
...
arch/ia64/sn/kernel/iomv.c
View file @
ad71860a
...
...
@@ -16,7 +16,6 @@
#include <asm/sn/pda.h>
#include <asm/sn/sn_cpuid.h>
#include <asm/sn/shub_mmr.h>
#include <asm/sn/acpi.h>
#define IS_LEGACY_VGA_IOPORT(p) \
(((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df))
...
...
@@ -29,6 +28,9 @@
* on IA64. This routine will convert a port number into a valid
* SN i/o address. Used by sn_in*() and sn_out*().
*/
extern
int
sn_acpi_base_support
();
void
*
sn_io_addr
(
unsigned
long
port
)
{
if
(
!
IS_RUNNING_ON_SIMULATOR
())
{
...
...
@@ -37,7 +39,7 @@ void *sn_io_addr(unsigned long port)
/* On sn2, legacy I/O ports don't point at anything */
if
(
port
<
(
64
*
1024
))
return
NULL
;
if
(
SN_ACPI_BASE_SUPPORT
())
if
(
sn_acpi_base_support
())
return
(
__ia64_mk_io_addr
(
port
));
else
return
((
void
*
)(
port
|
__IA64_UNCACHED_OFFSET
));
...
...
arch/x86_64/kernel/time.c
View file @
ad71860a
...
...
@@ -498,7 +498,7 @@ static unsigned long get_cmos_time(void)
{
unsigned
int
year
,
mon
,
day
,
hour
,
min
,
sec
;
unsigned
long
flags
;
unsigned
extyear
=
0
;
unsigned
century
=
0
;
spin_lock_irqsave
(
&
rtc_lock
,
flags
);
...
...
@@ -510,9 +510,9 @@ static unsigned long get_cmos_time(void)
mon
=
CMOS_READ
(
RTC_MONTH
);
year
=
CMOS_READ
(
RTC_YEAR
);
#ifdef CONFIG_ACPI
if
(
acpi_
fadt
.
revision
>=
FADT2_REVISION_ID
&&
acpi_
fadt
.
century
)
extyear
=
CMOS_READ
(
acpi_fadt
.
century
);
if
(
acpi_
gbl_FADT
.
header
.
revision
>=
FADT2_REVISION_ID
&&
acpi_
gbl_FADT
.
century
)
century
=
CMOS_READ
(
acpi_gbl_FADT
.
century
);
#endif
}
while
(
sec
!=
CMOS_READ
(
RTC_SECONDS
));
...
...
@@ -530,10 +530,10 @@ static unsigned long get_cmos_time(void)
BCD_TO_BIN
(
mon
);
BCD_TO_BIN
(
year
);
if
(
extyear
)
{
BCD_TO_BIN
(
extyear
);
year
+=
extyear
;
printk
(
KERN_INFO
"Extended CMOS year: %d
\n
"
,
extyear
);
if
(
century
)
{
BCD_TO_BIN
(
century
);
year
+=
century
*
100
;
printk
(
KERN_INFO
"Extended CMOS year: %d
\n
"
,
century
*
100
);
}
else
{
/*
* x86-64 systems only exists since 2002.
...
...
@@ -954,7 +954,7 @@ __cpuinit int unsynchronized_tsc(void)
if
(
boot_cpu_data
.
x86_vendor
==
X86_VENDOR_INTEL
)
{
#ifdef CONFIG_ACPI
/* But TSC doesn't tick in C3 so don't use it there */
if
(
acpi_
fadt
.
length
>
0
&&
acpi_fadt
.
plvl3_lat
<
1000
)
if
(
acpi_
gbl_FADT
.
header
.
length
>
0
&&
acpi_gbl_FADT
.
C3latency
<
1000
)
return
1
;
#endif
return
0
;
...
...
drivers/acpi/asus_acpi.c
View file @
ad71860a
...
...
@@ -26,7 +26,7 @@
* Pontus Fuchs - Helper functions, cleanup
* Johann Wiesner - Small compile fixes
* John Belmonte - ACPI code for Toshiba laptop was a good starting point.
*
r
ic Burghard - LED display support for W1N
*
�
ic Burghard - LED display support for W1N
*
*/
...
...
@@ -1128,7 +1128,6 @@ static int asus_model_match(char *model)
static
int
asus_hotk_get_info
(
void
)
{
struct
acpi_buffer
buffer
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
struct
acpi_buffer
dsdt
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
union
acpi_object
*
model
=
NULL
;
int
bsts_result
;
char
*
string
=
NULL
;
...
...
@@ -1142,11 +1141,9 @@ static int asus_hotk_get_info(void)
* HID), this bit will be moved. A global variable asus_info contains
* the DSDT header.
*/
status
=
acpi_get_table
(
ACPI_
TABLE_ID_DSDT
,
1
,
&
dsdt
);
status
=
acpi_get_table
(
ACPI_
SIG_DSDT
,
1
,
&
asus_info
);
if
(
ACPI_FAILURE
(
status
))
printk
(
KERN_WARNING
" Couldn't get the DSDT table header
\n
"
);
else
asus_info
=
dsdt
.
pointer
;
/* We have to write 0 on init this far for all ASUS models */
if
(
!
write_acpi_int
(
hotk
->
handle
,
"INIT"
,
0
,
&
buffer
))
{
...
...
@@ -1358,8 +1355,6 @@ static void __exit asus_acpi_exit(void)
acpi_bus_unregister_driver
(
&
asus_hotk_driver
);
remove_proc_entry
(
PROC_ASUS
,
acpi_root_dir
);
kfree
(
asus_info
);
return
;
}
...
...
drivers/acpi/blacklist.c
View file @
ad71860a
...
...
@@ -44,7 +44,7 @@ struct acpi_blacklist_item {
char
oem_id
[
7
];
char
oem_table_id
[
9
];
u32
oem_revision
;
acpi_table_type
table
;
char
*
table
;
enum
acpi_blacklist_predicates
oem_revision_predicate
;
char
*
reason
;
u32
is_critical_error
;
...
...
@@ -56,18 +56,18 @@ struct acpi_blacklist_item {
*/
static
struct
acpi_blacklist_item
acpi_blacklist
[]
__initdata
=
{
/* Compaq Presario 1700 */
{
"PTLTD "
,
" DSDT "
,
0x06040000
,
ACPI_DSDT
,
less_than_or_equal
,
{
"PTLTD "
,
" DSDT "
,
0x06040000
,
ACPI_
SIG_
DSDT
,
less_than_or_equal
,
"Multiple problems"
,
1
},
/* Sony FX120, FX140, FX150? */
{
"SONY "
,
"U0 "
,
0x20010313
,
ACPI_DSDT
,
less_than_or_equal
,
{
"SONY "
,
"U0 "
,
0x20010313
,
ACPI_
SIG_
DSDT
,
less_than_or_equal
,
"ACPI driver problem"
,
1
},
/* Compaq Presario 800, Insyde BIOS */
{
"INT440"
,
"SYSFexxx"
,
0x00001001
,
ACPI_DSDT
,
less_than_or_equal
,
{
"INT440"
,
"SYSFexxx"
,
0x00001001
,
ACPI_
SIG_
DSDT
,
less_than_or_equal
,
"Does not use _REG to protect EC OpRegions"
,
1
},
/* IBM 600E - _ADR should return 7, but it returns 1 */
{
"IBM "
,
"TP600E "
,
0x00000105
,
ACPI_DSDT
,
less_than_or_equal
,
{
"IBM "
,
"TP600E "
,
0x00000105
,
ACPI_
SIG_
DSDT
,
less_than_or_equal
,
"Incorrect _ADR"
,
1
},
{
"ASUS
\0\0
"
,
"P2B-S "
,
0
,
ACPI_DSDT
,
all_versions
,
{
"ASUS
\0\0
"
,
"P2B-S "
,
0
,
ACPI_
SIG_
DSDT
,
all_versions
,
"Bogus PCI routing"
,
1
},
{
""
}
...
...
@@ -106,8 +106,7 @@ int __init acpi_blacklisted(void)
struct
acpi_table_header
*
table_header
;
while
(
acpi_blacklist
[
i
].
oem_id
[
0
]
!=
'\0'
)
{
if
(
acpi_get_table_header_early
(
acpi_blacklist
[
i
].
table
,
&
table_header
))
{
if
(
acpi_get_table_header
(
acpi_blacklist
[
i
].
table
,
0
,
&
table_header
))
{
i
++
;
continue
;
}
...
...
drivers/acpi/bus.c
View file @
ad71860a
...
...
@@ -44,9 +44,6 @@ ACPI_MODULE_NAME("acpi_bus")
extern
void
__init
acpi_pic_sci_set_trigger
(
unsigned
int
irq
,
u16
trigger
);
#endif
struct
fadt_descriptor
acpi_fadt
;
EXPORT_SYMBOL
(
acpi_fadt
);
struct
acpi_device
*
acpi_root
;
struct
proc_dir_entry
*
acpi_root_dir
;
EXPORT_SYMBOL
(
acpi_root_dir
);
...
...
@@ -582,11 +579,12 @@ static int __init acpi_bus_init_irq(void)
return
0
;
}
acpi_native_uint
acpi_gbl_permanent_mmap
;
void
__init
acpi_early_init
(
void
)
{
acpi_status
status
=
AE_OK
;
struct
acpi_buffer
buffer
=
{
sizeof
(
acpi_fadt
),
&
acpi_fadt
};
if
(
acpi_disabled
)
return
;
...
...
@@ -597,6 +595,15 @@ void __init acpi_early_init(void)
if
(
!
acpi_strict
)
acpi_gbl_enable_interpreter_slack
=
TRUE
;
acpi_gbl_permanent_mmap
=
1
;
status
=
acpi_reallocate_root_table
();
if
(
ACPI_FAILURE
(
status
))
{
printk
(
KERN_ERR
PREFIX
"Unable to reallocate ACPI tables
\n
"
);
goto
error0
;
}
status
=
acpi_initialize_subsystem
();
if
(
ACPI_FAILURE
(
status
))
{
printk
(
KERN_ERR
PREFIX
...
...
@@ -611,14 +618,6 @@ void __init acpi_early_init(void)
goto
error0
;
}
/*
* Get a separate copy of the FADT for use by other drivers.
*/
status
=
acpi_get_table
(
ACPI_TABLE_ID_FADT
,
1
,
&
buffer
);
if
(
ACPI_FAILURE
(
status
))
{
printk
(
KERN_ERR
PREFIX
"Unable to get the FADT
\n
"
);
goto
error0
;
}
#ifdef CONFIG_X86
if
(
!
acpi_ioapic
)
{
extern
acpi_interrupt_flags
acpi_sci_flags
;
...
...
drivers/acpi/ec.c
View file @
ad71860a
...
...
@@ -872,9 +872,7 @@ static int __init acpi_ec_get_real_ecdt(void)
acpi_status
status
;
struct
acpi_table_ecdt
*
ecdt_ptr
;
status
=
acpi_get_firmware_table
(
"ECDT"
,
1
,
ACPI_LOGICAL_ADDRESSING
,
(
struct
acpi_table_header
**
)
&
ecdt_ptr
);
status
=
acpi_get_table
(
"ECDT"
,
1
,
(
struct
acpi_table_header
**
)
&
ecdt_ptr
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
...
...
drivers/acpi/motherboard.c
View file @
ad71860a
...
...
@@ -134,41 +134,41 @@ static void __init acpi_request_region (struct acpi_generic_address *addr,
if
(
!
addr
->
address
||
!
length
)
return
;
if
(
addr
->
address_
space_id
==
ACPI_ADR_SPACE_SYSTEM_IO
)
if
(
addr
->
space_id
==
ACPI_ADR_SPACE_SYSTEM_IO
)
request_region
(
addr
->
address
,
length
,
desc
);
else
if
(
addr
->
address_
space_id
==
ACPI_ADR_SPACE_SYSTEM_MEMORY
)
else
if
(
addr
->
space_id
==
ACPI_ADR_SPACE_SYSTEM_MEMORY
)
request_mem_region
(
addr
->
address
,
length
,
desc
);
}
static
void
__init
acpi_reserve_resources
(
void
)
{
acpi_request_region
(
&
acpi_gbl_FADT
->
xpm1a_evt_bl
k
,
acpi_gbl_FADT
->
pm1_evt_len
,
"ACPI PM1a_EVT_BLK"
);
acpi_request_region
(
&
acpi_gbl_FADT
.
xpm1a_event_bloc
k
,
acpi_gbl_FADT
.
pm1_event_length
,
"ACPI PM1a_EVT_BLK"
);
acpi_request_region
(
&
acpi_gbl_FADT
->
xpm1b_evt_bl
k
,
acpi_gbl_FADT
->
pm1_evt_len
,
"ACPI PM1b_EVT_BLK"
);
acpi_request_region
(
&
acpi_gbl_FADT
.
xpm1b_event_bloc
k
,
acpi_gbl_FADT
.
pm1_event_length
,
"ACPI PM1b_EVT_BLK"
);
acpi_request_region
(
&
acpi_gbl_FADT
->
xpm1a_cnt_bl
k
,
acpi_gbl_FADT
->
pm1_cnt_len
,
"ACPI PM1a_CNT_BLK"
);
acpi_request_region
(
&
acpi_gbl_FADT
.
xpm1a_control_bloc
k
,
acpi_gbl_FADT
.
pm1_control_length
,
"ACPI PM1a_CNT_BLK"
);
acpi_request_region
(
&
acpi_gbl_FADT
->
xpm1b_cnt_bl
k
,
acpi_gbl_FADT
->
pm1_cnt_len
,
"ACPI PM1b_CNT_BLK"
);
acpi_request_region
(
&
acpi_gbl_FADT
.
xpm1b_control_bloc
k
,
acpi_gbl_FADT
.
pm1_control_length
,
"ACPI PM1b_CNT_BLK"
);
if
(
acpi_gbl_FADT
->
pm_tm_len
==
4
)
acpi_request_region
(
&
acpi_gbl_FADT
->
xpm_tmr_bl
k
,
4
,
"ACPI PM_TMR"
);
if
(
acpi_gbl_FADT
.
pm_timer_length
==
4
)
acpi_request_region
(
&
acpi_gbl_FADT
.
xpm_timer_bloc
k
,
4
,
"ACPI PM_TMR"
);
acpi_request_region
(
&
acpi_gbl_FADT
->
xpm2_cnt_bl
k
,
acpi_gbl_FADT
->
pm2_cnt_len
,
"ACPI PM2_CNT_BLK"
);
acpi_request_region
(
&
acpi_gbl_FADT
.
xpm2_control_bloc
k
,
acpi_gbl_FADT
.
pm2_control_length
,
"ACPI PM2_CNT_BLK"
);
/* Length of GPE blocks must be a non-negative multiple of 2 */
if
(
!
(
acpi_gbl_FADT
->
gpe0_blk_len
&
0x1
))
acpi_request_region
(
&
acpi_gbl_FADT
->
xgpe0_bl
k
,
acpi_gbl_FADT
->
gpe0_blk_len
,
"ACPI GPE0_BLK"
);
if
(
!
(
acpi_gbl_FADT
.
gpe0_block_length
&
0x1
))
acpi_request_region
(
&
acpi_gbl_FADT
.
xgpe0_bloc
k
,
acpi_gbl_FADT
.
gpe0_block_length
,
"ACPI GPE0_BLK"
);
if
(
!
(
acpi_gbl_FADT
->
gpe1_blk_len
&
0x1
))
acpi_request_region
(
&
acpi_gbl_FADT
->
xgpe1_bl
k
,
acpi_gbl_FADT
->
gpe1_blk_len
,
"ACPI GPE1_BLK"
);
if
(
!
(
acpi_gbl_FADT
.
gpe1_block_length
&
0x1
))
acpi_request_region
(
&
acpi_gbl_FADT
.
xgpe1_bloc
k
,
acpi_gbl_FADT
.
gpe1_block_length
,
"ACPI GPE1_BLK"
);
}
static
int
__init
acpi_motherboard_init
(
void
)
...
...
drivers/acpi/osl.c
View file @
ad71860a
...
...
@@ -36,6 +36,7 @@
#include <linux/delay.h>
#include <linux/workqueue.h>
#include <linux/nmi.h>
#include <linux/acpi.h>
#include <acpi/acpi.h>
#include <asm/io.h>
#include <acpi/acpi_bus.h>
...
...
@@ -136,53 +137,43 @@ void acpi_os_vprintf(const char *fmt, va_list args)
#endif
}
acpi_
status
acpi_os_get_root_pointer
(
u32
flags
,
struct
acpi_pointer
*
addr
)
acpi_
physical_address
__init
acpi_os_get_root_pointer
(
void
)
{
if
(
efi_enabled
)
{
addr
->
pointer_type
=
ACPI_PHYSICAL_POINTER
;
if
(
efi
.
acpi20
!=
EFI_INVALID_TABLE_ADDR
)
addr
->
pointer
.
physical
=
efi
.
acpi20
;
return
efi
.
acpi20
;
else
if
(
efi
.
acpi
!=
EFI_INVALID_TABLE_ADDR
)
addr
->
pointer
.
physical
=
efi
.
acpi
;
return
efi
.
acpi
;
else
{
printk
(
KERN_ERR
PREFIX
"System description tables not found
\n
"
);
return
AE_NOT_FOUND
;
}
}
else
{
if
(
ACPI_FAILURE
(
acpi_find_root_pointer
(
flags
,
addr
)))
{
printk
(
KERN_ERR
PREFIX
"System description tables not found
\n
"
);
return
AE_NOT_FOUND
;
}
return
0
;
}
return
AE_OK
;
}
else
return
acpi_find_rsdp
()
;
}
acpi_status
acpi_os_map_memory
(
acpi_physical_address
phys
,
acpi_size
size
,
void
__iomem
**
virt
)
void
__iomem
*
acpi_os_map_memory
(
acpi_physical_address
phys
,
acpi_size
size
)
{
if
(
phys
>
ULONG_MAX
)
{
printk
(
KERN_ERR
PREFIX
"Cannot map memory that high
\n
"
);
return
AE_BAD_PARAMETER
;
return
0
;
}
if
(
acpi_gbl_permanent_mmap
)
/*
* ioremap checks to ensure this is in reserved space
*/
*
virt
=
ioremap
((
unsigned
long
)
phys
,
size
);
if
(
!*
virt
)
return
AE_NO_MEMORY
;
return
AE_OK
;
return
ioremap
((
unsigned
long
)
phys
,
size
);
else
return
__acpi_map_table
((
unsigned
long
)
phys
,
size
);
}
EXPORT_SYMBOL_GPL
(
acpi_os_map_memory
);
void
acpi_os_unmap_memory
(
void
__iomem
*
virt
,
acpi_size
size
)
{
if
(
acpi_gbl_permanent_mmap
)
{
iounmap
(
virt
);
}
}
EXPORT_SYMBOL_GPL
(
acpi_os_unmap_memory
);
...
...
drivers/acpi/processor_core.c
View file @
ad71860a
...
...
@@ -431,7 +431,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
* Check to see if we have bus mastering arbitration control. This
* is required for proper C3 usage (to maintain cache coherency).
*/
if
(
acpi_fadt
.
V1_pm2_cnt_blk
&&
acpi_fadt
.
pm2_cnt_len
)
{
if
(
acpi_fadt
.
pm2_control_block
&&
acpi_fadt
.
pm2_control_length
)
{
pr
->
flags
.
bm_control
=
1
;
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Bus mastering arbitration control present
\n
"
));
...
...
drivers/acpi/processor_idle.c
View file @
ad71860a
...
...
@@ -160,7 +160,7 @@ static inline u32 ticks_elapsed(u32 t1, u32 t2)
{
if
(
t2
>=
t1
)
return
(
t2
-
t1
);
else
if
(
!
acpi_fadt
.
tmr_val_ext
)
else
if
(
!
(
acpi_fadt
.
flags
&
ACPI_FADT_32BIT_TIMER
)
)
return
(((
0x00FFFFFF
-
t1
)
+
t2
)
&
0x00FFFFFF
);
else
return
((
0xFFFFFFFF
-
t1
)
+
t2
);
...
...
@@ -236,7 +236,7 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
/* Dummy wait op - must do something useless after P_LVL2 read
because chipsets cannot guarantee that STPCLK# signal
gets asserted in time to freeze execution properly. */
unused
=
inl
(
acpi_fadt
.
xpm_t
mr_bl
k
.
address
);
unused
=
inl
(
acpi_fadt
.
xpm_t
imer_bloc
k
.
address
);
}
}
...
...
@@ -338,7 +338,7 @@ static void acpi_processor_idle(void)
* detection phase, to work cleanly with logical CPU hotplug.
*/
if
((
cx
->
type
!=
ACPI_STATE_C1
)
&&
(
num_online_cpus
()
>
1
)
&&
!
pr
->
flags
.
has_cst
&&
!
acpi_fadt
.
plvl2_up
)
!
pr
->
flags
.
has_cst
&&
!
(
acpi_fadt
.
flags
&
ACPI_FADT_C2_MP_SUPPORTED
)
)
cx
=
&
pr
->
power
.
states
[
ACPI_STATE_C1
];
#endif
...
...
@@ -384,11 +384,11 @@ static void acpi_processor_idle(void)
case
ACPI_STATE_C2
:
/* Get start time (ticks) */
t1
=
inl
(
acpi_fadt
.
xpm_t
mr_bl
k
.
address
);
t1
=
inl
(
acpi_fadt
.
xpm_t
imer_bloc
k
.
address
);
/* Invoke C2 */
acpi_cstate_enter
(
cx
);
/* Get end time (ticks) */
t2
=
inl
(
acpi_fadt
.
xpm_t
mr_bl
k
.
address
);
t2
=
inl
(
acpi_fadt
.
xpm_t
imer_bloc
k
.
address
);
#ifdef CONFIG_GENERIC_TIME
/* TSC halts in C2, so notify users */
...
...
@@ -420,11 +420,11 @@ static void acpi_processor_idle(void)
}
/* Get start time (ticks) */
t1
=
inl
(
acpi_fadt
.
xpm_t
mr_bl
k
.
address
);
t1
=
inl
(
acpi_fadt
.
xpm_t
imer_bloc
k
.
address
);
/* Invoke C3 */
acpi_cstate_enter
(
cx
);
/* Get end time (ticks) */
t2
=
inl
(
acpi_fadt
.
xpm_t
mr_bl
k
.
address
);
t2
=
inl
(
acpi_fadt
.
xpm_t
imer_bloc
k
.
address
);
if
(
pr
->
flags
.
bm_check
)
{
/* Enable bus master arbitration */
atomic_dec
(
&
c3_cpu_count
);
...
...
@@ -457,7 +457,7 @@ static void acpi_processor_idle(void)
#ifdef CONFIG_HOTPLUG_CPU
/* Don't do promotion/demotion */
if
((
cx
->
type
==
ACPI_STATE_C1
)
&&
(
num_online_cpus
()
>
1
)
&&
!
pr
->
flags
.
has_cst
&&
!
acpi_fadt
.
plvl2_up
)
{
!
pr
->
flags
.
has_cst
&&
!
(
acpi_fadt
.
flags
&
ACPI_FADT_C2_MP_SUPPORTED
)
)
{
next_state
=
cx
;
goto
end
;
}
...
...
@@ -627,7 +627,8 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
* Check for P_LVL2_UP flag before entering C2 and above on
* an SMP system.
*/
if
((
num_online_cpus
()
>
1
)
&&
!
acpi_fadt
.
plvl2_up
)
if
((
num_online_cpus
()
>
1
)
&&
!
(
acpi_fadt
.
flags
&
ACPI_FADT_C2_MP_SUPPORTED
))
return
-
ENODEV
;
#endif
...
...
@@ -636,8 +637,8 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
pr
->
power
.
states
[
ACPI_STATE_C3
].
address
=
pr
->
pblk
+
5
;
/* determine latencies from FADT */
pr
->
power
.
states
[
ACPI_STATE_C2
].
latency
=
acpi_fadt
.
plvl2_lat
;
pr
->
power
.
states
[
ACPI_STATE_C3
].
latency
=
acpi_fadt
.
plvl3_lat
;
pr
->
power
.
states
[
ACPI_STATE_C2
].
latency
=
acpi_fadt
.
C2latency
;
pr
->
power
.
states
[
ACPI_STATE_C3
].
latency
=
acpi_fadt
.
C3latency
;
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"lvl2[0x%08x] lvl3[0x%08x]
\n
"
,
...
...
@@ -883,7 +884,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
* WBINVD should be set in fadt, for C3 state to be
* supported on when bm_check is not required.
*/
if
(
acpi_fadt
.
wb_invd
!=
1
)
{
if
(
!
(
acpi_fadt
.
flags
&
ACPI_FADT_WBINVD
)
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Cache invalidation should work properly"
" for C3 to be enabled on SMP systems
\n
"
));
...
...
@@ -1164,9 +1165,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
if
(
!
pr
)
return
-
EINVAL
;
if
(
acpi_fadt
.
cst_c
nt
&&
!
nocst
)
{
if
(
acpi_fadt
.
cst_c
ontrol
&&
!
nocst
)
{
status
=
acpi_os_write_port
(
acpi_fadt
.
smi_c
md
,
acpi_fadt
.
cst_cnt
,
8
);
acpi_os_write_port
(
acpi_fadt
.
smi_c
ommand
,
acpi_fadt
.
cst_control
,
8
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Notifying BIOS of _CST ability failed"
));
...
...
drivers/acpi/processor_perflib.c
View file @
ad71860a
...
...
@@ -352,31 +352,24 @@ int acpi_processor_notify_smm(struct module *calling_module)
is_done
=
-
EIO
;
/* Can't write pstate_c
nt to smi_cm
d if either value is zero */
if
((
!
acpi_fadt
.
smi_c
md
)
||
(
!
acpi_fadt
.
pstate_cnt
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"No SMI port or pstate_c
nt
\n
"
));
/* Can't write pstate_c
ontrol to smi_comman
d if either value is zero */
if
((
!
acpi_fadt
.
smi_c
ommand
)
||
(
!
acpi_fadt
.
pstate_control
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"No SMI port or pstate_c
ontrol
\n
"
));
module_put
(
calling_module
);
return
0
;
}
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Writing pstate_c
nt [0x%x] to smi_cm
d [0x%x]
\n
"
,
acpi_fadt
.
pstate_c
nt
,
acpi_fadt
.
smi_cm
d
));
"Writing pstate_c
ontrol [0x%x] to smi_comman
d [0x%x]
\n
"
,
acpi_fadt
.
pstate_c
ontrol
,
acpi_fadt
.
smi_comman
d
));
/* FADT v1 doesn't support pstate_cnt, many BIOS vendors use
* it anyway, so we need to support it... */
if
(
acpi_fadt_is_v1
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Using v1.0 FADT reserved value for pstate_cnt
\n
"
));
}
status
=
acpi_os_write_port
(
acpi_fadt
.
smi_cmd
,
(
u32
)
acpi_fadt
.
pstate_cnt
,
8
);
status
=
acpi_os_write_port
(
acpi_fadt
.
smi_command
,
(
u32
)
acpi_fadt
.
pstate_control
,
8
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Failed to write pstate_c
nt
[0x%x] to "
"smi_c
md [0x%x]"
,
acpi_fadt
.
pstate_cnt
,
acpi_fadt
.
smi_c
m
d
));
"Failed to write pstate_c
ontrol
[0x%x] to "
"smi_c
ommand [0x%x]"
,
acpi_fadt
.
pstate_control
,
acpi_fadt
.
smi_c
omman
d
));
module_put
(
calling_module
);
return
status
;
}
...
...
drivers/acpi/scan.c
View file @
ad71860a
...
...
@@ -1333,7 +1333,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
/*
* Enumerate all fixed-feature devices.
*/
if
(
acpi_fadt
.
pwr_button
==
0
)
{
if
(
(
acpi_fadt
.
flags
&
ACPI_FADT_POWER_BUTTON
)
==
0
)
{
result
=
acpi_add_single_object
(
&
device
,
acpi_root
,
NULL
,
ACPI_BUS_TYPE_POWER_BUTTON
);
...
...
@@ -1341,7 +1341,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
result
=
acpi_start_single_object
(
device
);
}
if
(
acpi_fadt
.
sleep_button
==
0
)
{
if
(
(
acpi_fadt
.
flags
&
ACPI_FADT_SLEEP_BUTTON
)
==
0
)
{
result
=
acpi_add_single_object
(
&
device
,
acpi_root
,
NULL
,
ACPI_BUS_TYPE_SLEEP_BUTTON
);
...
...
drivers/acpi/sleep/proc.c
View file @
ad71860a
...
...
@@ -73,7 +73,7 @@ acpi_system_write_sleep(struct file *file,
static
int
acpi_system_alarm_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
u32
sec
,
min
,
hr
;
u32
day
,
mo
,
yr
;
u32
day
,
mo
,
yr
,
cent
=
0
;
unsigned
char
rtc_control
=
0
;
unsigned
long
flags
;
...
...
@@ -87,19 +87,18 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
rtc_control
=
CMOS_READ
(
RTC_CONTROL
);
/* If we ever get an FACP with proper values... */
if
(
acpi_gbl_FADT
->
day_al
rm
)
if
(
acpi_gbl_FADT
.
day_ala
rm
)
/* ACPI spec: only low 6 its should be cared */
day
=
CMOS_READ
(
acpi_gbl_FADT
->
day_al
rm
)
&
0x3F
;
day
=
CMOS_READ
(
acpi_gbl_FADT
.
day_ala
rm
)
&
0x3F
;
else
day
=
CMOS_READ
(
RTC_DAY_OF_MONTH
);
if
(
acpi_gbl_FADT
->
mon_al
rm
)
mo
=
CMOS_READ
(
acpi_gbl_FADT
->
mon_al
rm
);
if
(
acpi_gbl_FADT
.
month_ala
rm
)
mo
=
CMOS_READ
(
acpi_gbl_FADT
.
month_ala
rm
);
else
mo
=
CMOS_READ
(
RTC_MONTH
);
if
(
acpi_gbl_FADT
->
century
)
yr
=
CMOS_READ
(
acpi_gbl_FADT
->
century
)
*
100
+
CMOS_READ
(
RTC_YEAR
);
else
if
(
acpi_gbl_FADT
.
century
)
cent
=
CMOS_READ
(
acpi_gbl_FADT
.
century
);
yr
=
CMOS_READ
(
RTC_YEAR
);
spin_unlock_irqrestore
(
&
rtc_lock
,
flags
);
...
...
@@ -111,10 +110,11 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
BCD_TO_BIN
(
day
);
BCD_TO_BIN
(
mo
);
BCD_TO_BIN
(
yr
);
BCD_TO_BIN
(
cent
);
}
/* we're trusting the FADT (see above) */
if
(
!
acpi_gbl_FADT
->
century
)
if
(
!
acpi_gbl_FADT
.
century
)
/* If we're not trusting the FADT, we should at least make it
* right for _this_ century... ehm, what is _this_ century?
*
...
...
@@ -134,6 +134,8 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
*
*/
yr
+=
2000
;
else
yr
+=
cent
*
100
;
seq_printf
(
seq
,
"%4.4u-"
,
yr
);
(
mo
>
12
)
?
seq_puts
(
seq
,
"**-"
)
:
seq_printf
(
seq
,
"%2.2u-"
,
mo
);
...
...
@@ -317,12 +319,12 @@ acpi_system_write_alarm(struct file *file,
* offsets into the CMOS RAM here -- which for some reason are pointing
* to the RTC area of memory.
*/
if
(
acpi_gbl_FADT
->
day_al
rm
)
CMOS_WRITE
(
day
,
acpi_gbl_FADT
->
day_al
rm
);
if
(
acpi_gbl_FADT
->
mon_al
rm
)
CMOS_WRITE
(
mo
,
acpi_gbl_FADT
->
mon_al
rm
);
if
(
acpi_gbl_FADT
->
century
)
CMOS_WRITE
(
yr
/
100
,
acpi_gbl_FADT
->
century
);
if
(
acpi_gbl_FADT
.
day_ala
rm
)
CMOS_WRITE
(
day
,
acpi_gbl_FADT
.
day_ala
rm
);
if
(
acpi_gbl_FADT
.
month_ala
rm
)
CMOS_WRITE
(
mo
,
acpi_gbl_FADT
.
month_ala
rm
);
if
(
acpi_gbl_FADT
.
century
)
CMOS_WRITE
(
yr
/
100
,
acpi_gbl_FADT
.
century
);
/* enable the rtc alarm interrupt */
rtc_control
|=
RTC_AIE
;
CMOS_WRITE
(
rtc_control
,
RTC_CONTROL
);
...
...
drivers/acpi/system.c
View file @
ad71860a
...
...
@@ -39,7 +39,6 @@ ACPI_MODULE_NAME("acpi_system")
#define ACPI_SYSTEM_FILE_EVENT "event"
#define ACPI_SYSTEM_FILE_DSDT "dsdt"
#define ACPI_SYSTEM_FILE_FADT "fadt"
extern
struct
fadt_descriptor
acpi_fadt
;
/* --------------------------------------------------------------------------
FS Interface (/proc)
...
...
@@ -76,17 +75,16 @@ acpi_system_read_dsdt(struct file *file,
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
{
acpi_status
status
=
AE_OK
;
struct
acpi_
buffer
dsdt
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
}
;
struct
acpi_
table_header
*
dsdt
=
NULL
;
ssize_t
res
;
status
=
acpi_get_table
(
ACPI_
TABLE_ID
_DSDT
,
1
,
&
dsdt
);
status
=
acpi_get_table
(
ACPI_
SIG
_DSDT
,
1
,
&
dsdt
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
res
=
simple_read_from_buffer
(
buffer
,
count
,
ppos
,
dsdt
.
pointer
,
dsdt
.
length
);
kfree
(
dsdt
.
pointer
);
dsdt
,
dsdt
->
length
);
return
res
;
}
...
...
@@ -103,17 +101,16 @@ acpi_system_read_fadt(struct file *file,
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
{
acpi_status
status
=
AE_OK
;
struct
acpi_
buffer
fadt
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
}
;
struct
acpi_
table_header
*
fadt
=
NULL
;
ssize_t
res
;
status
=
acpi_get_table
(
ACPI_
TABLE_ID
_FADT
,
1
,
&
fadt
);
status
=
acpi_get_table
(
ACPI_
SIG
_FADT
,
1
,
&
fadt
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
res
=
simple_read_from_buffer
(
buffer
,
count
,
ppos
,
fadt
.
pointer
,
fadt
.
length
);
kfree
(
fadt
.
pointer
);
fadt
,
fadt
->
length
);
return
res
;
}
...
...
drivers/acpi/tables.c
View file @
ad71860a
...
...
@@ -74,6 +74,7 @@ static unsigned long sdt_pa; /* Physical Address */
static
unsigned
long
sdt_count
;
/* Table count */
static
struct
acpi_table_sdt
sdt_entry
[
ACPI_MAX_TABLES
]
__initdata
;
static
struct
acpi_table_desc
initial_tables
[
ACPI_MAX_TABLES
]
__initdata
;
void
acpi_table_print
(
struct
acpi_table_header
*
header
,
unsigned
long
phys_addr
)
{
...
...
@@ -284,12 +285,12 @@ acpi_get_table_header_early(enum acpi_table_id id,
struct
fadt_descriptor
*
fadt
=
(
struct
fadt_descriptor
*
)
*
header
;
if
(
fadt
->
revision
==
3
&&
fadt
->
Xdsdt
)
{
if
(
fadt
->
header
.
revision
==
3
&&
fadt
->
Xdsdt
)
{
*
header
=
(
void
*
)
__acpi_map_table
(
fadt
->
Xdsdt
,
sizeof
(
struct
acpi_table_header
));
}
else
if
(
fadt
->
V1_
dsdt
)
{
*
header
=
(
void
*
)
__acpi_map_table
(
fadt
->
V1_
dsdt
,
}
else
if
(
fadt
->
dsdt
)
{
*
header
=
(
void
*
)
__acpi_map_table
(
fadt
->
dsdt
,
sizeof
(
struct
acpi_table_header
));
}
else
...
...
@@ -410,12 +411,11 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp)
/* First check XSDT (but only on ACPI 2.0-compatible systems) */
if
((
rsdp
->
revision
>=
2
)
&&
(((
struct
acpi20_table_rsdp
*
)
rsdp
)
->
xsdt_address
))
{
if
((
rsdp
->
revision
>=
2
)
&&
rsdp
->
xsdt_physical_address
)
{
struct
acpi_table_xsdt
*
mapped_xsdt
=
NULL
;
sdt_pa
=
((
struct
acpi20_table_rsdp
*
)
rsdp
)
->
xsdt
_address
;
sdt_pa
=
rsdp
->
xsdt_physical
_address
;
/* map in just the header */
header
=
(
struct
acpi_table_header
*
)
...
...
@@ -457,16 +457,16 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp)
}
for
(
i
=
0
;
i
<
sdt_count
;
i
++
)
sdt_entry
[
i
].
pa
=
(
unsigned
long
)
mapped_xsdt
->
entry
[
i
];
sdt_entry
[
i
].
pa
=
(
unsigned
long
)
mapped_xsdt
->
table_offset_
entry
[
i
];
}
/* Then check RSDT */
else
if
(
rsdp
->
rsdt_address
)
{
else
if
(
rsdp
->
rsdt_
physical_
address
)
{
struct
acpi_table_rsdt
*
mapped_rsdt
=
NULL
;
sdt_pa
=
rsdp
->
rsdt_address
;
sdt_pa
=
rsdp
->
rsdt_
physical_
address
;
/* map in just the header */
header
=
(
struct
acpi_table_header
*
)
...
...
@@ -507,7 +507,7 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp)
}
for
(
i
=
0
;
i
<
sdt_count
;
i
++
)
sdt_entry
[
i
].
pa
=
(
unsigned
long
)
mapped_rsdt
->
entry
[
i
];
sdt_entry
[
i
].
pa
=
(
unsigned
long
)
mapped_rsdt
->
table_offset_
entry
[
i
];
}
else
{
...
...
@@ -599,13 +599,10 @@ int __init acpi_table_init(void)
if
(
rsdp
->
revision
<
2
)
result
=
acpi_table_compute_checksum
(
rsdp
,
sizeof
(
struct
acpi_table_rsdp
));
acpi_table_compute_checksum
(
rsdp
,
ACPI_RSDP_REV0_SIZE
);
else
result
=
acpi_table_compute_checksum
(
rsdp
,
((
struct
acpi20_table_rsdp
*
)
rsdp
)
->
length
);
acpi_table_compute_checksum
(
rsdp
,
rsdp
->
length
);
if
(
result
)
{
printk
(
KERN_WARNING
" >>> ERROR: Invalid checksum
\n
"
);
...
...
@@ -617,5 +614,7 @@ int __init acpi_table_init(void)
if
(
acpi_table_get_sdt
(
rsdp
))
return
-
ENODEV
;
acpi_initialize_tables
(
initial_tables
,
ACPI_MAX_TABLES
,
0
);
return
0
;
}
drivers/acpi/tables/Makefile
View file @
ad71860a
...
...
@@ -2,7 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
obj-y
:=
tbconvrt.o tbget.o tbrsdt.o tbxface.o
\
tbgetall.o tbinstal.o tbutils.o tbxfroot.o
obj-y
:=
tbxface.o tbinstal.o tbutils.o tbfind.o
EXTRA_CFLAGS
+=
$(ACPI_CFLAGS)
drivers/acpi/tables/tbutils.c
View file @
ad71860a
...
...
@@ -545,7 +545,7 @@ acpi_tb_get_root_table_entry(u8 * table_entry,
*
******************************************************************************/
acpi_status
acpi_status
__init
acpi_tb_parse_root_table
(
acpi_physical_address
rsdp_address
,
u8
flags
)
{
struct
acpi_table_rsdp
*
rsdp
;
...
...
drivers/acpi/tables/tbxface.c
View file @
ad71860a
...
...
@@ -78,7 +78,7 @@ static acpi_status acpi_tb_load_namespace(void);
*
******************************************************************************/
acpi_status
acpi_status
__init
acpi_initialize_tables
(
struct
acpi_table_desc
*
initial_table_array
,
u32
initial_table_count
,
u8
allow_resize
)
{
...
...
@@ -132,8 +132,6 @@ acpi_initialize_tables(struct acpi_table_desc *initial_table_array,
return_ACPI_STATUS
(
status
);
}
ACPI_EXPORT_SYMBOL
(
acpi_initialize_tables
)
/*******************************************************************************
*
* FUNCTION: acpi_reallocate_root_table
...
...
@@ -365,6 +363,10 @@ acpi_get_table(char *signature,
*
out_table
=
acpi_gbl_root_table_list
.
tables
[
i
].
pointer
;
}
if
(
!
acpi_gbl_permanent_mmap
)
{
acpi_gbl_root_table_list
.
tables
[
i
].
pointer
=
0
;
}
return
(
status
);
}
...
...
include/acpi/acglobal.h
View file @
ad71860a
...
...
@@ -147,6 +147,8 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);
*/
ACPI_EXTERN
struct
acpi_internal_rsdt
acpi_gbl_root_table_list
;
ACPI_EXTERN
struct
acpi_table_fadt
acpi_gbl_FADT
;
#define acpi_fadt acpi_gbl_FADT
extern
acpi_native_uint
acpi_gbl_permanent_mmap
;
/*
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
...
...
include/acpi/acpi_bus.h
View file @
ad71860a
...
...
@@ -59,7 +59,6 @@ acpi_evaluate_reference(acpi_handle handle,
#define ACPI_BUS_FILE_ROOT "acpi"
extern
struct
proc_dir_entry
*
acpi_root_dir
;
extern
struct
fadt_descriptor
acpi_fadt
;
enum
acpi_bus_removal_type
{
ACPI_BUS_REMOVAL_NORMAL
=
0
,
...
...
include/acpi/actbl.h
View file @
ad71860a
...
...
@@ -236,6 +236,9 @@ struct acpi_table_fadt {
struct
acpi_generic_address
xgpe1_block
;
/* 64-bit Extended General Purpose Event 1 Reg Blk address */
};
#define fadt_descriptor acpi_table_fadt
#define sci_int sci_interrupt
/* FADT flags */
#define ACPI_FADT_WBINVD (1)
/* 00: The wbinvd instruction works properly */
...
...
@@ -289,6 +292,8 @@ enum acpi_prefered_pm_profiles {
/*
* Get the remaining ACPI tables
*/
/*
Don't include any new tables definitions for now.
#include <acpi/actbl1.h>
*/
#endif
/* __ACTBL_H__ */
include/acpi/actbl2.h
deleted
100644 → 0
View file @
a4bbb810
/******************************************************************************
*
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __ACTBL2_H__
#define __ACTBL2_H__
/* Code moved to both actbl.h and actbl1.h */
#endif
/* __ACTBL2_H__ */
include/acpi/actbl71.h
deleted
100644 → 0
View file @
a4bbb810
/******************************************************************************
*
* Name: actbl71.h - IA-64 Extensions to the ACPI Spec Rev. 0.71
* This file includes tables specific to this
* specification revision.
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __ACTBL71_H__
#define __ACTBL71_H__
/* 0.71 FADT address_space data item bitmasks defines */
/* If the associated bit is zero then it is in memory space else in io space */
#define SMI_CMD_ADDRESS_SPACE 0x01
#define PM1_BLK_ADDRESS_SPACE 0x02
#define PM2_CNT_BLK_ADDRESS_SPACE 0x04
#define PM_TMR_BLK_ADDRESS_SPACE 0x08
#define GPE0_BLK_ADDRESS_SPACE 0x10
#define GPE1_BLK_ADDRESS_SPACE 0x20
/* Only for clarity in declarations */
typedef
u64
IO_ADDRESS
;
#pragma pack(1)
struct
{
/* Root System Descriptor Pointer */
NATIVE_CHAR
signature
[
8
];
/* contains "RSD PTR " */
u8
checksum
;
/* to make sum of struct == 0 */
NATIVE_CHAR
oem_id
[
6
];
/* OEM identification */
u8
reserved
;
/* Must be 0 for 1.0, 2 for 2.0 */
u64
rsdt_physical_address
;
/* 64-bit physical address of RSDT */
};
/*****************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Root System Description Table */
/*****************************************/
struct
{
struct
acpi_table_header
header
;
/* Table header */
u32
reserved_pad
;
/* IA64 alignment, must be 0 */
u64
table_offset_entry
[
1
];
/* Array of pointers to other */
/* tables' headers */
};
/*******************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Firmware ACPI Control Structure */
/*******************************************/
struct
{
NATIVE_CHAR
signature
[
4
];
/* signature "FACS" */
u32
length
;
/* length of structure, in bytes */
u32
hardware_signature
;
/* hardware configuration signature */
u32
reserved4
;
/* must be 0 */
u64
firmware_waking_vector
;
/* ACPI OS waking vector */
u64
global_lock
;
/* Global Lock */
u32
S4bios_f
:
1
;
/* Indicates if S4BIOS support is present */
u32
reserved1
:
31
;
/* must be 0 */
u8
reserved3
[
28
];
/* reserved - must be zero */
};
/******************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Fixed ACPI Description Table */
/******************************************/
struct
{
struct
acpi_table_header
header
;
/* table header */
u32
reserved_pad
;
/* IA64 alignment, must be 0 */
u64
firmware_ctrl
;
/* 64-bit Physical address of FACS */
u64
dsdt
;
/* 64-bit Physical address of DSDT */
u8
model
;
/* System Interrupt Model */
u8
address_space
;
/* Address Space Bitmask */
u16
sci_int
;
/* System vector of SCI interrupt */
u8
acpi_enable
;
/* value to write to smi_cmd to enable ACPI */
u8
acpi_disable
;
/* value to write to smi_cmd to disable ACPI */
u8
S4bios_req
;
/* Value to write to SMI CMD to enter S4BIOS state */
u8
reserved2
;
/* reserved - must be zero */
u64
smi_cmd
;
/* Port address of SMI command port */
u64
pm1a_evt_blk
;
/* Port address of Power Mgt 1a acpi_event Reg Blk */
u64
pm1b_evt_blk
;
/* Port address of Power Mgt 1b acpi_event Reg Blk */
u64
pm1a_cnt_blk
;
/* Port address of Power Mgt 1a Control Reg Blk */
u64
pm1b_cnt_blk
;
/* Port address of Power Mgt 1b Control Reg Blk */
u64
pm2_cnt_blk
;
/* Port address of Power Mgt 2 Control Reg Blk */
u64
pm_tmr_blk
;
/* Port address of Power Mgt Timer Ctrl Reg Blk */
u64
gpe0_blk
;
/* Port addr of General Purpose acpi_event 0 Reg Blk */
u64
gpe1_blk
;
/* Port addr of General Purpose acpi_event 1 Reg Blk */
u8
pm1_evt_len
;
/* Byte length of ports at pm1_x_evt_blk */
u8
pm1_cnt_len
;
/* Byte length of ports at pm1_x_cnt_blk */
u8
pm2_cnt_len
;
/* Byte Length of ports at pm2_cnt_blk */
u8
pm_tm_len
;
/* Byte Length of ports at pm_tm_blk */
u8
gpe0_blk_len
;
/* Byte Length of ports at gpe0_blk */
u8
gpe1_blk_len
;
/* Byte Length of ports at gpe1_blk */
u8
gpe1_base
;
/* offset in gpe model where gpe1 events start */
u8
reserved3
;
/* reserved */
u16
plvl2_lat
;
/* worst case HW latency to enter/exit C2 state */
u16
plvl3_lat
;
/* worst case HW latency to enter/exit C3 state */
u8
day_alrm
;
/* index to day-of-month alarm in RTC CMOS RAM */
u8
mon_alrm
;
/* index to month-of-year alarm in RTC CMOS RAM */
u8
century
;
/* index to century in RTC CMOS RAM */
u8
reserved4
;
/* reserved */
u32
flush_cash
:
1
;
/* PAL_FLUSH_CACHE is correctly supported */
u32
reserved5
:
1
;
/* reserved - must be zero */
u32
proc_c1
:
1
;
/* all processors support C1 state */
u32
plvl2_up
:
1
;
/* C2 state works on MP system */
u32
pwr_button
:
1
;
/* Power button is handled as a generic feature */
u32
sleep_button
:
1
;
/* Sleep button is handled as a generic feature, or not present */
u32
fixed_rTC
:
1
;
/* RTC wakeup stat not in fixed register space */
u32
rtcs4
:
1
;
/* RTC wakeup stat not possible from S4 */
u32
tmr_val_ext
:
1
;
/* tmr_val is 32 bits */
u32
dock_cap
:
1
;
/* Supports Docking */
u32
reserved6
:
22
;
/* reserved - must be zero */
};
#pragma pack()
#endif
/* __ACTBL71_H__ */
include/asm-i386/acpi.h
View file @
ad71860a
...
...
@@ -59,11 +59,11 @@
int
__acpi_acquire_global_lock
(
unsigned
int
*
lock
);
int
__acpi_release_global_lock
(
unsigned
int
*
lock
);
#define ACPI_ACQUIRE_GLOBAL_LOCK(
GLptr
, Acq) \
((Acq) = __acpi_acquire_global_lock(
(unsigned int *) GLptr
))
#define ACPI_ACQUIRE_GLOBAL_LOCK(
facs
, Acq) \
((Acq) = __acpi_acquire_global_lock(
&facs->global_lock
))
#define ACPI_RELEASE_GLOBAL_LOCK(
GLptr
, Acq) \
((Acq) = __acpi_release_global_lock(
(unsigned int *) GLptr
))
#define ACPI_RELEASE_GLOBAL_LOCK(
facs
, Acq) \
((Acq) = __acpi_release_global_lock(
&facs->global_lock
))
/*
* Math helper asm macros
...
...
include/asm-ia64/acpi.h
View file @
ad71860a
...
...
@@ -82,11 +82,11 @@ ia64_acpi_release_global_lock (unsigned int *lock)
return
old
&
0x1
;
}
#define ACPI_ACQUIRE_GLOBAL_LOCK(
GLptr
, Acq) \
((Acq) = ia64_acpi_acquire_global_lock(
(unsigned int *) GLptr
))
#define ACPI_ACQUIRE_GLOBAL_LOCK(
facs
, Acq) \
((Acq) = ia64_acpi_acquire_global_lock(
&facs->global_lock
))
#define ACPI_RELEASE_GLOBAL_LOCK(
GLptr
, Acq) \
((Acq) = ia64_acpi_release_global_lock(
(unsigned int *) GLptr
))
#define ACPI_RELEASE_GLOBAL_LOCK(
facs
, Acq) \
((Acq) = ia64_acpi_release_global_lock(
&facs->global_lock
))
#define acpi_disabled 0
/* ACPI always enabled on IA64 */
#define acpi_noirq 0
/* ACPI always enabled on IA64 */
...
...
include/asm-ia64/sn/acpi.h
deleted
100644 → 0
View file @
a4bbb810
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2006 Silicon Graphics, Inc. All rights reserved.
*/
#ifndef _ASM_IA64_SN_ACPI_H
#define _ASM_IA64_SN_ACPI_H
#include "acpi/acglobal.h"
#define SN_ACPI_BASE_SUPPORT() (acpi_gbl_DSDT->oem_revision >= 0x20101)
#endif
/* _ASM_IA64_SN_ACPI_H */
include/asm-x86_64/acpi.h
View file @
ad71860a
...
...
@@ -57,11 +57,11 @@
int
__acpi_acquire_global_lock
(
unsigned
int
*
lock
);
int
__acpi_release_global_lock
(
unsigned
int
*
lock
);
#define ACPI_ACQUIRE_GLOBAL_LOCK(
GLptr
, Acq) \
((Acq) = __acpi_acquire_global_lock(
(unsigned int *) GLptr
))
#define ACPI_ACQUIRE_GLOBAL_LOCK(
facs
, Acq) \
((Acq) = __acpi_acquire_global_lock(
&facs->global_lock
))
#define ACPI_RELEASE_GLOBAL_LOCK(
GLptr
, Acq) \
((Acq) = __acpi_release_global_lock(
(unsigned int *) GLptr
))
#define ACPI_RELEASE_GLOBAL_LOCK(
facs
, Acq) \
((Acq) = __acpi_release_global_lock(
&facs->global_lock
))
/*
* Math helper asm macros
...
...
include/linux/acpi.h
View file @
ad71860a
...
...
@@ -53,57 +53,11 @@ enum acpi_irq_model_id {
extern
enum
acpi_irq_model_id
acpi_irq_model
;
/* Root System Description Pointer (RSDP) */
struct
acpi_table_rsdp
{
char
signature
[
8
];
u8
checksum
;
char
oem_id
[
6
];
u8
revision
;
u32
rsdt_address
;
}
__attribute__
((
packed
));
struct
acpi20_table_rsdp
{
char
signature
[
8
];
u8
checksum
;
char
oem_id
[
6
];
u8
revision
;
u32
rsdt_address
;
u32
length
;
u64
xsdt_address
;
u8
ext_checksum
;
u8
reserved
[
3
];
}
__attribute__
((
packed
));
typedef
struct
{
u8
type
;
u8
length
;
}
__attribute__
((
packed
))
acpi_table_entry_header
;
/* Root System Description Table (RSDT) */
struct
acpi_table_rsdt
{
struct
acpi_table_header
header
;
u32
entry
[
8
];
}
__attribute__
((
packed
));
/* Extended System Description Table (XSDT) */
struct
acpi_table_xsdt
{
struct
acpi_table_header
header
;
u64
entry
[
1
];
}
__attribute__
((
packed
));
/* Fixed ACPI Description Table (FADT) */
struct
acpi_table_fadt
{
struct
acpi_table_header
header
;
u32
facs_addr
;
u32
dsdt_addr
;
/* ... */
}
__attribute__
((
packed
));
/* Multiple APIC Description Table (MADT) */
struct
acpi_table_madt
{
...
...
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