Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d470c05b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix a TRACE_IRQS_OFF typo.
  sh: Optimize the setup_rt_frame() I-cache flush.
  sh: Populate initial secondary CPU info from boot_cpu_data.
  sh: Tidy up SMP cpuinfo.
  sh: Use boot_cpu_data for FPU tests in sigcontext paths.
  sh: ftrace: Fix up syscall tracepoint support.
  sh: force dcache flush if dcache_dirty bit set.
  sh: update die() output.
parents ee67e6cb 457b6461
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ noresched:
ENTRY(resume_userspace)
	! r8: current_thread_info
	cli
	TRACE_IRQS_OfF
	TRACE_IRQS_OFF
	mov.l	@(TI_FLAGS,r8), r0		! current_thread_info->flags
	tst	#(_TIF_WORK_MASK & 0xff), r0
	bt/s	__restore_all
+27 −10
Original line number Diff line number Diff line
@@ -291,31 +291,48 @@ struct syscall_metadata *syscall_nr_to_meta(int nr)
	return syscalls_metadata[nr];
}

void arch_init_ftrace_syscalls(void)
int syscall_name_to_nr(char *name)
{
	int i;

	if (!syscalls_metadata)
		return -1;
	for (i = 0; i < NR_syscalls; i++)
		if (syscalls_metadata[i])
			if (!strcmp(syscalls_metadata[i]->name, name))
				return i;
	return -1;
}

void set_syscall_enter_id(int num, int id)
{
	syscalls_metadata[num]->enter_id = id;
}

void set_syscall_exit_id(int num, int id)
{
	syscalls_metadata[num]->exit_id = id;
}

static int __init arch_init_ftrace_syscalls(void)
{
	int i;
	struct syscall_metadata *meta;
	unsigned long **psys_syscall_table = &sys_call_table;
	static atomic_t refs;

	if (atomic_inc_return(&refs) != 1)
		goto end;

	syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) *
					FTRACE_SYSCALL_MAX, GFP_KERNEL);
	if (!syscalls_metadata) {
		WARN_ON(1);
		return;
		return -ENOMEM;
	}

	for (i = 0; i < FTRACE_SYSCALL_MAX; i++) {
		meta = find_syscall_meta(psys_syscall_table[i]);
		syscalls_metadata[i] = meta;
	}
	return;

	/* Paranoid: avoid overflow */
end:
	atomic_dec(&refs);
	return 0;
}
arch_initcall(arch_init_ftrace_syscalls);
#endif /* CONFIG_FTRACE_SYSCALLS */
+2 −0
Original line number Diff line number Diff line
@@ -549,6 +549,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)

	if (cpu == 0)
		seq_printf(m, "machine\t\t: %s\n", get_system_type());
	else
		seq_printf(m, "\n");

	seq_printf(m, "processor\t: %d\n", cpu);
	seq_printf(m, "cpu family\t: %s\n", init_utsname()->machine);
+4 −5
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ static inline int restore_sigcontext_fpu(struct sigcontext __user *sc)
{
	struct task_struct *tsk = current;

	if (!(current_cpu_data.flags & CPU_HAS_FPU))
	if (!(boot_cpu_data.flags & CPU_HAS_FPU))
		return 0;

	set_used_math();
@@ -158,7 +158,7 @@ static inline int save_sigcontext_fpu(struct sigcontext __user *sc,
{
	struct task_struct *tsk = current;

	if (!(current_cpu_data.flags & CPU_HAS_FPU))
	if (!(boot_cpu_data.flags & CPU_HAS_FPU))
		return 0;

	if (!used_math()) {
@@ -199,7 +199,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p
#undef COPY

#ifdef CONFIG_SH_FPU
	if (current_cpu_data.flags & CPU_HAS_FPU) {
	if (boot_cpu_data.flags & CPU_HAS_FPU) {
		int owned_fp;
		struct task_struct *tsk = current;

@@ -472,6 +472,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
		err |= __put_user(OR_R0_R0, &frame->retcode[6]);
		err |= __put_user((__NR_rt_sigreturn), &frame->retcode[7]);
		regs->pr = (unsigned long) frame->retcode;
		flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));
	}

	if (err)
@@ -497,8 +498,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
	pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
		 current->comm, task_pid_nr(current), frame, regs->pc, regs->pr);

	flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));

	return 0;

give_sigsegv:
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ static inline void __init smp_store_cpu_info(unsigned int cpu)
{
	struct sh_cpuinfo *c = cpu_data + cpu;

	memcpy(c, &boot_cpu_data, sizeof(struct sh_cpuinfo));

	c->loops_per_jiffy = loops_per_jiffy;
}

Loading