Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC]: Fix TIF_USEDFPU flag atomicity
[SPARC64]: Fix atomicity of TIF update in flush_thread()
[BW2]: Fix section mismatch warnings.
[CG14]: Fix section mismatch warnings.
[SPARC]: We do not need OLD_GETRLIMIT.

+30 -26
+8 -8
arch/sparc/kernel/process.c
··· 348 #ifndef CONFIG_SMP 349 if(last_task_used_math == current) { 350 #else 351 - if(current_thread_info()->flags & _TIF_USEDFPU) { 352 #endif 353 /* Keep process from leaving FPU in a bogon state. */ 354 put_psr(get_psr() | PSR_EF); ··· 357 #ifndef CONFIG_SMP 358 last_task_used_math = NULL; 359 #else 360 - current_thread_info()->flags &= ~_TIF_USEDFPU; 361 #endif 362 } 363 } ··· 371 #ifndef CONFIG_SMP 372 if(last_task_used_math == current) { 373 #else 374 - if(current_thread_info()->flags & _TIF_USEDFPU) { 375 #endif 376 /* Clean the fpu. */ 377 put_psr(get_psr() | PSR_EF); ··· 380 #ifndef CONFIG_SMP 381 last_task_used_math = NULL; 382 #else 383 - current_thread_info()->flags &= ~_TIF_USEDFPU; 384 #endif 385 } 386 ··· 466 #ifndef CONFIG_SMP 467 if(last_task_used_math == current) { 468 #else 469 - if(current_thread_info()->flags & _TIF_USEDFPU) { 470 #endif 471 put_psr(get_psr() | PSR_EF); 472 fpsave(&p->thread.float_regs[0], &p->thread.fsr, 473 &p->thread.fpqueue[0], &p->thread.fpqdepth); 474 #ifdef CONFIG_SMP 475 - current_thread_info()->flags &= ~_TIF_USEDFPU; 476 #endif 477 } 478 ··· 609 return 1; 610 } 611 #ifdef CONFIG_SMP 612 - if (current_thread_info()->flags & _TIF_USEDFPU) { 613 put_psr(get_psr() | PSR_EF); 614 fpsave(&current->thread.float_regs[0], &current->thread.fsr, 615 &current->thread.fpqueue[0], &current->thread.fpqdepth); 616 if (regs != NULL) { 617 regs->psr &= ~(PSR_EF); 618 - current_thread_info()->flags &= ~(_TIF_USEDFPU); 619 } 620 } 621 #else
··· 348 #ifndef CONFIG_SMP 349 if(last_task_used_math == current) { 350 #else 351 + if (test_thread_flag(TIF_USEDFPU)) { 352 #endif 353 /* Keep process from leaving FPU in a bogon state. */ 354 put_psr(get_psr() | PSR_EF); ··· 357 #ifndef CONFIG_SMP 358 last_task_used_math = NULL; 359 #else 360 + clear_thread_flag(TIF_USEDFPU); 361 #endif 362 } 363 } ··· 371 #ifndef CONFIG_SMP 372 if(last_task_used_math == current) { 373 #else 374 + if (test_thread_flag(TIF_USEDFPU)) { 375 #endif 376 /* Clean the fpu. */ 377 put_psr(get_psr() | PSR_EF); ··· 380 #ifndef CONFIG_SMP 381 last_task_used_math = NULL; 382 #else 383 + clear_thread_flag(TIF_USEDFPU); 384 #endif 385 } 386 ··· 466 #ifndef CONFIG_SMP 467 if(last_task_used_math == current) { 468 #else 469 + if (test_thread_flag(TIF_USEDFPU)) { 470 #endif 471 put_psr(get_psr() | PSR_EF); 472 fpsave(&p->thread.float_regs[0], &p->thread.fsr, 473 &p->thread.fpqueue[0], &p->thread.fpqdepth); 474 #ifdef CONFIG_SMP 475 + clear_thread_flag(TIF_USEDFPU); 476 #endif 477 } 478 ··· 609 return 1; 610 } 611 #ifdef CONFIG_SMP 612 + if (test_thread_flag(TIF_USEDFPU)) { 613 put_psr(get_psr() | PSR_EF); 614 fpsave(&current->thread.float_regs[0], &current->thread.fsr, 615 &current->thread.fpqueue[0], &current->thread.fpqdepth); 616 if (regs != NULL) { 617 regs->psr &= ~(PSR_EF); 618 + clear_thread_flag(TIF_USEDFPU); 619 } 620 } 621 #else
+3 -3
arch/sparc/kernel/traps.c
··· 259 } else { 260 fpload(&current->thread.float_regs[0], &current->thread.fsr); 261 } 262 - current_thread_info()->flags |= _TIF_USEDFPU; 263 #endif 264 } 265 ··· 290 #ifndef CONFIG_SMP 291 if(!fpt) { 292 #else 293 - if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) { 294 #endif 295 fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth); 296 regs->psr &= ~PSR_EF; ··· 333 /* nope, better SIGFPE the offending process... */ 334 335 #ifdef CONFIG_SMP 336 - task_thread_info(fpt)->flags &= ~_TIF_USEDFPU; 337 #endif 338 if(psr & PSR_PS) { 339 /* The first fsr store/load we tried trapped,
··· 259 } else { 260 fpload(&current->thread.float_regs[0], &current->thread.fsr); 261 } 262 + set_thread_flag(TIF_USEDFPU); 263 #endif 264 } 265 ··· 290 #ifndef CONFIG_SMP 291 if(!fpt) { 292 #else 293 + if (!test_tsk_thread_flag(fpt, TIF_USEDFPU)) { 294 #endif 295 fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth); 296 regs->psr &= ~PSR_EF; ··· 333 /* nope, better SIGFPE the offending process... */ 334 335 #ifdef CONFIG_SMP 336 + clear_tsk_thread_flag(fpt, TIF_USEDFPU); 337 #endif 338 if(psr & PSR_PS) { 339 /* The first fsr store/load we tried trapped,
+7 -2
arch/sparc64/kernel/process.c
··· 413 struct thread_info *t = current_thread_info(); 414 struct mm_struct *mm; 415 416 - if (t->flags & _TIF_ABI_PENDING) 417 - t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); 418 419 mm = t->task->mm; 420 if (mm)
··· 413 struct thread_info *t = current_thread_info(); 414 struct mm_struct *mm; 415 416 + if (test_ti_thread_flag(t, TIF_ABI_PENDING)) { 417 + clear_ti_thread_flag(t, TIF_ABI_PENDING); 418 + if (test_ti_thread_flag(t, TIF_32BIT)) 419 + clear_ti_thread_flag(t, TIF_32BIT); 420 + else 421 + set_ti_thread_flag(t, TIF_32BIT); 422 + } 423 424 mm = t->task->mm; 425 if (mm)
+9 -9
drivers/video/bw2.c
··· 186 * Initialisation 187 */ 188 189 - static void 190 - bw2_init_fix(struct fb_info *info, int linebytes) 191 { 192 strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id)); 193 ··· 198 info->fix.accel = FB_ACCEL_SUN_BWTWO; 199 } 200 201 - static u8 bw2regs_1600[] __initdata = { 202 0x14, 0x8b, 0x15, 0x28, 0x16, 0x03, 0x17, 0x13, 203 0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e, 204 0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01, 205 0x10, 0x21, 0 206 }; 207 208 - static u8 bw2regs_ecl[] __initdata = { 209 0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c, 210 0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23, 211 0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01, 212 0x10, 0x20, 0 213 }; 214 215 - static u8 bw2regs_analog[] __initdata = { 216 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13, 217 0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22, 218 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 219 0x10, 0x20, 0 220 }; 221 222 - static u8 bw2regs_76hz[] __initdata = { 223 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, 224 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, 225 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, 226 0x10, 0x24, 0 227 }; 228 229 - static u8 bw2regs_66hz[] __initdata = { 230 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, 231 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, 232 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 233 0x10, 0x20, 0 234 }; 235 236 - static void bw2_do_default_mode(struct bw2_par *par, struct fb_info *info, 237 - int *linebytes) 238 { 239 u8 status, mon; 240 u8 *p;
··· 186 * Initialisation 187 */ 188 189 + static void __devinit bw2_init_fix(struct fb_info *info, int linebytes) 190 { 191 strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id)); 192 ··· 199 info->fix.accel = FB_ACCEL_SUN_BWTWO; 200 } 201 202 + static u8 bw2regs_1600[] __devinitdata = { 203 0x14, 0x8b, 0x15, 0x28, 0x16, 0x03, 0x17, 0x13, 204 0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e, 205 0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01, 206 0x10, 0x21, 0 207 }; 208 209 + static u8 bw2regs_ecl[] __devinitdata = { 210 0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c, 211 0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23, 212 0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01, 213 0x10, 0x20, 0 214 }; 215 216 + static u8 bw2regs_analog[] __devinitdata = { 217 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13, 218 0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22, 219 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 220 0x10, 0x20, 0 221 }; 222 223 + static u8 bw2regs_76hz[] __devinitdata = { 224 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, 225 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, 226 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, 227 0x10, 0x24, 0 228 }; 229 230 + static u8 bw2regs_66hz[] __devinitdata = { 231 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, 232 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, 233 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 234 0x10, 0x20, 0 235 }; 236 237 + static void __devinit bw2_do_default_mode(struct bw2_par *par, 238 + struct fb_info *info, 239 + int *linebytes) 240 { 241 u8 status, mon; 242 u8 *p;
+3 -2
drivers/video/cg14.c
··· 354 * Initialisation 355 */ 356 357 - static void cg14_init_fix(struct fb_info *info, int linebytes, struct device_node *dp) 358 { 359 const char *name = dp->name; 360 ··· 369 info->fix.accel = FB_ACCEL_SUN_CG14; 370 } 371 372 - static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __initdata = { 373 { 374 .voff = CG14_REGS, 375 .poff = 0x80000000,
··· 354 * Initialisation 355 */ 356 357 + static void __devinit cg14_init_fix(struct fb_info *info, int linebytes, 358 + struct device_node *dp) 359 { 360 const char *name = dp->name; 361 ··· 368 info->fix.accel = FB_ACCEL_SUN_CG14; 369 } 370 371 + static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __devinitdata = { 372 { 373 .voff = CG14_REGS, 374 .poff = 0x80000000,
-1
include/asm-sparc/unistd.h
··· 345 #define __ARCH_WANT_SYS_GETPGRP 346 #define __ARCH_WANT_SYS_LLSEEK 347 #define __ARCH_WANT_SYS_NICE 348 - #define __ARCH_WANT_SYS_OLD_GETRLIMIT 349 #define __ARCH_WANT_SYS_OLDUMOUNT 350 #define __ARCH_WANT_SYS_SIGPENDING 351 #define __ARCH_WANT_SYS_SIGPROCMASK
··· 345 #define __ARCH_WANT_SYS_GETPGRP 346 #define __ARCH_WANT_SYS_LLSEEK 347 #define __ARCH_WANT_SYS_NICE 348 #define __ARCH_WANT_SYS_OLDUMOUNT 349 #define __ARCH_WANT_SYS_SIGPENDING 350 #define __ARCH_WANT_SYS_SIGPROCMASK
-1
include/asm-sparc64/unistd.h
··· 359 #define __ARCH_WANT_SYS_GETPGRP 360 #define __ARCH_WANT_SYS_LLSEEK 361 #define __ARCH_WANT_SYS_NICE 362 - #define __ARCH_WANT_SYS_OLD_GETRLIMIT 363 #define __ARCH_WANT_SYS_OLDUMOUNT 364 #define __ARCH_WANT_SYS_SIGPENDING 365 #define __ARCH_WANT_SYS_SIGPROCMASK
··· 359 #define __ARCH_WANT_SYS_GETPGRP 360 #define __ARCH_WANT_SYS_LLSEEK 361 #define __ARCH_WANT_SYS_NICE 362 #define __ARCH_WANT_SYS_OLDUMOUNT 363 #define __ARCH_WANT_SYS_SIGPENDING 364 #define __ARCH_WANT_SYS_SIGPROCMASK