diff options
Diffstat (limited to 'kernel/arch/nios2/include/asm')
-rw-r--r-- | kernel/arch/nios2/include/asm/Kbuild | 3 | ||||
-rw-r--r-- | kernel/arch/nios2/include/asm/cmpxchg.h | 47 | ||||
-rw-r--r-- | kernel/arch/nios2/include/asm/io.h | 1 |
3 files changed, 3 insertions, 48 deletions
diff --git a/kernel/arch/nios2/include/asm/Kbuild b/kernel/arch/nios2/include/asm/Kbuild index 24b3d8999..d63330e88 100644 --- a/kernel/arch/nios2/include/asm/Kbuild +++ b/kernel/arch/nios2/include/asm/Kbuild @@ -30,6 +30,7 @@ generic-y += kmap_types.h generic-y += kvm_para.h generic-y += local.h generic-y += mcs_spinlock.h +generic-y += mm-arch-hooks.h generic-y += mman.h generic-y += module.h generic-y += msgbuf.h @@ -40,7 +41,6 @@ generic-y += poll.h generic-y += posix_types.h generic-y += preempt.h generic-y += resource.h -generic-y += scatterlist.h generic-y += sections.h generic-y += segment.h generic-y += sembuf.h @@ -61,4 +61,5 @@ generic-y += types.h generic-y += unaligned.h generic-y += user.h generic-y += vga.h +generic-y += word-at-a-time.h generic-y += xor.h diff --git a/kernel/arch/nios2/include/asm/cmpxchg.h b/kernel/arch/nios2/include/asm/cmpxchg.h index 859387115..a7978f14d 100644 --- a/kernel/arch/nios2/include/asm/cmpxchg.h +++ b/kernel/arch/nios2/include/asm/cmpxchg.h @@ -9,53 +9,6 @@ #ifndef _ASM_NIOS2_CMPXCHG_H #define _ASM_NIOS2_CMPXCHG_H -#include <linux/irqflags.h> - -#define xchg(ptr, x) \ - ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) - -struct __xchg_dummy { unsigned long a[100]; }; -#define __xg(x) ((volatile struct __xchg_dummy *)(x)) - -static inline unsigned long __xchg(unsigned long x, volatile void *ptr, - int size) -{ - unsigned long tmp, flags; - - local_irq_save(flags); - - switch (size) { - case 1: - __asm__ __volatile__( - "ldb %0, %2\n" - "stb %1, %2\n" - : "=&r" (tmp) - : "r" (x), "m" (*__xg(ptr)) - : "memory"); - break; - case 2: - __asm__ __volatile__( - "ldh %0, %2\n" - "sth %1, %2\n" - : "=&r" (tmp) - : "r" (x), "m" (*__xg(ptr)) - : "memory"); - break; - case 4: - __asm__ __volatile__( - "ldw %0, %2\n" - "stw %1, %2\n" - : "=&r" (tmp) - : "r" (x), "m" (*__xg(ptr)) - : "memory"); - break; - } - - local_irq_restore(flags); - return tmp; -} - #include <asm-generic/cmpxchg.h> -#include <asm-generic/cmpxchg-local.h> #endif /* _ASM_NIOS2_CMPXCHG_H */ diff --git a/kernel/arch/nios2/include/asm/io.h b/kernel/arch/nios2/include/asm/io.h index 6e24d7cce..c5a62da22 100644 --- a/kernel/arch/nios2/include/asm/io.h +++ b/kernel/arch/nios2/include/asm/io.h @@ -46,6 +46,7 @@ static inline void iounmap(void __iomem *addr) } #define ioremap_wc ioremap_nocache +#define ioremap_wt ioremap_nocache /* Pages to physical address... */ #define page_to_phys(page) virt_to_phys(page_to_virt(page)) |