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
72c550fc
Commit
72c550fc
authored
Apr 20, 2004
by
Len Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ACPI] enhance intr-src-override parsing to handle ES7000
http://bugme.osdl.org/show_bug.cgi?id=2520
parent
f3995c32
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
47 deletions
+31
-47
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/acpi/boot.c
+3
-3
arch/i386/kernel/mpparse.c
arch/i386/kernel/mpparse.c
+13
-22
arch/x86_64/kernel/mpparse.c
arch/x86_64/kernel/mpparse.c
+15
-22
No files found.
arch/i386/kernel/acpi/boot.c
View file @
72c550fc
...
...
@@ -653,9 +653,6 @@ acpi_parse_madt_ioapic_entries(void)
return
count
;
}
/* Build a default routing table for legacy (ISA) interrupts. */
mp_config_acpi_legacy_irqs
();
count
=
acpi_table_parse_madt
(
ACPI_MADT_INT_SRC_OVR
,
acpi_parse_int_src_ovr
,
NR_IRQ_VECTORS
);
if
(
count
<
0
)
{
printk
(
KERN_ERR
PREFIX
"Error parsing interrupt source overrides entry
\n
"
);
...
...
@@ -670,6 +667,9 @@ acpi_parse_madt_ioapic_entries(void)
if
(
!
acpi_sci_override_gsi
)
acpi_sci_ioapic_setup
(
acpi_fadt
.
sci_int
,
0
,
0
);
/* Fill in identity legacy mapings where no override */
mp_config_acpi_legacy_irqs
();
count
=
acpi_table_parse_madt
(
ACPI_MADT_NMI_SRC
,
acpi_parse_nmi_src
,
NR_IRQ_VECTORS
);
if
(
count
<
0
)
{
printk
(
KERN_ERR
PREFIX
"Error parsing NMI SRC entry
\n
"
);
...
...
arch/i386/kernel/mpparse.c
View file @
72c550fc
...
...
@@ -929,8 +929,6 @@ void __init mp_override_legacy_irq (
u32
gsi
)
{
struct
mpc_config_intsrc
intsrc
;
int
i
=
0
;
int
found
=
0
;
int
ioapic
=
-
1
;
int
pin
=
-
1
;
...
...
@@ -963,23 +961,9 @@ void __init mp_override_legacy_irq (
(
intsrc
.
mpc_irqflag
>>
2
)
&
3
,
intsrc
.
mpc_srcbus
,
intsrc
.
mpc_srcbusirq
,
intsrc
.
mpc_dstapic
,
intsrc
.
mpc_dstirq
);
/*
* If an existing [IOAPIC.PIN -> IRQ] routing entry exists we override it.
* Otherwise create a new entry (e.g. gsi == 2).
*/
for
(
i
=
0
;
i
<
mp_irq_entries
;
i
++
)
{
if
((
mp_irqs
[
i
].
mpc_srcbus
==
intsrc
.
mpc_srcbus
)
&&
(
mp_irqs
[
i
].
mpc_srcbusirq
==
intsrc
.
mpc_srcbusirq
))
{
mp_irqs
[
i
]
=
intsrc
;
found
=
1
;
break
;
}
}
if
(
!
found
)
{
mp_irqs
[
mp_irq_entries
]
=
intsrc
;
if
(
++
mp_irq_entries
==
MAX_IRQ_SOURCES
)
panic
(
"Max # of irq sources exceeded!
\n
"
);
}
mp_irqs
[
mp_irq_entries
]
=
intsrc
;
if
(
++
mp_irq_entries
==
MAX_IRQ_SOURCES
)
panic
(
"Max # of irq sources exceeded!
\n
"
);
return
;
}
...
...
@@ -1010,13 +994,20 @@ void __init mp_config_acpi_legacy_irqs (void)
intsrc
.
mpc_dstapic
=
mp_ioapics
[
ioapic
].
mpc_apicid
;
/*
* Use the default configuration for the IRQs 0-15.
These may be
* Use the default configuration for the IRQs 0-15.
Unless
* overriden by (MADT) interrupt source override entries.
*/
for
(
i
=
0
;
i
<
16
;
i
++
)
{
int
idx
;
for
(
idx
=
0
;
idx
<
mp_irq_entries
;
idx
++
)
if
(
mp_irqs
[
idx
].
mpc_srcbus
==
MP_ISA_BUS
&&
(
mp_irqs
[
idx
].
mpc_srcbusirq
==
i
||
mp_irqs
[
idx
].
mpc_dstirq
==
i
))
break
;
if
(
i
==
2
)
continue
;
/* Don't connect IRQ2
*/
if
(
i
dx
!=
mp_irq_entries
)
continue
;
/* IRQ already used
*/
intsrc
.
mpc_irqtype
=
mp_INT
;
intsrc
.
mpc_srcbusirq
=
i
;
/* Identity mapped */
...
...
arch/x86_64/kernel/mpparse.c
View file @
72c550fc
...
...
@@ -780,8 +780,6 @@ void __init mp_override_legacy_irq (
u32
gsi
)
{
struct
mpc_config_intsrc
intsrc
;
int
i
=
0
;
int
found
=
0
;
int
ioapic
=
-
1
;
int
pin
=
-
1
;
...
...
@@ -814,23 +812,9 @@ void __init mp_override_legacy_irq (
(
intsrc
.
mpc_irqflag
>>
2
)
&
3
,
intsrc
.
mpc_srcbus
,
intsrc
.
mpc_srcbusirq
,
intsrc
.
mpc_dstapic
,
intsrc
.
mpc_dstirq
);
/*
* If an existing [IOAPIC.PIN -> IRQ] routing entry exists we override it.
* Otherwise create a new entry (e.g. gsi == 2).
*/
for
(
i
=
0
;
i
<
mp_irq_entries
;
i
++
)
{
if
((
mp_irqs
[
i
].
mpc_srcbus
==
intsrc
.
mpc_srcbus
)
&&
(
mp_irqs
[
i
].
mpc_srcbusirq
==
intsrc
.
mpc_srcbusirq
))
{
mp_irqs
[
i
]
=
intsrc
;
found
=
1
;
break
;
}
}
if
(
!
found
)
{
mp_irqs
[
mp_irq_entries
]
=
intsrc
;
if
(
++
mp_irq_entries
==
MAX_IRQ_SOURCES
)
panic
(
"Max # of irq sources exceeded!
\n
"
);
}
mp_irqs
[
mp_irq_entries
]
=
intsrc
;
if
(
++
mp_irq_entries
==
MAX_IRQ_SOURCES
)
panic
(
"Max # of irq sources exceeded!
\n
"
);
return
;
}
...
...
@@ -861,13 +845,22 @@ void __init mp_config_acpi_legacy_irqs (void)
intsrc
.
mpc_dstapic
=
mp_ioapics
[
ioapic
].
mpc_apicid
;
/*
* Use the default configuration for the IRQs 0-15.
These may be
* Use the default configuration for the IRQs 0-15.
Unless
* overridden by (MADT) interrupt source override entries.
*/
for
(
i
=
0
;
i
<
16
;
i
++
)
{
int
idx
;
for
(
idx
=
0
;
idx
<
mp_irq_entries
;
idx
++
)
if
(
mp_irqs
[
idx
].
mpc_srcbus
==
MP_ISA_BUS
&&
(
mp_irqs
[
idx
].
mpc_srcbusirq
==
i
||
mp_irqs
[
idx
].
mpc_dstirq
==
i
))
break
;
if
(
i
==
2
)
continue
;
/* Don't connect IRQ2 */
if
(
idx
!=
mp_irq_entries
)
{
printk
(
KERN_DEBUG
"ACPI: IRQ%d used by override.
\n
"
,
i
);
continue
;
/* IRQ already used */
}
intsrc
.
mpc_irqtype
=
mp_INT
;
intsrc
.
mpc_srcbusirq
=
i
;
/* Identity mapped */
...
...
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