diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 12:04:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 12:04:58 -0400 |
commit | 514b1923e1549162f1597f81113c0e5b72aed691 (patch) | |
tree | b804bc621d81e022593584fc608df563c8c6b8ca | |
parent | 6f73b3629f774c6cba589b15fd095112b25ca923 (diff) | |
parent | 5042ab91c4272e158748180ae70a2e097f9e90e3 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel
Pull Hexagon architecture changes from Richard Kuo:
"These are mostly cleanups and feedback remaining from the original
upstreaming."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
various Kconfig cleanup and old platform build code removal
hexagon/mm/vm_fault.c: Port OOM changes to do_page_fault
arch/hexagon/kernel/dma.c: make function static
Remove unneeded include of version.h from arch/hexagon/include/asm/spinlock_types.h
Hexagon: Use resource_size function
-rw-r--r-- | arch/hexagon/Kconfig | 21 | ||||
-rw-r--r-- | arch/hexagon/Makefile | 5 | ||||
-rw-r--r-- | arch/hexagon/include/asm/spinlock_types.h | 2 | ||||
-rw-r--r-- | arch/hexagon/kernel/dma.c | 2 | ||||
-rw-r--r-- | arch/hexagon/kernel/time.c | 6 | ||||
-rw-r--r-- | arch/hexagon/mm/vm_fault.c | 22 |
6 files changed, 24 insertions, 34 deletions
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 22615dd02219..bc979f770980 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig | |||
@@ -13,8 +13,8 @@ config HEXAGON | |||
13 | # select ARCH_REQUIRE_GPIOLIB | 13 | # select ARCH_REQUIRE_GPIOLIB |
14 | # select HAVE_CLK | 14 | # select HAVE_CLK |
15 | # select IRQ_PER_CPU | 15 | # select IRQ_PER_CPU |
16 | select HAVE_IRQ_WORK | ||
17 | # select GENERIC_PENDING_IRQ if SMP | 16 | # select GENERIC_PENDING_IRQ if SMP |
17 | select HAVE_IRQ_WORK | ||
18 | select GENERIC_ATOMIC64 | 18 | select GENERIC_ATOMIC64 |
19 | select HAVE_PERF_EVENTS | 19 | select HAVE_PERF_EVENTS |
20 | select HAVE_GENERIC_HARDIRQS | 20 | select HAVE_GENERIC_HARDIRQS |
@@ -26,7 +26,7 @@ config HEXAGON | |||
26 | select NO_IOPORT | 26 | select NO_IOPORT |
27 | select GENERIC_IOMAP | 27 | select GENERIC_IOMAP |
28 | select GENERIC_SMP_IDLE_THREAD | 28 | select GENERIC_SMP_IDLE_THREAD |
29 | # mostly generic routines, with some accelerated ones | 29 | select STACKTRACE_SUPPORT |
30 | ---help--- | 30 | ---help--- |
31 | Qualcomm Hexagon is a processor architecture designed for high | 31 | Qualcomm Hexagon is a processor architecture designed for high |
32 | performance and low power across a wide variety of applications. | 32 | performance and low power across a wide variety of applications. |
@@ -73,15 +73,6 @@ config GENERIC_CSUM | |||
73 | config GENERIC_IRQ_PROBE | 73 | config GENERIC_IRQ_PROBE |
74 | def_bool y | 74 | def_bool y |
75 | 75 | ||
76 | #config ZONE_DMA | ||
77 | # bool | ||
78 | # default y | ||
79 | |||
80 | config HAS_DMA | ||
81 | bool | ||
82 | select HAVE_DMA_ATTRS | ||
83 | default y | ||
84 | |||
85 | config NEED_SG_DMA_LENGTH | 76 | config NEED_SG_DMA_LENGTH |
86 | def_bool y | 77 | def_bool y |
87 | 78 | ||
@@ -114,14 +105,11 @@ config GENERIC_BUG | |||
114 | def_bool y | 105 | def_bool y |
115 | depends on BUG | 106 | depends on BUG |
116 | 107 | ||
117 | config BUG | ||
118 | def_bool y | ||
119 | |||
120 | menu "Machine selection" | 108 | menu "Machine selection" |
121 | 109 | ||
122 | choice | 110 | choice |
123 | prompt "System type" | 111 | prompt "System type" |
124 | default HEXAGON_ARCH_V2 | 112 | default HEXAGON_COMET |
125 | 113 | ||
126 | config HEXAGON_COMET | 114 | config HEXAGON_COMET |
127 | bool "Comet Board" | 115 | bool "Comet Board" |
@@ -194,8 +182,7 @@ source "kernel/Kconfig.hz" | |||
194 | source "kernel/time/Kconfig" | 182 | source "kernel/time/Kconfig" |
195 | 183 | ||
196 | config GENERIC_GPIO | 184 | config GENERIC_GPIO |
197 | bool "Generic GPIO support" | 185 | def_bool n |
198 | default n | ||
199 | 186 | ||
200 | endmenu | 187 | endmenu |
201 | 188 | ||
diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile index e27d030846ae..d00d900b2566 100644 --- a/arch/hexagon/Makefile +++ b/arch/hexagon/Makefile | |||
@@ -50,8 +50,3 @@ head-y := arch/hexagon/kernel/head.o | |||
50 | core-y += arch/hexagon/kernel/ \ | 50 | core-y += arch/hexagon/kernel/ \ |
51 | arch/hexagon/mm/ \ | 51 | arch/hexagon/mm/ \ |
52 | arch/hexagon/lib/ | 52 | arch/hexagon/lib/ |
53 | |||
54 | # arch/hexagon/platform/common/ | ||
55 | # | ||
56 | #core-$(CONFIG_HEXAGON_COMET) += arch/hexagon/platform/comet/ | ||
57 | #machine-$(CONFIG_HEXAGON_COMET) := comet | ||
diff --git a/arch/hexagon/include/asm/spinlock_types.h b/arch/hexagon/include/asm/spinlock_types.h index 5e937af1c4ad..99b5a7575c21 100644 --- a/arch/hexagon/include/asm/spinlock_types.h +++ b/arch/hexagon/include/asm/spinlock_types.h | |||
@@ -21,8 +21,6 @@ | |||
21 | #ifndef _ASM_SPINLOCK_TYPES_H | 21 | #ifndef _ASM_SPINLOCK_TYPES_H |
22 | #define _ASM_SPINLOCK_TYPES_H | 22 | #define _ASM_SPINLOCK_TYPES_H |
23 | 23 | ||
24 | #include <linux/version.h> | ||
25 | |||
26 | #ifndef __LINUX_SPINLOCK_TYPES_H | 24 | #ifndef __LINUX_SPINLOCK_TYPES_H |
27 | # error "please don't include this file directly" | 25 | # error "please don't include this file directly" |
28 | #endif | 26 | #endif |
diff --git a/arch/hexagon/kernel/dma.c b/arch/hexagon/kernel/dma.c index 0f2367cc5493..2b48751aa5f7 100644 --- a/arch/hexagon/kernel/dma.c +++ b/arch/hexagon/kernel/dma.c | |||
@@ -54,7 +54,7 @@ static struct gen_pool *coherent_pool; | |||
54 | 54 | ||
55 | /* Allocates from a pool of uncached memory that was reserved at boot time */ | 55 | /* Allocates from a pool of uncached memory that was reserved at boot time */ |
56 | 56 | ||
57 | void *hexagon_dma_alloc_coherent(struct device *dev, size_t size, | 57 | static void *hexagon_dma_alloc_coherent(struct device *dev, size_t size, |
58 | dma_addr_t *dma_addr, gfp_t flag, | 58 | dma_addr_t *dma_addr, gfp_t flag, |
59 | struct dma_attrs *attrs) | 59 | struct dma_attrs *attrs) |
60 | { | 60 | { |
diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c index 5d9b33b67935..36ba64185711 100644 --- a/arch/hexagon/kernel/time.c +++ b/arch/hexagon/kernel/time.c | |||
@@ -201,12 +201,10 @@ void __init time_init_deferred(void) | |||
201 | resource = rtos_timer_device.resource; | 201 | resource = rtos_timer_device.resource; |
202 | 202 | ||
203 | /* ioremap here means this has to run later, after paging init */ | 203 | /* ioremap here means this has to run later, after paging init */ |
204 | rtos_timer = ioremap(resource->start, resource->end | 204 | rtos_timer = ioremap(resource->start, resource_size(resource)); |
205 | - resource->start + 1); | ||
206 | 205 | ||
207 | if (!rtos_timer) { | 206 | if (!rtos_timer) { |
208 | release_mem_region(resource->start, resource->end | 207 | release_mem_region(resource->start, resource_size(resource)); |
209 | - resource->start + 1); | ||
210 | } | 208 | } |
211 | clocksource_register_khz(&hexagon_clocksource, pcycle_freq_mhz * 1000); | 209 | clocksource_register_khz(&hexagon_clocksource, pcycle_freq_mhz * 1000); |
212 | 210 | ||
diff --git a/arch/hexagon/mm/vm_fault.c b/arch/hexagon/mm/vm_fault.c index c10b76ff9d65..06695cc4fe58 100644 --- a/arch/hexagon/mm/vm_fault.c +++ b/arch/hexagon/mm/vm_fault.c | |||
@@ -53,6 +53,8 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs) | |||
53 | int si_code = SEGV_MAPERR; | 53 | int si_code = SEGV_MAPERR; |
54 | int fault; | 54 | int fault; |
55 | const struct exception_table_entry *fixup; | 55 | const struct exception_table_entry *fixup; |
56 | unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | | ||
57 | (cause > 0 ? FAULT_FLAG_WRITE : 0); | ||
56 | 58 | ||
57 | /* | 59 | /* |
58 | * If we're in an interrupt or have no user context, | 60 | * If we're in an interrupt or have no user context, |
@@ -63,6 +65,7 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs) | |||
63 | 65 | ||
64 | local_irq_enable(); | 66 | local_irq_enable(); |
65 | 67 | ||
68 | retry: | ||
66 | down_read(&mm->mmap_sem); | 69 | down_read(&mm->mmap_sem); |
67 | vma = find_vma(mm, address); | 70 | vma = find_vma(mm, address); |
68 | if (!vma) | 71 | if (!vma) |
@@ -96,14 +99,23 @@ good_area: | |||
96 | break; | 99 | break; |
97 | } | 100 | } |
98 | 101 | ||
99 | fault = handle_mm_fault(mm, vma, address, (cause > 0)); | 102 | fault = handle_mm_fault(mm, vma, address, flags); |
103 | |||
104 | if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) | ||
105 | return; | ||
100 | 106 | ||
101 | /* The most common case -- we are done. */ | 107 | /* The most common case -- we are done. */ |
102 | if (likely(!(fault & VM_FAULT_ERROR))) { | 108 | if (likely(!(fault & VM_FAULT_ERROR))) { |
103 | if (fault & VM_FAULT_MAJOR) | 109 | if (flags & FAULT_FLAG_ALLOW_RETRY) { |
104 | current->maj_flt++; | 110 | if (fault & VM_FAULT_MAJOR) |
105 | else | 111 | current->maj_flt++; |
106 | current->min_flt++; | 112 | else |
113 | current->min_flt++; | ||
114 | if (fault & VM_FAULT_RETRY) { | ||
115 | flags &= ~FAULT_FLAG_ALLOW_RETRY; | ||
116 | goto retry; | ||
117 | } | ||
118 | } | ||
107 | 119 | ||
108 | up_read(&mm->mmap_sem); | 120 | up_read(&mm->mmap_sem); |
109 | return; | 121 | return; |