[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] The patch attached removes pda.h and asm_offset.c by deleting unused or
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 60a8a5ca4291c75f64090311812ffb9fde7daea7 # Parent d6e64adbff0406b2bec4b7bb9ba950e5e668717e The patch attached removes pda.h and asm_offset.c by deleting unused or unnecessary variables (that were used for old codes). Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx> diff -r d6e64adbff04 -r 60a8a5ca4291 linux-2.6-xen-sparse/arch/xen/x86_64/Makefile --- a/linux-2.6-xen-sparse/arch/xen/x86_64/Makefile Mon Aug 15 07:45:42 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/Makefile Mon Aug 15 07:51:58 2005 @@ -79,14 +79,15 @@ CFLAGS += $(xenflags-y) AFLAGS += $(xenflags-y) -prepare: include/asm-$(XENARCH)/asm_offset.h -CLEAN_FILES += include/asm-$(XENARCH)/asm_offset.h +prepare: include/asm-$(XENARCH)/asm_offsets.h +CLEAN_FILES += include/asm-$(XENARCH)/asm_offsets.h arch/$(XENARCH)/kernel/asm-offsets.s: include/asm include/.asm-ignore \ include/linux/version.h include/config/MARKER +include/asm-$(XENARCH)/offset.h: arch/$(XENARCH)/kernel/asm-offsets.s + $(call filechk,gen-asm-offsets) -include/asm-$(XENARCH)/asm_offset.h: arch/xen/x86_64/kernel/asm-offsets.s - $(call filechk,gen-asm-offsets) - ln -fsn asm_offset.h include/asm-$(XENARCH)/offset.h - +include/asm-$(XENARCH)/asm_offsets.h: include/asm-$(XENARCH)/offset.h + ln -fsn offset.h include/asm-$(XENARCH)/asm_offsets.h + ln -fsn offset.h include/asm-$(XENARCH)/asm_offset.h diff -r d6e64adbff04 -r 60a8a5ca4291 linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S Mon Aug 15 07:45:42 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S Mon Aug 15 07:51:58 2005 @@ -128,7 +128,6 @@ * #define VGCF_IN_SYSCALL (1<<8) */ .macro SWITCH_TO_USER flag - movl $0,%gs:pda_kernel_mode # change to user mode subq $8*4,%rsp # reuse rip, cs, rflags, rsp, ss in the stack movq %rax,(%rsp) movq %r11,1*8(%rsp) @@ -139,7 +138,6 @@ .endm .macro SWITCH_TO_KERNEL ssoff,adjust=0 - btsq $0,%gs:pda_kernel_mode jc 1f orb $1,\ssoff-\adjust+4(%rsp) 1: diff -r d6e64adbff04 -r 60a8a5ca4291 linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c Mon Aug 15 07:45:42 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c Mon Aug 15 07:51:58 2005 @@ -148,7 +148,6 @@ if (cpu_is_offline(cpu)) play_dead(); - __IRQ_STAT(cpu,idle_timestamp) = jiffies; xen_idle(); } diff -r d6e64adbff04 -r 60a8a5ca4291 linux-2.6-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c Mon Aug 15 07:45:42 2005 +++ /dev/null Mon Aug 15 07:51:58 2005 @@ -1,70 +0,0 @@ -/* - * Generate definitions needed by assembly language modules. - * This code generates raw asm output which is post-processed to extract - * and format the required data. - */ - -#include <linux/sched.h> -#include <linux/stddef.h> -#include <linux/errno.h> -#include <linux/hardirq.h> -#include <linux/suspend.h> -#include <asm/pda.h> -#include <asm/processor.h> -#include <asm/segment.h> -#include <asm/thread_info.h> -#include <asm/ia32.h> - -#define DEFINE(sym, val) \ - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) - -#define BLANK() asm volatile("\n->" : : ) - -int main(void) -{ -#define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry)) - ENTRY(state); - ENTRY(flags); - ENTRY(thread); - ENTRY(pid); - BLANK(); -#undef ENTRY -#define ENTRY(entry) DEFINE(threadinfo_ ## entry, offsetof(struct thread_info, entry)) - ENTRY(flags); - ENTRY(addr_limit); - ENTRY(preempt_count); - BLANK(); -#undef ENTRY -#define ENTRY(entry) DEFINE(pda_ ## entry, offsetof(struct x8664_pda, entry)) - ENTRY(kernelstack); - ENTRY(oldrsp); - ENTRY(pcurrent); - ENTRY(irqrsp); - ENTRY(irqcount); - ENTRY(cpunumber); - ENTRY(irqstackptr); - ENTRY(kernel_mode); - BLANK(); -#undef ENTRY -#ifdef CONFIG_IA32_EMULATION -#define ENTRY(entry) DEFINE(IA32_SIGCONTEXT_ ## entry, offsetof(struct sigcontext_ia32, entry)) - ENTRY(eax); - ENTRY(ebx); - ENTRY(ecx); - ENTRY(edx); - ENTRY(esi); - ENTRY(edi); - ENTRY(ebp); - ENTRY(esp); - ENTRY(eip); - BLANK(); -#undef ENTRY - DEFINE(IA32_RT_SIGFRAME_sigcontext, - offsetof (struct rt_sigframe32, uc.uc_mcontext)); - BLANK(); -#endif - DEFINE(pbe_address, offsetof(struct pbe, address)); - DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address)); - DEFINE(pbe_next, offsetof(struct pbe, next)); - return 0; -} diff -r d6e64adbff04 -r 60a8a5ca4291 linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pda.h --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pda.h Mon Aug 15 07:45:42 2005 +++ /dev/null Mon Aug 15 07:51:58 2005 @@ -1,85 +0,0 @@ -#ifndef X86_64_PDA_H -#define X86_64_PDA_H - -#ifndef __ASSEMBLY__ -#include <linux/stddef.h> -#include <linux/types.h> -#include <linux/cache.h> - -/* Per processor datastructure. %gs points to it while the kernel runs */ -struct x8664_pda { - struct task_struct *pcurrent; /* Current process */ - unsigned long data_offset; /* Per cpu data offset from linker address */ - struct x8664_pda *me; /* Pointer to itself */ - unsigned long kernelstack; /* top of kernel stack for current */ - unsigned long oldrsp; /* user rsp for system call */ - unsigned long irqrsp; /* Old rsp for interrupts. */ - int irqcount; /* Irq nesting counter. Starts with -1 */ - int cpunumber; /* Logical CPU number */ - char *irqstackptr; /* top of irqstack */ - unsigned int __softirq_pending; - unsigned int __nmi_count; /* number of NMI on this CPUs */ - unsigned long idle_timestamp; - struct mm_struct *active_mm; - int mmu_state; - unsigned apic_timer_irqs; - int kernel_mode; /* kernel or user mode */ -} ____cacheline_aligned; - - -#define IRQSTACK_ORDER 2 -#define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER) - -extern struct x8664_pda cpu_pda[]; - -/* - * There is no fast way to get the base address of the PDA, all the accesses - * have to mention %fs/%gs. So it needs to be done this Torvaldian way. - */ -#define sizeof_field(type,field) (sizeof(((type *)0)->field)) -#define typeof_field(type,field) typeof(((type *)0)->field) - -extern void __bad_pda_field(void); - -#define pda_offset(field) offsetof(struct x8664_pda, field) - -#define pda_to_op(op,field,val) do { \ - switch (sizeof_field(struct x8664_pda, field)) { \ -case 2: \ -asm volatile(op "w %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ -case 4: \ -asm volatile(op "l %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ -case 8: \ -asm volatile(op "q %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ - default: __bad_pda_field(); \ - } \ - } while (0) - -/* - * AK: PDA read accesses should be neither volatile nor have an memory clobber. - * Unfortunately removing them causes all hell to break lose currently. - */ -#define pda_from_op(op,field) ({ \ - typedef typeof_field(struct x8664_pda, field) T__; T__ ret__; \ - switch (sizeof_field(struct x8664_pda, field)) { \ -case 2: \ -asm volatile(op "w %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ -case 4: \ -asm volatile(op "l %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ -case 8: \ -asm volatile(op "q %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ - default: __bad_pda_field(); \ - } \ - ret__; }) - - -#define read_pda(field) pda_from_op("mov",field) -#define write_pda(field,val) pda_to_op("mov",field,val) -#define add_pda(field,val) pda_to_op("add",field,val) -#define sub_pda(field,val) pda_to_op("sub",field,val) - -#endif - -#define PDA_STACKOFFSET (5*8) - -#endif _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |