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.
This commit is contained in:
Linus Torvalds 2007-03-12 18:13:02 -07:00
commit 44a5085162
7 changed files with 30 additions and 26 deletions

View file

@ -348,7 +348,7 @@ void exit_thread(void)
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
if(last_task_used_math == current) { if(last_task_used_math == current) {
#else #else
if(current_thread_info()->flags & _TIF_USEDFPU) { if (test_thread_flag(TIF_USEDFPU)) {
#endif #endif
/* Keep process from leaving FPU in a bogon state. */ /* Keep process from leaving FPU in a bogon state. */
put_psr(get_psr() | PSR_EF); put_psr(get_psr() | PSR_EF);
@ -357,7 +357,7 @@ void exit_thread(void)
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
last_task_used_math = NULL; last_task_used_math = NULL;
#else #else
current_thread_info()->flags &= ~_TIF_USEDFPU; clear_thread_flag(TIF_USEDFPU);
#endif #endif
} }
} }
@ -371,7 +371,7 @@ void flush_thread(void)
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
if(last_task_used_math == current) { if(last_task_used_math == current) {
#else #else
if(current_thread_info()->flags & _TIF_USEDFPU) { if (test_thread_flag(TIF_USEDFPU)) {
#endif #endif
/* Clean the fpu. */ /* Clean the fpu. */
put_psr(get_psr() | PSR_EF); put_psr(get_psr() | PSR_EF);
@ -380,7 +380,7 @@ void flush_thread(void)
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
last_task_used_math = NULL; last_task_used_math = NULL;
#else #else
current_thread_info()->flags &= ~_TIF_USEDFPU; clear_thread_flag(TIF_USEDFPU);
#endif #endif
} }
@ -466,13 +466,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
if(last_task_used_math == current) { if(last_task_used_math == current) {
#else #else
if(current_thread_info()->flags & _TIF_USEDFPU) { if (test_thread_flag(TIF_USEDFPU)) {
#endif #endif
put_psr(get_psr() | PSR_EF); put_psr(get_psr() | PSR_EF);
fpsave(&p->thread.float_regs[0], &p->thread.fsr, fpsave(&p->thread.float_regs[0], &p->thread.fsr,
&p->thread.fpqueue[0], &p->thread.fpqdepth); &p->thread.fpqueue[0], &p->thread.fpqdepth);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
current_thread_info()->flags &= ~_TIF_USEDFPU; clear_thread_flag(TIF_USEDFPU);
#endif #endif
} }
@ -609,13 +609,13 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
return 1; return 1;
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (current_thread_info()->flags & _TIF_USEDFPU) { if (test_thread_flag(TIF_USEDFPU)) {
put_psr(get_psr() | PSR_EF); put_psr(get_psr() | PSR_EF);
fpsave(&current->thread.float_regs[0], &current->thread.fsr, fpsave(&current->thread.float_regs[0], &current->thread.fsr,
&current->thread.fpqueue[0], &current->thread.fpqdepth); &current->thread.fpqueue[0], &current->thread.fpqdepth);
if (regs != NULL) { if (regs != NULL) {
regs->psr &= ~(PSR_EF); regs->psr &= ~(PSR_EF);
current_thread_info()->flags &= ~(_TIF_USEDFPU); clear_thread_flag(TIF_USEDFPU);
} }
} }
#else #else

View file

@ -259,7 +259,7 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
} else { } else {
fpload(&current->thread.float_regs[0], &current->thread.fsr); fpload(&current->thread.float_regs[0], &current->thread.fsr);
} }
current_thread_info()->flags |= _TIF_USEDFPU; set_thread_flag(TIF_USEDFPU);
#endif #endif
} }
@ -290,7 +290,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
if(!fpt) { if(!fpt) {
#else #else
if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) { if (!test_tsk_thread_flag(fpt, TIF_USEDFPU)) {
#endif #endif
fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth); fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth);
regs->psr &= ~PSR_EF; 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... */ /* nope, better SIGFPE the offending process... */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
task_thread_info(fpt)->flags &= ~_TIF_USEDFPU; clear_tsk_thread_flag(fpt, TIF_USEDFPU);
#endif #endif
if(psr & PSR_PS) { if(psr & PSR_PS) {
/* The first fsr store/load we tried trapped, /* The first fsr store/load we tried trapped,

View file

@ -413,8 +413,13 @@ void flush_thread(void)
struct thread_info *t = current_thread_info(); struct thread_info *t = current_thread_info();
struct mm_struct *mm; struct mm_struct *mm;
if (t->flags & _TIF_ABI_PENDING) if (test_ti_thread_flag(t, TIF_ABI_PENDING)) {
t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); 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; mm = t->task->mm;
if (mm) if (mm)

View file

@ -186,8 +186,7 @@ static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
* Initialisation * Initialisation
*/ */
static void static void __devinit bw2_init_fix(struct fb_info *info, int linebytes)
bw2_init_fix(struct fb_info *info, int linebytes)
{ {
strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id)); 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; 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, 0x14, 0x8b, 0x15, 0x28, 0x16, 0x03, 0x17, 0x13,
0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e, 0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e,
0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01, 0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01,
0x10, 0x21, 0 0x10, 0x21, 0
}; };
static u8 bw2regs_ecl[] __initdata = { static u8 bw2regs_ecl[] __devinitdata = {
0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c, 0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c,
0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23, 0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23,
0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01, 0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01,
0x10, 0x20, 0 0x10, 0x20, 0
}; };
static u8 bw2regs_analog[] __initdata = { static u8 bw2regs_analog[] __devinitdata = {
0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13, 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13,
0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22, 0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22,
0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01,
0x10, 0x20, 0 0x10, 0x20, 0
}; };
static u8 bw2regs_76hz[] __initdata = { static u8 bw2regs_76hz[] __devinitdata = {
0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f,
0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a,
0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01,
0x10, 0x24, 0 0x10, 0x24, 0
}; };
static u8 bw2regs_66hz[] __initdata = { static u8 bw2regs_66hz[] __devinitdata = {
0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14,
0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24,
0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01,
0x10, 0x20, 0 0x10, 0x20, 0
}; };
static void bw2_do_default_mode(struct bw2_par *par, struct fb_info *info, static void __devinit bw2_do_default_mode(struct bw2_par *par,
int *linebytes) struct fb_info *info,
int *linebytes)
{ {
u8 status, mon; u8 status, mon;
u8 *p; u8 *p;

View file

@ -354,7 +354,8 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
* Initialisation * 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; 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; 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, .voff = CG14_REGS,
.poff = 0x80000000, .poff = 0x80000000,

View file

@ -345,7 +345,6 @@
#define __ARCH_WANT_SYS_GETPGRP #define __ARCH_WANT_SYS_GETPGRP
#define __ARCH_WANT_SYS_LLSEEK #define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE #define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_SIGPROCMASK

View file

@ -359,7 +359,6 @@
#define __ARCH_WANT_SYS_GETPGRP #define __ARCH_WANT_SYS_GETPGRP
#define __ARCH_WANT_SYS_LLSEEK #define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE #define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_SIGPROCMASK