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
nexedi
linux
Commits
964e5165
Commit
964e5165
authored
Nov 08, 2004
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge intel.com:/home/lenb/src/26-stable-dev
into intel.com:/home/lenb/src/26-latest-dev
parents
86d45f2e
7977cad2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
26 deletions
+58
-26
arch/i386/kernel/apic.c
arch/i386/kernel/apic.c
+17
-5
arch/i386/kernel/mpparse.c
arch/i386/kernel/mpparse.c
+1
-2
drivers/acpi/pci_irq.c
drivers/acpi/pci_irq.c
+28
-13
drivers/acpi/pci_link.c
drivers/acpi/pci_link.c
+10
-5
include/asm-i386/acpi.h
include/asm-i386/acpi.h
+2
-1
No files found.
arch/i386/kernel/apic.c
View file @
964e5165
...
...
@@ -536,13 +536,27 @@ static struct {
unsigned
int
apic_thmr
;
}
apic_pm_state
;
static
int
lapic_s
uspend
(
struct
sys_device
*
dev
,
u32
state
)
static
int
lapic_s
hutdown
(
struct
sys_device
*
dev
)
{
unsigned
long
flags
;
if
(
!
apic_pm_state
.
active
)
return
0
;
local_irq_save
(
flags
);
disable_local_APIC
();
local_irq_restore
(
flags
);
return
0
;
}
static
int
lapic_suspend
(
struct
sys_device
*
dev
,
u32
state
)
{
if
(
!
apic_pm_state
.
active
)
return
0
;
apic_pm_state
.
apic_id
=
apic_read
(
APIC_ID
);
apic_pm_state
.
apic_taskpri
=
apic_read
(
APIC_TASKPRI
);
apic_pm_state
.
apic_ldr
=
apic_read
(
APIC_LDR
);
...
...
@@ -557,10 +571,7 @@ static int lapic_suspend(struct sys_device *dev, u32 state)
apic_pm_state
.
apic_tdcr
=
apic_read
(
APIC_TDCR
);
apic_pm_state
.
apic_thmr
=
apic_read
(
APIC_LVTTHMR
);
local_irq_save
(
flags
);
disable_local_APIC
();
local_irq_restore
(
flags
);
return
0
;
return
lapic_shutdown
(
dev
);
}
static
int
lapic_resume
(
struct
sys_device
*
dev
)
...
...
@@ -609,6 +620,7 @@ static int lapic_resume(struct sys_device *dev)
static
struct
sysdev_class
lapic_sysclass
=
{
set_kset_name
(
"lapic"
),
.
shutdown
=
lapic_shutdown
,
.
resume
=
lapic_resume
,
.
suspend
=
lapic_suspend
,
};
...
...
arch/i386/kernel/mpparse.c
View file @
964e5165
...
...
@@ -808,6 +808,7 @@ void __init find_smp_config (void)
smp_scan_config
(
address
,
0x400
);
}
int
(
*
platform_rename_gsi
)(
int
ioapic
,
int
gsi
);
/* --------------------------------------------------------------------------
ACPI-based MP Configuration
...
...
@@ -1055,8 +1056,6 @@ void __init mp_config_acpi_legacy_irqs (void)
}
}
int
(
*
platform_rename_gsi
)(
int
ioapic
,
int
gsi
);
int
mp_register_gsi
(
u32
gsi
,
int
edge_level
,
int
active_high_low
)
{
int
ioapic
=
-
1
;
...
...
drivers/acpi/pci_irq.c
View file @
964e5165
...
...
@@ -227,6 +227,11 @@ acpi_pci_irq_add_prt (
PCI Interrupt Routing Support
-------------------------------------------------------------------------- */
/*
* acpi_pci_irq_lookup
* success: return IRQ >= 0
* failure: return -1
*/
static
int
acpi_pci_irq_lookup
(
struct
pci_bus
*
bus
,
...
...
@@ -249,14 +254,14 @@ acpi_pci_irq_lookup (
entry
=
acpi_pci_irq_find_prt_entry
(
segment
,
bus_nr
,
device
,
pin
);
if
(
!
entry
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"PRT entry not found
\n
"
));
return_VALUE
(
0
);
return_VALUE
(
-
1
);
}
if
(
entry
->
link
.
handle
)
{
irq
=
acpi_pci_link_get_irq
(
entry
->
link
.
handle
,
entry
->
link
.
index
,
edge_level
,
active_high_low
);
if
(
!
irq
)
{
if
(
irq
<
0
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_WARN
,
"Invalid IRQ link routing entry
\n
"
));
return_VALUE
(
0
);
return_VALUE
(
-
1
);
}
}
else
{
irq
=
entry
->
link
.
index
;
...
...
@@ -269,6 +274,11 @@ acpi_pci_irq_lookup (
return_VALUE
(
irq
);
}
/*
* acpi_pci_irq_derive
* success: return IRQ >= 0
* failure: return < 0
*/
static
int
acpi_pci_irq_derive
(
struct
pci_dev
*
dev
,
...
...
@@ -277,7 +287,7 @@ acpi_pci_irq_derive (
int
*
active_high_low
)
{
struct
pci_dev
*
bridge
=
dev
;
int
irq
=
0
;
int
irq
=
-
1
;
u8
bridge_pin
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_pci_irq_derive"
);
...
...
@@ -289,7 +299,7 @@ acpi_pci_irq_derive (
* Attempt to derive an IRQ for this device from a parent bridge's
* PCI interrupt routing entry (eg. yenta bridge and add-in card bridge).
*/
while
(
!
irq
&&
bridge
->
bus
->
self
)
{
while
(
irq
<
0
&&
bridge
->
bus
->
self
)
{
pin
=
(
pin
+
PCI_SLOT
(
bridge
->
devfn
))
%
4
;
bridge
=
bridge
->
bus
->
self
;
...
...
@@ -299,7 +309,7 @@ acpi_pci_irq_derive (
if
(
!
bridge_pin
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"No interrupt pin configured for device %s
\n
"
,
pci_name
(
bridge
)));
return_VALUE
(
0
);
return_VALUE
(
-
1
);
}
/* Pin is from 0 to 3 */
bridge_pin
--
;
...
...
@@ -310,9 +320,9 @@ acpi_pci_irq_derive (
pin
,
edge_level
,
active_high_low
);
}
if
(
!
irq
)
{
if
(
irq
<
0
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_WARN
,
"Unable to derive IRQ for device %s
\n
"
,
pci_name
(
dev
)));
return_VALUE
(
0
);
return_VALUE
(
-
1
);
}
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Derive IRQ %d for device %s from %s
\n
"
,
...
...
@@ -321,6 +331,11 @@ acpi_pci_irq_derive (
return_VALUE
(
irq
);
}
/*
* acpi_pci_irq_enable
* success: return 0
* failure: return < 0
*/
int
acpi_pci_irq_enable
(
...
...
@@ -358,20 +373,20 @@ acpi_pci_irq_enable (
* If no PRT entry was found, we'll try to derive an IRQ from the
* device's parent bridge.
*/
if
(
!
irq
)
if
(
irq
<
0
)
irq
=
acpi_pci_irq_derive
(
dev
,
pin
,
&
edge_level
,
&
active_high_low
);
/*
* No IRQ known to the ACPI subsystem - maybe the BIOS /
* driver reported one, then use it. Exit in any case.
*/
if
(
!
irq
)
{
if
(
irq
<
0
)
{
printk
(
KERN_WARNING
PREFIX
"PCI interrupt %s[%c]: no GSI"
,
pci_name
(
dev
),
(
'A'
+
pin
));
/* Interrupt Line values above 0xF are forbidden */
if
(
dev
->
irq
&&
(
dev
->
irq
<=
0xF
))
{
if
(
dev
->
irq
>=
0
&&
(
dev
->
irq
<=
0xF
))
{
printk
(
" - using IRQ %d
\n
"
,
dev
->
irq
);
return_VALUE
(
dev
->
irq
);
return_VALUE
(
0
);
}
else
{
printk
(
"
\n
"
);
...
...
@@ -388,5 +403,5 @@ acpi_pci_irq_enable (
(
active_high_low
==
ACPI_ACTIVE_LOW
)
?
"low"
:
"high"
,
dev
->
irq
);
return_VALUE
(
dev
->
irq
);
return_VALUE
(
0
);
}
drivers/acpi/pci_link.c
View file @
964e5165
...
...
@@ -577,6 +577,11 @@ static int acpi_pci_link_allocate(struct acpi_pci_link* link) {
return_VALUE
(
0
);
}
/*
* acpi_pci_link_get_irq
* success: return IRQ >= 0
* failure: return -1
*/
int
acpi_pci_link_get_irq
(
...
...
@@ -594,27 +599,27 @@ acpi_pci_link_get_irq (
result
=
acpi_bus_get_device
(
handle
,
&
device
);
if
(
result
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Invalid link device
\n
"
));
return_VALUE
(
0
);
return_VALUE
(
-
1
);
}
link
=
(
struct
acpi_pci_link
*
)
acpi_driver_data
(
device
);
if
(
!
link
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Invalid link context
\n
"
));
return_VALUE
(
0
);
return_VALUE
(
-
1
);
}
/* TBD: Support multiple index (IRQ) entries per Link Device */
if
(
index
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Invalid index %d
\n
"
,
index
));
return_VALUE
(
0
);
return_VALUE
(
-
1
);
}
if
(
acpi_pci_link_allocate
(
link
))
return_VALUE
(
0
);
return_VALUE
(
-
1
);
if
(
!
link
->
irq
.
active
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Link active IRQ is 0!
\n
"
));
return_VALUE
(
0
);
return_VALUE
(
-
1
);
}
if
(
edge_level
)
*
edge_level
=
link
->
irq
.
edge_level
;
...
...
include/asm-i386/acpi.h
View file @
964e5165
...
...
@@ -133,7 +133,6 @@ static inline void disable_acpi(void)
#define FIX_ACPI_PAGES 4
extern
int
acpi_gsi_to_irq
(
u32
gsi
,
unsigned
int
*
irq
);
extern
int
(
*
platform_rename_gsi
)(
int
ioapic
,
int
gsi
);
#ifdef CONFIG_X86_IO_APIC
extern
int
skip_ioapic_setup
;
...
...
@@ -161,6 +160,8 @@ static inline void disable_ioapic_setup(void)
#endif
extern
int
(
*
platform_rename_gsi
)(
int
ioapic
,
int
gsi
);
#ifdef CONFIG_ACPI_PCI
static
inline
void
acpi_noirq_set
(
void
)
{
acpi_noirq
=
1
;
}
static
inline
void
acpi_disable_pci
(
void
)
...
...
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