diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-15 20:51:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-15 20:51:18 -0500 |
commit | 048f039f3ee39417d5a6a1eb73bf01f935e9ed3f (patch) | |
tree | b7064e7874528e72500e1ed57bc054974822687c /arch | |
parent | b90be8662b1d7bd84637edb8f96e904f865a2fe2 (diff) | |
parent | 86d306c96046be597147d9f8ff163a052b3845d8 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68knommu: set flow handler for secondary interrupt controller of 5249
m68knommu: remove use of IRQ_FLG_LOCK from 68360 platform support
m68knommu: fix dereference of port.tty
m68knommu: add missing linker __modver section
m68knommu: fix mis-named variable int set_irq_chip loop
m68knommu: add optimize memmove() function
m68k: remove arch specific non-optimized memcmp()
m68knommu: fix use of un-defined _TIF_WORK_MASK
m68knommu: Rename m548x_wdt.c to m54xx_wdt.c
m68knommu: fix m548x_wdt.c compilation after headers renaming
m68knommu: Remove dependencies on nonexistent M68KNOMMU
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68k/include/asm/string.h | 4 | ||||
-rw-r--r-- | arch/m68k/lib/string.c | 11 | ||||
-rw-r--r-- | arch/m68knommu/kernel/vmlinux.lds.S | 6 | ||||
-rw-r--r-- | arch/m68knommu/lib/Makefile | 2 | ||||
-rw-r--r-- | arch/m68knommu/lib/memmove.c | 105 | ||||
-rw-r--r-- | arch/m68knommu/platform/5249/intc2.c | 4 | ||||
-rw-r--r-- | arch/m68knommu/platform/68328/entry.S | 1 | ||||
-rw-r--r-- | arch/m68knommu/platform/68360/commproc.c | 2 | ||||
-rw-r--r-- | arch/m68knommu/platform/68360/config.c | 2 | ||||
-rw-r--r-- | arch/m68knommu/platform/68360/entry.S | 1 | ||||
-rw-r--r-- | arch/m68knommu/platform/68360/ints.c | 4 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/entry.S | 1 |
12 files changed, 120 insertions, 23 deletions
diff --git a/arch/m68k/include/asm/string.h b/arch/m68k/include/asm/string.h index 65b131282837..32198454da70 100644 --- a/arch/m68k/include/asm/string.h +++ b/arch/m68k/include/asm/string.h | |||
@@ -99,14 +99,12 @@ static inline int strcmp(const char *cs, const char *ct) | |||
99 | : "+a" (cs), "+a" (ct), "=d" (res)); | 99 | : "+a" (cs), "+a" (ct), "=d" (res)); |
100 | return res; | 100 | return res; |
101 | } | 101 | } |
102 | #endif /* CONFIG_COLDFIRE */ | ||
102 | 103 | ||
103 | #define __HAVE_ARCH_MEMMOVE | 104 | #define __HAVE_ARCH_MEMMOVE |
104 | extern void *memmove(void *, const void *, __kernel_size_t); | 105 | extern void *memmove(void *, const void *, __kernel_size_t); |
105 | 106 | ||
106 | #define __HAVE_ARCH_MEMCMP | ||
107 | extern int memcmp(const void *, const void *, __kernel_size_t); | ||
108 | #define memcmp(d, s, n) __builtin_memcmp(d, s, n) | 107 | #define memcmp(d, s, n) __builtin_memcmp(d, s, n) |
109 | #endif /* CONFIG_COLDFIRE */ | ||
110 | 108 | ||
111 | #define __HAVE_ARCH_MEMSET | 109 | #define __HAVE_ARCH_MEMSET |
112 | extern void *memset(void *, int, __kernel_size_t); | 110 | extern void *memset(void *, int, __kernel_size_t); |
diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c index 4253f870e54f..d399c5f25636 100644 --- a/arch/m68k/lib/string.c +++ b/arch/m68k/lib/string.c | |||
@@ -243,14 +243,3 @@ void *memmove(void *dest, const void *src, size_t n) | |||
243 | return xdest; | 243 | return xdest; |
244 | } | 244 | } |
245 | EXPORT_SYMBOL(memmove); | 245 | EXPORT_SYMBOL(memmove); |
246 | |||
247 | int memcmp(const void *cs, const void *ct, size_t count) | ||
248 | { | ||
249 | const unsigned char *su1, *su2; | ||
250 | |||
251 | for (su1 = cs, su2 = ct; count > 0; ++su1, ++su2, count--) | ||
252 | if (*su1 != *su2) | ||
253 | return *su1 < *su2 ? -1 : +1; | ||
254 | return 0; | ||
255 | } | ||
256 | EXPORT_SYMBOL(memcmp); | ||
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S index ef332136f96d..47e15ebfd893 100644 --- a/arch/m68knommu/kernel/vmlinux.lds.S +++ b/arch/m68knommu/kernel/vmlinux.lds.S | |||
@@ -141,6 +141,12 @@ SECTIONS { | |||
141 | *(__param) | 141 | *(__param) |
142 | __stop___param = .; | 142 | __stop___param = .; |
143 | 143 | ||
144 | /* Built-in module versions */ | ||
145 | . = ALIGN(4) ; | ||
146 | __start___modver = .; | ||
147 | *(__modver) | ||
148 | __stop___modver = .; | ||
149 | |||
144 | . = ALIGN(4) ; | 150 | . = ALIGN(4) ; |
145 | _etext = . ; | 151 | _etext = . ; |
146 | } > TEXT | 152 | } > TEXT |
diff --git a/arch/m68knommu/lib/Makefile b/arch/m68knommu/lib/Makefile index d94d709665aa..32d852e586d7 100644 --- a/arch/m68knommu/lib/Makefile +++ b/arch/m68knommu/lib/Makefile | |||
@@ -4,4 +4,4 @@ | |||
4 | 4 | ||
5 | lib-y := ashldi3.o ashrdi3.o lshrdi3.o \ | 5 | lib-y := ashldi3.o ashrdi3.o lshrdi3.o \ |
6 | muldi3.o mulsi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \ | 6 | muldi3.o mulsi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \ |
7 | checksum.o memcpy.o memset.o delay.o | 7 | checksum.o memcpy.o memmove.o memset.o delay.o |
diff --git a/arch/m68knommu/lib/memmove.c b/arch/m68knommu/lib/memmove.c new file mode 100644 index 000000000000..b3dcfe9dab7e --- /dev/null +++ b/arch/m68knommu/lib/memmove.c | |||
@@ -0,0 +1,105 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file COPYING in the main directory of this archive | ||
4 | * for more details. | ||
5 | */ | ||
6 | |||
7 | #define __IN_STRING_C | ||
8 | |||
9 | #include <linux/module.h> | ||
10 | #include <linux/string.h> | ||
11 | |||
12 | void *memmove(void *dest, const void *src, size_t n) | ||
13 | { | ||
14 | void *xdest = dest; | ||
15 | size_t temp; | ||
16 | |||
17 | if (!n) | ||
18 | return xdest; | ||
19 | |||
20 | if (dest < src) { | ||
21 | if ((long)dest & 1) { | ||
22 | char *cdest = dest; | ||
23 | const char *csrc = src; | ||
24 | *cdest++ = *csrc++; | ||
25 | dest = cdest; | ||
26 | src = csrc; | ||
27 | n--; | ||
28 | } | ||
29 | if (n > 2 && (long)dest & 2) { | ||
30 | short *sdest = dest; | ||
31 | const short *ssrc = src; | ||
32 | *sdest++ = *ssrc++; | ||
33 | dest = sdest; | ||
34 | src = ssrc; | ||
35 | n -= 2; | ||
36 | } | ||
37 | temp = n >> 2; | ||
38 | if (temp) { | ||
39 | long *ldest = dest; | ||
40 | const long *lsrc = src; | ||
41 | temp--; | ||
42 | do | ||
43 | *ldest++ = *lsrc++; | ||
44 | while (temp--); | ||
45 | dest = ldest; | ||
46 | src = lsrc; | ||
47 | } | ||
48 | if (n & 2) { | ||
49 | short *sdest = dest; | ||
50 | const short *ssrc = src; | ||
51 | *sdest++ = *ssrc++; | ||
52 | dest = sdest; | ||
53 | src = ssrc; | ||
54 | } | ||
55 | if (n & 1) { | ||
56 | char *cdest = dest; | ||
57 | const char *csrc = src; | ||
58 | *cdest = *csrc; | ||
59 | } | ||
60 | } else { | ||
61 | dest = (char *)dest + n; | ||
62 | src = (const char *)src + n; | ||
63 | if ((long)dest & 1) { | ||
64 | char *cdest = dest; | ||
65 | const char *csrc = src; | ||
66 | *--cdest = *--csrc; | ||
67 | dest = cdest; | ||
68 | src = csrc; | ||
69 | n--; | ||
70 | } | ||
71 | if (n > 2 && (long)dest & 2) { | ||
72 | short *sdest = dest; | ||
73 | const short *ssrc = src; | ||
74 | *--sdest = *--ssrc; | ||
75 | dest = sdest; | ||
76 | src = ssrc; | ||
77 | n -= 2; | ||
78 | } | ||
79 | temp = n >> 2; | ||
80 | if (temp) { | ||
81 | long *ldest = dest; | ||
82 | const long *lsrc = src; | ||
83 | temp--; | ||
84 | do | ||
85 | *--ldest = *--lsrc; | ||
86 | while (temp--); | ||
87 | dest = ldest; | ||
88 | src = lsrc; | ||
89 | } | ||
90 | if (n & 2) { | ||
91 | short *sdest = dest; | ||
92 | const short *ssrc = src; | ||
93 | *--sdest = *--ssrc; | ||
94 | dest = sdest; | ||
95 | src = ssrc; | ||
96 | } | ||
97 | if (n & 1) { | ||
98 | char *cdest = dest; | ||
99 | const char *csrc = src; | ||
100 | *--cdest = *--csrc; | ||
101 | } | ||
102 | } | ||
103 | return xdest; | ||
104 | } | ||
105 | EXPORT_SYMBOL(memmove); | ||
diff --git a/arch/m68knommu/platform/5249/intc2.c b/arch/m68knommu/platform/5249/intc2.c index d09d9da04537..c5151f846591 100644 --- a/arch/m68knommu/platform/5249/intc2.c +++ b/arch/m68knommu/platform/5249/intc2.c | |||
@@ -50,8 +50,10 @@ static int __init mcf_intc2_init(void) | |||
50 | int irq; | 50 | int irq; |
51 | 51 | ||
52 | /* GPIO interrupt sources */ | 52 | /* GPIO interrupt sources */ |
53 | for (irq = MCFINTC2_GPIOIRQ0; (irq <= MCFINTC2_GPIOIRQ7); irq++) | 53 | for (irq = MCFINTC2_GPIOIRQ0; (irq <= MCFINTC2_GPIOIRQ7); irq++) { |
54 | irq_desc[irq].chip = &intc2_irq_gpio_chip; | 54 | irq_desc[irq].chip = &intc2_irq_gpio_chip; |
55 | set_irq_handler(irq, handle_edge_irq); | ||
56 | } | ||
55 | 57 | ||
56 | return 0; | 58 | return 0; |
57 | } | 59 | } |
diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S index 240a7a6e25c8..676960cf022a 100644 --- a/arch/m68knommu/platform/68328/entry.S +++ b/arch/m68knommu/platform/68328/entry.S | |||
@@ -108,7 +108,6 @@ Luser_return: | |||
108 | movel %d1,%a2 | 108 | movel %d1,%a2 |
109 | 1: | 109 | 1: |
110 | move %a2@(TI_FLAGS),%d1 /* thread_info->flags */ | 110 | move %a2@(TI_FLAGS),%d1 /* thread_info->flags */ |
111 | andl #_TIF_WORK_MASK,%d1 | ||
112 | jne Lwork_to_do | 111 | jne Lwork_to_do |
113 | RESTORE_ALL | 112 | RESTORE_ALL |
114 | 113 | ||
diff --git a/arch/m68knommu/platform/68360/commproc.c b/arch/m68knommu/platform/68360/commproc.c index f27e688c404e..8e4e10cc0080 100644 --- a/arch/m68knommu/platform/68360/commproc.c +++ b/arch/m68knommu/platform/68360/commproc.c | |||
@@ -210,7 +210,7 @@ void | |||
210 | cpm_install_handler(int vec, void (*handler)(), void *dev_id) | 210 | cpm_install_handler(int vec, void (*handler)(), void *dev_id) |
211 | { | 211 | { |
212 | 212 | ||
213 | request_irq(vec, handler, IRQ_FLG_LOCK, "timer", dev_id); | 213 | request_irq(vec, handler, 0, "timer", dev_id); |
214 | 214 | ||
215 | /* if (cpm_vecs[vec].handler != 0) */ | 215 | /* if (cpm_vecs[vec].handler != 0) */ |
216 | /* printk(KERN_INFO "CPM interrupt %x replacing %x\n", */ | 216 | /* printk(KERN_INFO "CPM interrupt %x replacing %x\n", */ |
diff --git a/arch/m68knommu/platform/68360/config.c b/arch/m68knommu/platform/68360/config.c index ac629fa30099..9dd5bca38749 100644 --- a/arch/m68knommu/platform/68360/config.c +++ b/arch/m68knommu/platform/68360/config.c | |||
@@ -75,7 +75,7 @@ void hw_timer_init(void) | |||
75 | /* Set compare register 32Khz / 32 / 10 = 100 */ | 75 | /* Set compare register 32Khz / 32 / 10 = 100 */ |
76 | TCMP = 10; | 76 | TCMP = 10; |
77 | 77 | ||
78 | request_irq(IRQ_MACHSPEC | 1, timer_routine, IRQ_FLG_LOCK, "timer", NULL); | 78 | request_irq(IRQ_MACHSPEC | 1, timer_routine, 0, "timer", NULL); |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | /* General purpose quicc timers: MC68360UM p7-20 */ | 81 | /* General purpose quicc timers: MC68360UM p7-20 */ |
diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S index 8a28788c0eea..46c1b18c9dcb 100644 --- a/arch/m68knommu/platform/68360/entry.S +++ b/arch/m68knommu/platform/68360/entry.S | |||
@@ -104,7 +104,6 @@ Luser_return: | |||
104 | movel %d1,%a2 | 104 | movel %d1,%a2 |
105 | 1: | 105 | 1: |
106 | move %a2@(TI_FLAGS),%d1 /* thread_info->flags */ | 106 | move %a2@(TI_FLAGS),%d1 /* thread_info->flags */ |
107 | andl #_TIF_WORK_MASK,%d1 | ||
108 | jne Lwork_to_do | 107 | jne Lwork_to_do |
109 | RESTORE_ALL | 108 | RESTORE_ALL |
110 | 109 | ||
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c index ad96ab1051f0..a29041c1a8a0 100644 --- a/arch/m68knommu/platform/68360/ints.c +++ b/arch/m68knommu/platform/68360/ints.c | |||
@@ -132,8 +132,8 @@ void init_IRQ(void) | |||
132 | pquicc->intr_cimr = 0x00000000; | 132 | pquicc->intr_cimr = 0x00000000; |
133 | 133 | ||
134 | for (i = 0; (i < NR_IRQS); i++) { | 134 | for (i = 0; (i < NR_IRQS); i++) { |
135 | set_irq_chip(irq, &intc_irq_chip); | 135 | set_irq_chip(i, &intc_irq_chip); |
136 | set_irq_handler(irq, handle_level_irq); | 136 | set_irq_handler(i, handle_level_irq); |
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S index 4ddfc3da70d8..5837cf080b6d 100644 --- a/arch/m68knommu/platform/coldfire/entry.S +++ b/arch/m68knommu/platform/coldfire/entry.S | |||
@@ -138,7 +138,6 @@ Luser_return: | |||
138 | andl #-THREAD_SIZE,%d1 /* at base of kernel stack */ | 138 | andl #-THREAD_SIZE,%d1 /* at base of kernel stack */ |
139 | movel %d1,%a0 | 139 | movel %d1,%a0 |
140 | movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ | 140 | movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ |
141 | andl #0xefff,%d1 | ||
142 | jne Lwork_to_do /* still work to do */ | 141 | jne Lwork_to_do /* still work to do */ |
143 | 142 | ||
144 | Lreturn: | 143 | Lreturn: |