diff options
Diffstat (limited to 'include/asm-frv')
-rw-r--r-- | include/asm-frv/bitops.h | 5 | ||||
-rw-r--r-- | include/asm-frv/ipc.h | 1 | ||||
-rw-r--r-- | include/asm-frv/scatterlist.h | 14 | ||||
-rw-r--r-- | include/asm-frv/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-frv/system.h | 5 | ||||
-rw-r--r-- | include/asm-frv/thread_info.h | 5 | ||||
-rw-r--r-- | include/asm-frv/tlbflush.h | 3 | ||||
-rw-r--r-- | include/asm-frv/types.h | 6 |
8 files changed, 22 insertions, 18 deletions
diff --git a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h index f8560edf59f..e29de7131b7 100644 --- a/include/asm-frv/bitops.h +++ b/include/asm-frv/bitops.h @@ -21,6 +21,10 @@ #ifdef __KERNEL__ +#ifndef _LINUX_BITOPS_H +#error only <linux/bitops.h> can be included directly +#endif + #include <asm-generic/bitops/ffz.h> /* @@ -302,6 +306,7 @@ int __ilog2_u64(u64 n) #include <asm-generic/bitops/sched.h> #include <asm-generic/bitops/hweight.h> +#include <asm-generic/bitops/lock.h> #include <asm-generic/bitops/ext2-non-atomic.h> diff --git a/include/asm-frv/ipc.h b/include/asm-frv/ipc.h deleted file mode 100644 index a46e3d9c2a3..00000000000 --- a/include/asm-frv/ipc.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/ipc.h> diff --git a/include/asm-frv/scatterlist.h b/include/asm-frv/scatterlist.h index 8e827fa853f..2e7143b5a7a 100644 --- a/include/asm-frv/scatterlist.h +++ b/include/asm-frv/scatterlist.h @@ -4,25 +4,27 @@ #include <asm/types.h> /* - * Drivers must set either ->address or (preferred) ->page and ->offset + * Drivers must set either ->address or (preferred) page and ->offset * to indicate where data must be transferred to/from. * - * Using ->page is recommended since it handles highmem data as well as + * Using page is recommended since it handles highmem data as well as * low mem. ->address is restricted to data which has a virtual mapping, and - * it will go away in the future. Updating to ->page can be automated very + * it will go away in the future. Updating to page can be automated very * easily -- something like * * sg->address = some_ptr; * * can be rewritten as * - * sg->page = virt_to_page(some_ptr); - * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK; + * sg_set_buf(sg, some_ptr, length); * * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens */ struct scatterlist { - struct page *page; /* Location for highmem page, if any */ +#ifdef CONFIG_DEBUG_SG + unsigned long sg_magic; +#endif + unsigned long page_link; unsigned int offset; /* for highmem, page offset */ dma_addr_t dma_address; diff --git a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h index 09586528e00..d7aaa1911a1 100644 --- a/include/asm-frv/semaphore.h +++ b/include/asm-frv/semaphore.h @@ -49,7 +49,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index 6931af525da..9f5663ba19f 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h @@ -253,7 +253,10 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); __typeof__(*(ptr)) __xg_new = (new); \ \ switch (sizeof(__xg_orig)) { \ - case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break; \ + case 4: __xg_orig = (__force __typeof__(*ptr)) \ + __cmpxchg_32((__force uint32_t *)__xg_ptr, \ + (__force uint32_t)__xg_test, \ + (__force uint32_t)__xg_new); break; \ default: \ __xg_orig = 0; \ asm volatile("break"); \ diff --git a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h index cc5433e78b5..348b8f1df17 100644 --- a/include/asm-frv/thread_info.h +++ b/include/asm-frv/thread_info.h @@ -88,9 +88,8 @@ register struct thread_info *__current_thread_info asm("gr15"); ({ \ struct thread_info *ret; \ \ - ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \ - if (ret) \ - memset(ret, 0, THREAD_SIZE); \ + ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \ + \ ret; \ }) #else diff --git a/include/asm-frv/tlbflush.h b/include/asm-frv/tlbflush.h index da3a3179a85..7ac5eafc5d9 100644 --- a/include/asm-frv/tlbflush.h +++ b/include/asm-frv/tlbflush.h @@ -57,8 +57,6 @@ do { \ #define __flush_tlb_global() flush_tlb_all() #define flush_tlb() flush_tlb_all() #define flush_tlb_kernel_range(start, end) flush_tlb_all() -#define flush_tlb_pgtables(mm,start,end) \ - asm volatile("movgs %0,scr0 ! movgs %0,scr1" :: "r"(ULONG_MAX) : "memory"); #else @@ -67,7 +65,6 @@ do { \ #define flush_tlb_mm(mm) BUG() #define flush_tlb_page(vma,addr) BUG() #define flush_tlb_range(mm,start,end) BUG() -#define flush_tlb_pgtables(mm,start,end) BUG() #define flush_tlb_kernel_range(start, end) BUG() #endif diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h index 1b6d1923b25..767e5ed71c4 100644 --- a/include/asm-frv/types.h +++ b/include/asm-frv/types.h @@ -30,9 +30,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64; -typedef unsigned long long __u64; +#if defined(__GNUC__) +__extension__ typedef __signed__ long long __s64; +__extension__ typedef unsigned long long __u64; #endif #endif /* __ASSEMBLY__ */ |