ia64/xen-unstable

changeset 3067:3ca98cad4ced

bitkeeper revision 1.1159.182.2 (419e35262uwuQFurr1RBSu_bioXF2A)

Many files:
Whitespace.
irq_vectors.h:
Define TIMER_IRQ.
Remove unused bits and cleanup whitespace.
time.c:
Use TIMER_IRQ.
skbuff.c:
whitespace.
author cl349@arcadians.cl.cam.ac.uk
date Fri Nov 19 18:02:14 2004 +0000 (2004-11-19)
parents 88d784c1d7c4
children e93693f73344
files linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/io.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/param.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/tlbflush.h linux-2.6.10-rc2-xen-sparse/net/core/skbuff.c
line diff
     1.1 --- a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/time.c	Fri Nov 19 16:38:51 2004 +0000
     1.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/time.c	Fri Nov 19 18:02:14 2004 +0000
     1.3 @@ -616,7 +616,7 @@ void __init hpet_time_init(void)
     1.4  #endif
     1.5  
     1.6  /* Dynamically-mapped IRQ. */
     1.7 -static int time_irq;
     1.8 +static int TIMER_IRQ;
     1.9  
    1.10  static struct irqaction irq_timer = {
    1.11  	timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer",
    1.12 @@ -646,9 +646,9 @@ void __init time_init(void)
    1.13  		BUG();
    1.14  	printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name);
    1.15  
    1.16 -	time_irq = bind_virq_to_irq(VIRQ_TIMER);
    1.17 +	TIMER_IRQ = bind_virq_to_irq(VIRQ_TIMER);
    1.18  
    1.19 -	(void)setup_irq(time_irq, &irq_timer);
    1.20 +	(void)setup_irq(TIMER_IRQ, &irq_timer);
    1.21  }
    1.22  
    1.23  /* Convert jiffies to system time. Call with xtime_lock held for reading. */
     2.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/io.h	Fri Nov 19 16:38:51 2004 +0000
     2.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/io.h	Fri Nov 19 18:02:14 2004 +0000
     2.3 @@ -90,14 +90,17 @@ static inline void * phys_to_virt(unsign
     2.4   * Change "struct page" to physical address.
     2.5   */
     2.6  #define page_to_pseudophys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
     2.7 -#define page_to_phys(page)       (phys_to_machine(page_to_pseudophys(page)))
     2.8 +#define page_to_phys(page)	 (phys_to_machine(page_to_pseudophys(page)))
     2.9  
    2.10 -#define bio_to_pseudophys(bio)	(page_to_pseudophys(bio_page((bio))) + (unsigned long) bio_offset((bio)))
    2.11 -#define bvec_to_pseudophys(bv)	(page_to_pseudophys((bv)->bv_page) + (unsigned long) (bv)->bv_offset)
    2.12 +#define bio_to_pseudophys(bio)	 (page_to_pseudophys(bio_page((bio))) + \
    2.13 +				  (unsigned long) bio_offset((bio)))
    2.14 +#define bvec_to_pseudophys(bv)	 (page_to_pseudophys((bv)->bv_page) + \
    2.15 +				  (unsigned long) (bv)->bv_offset)
    2.16  
    2.17  #define BIOVEC_PHYS_MERGEABLE(vec1, vec2)	\
    2.18  	(((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) && \
    2.19 -	 ((bvec_to_pseudophys((vec1)) + (vec1)->bv_len) == bvec_to_pseudophys((vec2))))
    2.20 +	 ((bvec_to_pseudophys((vec1)) + (vec1)->bv_len) == \
    2.21 +	  bvec_to_pseudophys((vec2))))
    2.22  
    2.23  extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
    2.24  
    2.25 @@ -135,7 +138,8 @@ extern void bt_iounmap(void *addr, unsig
    2.26  #define isa_virt_to_bus(_x) isa_virt_to_bus_is_UNSUPPORTED->x
    2.27  #define isa_page_to_bus(_x) isa_page_to_bus_is_UNSUPPORTED->x
    2.28  #ifdef CONFIG_XEN_PRIVILEGED_GUEST
    2.29 -#define isa_bus_to_virt(_x) (void *)__fix_to_virt(FIX_ISAMAP_BEGIN - ((_x) >> PAGE_SHIFT))
    2.30 +#define isa_bus_to_virt(_x) (void *)__fix_to_virt(FIX_ISAMAP_BEGIN - \
    2.31 +						  ((_x) >> PAGE_SHIFT))
    2.32  #else
    2.33  #define isa_bus_to_virt(_x) isa_bus_to_virt_needs_PRIVILEGED_BUILD
    2.34  #endif
    2.35 @@ -367,7 +371,7 @@ static inline unsigned type in##bwl##_qu
    2.36  static inline unsigned type in##bwl(int port) { \
    2.37  	return in##bwl##_quad(port, 0); \
    2.38  }
    2.39 -#else 
    2.40 +#else
    2.41  #define __BUILDIO(bwl,bw,type) \
    2.42  static inline void out##bwl(unsigned type value, int port) { \
    2.43  	out##bwl##_local(value, port); \
     3.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h	Fri Nov 19 16:38:51 2004 +0000
     3.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h	Fri Nov 19 18:02:14 2004 +0000
     3.3 @@ -65,7 +65,7 @@
     3.4  #define FIRST_DEVICE_VECTOR	0x31
     3.5  #define FIRST_SYSTEM_VECTOR	0xef
     3.6  
     3.7 -/*  #define TIMER_IRQ _EVENT_TIMER */
     3.8 +#define TIMER_IRQ		timer_irq
     3.9  
    3.10  /*
    3.11   * 16 8259A IRQ's, 208 potential APIC interrupt sources.
    3.12 @@ -84,23 +84,6 @@
    3.13   * should be changed accordingly.
    3.14   */
    3.15  #define NR_VECTORS 256
    3.16 -
    3.17 -#ifdef CONFIG_PCI_USE_VECTOR
    3.18 -#define NR_IRQS FIRST_SYSTEM_VECTOR
    3.19 -#define NR_IRQ_VECTORS NR_IRQS
    3.20 -#else
    3.21 -#ifdef CONFIG_X86_IO_APIC
    3.22 -#define NR_IRQS 224
    3.23 -# if (224 >= 32 * NR_CPUS)
    3.24 -# define NR_IRQ_VECTORS NR_IRQS
    3.25 -# else
    3.26 -# define NR_IRQ_VECTORS (32 * NR_CPUS)
    3.27 -# endif
    3.28 -#else
    3.29 -#define NR_IRQS 16
    3.30 -#define NR_IRQ_VECTORS NR_IRQS
    3.31 -#endif
    3.32 -#endif
    3.33  #endif
    3.34  
    3.35  #define FPU_IRQ			13
    3.36 @@ -119,20 +102,20 @@
    3.37   *     are bound using the provided bind/unbind functions.
    3.38   */
    3.39  
    3.40 -#define PIRQ_BASE   0
    3.41 -#define NR_PIRQS  128
    3.42 +#define PIRQ_BASE		0
    3.43 +#define NR_PIRQS		128
    3.44  
    3.45 -#define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS)
    3.46 -#define NR_DYNIRQS  128
    3.47 +#define DYNIRQ_BASE		(PIRQ_BASE + NR_PIRQS)
    3.48 +#define NR_DYNIRQS		128
    3.49  
    3.50 -#define NR_IRQS   (NR_PIRQS + NR_DYNIRQS)
    3.51 -#define NR_IRQ_VECTORS NR_IRQS
    3.52 +#define NR_IRQS			(NR_PIRQS + NR_DYNIRQS)
    3.53 +#define NR_IRQ_VECTORS		NR_IRQS
    3.54  
    3.55 -#define pirq_to_irq(_x)   ((_x) + PIRQ_BASE)
    3.56 -#define irq_to_pirq(_x)   ((_x) - PIRQ_BASE)
    3.57 +#define pirq_to_irq(_x)		((_x) + PIRQ_BASE)
    3.58 +#define irq_to_pirq(_x)		((_x) - PIRQ_BASE)
    3.59  
    3.60 -#define dynirq_to_irq(_x) ((_x) + DYNIRQ_BASE)
    3.61 -#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE)
    3.62 +#define dynirq_to_irq(_x)	((_x) + DYNIRQ_BASE)
    3.63 +#define irq_to_dynirq(_x)	((_x) - DYNIRQ_BASE)
    3.64  
    3.65  #ifndef __ASSEMBLY__
    3.66  /* Dynamic binding of event channels and VIRQ sources to Linux IRQ space. */
     4.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mmu_context.h	Fri Nov 19 16:38:51 2004 +0000
     4.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mmu_context.h	Fri Nov 19 18:02:14 2004 +0000
     4.3 @@ -66,10 +66,9 @@ static inline void switch_mm(struct mm_s
     4.4  #define deactivate_mm(tsk, mm) \
     4.5  	asm("movl %0,%%fs ; movl %0,%%gs": :"r" (0))
     4.6  
     4.7 -#define activate_mm(prev, next) \
     4.8 -do { \
     4.9 -	switch_mm((prev),(next),NULL); \
    4.10 -	flush_page_update_queue();			\
    4.11 -} while ( 0 )
    4.12 +#define activate_mm(prev, next) do {		\
    4.13 +	switch_mm((prev),(next),NULL);		\
    4.14 +	flush_page_update_queue();		\
    4.15 +} while (0)
    4.16  
    4.17  #endif
     5.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/page.h	Fri Nov 19 16:38:51 2004 +0000
     5.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/page.h	Fri Nov 19 18:02:14 2004 +0000
     5.3 @@ -60,15 +60,15 @@ extern unsigned long *phys_to_machine_ma
     5.4  #define mfn_to_pfn(_mfn) (machine_to_phys_mapping[(_mfn)])
     5.5  static inline unsigned long phys_to_machine(unsigned long phys)
     5.6  {
     5.7 -    unsigned long machine = pfn_to_mfn(phys >> PAGE_SHIFT);
     5.8 -    machine = (machine << PAGE_SHIFT) | (phys & ~PAGE_MASK);
     5.9 -    return machine;
    5.10 +	unsigned long machine = pfn_to_mfn(phys >> PAGE_SHIFT);
    5.11 +	machine = (machine << PAGE_SHIFT) | (phys & ~PAGE_MASK);
    5.12 +	return machine;
    5.13  }
    5.14  static inline unsigned long machine_to_phys(unsigned long machine)
    5.15  {
    5.16 -    unsigned long phys = mfn_to_pfn(machine >> PAGE_SHIFT);
    5.17 -    phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK);
    5.18 -    return phys;
    5.19 +	unsigned long phys = mfn_to_pfn(machine >> PAGE_SHIFT);
    5.20 +	phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK);
    5.21 +	return phys;
    5.22  }
    5.23  
    5.24  /*
    5.25 @@ -89,16 +89,8 @@ typedef struct { unsigned long pmd; } pm
    5.26  typedef struct { unsigned long pgd; } pgd_t;
    5.27  typedef struct { unsigned long pgprot; } pgprot_t;
    5.28  #define boot_pte_t pte_t /* or would you rather have a typedef */
    5.29 -#if 0				/* XXXcl for MMU_UPDATE_DEBUG */
    5.30 -static inline unsigned long pte_val(pte_t x)
    5.31 -{
    5.32 -	unsigned long ret = x.pte_low;
    5.33 -	if ( (ret & 1) ) ret = machine_to_phys(ret);
    5.34 -	return ret;
    5.35 -}
    5.36 -#else
    5.37 -#define pte_val(x)	(((x).pte_low & 1) ? machine_to_phys((x).pte_low) : (x).pte_low)
    5.38 -#endif
    5.39 +#define pte_val(x)	(((x).pte_low & 1) ? machine_to_phys((x).pte_low) : \
    5.40 +			 (x).pte_low)
    5.41  #define pte_val_ma(x)	((x).pte_low)
    5.42  #define HPAGE_SHIFT	22
    5.43  #endif
    5.44 @@ -114,25 +106,25 @@ static inline unsigned long pte_val(pte_
    5.45  
    5.46  static inline unsigned long pmd_val(pmd_t x)
    5.47  {
    5.48 -    unsigned long ret = x.pmd;
    5.49 -    if ( (ret) ) ret = machine_to_phys(ret);
    5.50 -    return ret;
    5.51 +	unsigned long ret = x.pmd;
    5.52 +	if (ret) ret = machine_to_phys(ret);
    5.53 +	return ret;
    5.54  }
    5.55  #define pgd_val(x)	({ BUG(); (unsigned long)0; })
    5.56  #define pgprot_val(x)	((x).pgprot)
    5.57  
    5.58  static inline pte_t __pte(unsigned long x)
    5.59  {
    5.60 -	if ( (x & 1) ) x = phys_to_machine(x);
    5.61 +	if (x & 1) x = phys_to_machine(x);
    5.62  	return ((pte_t) { (x) });
    5.63  }
    5.64 -#define __pte_ma(x) ((pte_t) { (x) } )
    5.65 +#define __pte_ma(x)	((pte_t) { (x) } )
    5.66  static inline pmd_t __pmd(unsigned long x)
    5.67  {
    5.68 -	if ( (x & 1) ) x = phys_to_machine(x);
    5.69 +	if ((x & 1)) x = phys_to_machine(x);
    5.70  	return ((pmd_t) { (x) });
    5.71  }
    5.72 -#define __pgd(x) ({ BUG(); (pgprot_t) { 0 }; })
    5.73 +#define __pgd(x)	({ BUG(); (pgprot_t) { 0 }; })
    5.74  #define __pgprot(x)	((pgprot_t) { (x) } )
    5.75  
    5.76  #endif /* !__ASSEMBLY__ */
    5.77 @@ -179,14 +171,6 @@ extern int sysctl_legacy_va_layout;
    5.78  
    5.79  #endif /* __ASSEMBLY__ */
    5.80  
    5.81 -/* 
    5.82 - * XXXcl two options for PAGE_OFFSET
    5.83 - * - 0xC0000000:
    5.84 - *   change text offset in arch/xen/i386/kernel/vmlinux.lds.S
    5.85 - *   change __pa/__va macros
    5.86 - * - 0xC0100000:
    5.87 - *   change TASK_SIZE 
    5.88 - */
    5.89  #ifdef __ASSEMBLY__
    5.90  #define __PAGE_OFFSET		(0xC0000000)
    5.91  #else
     6.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/param.h	Fri Nov 19 16:38:51 2004 +0000
     6.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/param.h	Fri Nov 19 18:02:14 2004 +0000
     6.3 @@ -2,7 +2,7 @@
     6.4  #define _ASMi386_PARAM_H
     6.5  
     6.6  #ifdef __KERNEL__
     6.7 -# define HZ		100/*  0 */		/* Internal kernel timer frequency */
     6.8 +# define HZ		100		/* Internal kernel timer frequency */
     6.9  # define USER_HZ	100		/* .. some user interfaces are in "ticks" */
    6.10  # define CLOCKS_PER_SEC		(USER_HZ)	/* like times() */
    6.11  #endif
     7.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h	Fri Nov 19 16:38:51 2004 +0000
     7.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h	Fri Nov 19 18:02:14 2004 +0000
     7.3 @@ -17,7 +17,6 @@ static inline void pmd_populate(struct m
     7.4  		((unsigned long long)page_to_pfn(pte) <<
     7.5  			(unsigned long long) PAGE_SHIFT)));
     7.6  	flush_page_update_queue();
     7.7 -	/* XXXcl queue */
     7.8  }
     7.9  /*
    7.10   * Allocate and free page tables.
    7.11 @@ -38,7 +37,7 @@ static inline void pte_free_kernel(pte_t
    7.12  
    7.13  extern void pte_free(struct page *pte);
    7.14  
    7.15 -#define __pte_free_tlb(tlb,pte)	tlb_remove_page((tlb),(pte))
    7.16 +#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
    7.17  
    7.18  /*
    7.19   * allocating and freeing a pmd is trivial: the 1-entry pmd is
     8.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h	Fri Nov 19 16:38:51 2004 +0000
     8.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h	Fri Nov 19 18:02:14 2004 +0000
     8.3 @@ -24,7 +24,7 @@ static inline int pgd_present(pgd_t pgd)
     8.4   * hook is made available.
     8.5   */
     8.6  #define set_pte_batched(pteptr, pteval) \
     8.7 -queue_l1_entry_update(pteptr, (pteval).pte_low)
     8.8 +	queue_l1_entry_update(pteptr, (pteval).pte_low)
     8.9  #define set_pte(pteptr, pteval) (*(pteptr) = pteval)
    8.10  #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval)
    8.11  /*
    8.12 @@ -60,7 +60,7 @@ static inline pte_t ptep_get_and_clear(p
    8.13  }
    8.14  
    8.15  #define pte_same(a, b)		((a).pte_low == (b).pte_low)
    8.16 -/*                                 
    8.17 +/*
    8.18   * We detect special mappings in one of two ways:
    8.19   *  1. If the MFN is an I/O page then Xen will set the m2p entry
    8.20   *     to be outside our maximum possible pseudophys range.
    8.21 @@ -82,19 +82,18 @@ static inline pte_t ptep_get_and_clear(p
    8.22   */
    8.23  #define INVALID_P2M_ENTRY (~0UL)
    8.24  #define FOREIGN_FRAME(_m) ((_m) | (1UL<<((sizeof(unsigned long)*8)-1)))
    8.25 -#define pte_pfn(_pte)                                                   \
    8.26 -({                                                                      \
    8.27 -    unsigned long mfn = (_pte).pte_low >> PAGE_SHIFT;                   \
    8.28 -    unsigned long pfn = mfn_to_pfn(mfn);                                \
    8.29 -    if ( (pfn >= max_mapnr) || (pfn_to_mfn(pfn) != mfn) )               \
    8.30 -        pfn = max_mapnr; /* special: force !pfn_valid() */              \
    8.31 -    pfn;                                                                \
    8.32 +#define pte_pfn(_pte)							\
    8.33 +({									\
    8.34 +	unsigned long mfn = (_pte).pte_low >> PAGE_SHIFT;		\
    8.35 +	unsigned long pfn = mfn_to_pfn(mfn);				\
    8.36 +	if ((pfn >= max_mapnr) || (pfn_to_mfn(pfn) != mfn))		\
    8.37 +		pfn = max_mapnr; /* special: force !pfn_valid() */	\
    8.38 +	pfn;								\
    8.39  })
    8.40  
    8.41  #define pte_page(_pte) pfn_to_page(pte_pfn(_pte))
    8.42  
    8.43  #define pte_none(x)		(!(x).pte_low)
    8.44 -
    8.45  #define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
    8.46  #define pfn_pte_ma(pfn, prot)	__pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
    8.47  #define pfn_pmd(pfn, prot)	__pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
     9.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h	Fri Nov 19 16:38:51 2004 +0000
     9.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h	Fri Nov 19 18:02:14 2004 +0000
     9.3 @@ -89,7 +89,7 @@ void paging_init(void);
     9.4  # define VMALLOC_END	(FIXADDR_START-2*PAGE_SIZE)
     9.5  #endif
     9.6  
     9.7 -extern void * high_memory;
     9.8 +extern void *high_memory;
     9.9  extern unsigned long vmalloc_earlyreserve;
    9.10  
    9.11  /*
    9.12 @@ -215,7 +215,7 @@ extern unsigned long pg0[];
    9.13     can temporarily clear it. */
    9.14  #define pmd_present(x)	(pmd_val(x))
    9.15  /* pmd_clear below */
    9.16 -#define	pmd_bad(x)	((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER & ~_PAGE_PRESENT)) != (_KERNPG_TABLE & ~_PAGE_PRESENT))
    9.17 +#define pmd_bad(x)	((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER & ~_PAGE_PRESENT)) != (_KERNPG_TABLE & ~_PAGE_PRESENT))
    9.18  
    9.19  
    9.20  #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
    9.21 @@ -421,30 +421,19 @@ extern pte_t *lookup_address(unsigned lo
    9.22  #define update_mmu_cache(vma,address,pte) do { } while (0)
    9.23  #define  __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
    9.24  
    9.25 -#if 0
    9.26  #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
    9.27  	do {								  \
    9.28  		if (__dirty) {						  \
    9.29 -			queue_l1_entry_update((__ptep), (__entry).pte_low); \
    9.30 -			flush_tlb_page(__vma, __address);                 \
    9.31 -			xen_flush_page_update_queue();                    \
    9.32 +			if (likely(vma->vm_mm == current->mm)) {	  \
    9.33 +			    xen_flush_page_update_queue();		  \
    9.34 +			    HYPERVISOR_update_va_mapping(address>>PAGE_SHIFT, \
    9.35 +							 entry, UVMF_INVLPG); \
    9.36 +			} else {					  \
    9.37 +			    xen_l1_entry_update((__ptep), (__entry).pte_low); \
    9.38 +			    flush_tlb_page(__vma, __address);	          \
    9.39 +			}						  \
    9.40  		}							  \
    9.41  	} while (0)
    9.42 -#else
    9.43 -#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
    9.44 -	do {								  \
    9.45 -		if (__dirty) {						  \
    9.46 -		        if ( likely(vma->vm_mm == current->mm) ) {        \
    9.47 -			    xen_flush_page_update_queue();                \
    9.48 -			    HYPERVISOR_update_va_mapping(address>>PAGE_SHIFT, entry, UVMF_INVLPG); \
    9.49 -			} else {                                          \
    9.50 -                            xen_l1_entry_update((__ptep), (__entry).pte_low); \
    9.51 -			    flush_tlb_page(__vma, __address);             \
    9.52 -			}                                                 \
    9.53 -		}							  \
    9.54 -	} while (0)
    9.55 -
    9.56 -#endif
    9.57  
    9.58  #define __HAVE_ARCH_PTEP_ESTABLISH
    9.59  #define ptep_establish(__vma, __address, __ptep, __entry)		\
    9.60 @@ -455,7 +444,7 @@ do {				  					\
    9.61  #define __HAVE_ARCH_PTEP_ESTABLISH_NEW
    9.62  #define ptep_establish_new(__vma, __address, __ptep, __entry)		\
    9.63  do {				  					\
    9.64 -	if ( likely((__vma)->vm_mm == current->mm) ) {			\
    9.65 +	if (likely((__vma)->vm_mm == current->mm)) {			\
    9.66  		xen_flush_page_update_queue();				\
    9.67  		HYPERVISOR_update_va_mapping((__address)>>PAGE_SHIFT,	\
    9.68  					     __entry, 0);		\
    9.69 @@ -487,15 +476,15 @@ static inline unsigned long arbitrary_vi
    9.70  #define kern_addr_valid(addr)	(1)
    9.71  #endif /* !CONFIG_DISCONTIGMEM */
    9.72  
    9.73 -#define io_remap_page_range(vma,from,phys,size,prot)                     \
    9.74 -        direct_remap_area_pages(vma->vm_mm,from,phys,size,prot,DOMID_IO)
    9.75 +#define io_remap_page_range(vma,from,phys,size,prot) \
    9.76 +	direct_remap_area_pages(vma->vm_mm,from,phys,size,prot,DOMID_IO)
    9.77  
    9.78  int direct_remap_area_pages(struct mm_struct *mm,
    9.79 -                            unsigned long address, 
    9.80 -                            unsigned long machine_addr,
    9.81 -                            unsigned long size, 
    9.82 -                            pgprot_t prot,
    9.83 -                            domid_t  domid);
    9.84 +			    unsigned long address, 
    9.85 +			    unsigned long machine_addr,
    9.86 +			    unsigned long size, 
    9.87 +			    pgprot_t prot,
    9.88 +			    domid_t  domid);
    9.89  int __direct_remap_area_pages(struct mm_struct *mm,
    9.90  			      unsigned long address, 
    9.91  			      unsigned long size, 
    10.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/system.h	Fri Nov 19 16:38:51 2004 +0000
    10.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/system.h	Fri Nov 19 18:02:14 2004 +0000
    10.3 @@ -124,10 +124,10 @@ static inline unsigned long _get_base(ch
    10.4  
    10.5  static inline void wbinvd(void)
    10.6  {
    10.7 -    mmu_update_t u;
    10.8 -    u.ptr = MMU_EXTENDED_COMMAND;
    10.9 -    u.val = MMUEXT_FLUSH_CACHE;
   10.10 -    (void)HYPERVISOR_mmu_update(&u, 1, NULL);
   10.11 +	mmu_update_t u;
   10.12 +	u.ptr = MMU_EXTENDED_COMMAND;
   10.13 +	u.val = MMUEXT_FLUSH_CACHE;
   10.14 +	(void)HYPERVISOR_mmu_update(&u, 1, NULL);
   10.15  }
   10.16  
   10.17  static inline unsigned long get_limit(unsigned long segment)
   10.18 @@ -449,66 +449,65 @@ struct alt_instr {
   10.19   * includes these barriers, for example.
   10.20   */
   10.21  
   10.22 -#define __cli()                                                               \
   10.23 -do {                                                                          \
   10.24 -    HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask = 1;              \
   10.25 -    barrier();                                                                \
   10.26 +#define __cli()								\
   10.27 +do {									\
   10.28 +	HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask = 1;	\
   10.29 +	barrier();							\
   10.30  } while (0)
   10.31  
   10.32 -#define __sti()                                                               \
   10.33 -do {                                                                          \
   10.34 -    shared_info_t *_shared = HYPERVISOR_shared_info;                          \
   10.35 -    barrier();                                                                \
   10.36 -    _shared->vcpu_data[0].evtchn_upcall_mask = 0;                             \
   10.37 -    barrier(); /* unmask then check (avoid races) */                          \
   10.38 -    if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )              \
   10.39 -        force_evtchn_callback();                                              \
   10.40 +#define __sti()								\
   10.41 +do {									\
   10.42 +	shared_info_t *_shared = HYPERVISOR_shared_info;		\
   10.43 +	barrier();							\
   10.44 +	_shared->vcpu_data[0].evtchn_upcall_mask = 0;			\
   10.45 +	barrier(); /* unmask then check (avoid races) */		\
   10.46 +	if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )	\
   10.47 +	force_evtchn_callback();					\
   10.48  } while (0)
   10.49  
   10.50 -#define __save_flags(x)                                                       \
   10.51 -do {                                                                          \
   10.52 -    (x) = HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask;            \
   10.53 +#define __save_flags(x)							\
   10.54 +do {									\
   10.55 +	(x) = HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask;	\
   10.56  } while (0)
   10.57  
   10.58 -#define __restore_flags(x)                                                    \
   10.59 -do {                                                                          \
   10.60 -    shared_info_t *_shared = HYPERVISOR_shared_info;                          \
   10.61 -    barrier();                                                                \
   10.62 -    if ( (_shared->vcpu_data[0].evtchn_upcall_mask = (x)) == 0 ) {            \
   10.63 -        barrier(); /* unmask then check (avoid races) */                      \
   10.64 -        if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )          \
   10.65 -            force_evtchn_callback();                                          \
   10.66 -    }                                                                         \
   10.67 +#define __restore_flags(x)						\
   10.68 +do {									\
   10.69 +	shared_info_t *_shared = HYPERVISOR_shared_info;		\
   10.70 +	barrier();							\
   10.71 +	if ( (_shared->vcpu_data[0].evtchn_upcall_mask = (x)) == 0 ) {	\
   10.72 +	barrier(); /* unmask then check (avoid races) */		\
   10.73 +	if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )	\
   10.74 +	    force_evtchn_callback();					\
   10.75 +	}								\
   10.76  } while (0)
   10.77  
   10.78 -#define safe_halt()             ((void)0)
   10.79 +#define safe_halt()	     ((void)0)
   10.80  
   10.81 -#define __save_and_cli(x)                                                     \
   10.82 -do {                                                                          \
   10.83 -    (x) = HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask;            \
   10.84 -    HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask = 1;              \
   10.85 -    barrier();                                                                \
   10.86 +#define __save_and_cli(x)						\
   10.87 +do {									\
   10.88 +	(x) = HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask;	\
   10.89 +	HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask = 1;	\
   10.90 +	barrier();							\
   10.91  } while (0)
   10.92  
   10.93 -#define __save_and_sti(x)                                                     \
   10.94 -do {                                                                          \
   10.95 -    shared_info_t *_shared = HYPERVISOR_shared_info;                          \
   10.96 -    barrier();                                                                \
   10.97 -    (x) = _shared->vcpu_data[0].evtchn_upcall_mask;                           \
   10.98 -    _shared->vcpu_data[0].evtchn_upcall_mask = 0;                             \
   10.99 -    barrier(); /* unmask then check (avoid races) */                          \
  10.100 -    if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )              \
  10.101 -        force_evtchn_callback();                                              \
  10.102 +#define __save_and_sti(x)						\
  10.103 +do {									\
  10.104 +	shared_info_t *_shared = HYPERVISOR_shared_info;		\
  10.105 +	barrier();							\
  10.106 +	(x) = _shared->vcpu_data[0].evtchn_upcall_mask;			\
  10.107 +	_shared->vcpu_data[0].evtchn_upcall_mask = 0;			\
  10.108 +	barrier(); /* unmask then check (avoid races) */		\
  10.109 +	if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) )	\
  10.110 +	force_evtchn_callback();					\
  10.111  } while (0)
  10.112  
  10.113  #define local_irq_save(x)	__save_and_cli(x)
  10.114 -#define local_irq_restore(x)    __restore_flags(x)
  10.115 -#define local_save_flags(x)     __save_flags(x)
  10.116 -#define local_irq_disable()     __cli()
  10.117 -#define local_irq_enable()      __sti()
  10.118 +#define local_irq_restore(x)	__restore_flags(x)
  10.119 +#define local_save_flags(x)	__save_flags(x)
  10.120 +#define local_irq_disable()	__cli()
  10.121 +#define local_irq_enable()	__sti()
  10.122  
  10.123 -#define irqs_disabled()			\
  10.124 -	HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask
  10.125 +#define irqs_disabled() HYPERVISOR_shared_info->vcpu_data[0].evtchn_upcall_mask
  10.126  
  10.127  /*
  10.128   * disable hlt during certain critical i/o operations
    11.1 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/tlbflush.h	Fri Nov 19 16:38:51 2004 +0000
    11.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/tlbflush.h	Fri Nov 19 18:02:14 2004 +0000
    11.3 @@ -5,18 +5,13 @@
    11.4  #include <linux/mm.h>
    11.5  #include <asm/processor.h>
    11.6  
    11.7 -#define __flush_tlb() do {						\
    11.8 -	xen_tlb_flush();						\
    11.9 -} while (/*CONSTCOND*/0)
   11.10 +#define __flush_tlb() xen_tlb_flush()
   11.11  
   11.12  /*
   11.13   * Global pages have to be flushed a bit differently. Not a real
   11.14   * performance problem because this does not happen often.
   11.15   */
   11.16 -#define __flush_tlb_global()						\
   11.17 -	do {								\
   11.18 -		xen_tlb_flush();					\
   11.19 -	} while (0)
   11.20 +#define __flush_tlb_global() xen_tlb_flush()
   11.21  
   11.22  extern unsigned long pgkern_mask;
   11.23  
   11.24 @@ -30,11 +25,9 @@ extern unsigned long pgkern_mask;
   11.25  
   11.26  #define cpu_has_invlpg	(boot_cpu_data.x86 > 3)
   11.27  
   11.28 -#define __flush_tlb_single(addr) do {					\
   11.29 -	xen_invlpg(addr);						\
   11.30 -} while (/* CONSTCOND */0)
   11.31 +#define __flush_tlb_single(addr) xen_invlpg(addr)
   11.32  
   11.33 -# define __flush_tlb_one(addr) __flush_tlb_single(addr)
   11.34 +#define __flush_tlb_one(addr) __flush_tlb_single(addr)
   11.35  
   11.36  /*
   11.37   * TLB flushing:
    12.1 --- a/linux-2.6.10-rc2-xen-sparse/net/core/skbuff.c	Fri Nov 19 16:38:51 2004 +0000
    12.2 +++ b/linux-2.6.10-rc2-xen-sparse/net/core/skbuff.c	Fri Nov 19 18:02:14 2004 +0000
    12.3 @@ -166,7 +166,7 @@ nodata:
    12.4  /**
    12.5   *	alloc_skb_from_cache	-	allocate a network buffer
    12.6   *	@cp: kmem_cache from which to allocate the data area
    12.7 - *           (object size must be big enough for @size bytes + skb overheads)
    12.8 + *	     (object size must be big enough for @size bytes + skb overheads)
    12.9   *	@size: size to allocate
   12.10   *	@gfp_mask: allocation mask
   12.11   *