Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 187 → Rev 192

/SPARTAN/trunk/arch/ia32/include/asm.h
83,22 → 83,6
*/
static inline __u32 read_cr3(void) { __u32 v; __asm__ volatile ("movl %%cr3,%0" : "=r" (v)); return v; }
 
/** Write DR0
*
* Write value to DR0.
*
* @param v Value to be written.
*/
static inline void write_dr0(__u32 v) { __asm__ volatile ("movl %0,%%dr0\n" : : "r" (v)); }
 
/** Read DR0
*
* Return value in DR0
*
* @return Value read.
*/
static inline __u32 read_dr0(void) { __u32 v; __asm__ volatile ("movl %%dr0,%0" : "=r" (v)); return v; }
 
/** Set priority level low
*
* Enable interrupts and return previous
/SPARTAN/trunk/arch/ia32/include/cpu.h
33,12 → 33,6
#include <arch/pm.h>
#include <arch/asm.h>
 
#ifdef __SMP__
#define CPU_ID_ARCH (read_dr0())
#else
#define CPU_ID_ARCH (0)
#endif
 
struct cpu_arch {
int vendor;
int family;