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
b431de15
Commit
b431de15
authored
Nov 25, 2002
by
Alan Cox
Committed by
Linus Torvalds
Nov 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] add sis apic workaround support
parent
94db30f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
arch/i386/kernel/io_apic.c
arch/i386/kernel/io_apic.c
+19
-1
include/asm-i386/io_apic.h
include/asm-i386/io_apic.h
+5
-1
No files found.
arch/i386/kernel/io_apic.c
View file @
b431de15
...
@@ -43,6 +43,12 @@
...
@@ -43,6 +43,12 @@
static
spinlock_t
ioapic_lock
=
SPIN_LOCK_UNLOCKED
;
static
spinlock_t
ioapic_lock
=
SPIN_LOCK_UNLOCKED
;
/*
* Is the SiS APIC rmw bug present ?
* -1 = dont know, 0 = no, 1 = yes
*/
int
sis_apic_bug
=
-
1
;
/*
/*
* # of IRQ routing registers
* # of IRQ routing registers
*/
*/
...
@@ -122,7 +128,7 @@ static void __init replace_pin_at_irq(unsigned int irq,
...
@@ -122,7 +128,7 @@ static void __init replace_pin_at_irq(unsigned int irq,
break; \
break; \
reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \
reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \
reg ACTION; \
reg ACTION; \
io_apic_modify(entry->apic,
reg);
\
io_apic_modify(entry->apic,
0x10 + R + pin*2, reg);
\
if (!entry->next) \
if (!entry->next) \
break; \
break; \
entry = irq_2_pin + entry->next; \
entry = irq_2_pin + entry->next; \
...
@@ -1738,6 +1744,18 @@ void __init setup_IO_APIC(void)
...
@@ -1738,6 +1744,18 @@ void __init setup_IO_APIC(void)
print_IO_APIC
();
print_IO_APIC
();
}
}
/*
* Called after all the initialization is done. If we didnt find any
* APIC bugs then we can allow the modify fast path
*/
static
void
__init
io_apic_bug_finalize
(
void
)
{
if
(
sis_apic_bug
==
-
1
)
sis_apic_bug
=
0
;
}
late_initcall
(
io_apic_bug_finalize
);
/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
ACPI-based IOAPIC Configuration
ACPI-based IOAPIC Configuration
...
...
include/asm-i386/io_apic.h
View file @
b431de15
...
@@ -120,9 +120,13 @@ static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned i
...
@@ -120,9 +120,13 @@ static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned i
/*
/*
* Re-write a value: to be used for read-modify-write
* Re-write a value: to be used for read-modify-write
* cycles where the read already set up the index register.
* cycles where the read already set up the index register.
*
* Older SiS APIC requires we rewrite the index regiser
*/
*/
static
inline
void
io_apic_modify
(
unsigned
int
apic
,
unsigned
int
value
)
static
inline
void
io_apic_modify
(
unsigned
int
apic
,
unsigned
int
reg
,
unsigned
int
value
)
{
{
if
(
apic_sis_bug
)
*
IO_APIC_BASE
(
apic
)
=
reg
;
*
(
IO_APIC_BASE
(
apic
)
+
4
)
=
value
;
*
(
IO_APIC_BASE
(
apic
)
+
4
)
=
value
;
}
}
...
...
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