aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/include/asm/cmpxchg.h2
-rw-r--r--arch/avr32/include/asm/io.h1
-rw-r--r--arch/avr32/include/asm/mm-arch-hooks.h15
-rw-r--r--arch/avr32/include/asm/uaccess.h12
-rw-r--r--arch/avr32/mm/fault.c4
5 files changed, 26 insertions, 8 deletions
diff --git a/arch/avr32/include/asm/cmpxchg.h b/arch/avr32/include/asm/cmpxchg.h
index 962a6aeab787..366bbeaeb405 100644
--- a/arch/avr32/include/asm/cmpxchg.h
+++ b/arch/avr32/include/asm/cmpxchg.h
@@ -70,8 +70,6 @@ extern unsigned long __cmpxchg_u64_unsupported_on_32bit_kernels(
70 if something tries to do an invalid cmpxchg(). */ 70 if something tries to do an invalid cmpxchg(). */
71extern void __cmpxchg_called_with_bad_pointer(void); 71extern void __cmpxchg_called_with_bad_pointer(void);
72 72
73#define __HAVE_ARCH_CMPXCHG 1
74
75static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, 73static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
76 unsigned long new, int size) 74 unsigned long new, int size)
77{ 75{
diff --git a/arch/avr32/include/asm/io.h b/arch/avr32/include/asm/io.h
index 4f5ec2bb7172..e998ff5d8e1a 100644
--- a/arch/avr32/include/asm/io.h
+++ b/arch/avr32/include/asm/io.h
@@ -296,6 +296,7 @@ extern void __iounmap(void __iomem *addr);
296 __iounmap(addr) 296 __iounmap(addr)
297 297
298#define ioremap_wc ioremap_nocache 298#define ioremap_wc ioremap_nocache
299#define ioremap_wt ioremap_nocache
299 300
300#define cached(addr) P1SEGADDR(addr) 301#define cached(addr) P1SEGADDR(addr)
301#define uncached(addr) P2SEGADDR(addr) 302#define uncached(addr) P2SEGADDR(addr)
diff --git a/arch/avr32/include/asm/mm-arch-hooks.h b/arch/avr32/include/asm/mm-arch-hooks.h
new file mode 100644
index 000000000000..145452ffbdad
--- /dev/null
+++ b/arch/avr32/include/asm/mm-arch-hooks.h
@@ -0,0 +1,15 @@
1/*
2 * Architecture specific mm hooks
3 *
4 * Copyright (C) 2015, IBM Corporation
5 * Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef _ASM_AVR32_MM_ARCH_HOOKS_H
13#define _ASM_AVR32_MM_ARCH_HOOKS_H
14
15#endif /* _ASM_AVR32_MM_ARCH_HOOKS_H */
diff --git a/arch/avr32/include/asm/uaccess.h b/arch/avr32/include/asm/uaccess.h
index a46f7cf3e1ea..68cf638faf48 100644
--- a/arch/avr32/include/asm/uaccess.h
+++ b/arch/avr32/include/asm/uaccess.h
@@ -97,7 +97,8 @@ static inline __kernel_size_t __copy_from_user(void *to,
97 * @x: Value to copy to user space. 97 * @x: Value to copy to user space.
98 * @ptr: Destination address, in user space. 98 * @ptr: Destination address, in user space.
99 * 99 *
100 * Context: User context only. This function may sleep. 100 * Context: User context only. This function may sleep if pagefaults are
101 * enabled.
101 * 102 *
102 * This macro copies a single simple value from kernel space to user 103 * This macro copies a single simple value from kernel space to user
103 * space. It supports simple types like char and int, but not larger 104 * space. It supports simple types like char and int, but not larger
@@ -116,7 +117,8 @@ static inline __kernel_size_t __copy_from_user(void *to,
116 * @x: Variable to store result. 117 * @x: Variable to store result.
117 * @ptr: Source address, in user space. 118 * @ptr: Source address, in user space.
118 * 119 *
119 * Context: User context only. This function may sleep. 120 * Context: User context only. This function may sleep if pagefaults are
121 * enabled.
120 * 122 *
121 * This macro copies a single simple variable from user space to kernel 123 * This macro copies a single simple variable from user space to kernel
122 * space. It supports simple types like char and int, but not larger 124 * space. It supports simple types like char and int, but not larger
@@ -136,7 +138,8 @@ static inline __kernel_size_t __copy_from_user(void *to,
136 * @x: Value to copy to user space. 138 * @x: Value to copy to user space.
137 * @ptr: Destination address, in user space. 139 * @ptr: Destination address, in user space.
138 * 140 *
139 * Context: User context only. This function may sleep. 141 * Context: User context only. This function may sleep if pagefaults are
142 * enabled.
140 * 143 *
141 * This macro copies a single simple value from kernel space to user 144 * This macro copies a single simple value from kernel space to user
142 * space. It supports simple types like char and int, but not larger 145 * space. It supports simple types like char and int, but not larger
@@ -158,7 +161,8 @@ static inline __kernel_size_t __copy_from_user(void *to,
158 * @x: Variable to store result. 161 * @x: Variable to store result.
159 * @ptr: Source address, in user space. 162 * @ptr: Source address, in user space.
160 * 163 *
161 * Context: User context only. This function may sleep. 164 * Context: User context only. This function may sleep if pagefaults are
165 * enabled.
162 * 166 *
163 * This macro copies a single simple variable from user space to kernel 167 * This macro copies a single simple variable from user space to kernel
164 * space. It supports simple types like char and int, but not larger 168 * space. It supports simple types like char and int, but not larger
diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c
index d223a8b57c1e..c03533937a9f 100644
--- a/arch/avr32/mm/fault.c
+++ b/arch/avr32/mm/fault.c
@@ -14,11 +14,11 @@
14#include <linux/pagemap.h> 14#include <linux/pagemap.h>
15#include <linux/kdebug.h> 15#include <linux/kdebug.h>
16#include <linux/kprobes.h> 16#include <linux/kprobes.h>
17#include <linux/uaccess.h>
17 18
18#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
19#include <asm/sysreg.h> 20#include <asm/sysreg.h>
20#include <asm/tlb.h> 21#include <asm/tlb.h>
21#include <asm/uaccess.h>
22 22
23#ifdef CONFIG_KPROBES 23#ifdef CONFIG_KPROBES
24static inline int notify_page_fault(struct pt_regs *regs, int trap) 24static inline int notify_page_fault(struct pt_regs *regs, int trap)
@@ -81,7 +81,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs)
81 * If we're in an interrupt or have no user context, we must 81 * If we're in an interrupt or have no user context, we must
82 * not take the fault... 82 * not take the fault...
83 */ 83 */
84 if (in_atomic() || !mm || regs->sr & SYSREG_BIT(GM)) 84 if (faulthandler_disabled() || !mm || regs->sr & SYSREG_BIT(GM))
85 goto no_context; 85 goto no_context;
86 86
87 local_irq_enable(); 87 local_irq_enable();