bitkeeper revision 1.944 (40c70595GOCGjmHQFvphhaOjXAmbvw)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 9 Jun 2004 12:41:57 +0000 (12:41 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 9 Jun 2004 12:41:57 +0000 (12:41 +0000)
Xen build-configuration cleanups.

23 files changed:
xen/Makefile
xen/Rules.mk
xen/arch/i386/Makefile
xen/arch/i386/entry.S
xen/arch/i386/io_apic.c
xen/arch/i386/irq.c
xen/arch/i386/setup.c
xen/arch/i386/smp.c
xen/arch/i386/traps.c
xen/common/Makefile
xen/common/dom0_ops.c
xen/common/domain.c
xen/common/keyhandler.c
xen/common/schedule.c
xen/common/trace.c
xen/drivers/Makefile
xen/drivers/pci/pci.c
xen/include/asm-i386/config.h
xen/include/asm-i386/processor.h
xen/include/asm-x86_64/config.h
xen/include/xen/blkdev.h
xen/include/xen/perfc.h
xen/include/xen/vif.h

index 90bd0a8cfcfdc113b7347d9cf1269685d2768a0c..6ec66b69642d9a52670548025f50531776dc28e5 100644 (file)
@@ -37,7 +37,7 @@ clean: delete-links
 $(TARGET): delete-unfresh-files make-links $(GENERATED_FILES)
        $(MAKE) -C tools
        $(MAKE) -C common
-       if [ "$(nodev)" != "y" ]; then \
+       if [ "$(old_drivers)" == "y" ]; then \
        $(MAKE) -C net ; \
        fi
        $(MAKE) -C drivers
index e75a79cbe233dc9b4f52817244c94caa37a1bb5c..fd2bddfc01ab31babc18f39f71a5990fc928e735 100644 (file)
@@ -1,10 +1,13 @@
+
+debug       ?= n
+debugger    ?= n
+old_drivers ?= n
+perfc       ?= n
+trace       ?= n
+
 COMPILE_ARCH := $(shell uname -m | sed -e s/i.86/i386/)
 TARGET_ARCH  ?= $(COMPILE_ARCH)
 
-nodev ?= n
-debug ?= n
-trace ?= n
-
 TARGET  := $(BASEDIR)/xen
 HDRS    := $(wildcard $(BASEDIR)/include/xen/*.h)
 HDRS    += $(wildcard $(BASEDIR)/include/scsi/*.h)
@@ -23,7 +26,7 @@ ALL_OBJS := $(BASEDIR)/common/common.o
 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
 ALL_OBJS += $(BASEDIR)/drivers/pci/driver.o
-ifneq ($(nodev),y)
+ifeq ($(old_drivers),y)
 ALL_OBJS += $(BASEDIR)/net/network.o
 ALL_OBJS += $(BASEDIR)/drivers/net/driver.o
 ALL_OBJS += $(BASEDIR)/drivers/block/driver.o
@@ -43,12 +46,16 @@ ifneq ($(debug),y)
 CFLAGS += -DNDEBUG
 endif
 
-ifeq ($(nperfc),y)
-CFLAGS += -DNPERFC
+ifeq ($(debugger),y)
+CFLAGS += -DXEN_DEBUGGER
+endif
+
+ifeq ($(old_drivers),y)
+CFLAGS += -DOLD_DRIVERS
 endif
 
-ifeq ($(nodev),y)
-CFLAGS += -DNO_DEVICES_IN_XEN
+ifeq ($(perfc),y)
+CFLAGS += -DPERF_COUNTERS
 endif
 
 ifeq ($(trace),y)
index 43b1b0ca05060691d09af5b2b17df8880260a03c..8257f479ad86ef28b9307ff2d6fa5bb7374e01b2 100644 (file)
@@ -1,6 +1,11 @@
 
 include $(BASEDIR)/Rules.mk
 
+ifneq ($(debugger),y)
+OBJS := $(subst pdb-linux.o,,$(OBJS))
+OBJS := $(subst pdb-stub.o,,$(OBJS))
+endif
+
 # What happens here? We link monitor object files together, starting
 # at MONITOR_BASE (a very high address). But bootloader cannot put
 # things there, so we initially load at LOAD_BASE. A hacky little
index d63f383017900fc84817b69acead17bbda202af9..d7600ade075357364cada3d5907ada0f0d95f145 100644 (file)
@@ -711,7 +711,7 @@ ENTRY(hypervisor_call_table)
         .long SYMBOL_NAME(do_set_gdt)
         .long SYMBOL_NAME(do_stack_switch)
         .long SYMBOL_NAME(do_set_callbacks)      /*  5 */
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
         .long SYMBOL_NAME(do_net_io_op)
 #else
         .long SYMBOL_NAME(do_ni_syscall)
@@ -719,7 +719,7 @@ ENTRY(hypervisor_call_table)
         .long SYMBOL_NAME(do_fpu_taskswitch)
         .long SYMBOL_NAME(do_sched_op)
         .long SYMBOL_NAME(do_dom0_op)
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
         .long SYMBOL_NAME(do_network_op)         /* 10 */
         .long SYMBOL_NAME(do_block_io_op)
 #else
index 7c307922b3f90bc0ef09ad27a333880d9ba057c3..0c9af329616390065b2731bce9194d7e9fa5145e 100644 (file)
@@ -212,7 +212,7 @@ static void set_ioapic_affinity (unsigned int irq, unsigned long mask)
  * In new I/O model, the interrupt is pinned to the CPU of the first
  * device-driver domain that attaches. Dynamic balancing is pointless.
  */
-#if defined(CONFIG_SMP) && !defined(NO_DEVICES_IN_XEN)
+#if defined(CONFIG_SMP) && defined(OLD_DRIVERS)
 
 typedef struct {
        unsigned int cpu;
index 5b16bb0e639c19486ff21c7a6fda92929dfe14ff..8224082fc853489aea868c5d52ca09a147aaa448 100644 (file)
@@ -481,7 +481,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs)
     struct irqaction * action;
     unsigned int status;
 
-#ifndef NPERFC
+#ifdef PERF_COUNTERS
     int cpu = smp_processor_id();
     u32 cc_start, cc_end;
 
@@ -553,7 +553,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs)
     desc->handler->end(irq);
     spin_unlock(&desc->lock);
 
-#ifndef NPERFC
+#ifdef PERF_COUNTERS
     rdtscl(cc_end);
 
     if ( !action || (!(action->flags & SA_NOPROFILE)) )
@@ -564,7 +564,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs)
             printk("Long interrupt %08x -> %08x\n", cc_start, cc_end);
 #endif
     }
-#endif /* NPERFC */
+#endif
 
     return 1;
 }
index 1772a7afc4d96a2b0b1c9522083c8417b2a1e9f6..5219fda9ab487d5a8df02b56163a68e975f70234 100644 (file)
@@ -328,7 +328,7 @@ void __init start_of_day(void)
     extern void timer_bh(void);
     extern void init_timervecs(void);
     extern void ac_timer_init(void);
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
     extern int  setup_network_devices(void);
     extern void net_init(void);
     extern void initialize_block_io(void);
@@ -415,7 +415,10 @@ void __init start_of_day(void)
 
     serial_init_stage2();
     initialize_keyboard(); /* setup keyboard (also for debugging)   */
+
+#ifdef XEN_DEBUGGER
     initialize_pdb();      /* pervasive debugger */
+#endif
 
     if ( !cpu_has_apic )
     {
@@ -434,7 +437,7 @@ void __init start_of_day(void)
     pci_init();
 #endif
     do_initcalls();
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
     if ( !setup_network_devices() )
         panic("Must have a network device!\n");
     net_init();            /* initializes virtual network system. */
index e79385c278937a332ab9143f29506ebb3cdd718a..e3d861e82677c15df295a4e16a34194d5a156374 100644 (file)
@@ -222,7 +222,7 @@ asmlinkage void smp_invalidate_interrupt(void)
         local_flush_tlb();
 }
 
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
 int try_flush_tlb_mask(unsigned long mask)
 {
     if ( mask & (1 << smp_processor_id()) )
index d798477a3841ebdc2195ab97e66f1601c6928564..9b3b11851aee1d263cea0669b2577fc1d4e8463a 100644 (file)
@@ -24,7 +24,7 @@
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *
  *  Pentium III FXSR, SSE support
- *     Gareth Hughes <gareth@valinux.com>, May 2000
+ * Gareth Hughes <gareth@valinux.com>, May 2000
  */
 
 #include <xen/config.h>
@@ -167,7 +167,7 @@ void show_registers(struct pt_regs *regs)
            regs->xfs & 0xffff, regs->xgs & 0xffff, ss);
 
     show_stack(&regs->esp);
-}      
+} 
 
 
 spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
@@ -184,7 +184,7 @@ void die(const char * str, struct pt_regs * regs, long err)
 
 
 static inline void do_trap(int trapnr, char *str,
-                          struct pt_regs *regs, 
+                           struct pt_regs *regs, 
                            long error_code, int use_error_code)
 {
     struct task_struct *p = current;
@@ -233,27 +233,30 @@ do_trap(trapnr, str, regs, error_code, 1); \
 }
 
 DO_ERROR_NOCODE( 0, "divide error", divide_error)
-DO_ERROR_NOCODE( 4, "overflow", overflow)
-DO_ERROR_NOCODE( 5, "bounds", bounds)
-DO_ERROR_NOCODE( 6, "invalid operand", invalid_op)
-DO_ERROR_NOCODE( 9, "coprocessor segment overrun", coprocessor_segment_overrun)
-DO_ERROR(10, "invalid TSS", invalid_TSS)
-DO_ERROR(11, "segment not present", segment_not_present)
-DO_ERROR(12, "stack segment", stack_segment)
+    DO_ERROR_NOCODE( 4, "overflow", overflow)
+    DO_ERROR_NOCODE( 5, "bounds", bounds)
+    DO_ERROR_NOCODE( 6, "invalid operand", invalid_op)
+    DO_ERROR_NOCODE( 9, "coprocessor segment overrun", coprocessor_segment_overrun)
+    DO_ERROR(10, "invalid TSS", invalid_TSS)
+    DO_ERROR(11, "segment not present", segment_not_present)
+    DO_ERROR(12, "stack segment", stack_segment)
 /* Vector 15 reserved by Intel */
-DO_ERROR_NOCODE(16, "fpu error", coprocessor_error)
-DO_ERROR(17, "alignment check", alignment_check)
-DO_ERROR_NOCODE(18, "machine check", machine_check)
-DO_ERROR_NOCODE(19, "simd error", simd_coprocessor_error)
+    DO_ERROR_NOCODE(16, "fpu error", coprocessor_error)
+    DO_ERROR(17, "alignment check", alignment_check)
+    DO_ERROR_NOCODE(18, "machine check", machine_check)
+    DO_ERROR_NOCODE(19, "simd error", simd_coprocessor_error)
 
-asmlinkage void do_int3(struct pt_regs *regs, long error_code)
+    asmlinkage void do_int3(struct pt_regs *regs, long error_code)
 {
     struct task_struct *p = current;
     struct guest_trap_bounce *gtb = guest_trap_bounce+smp_processor_id();
     trap_info_t *ti;
 
+#ifdef XEN_DEBUGGER
     if ( pdb_initialized && pdb_handle_exception(3, regs) == 0 )
         return;
+#endif
+
     if ( (regs->xcs & 3) != 3 )
     {
         if ( unlikely((regs->xcs & 3) == 0) )
@@ -333,7 +336,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, long error_code)
 
     if ( unlikely(p->mm.shadow_mode) && 
          (addr < PAGE_OFFSET) && shadow_fault(addr, error_code) )
-       return; /* Returns TRUE if fault was handled. */
+        return; /* Returns TRUE if fault was handled. */
 
     if ( unlikely(!(regs->xcs & 3)) )
         goto fault_in_hypervisor;
@@ -377,14 +380,16 @@ asmlinkage void do_page_fault(struct pt_regs *regs, long error_code)
 #endif
     }
 
-    if (pdb_page_fault_possible)                 /* implicit pdb_initialized */
+#ifdef XEN_DEBUGGER
+    if ( pdb_page_fault_possible )
     {
         pdb_page_fault = 1;
-       /* make eax & edx valid to complete the instruction */
-       regs->eax = (long)&pdb_page_fault_scratch;
-       regs->edx = (long)&pdb_page_fault_scratch;
-       return;
+        /* make eax & edx valid to complete the instruction */
+        regs->eax = (long)&pdb_page_fault_scratch;
+        regs->edx = (long)&pdb_page_fault_scratch;
+        return;
     }
+#endif
 
     show_registers(regs);
     panic("CPU%d FATAL PAGE FAULT\n"
@@ -430,14 +435,15 @@ asmlinkage void do_general_protection(struct pt_regs *regs, long error_code)
         ti = current->thread.traps + (error_code>>3);
         if ( TI_GET_DPL(ti) >= (regs->xcs & 3) )
         {
-           unsigned long cr3;
-       
-           __asm__ __volatile__ ("movl %%cr3,%0" : "=r" (cr3) : );
-           if (pdb_initialized && pdb_ctx.system_call != 0 &&
-               cr3 == pdb_ctx.ptbr)
-           {
-               pdb_linux_syscall_enter_bkpt(regs, error_code, ti);
-           }
+#ifdef XEN_DEBUGGER
+            if ( pdb_initialized && (pdb_ctx.system_call != 0) )
+            {
+                unsigned long cr3; 
+                __asm__ __volatile__ ("movl %%cr3,%0" : "=r" (cr3) : );
+                if ( cr3 == pdb_ctx.ptbr )
+                    pdb_linux_syscall_enter_bkpt(regs, error_code, ti);
+            }
+#endif
 
             gtb->flags = GTBF_TRAP_NOCODE;
             regs->eip += 2;
@@ -535,12 +541,40 @@ asmlinkage void math_state_restore(struct pt_regs *regs, long error_code)
     }
 }
 
-asmlinkage void do_debug_orig(struct pt_regs *regs, long error_code)
+#ifdef XEN_DEBUGGER
+asmlinkage void do_pdb_debug(struct pt_regs *regs, long error_code)
 {
     unsigned int condition;
     struct task_struct *tsk = current;
     struct guest_trap_bounce *gtb = guest_trap_bounce+smp_processor_id();
 
+    __asm__ __volatile__("movl %%db6,%0" : "=r" (condition));
+    if ( (condition & (1 << 14)) != (1 << 14) )
+        printk("\nwarning: debug trap w/o BS bit [0x%x]\n\n", condition);
+    __asm__("movl %0,%%db6" : : "r" (0));
+
+    if ( pdb_handle_exception(1, regs) != 0 )
+    {
+        tsk->thread.debugreg[6] = condition;
+
+        gtb->flags = GTBF_TRAP_NOCODE;
+        gtb->cs    = tsk->thread.traps[1].cs;
+        gtb->eip   = tsk->thread.traps[1].address;
+    }
+}
+#endif
+
+asmlinkage void do_debug(struct pt_regs *regs, long error_code)
+{
+    unsigned int condition;
+    struct task_struct *tsk = current;
+    struct guest_trap_bounce *gtb = guest_trap_bounce+smp_processor_id();
+
+#ifdef XEN_DEBUGGER
+    if ( pdb_initialized )
+        return do_pdb_debug(regs, error_code);
+#endif
+
     __asm__ __volatile__("movl %%db6,%0" : "=r" (condition));
 
     /* Mask out spurious debug traps due to lazy DR7 setting */
@@ -574,37 +608,8 @@ asmlinkage void do_debug_orig(struct pt_regs *regs, long error_code)
 }
 
 
-asmlinkage void do_debug(struct pt_regs *regs, long error_code)
-{
-    unsigned int condition;
-    struct task_struct *tsk = current;
-    struct guest_trap_bounce *gtb = guest_trap_bounce+smp_processor_id();
-
-    /* This handler is broken! Only use it if PDB is enabled. */
-    if ( !pdb_initialized )
-    {
-        do_debug_orig(regs, error_code);
-        return;
-    }
-
-    __asm__ __volatile__("movl %%db6,%0" : "=r" (condition));
-    if ( (condition & (1 << 14)) != (1 << 14) )
-        printk("\nwarning: debug trap w/o BS bit [0x%x]\n\n", condition);
-    __asm__("movl %0,%%db6" : : "r" (0));
-
-    if ( pdb_handle_exception(1, regs) != 0 )
-    {
-        tsk->thread.debugreg[6] = condition;
-
-       gtb->flags = GTBF_TRAP_NOCODE;
-       gtb->cs    = tsk->thread.traps[1].cs;
-       gtb->eip   = tsk->thread.traps[1].address;
-    }
-}
-
-
 asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs,
-                                         long error_code)
+                                          long error_code)
 { /* nothing */ }
 
 
@@ -612,13 +617,13 @@ asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs,
 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" (__HYPERVISOR_CS << 16)); \
+ "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" (__HYPERVISOR_CS << 16)); \
 } while (0)
 
 void set_intr_gate(unsigned int n, void *addr)
@@ -638,25 +643,25 @@ static void set_task_gate(unsigned int n, unsigned int sel)
 }
 
 #define _set_seg_desc(gate_addr,type,dpl,base,limit) {\
      *((gate_addr)+1) = ((base) & 0xff000000) | \
-               (((base) & 0x00ff0000)>>16) | \
-               ((limit) & 0xf0000) | \
-               ((dpl)<<13) | \
-               (0x00408000) | \
-               ((type)<<8); \
      *(gate_addr) = (((base) & 0x0000ffff)<<16) | \
-               ((limit) & 0x0ffff); }
+ *((gate_addr)+1) = ((base) & 0xff000000) | \
+  (((base) & 0x00ff0000)>>16) | \
+  ((limit) & 0xf0000) | \
+  ((dpl)<<13) | \
+  (0x00408000) | \
+  ((type)<<8); \
+ *(gate_addr) = (((base) & 0x0000ffff)<<16) | \
+  ((limit) & 0x0ffff); }
 
 #define _set_tssldt_desc(n,addr,limit,type) \
 __asm__ __volatile__ ("movw %w3,0(%2)\n\t" \
      "movw %%ax,2(%2)\n\t" \
      "rorl $16,%%eax\n\t" \
      "movb %%al,4(%2)\n\t" \
      "movb %4,5(%2)\n\t" \
      "movb $0,6(%2)\n\t" \
      "movb %%ah,7(%2)\n\t" \
      "rorl $16,%%eax" \
      : "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type))
+ "movw %%ax,2(%2)\n\t" \
+ "rorl $16,%%eax\n\t" \
+ "movb %%al,4(%2)\n\t" \
+ "movb %4,5(%2)\n\t" \
+ "movb $0,6(%2)\n\t" \
+ "movb %%ah,7(%2)\n\t" \
+ "rorl $16,%%eax" \
+ : "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type))
 
 void set_tss_desc(unsigned int n, void *addr)
 {
index 5edce924877f24b8f9176b53d54164dac4cd7791..12454c9aedb44c91c9ae2a4967e952973f163b90 100644 (file)
@@ -1,14 +1,23 @@
 
 include $(BASEDIR)/Rules.mk
 
-ifeq ($(nperfc),y)
-OBJS := $(subst perfc.o,,$(OBJS))
+ifneq ($(debugger),y)
+OBJS := $(subst debug.o,,$(OBJS))
+OBJS := $(subst debug-linux.o,,$(OBJS))
 endif
 
-ifeq ($(nodev),y)
+ifneq ($(old_drivers),y)
 OBJS := $(subst network.o,,$(OBJS))
 endif
 
+ifneq ($(perfc),y)
+OBJS := $(subst perfc.o,,$(OBJS))
+endif
+
+ifneq ($(trace),y)
+OBJS := $(subst trace.o,,$(OBJS))
+endif
+
 default: $(OBJS)
        $(LD) $(LDARCHFLAGS) -r -o common.o $(OBJS)
 
index 76d8afd437886f022aa609b739f13e29b849b53c..39847e58f1da9c09803948e4db3681c08a85896a 100644 (file)
@@ -473,6 +473,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     }
     break;
 
+#ifdef XEN_DEBUGGER
     case DOM0_DEBUG:
     {
         pdb_do_debug(op);
@@ -480,6 +481,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
         ret = 0;
     }
     break;
+#endif
 
     case DOM0_SETTIME:
     {
index c152d6532bb4d5533747771843b42c807207be8d..6c0dccc8ac557379836480ab094f930f65166497 100644 (file)
@@ -299,10 +299,10 @@ struct pfn_info *alloc_domain_page(struct task_struct *p)
     unsigned long flags, mask, pfn_stamp, cpu_stamp;
     int i;
 
-#ifdef NO_DEVICES_IN_XEN
-    ASSERT(!in_irq());
-#else
+#ifdef OLD_DRIVERS
     ASSERT((p == NULL) || !in_irq());
+#else
+    ASSERT(!in_irq());
 #endif
 
     spin_lock_irqsave(&free_list_lock, flags);
@@ -332,14 +332,14 @@ struct pfn_info *alloc_domain_page(struct task_struct *p)
 
         if ( unlikely(mask != 0) )
         {
-#ifdef NO_DEVICES_IN_XEN
-            flush_tlb_mask(mask);
-#else
+#ifdef OLD_DRIVERS
             /* In IRQ ctxt, flushing is best-effort only, to avoid deadlock. */
             if ( likely(!in_irq()) )
                 flush_tlb_mask(mask);
             else if ( unlikely(!try_flush_tlb_mask(mask)) )
                 goto free_and_exit;
+#else
+            flush_tlb_mask(mask);
 #endif
             perfc_incrc(need_flush_tlb_flush);
         }
@@ -815,7 +815,7 @@ int construct_dom0(struct task_struct *p,
 
     extern void physdev_init_dom0(struct task_struct *);
 
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
     extern void ide_probe_devices(xen_disk_info_t *);
     extern void scsi_probe_devices(xen_disk_info_t *);
     extern void cciss_probe_devices(xen_disk_info_t *);
@@ -1078,7 +1078,7 @@ int construct_dom0(struct task_struct *p,
     while ( num_vifs-- > 0 )
         (void)create_net_vif(0);
 
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
     /* DOM0 gets access to all real block devices. */
 #define MAX_REAL_DISKS 256
     xd = kmalloc(MAX_REAL_DISKS * sizeof(xen_disk_t), GFP_KERNEL);
index 7cd60e439f8530cf0ad73929d74ddecc98065b5a..16e2f37132da75dd27a7778e8f5488ff131a8666 100644 (file)
@@ -107,7 +107,7 @@ void do_task_queues(u_char key, void *dev_id, struct pt_regs *regs)
 extern void dump_runq(u_char key, void *dev_id, struct pt_regs *regs);
 extern void print_sched_histo(u_char key, void *dev_id, struct pt_regs *regs);
 extern void reset_sched_histo(u_char key, void *dev_id, struct pt_regs *regs);
-#ifndef NPERFC
+#ifdef PERF_COUNTERS
 extern void perfc_printall (u_char key, void *dev_id, struct pt_regs *regs);
 extern void perfc_reset (u_char key, void *dev_id, struct pt_regs *regs);
 #endif
@@ -134,7 +134,7 @@ void initialize_keytable(void)
     add_key_handler('r', dump_runq,      "dump run queues");
     add_key_handler('B', kill_dom0,      "reboot machine gracefully"); 
     add_key_handler('R', halt_machine,   "reboot machine ungracefully"); 
-#ifndef NPERFC
+#ifdef PERF_COUNTERS
     add_key_handler('p', perfc_printall, "print performance counters"); 
     add_key_handler('P', perfc_reset,    "reset performance counters"); 
 #endif
index f3f6ad89e16ce9357e5560137e1ccb3ed71f26cc..00929ffc93be04b6ccb773cf7969bde34f809725 100644 (file)
@@ -27,9 +27,6 @@
 #include <xen/perfc.h>
 #include <xen/sched-if.h>
 #include <hypervisor-ifs/sched_ctl.h>
-
-#undef  TRACE_BUFFER
-
 #include <xen/trace.h>
 
 /*#define WAKEUP_HISTO*/
index e79c97ee541e7395d798463c9699c944428da0ee..98da9f692b6305f3d45574bd39f59542eab07b56 100644 (file)
@@ -17,9 +17,6 @@
  */
 
 #include <xen/config.h>
-
-#ifdef TRACE_BUFFER
-
 #include <asm/timex.h>
 #include <asm/types.h>
 #include <asm/io.h>
@@ -127,5 +124,3 @@ int get_tb_info(dom0_gettbufs_t *st)
         return -ENODATA;
     }
 }
-
-#endif /* TRACE_BUFFER */
index 0d26c89cbbc521a17efc2e603025c44b93017cc0..78635ed6039468e7fef9436d5909907381506507 100644 (file)
@@ -3,7 +3,7 @@ default:
        $(MAKE) -C char
        $(MAKE) -C acpi
        $(MAKE) -C pci
-       if [ "$(nodev)" != "y" ]; then \
+       if [ "$(old_drivers)" == "y" ]; then \
        $(MAKE) -C net ; \
        $(MAKE) -C block ; \
        $(MAKE) -C cdrom ; \
index 488a510cc439c72f558d2b3974f2cf0477c1df23..f8c33bad06d124a2de76592d0038464bdf9ff30d 100644 (file)
@@ -619,7 +619,7 @@ pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev)
        return NULL;
 }
 
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
 static int
 pci_announce_device(struct pci_driver *drv, struct pci_dev *dev)
 {
@@ -644,7 +644,7 @@ pci_announce_device(struct pci_driver *drv, struct pci_dev *dev)
 out:
        return ret;
 }
