Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
Linus Torvalds committed Mar 13, 2007
2 parents 27d30b0 + 54f565e commit 44a5085
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 26 deletions.
16 changes: 8 additions & 8 deletions arch/sparc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
}
}
Expand All @@ -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);
Expand All @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions arch/sparc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 7 additions & 2 deletions arch/sparc64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 9 additions & 9 deletions drivers/video/bw2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions drivers/video/cg14.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion include/asm-sparc/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@
#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
Expand Down
1 change: 0 additions & 1 deletion include/asm-sparc64/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@
#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
Expand Down

0 comments on commit 44a5085

Please sign in to comment.