-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 62482 b: refs/heads/master c: f25f64e h: refs/heads/master v: v3
- Loading branch information
Juergen Beisert
authored and
Linus Torvalds
committed
Jul 22, 2007
1 parent
6407895
commit eb253c8
Showing
8 changed files
with
35 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: bdda1561ffda764583a295229db66d94cf6038a3 | ||
refs/heads/master: f25f64ed5bd3c2932493681bdfdb483ea707da0a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* NSC/Cyrix CPU indexed register access. Must be inlined instead of | ||
* macros to ensure correct access ordering | ||
* Access order is always 0x22 (=offset), 0x23 (=value) | ||
* | ||
* When using the old macros a line like | ||
* setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88); | ||
* gets expanded to: | ||
* do { | ||
* outb((CX86_CCR2), 0x22); | ||
* outb((({ | ||
* outb((CX86_CCR2), 0x22); | ||
* inb(0x23); | ||
* }) | 0x88), 0x23); | ||
* } while (0); | ||
* | ||
* which in fact violates the access order (= 0x22, 0x22, 0x23, 0x23). | ||
*/ | ||
|
||
static inline u8 getCx86(u8 reg) | ||
{ | ||
outb(reg, 0x22); | ||
return inb(0x23); | ||
} | ||
|
||
static inline void setCx86(u8 reg, u8 data) | ||
{ | ||
outb(reg, 0x22); | ||
outb(data, 0x23); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters