Merge master.kernel.org:/home/rmk/linux-2.6-arm

+53 -72
+1 -1
arch/arm/Makefile
··· 56 tune-$(CONFIG_CPU_V6) :=-mtune=strongarm 57 58 # Need -Uarm for gcc < 3.x 59 - CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) 60 CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 61 AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 62
··· 56 tune-$(CONFIG_CPU_V6) :=-mtune=strongarm 57 58 # Need -Uarm for gcc < 3.x 59 + CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) 60 CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 61 AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 62
+2 -10
arch/arm/kernel/traps.c
··· 230 do_exit(SIGSEGV); 231 } 232 233 - void die_if_kernel(const char *str, struct pt_regs *regs, int err) 234 - { 235 - if (user_mode(regs)) 236 - return; 237 - 238 - die(str, regs, err); 239 - } 240 - 241 - static void notify_die(const char *str, struct pt_regs *regs, siginfo_t *info, 242 - unsigned long err, unsigned long trap) 243 { 244 if (user_mode(regs)) { 245 current->thread.error_code = err;
··· 230 do_exit(SIGSEGV); 231 } 232 233 + void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, 234 + unsigned long err, unsigned long trap) 235 { 236 if (user_mode(regs)) { 237 current->thread.error_code = err;
+40 -35
arch/arm/mm/fault.c
··· 372 static struct fsr_info { 373 int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); 374 int sig; 375 const char *name; 376 } fsr_info[] = { 377 /* 378 * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 379 * defines these to be "precise" aborts. 380 */ 381 - { do_bad, SIGSEGV, "vector exception" }, 382 - { do_bad, SIGILL, "alignment exception" }, 383 - { do_bad, SIGKILL, "terminal exception" }, 384 - { do_bad, SIGILL, "alignment exception" }, 385 - { do_bad, SIGBUS, "external abort on linefetch" }, 386 - { do_translation_fault, SIGSEGV, "section translation fault" }, 387 - { do_bad, SIGBUS, "external abort on linefetch" }, 388 - { do_page_fault, SIGSEGV, "page translation fault" }, 389 - { do_bad, SIGBUS, "external abort on non-linefetch" }, 390 - { do_bad, SIGSEGV, "section domain fault" }, 391 - { do_bad, SIGBUS, "external abort on non-linefetch" }, 392 - { do_bad, SIGSEGV, "page domain fault" }, 393 - { do_bad, SIGBUS, "external abort on translation" }, 394 - { do_sect_fault, SIGSEGV, "section permission fault" }, 395 - { do_bad, SIGBUS, "external abort on translation" }, 396 - { do_page_fault, SIGSEGV, "page permission fault" }, 397 /* 398 * The following are "imprecise" aborts, which are signalled by bit 399 * 10 of the FSR, and may not be recoverable. These are only 400 * supported if the CPU abort handler supports bit 10. 401 */ 402 - { do_bad, SIGBUS, "unknown 16" }, 403 - { do_bad, SIGBUS, "unknown 17" }, 404 - { do_bad, SIGBUS, "unknown 18" }, 405 - { do_bad, SIGBUS, "unknown 19" }, 406 - { do_bad, SIGBUS, "lock abort" }, /* xscale */ 407 - { do_bad, SIGBUS, "unknown 21" }, 408 - { do_bad, SIGBUS, "imprecise external abort" }, /* xscale */ 409 - { do_bad, SIGBUS, "unknown 23" }, 410 - { do_bad, SIGBUS, "dcache parity error" }, /* xscale */ 411 - { do_bad, SIGBUS, "unknown 25" }, 412 - { do_bad, SIGBUS, "unknown 26" }, 413 - { do_bad, SIGBUS, "unknown 27" }, 414 - { do_bad, SIGBUS, "unknown 28" }, 415 - { do_bad, SIGBUS, "unknown 29" }, 416 - { do_bad, SIGBUS, "unknown 30" }, 417 - { do_bad, SIGBUS, "unknown 31" } 418 }; 419 420 void __init ··· 436 do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) 437 { 438 const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); 439 440 if (!inf->fn(addr, fsr, regs)) 441 return; 442 443 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", 444 inf->name, fsr, addr); 445 - force_sig(inf->sig, current); 446 - show_pte(current->mm, addr); 447 - die_if_kernel("Oops", regs, 0); 448 } 449 450 asmlinkage void
··· 372 static struct fsr_info { 373 int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); 374 int sig; 375 + int code; 376 const char *name; 377 } fsr_info[] = { 378 /* 379 * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 380 * defines these to be "precise" aborts. 381 */ 382 + { do_bad, SIGSEGV, 0, "vector exception" }, 383 + { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, 384 + { do_bad, SIGKILL, 0, "terminal exception" }, 385 + { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, 386 + { do_bad, SIGBUS, 0, "external abort on linefetch" }, 387 + { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, 388 + { do_bad, SIGBUS, 0, "external abort on linefetch" }, 389 + { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, 390 + { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 391 + { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, 392 + { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 393 + { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, 394 + { do_bad, SIGBUS, 0, "external abort on translation" }, 395 + { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, 396 + { do_bad, SIGBUS, 0, "external abort on translation" }, 397 + { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, 398 /* 399 * The following are "imprecise" aborts, which are signalled by bit 400 * 10 of the FSR, and may not be recoverable. These are only 401 * supported if the CPU abort handler supports bit 10. 402 */ 403 + { do_bad, SIGBUS, 0, "unknown 16" }, 404 + { do_bad, SIGBUS, 0, "unknown 17" }, 405 + { do_bad, SIGBUS, 0, "unknown 18" }, 406 + { do_bad, SIGBUS, 0, "unknown 19" }, 407 + { do_bad, SIGBUS, 0, "lock abort" }, /* xscale */ 408 + { do_bad, SIGBUS, 0, "unknown 21" }, 409 + { do_bad, SIGBUS, BUS_OBJERR, "imprecise external abort" }, /* xscale */ 410 + { do_bad, SIGBUS, 0, "unknown 23" }, 411 + { do_bad, SIGBUS, 0, "dcache parity error" }, /* xscale */ 412 + { do_bad, SIGBUS, 0, "unknown 25" }, 413 + { do_bad, SIGBUS, 0, "unknown 26" }, 414 + { do_bad, SIGBUS, 0, "unknown 27" }, 415 + { do_bad, SIGBUS, 0, "unknown 28" }, 416 + { do_bad, SIGBUS, 0, "unknown 29" }, 417 + { do_bad, SIGBUS, 0, "unknown 30" }, 418 + { do_bad, SIGBUS, 0, "unknown 31" } 419 }; 420 421 void __init ··· 435 do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) 436 { 437 const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); 438 + struct siginfo info; 439 440 if (!inf->fn(addr, fsr, regs)) 441 return; 442 443 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", 444 inf->name, fsr, addr); 445 + 446 + info.si_signo = inf->sig; 447 + info.si_errno = 0; 448 + info.si_code = inf->code; 449 + info.si_addr = (void __user *)addr; 450 + notify_die("", regs, &info, fsr, 0); 451 } 452 453 asmlinkage void
+2 -2
arch/arm/mm/proc-arm1020.S
··· 445 /* 446 * R 447 * .RVI ZFRS BLDP WCAM 448 - * .0.1 1001 ..11 0101 /* FIXME: why no V bit? */ 449 */ 450 .type arm1020_cr1_clear, #object 451 .type arm1020_cr1_set, #object 452 arm1020_cr1_clear: 453 .word 0x593f 454 arm1020_cr1_set: 455 - .word 0x1935 456 457 __INITDATA 458
··· 445 /* 446 * R 447 * .RVI ZFRS BLDP WCAM 448 + * .011 1001 ..11 0101 449 */ 450 .type arm1020_cr1_clear, #object 451 .type arm1020_cr1_set, #object 452 arm1020_cr1_clear: 453 .word 0x593f 454 arm1020_cr1_set: 455 + .word 0x3935 456 457 __INITDATA 458
+2 -2
arch/arm/mm/proc-arm1020e.S
··· 427 /* 428 * R 429 * .RVI ZFRS BLDP WCAM 430 - * .0.1 1001 ..11 0101 /* FIXME: why no V bit? */ 431 */ 432 .type arm1020e_cr1_clear, #object 433 .type arm1020e_cr1_set, #object 434 arm1020e_cr1_clear: 435 .word 0x5f3f 436 arm1020e_cr1_set: 437 - .word 0x1935 438 439 __INITDATA 440
··· 427 /* 428 * R 429 * .RVI ZFRS BLDP WCAM 430 + * .011 1001 ..11 0101 431 */ 432 .type arm1020e_cr1_clear, #object 433 .type arm1020e_cr1_set, #object 434 arm1020e_cr1_clear: 435 .word 0x5f3f 436 arm1020e_cr1_set: 437 + .word 0x3935 438 439 __INITDATA 440
+2 -14
drivers/mtd/afs.c
··· 219 */ 220 for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { 221 struct image_info_struct iis; 222 - u_int iis_ptr, img_ptr, size; 223 224 /* Read the footer. */ 225 ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); ··· 236 continue; 237 238 strcpy(str, iis.name); 239 - size = mtd->erasesize + off - img_ptr; 240 - 241 - /* 242 - * In order to support JFFS2 partitions on this layout, 243 - * we must lie to MTD about the real size of JFFS2 244 - * partitions; this ensures that the AFS flash footer 245 - * won't be erased by JFFS2. Please ensure that your 246 - * JFFS2 partitions are given image numbers between 247 - * 1000 and 2000 inclusive. 248 - */ 249 - if (iis.imageNumber >= 1000 && iis.imageNumber < 2000) 250 - size -= mtd->erasesize; 251 252 parts[idx].name = str; 253 - parts[idx].size = size; 254 parts[idx].offset = img_ptr; 255 parts[idx].mask_flags = 0; 256
··· 219 */ 220 for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { 221 struct image_info_struct iis; 222 + u_int iis_ptr, img_ptr; 223 224 /* Read the footer. */ 225 ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); ··· 236 continue; 237 238 strcpy(str, iis.name); 239 240 parts[idx].name = str; 241 + parts[idx].size = (iis.length + mtd->erasesize - 1) & ~(mtd->erasesize - 1); 242 parts[idx].offset = img_ptr; 243 parts[idx].mask_flags = 0; 244
+1 -7
drivers/video/console/fbcon.c
··· 142 #define CURSOR_DRAW_DELAY (1) 143 144 /* # VBL ints between cursor state changes */ 145 - #define ARM_CURSOR_BLINK_RATE (10) 146 #define ATARI_CURSOR_BLINK_RATE (42) 147 #define MAC_CURSOR_BLINK_RATE (32) 148 #define DEFAULT_CURSOR_BLINK_RATE (20) ··· 287 release_console_sem(); 288 } 289 290 - #if (defined(__arm__) && defined(IRQ_VSYNCPULSE)) || defined(CONFIG_ATARI) || defined(CONFIG_MAC) 291 static int cursor_blink_rate; 292 static irqreturn_t fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) 293 { ··· 877 } 878 #endif /* CONFIG_MAC */ 879 880 - #if defined(__arm__) && defined(IRQ_VSYNCPULSE) 881 - cursor_blink_rate = ARM_CURSOR_BLINK_RATE; 882 - irqres = request_irq(IRQ_VSYNCPULSE, fb_vbl_handler, SA_SHIRQ, 883 - "framebuffer vbl", info); 884 - #endif 885 /* Initialize the work queue. If the driver provides its 886 * own work queue this means it will use something besides 887 * default timer to flash the cursor. */
··· 142 #define CURSOR_DRAW_DELAY (1) 143 144 /* # VBL ints between cursor state changes */ 145 #define ATARI_CURSOR_BLINK_RATE (42) 146 #define MAC_CURSOR_BLINK_RATE (32) 147 #define DEFAULT_CURSOR_BLINK_RATE (20) ··· 288 release_console_sem(); 289 } 290 291 + #if defined(CONFIG_ATARI) || defined(CONFIG_MAC) 292 static int cursor_blink_rate; 293 static irqreturn_t fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) 294 { ··· 878 } 879 #endif /* CONFIG_MAC */ 880 881 /* Initialize the work queue. If the driver provides its 882 * own work queue this means it will use something besides 883 * default timer to flash the cursor. */
+3 -1
include/asm-arm/system.h
··· 85 void die(const char *msg, struct pt_regs *regs, int err) 86 __attribute__((noreturn)); 87 88 - void die_if_kernel(const char *str, struct pt_regs *regs, int err); 89 90 void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, 91 struct pt_regs *),
··· 85 void die(const char *msg, struct pt_regs *regs, int err) 86 __attribute__((noreturn)); 87 88 + struct siginfo; 89 + void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, 90 + unsigned long err, unsigned long trap); 91 92 void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, 93 struct pt_regs *),