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

Commit baadac8b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: remove quicklists
  x86: ia32 syscall restart fix
  x86: ioremap, remove WARN_ON()
parents 051a82fc 985a34bd
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -66,9 +66,6 @@ config MMU
config ZONE_DMA
	def_bool y

config QUICKLIST
	def_bool X86_32

config SBUS
	bool

+8 −1
Original line number Diff line number Diff line
@@ -1055,10 +1055,17 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
	R32(esi, si);
	R32(ebp, bp);
	R32(eax, ax);
	R32(orig_eax, orig_ax);
	R32(eip, ip);
	R32(esp, sp);

	case offsetof(struct user32, regs.orig_eax):
		/*
		 * Sign-extend the value so that orig_eax = -1
		 * causes (long)orig_ax < 0 tests to fire correctly.
		 */
		regs->orig_ax = (long) (s32) value;
		break;

	case offsetof(struct user32, regs.eflags):
		return set_flags(child, value);

+33 −5
Original line number Diff line number Diff line
@@ -310,6 +310,35 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
	return -EFAULT;
}

/*
 * Return -1L or the syscall number that @regs is executing.
 */
static long current_syscall(struct pt_regs *regs)
{
	/*
	 * We always sign-extend a -1 value being set here,
	 * so this is always either -1L or a syscall number.
	 */
	return regs->orig_ax;
}

/*
 * Return a value that is -EFOO if the system call in @regs->orig_ax
 * returned an error.  This only works for @regs from @current.
 */
static long current_syscall_ret(struct pt_regs *regs)
{
#ifdef CONFIG_IA32_EMULATION
	if (test_thread_flag(TIF_IA32))
		/*
		 * Sign-extend the value so (int)-EFOO becomes (long)-EFOO
		 * and will match correctly in comparisons.
		 */
		return (int) regs->ax;
#endif
	return regs->ax;
}

/*
 * OK, we're invoking a handler
 */	
@@ -327,9 +356,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
#endif

	/* Are we from a system call? */
	if ((long)regs->orig_ax >= 0) {
	if (current_syscall(regs) >= 0) {
		/* If so, check system call restarting.. */
		switch (regs->ax) {
		switch (current_syscall_ret(regs)) {
		        case -ERESTART_RESTARTBLOCK:
			case -ERESTARTNOHAND:
				regs->ax = -EINTR;
@@ -426,10 +455,9 @@ static void do_signal(struct pt_regs *regs)
	}

	/* Did we come from a system call? */
	if ((long)regs->orig_ax >= 0) {
	if (current_syscall(regs) >= 0) {
		/* Restart the system call - no handlers present */
		long res = regs->ax;
		switch (res) {
		switch (current_syscall_ret(regs)) {
		case -ERESTARTNOHAND:
		case -ERESTARTSYS:
		case -ERESTARTNOINTR:
+0 −2
Original line number Diff line number Diff line
@@ -134,8 +134,6 @@ static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
			return NULL;
	}

	WARN_ON_ONCE(page_is_ram(pfn));

	switch (mode) {
	case IOR_MODE_UNCACHED:
	default:
+9 −9
Original line number Diff line number Diff line
@@ -342,12 +342,16 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)

pgd_t *pgd_alloc(struct mm_struct *mm)
{
	pgd_t *pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor);
	pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);

	mm->pgd = pgd;		/* so that alloc_pd can use it */
	/* so that alloc_pd can use it */
	mm->pgd = pgd;
	if (pgd)
		pgd_ctor(pgd);

	if (pgd && !pgd_prepopulate_pmd(mm, pgd)) {
		quicklist_free(0, pgd_dtor, pgd);
		pgd_dtor(pgd);
		free_page((unsigned long)pgd);
		pgd = NULL;
	}

@@ -357,12 +361,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{
	pgd_mop_up_pmds(mm, pgd);
	quicklist_free(0, pgd_dtor, pgd);
}

void check_pgt_cache(void)
{
	quicklist_trim(0, pgd_dtor, 25, 16);
	pgd_dtor(pgd);
	free_page((unsigned long)pgd);
}

void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
Loading