diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-06-21 20:15:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 21:46:27 -0400 |
commit | 6b7feecb2f8fcab184a38916d10349bd6648e0bc (patch) | |
tree | 5c51827e85eff96d6c50b41fea428bcf0f1ba71a /include/asm-ppc64/iSeries/HvCallHpt.h | |
parent | fcee38952609fccb2bdfe166b3b96bd75a292aa6 (diff) |
[PATCH] ppc64 iSeries: obvious code simplifications
This patch does some obvious code cleanups in the iSeries headers files.
- simplifies the bodies of lots of inline functions
- parenthesises a macros result
- removes C++ wrapping
- adds "extern" to some function declarations
There are no semantic changes.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64/iSeries/HvCallHpt.h')
-rw-r--r-- | include/asm-ppc64/iSeries/HvCallHpt.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallHpt.h b/include/asm-ppc64/iSeries/HvCallHpt.h index 827d26c60fc1..66f38222ff75 100644 --- a/include/asm-ppc64/iSeries/HvCallHpt.h +++ b/include/asm-ppc64/iSeries/HvCallHpt.h | |||
@@ -43,34 +43,27 @@ | |||
43 | 43 | ||
44 | static inline u64 HvCallHpt_getHptAddress(void) | 44 | static inline u64 HvCallHpt_getHptAddress(void) |
45 | { | 45 | { |
46 | u64 retval = HvCall0(HvCallHptGetHptAddress); | 46 | return HvCall0(HvCallHptGetHptAddress); |
47 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
48 | return retval; | ||
49 | } | 47 | } |
50 | 48 | ||
51 | static inline u64 HvCallHpt_getHptPages(void) | 49 | static inline u64 HvCallHpt_getHptPages(void) |
52 | { | 50 | { |
53 | u64 retval = HvCall0(HvCallHptGetHptPages); | 51 | return HvCall0(HvCallHptGetHptPages); |
54 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
55 | return retval; | ||
56 | } | 52 | } |
57 | 53 | ||
58 | static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value) | 54 | static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value) |
59 | { | 55 | { |
60 | HvCall2(HvCallHptSetPp, hpteIndex, value); | 56 | HvCall2(HvCallHptSetPp, hpteIndex, value); |
61 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
62 | } | 57 | } |
63 | 58 | ||
64 | static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff) | 59 | static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff) |
65 | { | 60 | { |
66 | HvCall3(HvCallHptSetSwBits, hpteIndex, bitson, bitsoff); | 61 | HvCall3(HvCallHptSetSwBits, hpteIndex, bitson, bitsoff); |
67 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
68 | } | 62 | } |
69 | 63 | ||
70 | static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex) | 64 | static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex) |
71 | { | 65 | { |
72 | HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex); | 66 | HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex); |
73 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
74 | } | 67 | } |
75 | 68 | ||
76 | static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, | 69 | static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, |
@@ -81,36 +74,30 @@ static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, | |||
81 | compressedStatus = HvCall4(HvCallHptInvalidateSetSwBitsGet, | 74 | compressedStatus = HvCall4(HvCallHptInvalidateSetSwBitsGet, |
82 | hpteIndex, bitson, bitsoff, 1); | 75 | hpteIndex, bitson, bitsoff, 1); |
83 | HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex); | 76 | HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex); |
84 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
85 | return compressedStatus; | 77 | return compressedStatus; |
86 | } | 78 | } |
87 | 79 | ||
88 | static inline u64 HvCallHpt_findValid(HPTE *hpte, u64 vpn) | 80 | static inline u64 HvCallHpt_findValid(HPTE *hpte, u64 vpn) |
89 | { | 81 | { |
90 | u64 retIndex = HvCall3Ret16( HvCallHptFindValid, hpte, vpn, 0, 0 ); | 82 | return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0); |
91 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
92 | return retIndex; | ||
93 | } | 83 | } |
94 | 84 | ||
95 | static inline u64 HvCallHpt_findNextValid(HPTE *hpte, u32 hpteIndex, | 85 | static inline u64 HvCallHpt_findNextValid(HPTE *hpte, u32 hpteIndex, |
96 | u8 bitson, u8 bitsoff) | 86 | u8 bitson, u8 bitsoff) |
97 | { | 87 | { |
98 | u64 retIndex = HvCall3Ret16( HvCallHptFindNextValid, hpte, hpteIndex, bitson, bitsoff ); | 88 | return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex, |
99 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | 89 | bitson, bitsoff); |
100 | return retIndex; | ||
101 | } | 90 | } |
102 | 91 | ||
103 | static inline void HvCallHpt_get(HPTE *hpte, u32 hpteIndex) | 92 | static inline void HvCallHpt_get(HPTE *hpte, u32 hpteIndex) |
104 | { | 93 | { |
105 | HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0); | 94 | HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0); |
106 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
107 | } | 95 | } |
108 | 96 | ||
109 | static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, HPTE *hpte) | 97 | static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, HPTE *hpte) |
110 | { | 98 | { |
111 | HvCall4(HvCallHptAddValidate, hpteIndex, hBit, (*((u64 *)hpte)), | 99 | HvCall4(HvCallHptAddValidate, hpteIndex, hBit, (*((u64 *)hpte)), |
112 | (*(((u64 *)hpte)+1))); | 100 | (*(((u64 *)hpte)+1))); |
113 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
114 | } | 101 | } |
115 | 102 | ||
116 | #endif /* _HVCALLHPT_H */ | 103 | #endif /* _HVCALLHPT_H */ |