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