diff options
| -rw-r--r-- | arch/sparc/lib/Makefile | 3 | ||||
| -rw-r--r-- | arch/sparc/lib/cmpdi2.c | 27 | ||||
| -rw-r--r-- | arch/sparc/lib/libgcc.h | 18 | ||||
| -rw-r--r-- | arch/sparc/prom/console.c | 3 | ||||
| -rw-r--r-- | drivers/block/sunvdc.c | 2 | ||||
| -rw-r--r-- | drivers/serial/sunsu.c | 5 | ||||
| -rw-r--r-- | drivers/serial/sunzilog.c | 14 | ||||
| -rw-r--r-- | drivers/video/bw2.c | 22 | ||||
| -rw-r--r-- | drivers/video/cg3.c | 17 | ||||
| -rw-r--r-- | include/asm-sparc/tlbflush.h | 6 |
10 files changed, 87 insertions, 30 deletions
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile index 9ddc5b9ce3bd..76effdbea075 100644 --- a/arch/sparc/lib/Makefile +++ b/arch/sparc/lib/Makefile | |||
| @@ -8,6 +8,7 @@ lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \ | |||
| 8 | strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \ | 8 | strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \ |
| 9 | strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \ | 9 | strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \ |
| 10 | copy_user.o locks.o atomic.o \ | 10 | copy_user.o locks.o atomic.o \ |
| 11 | lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o | 11 | lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o \ |
| 12 | cmpdi2.o | ||
| 12 | 13 | ||
| 13 | obj-y += iomap.o atomic32.o | 14 | obj-y += iomap.o atomic32.o |
diff --git a/arch/sparc/lib/cmpdi2.c b/arch/sparc/lib/cmpdi2.c new file mode 100644 index 000000000000..8c1306437ed1 --- /dev/null +++ b/arch/sparc/lib/cmpdi2.c | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #include <linux/module.h> | ||
| 2 | |||
| 3 | #include "libgcc.h" | ||
| 4 | |||
| 5 | word_type __cmpdi2(long long a, long long b) | ||
| 6 | { | ||
| 7 | const DWunion au = { | ||
| 8 | .ll = a | ||
| 9 | }; | ||
| 10 | const DWunion bu = { | ||
| 11 | .ll = b | ||
| 12 | }; | ||
| 13 | |||
| 14 | if (au.s.high < bu.s.high) | ||
| 15 | return 0; | ||
| 16 | else if (au.s.high > bu.s.high) | ||
| 17 | return 2; | ||
| 18 | |||
| 19 | if ((unsigned int) au.s.low < (unsigned int) bu.s.low) | ||
| 20 | return 0; | ||
| 21 | else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) | ||
| 22 | return 2; | ||
| 23 | |||
| 24 | return 1; | ||
| 25 | } | ||
| 26 | |||
| 27 | EXPORT_SYMBOL(__cmpdi2); | ||
diff --git a/arch/sparc/lib/libgcc.h b/arch/sparc/lib/libgcc.h new file mode 100644 index 000000000000..b84fd797f3ea --- /dev/null +++ b/arch/sparc/lib/libgcc.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #ifndef __ASM_LIBGCC_H | ||
| 2 | #define __ASM_LIBGCC_H | ||
| 3 | |||
| 4 | #include <asm/byteorder.h> | ||
| 5 | |||
| 6 | typedef int word_type __attribute__ ((mode (__word__))); | ||
| 7 | |||
| 8 | struct DWstruct { | ||
| 9 | int high, low; | ||
| 10 | }; | ||
| 11 | |||
| 12 | typedef union | ||
| 13 | { | ||
| 14 | struct DWstruct s; | ||
| 15 | long long ll; | ||
| 16 | } DWunion; | ||
| 17 | |||
| 18 | #endif /* __ASM_LIBGCC_H */ | ||
diff --git a/arch/sparc/prom/console.c b/arch/sparc/prom/console.c index 8d1cfb0d5068..2a007a784415 100644 --- a/arch/sparc/prom/console.c +++ b/arch/sparc/prom/console.c | |||
| @@ -17,9 +17,6 @@ | |||
| 17 | 17 | ||
| 18 | extern void restore_current(void); | 18 | extern void restore_current(void); |
| 19 | 19 | ||
| 20 | static char con_name_jmc[] = "/obio/su@"; /* "/obio/su@0,3002f8"; */ | ||
| 21 | #define CON_SIZE_JMC (sizeof(con_name_jmc)) | ||
| 22 | |||
| 23 | /* Non blocking get character from console input device, returns -1 | 20 | /* Non blocking get character from console input device, returns -1 |
| 24 | * if no input was taken. This can be used for polling. | 21 | * if no input was taken. This can be used for polling. |
| 25 | */ | 22 | */ |
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c index 4dff49256ac2..317a790c153b 100644 --- a/drivers/block/sunvdc.c +++ b/drivers/block/sunvdc.c | |||
| @@ -417,7 +417,7 @@ static int __send_request(struct request *req) | |||
| 417 | desc->req_id = port->req_id; | 417 | desc->req_id = port->req_id; |
| 418 | desc->operation = op; | 418 | desc->operation = op; |
| 419 | if (port->vdisk_type == VD_DISK_TYPE_DISK) { | 419 | if (port->vdisk_type == VD_DISK_TYPE_DISK) { |
| 420 | desc->slice = 2; | 420 | desc->slice = 0xff; |
| 421 | } else { | 421 | } else { |
| 422 | desc->slice = 0; | 422 | desc->slice = 0; |
| 423 | } | 423 | } |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 79b13685bdfa..e074943feff5 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
| @@ -1198,10 +1198,11 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up) | |||
| 1198 | if (up->port.type == PORT_UNKNOWN) | 1198 | if (up->port.type == PORT_UNKNOWN) |
| 1199 | return -ENODEV; | 1199 | return -ENODEV; |
| 1200 | 1200 | ||
| 1201 | printk("%s: %s port at %lx, irq %u\n", | 1201 | printk("%s: %s port at %llx, irq %u\n", |
| 1202 | to_of_device(up->port.dev)->node->full_name, | 1202 | to_of_device(up->port.dev)->node->full_name, |
| 1203 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", | 1203 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", |
| 1204 | up->port.mapbase, up->port.irq); | 1204 | (unsigned long long) up->port.mapbase, |
| 1205 | up->port.irq); | ||
| 1205 | 1206 | ||
| 1206 | #ifdef CONFIG_SERIO | 1207 | #ifdef CONFIG_SERIO |
| 1207 | serio = &up->serio; | 1208 | serio = &up->serio; |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 1d262c0c613f..283bef0d24cb 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
| @@ -1431,14 +1431,16 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
| 1431 | return err; | 1431 | return err; |
| 1432 | } | 1432 | } |
| 1433 | } else { | 1433 | } else { |
| 1434 | printk(KERN_INFO "%s: Keyboard at MMIO 0x%lx (irq = %d) " | 1434 | printk(KERN_INFO "%s: Keyboard at MMIO 0x%llx (irq = %d) " |
| 1435 | "is a %s\n", | 1435 | "is a %s\n", |
| 1436 | op->dev.bus_id, up[0].port.mapbase, op->irqs[0], | 1436 | op->dev.bus_id, |
| 1437 | sunzilog_type (&up[0].port)); | 1437 | (unsigned long long) up[0].port.mapbase, |
| 1438 | printk(KERN_INFO "%s: Mouse at MMIO 0x%lx (irq = %d) " | 1438 | op->irqs[0], sunzilog_type(&up[0].port)); |
| 1439 | printk(KERN_INFO "%s: Mouse at MMIO 0x%llx (irq = %d) " | ||
| 1439 | "is a %s\n", | 1440 | "is a %s\n", |
| 1440 | op->dev.bus_id, up[1].port.mapbase, op->irqs[0], | 1441 | op->dev.bus_id, |
| 1441 | sunzilog_type (&up[1].port)); | 1442 | (unsigned long long) up[1].port.mapbase, |
| 1443 | op->irqs[0], sunzilog_type(&up[1].port)); | ||
| 1442 | } | 1444 | } |
| 1443 | 1445 | ||
| 1444 | dev_set_drvdata(&op->dev, &up[0]); | 1446 | dev_set_drvdata(&op->dev, &up[0]); |
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index 718b9f83736e..833b10c84064 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c | |||
| @@ -233,9 +233,9 @@ static u8 bw2regs_66hz[] __devinitdata = { | |||
| 233 | 0x10, 0x20, 0 | 233 | 0x10, 0x20, 0 |
| 234 | }; | 234 | }; |
| 235 | 235 | ||
| 236 | static void __devinit bw2_do_default_mode(struct bw2_par *par, | 236 | static int __devinit bw2_do_default_mode(struct bw2_par *par, |
| 237 | struct fb_info *info, | 237 | struct fb_info *info, |
| 238 | int *linebytes) | 238 | int *linebytes) |
| 239 | { | 239 | { |
| 240 | u8 status, mon; | 240 | u8 status, mon; |
| 241 | u8 *p; | 241 | u8 *p; |
| @@ -266,17 +266,18 @@ static void __devinit bw2_do_default_mode(struct bw2_par *par, | |||
| 266 | break; | 266 | break; |
| 267 | 267 | ||
| 268 | case BWTWO_SR_ID_NOCONN: | 268 | case BWTWO_SR_ID_NOCONN: |
| 269 | return; | 269 | return 0; |
| 270 | 270 | ||
| 271 | default: | 271 | default: |
| 272 | prom_printf("bw2: can't handle SR %02x\n", | 272 | printk(KERN_ERR "bw2: can't handle SR %02x\n", |
| 273 | status); | 273 | status); |
| 274 | prom_halt(); | 274 | return -EINVAL; |
| 275 | } | 275 | } |
| 276 | for ( ; *p; p += 2) { | 276 | for ( ; *p; p += 2) { |
| 277 | u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]]; | 277 | u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]]; |
| 278 | sbus_writeb(p[1], regp); | 278 | sbus_writeb(p[1], regp); |
| 279 | } | 279 | } |
| 280 | return 0; | ||
| 280 | } | 281 | } |
| 281 | 282 | ||
| 282 | static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match) | 283 | static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match) |
| @@ -312,8 +313,11 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id * | |||
| 312 | if (!par->regs) | 313 | if (!par->regs) |
| 313 | goto out_release_fb; | 314 | goto out_release_fb; |
| 314 | 315 | ||
| 315 | if (!of_find_property(dp, "width", NULL)) | 316 | if (!of_find_property(dp, "width", NULL)) { |
| 316 | bw2_do_default_mode(par, info, &linebytes); | 317 | err = bw2_do_default_mode(par, info, &linebytes); |
| 318 | if (err) | ||
| 319 | goto out_unmap_regs; | ||
| 320 | } | ||
| 317 | 321 | ||
| 318 | par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); | 322 | par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); |
| 319 | 323 | ||
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index 5741b46ade1b..a5c7fb331527 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c | |||
| @@ -315,7 +315,7 @@ static u_char cg3_dacvals[] __devinitdata = { | |||
| 315 | 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0 | 315 | 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0 |
| 316 | }; | 316 | }; |
| 317 | 317 | ||
| 318 | static void __devinit cg3_do_default_mode(struct cg3_par *par) | 318 | static int __devinit cg3_do_default_mode(struct cg3_par *par) |
| 319 | { | 319 | { |
| 320 | enum cg3_type type; | 320 | enum cg3_type type; |
| 321 | u8 *p; | 321 | u8 *p; |
| @@ -332,10 +332,9 @@ static void __devinit cg3_do_default_mode(struct cg3_par *par) | |||
| 332 | else | 332 | else |
| 333 | type = CG3_AT_66HZ; | 333 | type = CG3_AT_66HZ; |
| 334 | } else { | 334 | } else { |
| 335 | prom_printf("cgthree: can't handle SR %02x\n", | 335 | printk(KERN_ERR "cgthree: can't handle SR %02x\n", |
| 336 | status); | 336 | status); |
| 337 | prom_halt(); | 337 | return -EINVAL; |
| 338 | return; | ||
| 339 | } | 338 | } |
| 340 | } | 339 | } |
| 341 | 340 | ||
| @@ -351,6 +350,7 @@ static void __devinit cg3_do_default_mode(struct cg3_par *par) | |||
| 351 | regp = (u8 __iomem *)&par->regs->cmap.control; | 350 | regp = (u8 __iomem *)&par->regs->cmap.control; |
| 352 | sbus_writeb(p[1], regp); | 351 | sbus_writeb(p[1], regp); |
| 353 | } | 352 | } |
| 353 | return 0; | ||
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | static int __devinit cg3_probe(struct of_device *op, | 356 | static int __devinit cg3_probe(struct of_device *op, |
| @@ -400,8 +400,11 @@ static int __devinit cg3_probe(struct of_device *op, | |||
| 400 | 400 | ||
| 401 | cg3_blank(0, info); | 401 | cg3_blank(0, info); |
| 402 | 402 | ||
| 403 | if (!of_find_property(dp, "width", NULL)) | 403 | if (!of_find_property(dp, "width", NULL)) { |
| 404 | cg3_do_default_mode(par); | 404 | err = cg3_do_default_mode(par); |
| 405 | if (err) | ||
| 406 | goto out_unmap_screen; | ||
| 407 | } | ||
| 405 | 408 | ||
| 406 | if (fb_alloc_cmap(&info->cmap, 256, 0)) | 409 | if (fb_alloc_cmap(&info->cmap, 256, 0)) |
| 407 | goto out_unmap_screen; | 410 | goto out_unmap_screen; |
diff --git a/include/asm-sparc/tlbflush.h b/include/asm-sparc/tlbflush.h index 4a3b66618e75..a619da5cfaa9 100644 --- a/include/asm-sparc/tlbflush.h +++ b/include/asm-sparc/tlbflush.h | |||
| @@ -57,6 +57,10 @@ BTFIXUPDEF_CALL(void, flush_tlb_page, struct vm_area_struct *, unsigned long) | |||
| 57 | /* | 57 | /* |
| 58 | * This is a kludge, until I know better. --zaitcev XXX | 58 | * This is a kludge, until I know better. --zaitcev XXX |
| 59 | */ | 59 | */ |
| 60 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() | 60 | static inline void flush_tlb_kernel_range(unsigned long start, |
| 61 | unsigned long end) | ||
| 62 | { | ||
| 63 | flush_tlb_all(); | ||
| 64 | } | ||
| 61 | 65 | ||
| 62 | #endif /* _SPARC_TLBFLUSH_H */ | 66 | #endif /* _SPARC_TLBFLUSH_H */ |
