Changeset 3396f59 in mainline for arch/amd64/include/asm.h
- Timestamp:
- 2005-09-04T08:28:55Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8ff2f3f
- Parents:
- 005384ad
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/asm.h
r005384ad r3396f59 141 141 } 142 142 143 /** Read CR0 144 * 145 * Return value in CR0 146 * 147 * @return Value read. 148 */ 149 static inline __u64 read_cr0(void) 150 { 151 __u64 v; 152 __asm__ volatile ("movq %%cr0,%0" : "=r" (v)); 153 return v; 154 } 155 143 156 /** Read CR2 144 157 * … … 147 160 * @return Value read. 148 161 */ 149 static inline __u64 read_cr2(void) { __u64 v; __asm__ volatile ("movq %%cr2,%0" : "=r" (v)); return v; } 162 static inline __u64 read_cr2(void) 163 { 164 __u64 v; 165 __asm__ volatile ("movq %%cr2,%0" : "=r" (v)); 166 return v; 167 } 150 168 151 169 /** Write CR3 … … 155 173 * @param v Value to be written. 156 174 */ 157 static inline void write_cr3(__u64 v) { __asm__ volatile ("movq %0,%%cr3\n" : : "r" (v)); } 175 static inline void write_cr3(__u64 v) 176 { 177 __asm__ volatile ("movq %0,%%cr3\n" : : "r" (v)); 178 } 158 179 159 180 /** Read CR3 … … 163 184 * @return Value read. 164 185 */ 165 static inline __u64 read_cr3(void) { __u64 v; __asm__ volatile ("movq %%cr3,%0" : "=r" (v)); return v; } 186 static inline __u64 read_cr3(void) 187 { 188 __u64 v; 189 __asm__ volatile ("movq %%cr3,%0" : "=r" (v)); 190 return v; 191 } 166 192 167 193
Note:
See TracChangeset
for help on using the changeset viewer.