#include <opencrypto/cryptodev.h>
-#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
+#if defined(__x86_64__) || defined(__i386__)
#include <machine/cpufunc.h>
#include <machine/cputypes.h>
#include <machine/md_var.h>
#endif
#if defined(__i386__)
#include <machine/npx.h>
-#elif defined(__amd64__)
+#elif defined(__x86_64__)
#include <machine/npx.h>
#endif
#define le16_to_cpu
-#if defined(__i386__) || defined(__amd64__)
+#if defined(__i386__) || defined(__x86_64__)
#define wmb() __asm volatile("sfence" ::: "memory")
#else
#define wmb()
#endif
-#if defined(__i386__) || defined(__amd64__)
+#if defined(__i386__) || defined(__x86_64__)
static __inline
void prefetch(void *x)
{
srb_sg_bytecount = sge->SgByteCount;
srb_sg_address = (void *)(uintptr_t)sge->SgAddress;
}
-#ifdef __amd64__
+#ifdef __x86_64__
else if (fibsize == (sizeof(struct aac_srb) +
srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry64))) {
sge = NULL;
#include <sys/file.h>
#include <sys/mapped_ioctl.h>
#include <sys/proc.h>
-#ifdef __amd64__
+#ifdef __x86_64__
#include <machine/../linux32/linux.h>
#include <machine/../linux32/linux32_proto.h>
#else
#include <sys/file.h>
#include <sys/proc.h>
-#if defined(__amd64__) /* Assume amd64 wants 32 bit Linux */
+#if defined(__x86_64__) /* Assume amd64 wants 32 bit Linux */
#include <machine/../linux32/linux.h>
#include <machine/../linux32/linux32_proto.h>
#else
#define AMR_IO_COMMAND _IOWR('A', 0x201, struct amr_user_ioctl)
-#if defined(__amd64__) || defined(__ia64__)
+#if defined(__x86_64__) || defined(__ia64__)
struct amr_user_ioctl32 {
unsigned char au_cmd[32]; /* command text from userspace */
u_long cmd = ap->a_cmd;
struct ciss_softc *sc;
IOCTL_Command_struct *ioc = (IOCTL_Command_struct *)addr;
-#ifdef __amd64__
+#ifdef __x86_64__
IOCTL_Command_struct32 *ioc32 = (IOCTL_Command_struct32 *)addr;
IOCTL_Command_struct ioc_swab;
#endif
*/
break;
-#ifdef __amd64__
+#ifdef __x86_64__
case CCISS_PASSTHRU32:
ioc_swab.LUN_info = ioc32->LUN_info;
ioc_swab.Request = ioc32->Request;
u_int8_t *buf; /* 4 */
} __packed IOCTL_Command_struct;
-#ifdef __amd64__
+#ifdef __x86_64__
typedef struct {
LUNAddr_struct LUN_info; /* 8 */
RequestBlock_struct Request; /* 20 */
#ifndef _LINUX_EPOLL_H_
#define _LINUX_EPOLL_H_
-#ifdef __amd64__
+#ifdef __x86_64__
#define EPOLL_PACKED __packed
#else
#define EPOLL_PACKED
#define WINDRV_LOADED htonl(0x42534F44)
-#ifdef __amd64__
+#ifdef __x86_64__
static void
patch_user_shared_data_address(vm_offset_t img, size_t len)
{
return (ENOEXEC);
}
-#ifdef __amd64__
+#ifdef __x86_64__
patch_user_shared_data_address(img, len);
#endif
};
extern image_patch_table ntoskrnl_functbl[];
-#ifdef __amd64__
+#ifdef __x86_64__
extern struct kuser_shared_data kuser_shared_data;
#endif
typedef void (*funcptr)(void);
if (sysinit == NULL) {
sysinit = SET_BEGIN(sysinit_set);
-#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+#if defined(__x86_64__) && defined(_KERNEL_VIRTUAL)
/*
* XXX For whatever reason, on 64-bit vkernels
* the value of sysinit obtained from the
#endif
sysinit_end = SET_LIMIT(sysinit_set);
}
-#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+#if defined(__x86_64__) && defined(_KERNEL_VIRTUAL)
KKASSERT((long)sysinit % 8 == 0);
#endif
#include <vm/pmap.h>
#include <vm/vm_map.h>
-#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+#if defined(__x86_64__) && defined(_KERNEL_VIRTUAL)
#include <stdio.h>
#endif
if (linker_kernel_file == NULL)
panic("link_elf_init: Can't create linker structures for kernel");
parse_dynamic(linker_kernel_file);
-#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+#if defined(__x86_64__) && defined(_KERNEL_VIRTUAL)
fprintf(stderr, "WARNING: KERNBASE being used\n");
#endif
linker_kernel_file->address = (caddr_t) KERNBASE;
*
* vkernel64's text+data is outside the managed VM space entirely.
*/
-#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+#if defined(__x86_64__) && defined(_KERNEL_VIRTUAL)
error = vkernel_module_memory_alloc(&mapbase, round_page(mapsize));
#else
mapbase = KERNBASE;
kfree(ef->progtab, M_LINKER);
if (ef->object) {
-#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+#if defined(__x86_64__) && defined(_KERNEL_VIRTUAL)
vkernel_module_memory_free((vm_offset_t)ef->address, ef->bytes);
#else
vm_map_remove(&kernel_map, (vm_offset_t) ef->address,
copy_func, copy_arg1, copy_arg2,
#if defined(__i386__)
(frame ? (void *)frame->if_eip : NULL));
-#elif defined(__amd64__)
+#elif defined(__x86_64__)
(frame ? (void *)frame->if_rip : NULL));
#else
NULL);
need_lwkt_resched(); /* prevent hlt */
goto haveidle;
}
-#if defined(INVARIANTS) && defined(__amd64__)
+#if defined(INVARIANTS) && defined(__x86_64__)
if ((read_rflags() & PSL_I) == 0) {
cpu_enable_intr();
panic("lwkt_switch() called with interrupts disabled");
void vm_map_set_wired_quick(vm_map_t map, vm_offset_t addr, vm_size_t size, int *);
void vm_map_transition_wait(vm_map_t map);
-#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+#if defined(__x86_64__) && defined(_KERNEL_VIRTUAL)
int vkernel_module_memory_alloc(vm_offset_t *, size_t);
void vkernel_module_memory_free(vm_offset_t, size_t);
#endif