intel-iommu: fix sg_page()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / asm-um / processor-x86_64.h
CommitLineData
1da177e4
LT
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
c578455a
BS
10/* include faultinfo structure */
11#include "sysdep/faultinfo.h"
1da177e4
LT
12
13struct arch_thread {
c578455a
BS
14 unsigned long debugregs[8];
15 int debugregs_seq;
f355559c 16 unsigned long fs;
c578455a 17 struct faultinfo faultinfo;
1da177e4
LT
18};
19
20/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
b21d4b08 21static inline void rep_nop(void)
1da177e4
LT
22{
23 __asm__ __volatile__("rep;nop": : :"memory");
24}
25
26#define cpu_relax() rep_nop()
27
c578455a 28#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
f355559c
JD
29 .debugregs_seq = 0, \
30 .fs = 0, \
31 .faultinfo = { 0, 0, 0 } }
c578455a 32
aa6758d4
PBG
33static inline void arch_flush_thread(struct arch_thread *thread)
34{
35}
36
37static inline void arch_copy_thread(struct arch_thread *from,
38 struct arch_thread *to)
39{
40}
41
c578455a 42#include "asm/arch/user.h"
1da177e4
LT
43
44#define current_text_addr() \
45 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
46
47#define ARCH_IS_STACKGROW(address) \
48 (address + 128 >= UPT_SP(&current->thread.regs.regs))
49
fad1c45c
AG
50#define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
51#define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
52
1da177e4
LT
53#include "asm/processor-generic.h"
54
55#endif