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

Commit 66673f13 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix DAX handling via userspace access from kernel.
  sparc64: Annotate sparc64 specific syscalls with SYSCALL_DEFINEx()
  [CVE-2009-0029] sparc: Enable syscall wrappers for 64-bit
  sparc64: Initialize FHC/CLOCK LED platform_device 'id' field correctly.
  sparc64: fix modpost failure
  sparc64: fix readout of cpu/fpu type
parents bf50c903 fcd26f7a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ config SPARC64
	select HAVE_KRETPROBES
	select HAVE_KPROBES
	select HAVE_LMB
	select HAVE_SYSCALL_WRAPPERS
	select USE_GENERIC_SMP_HELPERS if SMP
	select RTC_DRV_CMOS
	select RTC_DRV_BQ4802
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ static int __devinit clock_board_probe(struct of_device *op,
	p->leds_resource.name = "leds";

	p->leds_pdev.name = "sunfire-clockboard-leds";
	p->leds_pdev.id = -1;
	p->leds_pdev.resource = &p->leds_resource;
	p->leds_pdev.num_resources = 1;
	p->leds_pdev.dev.parent = &op->dev;
@@ -197,6 +198,7 @@ static int __devinit fhc_probe(struct of_device *op,
		p->leds_resource.name = "leds";

		p->leds_pdev.name = "sunfire-fhc-leds";
		p->leds_pdev.id = p->board_num;
		p->leds_pdev.resource = &p->leds_resource;
		p->leds_pdev.num_resources = 1;
		p->leds_pdev.dev.parent = &op->dev;
+15 −3
Original line number Diff line number Diff line
@@ -239,14 +239,26 @@ unsigned int fsr_storage;

static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers)
{
	const struct manufacturer_info *manuf;
	int i;

	sparc_cpu_type = NULL;
	sparc_fpu_type = NULL;
	if (psr_impl < ARRAY_SIZE(manufacturer_info))
	manuf = NULL;

	for (i = 0; i < ARRAY_SIZE(manufacturer_info); i++)
	{
		if (psr_impl == manufacturer_info[i].psr_impl) {
			manuf = &manufacturer_info[i];
			break;
		}
	}
	if (manuf != NULL)
	{
		const struct cpu_info *cpu;
		const struct fpu_info *fpu;

		cpu = &manufacturer_info[psr_impl].cpu_info[0];
		cpu = &manuf->cpu_info[0];
		while (cpu->psr_vers != -1)
		{
			if (cpu->psr_vers == psr_vers) {
@@ -256,7 +268,7 @@ static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers)
			}
			cpu++;
		}
		fpu =  &manufacturer_info[psr_impl].fpu_info[0];
		fpu =  &manuf->fpu_info[0];
		while (fpu->fp_vers != -1)
		{
			if (fpu->fp_vers == fpu_vers) {
+23 −25
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
	}
}

asmlinkage unsigned long sparc_brk(unsigned long brk)
SYSCALL_DEFINE1(sparc_brk, unsigned long, brk)
{
	/* People could try to be nasty and use ta 0x6d in 32bit programs */
	if (test_thread_flag(TIF_32BIT) && brk >= STACK_TOP32)
@@ -415,7 +415,7 @@ asmlinkage unsigned long sparc_brk(unsigned long brk)
 * sys_pipe() is the normal C calling standard for creating
 * a pipe. It's not the way unix traditionally does this, though.
 */
asmlinkage long sparc_pipe(struct pt_regs *regs)
SYSCALL_DEFINE1(sparc_pipe_real, struct pt_regs *, regs)
{
	int fd[2];
	int error;
@@ -435,8 +435,8 @@ asmlinkage long sparc_pipe(struct pt_regs *regs)
 * This is really horribly ugly.
 */

asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
			unsigned long third, void __user *ptr, long fifth)
SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
		unsigned long, third, void __user *, ptr, long, fifth)
{
	long err;

@@ -519,7 +519,7 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
	return err;
}

asmlinkage long sparc64_newuname(struct new_utsname __user *name)
SYSCALL_DEFINE1(sparc64_newuname, struct new_utsname __user *, name)
{
	int ret = sys_newuname(name);
	
@@ -530,7 +530,7 @@ asmlinkage long sparc64_newuname(struct new_utsname __user *name)
	return ret;
}

asmlinkage long sparc64_personality(unsigned long personality)
SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality)
{
	int ret;

@@ -564,9 +564,9 @@ int sparc_mmap_check(unsigned long addr, unsigned long len)
}

/* Linux version of mmap */
asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
	unsigned long prot, unsigned long flags, unsigned long fd,
	unsigned long off)
SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
		unsigned long, prot, unsigned long, flags, unsigned long, fd,
		unsigned long, off)
{
	struct file * file = NULL;
	unsigned long retval = -EBADF;
@@ -589,7 +589,7 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
	return retval;
}

asmlinkage long sys64_munmap(unsigned long addr, size_t len)
SYSCALL_DEFINE2(64_munmap, unsigned long, addr, size_t, len)
{
	long ret;

@@ -606,9 +606,9 @@ extern unsigned long do_mremap(unsigned long addr,
	unsigned long old_len, unsigned long new_len,
	unsigned long flags, unsigned long new_addr);
                
asmlinkage unsigned long sys64_mremap(unsigned long addr,
	unsigned long old_len, unsigned long new_len,
	unsigned long flags, unsigned long new_addr)
SYSCALL_DEFINE5(64_mremap, unsigned long, addr,	unsigned long, old_len,
		unsigned long, new_len, unsigned long, flags,
		unsigned long, new_addr)
{
	unsigned long ret = -EINVAL;

@@ -671,7 +671,7 @@ asmlinkage void sparc_breakpoint(struct pt_regs *regs)

extern void check_pending(int signum);

asmlinkage long sys_getdomainname(char __user *name, int len)
SYSCALL_DEFINE2(getdomainname, char __user *, name, int, len)
{
        int nlen, err;

@@ -694,11 +694,10 @@ asmlinkage long sys_getdomainname(char __user *name, int len)
	return err;
}

asmlinkage long sys_utrap_install(utrap_entry_t type,
				  utrap_handler_t new_p,
				  utrap_handler_t new_d,
				  utrap_handler_t __user *old_p,
				  utrap_handler_t __user *old_d)
SYSCALL_DEFINE5(utrap_install, utrap_entry_t, type,
		utrap_handler_t, new_p, utrap_handler_t, new_d,
		utrap_handler_t __user *, old_p,
		utrap_handler_t __user *, old_d)
{
	if (type < UT_INSTRUCTION_EXCEPTION || type > UT_TRAP_INSTRUCTION_31)
		return -EINVAL;
@@ -764,11 +763,9 @@ asmlinkage long sparc_memory_ordering(unsigned long model,
	return 0;
}

asmlinkage long sys_rt_sigaction(int sig,
				 const struct sigaction __user *act,
				 struct sigaction __user *oact,
				 void __user *restorer,
				 size_t sigsetsize)
SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
		struct sigaction __user *, oact, void __user *, restorer,
		size_t, sigsetsize)
{
	struct k_sigaction new_ka, old_ka;
	int ret;
@@ -808,7 +805,8 @@ asmlinkage void update_perfctrs(void)
	reset_pic();
}

asmlinkage long sys_perfctr(int opcode, unsigned long arg0, unsigned long arg1, unsigned long arg2)
SYSCALL_DEFINE4(perfctr, int, opcode, unsigned long, arg0,
		unsigned long, arg1, unsigned long, arg2)
{
	int err = 0;

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ execve_merge:

	.align	32
sys_sparc_pipe:
	ba,pt	%xcc, sparc_pipe
	ba,pt	%xcc, sys_sparc_pipe_real
	 add	%sp, PTREGS_OFF, %o0
sys_nis_syscall:
	ba,pt	%xcc, c_sys_nis_syscall
Loading