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
8e0088b5
Commit
8e0088b5
authored
Mar 12, 2004
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge intel.com:/home/lenb/bk/linux-2.6.5
into intel.com:/home/lenb/src/linux-acpi-test-2.6.5
parents
a8b828f4
a3b4dc3c
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
51 deletions
+62
-51
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/acpi/boot.c
+10
-14
arch/i386/kernel/bootflag.c
arch/i386/kernel/bootflag.c
+1
-1
drivers/acpi/hardware/hwsleep.c
drivers/acpi/hardware/hwsleep.c
+1
-1
drivers/acpi/power.c
drivers/acpi/power.c
+12
-0
drivers/acpi/tables.c
drivers/acpi/tables.c
+6
-1
include/acpi/acpixf.h
include/acpi/acpixf.h
+1
-1
include/asm-i386/acpi.h
include/asm-i386/acpi.h
+29
-24
include/asm-x86_64/acpi.h
include/asm-x86_64/acpi.h
+2
-2
include/asm-x86_64/system.h
include/asm-x86_64/system.h
+0
-7
No files found.
arch/i386/kernel/acpi/boot.c
View file @
8e0088b5
...
@@ -128,7 +128,9 @@ static int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
...
@@ -128,7 +128,9 @@ static int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
return
0
;
return
0
;
}
}
#endif
/* CONFIG_PCI_MMCONFIG */
#else
#define acpi_parse_mcfg NULL
#endif
/* !CONFIG_PCI_MMCONFIG */
#ifdef CONFIG_X86_LOCAL_APIC
#ifdef CONFIG_X86_LOCAL_APIC
static
int
__init
static
int
__init
...
@@ -424,6 +426,8 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
...
@@ -424,6 +426,8 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
hpet_address
);
hpet_address
);
return
0
;
return
0
;
}
}
#else
#define acpi_parse_hpet NULL
#endif
#endif
/* detect the location of the ACPI PM Timer */
/* detect the location of the ACPI PM Timer */
...
@@ -454,6 +458,8 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
...
@@ -454,6 +458,8 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
printk
(
KERN_INFO
PREFIX
"PM-Timer IO Port: %#x
\n
"
,
pmtmr_ioport
);
printk
(
KERN_INFO
PREFIX
"PM-Timer IO Port: %#x
\n
"
,
pmtmr_ioport
);
return
0
;
return
0
;
}
}
#else
#define acpi_parse_fadt NULL
#endif
#endif
...
@@ -666,7 +672,7 @@ acpi_boot_init (void)
...
@@ -666,7 +672,7 @@ acpi_boot_init (void)
return
error
;
return
error
;
}
}
(
void
)
acpi_table_parse
(
ACPI_BOOT
,
acpi_parse_sbf
);
acpi_table_parse
(
ACPI_BOOT
,
acpi_parse_sbf
);
/*
/*
* blacklist may disable ACPI entirely
* blacklist may disable ACPI entirely
...
@@ -683,19 +689,9 @@ acpi_boot_init (void)
...
@@ -683,19 +689,9 @@ acpi_boot_init (void)
*/
*/
acpi_process_madt
();
acpi_process_madt
();
#ifdef CONFIG_X86_PM_TIMER
acpi_table_parse
(
ACPI_FADT
,
acpi_parse_fadt
);
acpi_table_parse
(
ACPI_FADT
,
acpi_parse_fadt
);
#endif
acpi_table_parse
(
ACPI_HPET
,
acpi_parse_hpet
);
acpi_table_parse
(
ACPI_MCFG
,
acpi_parse_mcfg
);
#ifdef CONFIG_HPET_TIMER
(
void
)
acpi_table_parse
(
ACPI_HPET
,
acpi_parse_hpet
);
#endif
#ifdef CONFIG_PCI_MMCONFIG
error
=
acpi_table_parse
(
ACPI_MCFG
,
acpi_parse_mcfg
);
if
(
error
)
printk
(
KERN_ERR
PREFIX
"Error %d parsing MCFG
\n
"
,
error
);
#endif
return
0
;
return
0
;
}
}
...
...
arch/i386/kernel/bootflag.c
View file @
8e0088b5
...
@@ -48,7 +48,7 @@ static void __init sbf_write(u8 v)
...
@@ -48,7 +48,7 @@ static void __init sbf_write(u8 v)
if
(
!
parity
(
v
))
if
(
!
parity
(
v
))
v
|=
SBF_PARITY
;
v
|=
SBF_PARITY
;
printk
(
KERN_INFO
"Simple Boot Flag
0x%x
\n
"
,
v
);
printk
(
KERN_INFO
"Simple Boot Flag
at 0x%x set to 0x%x
\n
"
,
sbf_port
,
v
);
spin_lock_irqsave
(
&
rtc_lock
,
flags
);
spin_lock_irqsave
(
&
rtc_lock
,
flags
);
CMOS_WRITE
(
v
,
sbf_port
);
CMOS_WRITE
(
v
,
sbf_port
);
...
...
drivers/acpi/hardware/hwsleep.c
View file @
8e0088b5
...
@@ -394,7 +394,7 @@ acpi_enter_sleep_state (
...
@@ -394,7 +394,7 @@ acpi_enter_sleep_state (
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
asmlinkage
acpi_enter_sleep_state_s4bios
(
acpi_enter_sleep_state_s4bios
(
void
)
void
)
{
{
...
...
drivers/acpi/power.c
View file @
8e0088b5
...
@@ -23,6 +23,18 @@
...
@@ -23,6 +23,18 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
*/
/*
* ACPI power-managed devices may be controlled in two ways:
* 1. via "Device Specific (D-State) Control"
* 2. via "Power Resource Control".
* This module is used to manage devices relying on Power Resource Control.
*
* An ACPI "power resource object" describes a software controllable power
* plane, clock plane, or other resource used by a power managed device.
* A device may rely on multiple power resources, and a power resource
* may be shared by multiple devices.
*/
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
...
...
drivers/acpi/tables.c
View file @
8e0088b5
...
@@ -386,8 +386,13 @@ acpi_table_parse (
...
@@ -386,8 +386,13 @@ acpi_table_parse (
for
(
i
=
0
;
i
<
sdt_count
;
i
++
)
{
for
(
i
=
0
;
i
<
sdt_count
;
i
++
)
{
if
(
sdt_entry
[
i
].
id
!=
id
)
if
(
sdt_entry
[
i
].
id
!=
id
)
continue
;
continue
;
handler
(
sdt_entry
[
i
].
pa
,
sdt_entry
[
i
].
size
);
count
++
;
count
++
;
if
(
count
==
1
)
handler
(
sdt_entry
[
i
].
pa
,
sdt_entry
[
i
].
size
);
else
printk
(
KERN_WARNING
PREFIX
"%d duplicate %s table ignored.
\n
"
,
count
,
acpi_table_signatures
[
id
]);
}
}
return
count
;
return
count
;
...
...
include/acpi/acpixf.h
View file @
8e0088b5
...
@@ -450,7 +450,7 @@ acpi_status asmlinkage
...
@@ -450,7 +450,7 @@ acpi_status asmlinkage
acpi_enter_sleep_state
(
acpi_enter_sleep_state
(
u8
sleep_state
);
u8
sleep_state
);
acpi_status
acpi_status
asmlinkage
acpi_enter_sleep_state_s4bios
(
acpi_enter_sleep_state_s4bios
(
void
);
void
);
...
...
include/asm-i386/acpi.h
View file @
8e0088b5
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
#ifdef __KERNEL__
#ifdef __KERNEL__
#include <asm/system.h>
/* defines cmpxchg */
#define COMPILER_DEPENDENT_INT64 long long
#define COMPILER_DEPENDENT_INT64 long long
#define COMPILER_DEPENDENT_UINT64 unsigned long long
#define COMPILER_DEPENDENT_UINT64 unsigned long long
...
@@ -61,33 +63,36 @@
...
@@ -61,33 +63,36 @@
* Immediate values in the assembly are preceded by "$" as in "$0x1"
* Immediate values in the assembly are preceded by "$" as in "$0x1"
* The final asm parameter are the operation altered non-output registers.
* The final asm parameter are the operation altered non-output registers.
*/
*/
static
inline
int
__acpi_acquire_global_lock
(
unsigned
int
*
lock
)
{
unsigned
int
old
,
new
,
val
;
do
{
old
=
*
lock
;
new
=
(((
old
&
~
0x3
)
+
2
)
+
((
old
>>
1
)
&
0x1
));
val
=
cmpxchg
(
lock
,
old
,
new
);
}
while
(
unlikely
(
val
!=
old
));
return
(
new
<
3
)
?
-
1
:
0
;
}
static
inline
int
__acpi_release_global_lock
(
unsigned
int
*
lock
)
{
unsigned
int
old
,
new
,
val
;
do
{
old
=
*
lock
;
new
=
old
&
~
0x3
;
val
=
cmpxchg
(
lock
,
old
,
new
);
}
while
(
unlikely
(
val
!=
old
));
return
old
&
0x1
;
}
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
do { \
((Acq) = __acpi_acquire_global_lock((unsigned int *) GLptr))
int dummy; \
asm("1: movl (%1),%%eax;" \
"movl %%eax,%%edx;" \
"andl %2,%%edx;" \
"btsl $0x1,%%edx;" \
"adcl $0x0,%%edx;" \
"lock; cmpxchgl %%edx,(%1);" \
"jnz 1b;" \
"cmpb $0x3,%%dl;" \
"sbbl %%eax,%%eax" \
:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \
} while(0)
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
do { \
((Acq) = __acpi_release_global_lock((unsigned int *) GLptr))
int dummy; \
asm("1: movl (%1),%%eax;" \
"movl %%eax,%%edx;" \
"andl %2,%%edx;" \
"lock; cmpxchgl %%edx,(%1);" \
"jnz 1b;" \
"andl $0x1,%%eax" \
:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
} while(0)
/*
/*
* Math helper asm macros
* Math helper asm macros
...
...
include/asm-x86_64/acpi.h
View file @
8e0088b5
...
@@ -60,7 +60,7 @@ __acpi_acquire_global_lock (unsigned int *lock)
...
@@ -60,7 +60,7 @@ __acpi_acquire_global_lock (unsigned int *lock)
do
{
do
{
old
=
*
lock
;
old
=
*
lock
;
new
=
(((
old
&
~
0x3
)
+
2
)
+
((
old
>>
1
)
&
0x1
));
new
=
(((
old
&
~
0x3
)
+
2
)
+
((
old
>>
1
)
&
0x1
));
val
=
cmpxchg
4_locked
(
lock
,
new
,
old
);
val
=
cmpxchg
(
lock
,
old
,
new
);
}
while
(
unlikely
(
val
!=
old
));
}
while
(
unlikely
(
val
!=
old
));
return
(
new
<
3
)
?
-
1
:
0
;
return
(
new
<
3
)
?
-
1
:
0
;
}
}
...
@@ -72,7 +72,7 @@ __acpi_release_global_lock (unsigned int *lock)
...
@@ -72,7 +72,7 @@ __acpi_release_global_lock (unsigned int *lock)
do
{
do
{
old
=
*
lock
;
old
=
*
lock
;
new
=
old
&
~
0x3
;
new
=
old
&
~
0x3
;
val
=
cmpxchg
4_locked
(
lock
,
new
,
old
);
val
=
cmpxchg
(
lock
,
old
,
new
);
}
while
(
unlikely
(
val
!=
old
));
}
while
(
unlikely
(
val
!=
old
));
return
old
&
0x1
;
return
old
&
0x1
;
}
}
...
...
include/asm-x86_64/system.h
View file @
8e0088b5
...
@@ -276,13 +276,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
...
@@ -276,13 +276,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\
((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\
(unsigned long)(n),sizeof(*(ptr))))
(unsigned long)(n),sizeof(*(ptr))))
static
inline
__u32
cmpxchg4_locked
(
__u32
*
ptr
,
__u32
old
,
__u32
new
)
{
asm
volatile
(
"lock ; cmpxchgl %k1,%2"
:
"=r"
(
new
)
:
"0"
(
old
),
"m"
(
*
(
__u32
*
)
ptr
)
:
"memory"
);
return
new
;
}
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
#define smp_mb() mb()
#define smp_mb() mb()
#define smp_rmb() rmb()
#define smp_rmb() rmb()
...
...
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