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

Commit 38cb162b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] wire up pselect, ppoll
  [IA64] Add TIF_RESTORE_SIGMASK
  [IA64] unwind did not work for processes born with CLONE_STOPPED
  [IA64] Optional method to purge the TLB on SN systems
  [IA64] SPIN_LOCK_UNLOCKED macro cleanup in arch/ia64
  [IA64-SN2][KJ] mmtimer.c-kzalloc
  [IA64] fix stack alignment for ia32 signal handlers
  [IA64] - Altix: hotplug after intr redirect can crash system
  [IA64] save and restore cpus_allowed in cpu_idle_wait
  [IA64] Removal of percpu TR cleanup in kexec code
  [IA64] Fix some section mismatch errors
parents ba7cc09c e180583b
Loading
Loading
Loading
Loading
+1 −38
Original line number Diff line number Diff line
@@ -52,43 +52,6 @@ ENTRY(ia32_clone)
	br.ret.sptk.many rp
END(ia32_clone)

ENTRY(sys32_rt_sigsuspend)
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
	alloc loc1=ar.pfs,8,2,3,0		// preserve all eight input regs
	mov loc0=rp
	mov out0=in0				// mask
	mov out1=in1				// sigsetsize
	mov out2=sp				// out2 = &sigscratch
	.fframe 16
	adds sp=-16,sp				// allocate dummy "sigscratch"
	;;
	.body
	br.call.sptk.many rp=ia32_rt_sigsuspend
1:	.restore sp
	adds sp=16,sp
	mov rp=loc0
	mov ar.pfs=loc1
	br.ret.sptk.many rp
END(sys32_rt_sigsuspend)

ENTRY(sys32_sigsuspend)
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
	alloc loc1=ar.pfs,8,2,3,0		// preserve all eight input regs
	mov loc0=rp
	mov out0=in2				// mask (first two args are ignored)
	;;
	mov out1=sp				// out1 = &sigscratch
	.fframe 16
	adds sp=-16,sp				// allocate dummy "sigscratch"
	.body
	br.call.sptk.many rp=ia32_sigsuspend
1:	.restore sp
	adds sp=16,sp
	mov rp=loc0
	mov ar.pfs=loc1
	br.ret.sptk.many rp
END(sys32_sigsuspend)

GLOBAL_ENTRY(ia32_ret_from_clone)
	PT_REGS_UNWIND_INFO(0)
{	/*
@@ -389,7 +352,7 @@ ia32_syscall_table:
	data8 sys_rt_sigpending
	data8 compat_sys_rt_sigtimedwait
	data8 sys32_rt_sigqueueinfo
	data8 sys32_rt_sigsuspend
	data8 compat_sys_rt_sigsuspend
	data8 sys32_pread	  /* 180 */
	data8 sys32_pwrite
	data8 sys_chown	/* 16-bit version */
+15 −50
Original line number Diff line number Diff line
@@ -451,59 +451,20 @@ sigact_set_handler (struct k_sigaction *sa, unsigned int handler, unsigned int r
		sa->sa.sa_handler = (__sighandler_t) (((unsigned long) restorer << 32) | handler);
}

long
__ia32_rt_sigsuspend (compat_sigset_t *sset, unsigned int sigsetsize, struct sigscratch *scr)
asmlinkage long
sys32_sigsuspend (int history0, int history1, old_sigset_t mask)
{
	extern long ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall);
	sigset_t oldset, set;

	scr->scratch_unat = 0;	/* avoid leaking kernel bits to user level */
	memset(&set, 0, sizeof(set));

	memcpy(&set.sig, &sset->sig, sigsetsize);

	sigdelsetmask(&set, ~_BLOCKABLE);

	mask &= _BLOCKABLE;
	spin_lock_irq(&current->sighand->siglock);
	{
		oldset = current->blocked;
		current->blocked = set;
	current->saved_sigmask = current->blocked;
	siginitset(&current->blocked, mask);
	recalc_sigpending();
	}
	spin_unlock_irq(&current->sighand->siglock);

	/*
	 * The return below usually returns to the signal handler.  We need to pre-set the
	 * correct error code here to ensure that the right values get saved in sigcontext
	 * by ia64_do_signal.
	 */
	scr->pt.r8 = -EINTR;
	while (1) {
	current->state = TASK_INTERRUPTIBLE;
	schedule();
		if (ia64_do_signal(&oldset, scr, 1))
			return -EINTR;
	}
}

asmlinkage long
ia32_rt_sigsuspend (compat_sigset_t __user *uset, unsigned int sigsetsize, struct sigscratch *scr)
{
	compat_sigset_t set;

	if (sigsetsize > sizeof(compat_sigset_t))
		return -EINVAL;

	if (copy_from_user(&set.sig, &uset->sig, sigsetsize))
		return -EFAULT;

	return __ia32_rt_sigsuspend(&set, sigsetsize, scr);
}

asmlinkage long
ia32_sigsuspend (unsigned int mask, struct sigscratch *scr)
{
	return __ia32_rt_sigsuspend((compat_sigset_t *) &mask, sizeof(mask), scr);
	set_thread_flag(TIF_RESTORE_SIGMASK);
	return -ERESTARTNOHAND;
}

