From: BitKeeper B. <ri...@su...> - 2004-12-27 18:15:18
|
ChangeSet 1.1550.9.15, 2004/11/19 18:53:59+00:00, cl...@ar... setup_arch_post.h: clear feature sep flag to avoid modification to sysenter.c Makefile: g/c unmodified vmlinux.lds ioremap.c, fault.c, timer_tsc.c, setup.c, ldt.c: Whitespace. traps.c: Whitespace and remove unused code. head.S: writable pagetables are always enabled Makefile: g/c unmodified vmlinux.lds and sysenter.c .del-sysenter.c~4edabffbf333447d: Delete: linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c .del-vmlinux.lds.S~a6e49b85e6684b9a: Delete: linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile | 6 b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S | 4 b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c | 4 b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c | 2 b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c | 12 b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c | 66 -- b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/fault.c | 6 b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/ioremap.c | 246 +++++----- b/linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/Makefile | 6 b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h | 1 linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c | 65 -- linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S | 134 ----- 12 files changed, 151 insertions(+), 401 deletions(-) diff -Nru a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile --- a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile 2004-12-27 10:05:03 -05:00 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile 2004-12-27 10:05:03 -05:00 @@ -6,7 +6,7 @@ CFLAGS += -Iarch/$(XENARCH)/kernel -extra-y := head.o init_task.o vmlinux.lds +extra-y := head.o init_task.o obj-y := process.o signal.o entry.o traps.o \ time.o ioport.o ldt.o setup.o \ @@ -35,7 +35,7 @@ c-obj-$(CONFIG_X86_NUMAQ) += numaq.o c-obj-$(CONFIG_X86_SUMMIT_NUMA) += summit.o c-obj-$(CONFIG_MODULES) += module.o -obj-y += sysenter.o +c-obj-y += sysenter.o obj-y += vsyscall.o c-obj-$(CONFIG_ACPI_SRAT) += srat.o c-obj-$(CONFIG_HPET_TIMER) += time_hpet.o @@ -45,8 +45,6 @@ EXTRA_AFLAGS := -traditional c-obj-$(CONFIG_SCx200) += scx200.o - -CPPFLAGS_vmlinux.lds += -U$(XENARCH) # vsyscall.o contains the vsyscall DSO images as __initdata. # We must build both images before we can assemble it. diff -Nru a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S --- a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S 2004-12-27 10:05:03 -05:00 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S 2004-12-27 10:05:03 -05:00 @@ -4,9 +4,7 @@ .section __xen_guest .ascii "GUEST_OS=linux,GUEST_VER=2.6,XEN_VER=2.0,VIRT_BASE=0xC0000000" .ascii ",LOADER=generic" -#ifdef CONFIG_XEN_WRITABLE_PAGETABLES .ascii ",PT_MODE_WRITABLE" -#endif .byte 0 .text @@ -90,7 +88,6 @@ .long init_thread_union+THREAD_SIZE .long __BOOT_DS -# XXXcl .globl idt_descr .globl cpu_gdt_descr @@ -99,7 +96,6 @@ idt_descr: .word IDT_ENTRIES*8-1 # idt contains 256 entries .long idt_table -# XXXcl # boot GDT descriptor (later on used by CPU#0): .word 0 # 32 bit align gdt_desc.address diff -Nru a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c --- a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c 2004-12-27 10:05:03 -05:00 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c 2004-12-27 10:05:03 -05:00 @@ -125,8 +125,8 @@ if (mm == current->active_mm) clear_LDT(); make_pages_writable(mm->context.ldt, - (mm->context.size * LDT_ENTRY_SIZE) / - PAGE_SIZE); + (mm->context.size * LDT_ENTRY_SIZE) / + PAGE_SIZE); flush_page_update_queue(); if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE) vfree(mm->context.ldt); diff -Nru a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c --- a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c 2004-12-27 10:05:03 -05:00 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c 2004-12-27 10:05:03 -05:00 @@ -686,7 +686,7 @@ int len = 0; int userdef = 0; - memcpy(saved_command_line, xen_start_info.cmd_line, MAX_CMDLINE); + memcpy(saved_command_line, xen_start_info.cmd_line, MAX_CMDLINE); /* Save unparsed command line copy for /proc/cmdline */ saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; diff -Nru a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c --- a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c 2004-12-27 10:05:03 -05:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,65 +0,0 @@ -/* - * linux/arch/i386/kernel/sysenter.c - * - * (C) Copyright 2002 Linus Torvalds - * - * This file contains the needed initializations to support sysenter. - */ - -#include <linux/init.h> -#include <linux/smp.h> -#include <linux/thread_info.h> -#include <linux/sched.h> -#include <linux/gfp.h> -#include <linux/string.h> -#include <linux/elf.h> - -#include <asm/cpufeature.h> -#include <asm/msr.h> -#include <asm/pgtable.h> -#include <asm/unistd.h> - -extern asmlinkage void sysenter_entry(void); - -void enable_sep_cpu(void *info) -{ - int cpu = get_cpu(); - struct tss_struct *tss = &per_cpu(init_tss, cpu); - - tss->ss1 = __KERNEL_CS; - tss->esp1 = sizeof(struct tss_struct) + (unsigned long) tss; - wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0); - wrmsr(MSR_IA32_SYSENTER_ESP, tss->esp1, 0); - wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long) sysenter_entry, 0); - put_cpu(); -} - -/* - * These symbols are defined by vsyscall.o to mark the bounds - * of the ELF DSO images included therein. - */ -extern const char vsyscall_int80_start, vsyscall_int80_end; -extern const char vsyscall_sysenter_start, vsyscall_sysenter_end; - -static int __init sysenter_setup(void) -{ - void *page = (void *)get_zeroed_page(GFP_ATOMIC); - - __set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC); - - if (1 /* XXXcl not yet */ || !boot_cpu_has(X86_FEATURE_SEP)) { - memcpy(page, - &vsyscall_int80_start, - &vsyscall_int80_end - &vsyscall_int80_start); - return 0; - } - - memcpy(page, - &vsyscall_sysenter_start, - &vsyscall_sysenter_end - &vsyscall_sysenter_start); - - on_each_cpu(enable_sep_cpu, NULL, 1, 1); - return 0; -} - -__initcall(sysenter_setup); diff -Nru a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c --- a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c 2004-12-27 10:05:03 -05:00 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c 2004-12-27 10:05:03 -05:00 @@ -67,10 +67,6 @@ return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; } -#if 0 -static int count2; /* counter for mark_offset_tsc() */ -#endif - /* Cached *multiplier* to convert TSC counts to microseconds. * (see the equation below). * Equal to 2^32 * (1 / (clocks per usec) ). @@ -93,13 +89,13 @@ eax -= shadow_tsc_stamp; /* - * Time offset = (tsc_low delta) * fast_gettimeoffset_quotient - * = (tsc_low delta) * (usecs_per_clock) - * = (tsc_low delta) * (usecs_per_jiffy / clocks_per_jiffy) + * Time offset = (tsc_low delta) * fast_gettimeoffset_quotient + * = (tsc_low delta) * (usecs_per_clock) + * = (tsc_low delta) * (usecs_per_jiffy / clocks_per_jiffy) * * Using a mull instead of a divl saves up to 31 clock cycles * in the critical path. - */ + */ __asm__("mull %2" :"=a" (eax), "=d" (edx) diff -Nru a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c --- a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c 2004-12-27 10:05:03 -05:00 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c 2004-12-27 10:05:03 -05:00 @@ -127,7 +127,7 @@ addr = *stack++; if (__kernel_text_address(addr)) { printk(" [<%08lx>]", addr); - print_symbol(" %s\n", addr); + print_symbol(" %s", addr); printk("\n"); } } @@ -737,8 +737,8 @@ /* If this is a kernel mode trap, save the user PC on entry to * the kernel, that's what the debugger can make sense of. */ - info.si_addr = ((regs->xcs & 2) == 0) ? (void __user *)tsk->thread.eip : - (void __user *)regs->eip; + info.si_addr = ((regs->xcs & 2) == 0) ? (void __user *)tsk->thread.eip + : (void __user *)regs->eip; force_sig_info(SIGTRAP, &info, tsk); /* Disable additional traps. They'll be re-enabled when @@ -954,58 +954,6 @@ } #endif -#define _set_gate(gate_addr,type,dpl,addr,seg) \ -do { \ - int __d0, __d1; \ - __asm__ __volatile__ ("movw %%dx,%%ax\n\t" \ - "movw %4,%%dx\n\t" \ - "movl %%eax,%0\n\t" \ - "movl %%edx,%1" \ - :"=m" (*((long *) (gate_addr))), \ - "=m" (*(1+(long *) (gate_addr))), "=&a" (__d0), "=&d" (__d1) \ - :"i" ((short) (0x8000+(dpl<<13)+(type<<8))), \ - "3" ((char *) (addr)),"2" ((seg) << 16)); \ -} while (0) - - -/* - * This needs to use 'idt_table' rather than 'idt', and - * thus use the _nonmapped_ version of the IDT, as the - * Pentium F0 0F bugfix can have resulted in the mapped - * IDT being write-protected. - */ -void set_intr_gate(unsigned int n, void *addr) -{ - _set_gate(idt_table+n,14,0,addr,__KERNEL_CS); -} - -#if 0 -/* - * This routine sets up an interrupt gate at directory privilege level 3. - */ -static inline void set_system_intr_gate(unsigned int n, void *addr) -{ - _set_gate(idt_table+n, 14, 3, addr, __KERNEL_CS); -} - -static void __init set_trap_gate(unsigned int n, void *addr) -{ - _set_gate(idt_table+n,15,0,addr,__KERNEL_CS); |