Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
at v2.6.13-rc4 52 lines 1.3 kB view raw
1/* 2 * Copyright 2003 PathScale, Inc. 3 * 4 * Licensed under the GPL 5 */ 6 7#ifndef __UM_PROCESSOR_X86_64_H 8#define __UM_PROCESSOR_X86_64_H 9 10/* include faultinfo structure */ 11#include "sysdep/faultinfo.h" 12 13struct arch_thread { 14 unsigned long debugregs[8]; 15 int debugregs_seq; 16 struct faultinfo faultinfo; 17}; 18 19/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ 20extern inline void rep_nop(void) 21{ 22 __asm__ __volatile__("rep;nop": : :"memory"); 23} 24 25#define cpu_relax() rep_nop() 26 27#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ 28 .debugregs_seq = 0, \ 29 .faultinfo = { 0, 0, 0 } } 30 31#include "asm/arch/user.h" 32 33#define current_text_addr() \ 34 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; }) 35 36#define ARCH_IS_STACKGROW(address) \ 37 (address + 128 >= UPT_SP(&current->thread.regs.regs)) 38 39#include "asm/processor-generic.h" 40 41#endif 42 43/* 44 * Overrides for Emacs so that we follow Linus's tabbing style. 45 * Emacs will notice this stuff at the end of the file and automatically 46 * adjust the settings for this buffer only. This must remain at the end 47 * of the file. 48 * --------------------------------------------------------------------------- 49 * Local variables: 50 * c-file-style: "linux" 51 * End: 52 */