diff options
Diffstat (limited to 'include/asm-xtensa')
-rw-r--r-- | include/asm-xtensa/atomic.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/checksum.h | 4 | ||||
-rw-r--r-- | include/asm-xtensa/delay.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/dma.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/hardirq.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/hw_irq.h | 4 | ||||
-rw-r--r-- | include/asm-xtensa/ide.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/io.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/irq.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/mmu_context.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/page.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/pgalloc.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/platform.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/rwsem.h | 7 | ||||
-rw-r--r-- | include/asm-xtensa/system.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/uaccess.h | 34 | ||||
-rw-r--r-- | include/asm-xtensa/unistd.h | 21 | ||||
-rw-r--r-- | include/asm-xtensa/vga.h | 2 |
18 files changed, 11 insertions, 73 deletions
diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index fe105a12392..5c267202106 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h @@ -13,7 +13,6 @@ #ifndef _XTENSA_ATOMIC_H #define _XTENSA_ATOMIC_H -#include <linux/config.h> #include <linux/stringify.h> typedef struct { volatile int counter; } atomic_t; diff --git a/include/asm-xtensa/checksum.h b/include/asm-xtensa/checksum.h index 81a797ae3ab..03114f8d1e1 100644 --- a/include/asm-xtensa/checksum.h +++ b/include/asm-xtensa/checksum.h @@ -11,7 +11,6 @@ #ifndef _XTENSA_CHECKSUM_H #define _XTENSA_CHECKSUM_H -#include <linux/config.h> #include <linux/in6.h> #include <xtensa/config/core.h> @@ -44,8 +43,7 @@ asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, i * Note: when you get a NULL pointer exception here this means someone * passed in an incorrect kernel address to one of these functions. * - * If you use these functions directly please don't forget the - * verify_area(). + * If you use these functions directly please don't forget the access_ok(). */ static inline unsigned int csum_partial_copy_nocheck ( const char *src, char *dst, diff --git a/include/asm-xtensa/delay.h b/include/asm-xtensa/delay.h index 1bc601ec362..e1d8c9e010c 100644 --- a/include/asm-xtensa/delay.h +++ b/include/asm-xtensa/delay.h @@ -12,7 +12,6 @@ #ifndef _XTENSA_DELAY_H #define _XTENSA_DELAY_H -#include <linux/config.h> #include <asm/processor.h> #include <asm/param.h> diff --git a/include/asm-xtensa/dma.h b/include/asm-xtensa/dma.h index 1c22b023458..db2633f6778 100644 --- a/include/asm-xtensa/dma.h +++ b/include/asm-xtensa/dma.h @@ -11,7 +11,6 @@ #ifndef _XTENSA_DMA_H #define _XTENSA_DMA_H -#include <linux/config.h> #include <asm/io.h> /* need byte IO */ #include <xtensa/config/core.h> diff --git a/include/asm-xtensa/hardirq.h b/include/asm-xtensa/hardirq.h index aa9c1adf68d..87cb19d1b10 100644 --- a/include/asm-xtensa/hardirq.h +++ b/include/asm-xtensa/hardirq.h @@ -11,7 +11,6 @@ #ifndef _XTENSA_HARDIRQ_H #define _XTENSA_HARDIRQ_H -#include <linux/config.h> #include <linux/cache.h> #include <asm/irq.h> diff --git a/include/asm-xtensa/hw_irq.h b/include/asm-xtensa/hw_irq.h index ccf436249ea..3ddbea759b2 100644 --- a/include/asm-xtensa/hw_irq.h +++ b/include/asm-xtensa/hw_irq.h @@ -11,8 +11,4 @@ #ifndef _XTENSA_HW_IRQ_H #define _XTENSA_HW_IRQ_H -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) -{ -} - #endif diff --git a/include/asm-xtensa/ide.h b/include/asm-xtensa/ide.h index b523cd4a486..6b912742a42 100644 --- a/include/asm-xtensa/ide.h +++ b/include/asm-xtensa/ide.h @@ -14,7 +14,6 @@ #ifdef __KERNEL__ -#include <linux/config.h> #ifndef MAX_HWIFS # define MAX_HWIFS 1 diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h index c5c13985bbe..556e5eed34f 100644 --- a/include/asm-xtensa/io.h +++ b/include/asm-xtensa/io.h @@ -12,7 +12,6 @@ #define _XTENSA_IO_H #ifdef __KERNEL__ -#include <linux/config.h> #include <asm/byteorder.h> #include <linux/types.h> diff --git a/include/asm-xtensa/irq.h b/include/asm-xtensa/irq.h index d984e955938..049fde7e752 100644 --- a/include/asm-xtensa/irq.h +++ b/include/asm-xtensa/irq.h @@ -11,7 +11,6 @@ #ifndef _XTENSA_IRQ_H #define _XTENSA_IRQ_H -#include <linux/config.h> #include <asm/platform/hardware.h> #include <xtensa/config/core.h> diff --git a/include/asm-xtensa/mmu_context.h b/include/asm-xtensa/mmu_context.h index 364a7b057bf..af683a74a4e 100644 --- a/include/asm-xtensa/mmu_context.h +++ b/include/asm-xtensa/mmu_context.h @@ -13,7 +13,6 @@ #ifndef _XTENSA_MMU_CONTEXT_H #define _XTENSA_MMU_CONTEXT_H -#include <linux/config.h> #include <linux/stringify.h> #include <asm/pgtable.h> diff --git a/include/asm-xtensa/page.h b/include/asm-xtensa/page.h index 992bac5c125..40f4c6c3f58 100644 --- a/include/asm-xtensa/page.h +++ b/include/asm-xtensa/page.h @@ -14,7 +14,6 @@ #ifdef __KERNEL__ #include <asm/processor.h> -#include <linux/config.h> /* * PAGE_SHIFT determines the page size diff --git a/include/asm-xtensa/pgalloc.h b/include/asm-xtensa/pgalloc.h index 734a8d06039..d56ddf2055e 100644 --- a/include/asm-xtensa/pgalloc.h +++ b/include/asm-xtensa/pgalloc.h @@ -13,7 +13,6 @@ #ifdef __KERNEL__ -#include <linux/config.h> #include <linux/threads.h> #include <linux/highmem.h> #include <asm/processor.h> diff --git a/include/asm-xtensa/platform.h b/include/asm-xtensa/platform.h index 36163894bc2..48135a9718b 100644 --- a/include/asm-xtensa/platform.h +++ b/include/asm-xtensa/platform.h @@ -13,7 +13,6 @@ #ifndef _XTENSA_PLATFORM_H #define _XTENSA_PLATFORM_H -#include <linux/config.h> #include <linux/types.h> #include <linux/pci.h> diff --git a/include/asm-xtensa/rwsem.h b/include/asm-xtensa/rwsem.h index 3c02b0e033f..abcd86dc5ab 100644 --- a/include/asm-xtensa/rwsem.h +++ b/include/asm-xtensa/rwsem.h @@ -172,4 +172,9 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem) return atomic_add_return(delta, (atomic_t *)(&sem->count)); } -#endif /* _XTENSA_RWSEM_XADD_H */ +static inline int rwsem_is_locked(struct rw_semaphore *sem) +{ + return (sem->count != 0); +} + +#endif /* _XTENSA_RWSEM_H */ diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index b29f7ae6a08..f986170bd2a 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h @@ -11,7 +11,6 @@ #ifndef _XTENSA_SYSTEM_H #define _XTENSA_SYSTEM_H -#include <linux/config.h> #include <linux/stringify.h> #include <asm/processor.h> diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h index 06a22b83ba1..88a64e1144d 100644 --- a/include/asm-xtensa/uaccess.h +++ b/include/asm-xtensa/uaccess.h @@ -154,35 +154,6 @@ .Laccess_ok_\@: .endm -/* - * verify_area determines whether a memory access is allowed. It's - * mostly an unnecessary wrapper for access_ok, but we provide it as a - * duplicate of the verify_area() C inline function below. See the - * equivalent C version below for clarity. - * - * On error, verify_area branches to a label indicated by parameter - * <error>. This implies that the macro falls through to the next - * instruction on success. - * - * Note that we assume success is the common case, and we optimize the - * branch fall-through case on success. - * - * On Entry: - * <aa> register containing memory address - * <as> register containing memory size - * <at> temp register - * <error> label to branch to on error; implies fall-through - * macro on success - * On Exit: - * <aa> preserved - * <as> preserved - * <at> destroyed - */ - .macro verify_area aa, as, at, sp, error - access_ok \at, \aa, \as, \sp, \error - .endm - - #else /* __ASSEMBLY__ not defined */ #include <linux/sched.h> @@ -211,11 +182,6 @@ #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) -static inline int verify_area(int type, const void * addr, unsigned long size) -{ - return access_ok(type,addr,size) ? 0 : -EFAULT; -} - /* * These are the main single-value transfer routines. They * automatically use the right size if we just have the right pointer diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h index 6b39d6609d9..5e1b99dc4ab 100644 --- a/include/asm-xtensa/unistd.h +++ b/include/asm-xtensa/unistd.h @@ -11,8 +11,6 @@ #ifndef _XTENSA_UNISTD_H #define _XTENSA_UNISTD_H -#include <linux/linkage.h> - #define __NR_spill 0 #define __NR_exit 1 #define __NR_read 3 @@ -221,21 +219,9 @@ #define SYSXTENSA_COUNT 5 /* count of syscall0 functions*/ #ifdef __KERNEL__ -#define __syscall_return(type, res) return ((type)(res)) -#else -#define __syscall_return(type, res) \ -do { \ - if ((unsigned long)(res) >= (unsigned long)(-125)) { \ - /* Avoid using "res" which is declared to be in register r2; \ - * errno might expand to a function call and clobber it. */ \ - int __err = -(res); \ - errno = __err; \ - res = -1; \ - } \ - return (type) (res); \ -} while (0) -#endif +#include <linux/linkage.h> +#define __syscall_return(type, res) return ((type)(res)) /* Tensilica's xt-xcc compiler is much more agressive at code * optimization than gcc. Multiple __asm__ statements are @@ -429,11 +415,10 @@ static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp) */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); -#ifdef __KERNEL__ #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYS_UTIME #define __ARCH_WANT_SYS_LLSEEK #define __ARCH_WANT_SYS_RT_SIGACTION -#endif +#endif /* __KERNEL__ */ #endif /* _XTENSA_UNISTD_H */ diff --git a/include/asm-xtensa/vga.h b/include/asm-xtensa/vga.h index 23d82f6acb5..1fd8cab3a29 100644 --- a/include/asm-xtensa/vga.h +++ b/include/asm-xtensa/vga.h @@ -11,7 +11,7 @@ #ifndef _XTENSA_VGA_H #define _XTENSA_VGA_H -#define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x) +#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x) #define vga_readb(x) (*(x)) #define vga_writeb(x,y) (*(y) = (x)) |