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

Commit 463020ce authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
  [MIPS] Fix uniprocessor Sibyte builds.
  [MIPS] Make entry.S a little more readable.
  [MIPS] Remove stray instruction from __get_user_asm_ll32.
  [MIPS] 32-bit: Fix warning about cast for fetching pointer from userspace.
  [MIPS] DECstation: Fix irq handling
  [MIPS] signals: make common _BLOCKABLE macro
  [MIPS] signal: Move sigframe definition for native O32/N64 into signal.c
  [MIPS] signal: Move {restore,setup}_sigcontext prototypes to their user
  [MIPS] signal: Fix warnings in o32 compat code.
  [MIPS] IP27: Enable N32 support in defconfig.
  Revert "[MIPS] Fix warning in get_user when fetching pointer object from userspace."
  [MIPS] Don't claim we support dma_declare_coherent_memory - we don't.
  [MIPS] Unify dma-{coherent,noncoherent.ip27,ip32}
  [MIPS] Improve branch prediction in ll/sc atomic operations.
parents 58a3bb59 431dc804
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -598,8 +598,6 @@ config SGI_IP32
	select ARC
	select ARC32
	select BOOT_ELF32
	select OWN_DMA
	select DMA_IP32
	select DMA_NONCOHERENT
	select HW_HAS_PCI
	select R5000_CPU_SCACHE
@@ -883,9 +881,6 @@ config DMA_NONCOHERENT
config DMA_NEED_PCI_MAP_STATE
	bool

config OWN_DMA
	bool

config EARLY_PRINTK
	bool

+1 −1
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ CONFIG_BINFMT_ELF=y
CONFIG_MIPS32_COMPAT=y
CONFIG_COMPAT=y
CONFIG_MIPS32_O32=y
# CONFIG_MIPS32_N32 is not set
CONFIG_MIPS32_N32=y
CONFIG_BINFMT_ELF32=y

#
+0 −4
Original line number Diff line number Diff line
@@ -264,9 +264,6 @@
		 srlv	t3,t1,t2

handle_it:
		LONG_L	s0, TI_REGS($28)
		LONG_S	sp, TI_REGS($28)
		PTR_LA	ra, ret_from_irq
		j	dec_irq_dispatch
		 nop

@@ -277,7 +274,6 @@ fpu:
#endif

spurious:
		PTR_LA	ra, _ret_from_irq
		j	spurious_interrupt
		 nop
		END(plat_irq_dispatch)
+8 −11
Original line number Diff line number Diff line
@@ -21,24 +21,21 @@
#endif

#ifndef CONFIG_PREEMPT
	.macro	preempt_stop
	local_irq_disable
	.endm
#define resume_kernel	restore_all
#else
#define __ret_from_irq	ret_from_exception
#endif

	.text
	.align	5
FEXPORT(ret_from_irq)
	LONG_S	s0, TI_REGS($28)
#ifdef CONFIG_PREEMPT
FEXPORT(ret_from_exception)
#else
	b	_ret_from_irq
#ifndef CONFIG_PREEMPT
FEXPORT(ret_from_exception)
	preempt_stop
	local_irq_disable			# preempt stop
	b	__ret_from_irq
#endif
FEXPORT(_ret_from_irq)
FEXPORT(ret_from_irq)
	LONG_S	s0, TI_REGS($28)
FEXPORT(__ret_from_irq)
	LONG_L	t0, PT_STATUS(sp)		# returning to kernel mode?
	andi	t0, t0, KU_USER
	beqz	t0, resume_kernel
+47 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
#include <net/sock.h>
#include <net/scm.h>

#include <asm/compat-signal.h>
#include <asm/ipc.h>
#include <asm/sim.h>
#include <asm/uaccess.h>
@@ -736,3 +737,49 @@ _sys32_clone(nabi_no_regargs struct pt_regs regs)
	return do_fork(clone_flags, newsp, &regs, 0,
	               parent_tidptr, child_tidptr);
}

/*
 * Implement the event wait interface for the eventpoll file. It is the kernel
 * part of the user space epoll_pwait(2).
 */
asmlinkage long compat_sys_epoll_pwait(int epfd,
	struct epoll_event __user *events, int maxevents, int timeout,
	const compat_sigset_t __user *sigmask, size_t sigsetsize)
{
	int error;
	sigset_t ksigmask, sigsaved;

	/*
	 * If the caller wants a certain signal mask to be set during the wait,
	 * we apply it here.
	 */
	if (sigmask) {
		if (sigsetsize != sizeof(sigset_t))
			return -EINVAL;
		if (!access_ok(VERIFY_READ, sigmask, sizeof(ksigmask)))
			return -EFAULT;
		if (__copy_conv_sigset_from_user(&ksigmask, sigmask))
			return -EFAULT;
		sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
		sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
	}

	error = sys_epoll_wait(epfd, events, maxevents, timeout);

	/*
	 * If we changed the signal mask, we need to restore the original one.
	 * In case we've got a signal while waiting, we do not restore the
	 * signal mask yet, and we allow do_signal() to deliver the signal on
	 * the way back to userspace, before the signal mask is restored.
	 */
	if (sigmask) {
		if (error == -EINTR) {
			memcpy(&current->saved_sigmask, &sigsaved,
				sizeof(sigsaved));
			set_thread_flag(TIF_RESTORE_SIGMASK);
		} else
			sigprocmask(SIG_SETMASK, &sigsaved, NULL);
	}

	return error;
}
Loading