The patch titled espfix code cleanup more has been removed from the -mm tree. Its filename is espfix-code-cleanup-more.patch This patch was dropped because I've lost track of what's happening here ------------------------------------------------------ Subject: espfix code cleanup more From: Stas Sergeev <stsp@xxxxxxxx> Attached is a micro-optimization on top of the previous cleanup patch. It removes the redundant arguments from the C functions. No functionality changes. Signed-off-by: Stas Sergeev <stsp@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/kernel/entry.S | 10 +++++----- arch/i386/kernel/traps.c | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff -puN arch/i386/kernel/entry.S~espfix-code-cleanup-more arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S~espfix-code-cleanup-more +++ a/arch/i386/kernel/entry.S @@ -401,9 +401,9 @@ ldt_ss: * This is an "official" bug of all the x86-compatible * CPUs, which we can try to work around to make * dosemu and wine happy. */ - movl %esp, %eax # pt_regs pointer + movl OLDESP(%esp), %eax movl %esp, %edx - call patch_espfix_gdt + call patch_espfix_base pushl $__ESPFIX_SS CFI_ADJUST_CFA_OFFSET 4 pushl %eax @@ -502,10 +502,10 @@ syscall_badsys: CFI_ENDPROC #define FIXUP_ESPFIX_STACK \ - movl %esp, %eax; \ GET_THREAD_INFO(%ebp); \ - movl TI_cpu(%ebp), %edx; \ - call get_orig_kesp; \ + movl TI_cpu(%ebp), %eax; \ + call get_espfix_base; \ + addl %esp, %eax; \ pushl $__KERNEL_DS; \ pushl %eax; \ lss (%esp), %esp; diff -puN arch/i386/kernel/traps.c~espfix-code-cleanup-more arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c~espfix-code-cleanup-more +++ a/arch/i386/kernel/traps.c @@ -1017,13 +1017,13 @@ fastcall void do_spurious_interrupt_bug( #endif } -fastcall unsigned long patch_espfix_gdt(struct pt_regs *regs, +fastcall unsigned long patch_espfix_base(unsigned long uesp, unsigned long kesp) { int cpu = smp_processor_id(); struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); struct desc_struct *gdt = (struct desc_struct *)cpu_gdt_descr->address; - unsigned long base = (kesp - regs->esp) & -THREAD_SIZE; + unsigned long base = (kesp - uesp) & -THREAD_SIZE; __u64 desc = *(__u64 *)&gdt[GDT_ENTRY_ESPFIX_SS]; /* Set up base for espfix segment */ desc &= 0x00ffff000000ffffULL; @@ -1033,14 +1033,13 @@ fastcall unsigned long patch_espfix_gdt( return kesp - base; } -fastcall unsigned long get_orig_kesp(unsigned long kesp, unsigned long cpu) +fastcall unsigned long get_espfix_base(unsigned long cpu) { /* Since we are on a wrong stack, the smp_processor_id() cannot * be used. So the cpu number is passed from an assembly. */ struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); struct desc_struct *gdt = (struct desc_struct *)cpu_gdt_descr->address; - unsigned long base = get_desc_base(&gdt[GDT_ENTRY_ESPFIX_SS].a); - return base + kesp; + return get_desc_base(&gdt[GDT_ENTRY_ESPFIX_SS].a); } /* _ Patches currently in -mm which might be from stsp@xxxxxxxx are - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html