aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/topology_64.h2
-rw-r--r--arch/sparc/mm/fault_32.c4
-rw-r--r--arch/sparc/mm/fault_64.c4
-rw-r--r--arch/sparc/mm/highmem.c4
-rw-r--r--arch/sparc/mm/init_64.c2
5 files changed, 9 insertions, 7 deletions
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h
index d1761df5cca6..01d17046225a 100644
--- a/arch/sparc/include/asm/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
@@ -41,7 +41,7 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
41#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) 41#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
42#define topology_core_id(cpu) (cpu_data(cpu).core_id) 42#define topology_core_id(cpu) (cpu_data(cpu).core_id)
43#define topology_core_cpumask(cpu) (&cpu_core_sib_map[cpu]) 43#define topology_core_cpumask(cpu) (&cpu_core_sib_map[cpu])
44#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) 44#define topology_sibling_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
45#endif /* CONFIG_SMP */ 45#endif /* CONFIG_SMP */
46 46
47extern cpumask_t cpu_core_map[NR_CPUS]; 47extern cpumask_t cpu_core_map[NR_CPUS];
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
index 70d817154fe8..c399e7b3b035 100644
--- a/arch/sparc/mm/fault_32.c
+++ b/arch/sparc/mm/fault_32.c
@@ -21,6 +21,7 @@
21#include <linux/perf_event.h> 21#include <linux/perf_event.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/kdebug.h> 23#include <linux/kdebug.h>
24#include <linux/uaccess.h>
24 25
25#include <asm/page.h> 26#include <asm/page.h>
26#include <asm/pgtable.h> 27#include <asm/pgtable.h>
@@ -29,7 +30,6 @@
29#include <asm/setup.h> 30#include <asm/setup.h>
30#include <asm/smp.h> 31#include <asm/smp.h>
31#include <asm/traps.h> 32#include <asm/traps.h>
32#include <asm/uaccess.h>
33 33
34#include "mm_32.h" 34#include "mm_32.h"
35 35
@@ -196,7 +196,7 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
196 * If we're in an interrupt or have no user 196 * If we're in an interrupt or have no user
197 * context, we must not take the fault.. 197 * context, we must not take the fault..
198 */ 198 */
199 if (in_atomic() || !mm) 199 if (pagefault_disabled() || !mm)
200 goto no_context; 200 goto no_context;
201 201
202 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); 202 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index 479823249429..e9268ea1a68d 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -22,12 +22,12 @@
22#include <linux/kdebug.h> 22#include <linux/kdebug.h>
23#include <linux/percpu.h> 23#include <linux/percpu.h>
24#include <linux/context_tracking.h> 24#include <linux/context_tracking.h>
25#include <linux/uaccess.h>
25 26
26#include <asm/page.h> 27#include <asm/page.h>
27#include <asm/pgtable.h> 28#include <asm/pgtable.h>
28#include <asm/openprom.h> 29#include <asm/openprom.h>
29#include <asm/oplib.h> 30#include <asm/oplib.h>
30#include <asm/uaccess.h>
31#include <asm/asi.h> 31#include <asm/asi.h>
32#include <asm/lsu.h> 32#include <asm/lsu.h>
33#include <asm/sections.h> 33#include <asm/sections.h>
@@ -330,7 +330,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
330 * If we're in an interrupt or have no user 330 * If we're in an interrupt or have no user
331 * context, we must not take the fault.. 331 * context, we must not take the fault..
332 */ 332 */
333 if (in_atomic() || !mm) 333 if (faulthandler_disabled() || !mm)
334 goto intr_or_no_mm; 334 goto intr_or_no_mm;
335 335
336 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); 336 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
diff --git a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c
index 449f864f0cef..a454ec5ff07a 100644
--- a/arch/sparc/mm/highmem.c
+++ b/arch/sparc/mm/highmem.c
@@ -53,7 +53,7 @@ void *kmap_atomic(struct page *page)
53 unsigned long vaddr; 53 unsigned long vaddr;
54 long idx, type; 54 long idx, type;
55 55
56 /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ 56 preempt_disable();
57 pagefault_disable(); 57 pagefault_disable();
58 if (!PageHighMem(page)) 58 if (!PageHighMem(page))
59 return page_address(page); 59 return page_address(page);
@@ -91,6 +91,7 @@ void __kunmap_atomic(void *kvaddr)
91 91
92 if (vaddr < FIXADDR_START) { // FIXME 92 if (vaddr < FIXADDR_START) { // FIXME
93 pagefault_enable(); 93 pagefault_enable();
94 preempt_enable();
94 return; 95 return;
95 } 96 }
96 97
@@ -126,5 +127,6 @@ void __kunmap_atomic(void *kvaddr)
126 127
127 kmap_atomic_idx_pop(); 128 kmap_atomic_idx_pop();
128 pagefault_enable(); 129 pagefault_enable();
130 preempt_enable();
129} 131}
130EXPORT_SYMBOL(__kunmap_atomic); 132EXPORT_SYMBOL(__kunmap_atomic);
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 559cb744112c..c5d08b89a96c 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2738,7 +2738,7 @@ void hugetlb_setup(struct pt_regs *regs)
2738 struct mm_struct *mm = current->mm; 2738 struct mm_struct *mm = current->mm;
2739 struct tsb_config *tp; 2739 struct tsb_config *tp;
2740 2740
2741 if (in_atomic() || !mm) { 2741 if (faulthandler_disabled() || !mm) {
2742 const struct exception_table_entry *entry; 2742 const struct exception_table_entry *entry;
2743 2743
2744 entry = search_exception_tables(regs->tpc); 2744 entry = search_exception_tables(regs->tpc);