Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 13 Mar 2007 01:13:02 +0000 (18:13 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 13 Mar 2007 01:13:02 +0000 (18:13 -0700)
* 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.

arch/sparc/kernel/process.c
arch/sparc/kernel/traps.c
arch/sparc64/kernel/process.c
drivers/video/bw2.c
drivers/video/cg14.c
include/asm-sparc/unistd.h
include/asm-sparc64/unistd.h

index 113bd48..fc874e6 100644 (file)
@@ -348,7 +348,7 @@ void exit_thread(void)
 #ifndef CONFIG_SMP
        if(last_task_used_math == current) {
 #else
-       if(current_thread_info()->flags & _TIF_USEDFPU) {
+       if (test_thread_flag(TIF_USEDFPU)) {
 #endif
                /* Keep process from leaving FPU in a bogon state. */
                put_psr(get_psr() | PSR_EF);
@@ -357,7 +357,7 @@ void exit_thread(void)
 #ifndef CONFIG_SMP
                last_task_used_math = NULL;
 #else
-               current_thread_info()->flags &= ~_TIF_USEDFPU;
+               clear_thread_flag(TIF_USEDFPU);
 #endif
        }
 }
@@ -371,7 +371,7 @@ void flush_thread(void)
 #ifndef CONFIG_SMP
        if(last_task_used_math == current) {
 #else
-       if(current_thread_info()->flags & _TIF_USEDFPU) {
+       if (test_thread_flag(TIF_USEDFPU)) {
 #endif
                /* Clean the fpu. */
                put_psr(get_psr() | PSR_EF);
@@ -380,7 +380,7 @@ void flush_thread(void)
 #ifndef CONFIG_SMP
                last_task_used_math = NULL;
 #else
-               current_thread_info()->flags &= ~_TIF_USEDFPU;
+               clear_thread_flag(TIF_USEDFPU);
 #endif
        }
 
@@ -466,13 +466,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
 #ifndef CONFIG_SMP
        if(last_task_used_math == current) {
 #else
-       if(current_thread_info()->flags & _TIF_USEDFPU) {
+       if (test_thread_flag(TIF_USEDFPU)) {
 #endif
                put_psr(get_psr() | PSR_EF);
                fpsave(&p->thread.float_regs[0], &p->thread.fsr,
                       &p->thread.fpqueue[0], &p->thread.fpqdepth);
 #ifdef CONFIG_SMP
-               current_thread_info()->flags &= ~_TIF_USEDFPU;
+               clear_thread_flag(TIF_USEDFPU);
 #endif
        }
 
@@ -609,13 +609,13 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
                return 1;
        }
 #ifdef CONFIG_SMP
-       if (current_thread_info()->flags & _TIF_USEDFPU) {
+       if (test_thread_flag(TIF_USEDFPU)) {
                put_psr(get_psr() | PSR_EF);
                fpsave(&current->thread.float_regs[0], &current->thread.fsr,
                       &current->thread.fpqueue[0], &current->thread.fpqdepth);
                if (regs != NULL) {
                        regs->psr &= ~(PSR_EF);
-                       current_thread_info()->flags &= ~(_TIF_USEDFPU);
+                       clear_thread_flag(TIF_USEDFPU);
                }
        }
 #else
index 6a70d21..527687a 100644 (file)
@@ -259,7 +259,7 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
        } else {
                fpload(&current->thread.float_regs[0], &current->thread.fsr);
        }
-       current_thread_info()->flags |= _TIF_USEDFPU;
+       set_thread_flag(TIF_USEDFPU);
 #endif
 }
 
@@ -290,7 +290,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
 #ifndef CONFIG_SMP
        if(!fpt) {
 #else
-        if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) {
+       if (!test_tsk_thread_flag(fpt, TIF_USEDFPU)) {
 #endif
                fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth);
                regs->psr &= ~PSR_EF;
@@ -333,7 +333,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
        /* nope, better SIGFPE the offending process... */
               
 #ifdef CONFIG_SMP
-       task_thread_info(fpt)->flags &= ~_TIF_USEDFPU;
+       clear_tsk_thread_flag(fpt, TIF_USEDFPU);
 #endif
        if(psr & PSR_PS) {
                /* The first fsr store/load we tried trapped,
index 7d75cd4..b291060 100644 (file)
@@ -413,8 +413,13 @@ void flush_thread(void)
        struct thread_info *t = current_thread_info();
        struct mm_struct *mm;
 
-       if (t->flags & _TIF_ABI_PENDING)
-               t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);
+       if (test_ti_thread_flag(t, TIF_ABI_PENDING)) {
+               clear_ti_thread_flag(t, TIF_ABI_PENDING);
+               if (test_ti_thread_flag(t, TIF_32BIT))
+                       clear_ti_thread_flag(t, TIF_32BIT);
+               else
+                       set_ti_thread_flag(t, TIF_32BIT);
+       }
 
        mm = t->task->mm;
        if (mm)
index 9bb6257..b0b2e40 100644 (file)
@@ -186,8 +186,7 @@ static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
  *  Initialisation
  */
 
-static void
-bw2_init_fix(struct fb_info *info, int linebytes)
+static void __devinit bw2_init_fix(struct fb_info *info, int linebytes)
 {
        strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id));
 
@@ -199,43 +198,44 @@ bw2_init_fix(struct fb_info *info, int linebytes)
        info->fix.accel = FB_ACCEL_SUN_BWTWO;
 }
 
-static u8 bw2regs_1600[] __initdata = {
+static u8 bw2regs_1600[] __devinitdata = {
        0x14, 0x8b,     0x15, 0x28,     0x16, 0x03,     0x17, 0x13,
        0x18, 0x7b,     0x19, 0x05,     0x1a, 0x34,     0x1b, 0x2e,
        0x1c, 0x00,     0x1d, 0x0a,     0x1e, 0xff,     0x1f, 0x01,
        0x10, 0x21,     0
 };
 
-static u8 bw2regs_ecl[] __initdata = {
+static u8 bw2regs_ecl[] __devinitdata = {
        0x14, 0x65,     0x15, 0x1e,     0x16, 0x04,     0x17, 0x0c,
        0x18, 0x5e,     0x19, 0x03,     0x1a, 0xa7,     0x1b, 0x23,
        0x1c, 0x00,     0x1d, 0x08,     0x1e, 0xff,     0x1f, 0x01,
        0x10, 0x20,     0
 };
 
-static u8 bw2regs_analog[] __initdata = {
+static u8 bw2regs_analog[] __devinitdata = {
        0x14, 0xbb,     0x15, 0x2b,     0x16, 0x03,     0x17, 0x13,
        0x18, 0xb0,     0x19, 0x03,     0x1a, 0xa6,     0x1b, 0x22,
        0x1c, 0x01,     0x1d, 0x05,     0x1e, 0xff,     0x1f, 0x01,
        0x10, 0x20,     0
 };
 
-static u8 bw2regs_76hz[] __initdata = {
+static u8 bw2regs_76hz[] __devinitdata = {
        0x14, 0xb7,     0x15, 0x27,     0x16, 0x03,     0x17, 0x0f,
        0x18, 0xae,     0x19, 0x03,     0x1a, 0xae,     0x1b, 0x2a,
        0x1c, 0x01,     0x1d, 0x09,     0x1e, 0xff,     0x1f, 0x01,
        0x10, 0x24,     0
 };
 
-static u8 bw2regs_66hz[] __initdata = {
+static u8 bw2regs_66hz[] __devinitdata = {
        0x14, 0xbb,     0x15, 0x2b,     0x16, 0x04,     0x17, 0x14,
        0x18, 0xae,     0x19, 0x03,     0x1a, 0xa8,     0x1b, 0x24,
        0x1c, 0x01,     0x1d, 0x05,     0x1e, 0xff,     0x1f, 0x01,
        0x10, 0x20,     0
 };
 
-static void bw2_do_default_mode(struct bw2_par *par, struct fb_info *info,
-                               int *linebytes)
+static void __devinit bw2_do_default_mode(struct bw2_par *par,
+                                         struct fb_info *info,
+                                         int *linebytes)
 {
        u8 status, mon;
        u8 *p;
index ec6a51a..b071bb6 100644 (file)
@@ -354,7 +354,8 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
  *  Initialisation
  */
 
-static void cg14_init_fix(struct fb_info *info, int linebytes, struct device_node *dp)
+static void __devinit cg14_init_fix(struct fb_info *info, int linebytes,
+                                   struct device_node *dp)
 {
        const char *name = dp->name;
 
@@ -368,7 +369,7 @@ static void cg14_init_fix(struct fb_info *info, int linebytes, struct device_nod
        info->fix.accel = FB_ACCEL_SUN_CG14;
 }
 
-static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __initdata = {
+static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __devinitdata = {
        {
                .voff   = CG14_REGS,
                .poff   = 0x80000000,
index d5b2f80..16098ac 100644 (file)
 #define __ARCH_WANT_SYS_GETPGRP
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
-#define __ARCH_WANT_SYS_OLD_GETRLIMIT
 #define __ARCH_WANT_SYS_OLDUMOUNT
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
index 4704753..a9f7bd9 100644 (file)
 #define __ARCH_WANT_SYS_GETPGRP
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
-#define __ARCH_WANT_SYS_OLD_GETRLIMIT
 #define __ARCH_WANT_SYS_OLDUMOUNT
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK