ia64/xen-unstable

changeset 4691:065f8708a9e2

bitkeeper revision 1.1327.1.9 (42714a2f9RKgJOZHHOz9jvIICLyXxQ)

More code cleanup
author djm@kirby.fc.hp.com
date Thu Apr 28 20:40:15 2005 +0000 (2005-04-28)
parents 0dc81495c135
children 632f2e07883a
files xen/arch/ia64/Makefile xen/arch/ia64/patch/linux-2.6.11/cpumask.h xen/arch/ia64/patch/linux-2.6.11/time.c xen/arch/ia64/tools/mkbuildtree xen/arch/ia64/xenmisc.c xen/include/asm-ia64/config.h
line diff
     1.1 --- a/xen/arch/ia64/Makefile	Thu Apr 28 17:02:19 2005 +0000
     1.2 +++ b/xen/arch/ia64/Makefile	Thu Apr 28 20:40:15 2005 +0000
     1.3 @@ -9,7 +9,7 @@ OBJS = xensetup.o setup.o time.o irq.o i
     1.4  	sal.o cmdline.o mm_init.o tlb.o smpboot.o \
     1.5  	extable.o linuxextable.o \
     1.6  	regionreg.o entry.o unaligned.o privop.o vcpu.o \
     1.7 -	irq_ia64.o irq_lsapic.o hpsim_irq.o vhpt.o xenasm.o dom_fw.o
     1.8 +	irq_ia64.o irq_lsapic.o vhpt.o xenasm.o dom_fw.o
     1.9  # perfmon.o
    1.10  # unwind.o needed for kernel unwinding (rare)
    1.11  
     2.1 --- a/xen/arch/ia64/patch/linux-2.6.11/cpumask.h	Thu Apr 28 17:02:19 2005 +0000
     2.2 +++ b/xen/arch/ia64/patch/linux-2.6.11/cpumask.h	Thu Apr 28 20:40:15 2005 +0000
     2.3 @@ -1,20 +1,12 @@
     2.4 - cpumask.h |    2 +-
     2.5 - 1 files changed, 1 insertion(+), 1 deletion(-)
     2.6 -
     2.7 -Index: linux-2.6.11-xendiffs/include/linux/cpumask.h
     2.8 -===================================================================
     2.9 ---- linux-2.6.11-xendiffs.orig/include/linux/cpumask.h	2005-03-02 01:38:00.000000000 -0600
    2.10 -+++ linux-2.6.11-xendiffs/include/linux/cpumask.h	2005-03-24 15:06:18.408145243 -0600
    2.11 -@@ -341,11 +341,11 @@ static inline int __cpumask_parse(const 
    2.12 -  *        main(){ set1(3); set2(5); }
    2.13 +--- ../../linux-2.6.11/include/linux/cpumask.h	2005-03-02 00:38:00.000000000 -0700
    2.14 ++++ include/asm-ia64/linux/cpumask.h	2005-04-28 13:21:20.000000000 -0600
    2.15 +@@ -342,7 +342,9 @@
    2.16    */
    2.17   
    2.18 -+#if NR_CPUS > 1
    2.19   extern cpumask_t cpu_possible_map;
    2.20 ++#ifndef XEN
    2.21   extern cpumask_t cpu_online_map;
    2.22 ++#endif
    2.23   extern cpumask_t cpu_present_map;
    2.24   
    2.25 --#if NR_CPUS > 1
    2.26 - #define num_online_cpus()	cpus_weight(cpu_online_map)
    2.27 - #define num_possible_cpus()	cpus_weight(cpu_possible_map)
    2.28 - #define num_present_cpus()	cpus_weight(cpu_present_map)
    2.29 + #if NR_CPUS > 1
     3.1 --- a/xen/arch/ia64/patch/linux-2.6.11/time.c	Thu Apr 28 17:02:19 2005 +0000
     3.2 +++ b/xen/arch/ia64/patch/linux-2.6.11/time.c	Thu Apr 28 20:40:15 2005 +0000
     3.3 @@ -1,5 +1,5 @@
     3.4  --- ../../linux-2.6.11/arch/ia64/kernel/time.c	2005-03-02 00:37:50.000000000 -0700
     3.5 -+++ arch/ia64/time.c	2005-04-26 15:43:01.000000000 -0600
     3.6 ++++ arch/ia64/time.c	2005-04-28 14:29:58.000000000 -0600
     3.7  @@ -10,16 +10,22 @@
     3.8    */
     3.9   #include <linux/config.h>
    3.10 @@ -49,7 +49,7 @@
    3.11   
    3.12  +#ifdef XEN
    3.13  +volatile unsigned long last_nsec_offset;
    3.14 -+extern rwlock_t xtime_lock;
    3.15 ++extern seqlock_t xtime_lock;
    3.16  +unsigned long cpu_khz;  /* Detected as we calibrate the TSC */
    3.17  +static s_time_t        stime_irq;       /* System time at last 'time update' */
    3.18  +
     4.1 --- a/xen/arch/ia64/tools/mkbuildtree	Thu Apr 28 17:02:19 2005 +0000
     4.2 +++ b/xen/arch/ia64/tools/mkbuildtree	Thu Apr 28 20:40:15 2005 +0000
     4.3 @@ -103,7 +103,7 @@ softlink kernel/extable.c arch/ia64/linu
     4.4  cp_patch arch/ia64/mm/contig.c arch/ia64/mm_contig.c mm_contig.c
     4.5  cp_patch arch/ia64/mm/tlb.c arch/ia64/tlb.c tlb.c
     4.6  
     4.7 -cp_patch arch/ia64/hp/sim/hpsim_irq.c arch/ia64/hpsim_irq.c hpsim_irq.c
     4.8 +#cp_patch arch/ia64/hp/sim/hpsim_irq.c arch/ia64/hpsim_irq.c hpsim_irq.c
     4.9  
    4.10  softlink arch/ia64/kernel/efi_stub.S arch/ia64/efi_stub.S
    4.11  softlink arch/ia64/kernel/entry.h arch/ia64/entry.h
    4.12 @@ -178,7 +178,8 @@ cp_patch include/asm-ia64/hardirq.h incl
    4.13  softlink include/asm-ia64/hw_irq.h include/asm-ia64/hw_irq.h
    4.14  #cp_patch include/asm-ia64/ide.h include/asm-ia64/ide.h ide.h
    4.15  cp_patch include/asm-ia64/io.h include/asm-ia64/io.h io.h
    4.16 -cp_patch include/asm-ia64/irq.h include/asm-ia64/irq.h irq.h
    4.17 +#cp_patch include/asm-ia64/irq.h include/asm-ia64/irq.h irq.h
    4.18 +softlink include/asm-ia64/irq.h include/asm-ia64/irq.h
    4.19  cp_patch include/asm-ia64/kregs.h include/asm-ia64/kregs.h kregs.h
    4.20  cp_patch include/asm-ia64/page.h include/asm-ia64/page.h page.h
    4.21  cp_patch include/asm-ia64/processor.h include/asm-ia64/processor.h processor.h
    4.22 @@ -266,10 +267,12 @@ cp_patch include/linux/cpumask.h include
    4.23  softlink include/linux/dma-mapping.h include/asm-ia64/linux/dma-mapping.h
    4.24  #cp_patch include/linux/efi.h include/asm-ia64/linux/efi.h efi.h
    4.25  softlink include/linux/efi.h include/asm-ia64/linux/efi.h
    4.26 -cp_patch include/linux/hardirq.h include/asm-ia64/linux/hardirq.h linuxhardirq.h
    4.27 +#cp_patch include/linux/hardirq.h include/asm-ia64/linux/hardirq.h linuxhardirq.h
    4.28 +softlink include/linux/hardirq.h include/asm-ia64/linux/linuxhardirq.h
    4.29  #cp_patch include/linux/init_task.h include/asm-ia64/linux/init_task.h init_task.h
    4.30  cp_patch include/linux/interrupt.h include/asm-ia64/linux/interrupt.h interrupt.h
    4.31 -cp_patch include/linux/mmzone.h include/asm-ia64/linux/mmzone.h mmzone.h
    4.32 +#cp_patch include/linux/mmzone.h include/asm-ia64/linux/mmzone.h mmzone.h
    4.33 +softlink include/linux/mmzone.h include/asm-ia64/linux/mmzone.h
    4.34  
    4.35  #cp_patch include/linux/wait.h include/asm-ia64/linux/wait.h wait.h
    4.36  softlink include/linux/wait.h include/asm-ia64/linux/wait.h
    4.37 @@ -277,7 +280,8 @@ softlink include/linux/wait.h include/as
    4.38  #cp_patch include/linux/slab.h include/asm-ia64/slab.h slab.h
    4.39  
    4.40  # following renamed to avoid conflict
    4.41 -cp_patch include/linux/time.h include/xen/linuxtime.h linuxtime.h
    4.42 +#cp_patch include/linux/time.h include/xen/linuxtime.h linuxtime.h
    4.43 +softlink include/linux/time.h include/asm-ia64/linux/linuxtime.h
    4.44  
    4.45  softlink include/linux/bcd.h include/asm-ia64/linux/bcd.h
    4.46  softlink include/linux/bitmap.h include/asm-ia64/linux/bitmap.h
    4.47 @@ -301,6 +305,7 @@ softlink include/linux/threads.h include
    4.48  softlink include/linux/timex.h include/asm-ia64/linux/timex.h
    4.49  softlink include/linux/topology.h include/asm-ia64/linux/topology.h
    4.50  softlink include/linux/tty.h include/asm-ia64/linux/tty.h
    4.51 +softlink include/linux/seqlock.h include/asm-ia64/linux/seqlock.h
    4.52  
    4.53  null include/asm-ia64/linux/file.h
    4.54  null include/asm-ia64/linux/module.h
    4.55 @@ -309,6 +314,7 @@ null include/asm-ia64/linux/device.h
    4.56  null include/asm-ia64/linux/proc_fs.h
    4.57  null include/asm-ia64/linux/rtc.h
    4.58  null include/asm-ia64/linux/profile.h
    4.59 +null include/asm-ia64/linux/seqlock.h
    4.60  
    4.61  softlink include/linux/byteorder/generic.h include/asm-ia64/linux/byteorder/generic.h
    4.62  softlink include/linux/byteorder/little_endian.h include/asm-ia64/linux/byteorder/little_endian.h
     5.1 --- a/xen/arch/ia64/xenmisc.c	Thu Apr 28 17:02:19 2005 +0000
     5.2 +++ b/xen/arch/ia64/xenmisc.c	Thu Apr 28 20:40:15 2005 +0000
     5.3 @@ -259,6 +259,12 @@ void sys_exit(void)
     5.4  }
     5.5  
     5.6  
     5.7 +////////////////////////////////////
     5.8 +// called from irq_ia64.c:init_IRQ()
     5.9 +//   (because CONFIG_IA64_HP_SIM is specified)
    5.10 +////////////////////////////////////
    5.11 +void hpsim_irq_init(void) { }
    5.12 +
    5.13  
    5.14  // accomodate linux extable.c
    5.15  //const struct exception_table_entry *
     6.1 --- a/xen/include/asm-ia64/config.h	Thu Apr 28 17:02:19 2005 +0000
     6.2 +++ b/xen/include/asm-ia64/config.h	Thu Apr 28 20:40:15 2005 +0000
     6.3 @@ -136,6 +136,7 @@ struct page;
     6.4  #define __cacheline_aligned
     6.5  #define ____cacheline_aligned
     6.6  #define ____cacheline_aligned_in_smp
     6.7 +#define ____cacheline_maxaligned_in_smp
     6.8  
     6.9  #include "asm/types.h"	// for u64
    6.10  struct device {
    6.11 @@ -222,21 +223,27 @@ void sort_main_extable(void);
    6.12  // FIXME following needs work
    6.13  #define atomic_compareandswap(old, new, v) old
    6.14  
    6.15 -// x86 typedef still used in sched.h, may go away later
    6.16 -//typedef unsigned long l1_pgentry_t;
    6.17 -
    6.18  // see include/asm-ia64/mm.h, handle remaining pfn_info uses until gone
    6.19  #define pfn_info page
    6.20  
    6.21  // see common/keyhandler.c
    6.22  #define	nop()	asm volatile ("nop 0")
    6.23  
    6.24 -#define ARCH_HAS_EXEC_DOMAIN_MM_PTR
    6.25 -
    6.26  // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
    6.27  #define preempt_enable()	do { } while (0)
    6.28  #define preempt_disable()	do { } while (0)
    6.29  
    6.30 +// needed for include/xen/linuxtime.h
    6.31 +typedef s64 time_t;
    6.32 +typedef s64 suseconds_t;
    6.33 +
    6.34 +// used in common code
    6.35 +#define softirq_pending(cpu)	(cpu_data(cpu)->softirq_pending)
    6.36 +
    6.37 +// dup'ed from signal.h to avoid changes to includes
    6.38 +#define	SA_SHIRQ	0x04000000
    6.39 +#define	SA_INTERRUPT	0x20000000
    6.40 +
    6.41  // these declarations got moved at some point, find a better place for them
    6.42  extern int opt_noht;
    6.43  extern int ht_per_core;