diff options
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/atomic.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/asm/cache.h | 1 | ||||
-rw-r--r-- | arch/xtensa/include/asm/hardirq.h | 15 | ||||
-rw-r--r-- | arch/xtensa/include/asm/scatterlist.h | 23 | ||||
-rw-r--r-- | arch/xtensa/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/irq.c | 9 | ||||
-rw-r--r-- | arch/xtensa/kernel/time.c | 5 | ||||
-rw-r--r-- | arch/xtensa/kernel/vectors.S | 2 | ||||
-rw-r--r-- | arch/xtensa/mm/fault.c | 14 |
9 files changed, 11 insertions, 62 deletions
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h index 22d6dde42619..a96a0619d0b7 100644 --- a/arch/xtensa/include/asm/atomic.h +++ b/arch/xtensa/include/asm/atomic.h | |||
@@ -46,7 +46,7 @@ | |||
46 | * | 46 | * |
47 | * Atomically reads the value of @v. | 47 | * Atomically reads the value of @v. |
48 | */ | 48 | */ |
49 | #define atomic_read(v) ((v)->counter) | 49 | #define atomic_read(v) (*(volatile int *)&(v)->counter) |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * atomic_set - set atomic variable | 52 | * atomic_set - set atomic variable |
diff --git a/arch/xtensa/include/asm/cache.h b/arch/xtensa/include/asm/cache.h index f04c9891142f..ed8cd3cbd499 100644 --- a/arch/xtensa/include/asm/cache.h +++ b/arch/xtensa/include/asm/cache.h | |||
@@ -29,5 +29,6 @@ | |||
29 | # define CACHE_WAY_SIZE ICACHE_WAY_SIZE | 29 | # define CACHE_WAY_SIZE ICACHE_WAY_SIZE |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | ||
32 | 33 | ||
33 | #endif /* _XTENSA_CACHE_H */ | 34 | #endif /* _XTENSA_CACHE_H */ |
diff --git a/arch/xtensa/include/asm/hardirq.h b/arch/xtensa/include/asm/hardirq.h index 87cb19d1b10c..26664cef8f11 100644 --- a/arch/xtensa/include/asm/hardirq.h +++ b/arch/xtensa/include/asm/hardirq.h | |||
@@ -11,18 +11,9 @@ | |||
11 | #ifndef _XTENSA_HARDIRQ_H | 11 | #ifndef _XTENSA_HARDIRQ_H |
12 | #define _XTENSA_HARDIRQ_H | 12 | #define _XTENSA_HARDIRQ_H |
13 | 13 | ||
14 | #include <linux/cache.h> | ||
15 | #include <asm/irq.h> | ||
16 | |||
17 | /* headers.S is sensitive to the offsets of these fields */ | ||
18 | typedef struct { | ||
19 | unsigned int __softirq_pending; | ||
20 | unsigned int __syscall_count; | ||
21 | struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ | ||
22 | unsigned int __nmi_count; /* arch dependent */ | ||
23 | } ____cacheline_aligned irq_cpustat_t; | ||
24 | |||
25 | void ack_bad_irq(unsigned int irq); | 14 | void ack_bad_irq(unsigned int irq); |
26 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 15 | #define ack_bad_irq ack_bad_irq |
16 | |||
17 | #include <asm-generic/hardirq.h> | ||
27 | 18 | ||
28 | #endif /* _XTENSA_HARDIRQ_H */ | 19 | #endif /* _XTENSA_HARDIRQ_H */ |
diff --git a/arch/xtensa/include/asm/scatterlist.h b/arch/xtensa/include/asm/scatterlist.h index 810080bb0a2b..b1f9fdc1d5ba 100644 --- a/arch/xtensa/include/asm/scatterlist.h +++ b/arch/xtensa/include/asm/scatterlist.h | |||
@@ -11,28 +11,7 @@ | |||
11 | #ifndef _XTENSA_SCATTERLIST_H | 11 | #ifndef _XTENSA_SCATTERLIST_H |
12 | #define _XTENSA_SCATTERLIST_H | 12 | #define _XTENSA_SCATTERLIST_H |
13 | 13 | ||
14 | #include <asm/types.h> | 14 | #include <asm-generic/scatterlist.h> |
15 | |||
16 | struct scatterlist { | ||
17 | #ifdef CONFIG_DEBUG_SG | ||
18 | unsigned long sg_magic; | ||
19 | #endif | ||
20 | unsigned long page_link; | ||
21 | unsigned int offset; | ||
22 | dma_addr_t dma_address; | ||
23 | unsigned int length; | ||
24 | }; | ||
25 | |||
26 | /* | ||
27 | * These macros should be used after a pci_map_sg call has been done | ||
28 | * to get bus addresses of each of the SG entries and their lengths. | ||
29 | * You should only work with the number of sg entries pci_map_sg | ||
30 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
31 | * is 0. | ||
32 | */ | ||
33 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
34 | #define sg_dma_len(sg) ((sg)->length) | ||
35 | |||
36 | 15 | ||
37 | #define ISA_DMA_THRESHOLD (~0UL) | 16 | #define ISA_DMA_THRESHOLD (~0UL) |
38 | 17 | ||
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h index 13165641cc51..7be8accb0b0c 100644 --- a/arch/xtensa/include/asm/thread_info.h +++ b/arch/xtensa/include/asm/thread_info.h | |||
@@ -129,7 +129,7 @@ static inline struct thread_info *current_thread_info(void) | |||
129 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 129 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
130 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ | 130 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ |
131 | #define TIF_IRET 4 /* return with iret */ | 131 | #define TIF_IRET 4 /* return with iret */ |
132 | #define TIF_MEMDIE 5 | 132 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ |
133 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ | 133 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ |
134 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 134 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
135 | #define TIF_FREEZE 17 /* is freezing for suspend */ | 135 | #define TIF_FREEZE 17 /* is freezing for suspend */ |
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 8cd38484e130..c64a5d387de5 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -27,15 +27,6 @@ static unsigned int cached_irq_mask; | |||
27 | atomic_t irq_err_count; | 27 | atomic_t irq_err_count; |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * 'what should we do if we get a hw irq event on an illegal vector'. | ||
31 | * each architecture has to answer this themselves. | ||
32 | */ | ||
33 | void ack_bad_irq(unsigned int irq) | ||
34 | { | ||
35 | printk("unexpected IRQ trap at vector %02x\n", irq); | ||
36 | } | ||
37 | |||
38 | /* | ||
39 | * do_IRQ handles all normal device IRQ's (the special | 30 | * do_IRQ handles all normal device IRQ's (the special |
40 | * SMP cross-CPU interrupts have their own specific | 31 | * SMP cross-CPU interrupts have their own specific |
41 | * handlers). | 32 | * handlers). |
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 19f7df30937f..19df764f6399 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c | |||
@@ -60,11 +60,6 @@ static struct irqaction timer_irqaction = { | |||
60 | 60 | ||
61 | void __init time_init(void) | 61 | void __init time_init(void) |
62 | { | 62 | { |
63 | /* FIXME: xtime&wall_to_monotonic are set in timekeeping_init. */ | ||
64 | read_persistent_clock(&xtime); | ||
65 | set_normalized_timespec(&wall_to_monotonic, | ||
66 | -xtime.tv_sec, -xtime.tv_nsec); | ||
67 | |||
68 | #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT | 63 | #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT |
69 | printk("Calibrating CPU frequency "); | 64 | printk("Calibrating CPU frequency "); |
70 | platform_calibrate_ccount(); | 65 | platform_calibrate_ccount(); |
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index 74a7518faf16..70066e3582d0 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S | |||
@@ -44,14 +44,12 @@ | |||
44 | 44 | ||
45 | #include <linux/linkage.h> | 45 | #include <linux/linkage.h> |
46 | #include <asm/ptrace.h> | 46 | #include <asm/ptrace.h> |
47 | #include <asm/ptrace.h> | ||
48 | #include <asm/current.h> | 47 | #include <asm/current.h> |
49 | #include <asm/asm-offsets.h> | 48 | #include <asm/asm-offsets.h> |
50 | #include <asm/pgtable.h> | 49 | #include <asm/pgtable.h> |
51 | #include <asm/processor.h> | 50 | #include <asm/processor.h> |
52 | #include <asm/page.h> | 51 | #include <asm/page.h> |
53 | #include <asm/thread_info.h> | 52 | #include <asm/thread_info.h> |
54 | #include <asm/processor.h> | ||
55 | 53 | ||
56 | #define WINDOW_VECTORS_SIZE 0x180 | 54 | #define WINDOW_VECTORS_SIZE 0x180 |
57 | 55 | ||
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index bc0733359a88..e367e3026436 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c | |||
@@ -105,7 +105,6 @@ good_area: | |||
105 | * make sure we exit gracefully rather than endlessly redo | 105 | * make sure we exit gracefully rather than endlessly redo |
106 | * the fault. | 106 | * the fault. |
107 | */ | 107 | */ |
108 | survive: | ||
109 | fault = handle_mm_fault(mm, vma, address, is_write ? FAULT_FLAG_WRITE : 0); | 108 | fault = handle_mm_fault(mm, vma, address, is_write ? FAULT_FLAG_WRITE : 0); |
110 | if (unlikely(fault & VM_FAULT_ERROR)) { | 109 | if (unlikely(fault & VM_FAULT_ERROR)) { |
111 | if (fault & VM_FAULT_OOM) | 110 | if (fault & VM_FAULT_OOM) |
@@ -146,15 +145,10 @@ bad_area: | |||
146 | */ | 145 | */ |
147 | out_of_memory: | 146 | out_of_memory: |
148 | up_read(&mm->mmap_sem); | 147 | up_read(&mm->mmap_sem); |
149 | if (is_global_init(current)) { | 148 | if (!user_mode(regs)) |
150 | yield(); | 149 | bad_page_fault(regs, address, SIGKILL); |
151 | down_read(&mm->mmap_sem); | 150 | else |
152 | goto survive; | 151 | pagefault_out_of_memory(); |
153 | } | ||
154 | printk("VM: killing process %s\n", current->comm); | ||
155 | if (user_mode(regs)) | ||
156 | do_group_exit(SIGKILL); | ||
157 | bad_page_fault(regs, address, SIGKILL); | ||
158 | return; | 152 | return; |
159 | 153 | ||
160 | do_sigbus: | 154 | do_sigbus: |