asmlinkage long
@@ -810,7 +771,11 @@ get_sigframe (struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
	}
	/* Legacy stack switching not supported */

	return (void __user *)((esp - frame_size) & -8ul);
	esp -= frame_size;
	/* Align the stack pointer according to the i386 ABI,
	 * i.e. so that on function entry ((sp + 4) & 15) == 0. */
	esp = ((esp + 4) & -16ul) - 4;
	return (void __user *) esp;
}

static int
+2 −28
Original line number Diff line number Diff line
@@ -1199,32 +1199,6 @@ ENTRY(notify_resume_user)
	br.ret.sptk.many rp
END(notify_resume_user)

GLOBAL_ENTRY(sys_rt_sigsuspend)
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
	alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart!
	mov r9=ar.unat
	mov loc0=rp				// save return address
	mov out0=in0				// mask
	mov out1=in1				// sigsetsize
	adds out2=8,sp				// out2=&sigscratch->ar_pfs
	;;
	.fframe 16
	.spillsp ar.unat, 16
	st8 [sp]=r9,-16				// allocate space for ar.unat and save it
	st8 [out2]=loc1,-8			// save ar.pfs, out2=&sigscratch
	.body
	br.call.sptk.many rp=ia64_rt_sigsuspend
.ret17:	.restore sp
	adds sp=16,sp				// pop scratch stack space
	;;
	ld8 r9=[sp]				// load new unat from sw->caller_unat
	mov rp=loc0
	;;
	mov ar.unat=r9
	mov ar.pfs=loc1
	br.ret.sptk.many rp
END(sys_rt_sigsuspend)

ENTRY(sys_rt_sigreturn)
	PT_REGS_UNWIND_INFO(0)
	/*
@@ -1598,8 +1572,8 @@ sys_call_table:
	data8 sys_readlinkat
	data8 sys_fchmodat
	data8 sys_faccessat
	data8 sys_ni_syscall			// reserved for pselect
	data8 sys_ni_syscall			// 1295 reserved for ppoll
	data8 sys_pselect6
	data8 sys_ppoll
	data8 sys_unshare
	data8 sys_splice
	data8 sys_set_robust_list
+1 −1
Original line number Diff line number Diff line
@@ -1012,7 +1012,7 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
/*
 * ACPI calls this when it finds an entry for a legacy ISA IRQ override.
 */
void __init
void __devinit
iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
			  unsigned long polarity,
			  unsigned long trigger)
+22 −5
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include <asm/machvec.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/tlbflush.h>

#ifdef CONFIG_PERFMON
# include <asm/perfmon.h>
@@ -126,8 +127,10 @@ void destroy_irq(unsigned int irq)

#ifdef CONFIG_SMP
#	define IS_RESCHEDULE(vec)	(vec == IA64_IPI_RESCHEDULE)
#	define IS_LOCAL_TLB_FLUSH(vec)	(vec == IA64_IPI_LOCAL_TLB_FLUSH)
#else
#	define IS_RESCHEDULE(vec)	(0)
#	define IS_LOCAL_TLB_FLUSH(vec)	(0)
#endif
/*
 * That's where the IVT branches when we get an external
@@ -179,7 +182,10 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
	saved_tpr = ia64_getreg(_IA64_REG_CR_TPR);
	ia64_srlz_d();
	while (vector != IA64_SPURIOUS_INT_VECTOR) {
		if (unlikely(IS_RESCHEDULE(vector)))
		if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) {
			smp_local_flush_tlb();
			kstat_this_cpu.irqs[vector]++;
		} else if (unlikely(IS_RESCHEDULE(vector)))
			kstat_this_cpu.irqs[vector]++;
		else {
			ia64_setreg(_IA64_REG_CR_TPR, vector);
@@ -226,7 +232,10 @@ void ia64_process_pending_intr(void)
	  * Perform normal interrupt style processing
	  */
	while (vector != IA64_SPURIOUS_INT_VECTOR) {
		if (unlikely(IS_RESCHEDULE(vector)))
		if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) {
			smp_local_flush_tlb();
			kstat_this_cpu.irqs[vector]++;
		} else if (unlikely(IS_RESCHEDULE(vector)))
			kstat_this_cpu.irqs[vector]++;
		else {
			struct pt_regs *old_regs = set_irq_regs(NULL);
@@ -259,12 +268,12 @@ void ia64_process_pending_intr(void)


#ifdef CONFIG_SMP
extern irqreturn_t handle_IPI (int irq, void *dev_id);

static irqreturn_t dummy_handler (int irq, void *dev_id)
{
	BUG();
}
extern irqreturn_t handle_IPI (int irq, void *dev_id);

static struct irqaction ipi_irqaction = {
	.handler =	handle_IPI,
@@ -277,6 +286,13 @@ static struct irqaction resched_irqaction = {
	.flags =	IRQF_DISABLED,
	.name =		"resched"
};

static struct irqaction tlb_irqaction = {
	.handler =	dummy_handler,
	.flags =	SA_INTERRUPT,
	.name =		"tlb_flush"
};

#endif

void
@@ -302,6 +318,7 @@ init_IRQ (void)
#ifdef CONFIG_SMP
	register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction);
	register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction);
	register_percpu_irq(IA64_IPI_LOCAL_TLB_FLUSH, &tlb_irqaction);
#endif
#ifdef CONFIG_PERFMON
	pfm_init_percpu();
Loading