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
7833b4ae
Commit
7833b4ae
authored
Nov 20, 2007
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull bugzilla-9153 into release branch
parents
86533e80
61fd47e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
11 deletions
+63
-11
arch/x86/kernel/io_apic_32.c
arch/x86/kernel/io_apic_32.c
+20
-1
arch/x86/kernel/io_apic_64.c
arch/x86/kernel/io_apic_64.c
+22
-2
drivers/pnp/pnpacpi/rsparser.c
drivers/pnp/pnpacpi/rsparser.c
+16
-8
include/linux/acpi.h
include/linux/acpi.h
+5
-0
No files found.
arch/x86/kernel/io_apic_32.c
View file @
7833b4ae
...
...
@@ -962,7 +962,7 @@ static int EISA_ELCR(unsigned int irq)
#define default_MCA_trigger(idx) (1)
#define default_MCA_polarity(idx) (0)
static
int
__init
MPBIOS_polarity
(
int
idx
)
static
int
MPBIOS_polarity
(
int
idx
)
{
int
bus
=
mp_irqs
[
idx
].
mpc_srcbus
;
int
polarity
;
...
...
@@ -2830,6 +2830,25 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
return
0
;
}
int
acpi_get_override_irq
(
int
bus_irq
,
int
*
trigger
,
int
*
polarity
)
{
int
i
;
if
(
skip_ioapic_setup
)
return
-
1
;
for
(
i
=
0
;
i
<
mp_irq_entries
;
i
++
)
if
(
mp_irqs
[
i
].
mpc_irqtype
==
mp_INT
&&
mp_irqs
[
i
].
mpc_srcbusirq
==
bus_irq
)
break
;
if
(
i
>=
mp_irq_entries
)
return
-
1
;
*
trigger
=
irq_trigger
(
i
);
*
polarity
=
irq_polarity
(
i
);
return
0
;
}
#endif
/* CONFIG_ACPI */
static
int
__init
parse_disable_timer_pin_1
(
char
*
arg
)
...
...
arch/x86/kernel/io_apic_64.c
View file @
7833b4ae
...
...
@@ -546,7 +546,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
#define default_PCI_trigger(idx) (1)
#define default_PCI_polarity(idx) (1)
static
int
__init
MPBIOS_polarity
(
int
idx
)
static
int
MPBIOS_polarity
(
int
idx
)
{
int
bus
=
mp_irqs
[
idx
].
mpc_srcbus
;
int
polarity
;
...
...
@@ -2222,8 +2222,27 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p
return
0
;
}
#endif
/* CONFIG_ACPI */
int
acpi_get_override_irq
(
int
bus_irq
,
int
*
trigger
,
int
*
polarity
)
{
int
i
;
if
(
skip_ioapic_setup
)
return
-
1
;
for
(
i
=
0
;
i
<
mp_irq_entries
;
i
++
)
if
(
mp_irqs
[
i
].
mpc_irqtype
==
mp_INT
&&
mp_irqs
[
i
].
mpc_srcbusirq
==
bus_irq
)
break
;
if
(
i
>=
mp_irq_entries
)
return
-
1
;
*
trigger
=
irq_trigger
(
i
);
*
polarity
=
irq_polarity
(
i
);
return
0
;
}
#endif
/* CONFIG_ACPI */
/*
* This function currently is only a helper for the i386 smp boot process where
...
...
@@ -2260,3 +2279,4 @@ void __init setup_ioapic_dest(void)
}
}
#endif
drivers/pnp/pnpacpi/rsparser.c
View file @
7833b4ae
...
...
@@ -75,6 +75,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res,
{
int
i
=
0
;
int
irq
;
int
p
,
t
;
if
(
!
valid_IRQ
(
gsi
))
return
;
...
...
@@ -85,15 +86,22 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res,
if
(
i
>=
PNP_MAX_IRQ
)
return
;
#ifdef CONFIG_X86
if
(
gsi
<
16
&&
(
triggering
!=
ACPI_EDGE_SENSITIVE
||
polarity
!=
ACPI_ACTIVE_HIGH
))
{
pnp_warn
(
"BIOS BUG: legacy PNP IRQ %d should be edge trigger, "
"active high"
,
gsi
);
triggering
=
ACPI_EDGE_SENSITIVE
;
polarity
=
ACPI_ACTIVE_HIGH
;
/*
* in IO-APIC mode, use overrided attribute. Two reasons:
* 1. BIOS bug in DSDT
* 2. BIOS uses IO-APIC mode Interrupt Source Override
*/
if
(
!
acpi_get_override_irq
(
gsi
,
&
t
,
&
p
))
{
t
=
t
?
ACPI_LEVEL_SENSITIVE
:
ACPI_EDGE_SENSITIVE
;
p
=
p
?
ACPI_ACTIVE_LOW
:
ACPI_ACTIVE_HIGH
;
if
(
triggering
!=
t
||
polarity
!=
p
)
{
pnp_warn
(
"IRQ %d override to %s, %s"
,
gsi
,
t
?
"edge"
:
"level"
,
p
?
"low"
:
"high"
);
triggering
=
t
;
polarity
=
p
;
}
}
#endif
res
->
irq_resource
[
i
].
flags
=
IORESOURCE_IRQ
;
// Also clears _UNSET flag
res
->
irq_resource
[
i
].
flags
|=
irq_flags
(
triggering
,
polarity
);
...
...
include/linux/acpi.h
View file @
7833b4ae
...
...
@@ -132,6 +132,11 @@ extern unsigned long acpi_realmode_flags;
int
acpi_register_gsi
(
u32
gsi
,
int
triggering
,
int
polarity
);
int
acpi_gsi_to_irq
(
u32
gsi
,
unsigned
int
*
irq
);
#ifdef CONFIG_X86_IO_APIC
extern
int
acpi_get_override_irq
(
int
bus_irq
,
int
*
trigger
,
int
*
polarity
);
#else
#define acpi_get_override_irq(bus, trigger, polarity) (-1)
#endif
/*
* This function undoes the effect of one call to acpi_register_gsi().
* If this matches the last registration, any IRQ resources for gsi
...
...
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