From efead44aa238985b778ae392dc44bae634632bc6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 29 Apr 2003 01:12:04 -0700 Subject: USB: create usb_init_urb() for those people who like to live dangerously (like the bluetooth stack.) --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/usb.h b/include/linux/usb.h index cd50f3ede6d3..e61d0f12eddc 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -765,6 +765,7 @@ static inline void usb_fill_int_urb (struct urb *urb, urb->start_frame = -1; } +extern void usb_init_urb(struct urb *urb); extern struct urb *usb_alloc_urb(int iso_packets, int mem_flags); extern void usb_free_urb(struct urb *urb); #define usb_put_urb usb_free_urb -- cgit v1.2.3 From 04704e5464ca941d3eb40fa0805818727c39e35e Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 29 Apr 2003 01:32:01 -0700 Subject: [PATCH] USB: fix up usb.h's dbg macro to take up less space --- include/linux/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/usb.h b/include/linux/usb.h index e61d0f12eddc..7ad72ec2c8ad 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -974,7 +974,7 @@ void usb_show_device(struct usb_device *); void usb_show_string(struct usb_device *dev, char *id, int index); #ifdef DEBUG -#define dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg) +#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg) #else #define dbg(format, arg...) do {} while (0) #endif -- cgit v1.2.3 From 700a4acbd9b6c0d22ab17d248cd22e70b8268bfb Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 30 Apr 2003 04:13:50 -0700 Subject: [PATCH] Fix prefetch patching in 2.5-bk Brown paperbag time. I forgot to take the modrm byte in account with the prefetch patch replacement. With 3.2 it worked because it used the right registers in my configuration. But gcc 2.96 uses a different register in __dpath and the prefetch becomes 4 bytes with modrm and the original nop needs to be as long as that too. --- include/asm-i386/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index d69cc46d5866..6bbb21e6e205 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -564,7 +564,7 @@ static inline void rep_nop(void) #define ARCH_HAS_PREFETCH extern inline void prefetch(const void *x) { - alternative_input(ASM_NOP3, + alternative_input(ASM_NOP4, "prefetchnta (%1)", X86_FEATURE_XMM, "r" (x)); @@ -578,7 +578,7 @@ extern inline void prefetch(const void *x) spinlocks to avoid one state transition in the cache coherency protocol. */ extern inline void prefetchw(const void *x) { - alternative_input(ASM_NOP3, + alternative_input(ASM_NOP4, "prefetchw (%1)", X86_FEATURE_3DNOW, "r" (x)); -- cgit v1.2.3 From d33334d346864ff2205bce81ed225ff628920f14 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 30 Apr 2003 07:44:30 -0700 Subject: [PATCH] x86-64 update Just make x86-64/amd64 compile again. Only architecture specific changes. And a workaround for the Opteron prefetch bug. Also remove the obsolete LVM1 ioctl emulation code. --- arch/x86_64/ia32/ia32_ioctl.c | 445 ----------------------------------------- arch/x86_64/ia32/sys_ia32.c | 22 +- arch/x86_64/kernel/irq.c | 4 +- arch/x86_64/kernel/time.c | 4 +- include/asm-x86_64/floppy.h | 6 +- include/asm-x86_64/mpspec.h | 2 + include/asm-x86_64/msr.h | 3 + include/asm-x86_64/processor.h | 7 +- include/asm-x86_64/vsyscall.h | 1 - 9 files changed, 24 insertions(+), 470 deletions(-) (limited to 'include') diff --git a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c index 7c26e3706505..7f00c346a5d1 100644 --- a/arch/x86_64/ia32/ia32_ioctl.c +++ b/arch/x86_64/ia32/ia32_ioctl.c @@ -63,12 +63,6 @@ #include #include #include -#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE) -/* Ugh. This header really is not clean */ -#define min min -#define max max -#include -#endif /* LVM */ #include /* Ugly hack. */ @@ -2340,445 +2334,6 @@ static int do_atm_ioctl(unsigned int fd, unsigned int cmd32, unsigned long arg) return -EINVAL; } -#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE) -/* Ugh, LVM. Pitty it was not cleaned up before accepted :((. */ -/* AK: dev_t/kdev_t use here is somewhat dubious */ -typedef struct { - uint8_t vg_name[NAME_LEN]; - uint32_t vg_number; - uint32_t vg_access; - uint32_t vg_status; - uint32_t lv_max; - uint32_t lv_cur; - uint32_t lv_open; - uint32_t pv_max; - uint32_t pv_cur; - uint32_t pv_act; - uint32_t dummy; - uint32_t vgda; - uint32_t pe_size; - uint32_t pe_total; - uint32_t pe_allocated; - uint32_t pvg_total; - u32 proc; - u32 pv[ABS_MAX_PV + 1]; - u32 lv[ABS_MAX_LV + 1]; - uint8_t vg_uuid[UUID_LEN+1]; /* volume group UUID */ - uint8_t dummy1[200]; -} vg32_t; - -typedef struct { - uint8_t id[2]; - uint16_t version; - lvm_disk_data_t pv_on_disk; - lvm_disk_data_t vg_on_disk; - lvm_disk_data_t pv_namelist_on_disk; - lvm_disk_data_t lv_on_disk; - lvm_disk_data_t pe_on_disk; - uint8_t pv_name[NAME_LEN]; - uint8_t vg_name[NAME_LEN]; - uint8_t system_id[NAME_LEN]; - __u32 pv_dev; - uint32_t pv_number; - uint32_t pv_status; - uint32_t pv_allocatable; - uint32_t pv_size; - uint32_t lv_cur; - uint32_t pe_size; - uint32_t pe_total; - uint32_t pe_allocated; - uint32_t pe_stale; - u32 pe; - u32 inode; - uint8_t pv_uuid[UUID_LEN+1]; -} pv32_t; - -typedef struct { - char lv_name[NAME_LEN]; - u32 lv; -} lv_req32_t; - -typedef struct { - u32 lv_index; - u32 lv; - /* Transfer size because user space and kernel space differ */ - uint16_t size; -} lv_status_byindex_req32_t; - -typedef struct { - dev_t dev; - u32 lv; -} lv_status_bydev_req32_t; - -typedef struct { - uint8_t lv_name[NAME_LEN]; - kdev_t old_dev; - kdev_t new_dev; - u32 old_pe; - u32 new_pe; -} le_remap_req32_t; - -typedef struct { - char pv_name[NAME_LEN]; - u32 pv; -} pv_status_req32_t; - -typedef struct { - uint8_t lv_name[NAME_LEN]; - uint8_t vg_name[NAME_LEN]; - uint32_t lv_access; - uint32_t lv_status; - uint32_t lv_open; - kdev_t lv_dev; - uint32_t lv_number; - uint32_t lv_mirror_copies; - uint32_t lv_recovery; - uint32_t lv_schedule; - uint32_t lv_size; - u32 lv_current_pe; - uint32_t lv_current_le; - uint32_t lv_allocated_le; - uint32_t lv_stripes; - uint32_t lv_stripesize; - uint32_t lv_badblock; - uint32_t lv_allocation; - uint32_t lv_io_timeout; - uint32_t lv_read_ahead; - /* delta to version 1 starts here */ - u32 lv_snapshot_org; - u32 lv_snapshot_prev; - u32 lv_snapshot_next; - u32 lv_block_exception; - uint32_t lv_remap_ptr; - uint32_t lv_remap_end; - uint32_t lv_chunk_size; - uint32_t lv_snapshot_minor; - char dummy[200]; -} lv32_t; - -typedef struct { - u32 hash[2]; - u32 rsector_org; - kdev_t rdev_org; - u32 rsector_new; - kdev_t rdev_new; -} lv_block_exception32_t; - -static void put_lv_t(lv_t *l) -{ - if (l->lv_current_pe) vfree(l->lv_current_pe); - if (l->lv_block_exception) vfree(l->lv_block_exception); - kfree(l); -} - -static lv_t *get_lv_t(u32 p, int *errp) -{ - int err, i; - u32 ptr1, ptr2; - size_t size; - lv_block_exception32_t *lbe32; - lv_block_exception_t *lbe; - lv32_t *ul = (lv32_t *)A(p); - lv_t *l = (lv_t *) kmalloc(sizeof(lv_t), GFP_KERNEL); - - if (!l) { - *errp = -ENOMEM; - return NULL; - } - memset(l, 0, sizeof(lv_t)); - err = copy_from_user(l, ul, (long)&((lv32_t *)0)->lv_current_pe); - err |= __copy_from_user(&l->lv_current_le, &ul->lv_current_le, - ((long)&ul->lv_snapshot_org) - ((long)&ul->lv_current_le)); - err |= __copy_from_user(&l->lv_remap_ptr, &ul->lv_remap_ptr, - ((long)&ul->dummy[0]) - ((long)&ul->lv_remap_ptr)); - err |= __get_user(ptr1, &ul->lv_current_pe); - err |= __get_user(ptr2, &ul->lv_block_exception); - if (err) { - kfree(l); - *errp = -EFAULT; - return NULL; - } - if (ptr1) { - size = l->lv_allocated_le * sizeof(pe_t); - l->lv_current_pe = vmalloc(size); - if (l->lv_current_pe) - err = copy_from_user(l->lv_current_pe, (void *)A(ptr1), size); - } - if (!err && ptr2) { - size = l->lv_remap_end * sizeof(lv_block_exception_t); - l->lv_block_exception = lbe = vmalloc(size); - if (l->lv_block_exception) { - lbe32 = (lv_block_exception32_t *)A(ptr2); - memset(lbe, 0, size); - for (i = 0; i < l->lv_remap_end; i++, lbe++, lbe32++) { - err |= get_user(lbe->rsector_org, &lbe32->rsector_org); - err |= __get_user(lbe->rdev_org, &lbe32->rdev_org); - err |= __get_user(lbe->rsector_new, &lbe32->rsector_new); - err |= __get_user(lbe->rdev_new, &lbe32->rdev_new); - } - } - } - if (err || (ptr1 && !l->lv_current_pe) || (ptr2 && !l->lv_block_exception)) { - if (!err) - *errp = -ENOMEM; - else - *errp = -EFAULT; - put_lv_t(l); - return NULL; - } - return l; -} - -static int copy_lv_t(u32 ptr, lv_t *l) -{ - int err; - lv32_t *ul = (lv32_t *)A(ptr); - u32 ptr1; - size_t size; - - err = get_user(ptr1, &ul->lv_current_pe); - if (err) - return -EFAULT; - err = copy_to_user(ul, l, (long)&((lv32_t *)0)->lv_current_pe); - err |= __copy_to_user(&ul->lv_current_le, &l->lv_current_le, - ((long)&ul->lv_snapshot_org) - ((long)&ul->lv_current_le)); - err |= __copy_to_user(&ul->lv_remap_ptr, &l->lv_remap_ptr, - ((long)&ul->dummy[0]) - ((long)&ul->lv_remap_ptr)); - size = l->lv_allocated_le * sizeof(pe_t); - if (ptr1) - err |= __copy_to_user((void *)A(ptr1), l->lv_current_pe, size); - return err ? -EFAULT : 0; -} - -static int do_lvm_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) -{ - vg_t *v = NULL; - union { - lv_req_t lv_req; - le_remap_req_t le_remap; - lv_status_byindex_req_t lv_byindex; - lv_status_bydev_req_t lv_bydev; - pv_status_req_t pv_status; - } u; - pv_t p; - int err; - u32 ptr = 0; - int i; - mm_segment_t old_fs; - void *karg = &u; - - switch (cmd) { - case VG_STATUS: - v = kmalloc(sizeof(vg_t), GFP_KERNEL); - if (!v) - return -ENOMEM; - karg = v; - break; - - case VG_CREATE_OLD: - case VG_CREATE: - v = kmalloc(sizeof(vg_t), GFP_KERNEL); - if (!v) - return -ENOMEM; - if (copy_from_user(v, (void *)arg, (long)&((vg32_t *)0)->proc)) { - kfree(v); - return -EFAULT; - } - /* 'proc' field is unused, just NULL it out. */ - v->proc = NULL; - if (copy_from_user(v->vg_uuid, ((vg32_t *)arg)->vg_uuid, UUID_LEN+1)) { - kfree(v); - return -EFAULT; - } - - karg = v; - memset(v->pv, 0, sizeof(v->pv) + sizeof(v->lv)); - if (v->pv_max > ABS_MAX_PV || v->lv_max > ABS_MAX_LV) - return -EPERM; - for (i = 0; i < v->pv_max; i++) { - err = __get_user(ptr, &((vg32_t *)arg)->pv[i]); - if (err) - break; - if (ptr) { - v->pv[i] = kmalloc(sizeof(pv_t), GFP_KERNEL); - if (!v->pv[i]) { - err = -ENOMEM; - break; - } - err = copy_from_user(v->pv[i], (void *)A(ptr), - sizeof(pv32_t) - 8 - UUID_LEN+1); - if (err) { - err = -EFAULT; - break; - } - err = copy_from_user(v->pv[i]->pv_uuid, - ((pv32_t *)A(ptr))->pv_uuid, - UUID_LEN+1); - if (err) { - err = -EFAULT; - break; - } - - v->pv[i]->pe = NULL; - v->pv[i]->bd = NULL; - } - } - if (!err) { - for (i = 0; i < v->lv_max; i++) { - err = __get_user(ptr, &((vg32_t *)arg)->lv[i]); - if (err) - break; - if (ptr) { - v->lv[i] = get_lv_t(ptr, &err); - if (err) - break; - } - } - } - break; - - case LV_CREATE: - case LV_EXTEND: - case LV_REDUCE: - case LV_REMOVE: - case LV_RENAME: - case LV_STATUS_BYNAME: - err = copy_from_user(&u.pv_status, (void*)arg, sizeof(u.pv_status.pv_name)); - if (err) - return -EFAULT; - if (cmd != LV_REMOVE) { - err = __get_user(ptr, &((lv_req32_t *)arg)->lv); - if (err) - return err; - u.lv_req.lv = get_lv_t(ptr, &err); - } else - u.lv_req.lv = NULL; - break; - - case LV_STATUS_BYINDEX: - err = get_user(u.lv_byindex.lv_index, - &((lv_status_byindex_req32_t *)arg)->lv_index); - err |= __get_user(ptr, &((lv_status_byindex_req32_t *)arg)->lv); - if (err) - return err; - u.lv_byindex.lv = get_lv_t(ptr, &err); - break; - - case LV_STATUS_BYDEV: - err = get_user(u.lv_bydev.dev, &((lv_status_bydev_req32_t *)arg)->dev); - err |= __get_user(ptr, &((lv_status_bydev_req32_t *)arg)->lv); - if (err) - return err; - u.lv_bydev.lv = get_lv_t(ptr, &err); - break; - - case VG_EXTEND: - err = copy_from_user(&p, (void *)arg, sizeof(pv32_t) - 8 - UUID_LEN+1); - if (err) - return -EFAULT; - err = copy_from_user(p.pv_uuid, ((pv32_t *)arg)->pv_uuid, UUID_LEN+1); - if (err) - return -EFAULT; - p.pe = NULL; - p.bd = NULL; - karg = &p; - break; - - case PV_CHANGE: - case PV_STATUS: - err = copy_from_user(&u.pv_status, (void*)arg, sizeof(u.lv_req.lv_name)); - if (err) - return -EFAULT; - err = __get_user(ptr, &((pv_status_req32_t *)arg)->pv); - if (err) - return err; - u.pv_status.pv = &p; - if (cmd == PV_CHANGE) { - err = copy_from_user(&p, (void *)A(ptr), - sizeof(pv32_t) - 8 - UUID_LEN+1); - if (err) - return -EFAULT; - p.pe = NULL; - p.bd = NULL; - } - break; - }; - - old_fs = get_fs(); set_fs (KERNEL_DS); - err = sys_ioctl (fd, cmd, (unsigned long)karg); - set_fs (old_fs); - - switch (cmd) { - case VG_STATUS: - if (!err) { - if (copy_to_user((void *)arg, v, (long)&((vg32_t *)0)->proc) || - clear_user(&((vg32_t *)arg)->proc, sizeof(vg32_t) - (long)&((vg32_t *)0)->proc)) - err = -EFAULT; - } - if (copy_to_user(((vg32_t *)arg)->vg_uuid, v->vg_uuid, UUID_LEN+1)) { - err = -EFAULT; - } - kfree(v); - break; - - case VG_CREATE_OLD: - case VG_CREATE: - for (i = 0; i < v->pv_max; i++) { - if (v->pv[i]) - kfree(v->pv[i]); - } - for (i = 0; i < v->lv_max; i++) { - if (v->lv[i]) - put_lv_t(v->lv[i]); - } - kfree(v); - break; - - case LV_STATUS_BYNAME: - if (!err && u.lv_req.lv) - err = copy_lv_t(ptr, u.lv_req.lv); - /* Fall through */ - - case LV_CREATE: - case LV_EXTEND: - case LV_REDUCE: - if (u.lv_req.lv) - put_lv_t(u.lv_req.lv); - break; - - case LV_STATUS_BYINDEX: - if (u.lv_byindex.lv) { - if (!err) - err = copy_lv_t(ptr, u.lv_byindex.lv); - put_lv_t(u.lv_byindex.lv); - } - break; - - case LV_STATUS_BYDEV: - if (u.lv_bydev.lv) { - if (!err) - err = copy_lv_t(ptr, u.lv_bydev.lv); - put_lv_t(u.lv_byindex.lv); - } - break; - - case PV_STATUS: - if (!err) { - err = copy_to_user((void *)A(ptr), &p, sizeof(pv32_t) - 8 - UUID_LEN+1); - if (err) - return -EFAULT; - err = copy_to_user(((pv_t *)A(ptr))->pv_uuid, p.pv_uuid, UUID_LEN + 1); - if (err) - return -EFAULT; - } - break; - }; - - return err; -} -#endif - - static int ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) { return -EINVAL; diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index 6712c9475d0b..a5805d07522d 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c @@ -855,28 +855,14 @@ asmlinkage long sys32_time(int * tloc) return i; } -asmlinkage long -sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr, int options) -{ - return compat_sys_wait4(pid, stat_addr, options, NULL); -} - - extern asmlinkage long -sys_getrusage(int who, struct rusage *ru); +compat_sys_wait4(compat_pid_t pid, compat_uint_t * stat_addr, int options, + struct compat_rusage *ru); asmlinkage long -sys32_getrusage(int who, struct rusage32 *ru) +sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr, int options) { - struct rusage r; - int ret; - mm_segment_t old_fs = get_fs(); - - set_fs (KERNEL_DS); - ret = sys_getrusage(who, &r); - set_fs (old_fs); - if (put_rusage (ru, &r)) return -EFAULT; - return ret; + return compat_sys_wait4(pid, stat_addr, options, NULL); } int sys32_ni_syscall(int call) diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c index 8cdf91acfb0f..109a8ef0c56b 100644 --- a/arch/x86_64/kernel/irq.c +++ b/arch/x86_64/kernel/irq.c @@ -74,7 +74,7 @@ static void register_irq_proc (unsigned int irq); * Special irq handlers. */ -void no_action(int cpl, void *dev_id, struct pt_regs *regs) { } +irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) { return IRQ_NONE; } /* * Generic no controller code @@ -433,7 +433,7 @@ out: */ int request_irq(unsigned int irq, - void (*handler)(int, void *, struct pt_regs *), + irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id) diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index e4bcbac66d3c..18c60397a8ea 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -195,7 +195,7 @@ static void set_rtc_mmss(unsigned long nowtime) spin_unlock(&rtc_lock); } -static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { static unsigned long rtc_update = 0; @@ -255,6 +255,8 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) } write_sequnlock(&xtime_lock); + + return IRQ_HANDLED; } unsigned long get_cmos_time(void) diff --git a/include/asm-x86_64/floppy.h b/include/asm-x86_64/floppy.h index cc1eacfacefe..738395d6d31c 100644 --- a/include/asm-x86_64/floppy.h +++ b/include/asm-x86_64/floppy.h @@ -51,7 +51,7 @@ static char *virtual_dma_addr; static int virtual_dma_mode; static int doing_pdma; -static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) { register unsigned char st; @@ -109,12 +109,14 @@ static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) #endif doing_pdma = 0; floppy_interrupt(irq, dev_id, regs); - return; + return IRQ_HANDLED; } #ifdef TRACE_FLPY_INT if(!virtual_dma_count) dma_wait++; #endif + + return IRQ_HANDLED; } static void fd_disable_dma(void) diff --git a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h index 8ef120fe2274..8b2b0ed06e01 100644 --- a/include/asm-x86_64/mpspec.h +++ b/include/asm-x86_64/mpspec.h @@ -198,6 +198,8 @@ extern void mp_parse_prt (void); #endif /*CONFIG_X86_IO_APIC*/ #endif +extern void mp_config_ioapic_for_sci(int irq); + extern int using_apic_timer; #endif diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index c57f9da6efab..626bd0400c56 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h @@ -228,6 +228,9 @@ extern inline unsigned int cpuid_edx(unsigned int op) /* VIA Cyrix defined MSRs*/ #define MSR_VIA_FCR 0x1107 +#define MSR_VIA_LONGHAUL 0x110a +#define MSR_VIA_RNG 0x110b +#define MSR_VIA_BCR2 0x1147 /* Intel defined MSRs. */ #define MSR_IA32_P5_MC_ADDR 0 diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 49d3c6ee414d..7021042a4444 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h @@ -304,11 +304,16 @@ extern inline void sync_core(void) #define cpu_has_fpu 1 +#if 0 +/* disabled for now to work around opteron errata #91. Also gcc 3.2 + doesn't like this in some cases. */ #define ARCH_HAS_PREFETCH +#define prefetch(x) __builtin_prefetch((x),0,1) +#endif + #define ARCH_HAS_PREFETCHW #define ARCH_HAS_SPINLOCK_PREFETCH -#define prefetch(x) __builtin_prefetch((x),0,1) #define prefetchw(x) __builtin_prefetch((x),1,1) #define spin_lock_prefetch(x) prefetchw(x) #define cpu_relax() rep_nop() diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index 4c6a539ca7dc..86947472e9fd 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h @@ -1,7 +1,6 @@ #ifndef _ASM_X86_64_VSYSCALL_H_ #define _ASM_X86_64_VSYSCALL_H_ -#include #include enum vsyscall_num { -- cgit v1.2.3