diff -ruN gnumach-1.8+git20180218/i386/i386/cpu_number.h gnumach-1.8+git20180218~/i386/i386/cpu_number.h --- gnumach-1.8+git20180218/i386/i386/cpu_number.h 2015-09-12 11:19:34.000000000 +0200 +++ gnumach-1.8+git20180218~/i386/i386/cpu_number.h 2018-06-17 02:36:41.000000000 +0200 @@ -33,7 +33,8 @@ #if NCPUS > 1 /* More-specific code must define cpu_number() and CPU_NUMBER. */ -#define CX(addr, reg) addr(,reg,4) +#define CX(addr,reg) addr(,reg,4) +#define CPU_NUMBER(reg) #else /* NCPUS == 1 */ diff -ruN gnumach-1.8+git20180218/i386/i386/lock.h gnumach-1.8+git20180218~/i386/i386/lock.h --- gnumach-1.8+git20180218/i386/i386/lock.h 2016-10-02 19:45:20.000000000 +0200 +++ gnumach-1.8+git20180218~/i386/i386/lock.h 2018-06-17 03:15:34.000000000 +0200 @@ -43,15 +43,15 @@ * The code here depends on the GNU C compiler. */ -#define _simple_lock_xchg_(lock, new_val) \ - ({ int _old_val_; \ - asm volatile("xchgl %0, %2" \ - : "=r" (_old_val_) \ - : "0" (new_val), "m" (*(lock) : "memory") \ - ); \ - _old_val_; \ - }) - +/*#define _simple_lock_xchg_(lock, new_val) \ + * ({ int _old_val_; \ + * asm volatile("xchgl %0, %2" \ + * : "=r" (_old_val_) \ + * : "0" (new_val), "m" (*lock) : "memory" \ + * ); \ + * _old_val_; \ + * }) + */ #define simple_lock_init(l) \ ((l)->lock_data = 0) diff -ruN gnumach-1.8+git20180218/i386/intel/pmap.c gnumach-1.8+git20180218~/i386/intel/pmap.c --- gnumach-1.8+git20180218/i386/intel/pmap.c 2018-01-28 15:35:43.000000000 +0100 +++ gnumach-1.8+git20180218~/i386/intel/pmap.c 2018-06-17 15:51:08.000000000 +0200 @@ -543,7 +543,7 @@ if (prot & VM_PROT_WRITE) template |= INTEL_PTE_WRITE; - PMAP_READ_LOCK(pmap, spl); + PMAP_READ_LOCK(pv_head_table->pmap, spl); while (start < end) { pte = pmap_pte(kernel_pmap, virt); if (pte == PT_ENTRY_NULL) @@ -572,7 +572,7 @@ if (n != i) panic("couldn't pmap_map_bd\n"); #endif /* MACH_PV_PAGETABLES */ - PMAP_READ_UNLOCK(pmap, spl); + PMAP_READ_UNLOCK(pv_head_table->pmap, spl); return(virt); }