-#endif /* !NO_DEVICES_IN_XEN */
+#endif /* OLD_DRIVERS */
 
 /**
  * pci_register_driver - register a new pci driver
@@ -658,7 +658,7 @@ out:
 int
 pci_register_driver(struct pci_driver *drv)
 {
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
        struct pci_dev *dev;
        int count = 0;
 
@@ -686,7 +686,7 @@ pci_register_driver(struct pci_driver *drv)
 void
 pci_unregister_driver(struct pci_driver *drv)
 {
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
        struct pci_dev *dev;
 
        list_del(&drv->node);
index cb550ee17226b8946cb41226ad7390d5511230f3..bd3532e77389ddfecc00abdcaf9c51deabc2b566 100644 (file)
 
 #ifndef NDEBUG
 #define MEMORY_GUARD
-#define TRACE_BUFFER
 #endif
 
 #ifndef __ASSEMBLY__
index b1eab99d5663a047a6b25ee312283bde0879feed..823c6ca8517f653f4417ab54acc3ae8bd2349e59 100644 (file)
@@ -406,10 +406,16 @@ extern struct desc_struct *idt_tables[];
     (memset(idt_tables[smp_processor_id()] + (_p)->fast_trap_idx, \
      0, 8))
 
+#ifdef XEN_DEBUGGER
 #define SET_FAST_TRAP(_p)   \
     (pdb_initialized ? (void *) 0 : \
        (memcpy(idt_tables[smp_processor_id()] + (_p)->fast_trap_idx, \
-              &((_p)->fast_trap_desc), 8)))
+               &((_p)->fast_trap_desc), 8)))
+#else
+#define SET_FAST_TRAP(_p)   \
+    (memcpy(idt_tables[smp_processor_id()] + (_p)->fast_trap_idx, \
+            &((_p)->fast_trap_desc), 8))
+#endif
 
 long set_fast_trap(struct task_struct *p, int idx);
 
index 1de494f85a0a1b71415b9573bb3af95a0803779a..5a0acabf2a2f2ac54280c35f2c7b1d025d4cdc61 100644 (file)
 
 #ifndef NDEBUG
 #define MEMORY_GUARD
-#define TRACE_BUFFER
 #endif
 
 #ifndef __ASSEMBLY__
index b53f1e645be9f44be134bb5991b84981c3f5194b..fa3be2291ef1eeeb918addc5d0ab48c473adc91e 100644 (file)
@@ -26,7 +26,7 @@ typedef struct {
 
 extern kdev_t xendev_to_physdev(unsigned short xendev);
 
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
 extern void init_blkdev_info(struct task_struct *);
 extern void unlink_blkdev_info(struct task_struct *);
 extern void destroy_blkdev_info(struct task_struct *);
index 5396be9c065dee4c11100556d4a138f10cc83cd1..381404323882c75e6fdb5357e5d7fb91b72a6add 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef __XEN_PERFC_H__
 #define __XEN_PERFC_H__
 
-#ifndef NPERFC
+#ifdef PERF_COUNTERS
 
 #include <asm/atomic.h>
 
@@ -67,7 +67,7 @@ extern struct perfcounter_t perfcounters;
 #define perfc_addc(x,y)   atomic_add((y), &perfcounters.x[smp_processor_id()])
 #define perfc_adda(x,y,z) atomic_add((z), &perfcounters.x[y])
 
-#else /* !NPERFC */
+#else /* PERF_COUNTERS */
 
 #define perfc_value(x)    ((void)0)
 #define perfc_valuec(x)   ((void)0)
@@ -83,6 +83,6 @@ extern struct perfcounter_t perfcounters;
 #define perfc_addc(x,y)   ((void)0)
 #define perfc_adda(x,y,z) ((void)0)
 
-#endif /* !NPERFC */
+#endif /* PERF_COUNTERS */
 
 #endif /* __XEN_PERFC_H__ */
index 63469ece652d313b900c3363891d82dd58305c2a..7d447d86f647c464d3435be4dc4e4d96c571de18 100644 (file)
@@ -95,7 +95,7 @@ do {                                                               \
 } while (0)                                                        \
 
 /* vif prototypes */
-#ifndef NO_DEVICES_IN_XEN
+#ifdef OLD_DRIVERS
 net_vif_t *create_net_vif(domid_t dom);
 void destroy_net_vif(net_vif_t *vif);
 void unlink_net_vif(net_vif_t *vif);