diff options
Diffstat (limited to 'arch/alpha/include')
| -rw-r--r-- | arch/alpha/include/asm/Kbuild | 6 | ||||
| -rw-r--r-- | arch/alpha/include/asm/atomic.h | 5 | ||||
| -rw-r--r-- | arch/alpha/include/asm/barrier.h | 25 | ||||
| -rw-r--r-- | arch/alpha/include/asm/bitops.h | 3 | ||||
| -rw-r--r-- | arch/alpha/include/asm/cputime.h | 6 | ||||
| -rw-r--r-- | arch/alpha/include/asm/machvec.h | 22 | ||||
| -rw-r--r-- | arch/alpha/include/asm/pal.h | 71 | ||||
| -rw-r--r-- | arch/alpha/include/asm/pci.h | 5 | ||||
| -rw-r--r-- | arch/alpha/include/asm/pgalloc.h | 5 | ||||
| -rw-r--r-- | arch/alpha/include/asm/ptrace.h | 5 | ||||
| -rw-r--r-- | arch/alpha/include/asm/rtc.h | 11 | ||||
| -rw-r--r-- | arch/alpha/include/asm/string.h | 24 | ||||
| -rw-r--r-- | arch/alpha/include/asm/thread_info.h | 8 | ||||
| -rw-r--r-- | arch/alpha/include/uapi/asm/errno.h | 2 | ||||
| -rw-r--r-- | arch/alpha/include/uapi/asm/pal.h | 1 | ||||
| -rw-r--r-- | arch/alpha/include/uapi/asm/socket.h | 6 | 
16 files changed, 132 insertions, 73 deletions
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index a6e85f448c1..96e54bed508 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild @@ -1,5 +1,9 @@ -generic-y += clkdev.h +generic-y += clkdev.h +generic-y += cputime.h  generic-y += exec.h +generic-y += hash.h +generic-y += mcs_spinlock.h +generic-y += preempt.h  generic-y += trace_clock.h diff --git a/arch/alpha/include/asm/atomic.h b/arch/alpha/include/asm/atomic.h index 78b03ef39f6..ed60a1ee1ed 100644 --- a/arch/alpha/include/asm/atomic.h +++ b/arch/alpha/include/asm/atomic.h @@ -292,9 +292,4 @@ static inline long atomic64_dec_if_positive(atomic64_t *v)  #define atomic_dec(v) atomic_sub(1,(v))  #define atomic64_dec(v) atomic64_sub(1,(v)) -#define smp_mb__before_atomic_dec()	smp_mb() -#define smp_mb__after_atomic_dec()	smp_mb() -#define smp_mb__before_atomic_inc()	smp_mb() -#define smp_mb__after_atomic_inc()	smp_mb() -  #endif /* _ALPHA_ATOMIC_H */ diff --git a/arch/alpha/include/asm/barrier.h b/arch/alpha/include/asm/barrier.h index ce8860a0b32..3832bdb794f 100644 --- a/arch/alpha/include/asm/barrier.h +++ b/arch/alpha/include/asm/barrier.h @@ -3,33 +3,18 @@  #include <asm/compiler.h> -#define mb() \ -__asm__ __volatile__("mb": : :"memory") +#define mb()	__asm__ __volatile__("mb": : :"memory") +#define rmb()	__asm__ __volatile__("mb": : :"memory") +#define wmb()	__asm__ __volatile__("wmb": : :"memory") -#define rmb() \ -__asm__ __volatile__("mb": : :"memory") - -#define wmb() \ -__asm__ __volatile__("wmb": : :"memory") - -#define read_barrier_depends() \ -__asm__ __volatile__("mb": : :"memory") +#define read_barrier_depends() __asm__ __volatile__("mb": : :"memory")  #ifdef CONFIG_SMP  #define __ASM_SMP_MB	"\tmb\n" -#define smp_mb()	mb() -#define smp_rmb()	rmb() -#define smp_wmb()	wmb() -#define smp_read_barrier_depends()	read_barrier_depends()  #else  #define __ASM_SMP_MB -#define smp_mb()	barrier() -#define smp_rmb()	barrier() -#define smp_wmb()	barrier() -#define smp_read_barrier_depends()	do { } while (0)  #endif -#define set_mb(var, value) \ -do { var = value; mb(); } while (0) +#include <asm-generic/barrier.h>  #endif		/* __BARRIER_H */ diff --git a/arch/alpha/include/asm/bitops.h b/arch/alpha/include/asm/bitops.h index a19ba5efea4..4bdfbd444e6 100644 --- a/arch/alpha/include/asm/bitops.h +++ b/arch/alpha/include/asm/bitops.h @@ -53,9 +53,6 @@ __set_bit(unsigned long nr, volatile void * addr)  	*m |= 1 << (nr & 31);  } -#define smp_mb__before_clear_bit()	smp_mb() -#define smp_mb__after_clear_bit()	smp_mb() -  static inline void  clear_bit(unsigned long nr, volatile void * addr)  { diff --git a/arch/alpha/include/asm/cputime.h b/arch/alpha/include/asm/cputime.h deleted file mode 100644 index 19577fd9323..00000000000 --- a/arch/alpha/include/asm/cputime.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ALPHA_CPUTIME_H -#define __ALPHA_CPUTIME_H - -#include <asm-generic/cputime.h> - -#endif /* __ALPHA_CPUTIME_H */ diff --git a/arch/alpha/include/asm/machvec.h b/arch/alpha/include/asm/machvec.h index 72dbf235927..75cb3641ed2 100644 --- a/arch/alpha/include/asm/machvec.h +++ b/arch/alpha/include/asm/machvec.h @@ -33,6 +33,7 @@ struct alpha_machine_vector  	int nr_irqs;  	int rtc_port; +	int rtc_boot_cpu_only;  	unsigned int max_asn;  	unsigned long max_isa_dma_address;  	unsigned long irq_probe_mask; @@ -95,9 +96,6 @@ struct alpha_machine_vector  	struct _alpha_agp_info *(*agp_info)(void); -	unsigned int (*rtc_get_time)(struct rtc_time *); -	int (*rtc_set_time)(struct rtc_time *); -  	const char *vector_name;  	/* NUMA information */ @@ -126,13 +124,19 @@ extern struct alpha_machine_vector alpha_mv;  #ifdef CONFIG_ALPHA_GENERIC  extern int alpha_using_srm; +extern int alpha_using_qemu;  #else -#ifdef CONFIG_ALPHA_SRM -#define alpha_using_srm 1 -#else -#define alpha_using_srm 0 -#endif +# ifdef CONFIG_ALPHA_SRM +#  define alpha_using_srm 1 +# else +#  define alpha_using_srm 0 +# endif +# ifdef CONFIG_ALPHA_QEMU +#  define alpha_using_qemu 1 +# else +#  define alpha_using_qemu 0 +# endif  #endif /* GENERIC */ -#endif +#endif /* __KERNEL__ */  #endif /* __ALPHA_MACHVEC_H */ diff --git a/arch/alpha/include/asm/pal.h b/arch/alpha/include/asm/pal.h index 6fcd2b5b08f..5422a47646f 100644 --- a/arch/alpha/include/asm/pal.h +++ b/arch/alpha/include/asm/pal.h @@ -89,6 +89,7 @@ __CALL_PAL_W1(wrmces, unsigned long);  __CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long);  __CALL_PAL_W1(wrusp, unsigned long);  __CALL_PAL_W1(wrvptptr, unsigned long); +__CALL_PAL_RW1(wtint, unsigned long, unsigned long);  /*   * TB routines.. @@ -111,5 +112,75 @@ __CALL_PAL_W1(wrvptptr, unsigned long);  #define tbiap()		__tbi(-1, /* no second argument */)  #define tbia()		__tbi(-2, /* no second argument */) +/* + * QEMU Cserv routines.. + */ + +static inline unsigned long +qemu_get_walltime(void) +{ +	register unsigned long v0 __asm__("$0"); +	register unsigned long a0 __asm__("$16") = 3; + +	asm("call_pal %2 # cserve get_time" +	    : "=r"(v0), "+r"(a0) +	    : "i"(PAL_cserve) +	    : "$17", "$18", "$19", "$20", "$21"); + +	return v0; +} + +static inline unsigned long +qemu_get_alarm(void) +{ +	register unsigned long v0 __asm__("$0"); +	register unsigned long a0 __asm__("$16") = 4; + +	asm("call_pal %2 # cserve get_alarm" +	    : "=r"(v0), "+r"(a0) +	    : "i"(PAL_cserve) +	    : "$17", "$18", "$19", "$20", "$21"); + +	return v0; +} + +static inline void +qemu_set_alarm_rel(unsigned long expire) +{ +	register unsigned long a0 __asm__("$16") = 5; +	register unsigned long a1 __asm__("$17") = expire; + +	asm volatile("call_pal %2 # cserve set_alarm_rel" +		     : "+r"(a0), "+r"(a1) +		     : "i"(PAL_cserve) +		     : "$0", "$18", "$19", "$20", "$21"); +} + +static inline void +qemu_set_alarm_abs(unsigned long expire) +{ +	register unsigned long a0 __asm__("$16") = 6; +	register unsigned long a1 __asm__("$17") = expire; + +	asm volatile("call_pal %2 # cserve set_alarm_abs" +		     : "+r"(a0), "+r"(a1) +		     : "i"(PAL_cserve) +		     : "$0", "$18", "$19", "$20", "$21"); +} + +static inline unsigned long +qemu_get_vmtime(void) +{ +	register unsigned long v0 __asm__("$0"); +	register unsigned long a0 __asm__("$16") = 7; + +	asm("call_pal %2 # cserve get_time" +	    : "=r"(v0), "+r"(a0) +	    : "i"(PAL_cserve) +	    : "$17", "$18", "$19", "$20", "$21"); + +	return v0; +} +  #endif /* !__ASSEMBLY__ */  #endif /* __ALPHA_PAL_H */ diff --git a/arch/alpha/include/asm/pci.h b/arch/alpha/include/asm/pci.h index d01afb78919..f7f680f7457 100644 --- a/arch/alpha/include/asm/pci.h +++ b/arch/alpha/include/asm/pci.h @@ -59,11 +59,6 @@ struct pci_controller {  extern void pcibios_set_master(struct pci_dev *dev); -extern inline void pcibios_penalize_isa_irq(int irq, int active) -{ -	/* We don't do dynamic PCI IRQ allocation */ -} -  /* IOMMU controls.  */  /* The PCI address space does not equal the physical memory address space. diff --git a/arch/alpha/include/asm/pgalloc.h b/arch/alpha/include/asm/pgalloc.h index bc2a0daf2d9..aab14a019c2 100644 --- a/arch/alpha/include/asm/pgalloc.h +++ b/arch/alpha/include/asm/pgalloc.h @@ -72,7 +72,10 @@ pte_alloc_one(struct mm_struct *mm, unsigned long address)  	if (!pte)  		return NULL;  	page = virt_to_page(pte); -	pgtable_page_ctor(page); +	if (!pgtable_page_ctor(page)) { +		__free_page(page); +		return NULL; +	}  	return page;  } diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h index 21128505ddb..9047c2fe8f2 100644 --- a/arch/alpha/include/asm/ptrace.h +++ b/arch/alpha/include/asm/ptrace.h @@ -19,4 +19,9 @@  #define force_successful_syscall_return() (current_pt_regs()->r0 = 0) +static inline unsigned long regs_return_value(struct pt_regs *regs) +{ +	return regs->r0; +} +  #endif diff --git a/arch/alpha/include/asm/rtc.h b/arch/alpha/include/asm/rtc.h index d70408d3667..f71c3b0ed36 100644 --- a/arch/alpha/include/asm/rtc.h +++ b/arch/alpha/include/asm/rtc.h @@ -1,12 +1 @@ -#ifndef _ALPHA_RTC_H -#define _ALPHA_RTC_H - -#if defined(CONFIG_ALPHA_MARVEL) && defined(CONFIG_SMP) \ - || defined(CONFIG_ALPHA_GENERIC) -# define get_rtc_time		alpha_mv.rtc_get_time -# define set_rtc_time		alpha_mv.rtc_set_time -#endif -  #include <asm-generic/rtc.h> - -#endif diff --git a/arch/alpha/include/asm/string.h b/arch/alpha/include/asm/string.h index b02b8a28294..c2911f59170 100644 --- a/arch/alpha/include/asm/string.h +++ b/arch/alpha/include/asm/string.h @@ -22,15 +22,27 @@ extern void * __memcpy(void *, const void *, size_t);  #define __HAVE_ARCH_MEMSET  extern void * __constant_c_memset(void *, unsigned long, size_t); +extern void * ___memset(void *, int, size_t);  extern void * __memset(void *, int, size_t);  extern void * memset(void *, int, size_t); -#define memset(s, c, n)							    \ -(__builtin_constant_p(c)						    \ - ? (__builtin_constant_p(n) && (c) == 0					    \ -    ? __builtin_memset((s),0,(n)) 					    \ -    : __constant_c_memset((s),0x0101010101010101UL*(unsigned char)(c),(n))) \ - : __memset((s),(c),(n))) +/* For gcc 3.x, we cannot have the inline function named "memset" because +   the __builtin_memset will attempt to resolve to the inline as well, +   leading to a "sorry" about unimplemented recursive inlining.  */ +extern inline void *__memset(void *s, int c, size_t n) +{ +	if (__builtin_constant_p(c)) { +		if (__builtin_constant_p(n)) { +			return __builtin_memset(s, c, n); +		} else { +			unsigned long c8 = (c & 0xff) * 0x0101010101010101UL; +			return __constant_c_memset(s, c8, n); +		} +	} +	return ___memset(s, c, n); +} + +#define memset __memset  #define __HAVE_ARCH_STRCPY  extern char * strcpy(char *,const char *); diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index 52cd2a4a3ff..48bbea6898b 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h @@ -58,8 +58,6 @@ register struct thread_info *__current_thread_info __asm__("$8");  #define THREAD_SIZE_ORDER 1  #define THREAD_SIZE (2*PAGE_SIZE) -#define PREEMPT_ACTIVE		0x40000000 -  /*   * Thread information flags:   * - these are process state flags and used from assembly @@ -72,13 +70,17 @@ register struct thread_info *__current_thread_info __asm__("$8");  #define TIF_NOTIFY_RESUME	1	/* callback before returning to user */  #define TIF_SIGPENDING		2	/* signal pending */  #define TIF_NEED_RESCHED	3	/* rescheduling necessary */ +#define TIF_SYSCALL_AUDIT	4	/* syscall audit active */  #define TIF_DIE_IF_KERNEL	9	/* dik recursion lock */  #define TIF_MEMDIE		13	/* is terminating due to OOM killer */ +#define TIF_POLLING_NRFLAG	14	/* idle is polling for TIF_NEED_RESCHED */  #define _TIF_SYSCALL_TRACE	(1<<TIF_SYSCALL_TRACE)  #define _TIF_SIGPENDING		(1<<TIF_SIGPENDING)  #define _TIF_NEED_RESCHED	(1<<TIF_NEED_RESCHED)  #define _TIF_NOTIFY_RESUME	(1<<TIF_NOTIFY_RESUME) +#define _TIF_SYSCALL_AUDIT	(1<<TIF_SYSCALL_AUDIT) +#define _TIF_POLLING_NRFLAG	(1<<TIF_POLLING_NRFLAG)  /* Work to do on interrupt/exception return.  */  #define _TIF_WORK_MASK		(_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ @@ -92,8 +94,6 @@ register struct thread_info *__current_thread_info __asm__("$8");  #define TS_UAC_NOFIX		0x0002	/* ! flags as they match          */  #define TS_UAC_SIGBUS		0x0004	/* ! userspace part of 'osf_sysinfo' */  #define TS_RESTORE_SIGMASK	0x0008	/* restore signal mask in do_signal() */ -#define TS_POLLING		0x0010	/* idle task polling need_resched, -					   skip sending interrupt */  #ifndef __ASSEMBLY__  #define HAVE_SET_RESTORE_SIGMASK	1 diff --git a/arch/alpha/include/uapi/asm/errno.h b/arch/alpha/include/uapi/asm/errno.h index e5f29ca2818..17f92aa76b2 100644 --- a/arch/alpha/include/uapi/asm/errno.h +++ b/arch/alpha/include/uapi/asm/errno.h @@ -43,7 +43,7 @@  #define	EUSERS		68	/* Too many users */  #define	EDQUOT		69	/* Quota exceeded */ -#define	ESTALE		70	/* Stale NFS file handle */ +#define	ESTALE		70	/* Stale file handle */  #define	EREMOTE		71	/* Object is remote */  #define	ENOLCK		77	/* No record locks available */ diff --git a/arch/alpha/include/uapi/asm/pal.h b/arch/alpha/include/uapi/asm/pal.h index 3c0ce08e5f5..dfc8140b908 100644 --- a/arch/alpha/include/uapi/asm/pal.h +++ b/arch/alpha/include/uapi/asm/pal.h @@ -46,6 +46,7 @@  #define PAL_rdusp	58  #define PAL_whami	60  #define PAL_retsys	61 +#define PAL_wtint	62  #define PAL_rti		63 diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h index 467de010ea7..3de1394bcab 100644 --- a/arch/alpha/include/uapi/asm/socket.h +++ b/arch/alpha/include/uapi/asm/socket.h @@ -81,6 +81,10 @@  #define SO_SELECT_ERR_QUEUE	45 -#define SO_BUSY_POLL			46 +#define SO_BUSY_POLL		46 + +#define SO_MAX_PACING_RATE	47 + +#define SO_BPF_EXTENSIONS	48  #endif /* _UAPI_ASM_SOCKET_H */  | 
