Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25:
  sh: Fix up uImage compression type
  remove include/asm-sh/floppy.h
  sh: Fix TIF_USEDFPU clearing under FPU emulation.
  sh: Fix occasional FPU register corruption under preempt.
  • Loading branch information
Linus Torvalds committed Apr 1, 2008
2 parents 6143439 + 26b63e9 commit 1002747
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 288 deletions.
3 changes: 0 additions & 3 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ config SYS_SUPPORTS_NUMA
config SYS_SUPPORTS_PCI
bool

config ARCH_MAY_HAVE_PC_FDC
bool

config STACKTRACE_SUPPORT
def_bool y

Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \

quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
-C none -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \
-C gzip -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \
-n 'Linux-$(KERNELRELEASE)' -d $< $@

$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
Expand Down
1 change: 1 addition & 0 deletions arch/sh/kernel/cpu/sh2a/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/signal.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/fpu.h>

/* The PR (precision) bit in the FP Status Register must be clear when
* an frchg instruction is executed, otherwise the instruction is undefined.
Expand Down
1 change: 1 addition & 0 deletions arch/sh/kernel/cpu/sh4/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <asm/cpu/fpu.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/fpu.h>

/* The PR (precision) bit in the FP Status Register must be clear when
* an frchg instruction is executed, otherwise the instruction is undefined.
Expand Down
1 change: 1 addition & 0 deletions arch/sh/kernel/cpu/sh5/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <asm/processor.h>
#include <asm/user.h>
#include <asm/io.h>
#include <asm/fpu.h>

/*
* Initially load the FPU with signalling NANS. This bit pattern
Expand Down
1 change: 1 addition & 0 deletions arch/sh/kernel/dump_task.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <linux/elfcore.h>
#include <linux/sched.h>
#include <asm/fpu.h>

/*
* Capture the user space registers if the task is not running (in user space)
Expand Down
1 change: 1 addition & 0 deletions arch/sh/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <asm/pgalloc.h>
#include <asm/system.h>
#include <asm/ubc.h>
#include <asm/fpu.h>

static int hlt_counter;
int ubc_usercnt = 0;
Expand Down
1 change: 1 addition & 0 deletions arch/sh/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/cacheflush.h>
#include <asm/fpu.h>

#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

Expand Down
268 changes: 0 additions & 268 deletions include/asm-sh/floppy.h

This file was deleted.

39 changes: 24 additions & 15 deletions include/asm-sh/fpu.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#ifndef __ASM_SH_FPU_H
#define __ASM_SH_FPU_H

#define SR_FD 0x00008000

#ifndef __ASSEMBLY__
#include <linux/preempt.h>
#include <asm/ptrace.h>

#ifdef CONFIG_SH_FPU
Expand All @@ -21,25 +20,35 @@ struct task_struct;

extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs);
#else

#define release_fpu(regs) do { } while (0)
#define grab_fpu(regs) do { } while (0)
#define save_fpu(tsk, regs) do { } while (0)

static inline void save_fpu(struct task_struct *tsk, struct pt_regs *regs)
{
clear_tsk_thread_flag(tsk, TIF_USEDFPU);
}
#endif

extern int do_fpu_inst(unsigned short, struct pt_regs *);

#define unlazy_fpu(tsk, regs) do { \
if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \
save_fpu(tsk, regs); \
} \
} while (0)

#define clear_fpu(tsk, regs) do { \
if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \
clear_tsk_thread_flag(tsk, TIF_USEDFPU); \
release_fpu(regs); \
} \
} while (0)
static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs)
{
preempt_disable();
if (test_tsk_thread_flag(tsk, TIF_USEDFPU))
save_fpu(tsk, regs);
preempt_enable();
}

static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs)
{
preempt_disable();
if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) {
clear_tsk_thread_flag(tsk, TIF_USEDFPU);
release_fpu(regs);
}
preempt_enable();
}

#endif /* __ASSEMBLY__ */

Expand Down
Loading

0 comments on commit 1002747

Please sign in to comment.