Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: merge processor_{32,64}.h a bit...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>

authored by

Al Viro and committed by
Richard Weinberger
c56334db 10c890c0

+10 -20
+10
arch/x86/um/asm/processor.h
··· 17 17 #define ARCH_IS_STACKGROW(address) \ 18 18 (address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(&current->thread.regs.regs)) 19 19 20 + #include <asm/user.h> 21 + 22 + /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ 23 + static inline void rep_nop(void) 24 + { 25 + __asm__ __volatile__("rep;nop": : :"memory"); 26 + } 27 + 28 + #define cpu_relax() rep_nop() 29 + 20 30 #include <asm/processor-generic.h> 21 31 22 32 #endif
-10
arch/x86/um/asm/processor_32.h
··· 45 45 memcpy(&to->tls_array, &from->tls_array, sizeof(from->tls_array)); 46 46 } 47 47 48 - #include <asm/user.h> 49 - 50 - /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ 51 - static inline void rep_nop(void) 52 - { 53 - __asm__ __volatile__("rep;nop": : :"memory"); 54 - } 55 - 56 - #define cpu_relax() rep_nop() 57 - 58 48 /* 59 49 * Default implementation of macro that returns current 60 50 * instruction pointer ("program counter"). Stolen
-10
arch/x86/um/asm/processor_64.h
··· 14 14 struct faultinfo faultinfo; 15 15 }; 16 16 17 - /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ 18 - static inline void rep_nop(void) 19 - { 20 - __asm__ __volatile__("rep;nop": : :"memory"); 21 - } 22 - 23 - #define cpu_relax() rep_nop() 24 - 25 17 #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ 26 18 .debugregs_seq = 0, \ 27 19 .fs = 0, \ ··· 28 36 { 29 37 to->fs = from->fs; 30 38 } 31 - 32 - #include <asm/user.h> 33 39 34 40 #define current_text_addr() \ 35 41 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })