diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:48:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:48:00 -0500 |
commit | 1480d0a31db62b9803f829cc0e5cc71935ffe3cc (patch) | |
tree | c7c18939b5a0d51f23f7ca8606ecf00fa69741aa /arch/arm | |
parent | fc8e3d177fa8073895d37b50282489dbeec89eb1 (diff) | |
parent | 46595ffbfc8ba79f27cdf8a029ee068b3b34c69f (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/dmabounce.c | 165 | ||||
-rw-r--r-- | arch/arm/configs/ixdp2400_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/configs/ixdp2800_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 29 | ||||
-rw-r--r-- | arch/arm/lib/ashldi3.S | 48 | ||||
-rw-r--r-- | arch/arm/lib/ashldi3.c | 56 | ||||
-rw-r--r-- | arch/arm/lib/ashrdi3.S | 48 | ||||
-rw-r--r-- | arch/arm/lib/ashrdi3.c | 57 | ||||
-rw-r--r-- | arch/arm/lib/gcclib.h | 22 | ||||
-rw-r--r-- | arch/arm/lib/lshrdi3.S | 48 | ||||
-rw-r--r-- | arch/arm/lib/lshrdi3.c | 56 | ||||
-rw-r--r-- | arch/arm/lib/muldi3.S | 44 | ||||
-rw-r--r-- | arch/arm/lib/muldi3.c | 72 | ||||
-rw-r--r-- | arch/arm/lib/ucmpdi2.S | 35 | ||||
-rw-r--r-- | arch/arm/lib/ucmpdi2.c | 49 | ||||
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-pxa/poodle.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 19 | ||||
-rw-r--r-- | arch/arm/mm/copypage-v6.c | 16 |
19 files changed, 395 insertions, 414 deletions
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index cbf2165476b0..ad6c89a555bb 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -33,8 +33,8 @@ | |||
33 | #include <asm/cacheflush.h> | 33 | #include <asm/cacheflush.h> |
34 | 34 | ||
35 | #undef DEBUG | 35 | #undef DEBUG |
36 | |||
37 | #undef STATS | 36 | #undef STATS |
37 | |||
38 | #ifdef STATS | 38 | #ifdef STATS |
39 | #define DO_STATS(X) do { X ; } while (0) | 39 | #define DO_STATS(X) do { X ; } while (0) |
40 | #else | 40 | #else |
@@ -52,26 +52,31 @@ struct safe_buffer { | |||
52 | int direction; | 52 | int direction; |
53 | 53 | ||
54 | /* safe buffer info */ | 54 | /* safe buffer info */ |
55 | struct dma_pool *pool; | 55 | struct dmabounce_pool *pool; |
56 | void *safe; | 56 | void *safe; |
57 | dma_addr_t safe_dma_addr; | 57 | dma_addr_t safe_dma_addr; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | struct dmabounce_pool { | ||
61 | unsigned long size; | ||
62 | struct dma_pool *pool; | ||
63 | #ifdef STATS | ||
64 | unsigned long allocs; | ||
65 | #endif | ||
66 | }; | ||
67 | |||
60 | struct dmabounce_device_info { | 68 | struct dmabounce_device_info { |
61 | struct list_head node; | 69 | struct list_head node; |
62 | 70 | ||
63 | struct device *dev; | 71 | struct device *dev; |
64 | struct dma_pool *small_buffer_pool; | ||
65 | struct dma_pool *large_buffer_pool; | ||
66 | struct list_head safe_buffers; | 72 | struct list_head safe_buffers; |
67 | unsigned long small_buffer_size, large_buffer_size; | ||
68 | #ifdef STATS | 73 | #ifdef STATS |
69 | unsigned long sbp_allocs; | ||
70 | unsigned long lbp_allocs; | ||
71 | unsigned long total_allocs; | 74 | unsigned long total_allocs; |
72 | unsigned long map_op_count; | 75 | unsigned long map_op_count; |
73 | unsigned long bounce_count; | 76 | unsigned long bounce_count; |
74 | #endif | 77 | #endif |
78 | struct dmabounce_pool small; | ||
79 | struct dmabounce_pool large; | ||
75 | }; | 80 | }; |
76 | 81 | ||
77 | static LIST_HEAD(dmabounce_devs); | 82 | static LIST_HEAD(dmabounce_devs); |
@@ -82,9 +87,9 @@ static void print_alloc_stats(struct dmabounce_device_info *device_info) | |||
82 | printk(KERN_INFO | 87 | printk(KERN_INFO |
83 | "%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n", | 88 | "%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n", |
84 | device_info->dev->bus_id, | 89 | device_info->dev->bus_id, |
85 | device_info->sbp_allocs, device_info->lbp_allocs, | 90 | device_info->small.allocs, device_info->large.allocs, |
86 | device_info->total_allocs - device_info->sbp_allocs - | 91 | device_info->total_allocs - device_info->small.allocs - |
87 | device_info->lbp_allocs, | 92 | device_info->large.allocs, |
88 | device_info->total_allocs); | 93 | device_info->total_allocs); |
89 | } | 94 | } |
90 | #endif | 95 | #endif |
@@ -106,18 +111,22 @@ find_dmabounce_dev(struct device *dev) | |||
106 | /* allocate a 'safe' buffer and keep track of it */ | 111 | /* allocate a 'safe' buffer and keep track of it */ |
107 | static inline struct safe_buffer * | 112 | static inline struct safe_buffer * |
108 | alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, | 113 | alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, |
109 | size_t size, enum dma_data_direction dir) | 114 | size_t size, enum dma_data_direction dir) |
110 | { | 115 | { |
111 | struct safe_buffer *buf; | 116 | struct safe_buffer *buf; |
112 | struct dma_pool *pool; | 117 | struct dmabounce_pool *pool; |
113 | struct device *dev = device_info->dev; | 118 | struct device *dev = device_info->dev; |
114 | void *safe; | ||
115 | dma_addr_t safe_dma_addr; | ||
116 | 119 | ||
117 | dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n", | 120 | dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n", |
118 | __func__, ptr, size, dir); | 121 | __func__, ptr, size, dir); |
119 | 122 | ||
120 | DO_STATS ( device_info->total_allocs++ ); | 123 | if (size <= device_info->small.size) { |
124 | pool = &device_info->small; | ||
125 | } else if (size <= device_info->large.size) { | ||
126 | pool = &device_info->large; | ||
127 | } else { | ||
128 | pool = NULL; | ||
129 | } | ||
121 | 130 | ||
122 | buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC); | 131 | buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC); |
123 | if (buf == NULL) { | 132 | if (buf == NULL) { |
@@ -125,41 +134,35 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, | |||
125 | return NULL; | 134 | return NULL; |
126 | } | 135 | } |
127 | 136 | ||
128 | if (size <= device_info->small_buffer_size) { | 137 | buf->ptr = ptr; |
129 | pool = device_info->small_buffer_pool; | 138 | buf->size = size; |
130 | safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr); | 139 | buf->direction = dir; |
131 | 140 | buf->pool = pool; | |
132 | DO_STATS ( device_info->sbp_allocs++ ); | ||
133 | } else if (size <= device_info->large_buffer_size) { | ||
134 | pool = device_info->large_buffer_pool; | ||
135 | safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr); | ||
136 | 141 | ||
137 | DO_STATS ( device_info->lbp_allocs++ ); | 142 | if (pool) { |
143 | buf->safe = dma_pool_alloc(pool->pool, GFP_ATOMIC, | ||
144 | &buf->safe_dma_addr); | ||
138 | } else { | 145 | } else { |
139 | pool = NULL; | 146 | buf->safe = dma_alloc_coherent(dev, size, &buf->safe_dma_addr, |
140 | safe = dma_alloc_coherent(dev, size, &safe_dma_addr, GFP_ATOMIC); | 147 | GFP_ATOMIC); |
141 | } | 148 | } |
142 | 149 | ||
143 | if (safe == NULL) { | 150 | if (buf->safe == NULL) { |
144 | dev_warn(device_info->dev, | 151 | dev_warn(dev, |
145 | "%s: could not alloc dma memory (size=%d)\n", | 152 | "%s: could not alloc dma memory (size=%d)\n", |
146 | __func__, size); | 153 | __func__, size); |
147 | kfree(buf); | 154 | kfree(buf); |
148 | return NULL; | 155 | return NULL; |
149 | } | 156 | } |
150 | 157 | ||
151 | #ifdef STATS | 158 | #ifdef STATS |
159 | if (pool) | ||
160 | pool->allocs++; | ||
161 | device_info->total_allocs++; | ||
152 | if (device_info->total_allocs % 1000 == 0) | 162 | if (device_info->total_allocs % 1000 == 0) |
153 | print_alloc_stats(device_info); | 163 | print_alloc_stats(device_info); |
154 | #endif | 164 | #endif |
155 | 165 | ||
156 | buf->ptr = ptr; | ||
157 | buf->size = size; | ||
158 | buf->direction = dir; | ||
159 | buf->pool = pool; | ||
160 | buf->safe = safe; | ||
161 | buf->safe_dma_addr = safe_dma_addr; | ||
162 | |||
163 | list_add(&buf->node, &device_info->safe_buffers); | 166 | list_add(&buf->node, &device_info->safe_buffers); |
164 | 167 | ||
165 | return buf; | 168 | return buf; |
@@ -186,7 +189,7 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer * | |||
186 | list_del(&buf->node); | 189 | list_del(&buf->node); |
187 | 190 | ||
188 | if (buf->pool) | 191 | if (buf->pool) |
189 | dma_pool_free(buf->pool, buf->safe, buf->safe_dma_addr); | 192 | dma_pool_free(buf->pool->pool, buf->safe, buf->safe_dma_addr); |
190 | else | 193 | else |
191 | dma_free_coherent(device_info->dev, buf->size, buf->safe, | 194 | dma_free_coherent(device_info->dev, buf->size, buf->safe, |
192 | buf->safe_dma_addr); | 195 | buf->safe_dma_addr); |
@@ -197,12 +200,10 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer * | |||
197 | /* ************************************************** */ | 200 | /* ************************************************** */ |
198 | 201 | ||
199 | #ifdef STATS | 202 | #ifdef STATS |
200 | |||
201 | static void print_map_stats(struct dmabounce_device_info *device_info) | 203 | static void print_map_stats(struct dmabounce_device_info *device_info) |
202 | { | 204 | { |
203 | printk(KERN_INFO | 205 | dev_info(device_info->dev, |
204 | "%s: dmabounce: map_op_count=%lu, bounce_count=%lu\n", | 206 | "dmabounce: map_op_count=%lu, bounce_count=%lu\n", |
205 | device_info->dev->bus_id, | ||
206 | device_info->map_op_count, device_info->bounce_count); | 207 | device_info->map_op_count, device_info->bounce_count); |
207 | } | 208 | } |
208 | #endif | 209 | #endif |
@@ -258,13 +259,13 @@ map_single(struct device *dev, void *ptr, size_t size, | |||
258 | __func__, ptr, buf->safe, size); | 259 | __func__, ptr, buf->safe, size); |
259 | memcpy(buf->safe, ptr, size); | 260 | memcpy(buf->safe, ptr, size); |
260 | } | 261 | } |
261 | consistent_sync(buf->safe, size, dir); | 262 | ptr = buf->safe; |
262 | 263 | ||
263 | dma_addr = buf->safe_dma_addr; | 264 | dma_addr = buf->safe_dma_addr; |
264 | } else { | ||
265 | consistent_sync(ptr, size, dir); | ||
266 | } | 265 | } |
267 | 266 | ||
267 | consistent_sync(ptr, size, dir); | ||
268 | |||
268 | return dma_addr; | 269 | return dma_addr; |
269 | } | 270 | } |
270 | 271 | ||
@@ -278,7 +279,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
278 | /* | 279 | /* |
279 | * Trying to unmap an invalid mapping | 280 | * Trying to unmap an invalid mapping |
280 | */ | 281 | */ |
281 | if (dma_addr == ~0) { | 282 | if (dma_mapping_error(dma_addr)) { |
282 | dev_err(dev, "Trying to unmap invalid mapping\n"); | 283 | dev_err(dev, "Trying to unmap invalid mapping\n"); |
283 | return; | 284 | return; |
284 | } | 285 | } |
@@ -570,11 +571,25 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, | |||
570 | local_irq_restore(flags); | 571 | local_irq_restore(flags); |
571 | } | 572 | } |
572 | 573 | ||
574 | static int | ||
575 | dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev, const char *name, | ||
576 | unsigned long size) | ||
577 | { | ||
578 | pool->size = size; | ||
579 | DO_STATS(pool->allocs = 0); | ||
580 | pool->pool = dma_pool_create(name, dev, size, | ||
581 | 0 /* byte alignment */, | ||
582 | 0 /* no page-crossing issues */); | ||
583 | |||
584 | return pool->pool ? 0 : -ENOMEM; | ||
585 | } | ||
586 | |||
573 | int | 587 | int |
574 | dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | 588 | dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, |
575 | unsigned long large_buffer_size) | 589 | unsigned long large_buffer_size) |
576 | { | 590 | { |
577 | struct dmabounce_device_info *device_info; | 591 | struct dmabounce_device_info *device_info; |
592 | int ret; | ||
578 | 593 | ||
579 | device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); | 594 | device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); |
580 | if (!device_info) { | 595 | if (!device_info) { |
@@ -584,45 +599,31 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | |||
584 | return -ENOMEM; | 599 | return -ENOMEM; |
585 | } | 600 | } |
586 | 601 | ||
587 | device_info->small_buffer_pool = | 602 | ret = dmabounce_init_pool(&device_info->small, dev, |
588 | dma_pool_create("small_dmabounce_pool", | 603 | "small_dmabounce_pool", small_buffer_size); |
589 | dev, | 604 | if (ret) { |
590 | small_buffer_size, | 605 | dev_err(dev, |
591 | 0 /* byte alignment */, | 606 | "dmabounce: could not allocate DMA pool for %ld byte objects\n", |
592 | 0 /* no page-crossing issues */); | 607 | small_buffer_size); |
593 | if (!device_info->small_buffer_pool) { | 608 | goto err_free; |
594 | printk(KERN_ERR | ||
595 | "dmabounce: could not allocate small DMA pool for %s\n", | ||
596 | dev->bus_id); | ||
597 | kfree(device_info); | ||
598 | return -ENOMEM; | ||
599 | } | 609 | } |
600 | 610 | ||
601 | if (large_buffer_size) { | 611 | if (large_buffer_size) { |
602 | device_info->large_buffer_pool = | 612 | ret = dmabounce_init_pool(&device_info->large, dev, |
603 | dma_pool_create("large_dmabounce_pool", | 613 | "large_dmabounce_pool", |
604 | dev, | 614 | large_buffer_size); |
605 | large_buffer_size, | 615 | if (ret) { |
606 | 0 /* byte alignment */, | 616 | dev_err(dev, |
607 | 0 /* no page-crossing issues */); | 617 | "dmabounce: could not allocate DMA pool for %ld byte objects\n", |
608 | if (!device_info->large_buffer_pool) { | 618 | large_buffer_size); |
609 | printk(KERN_ERR | 619 | goto err_destroy; |
610 | "dmabounce: could not allocate large DMA pool for %s\n", | ||
611 | dev->bus_id); | ||
612 | dma_pool_destroy(device_info->small_buffer_pool); | ||
613 | |||
614 | return -ENOMEM; | ||
615 | } | 620 | } |
616 | } | 621 | } |
617 | 622 | ||
618 | device_info->dev = dev; | 623 | device_info->dev = dev; |
619 | device_info->small_buffer_size = small_buffer_size; | ||
620 | device_info->large_buffer_size = large_buffer_size; | ||
621 | INIT_LIST_HEAD(&device_info->safe_buffers); | 624 | INIT_LIST_HEAD(&device_info->safe_buffers); |
622 | 625 | ||
623 | #ifdef STATS | 626 | #ifdef STATS |
624 | device_info->sbp_allocs = 0; | ||
625 | device_info->lbp_allocs = 0; | ||
626 | device_info->total_allocs = 0; | 627 | device_info->total_allocs = 0; |
627 | device_info->map_op_count = 0; | 628 | device_info->map_op_count = 0; |
628 | device_info->bounce_count = 0; | 629 | device_info->bounce_count = 0; |
@@ -634,6 +635,12 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | |||
634 | dev->bus_id, dev->bus->name); | 635 | dev->bus_id, dev->bus->name); |
635 | 636 | ||
636 | return 0; | 637 | return 0; |
638 | |||
639 | err_destroy: | ||
640 | dma_pool_destroy(device_info->small.pool); | ||
641 | err_free: | ||
642 | kfree(device_info); | ||
643 | return ret; | ||
637 | } | 644 | } |
638 | 645 | ||
639 | void | 646 | void |
@@ -655,10 +662,10 @@ dmabounce_unregister_dev(struct device *dev) | |||
655 | BUG(); | 662 | BUG(); |
656 | } | 663 | } |
657 | 664 | ||
658 | if (device_info->small_buffer_pool) | 665 | if (device_info->small.pool) |
659 | dma_pool_destroy(device_info->small_buffer_pool); | 666 | dma_pool_destroy(device_info->small.pool); |
660 | if (device_info->large_buffer_pool) | 667 | if (device_info->large.pool) |
661 | dma_pool_destroy(device_info->large_buffer_pool); | 668 | dma_pool_destroy(device_info->large.pool); |
662 | 669 | ||
663 | #ifdef STATS | 670 | #ifdef STATS |
664 | print_alloc_stats(device_info); | 671 | print_alloc_stats(device_info); |
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig index 678720fa2e2e..ddeb9f99d662 100644 --- a/arch/arm/configs/ixdp2400_defconfig +++ b/arch/arm/configs/ixdp2400_defconfig | |||
@@ -559,7 +559,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
559 | # | 559 | # |
560 | CONFIG_SERIAL_8250=y | 560 | CONFIG_SERIAL_8250=y |
561 | CONFIG_SERIAL_8250_CONSOLE=y | 561 | CONFIG_SERIAL_8250_CONSOLE=y |
562 | CONFIG_SERIAL_8250_NR_UARTS=2 | 562 | CONFIG_SERIAL_8250_NR_UARTS=1 |
563 | # CONFIG_SERIAL_8250_EXTENDED is not set | 563 | # CONFIG_SERIAL_8250_EXTENDED is not set |
564 | 564 | ||
565 | # | 565 | # |
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig index 261e2343903b..81d3a0606f95 100644 --- a/arch/arm/configs/ixdp2800_defconfig +++ b/arch/arm/configs/ixdp2800_defconfig | |||
@@ -559,7 +559,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
559 | # | 559 | # |
560 | CONFIG_SERIAL_8250=y | 560 | CONFIG_SERIAL_8250=y |
561 | CONFIG_SERIAL_8250_CONSOLE=y | 561 | CONFIG_SERIAL_8250_CONSOLE=y |
562 | CONFIG_SERIAL_8250_NR_UARTS=2 | 562 | CONFIG_SERIAL_8250_NR_UARTS=1 |
563 | # CONFIG_SERIAL_8250_EXTENDED is not set | 563 | # CONFIG_SERIAL_8250_EXTENDED is not set |
564 | 564 | ||
565 | # | 565 | # |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 66e5a0516f23..45e9ea6cd2a5 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -198,25 +198,16 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) | |||
198 | barrier(); | 198 | barrier(); |
199 | } | 199 | } |
200 | 200 | ||
201 | DEFINE_SPINLOCK(die_lock); | 201 | static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) |
202 | |||
203 | /* | ||
204 | * This function is protected against re-entrancy. | ||
205 | */ | ||
206 | NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | ||
207 | { | 202 | { |
208 | struct task_struct *tsk = current; | 203 | struct task_struct *tsk = thread->task; |
209 | static int die_counter; | 204 | static int die_counter; |
210 | 205 | ||
211 | console_verbose(); | ||
212 | spin_lock_irq(&die_lock); | ||
213 | bust_spinlocks(1); | ||
214 | |||
215 | printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); | 206 | printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); |
216 | print_modules(); | 207 | print_modules(); |
217 | __show_regs(regs); | 208 | __show_regs(regs); |
218 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", | 209 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", |
219 | tsk->comm, tsk->pid, tsk->thread_info + 1); | 210 | tsk->comm, tsk->pid, thread + 1); |
220 | 211 | ||
221 | if (!user_mode(regs) || in_interrupt()) { | 212 | if (!user_mode(regs) || in_interrupt()) { |
222 | dump_mem("Stack: ", regs->ARM_sp, | 213 | dump_mem("Stack: ", regs->ARM_sp, |
@@ -224,7 +215,21 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | |||
224 | dump_backtrace(regs, tsk); | 215 | dump_backtrace(regs, tsk); |
225 | dump_instr(regs); | 216 | dump_instr(regs); |
226 | } | 217 | } |
218 | } | ||
227 | 219 | ||
220 | DEFINE_SPINLOCK(die_lock); | ||
221 | |||
222 | /* | ||
223 | * This function is protected against re-entrancy. | ||
224 | */ | ||
225 | NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | ||
226 | { | ||
227 | struct thread_info *thread = current_thread_info(); | ||
228 | |||
229 | console_verbose(); | ||
230 | spin_lock_irq(&die_lock); | ||
231 | bust_spinlocks(1); | ||
232 | __die(str, err, thread, regs); | ||
228 | bust_spinlocks(0); | 233 | bust_spinlocks(0); |
229 | spin_unlock_irq(&die_lock); | 234 | spin_unlock_irq(&die_lock); |
230 | do_exit(SIGSEGV); | 235 | do_exit(SIGSEGV); |
diff --git a/arch/arm/lib/ashldi3.S b/arch/arm/lib/ashldi3.S new file mode 100644 index 000000000000..561e20717b30 --- /dev/null +++ b/arch/arm/lib/ashldi3.S | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005 | ||
2 | Free Software Foundation, Inc. | ||
3 | |||
4 | This file is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU General Public License as published by the | ||
6 | Free Software Foundation; either version 2, or (at your option) any | ||
7 | later version. | ||
8 | |||
9 | In addition to the permissions in the GNU General Public License, the | ||
10 | Free Software Foundation gives you unlimited permission to link the | ||
11 | compiled version of this file into combinations with other programs, | ||
12 | and to distribute those combinations without any restriction coming | ||
13 | from the use of this file. (The General Public License restrictions | ||
14 | do apply in other respects; for example, they cover modification of | ||
15 | the file, and distribution when not linked into a combine | ||
16 | executable.) | ||
17 | |||
18 | This file is distributed in the hope that it will be useful, but | ||
19 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; see the file COPYING. If not, write to | ||
25 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, | ||
26 | Boston, MA 02110-1301, USA. */ | ||
27 | |||
28 | |||
29 | #include <linux/linkage.h> | ||
30 | |||
31 | #ifdef __ARMEB__ | ||
32 | #define al r1 | ||
33 | #define ah r0 | ||
34 | #else | ||
35 | #define al r0 | ||
36 | #define ah r1 | ||
37 | #endif | ||
38 | |||
39 | ENTRY(__ashldi3) | ||
40 | |||
41 | subs r3, r2, #32 | ||
42 | rsb ip, r2, #32 | ||
43 | movmi ah, ah, lsl r2 | ||
44 | movpl ah, al, lsl r3 | ||
45 | orrmi ah, ah, al, lsr ip | ||
46 | mov al, al, lsl r2 | ||
47 | mov pc, lr | ||
48 | |||
diff --git a/arch/arm/lib/ashldi3.c b/arch/arm/lib/ashldi3.c deleted file mode 100644 index b62875cfd8f8..000000000000 --- a/arch/arm/lib/ashldi3.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | s64 __ashldi3(s64 u, int b) | ||
35 | { | ||
36 | DIunion w; | ||
37 | int bm; | ||
38 | DIunion uu; | ||
39 | |||
40 | if (b == 0) | ||
41 | return u; | ||
42 | |||
43 | uu.ll = u; | ||
44 | |||
45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; | ||
46 | if (bm <= 0) { | ||
47 | w.s.low = 0; | ||
48 | w.s.high = (u32) uu.s.low << -bm; | ||
49 | } else { | ||
50 | u32 carries = (u32) uu.s.low >> bm; | ||
51 | w.s.low = (u32) uu.s.low << b; | ||
52 | w.s.high = ((u32) uu.s.high << b) | carries; | ||
53 | } | ||
54 | |||
55 | return w.ll; | ||
56 | } | ||
diff --git a/arch/arm/lib/ashrdi3.S b/arch/arm/lib/ashrdi3.S new file mode 100644 index 000000000000..86fb2a90c301 --- /dev/null +++ b/arch/arm/lib/ashrdi3.S | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005 | ||
2 | Free Software Foundation, Inc. | ||
3 | |||
4 | This file is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU General Public License as published by the | ||
6 | Free Software Foundation; either version 2, or (at your option) any | ||
7 | later version. | ||
8 | |||
9 | In addition to the permissions in the GNU General Public License, the | ||
10 | Free Software Foundation gives you unlimited permission to link the | ||
11 | compiled version of this file into combinations with other programs, | ||
12 | and to distribute those combinations without any restriction coming | ||
13 | from the use of this file. (The General Public License restrictions | ||
14 | do apply in other respects; for example, they cover modification of | ||
15 | the file, and distribution when not linked into a combine | ||
16 | executable.) | ||
17 | |||
18 | This file is distributed in the hope that it will be useful, but | ||
19 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; see the file COPYING. If not, write to | ||
25 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, | ||
26 | Boston, MA 02110-1301, USA. */ | ||
27 | |||
28 | |||
29 | #include <linux/linkage.h> | ||
30 | |||
31 | #ifdef __ARMEB__ | ||
32 | #define al r1 | ||
33 | #define ah r0 | ||
34 | #else | ||
35 | #define al r0 | ||
36 | #define ah r1 | ||
37 | #endif | ||
38 | |||
39 | ENTRY(__ashrdi3) | ||
40 | |||
41 | subs r3, r2, #32 | ||
42 | rsb ip, r2, #32 | ||
43 | movmi al, al, lsr r2 | ||
44 | movpl al, ah, asr r3 | ||
45 | orrmi al, al, ah, lsl ip | ||
46 | mov ah, ah, asr r2 | ||
47 | mov pc, lr | ||
48 | |||
diff --git a/arch/arm/lib/ashrdi3.c b/arch/arm/lib/ashrdi3.c deleted file mode 100644 index 9a8600a7543f..000000000000 --- a/arch/arm/lib/ashrdi3.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | s64 __ashrdi3(s64 u, int b) | ||
35 | { | ||
36 | DIunion w; | ||
37 | int bm; | ||
38 | DIunion uu; | ||
39 | |||
40 | if (b == 0) | ||
41 | return u; | ||
42 | |||
43 | uu.ll = u; | ||
44 | |||
45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; | ||
46 | if (bm <= 0) { | ||
47 | /* w.s.high = 1..1 or 0..0 */ | ||
48 | w.s.high = uu.s.high >> (sizeof(s32) * BITS_PER_UNIT - 1); | ||
49 | w.s.low = uu.s.high >> -bm; | ||
50 | } else { | ||
51 | u32 carries = (u32) uu.s.high << bm; | ||
52 | w.s.high = uu.s.high >> b; | ||
53 | w.s.low = ((u32) uu.s.low >> b) | carries; | ||
54 | } | ||
55 | |||
56 | return w.ll; | ||
57 | } | ||
diff --git a/arch/arm/lib/gcclib.h b/arch/arm/lib/gcclib.h deleted file mode 100644 index 8b6dcc656de7..000000000000 --- a/arch/arm/lib/gcclib.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */ | ||
2 | /* I Molton 29/07/01 */ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #define BITS_PER_UNIT 8 | ||
7 | #define SI_TYPE_SIZE (sizeof(s32) * BITS_PER_UNIT) | ||
8 | |||
9 | #ifdef __ARMEB__ | ||
10 | struct DIstruct { | ||
11 | s32 high, low; | ||
12 | }; | ||
13 | #else | ||
14 | struct DIstruct { | ||
15 | s32 low, high; | ||
16 | }; | ||
17 | #endif | ||
18 | |||
19 | typedef union { | ||
20 | struct DIstruct s; | ||
21 | s64 ll; | ||
22 | } DIunion; | ||
diff --git a/arch/arm/lib/lshrdi3.S b/arch/arm/lib/lshrdi3.S new file mode 100644 index 000000000000..46c2ed19ec95 --- /dev/null +++ b/arch/arm/lib/lshrdi3.S | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005 | ||
2 | Free Software Foundation, Inc. | ||
3 | |||
4 | This file is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU General Public License as published by the | ||
6 | Free Software Foundation; either version 2, or (at your option) any | ||
7 | later version. | ||
8 | |||
9 | In addition to the permissions in the GNU General Public License, the | ||
10 | Free Software Foundation gives you unlimited permission to link the | ||
11 | compiled version of this file into combinations with other programs, | ||
12 | and to distribute those combinations without any restriction coming | ||
13 | from the use of this file. (The General Public License restrictions | ||
14 | do apply in other respects; for example, they cover modification of | ||
15 | the file, and distribution when not linked into a combine | ||
16 | executable.) | ||
17 | |||
18 | This file is distributed in the hope that it will be useful, but | ||
19 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; see the file COPYING. If not, write to | ||
25 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, | ||
26 | Boston, MA 02110-1301, USA. */ | ||
27 | |||
28 | |||
29 | #include <linux/linkage.h> | ||
30 | |||
31 | #ifdef __ARMEB__ | ||
32 | #define al r1 | ||
33 | #define ah r0 | ||
34 | #else | ||
35 | #define al r0 | ||
36 | #define ah r1 | ||
37 | #endif | ||
38 | |||
39 | ENTRY(__lshrdi3) | ||
40 | |||
41 | subs r3, r2, #32 | ||
42 | rsb ip, r2, #32 | ||
43 | movmi al, al, lsr r2 | ||
44 | movpl al, ah, lsr r3 | ||
45 | orrmi al, al, ah, lsl ip | ||
46 | mov ah, ah, lsr r2 | ||
47 | mov pc, lr | ||
48 | |||
diff --git a/arch/arm/lib/lshrdi3.c b/arch/arm/lib/lshrdi3.c deleted file mode 100644 index 3681f49d2b6e..000000000000 --- a/arch/arm/lib/lshrdi3.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | s64 __lshrdi3(s64 u, int b) | ||
35 | { | ||
36 | DIunion w; | ||
37 | int bm; | ||
38 | DIunion uu; | ||
39 | |||
40 | if (b == 0) | ||
41 | return u; | ||
42 | |||
43 | uu.ll = u; | ||
44 | |||
45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; | ||
46 | if (bm <= 0) { | ||
47 | w.s.high = 0; | ||
48 | w.s.low = (u32) uu.s.high >> -bm; | ||
49 | } else { | ||
50 | u32 carries = (u32) uu.s.high << bm; | ||
51 | w.s.high = (u32) uu.s.high >> b; | ||
52 | w.s.low = ((u32) uu.s.low >> b) | carries; | ||
53 | } | ||
54 | |||
55 | return w.ll; | ||
56 | } | ||
diff --git a/arch/arm/lib/muldi3.S b/arch/arm/lib/muldi3.S new file mode 100644 index 000000000000..c7fbdf005319 --- /dev/null +++ b/arch/arm/lib/muldi3.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/muldi3.S | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Created: Oct 19, 2005 | ||
6 | * Copyright: Monta Vista Software, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/linkage.h> | ||
14 | |||
15 | #ifdef __ARMEB__ | ||
16 | #define xh r0 | ||
17 | #define xl r1 | ||
18 | #define yh r2 | ||
19 | #define yl r3 | ||
20 | #else | ||
21 | #define xl r0 | ||
22 | #define xh r1 | ||
23 | #define yl r2 | ||
24 | #define yh r3 | ||
25 | #endif | ||
26 | |||
27 | ENTRY(__muldi3) | ||
28 | |||
29 | mul xh, yl, xh | ||
30 | mla xh, xl, yh, xh | ||
31 | mov ip, xl, asr #16 | ||
32 | mov yh, yl, asr #16 | ||
33 | bic xl, xl, ip, lsl #16 | ||
34 | bic yl, yl, yh, lsl #16 | ||
35 | mla xh, yh, ip, xh | ||
36 | mul yh, xl, yh | ||
37 | mul xl, yl, xl | ||
38 | mul ip, yl, ip | ||
39 | adds xl, xl, yh, lsl #16 | ||
40 | adc xh, xh, yh, lsr #16 | ||
41 | adds xl, xl, ip, lsl #16 | ||
42 | adc xh, xh, ip, lsr #16 | ||
43 | mov pc, lr | ||
44 | |||
diff --git a/arch/arm/lib/muldi3.c b/arch/arm/lib/muldi3.c deleted file mode 100644 index 0a3b93313f18..000000000000 --- a/arch/arm/lib/muldi3.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | #define umul_ppmm(xh, xl, a, b) \ | ||
35 | {register u32 __t0, __t1, __t2; \ | ||
36 | __asm__ ("%@ Inlined umul_ppmm \n\ | ||
37 | mov %2, %5, lsr #16 \n\ | ||
38 | mov %0, %6, lsr #16 \n\ | ||
39 | bic %3, %5, %2, lsl #16 \n\ | ||
40 | bic %4, %6, %0, lsl #16 \n\ | ||
41 | mul %1, %3, %4 \n\ | ||
42 | mul %4, %2, %4 \n\ | ||
43 | mul %3, %0, %3 \n\ | ||
44 | mul %0, %2, %0 \n\ | ||
45 | adds %3, %4, %3 \n\ | ||
46 | addcs %0, %0, #65536 \n\ | ||
47 | adds %1, %1, %3, lsl #16 \n\ | ||
48 | adc %0, %0, %3, lsr #16" \ | ||
49 | : "=&r" ((u32) (xh)), \ | ||
50 | "=r" ((u32) (xl)), \ | ||
51 | "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ | ||
52 | : "r" ((u32) (a)), \ | ||
53 | "r" ((u32) (b)));} | ||
54 | |||
55 | #define __umulsidi3(u, v) \ | ||
56 | ({DIunion __w; \ | ||
57 | umul_ppmm (__w.s.high, __w.s.low, u, v); \ | ||
58 | __w.ll; }) | ||
59 | |||
60 | s64 __muldi3(s64 u, s64 v) | ||
61 | { | ||
62 | DIunion w; | ||
63 | DIunion uu, vv; | ||
64 | |||
65 | uu.ll = u, vv.ll = v; | ||
66 | |||
67 | w.ll = __umulsidi3(uu.s.low, vv.s.low); | ||
68 | w.s.high += ((u32) uu.s.low * (u32) vv.s.high | ||
69 | + (u32) uu.s.high * (u32) vv.s.low); | ||
70 | |||
71 | return w.ll; | ||
72 | } | ||
diff --git a/arch/arm/lib/ucmpdi2.S b/arch/arm/lib/ucmpdi2.S new file mode 100644 index 000000000000..112630f93e5d --- /dev/null +++ b/arch/arm/lib/ucmpdi2.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/ucmpdi2.S | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Created: Oct 19, 2005 | ||
6 | * Copyright: Monta Vista Software, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/linkage.h> | ||
14 | |||
15 | #ifdef __ARMEB__ | ||
16 | #define xh r0 | ||
17 | #define xl r1 | ||
18 | #define yh r2 | ||
19 | #define yl r3 | ||
20 | #else | ||
21 | #define xl r0 | ||
22 | #define xh r1 | ||
23 | #define yl r2 | ||
24 | #define yh r3 | ||
25 | #endif | ||
26 | |||
27 | ENTRY(__ucmpdi2) | ||
28 | |||
29 | cmp xh, yh | ||
30 | cmpeq xl, yl | ||
31 | movlo r0, #0 | ||
32 | moveq r0, #1 | ||
33 | movhi r0, #2 | ||
34 | mov pc, lr | ||
35 | |||
diff --git a/arch/arm/lib/ucmpdi2.c b/arch/arm/lib/ucmpdi2.c deleted file mode 100644 index 57f3f2df3850..000000000000 --- a/arch/arm/lib/ucmpdi2.c +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | int __ucmpdi2(s64 a, s64 b) | ||
35 | { | ||
36 | DIunion au, bu; | ||
37 | |||
38 | au.ll = a, bu.ll = b; | ||
39 | |||
40 | if ((u32) au.s.high < (u32) bu.s.high) | ||
41 | return 0; | ||
42 | else if ((u32) au.s.high > (u32) bu.s.high) | ||
43 | return 2; | ||
44 | if ((u32) au.s.low < (u32) bu.s.low) | ||
45 | return 0; | ||
46 | else if ((u32) au.s.low > (u32) bu.s.low) | ||
47 | return 2; | ||
48 | return 1; | ||
49 | } | ||
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 60c8b9d8bb9c..656f73bbcb5a 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <asm/arch/pxa-regs.h> | 34 | #include <asm/arch/pxa-regs.h> |
35 | #include <asm/arch/irq.h> | 35 | #include <asm/arch/irq.h> |
36 | #include <asm/arch/irda.h> | ||
36 | #include <asm/arch/mmc.h> | 37 | #include <asm/arch/mmc.h> |
37 | #include <asm/arch/udc.h> | 38 | #include <asm/arch/udc.h> |
38 | #include <asm/arch/corgi.h> | 39 | #include <asm/arch/corgi.h> |
@@ -224,6 +225,22 @@ static struct pxamci_platform_data corgi_mci_platform_data = { | |||
224 | }; | 225 | }; |
225 | 226 | ||
226 | 227 | ||
228 | /* | ||
229 | * Irda | ||
230 | */ | ||
231 | static void corgi_irda_transceiver_mode(struct device *dev, int mode) | ||
232 | { | ||
233 | if (mode & IR_OFF) | ||
234 | GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); | ||
235 | else | ||
236 | GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); | ||
237 | } | ||
238 | |||
239 | static struct pxaficp_platform_data corgi_ficp_platform_data = { | ||
240 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
241 | .transceiver_mode = corgi_irda_transceiver_mode, | ||
242 | }; | ||
243 | |||
227 | 244 | ||
228 | /* | 245 | /* |
229 | * USB Device Controller | 246 | * USB Device Controller |
@@ -269,10 +286,13 @@ static void __init corgi_init(void) | |||
269 | 286 | ||
270 | corgi_ssp_set_machinfo(&corgi_ssp_machinfo); | 287 | corgi_ssp_set_machinfo(&corgi_ssp_machinfo); |
271 | 288 | ||
289 | pxa_gpio_mode(CORGI_GPIO_IR_ON | GPIO_OUT); | ||
272 | pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); | 290 | pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); |
273 | pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN); | 291 | pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN); |
292 | |||
274 | pxa_set_udc_info(&udc_info); | 293 | pxa_set_udc_info(&udc_info); |
275 | pxa_set_mci_info(&corgi_mci_platform_data); | 294 | pxa_set_mci_info(&corgi_mci_platform_data); |
295 | pxa_set_ficp_info(&corgi_ficp_platform_data); | ||
276 | 296 | ||
277 | scoop_num = 1; | 297 | scoop_num = 1; |
278 | scoop_devs = &corgi_pcmcia_scoop[0]; | 298 | scoop_devs = &corgi_pcmcia_scoop[0]; |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index f25638810017..6d413f6701a7 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/arch/irq.h> | 32 | #include <asm/arch/irq.h> |
33 | #include <asm/arch/mmc.h> | 33 | #include <asm/arch/mmc.h> |
34 | #include <asm/arch/udc.h> | 34 | #include <asm/arch/udc.h> |
35 | #include <asm/arch/irda.h> | ||
35 | #include <asm/arch/poodle.h> | 36 | #include <asm/arch/poodle.h> |
36 | #include <asm/arch/pxafb.h> | 37 | #include <asm/arch/pxafb.h> |
37 | 38 | ||
@@ -152,6 +153,24 @@ static struct pxamci_platform_data poodle_mci_platform_data = { | |||
152 | 153 | ||
153 | 154 | ||
154 | /* | 155 | /* |
156 | * Irda | ||
157 | */ | ||
158 | static void poodle_irda_transceiver_mode(struct device *dev, int mode) | ||
159 | { | ||
160 | if (mode & IR_OFF) { | ||
161 | GPSR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); | ||
162 | } else { | ||
163 | GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); | ||
164 | } | ||
165 | } | ||
166 | |||
167 | static struct pxaficp_platform_data poodle_ficp_platform_data = { | ||
168 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
169 | .transceiver_mode = poodle_irda_transceiver_mode, | ||
170 | }; | ||
171 | |||
172 | |||
173 | /* | ||
155 | * USB Device Controller | 174 | * USB Device Controller |
156 | */ | 175 | */ |
157 | static void poodle_udc_command(int cmd) | 176 | static void poodle_udc_command(int cmd) |
@@ -244,8 +263,10 @@ static void __init poodle_init(void) | |||
244 | 263 | ||
245 | set_pxa_fb_info(&poodle_fb_info); | 264 | set_pxa_fb_info(&poodle_fb_info); |
246 | pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); | 265 | pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); |
266 | pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT); | ||
247 | pxa_set_udc_info(&udc_info); | 267 | pxa_set_udc_info(&udc_info); |
248 | pxa_set_mci_info(&poodle_mci_platform_data); | 268 | pxa_set_mci_info(&poodle_mci_platform_data); |
269 | pxa_set_ficp_info(&poodle_ficp_platform_data); | ||
249 | 270 | ||
250 | scoop_num = 1; | 271 | scoop_num = 1; |
251 | scoop_devs = &poodle_pcmcia_scoop[0]; | 272 | scoop_devs = &poodle_pcmcia_scoop[0]; |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index d0ab428c2d7d..b838842b6a20 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <asm/arch/pxa-regs.h> | 35 | #include <asm/arch/pxa-regs.h> |
36 | #include <asm/arch/irq.h> | 36 | #include <asm/arch/irq.h> |
37 | #include <asm/arch/irda.h> | ||
37 | #include <asm/arch/mmc.h> | 38 | #include <asm/arch/mmc.h> |
38 | #include <asm/arch/udc.h> | 39 | #include <asm/arch/udc.h> |
39 | #include <asm/arch/pxafb.h> | 40 | #include <asm/arch/pxafb.h> |
@@ -277,6 +278,23 @@ static struct pxamci_platform_data spitz_mci_platform_data = { | |||
277 | 278 | ||
278 | 279 | ||
279 | /* | 280 | /* |
281 | * Irda | ||
282 | */ | ||
283 | static void spitz_irda_transceiver_mode(struct device *dev, int mode) | ||
284 | { | ||
285 | if (mode & IR_OFF) | ||
286 | set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); | ||
287 | else | ||
288 | reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); | ||
289 | } | ||
290 | |||
291 | static struct pxaficp_platform_data spitz_ficp_platform_data = { | ||
292 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
293 | .transceiver_mode = spitz_irda_transceiver_mode, | ||
294 | }; | ||
295 | |||
296 | |||
297 | /* | ||
280 | * Spitz PXA Framebuffer | 298 | * Spitz PXA Framebuffer |
281 | */ | 299 | */ |
282 | static struct pxafb_mach_info spitz_pxafb_info __initdata = { | 300 | static struct pxafb_mach_info spitz_pxafb_info __initdata = { |
@@ -326,6 +344,7 @@ static void __init common_init(void) | |||
326 | 344 | ||
327 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 345 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
328 | pxa_set_mci_info(&spitz_mci_platform_data); | 346 | pxa_set_mci_info(&spitz_mci_platform_data); |
347 | pxa_set_ficp_info(&spitz_ficp_platform_data); | ||
329 | set_pxa_fb_parent(&spitzssp_device.dev); | 348 | set_pxa_fb_parent(&spitzssp_device.dev); |
330 | set_pxa_fb_info(&spitz_pxafb_info); | 349 | set_pxa_fb_info(&spitz_pxafb_info); |
331 | } | 350 | } |
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 27d041574ea7..269ce6913ee9 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -22,9 +22,7 @@ | |||
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #define from_address (0xffff8000) | 24 | #define from_address (0xffff8000) |
25 | #define from_pgprot PAGE_KERNEL | ||
26 | #define to_address (0xffffc000) | 25 | #define to_address (0xffffc000) |
27 | #define to_pgprot PAGE_KERNEL | ||
28 | 26 | ||
29 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) | 27 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) |
30 | 28 | ||
@@ -34,7 +32,7 @@ static DEFINE_SPINLOCK(v6_lock); | |||
34 | * Copy the user page. No aliasing to deal with so we can just | 32 | * Copy the user page. No aliasing to deal with so we can just |
35 | * attack the kernel's existing mapping of these pages. | 33 | * attack the kernel's existing mapping of these pages. |
36 | */ | 34 | */ |
37 | void v6_copy_user_page_nonaliasing(void *kto, const void *kfrom, unsigned long vaddr) | 35 | static void v6_copy_user_page_nonaliasing(void *kto, const void *kfrom, unsigned long vaddr) |
38 | { | 36 | { |
39 | copy_page(kto, kfrom); | 37 | copy_page(kto, kfrom); |
40 | } | 38 | } |
@@ -43,7 +41,7 @@ void v6_copy_user_page_nonaliasing(void *kto, const void *kfrom, unsigned long v | |||
43 | * Clear the user page. No aliasing to deal with so we can just | 41 | * Clear the user page. No aliasing to deal with so we can just |
44 | * attack the kernel's existing mapping of this page. | 42 | * attack the kernel's existing mapping of this page. |
45 | */ | 43 | */ |
46 | void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) | 44 | static void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) |
47 | { | 45 | { |
48 | clear_page(kaddr); | 46 | clear_page(kaddr); |
49 | } | 47 | } |
@@ -51,7 +49,7 @@ void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) | |||
51 | /* | 49 | /* |
52 | * Copy the page, taking account of the cache colour. | 50 | * Copy the page, taking account of the cache colour. |
53 | */ | 51 | */ |
54 | void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) | 52 | static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) |
55 | { | 53 | { |
56 | unsigned int offset = CACHE_COLOUR(vaddr); | 54 | unsigned int offset = CACHE_COLOUR(vaddr); |
57 | unsigned long from, to; | 55 | unsigned long from, to; |
@@ -72,8 +70,8 @@ void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vadd | |||
72 | */ | 70 | */ |
73 | spin_lock(&v6_lock); | 71 | spin_lock(&v6_lock); |
74 | 72 | ||
75 | set_pte(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, from_pgprot)); | 73 | set_pte(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, PAGE_KERNEL)); |
76 | set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, to_pgprot)); | 74 | set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, PAGE_KERNEL)); |
77 | 75 | ||
78 | from = from_address + (offset << PAGE_SHIFT); | 76 | from = from_address + (offset << PAGE_SHIFT); |
79 | to = to_address + (offset << PAGE_SHIFT); | 77 | to = to_address + (offset << PAGE_SHIFT); |
@@ -91,7 +89,7 @@ void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vadd | |||
91 | * so remap the kernel page into the same cache colour as the user | 89 | * so remap the kernel page into the same cache colour as the user |
92 | * page. | 90 | * page. |
93 | */ | 91 | */ |
94 | void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | 92 | static void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) |
95 | { | 93 | { |
96 | unsigned int offset = CACHE_COLOUR(vaddr); | 94 | unsigned int offset = CACHE_COLOUR(vaddr); |
97 | unsigned long to = to_address + (offset << PAGE_SHIFT); | 95 | unsigned long to = to_address + (offset << PAGE_SHIFT); |
@@ -112,7 +110,7 @@ void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | |||
112 | */ | 110 | */ |
113 | spin_lock(&v6_lock); | 111 | spin_lock(&v6_lock); |
114 | 112 | ||
115 | set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, to_pgprot)); | 113 | set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL)); |
116 | flush_tlb_kernel_page(to); | 114 | flush_tlb_kernel_page(to); |
117 | clear_page((void *)to); | 115 | clear_page((void *)to); |
118 | 116 | ||