aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.rootkeys7
-rw-r--r--xen/arch/x86/apic.c1
-rw-r--r--xen/arch/x86/setup.c1
-rw-r--r--xen/common/dom0_ops.c1
-rw-r--r--xen/common/kernel.c1
-rw-r--r--xen/common/memory.c8
-rw-r--r--xen/common/trace.c1
-rw-r--r--xen/drivers/acpi/acpi_ksyms.c2
-rw-r--r--xen/drivers/pci/pci.c1
-rw-r--r--xen/include/acpi/acpi_bus.h3
-rw-r--r--xen/include/asm-x86/hardirq.h62
-rw-r--r--xen/include/asm-x86/param.h24
-rw-r--r--xen/include/asm-x86/system.h20
-rw-r--r--xen/include/asm-x86/time.h21
-rw-r--r--xen/include/asm-x86/timex.h58
-rw-r--r--xen/include/asm-x86/unaligned.h37
-rw-r--r--xen/include/xen/config.h2
-rw-r--r--xen/include/xen/interrupt.h49
-rw-r--r--xen/include/xen/irq_cpustat.h1
-rw-r--r--xen/include/xen/module.h417
-rw-r--r--xen/include/xen/slab.h36
-rw-r--r--xen/include/xen/time.h4
-rw-r--r--xen/include/xen/timex.h7
-rw-r--r--xen/include/xen/version.h2
24 files changed, 17 insertions, 749 deletions
diff --git a/.rootkeys b/.rootkeys
index 3135b0fd1b..1627c0b36e 100644
--- a/.rootkeys
+++ b/.rootkeys
@@ -424,7 +424,6 @@
3ddb79c3n_UbPuxlkNxvvLycClIkxA xen/include/asm-x86/mpspec.h
3ddb79c2wa0dA_LGigxOelSGbJ284Q xen/include/asm-x86/msr.h
3ddb79c3xjYnrv5t3VqYlR4tNEOl4Q xen/include/asm-x86/page.h
-3e450943kzme29HPCtq5HNOVQkddfw xen/include/asm-x86/param.h
3ddb79c3ysKUbxZuwKBRK3WXU2TlEg xen/include/asm-x86/pci.h
404f1bb41Yl-5ZjIWnG66HDCj6OIWA xen/include/asm-x86/pda.h
4022a73diKn2Ax4-R4gzk59lm1YdDg xen/include/asm-x86/pdb.h
@@ -437,11 +436,8 @@
3ddb79c3NiyQE2vQnyGiaBnNjBO1rA xen/include/asm-x86/spinlock.h
3e7f358aG11EvMI9VJ4_9hD4LUO7rQ xen/include/asm-x86/string.h
3ddb79c3ezddh34MdelJpa5tNR00Dw xen/include/asm-x86/system.h
-3e397e66xPNc8eaSqC9pPbyAtRGzHA xen/include/asm-x86/time.h
-3e450943TfE-iovQIY_tMO_VdGsPhA xen/include/asm-x86/timex.h
3ddb79c4HugMq7IYGxcQKFBpKwKhzA xen/include/asm-x86/types.h
40cf1596saFaHD5DC5zvrSn7CDCWGQ xen/include/asm-x86/uaccess.h
-3ddb79c3uPGcP_l_2xyGgBSWd5aC-Q xen/include/asm-x86/unaligned.h
3ddb79c2ADvRmdexd9y3AYK9_NTx-Q xen/include/asm-x86/x86_32/current.h
3ddb79c3mbqEM7QQr3zVq7NiBNhouA xen/include/asm-x86/x86_32/ptrace.h
3ddb79c3M2n1ROZH6xk3HbyN4CPDqg xen/include/asm-x86/x86_32/uaccess.h
@@ -482,7 +478,6 @@
3ddb79c1NfYlOrWNqgZkj9EwtFfJow xen/include/xen/lib.h
3ddb79c18Ajy7micDGQQfJ0zWgEHtA xen/include/xen/list.h
3ddb79c1gs2VbLbQlw0dcDUXYIepDA xen/include/xen/mm.h
-3ddb79c13p9iHn1XAp0IS1qvj4yDsg xen/include/xen/module.h
3ddb79c1ieLZfGSFwfvvSQ2NK1BMSg xen/include/xen/multiboot.h
3ddb79c2Fg44_PBPVxHSC0gTOMq4Ow xen/include/xen/pci.h
3ddb79c0MOVXq8qZDQRGb6z64_xAwg xen/include/xen/pci_ids.h
@@ -499,10 +494,8 @@
3ddb79c2iIcESrDAB8samy_yAh6olQ xen/include/xen/spinlock.h
3e7f358aMtFMUVvN_Zjg5qvEJIqEBA xen/include/xen/string.h
3ddb79c0BnA20PbgmuMPSGIBljNRQw xen/include/xen/time.h
-3ddb79c2_m8lT9jDKse_tePj7zcnNQ xen/include/xen/timex.h
403a3edbG9K5uZjuY19_LORbQGmFbA xen/include/xen/trace.h
3ddb79c1-kVvF8cVa0k3ZHDdBMj01Q xen/include/xen/types.h
-3e8827bdaqPeZAWGVOwswgY9bWSx4g xen/include/xen/version.h
3ddb79c4x8dvwPtzclghWAKFWpEBFA xen/tools/Makefile
3ddb79c4yGZ7_22QAFFwPzqP4NSHwA xen/tools/elf-reloc.c
3eb3c87fc79FXLA6R9TvdBJNTvQDwA xen/tools/figlet/LICENSE
diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index 476c96926a..b74e358e6a 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -30,7 +30,6 @@
#include <asm/apic.h>
#include <xen/mm.h>
#include <asm/io_apic.h>
-#include <asm/timex.h>
#include <xen/ac_timer.h>
#include <xen/perfc.h>
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 92b90dc282..ba95367129 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -7,7 +7,6 @@
#include <xen/pci.h>
#include <xen/serial.h>
#include <xen/acpi.h>
-#include <xen/module.h>
#include <asm/bitops.h>
#include <asm/smp.h>
#include <asm/processor.h>
diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c
index 043ef7d833..638c1be33b 100644
--- a/xen/common/dom0_ops.c
+++ b/xen/common/dom0_ops.c
@@ -518,7 +518,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
case DOM0_PHYSINFO:
{
extern int phys_proc_id[];
- extern unsigned long cpu_khz;
dom0_physinfo_t *pi = &op->u.physinfo;
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 8ba7f7e3af..59dbaa6c93 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -18,7 +18,6 @@
#include <xen/delay.h>
#include <xen/interrupt.h>
#include <xen/compile.h>
-#include <xen/version.h>
#include <xen/console.h>
#include <xen/serial.h>
#include <xen/shadow.h>
diff --git a/xen/common/memory.c b/xen/common/memory.c
index 9aef0702c1..2dd2c38a43 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -1327,9 +1327,9 @@ void audit_page(unsigned long pfn)
{
unsigned long i;
- cli();
+ __cli();
__audit_page(pfn);
- sti();
+ __sti();
/* add pfn to last_pages cache if is not already present */
for ( i = 0; i < LASTPAGES_SIZE; i++ )
if ( last_pages[i] == pfn )
@@ -1371,7 +1371,7 @@ void audit_all_pages(u_char key, void *dev_id, struct pt_regs *regs)
printk("audit_all_pages\n");
- cli();
+ __cli();
/* walk the frame table */
for ( i = 0; i < max_page; i++ )
@@ -1432,7 +1432,7 @@ void audit_all_pages(u_char key, void *dev_id, struct pt_regs *regs)
}
} /* ref count error */
}
- sti();
+ __sti();
}
diff --git a/xen/common/trace.c b/xen/common/trace.c
index 98da9f692b..878e6af6de 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -17,7 +17,6 @@
*/
#include <xen/config.h>
-#include <asm/timex.h>
#include <asm/types.h>
#include <asm/io.h>
#include <xen/lib.h>
diff --git a/xen/drivers/acpi/acpi_ksyms.c b/xen/drivers/acpi/acpi_ksyms.c
index 3933d4e8aa..4a86156556 100644
--- a/xen/drivers/acpi/acpi_ksyms.c
+++ b/xen/drivers/acpi/acpi_ksyms.c
@@ -23,7 +23,7 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
-#include <xen/module.h>
+#include <xen/config.h>
#include <xen/acpi.h>
#ifdef CONFIG_ACPI_INTERPRETER
diff --git a/xen/drivers/pci/pci.c b/xen/drivers/pci/pci.c
index 4111f2d275..4f8c9e6963 100644
--- a/xen/drivers/pci/pci.c
+++ b/xen/drivers/pci/pci.c
@@ -11,7 +11,6 @@
#include <xen/config.h>
#include <xen/sched.h>
-#include <xen/module.h>
#include <xen/types.h>
#include <xen/pci.h>
#include <xen/init.h>
diff --git a/xen/include/acpi/acpi_bus.h b/xen/include/acpi/acpi_bus.h
index 1469db00f7..50eaf61c0a 100644
--- a/xen/include/acpi/acpi_bus.h
+++ b/xen/include/acpi/acpi_bus.h
@@ -26,12 +26,13 @@
#ifndef __ACPI_BUS_H__
#define __ACPI_BUS_H__
+#if 0
#include <xen/version.h>
-
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,4))
#include <xen/device.h>
#define CONFIG_LDM
#endif
+#endif /* 0 */
#include <acpi/acpi.h>
diff --git a/xen/include/asm-x86/hardirq.h b/xen/include/asm-x86/hardirq.h
index 5b3cb77c91..43a73f73c2 100644
--- a/xen/include/asm-x86/hardirq.h
+++ b/xen/include/asm-x86/hardirq.h
@@ -9,7 +9,6 @@ typedef struct {
unsigned int __softirq_pending;
unsigned int __local_irq_count;
unsigned int __local_bh_count;
- unsigned int __syscall_count;
unsigned int __nmi_count;
unsigned long idle_timestamp;
} ____cacheline_aligned irq_cpustat_t;
@@ -25,68 +24,7 @@ typedef struct {
#define in_irq() (local_irq_count(smp_processor_id()) != 0)
-#ifndef CONFIG_SMP
-
-#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0)
-#define hardirq_endlock(cpu) do { } while (0)
-
#define irq_enter(cpu, irq) (local_irq_count(cpu)++)
#define irq_exit(cpu, irq) (local_irq_count(cpu)--)
-#define synchronize_irq() barrier()
-
-#else
-
-#include <asm/atomic.h>
-#include <asm/smp.h>
-
-extern unsigned char global_irq_holder;
-extern unsigned volatile long global_irq_lock; /* long for set_bit -RR */
-
-static inline int irqs_running (void)
-{
- int i;
-
- for (i = 0; i < smp_num_cpus; i++)
- if (local_irq_count(i))
- return 1;
- return 0;
-}
-
-static inline void release_irqlock(int cpu)
-{
- /* if we didn't own the irq lock, just ignore.. */
- if (global_irq_holder == (unsigned char) cpu) {
- global_irq_holder = NO_PROC_ID;
- clear_bit(0,&global_irq_lock);
- }
-}
-
-static inline void irq_enter(int cpu, int irq)
-{
- ++local_irq_count(cpu);
-
- smp_mb();
-
- while (test_bit(0,&global_irq_lock)) {
- cpu_relax();
- }
-}
-
-static inline void irq_exit(int cpu, int irq)
-{
- --local_irq_count(cpu);
-}
-
-static inline int hardirq_trylock(int cpu)
-{
- return !local_irq_count(cpu) && !test_bit(0,&global_irq_lock);
-}
-
-#define hardirq_endlock(cpu) do { } while (0)
-
-extern void synchronize_irq(void);
-
-#endif /* CONFIG_SMP */
-
#endif /* __ASM_HARDIRQ_H */
diff --git a/xen/include/asm-x86/param.h b/xen/include/asm-x86/param.h
deleted file mode 100644
index efc29a8da2..0000000000
--- a/xen/include/asm-x86/param.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _ASM_PARAM_H
-#define _ASM_PARAM_H
-
-#ifndef HZ
-#define HZ 100
-#endif
-
-#define EXEC_PAGESIZE 4096
-
-#ifndef NGROUPS
-#define NGROUPS 32
-#endif
-
-#ifndef NOGROUP
-#define NOGROUP (-1)
-#endif
-
-#define MAXHOSTNAMELEN 64 /* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC 100 /* frequency at which times() counts */
-#endif
-
-#endif
diff --git a/xen/include/asm-x86/system.h b/xen/include/asm-x86/system.h
index 55f51a839e..b854d1b058 100644
--- a/xen/include/asm-x86/system.h
+++ b/xen/include/asm-x86/system.h
@@ -230,26 +230,6 @@ static inline int local_irq_is_enabled(void)
return !!(flags & (1<<9)); /* EFLAGS_IF */
}
-#ifdef CONFIG_SMP
-
-extern void __global_cli(void);
-extern void __global_sti(void);
-extern unsigned long __global_save_flags(void);
-extern void __global_restore_flags(unsigned long);
-#define cli() __global_cli()
-#define sti() __global_sti()
-#define save_flags(x) ((x)=__global_save_flags())
-#define restore_flags(x) __global_restore_flags(x)
-
-#else
-
-#define cli() __cli()
-#define sti() __sti()
-#define save_flags(x) __save_flags(x)
-#define restore_flags(x) __restore_flags(x)
-
-#endif
-
/*
* disable hlt during certain critical i/o operations
*/
diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h
deleted file mode 100644
index ed3a15bfb2..0000000000
--- a/xen/include/asm-x86/time.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- Mode:C; c-basic-offset:4; tab-width:4 -*-
- ****************************************************************************
- * (C) 2002 - Rolf Neugebauer - Intel Research Cambridge
- ****************************************************************************
- *
- * File: time.h
- * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk)
- *
- * Environment: Xen Hypervisor
- * Description: Architecture dependent definition of time variables
- */
-
-#ifndef _ASM_TIME_H_
-#define _ASM_TIME_H_
-
-#include <asm/types.h>
-#include <asm/msr.h>
-
-typedef s64 s_time_t; /* system time */
-
-#endif /* _ASM_TIME_H_ */
diff --git a/xen/include/asm-x86/timex.h b/xen/include/asm-x86/timex.h
deleted file mode 100644
index 4b0a93fc87..0000000000
--- a/xen/include/asm-x86/timex.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * linux/include/asm-i386/timex.h
- *
- * i386 architecture timex specifications
- */
-#ifndef _ASMi386_TIMEX_H
-#define _ASMi386_TIMEX_H
-
-#include <xen/config.h>
-#include <asm/msr.h>
-
-#ifdef CONFIG_MELAN
-# define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */
-#else
-# define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
-#endif
-
-#define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */
-#define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
- (1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \
- << (SHIFT_SCALE-SHIFT_HZ)) / HZ)
-
-/*
- * Standard way to access the cycle counter on i586+ CPUs.
- * Currently only used on SMP.
- *
- * If you really have a SMP machine with i486 chips or older,
- * compile for that, and this will just always return zero.
- * That's ok, it just means that the nicer scheduling heuristics
- * won't work for you.
- *
- * We only use the low 32 bits, and we'd simply better make sure
- * that we reschedule before that wraps. Scheduling at least every
- * four billion cycles just basically sounds like a good idea,
- * regardless of how fast the machine is.
- */
-typedef unsigned long long cycles_t;
-
-extern cycles_t cacheflush_time;
-
-static inline cycles_t get_cycles (void)
-{
-#ifndef CONFIG_X86_TSC
- return 0;
-#else
- unsigned long long ret;
-
- rdtscll(ret);
- return ret;
-#endif
-}
-
-extern unsigned long cpu_khz;
-
-#define vxtime_lock() do {} while (0)
-#define vxtime_unlock() do {} while (0)
-
-#endif
diff --git a/xen/include/asm-x86/unaligned.h b/xen/include/asm-x86/unaligned.h
deleted file mode 100644
index 08f8ca2d9b..0000000000
--- a/xen/include/asm-x86/unaligned.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef __X86_UNALIGNED_H
-#define __X86_UNALIGNED_H
-
-/*
- * x86 can do unaligned accesses itself.
- *
- * The strange macros are there to make sure these can't
- * be misused in a way that makes them not work on other
- * architectures where unaligned accesses aren't as simple.
- */
-
-/**
- * get_unaligned - get value from possibly mis-aligned location
- * @ptr: pointer to value
- *
- * This macro should be used for accessing values larger in size than
- * single bytes at locations that are expected to be improperly aligned,
- * e.g. retrieving a u16 value from a location not u16-aligned.
- *
- * Note that unaligned accesses can be very expensive on some architectures.
- */
-#define get_unaligned(ptr) (*(ptr))
-
-/**
- * put_unaligned - put value to a possibly mis-aligned location
- * @val: value to place
- * @ptr: pointer to location
- *
- * This macro should be used for placing values larger in size than
- * single bytes at locations that are expected to be improperly aligned,
- * e.g. writing a u16 value to a location not u16-aligned.
- *
- * Note that unaligned accesses can be very expensive on some architectures.
- */
-#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
-
-#endif
diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
index 9af6258200..a24068f7a8 100644
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -9,6 +9,8 @@
#include <asm/config.h>
+#define EXPORT_SYMBOL(var)
+
/* syslog levels ==> nothing! */
#define KERN_NOTICE ""
#define KERN_WARNING ""
diff --git a/xen/include/xen/interrupt.h b/xen/include/xen/interrupt.h
index 25f2272fd7..73545a75f8 100644
--- a/xen/include/xen/interrupt.h
+++ b/xen/include/xen/interrupt.h
@@ -169,53 +169,4 @@ extern void tasklet_kill(struct tasklet_struct *t);
extern void tasklet_init(struct tasklet_struct *t,
void (*func)(unsigned long), unsigned long data);
-#ifdef CONFIG_SMP
-
-#define SMP_TIMER_NAME(name) name##__thr
-
-#define SMP_TIMER_DEFINE(name, task) \
-DECLARE_TASKLET(task, name##__thr, 0); \
-static void name (unsigned long dummy) \
-{ \
- tasklet_schedule(&(task)); \
-}
-
-#else /* CONFIG_SMP */
-
-#define SMP_TIMER_NAME(name) name
-#define SMP_TIMER_DEFINE(name, task)
-
-#endif /* CONFIG_SMP */
-
-/*
- * Autoprobing for irqs:
- *
- * probe_irq_on() and probe_irq_off() provide robust primitives
- * for accurate IRQ probing during kernel initialization. They are
- * reasonably simple to use, are not "fooled" by spurious interrupts,
- * and, unlike other attempts at IRQ probing, they do not get hung on
- * stuck interrupts (such as unused PS2 mouse interfaces on ASUS boards).
- *
- * For reasonably foolproof probing, use them as follows:
- *
- * 1. clear and/or mask the device's internal interrupt.
- * 2. sti();
- * 3. irqs = probe_irq_on(); // "take over" all unassigned idle IRQs
- * 4. enable the device and cause it to trigger an interrupt.
- * 5. wait for the device to interrupt, using non-intrusive polling or a delay.
- * 6. irq = probe_irq_off(irqs); // get IRQ number, 0=none, negative=multiple
- * 7. service the device to clear its pending interrupt.
- * 8. loop again if paranoia is required.
- *
- * probe_irq_on() returns a mask of allocated irq's.
- *
- * probe_irq_off() takes the mask as a parameter,
- * and returns the irq number which occurred,
- * or zero if none occurred, or a negative irq number
- * if more than one irq occurred.
- */
-extern unsigned long probe_irq_on(void); /* returns 0 on failure */
-extern int probe_irq_off(unsigned long); /* returns 0 or negative on failure */
-extern unsigned int probe_irq_mask(unsigned long); /* returns mask of ISA interrupts */
-
#endif
diff --git a/xen/include/xen/irq_cpustat.h b/xen/include/xen/irq_cpustat.h
index 4b34bf53de..e97b02b919 100644
--- a/xen/include/xen/irq_cpustat.h
+++ b/xen/include/xen/irq_cpustat.h
@@ -29,7 +29,6 @@ extern irq_cpustat_t irq_stat[]; /* defined in asm/hardirq.h */
#define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending)
#define local_irq_count(cpu) __IRQ_STAT((cpu), __local_irq_count)
#define local_bh_count(cpu) __IRQ_STAT((cpu), __local_bh_count)
-#define syscall_count(cpu) __IRQ_STAT((cpu), __syscall_count)
#define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count)
#endif /* __irq_cpustat_h */
diff --git a/xen/include/xen/module.h b/xen/include/xen/module.h
deleted file mode 100644
index e8453f5284..0000000000
--- a/xen/include/xen/module.h
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * Dynamic loading of modules into the kernel.
- *
- * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996
- */
-
-#ifndef _LINUX_MODULE_H
-#define _LINUX_MODULE_H
-
-#include <xen/config.h>
-#include <xen/spinlock.h>
-#include <xen/list.h>
-
-#ifdef __GENKSYMS__
-# define _set_ver(sym) sym
-# undef MODVERSIONS
-# define MODVERSIONS
-#else /* ! __GENKSYMS__ */
-# if !defined(MODVERSIONS) && defined(EXPORT_SYMTAB)
-# define _set_ver(sym) sym
-# include <xen/modversions.h>
-# endif
-#endif /* __GENKSYMS__ */
-
-#include <asm/atomic.h>
-
-/* Don't need to bring in all of uaccess.h just for this decl. */
-struct exception_table_entry;
-
-/* Used by get_kernel_syms, which is obsolete. */
-struct kernel_sym
-{
- unsigned long value;
- char name[60]; /* should have been 64-sizeof(long); oh well */
-};
-
-struct module_symbol
-{
- unsigned long value;
- const char *name;
-};
-
-struct module_ref
-{
- struct module *dep; /* "parent" pointer */
- struct module *ref; /* "child" pointer */
- struct module_ref *next_ref;
-};
-
-/* TBD */
-struct module_persist;
-
-struct module
-{
- unsigned long size_of_struct; /* == sizeof(module) */
- struct module *next;
- const char *name;
- unsigned long size;
-
- union
- {
- atomic_t usecount;
- long pad;
- } uc; /* Needs to keep its size - so says rth */
-
- unsigned long flags; /* AUTOCLEAN et al */
-
- unsigned nsyms;
- unsigned ndeps;
-
- struct module_symbol *syms;
- struct module_ref *deps;
- struct module_ref *refs;
- int (*init)(void);
- void (*cleanup)(void);
- const struct exception_table_entry *ex_table_start;
- const struct exception_table_entry *ex_table_end;
-#ifdef __alpha__
- unsigned long gp;
-#endif
- /* Members past this point are extensions to the basic
- module support and are optional. Use mod_member_present()
- to examine them. */
- const struct module_persist *persist_start;
- const struct module_persist *persist_end;
- int (*can_unload)(void);
- int runsize; /* In modutils, not currently used */
- const char *kallsyms_start; /* All symbols for kernel debugging */
- const char *kallsyms_end;
- const char *archdata_start; /* arch specific data for module */
- const char *archdata_end;
- const char *kernel_data; /* Reserved for kernel internal use */
-};
-
-struct module_info
-{
- unsigned long addr;
- unsigned long size;
- unsigned long flags;
- long usecount;
-};
-
-/* Bits of module.flags. */
-
-#define MOD_UNINITIALIZED 0
-#define MOD_RUNNING 1
-#define MOD_DELETED 2
-#define MOD_AUTOCLEAN 4
-#define MOD_VISITED 8
-#define MOD_USED_ONCE 16
-#define MOD_JUST_FREED 32
-#define MOD_INITIALIZING 64
-
-/* Values for query_module's which. */
-
-#define QM_MODULES 1
-#define QM_DEPS 2
-#define QM_REFS 3
-#define QM_SYMBOLS 4
-#define QM_INFO 5
-
-/* Can the module be queried? */
-#define MOD_CAN_QUERY(mod) (((mod)->flags & (MOD_RUNNING | MOD_INITIALIZING)) && !((mod)->flags & MOD_DELETED))
-
-/* When struct module is extended, we must test whether the new member
- is present in the header received from insmod before we can use it.
- This function returns true if the member is present. */
-
-#define mod_member_present(mod,member) \
- ((unsigned long)(&((struct module *)0L)->member + 1) \
- <= (mod)->size_of_struct)
-
-/*
- * Ditto for archdata. Assumes mod->archdata_start and mod->archdata_end
- * are validated elsewhere.
- */
-#define mod_archdata_member_present(mod, type, member) \
- (((unsigned long)(&((type *)0L)->member) + \
- sizeof(((type *)0L)->member)) <= \
- ((mod)->archdata_end - (mod)->archdata_start))
-
-
-/* Check if an address p with number of entries n is within the body of module m */
-#define mod_bound(p, n, m) ((unsigned long)(p) >= ((unsigned long)(m) + ((m)->size_of_struct)) && \
- (unsigned long)((p)+(n)) <= (unsigned long)(m) + (m)->size)
-
-/* Backwards compatibility definition. */
-
-#define GET_USE_COUNT(module) (atomic_read(&(module)->uc.usecount))
-
-/* Poke the use count of a module. */
-
-#define __MOD_INC_USE_COUNT(mod) \
- (atomic_inc(&(mod)->uc.usecount), (mod)->flags |= MOD_VISITED|MOD_USED_ONCE)
-#define __MOD_DEC_USE_COUNT(mod) \
- (atomic_dec(&(mod)->uc.usecount), (mod)->flags |= MOD_VISITED)
-#define __MOD_IN_USE(mod) \
- (mod_member_present((mod), can_unload) && (mod)->can_unload \
- ? (mod)->can_unload() : atomic_read(&(mod)->uc.usecount))
-
-/* Indirect stringification. */
-
-#define __MODULE_STRING_1(x) #x
-#define __MODULE_STRING(x) __MODULE_STRING_1(x)
-
-/* Generic inter module communication.
- *
- * NOTE: This interface is intended for small amounts of data that are
- * passed between two objects and either or both of the objects
- * might be compiled as modules. Do not over use this interface.
- *
- * If more than two objects need to communicate then you probably
- * need a specific interface instead of abusing this generic
- * interface. If both objects are *always* built into the kernel
- * then a global extern variable is good enough, you do not need
- * this interface.
- *
- * Keith Owens <kaos@ocs.com.au> 28 Oct 2000.
- */
-
-#ifdef __KERNEL__
-#define HAVE_INTER_MODULE
-extern void inter_module_register(const char *, struct module *, const void *);
-extern void inter_module_unregister(const char *);
-extern const void *inter_module_get(const char *);
-extern const void *inter_module_get_request(const char *, const char *);
-extern void inter_module_put(const char *);
-
-struct inter_module_entry {
- struct list_head list;
- const char *im_name;
- struct module *owner;
- const void *userdata;
-};
-
-#if 0
-extern int try_inc_mod_count(struct module *mod);
-#else
-static inline int try_inc_mod_count(struct module * mod)
-{
- if ( mod ) __MOD_INC_USE_COUNT(mod);
- return 1;
-}
-#endif
-#endif /* __KERNEL__ */
-
-#if defined(MODULE) && !defined(__GENKSYMS__)
-
-/* Embedded module documentation macros. */
-
-/* For documentation purposes only. */
-
-#define MODULE_AUTHOR(name) \
-const char __module_author[] __attribute__((section(".modinfo"))) = \
-"author=" name
-
-#define MODULE_DESCRIPTION(desc) \
-const char __module_description[] __attribute__((section(".modinfo"))) = \
-"description=" desc
-
-/* Could potentially be used by kmod... */
-
-#define MODULE_SUPPORTED_DEVICE(dev) \
-const char __module_device[] __attribute__((section(".modinfo"))) = \
-"device=" dev
-
-/* Used to verify parameters given to the module. The TYPE arg should
- be a string in the following format:
- [min[-max]]{b,h,i,l,s}
- The MIN and MAX specifiers delimit the length of the array. If MAX
- is omitted, it defaults to MIN; if both are omitted, the default is 1.
- The final character is a type specifier:
- b byte
- h short
- i int
- l long
- s string
-*/
-
-#define MODULE_PARM(var,type) \
-const char __module_parm_##var[] \
-__attribute__((section(".modinfo"))) = \
-"parm_" __MODULE_STRING(var) "=" type
-
-#define MODULE_PARM_DESC(var,desc) \
-const char __module_parm_desc_##var[] \
-__attribute__((section(".modinfo"))) = \
-"parm_desc_" __MODULE_STRING(var) "=" desc
-
-/*
- * MODULE_DEVICE_TABLE exports information about devices
- * currently supported by this module. A device type, such as PCI,
- * is a C-like identifier passed as the first arg to this macro.
- * The second macro arg is the variable containing the device
- * information being made public.
- *
- * The following is a list of known device types (arg 1),
- * and the C types which are to be passed as arg 2.
- * pci - struct pci_device_id - List of PCI ids supported by this module
- * isapnp - struct isapnp_device_id - List of ISA PnP ids supported by this module
- * usb - struct usb_device_id - List of USB ids supported by this module
- */
-#define MODULE_GENERIC_TABLE(gtype,name) \
-static const unsigned long __module_##gtype##_size \
- __attribute__ ((unused)) = sizeof(struct gtype##_id); \
-static const struct gtype##_id * __module_##gtype##_table \
- __attribute__ ((unused)) = name
-
-/*
- * The following license idents are currently accepted as indicating free
- * software modules
- *
- * "GPL" [GNU Public License v2 or later]
- * "GPL and additional rights" [GNU Public License v2 rights and more]
- * "Dual BSD/GPL" [GNU Public License v2 or BSD license choice]
- * "Dual MPL/GPL" [GNU Public License v2 or Mozilla license choice]
- *
- * The following other idents are available
- *
- * "Proprietary" [Non free products]
- *
- * There are dual licensed components, but when running with Linux it is the
- * GPL that is relevant so this is a non issue. Similarly LGPL linked with GPL
- * is a GPL combined work.
- *
- * This exists for several reasons
- * 1. So modinfo can show license info for users wanting to vet their setup
- * is free
- * 2. So the community can ignore bug reports including proprietary modules
- * 3. So vendors can do likewise based on their own policies
- */
-
-#define MODULE_LICENSE(license) \
-static const char __module_license[] __attribute__((section(".modinfo"))) = \
-"license=" license
-
-/* Define the module variable, and usage macros. */
-extern struct module __this_module;
-
-#define THIS_MODULE (&__this_module)
-#define MOD_INC_USE_COUNT __MOD_INC_USE_COUNT(THIS_MODULE)
-#define MOD_DEC_USE_COUNT __MOD_DEC_USE_COUNT(THIS_MODULE)
-#define MOD_IN_USE __MOD_IN_USE(THIS_MODULE)
-
-#if 0
-#include <xen/version.h>
-static const char __module_kernel_version[] __attribute__((section(".modinfo"))) =
-"kernel_version=" UTS_RELEASE;
-#ifdef MODVERSIONS
-static const char __module_using_checksums[] __attribute__((section(".modinfo"))) =
-"using_checksums=1";
-#endif
-#endif
-
-#else /* MODULE */
-
-#define MODULE_AUTHOR(name)
-#define MODULE_LICENSE(license)
-#define MODULE_DESCRIPTION(desc)
-#define MODULE_SUPPORTED_DEVICE(name)
-#define MODULE_PARM(var,type)
-#define MODULE_PARM_DESC(var,desc)
-
-/* Create a dummy reference to the table to suppress gcc unused warnings. Put
- * the reference in the .data.exit section which is discarded when code is built
- * in, so the reference does not bloat the running kernel. Note: cannot be
- * const, other exit data may be writable.
- */
-#define MODULE_GENERIC_TABLE(gtype,name) \
-static const struct gtype##_id * __module_##gtype##_table \
- __attribute__ ((unused, __section__(".data.exit"))) = name
-
-#ifndef __GENKSYMS__
-
-#define THIS_MODULE NULL
-#define MOD_INC_USE_COUNT do { } while (0)
-#define MOD_DEC_USE_COUNT do { } while (0)
-#define MOD_IN_USE 1
-
-extern struct module *module_list;
-
-#endif /* !__GENKSYMS__ */
-
-#endif /* MODULE */
-
-#define MODULE_DEVICE_TABLE(type,name) \
- MODULE_GENERIC_TABLE(type##_device,name)
-
-/* Export a symbol either from the kernel or a module.
-
- In the kernel, the symbol is added to the kernel's global symbol table.
-
- In a module, it controls which variables are exported. If no
- variables are explicitly exported, the action is controled by the
- insmod -[xX] flags. Otherwise, only the variables listed are exported.
- This obviates the need for the old register_symtab() function. */
-
-#if defined(__GENKSYMS__)
-
-/* We want the EXPORT_SYMBOL tag left intact for recognition. */
-
-#elif !defined(CONFIG_MODULES)
-
-#define __EXPORT_SYMBOL(sym,str)
-#define EXPORT_SYMBOL(var)
-#define EXPORT_SYMBOL_NOVERS(var)
-#define EXPORT_SYMBOL_GPL(var)
-
-#elif !defined(EXPORT_SYMTAB)
-
-#define __EXPORT_SYMBOL(sym,str) error this_object_must_be_defined_as_export_objs_in_the_Makefile
-#define EXPORT_SYMBOL(var) error this_object_must_be_defined_as_export_objs_in_the_Makefile
-#define EXPORT_SYMBOL_NOVERS(var) error this_object_must_be_defined_as_export_objs_in_the_Makefile
-#define EXPORT_SYMBOL_GPL(var) error this_object_must_be_defined_as_export_objs_in_the_Makefile
-
-#else
-
-#define __EXPORT_SYMBOL(sym, str) \
-const char __kstrtab_##sym[] \
-__attribute__((section(".kstrtab"))) = str; \
-const struct module_symbol __ksymtab_##sym \
-__attribute__((section("__ksymtab"))) = \
-{ (unsigned long)&sym, __kstrtab_##sym }
-
-#define __EXPORT_SYMBOL_GPL(sym, str) \
-const char __kstrtab_##sym[] \
-__attribute__((section(".kstrtab"))) = "GPLONLY_" str; \
-const struct module_symbol __ksymtab_##sym \
-__attribute__((section("__ksymtab"))) = \
-{ (unsigned long)&sym, __kstrtab_##sym }
-
-#if defined(MODVERSIONS) || !defined(CONFIG_MODVERSIONS)
-#define EXPORT_SYMBOL(var) __EXPORT_SYMBOL(var, __MODULE_STRING(var))
-#define EXPORT_SYMBOL_GPL(var) __EXPORT_SYMBOL_GPL(var, __MODULE_STRING(var))
-#else
-#define EXPORT_SYMBOL(var) __EXPORT_SYMBOL(var, __MODULE_STRING(__VERSIONED_SYMBOL(var)))
-#define EXPORT_SYMBOL_GPL(var) __EXPORT_SYMBOL(var, __MODULE_STRING(__VERSIONED_SYMBOL(var)))
-#endif
-
-#define EXPORT_SYMBOL_NOVERS(var) __EXPORT_SYMBOL(var, __MODULE_STRING(var))
-
-#endif /* __GENKSYMS__ */
-
-#ifdef MODULE
-/* Force a module to export no symbols. */
-#define EXPORT_NO_SYMBOLS __asm__(".section __ksymtab\n.previous")
-#else
-#define EXPORT_NO_SYMBOLS
-#endif /* MODULE */
-
-#ifdef CONFIG_MODULES
-#define SET_MODULE_OWNER(some_struct) do { (some_struct)->owner = THIS_MODULE; } while (0)
-#else
-#define SET_MODULE_OWNER(some_struct) do { } while (0)
-#endif
-
-#endif /* _LINUX_MODULE_H */
diff --git a/xen/include/xen/slab.h b/xen/include/xen/slab.h
index ea40a13b6f..5e1feb2a85 100644
--- a/xen/include/xen/slab.h
+++ b/xen/include/xen/slab.h
@@ -1,25 +1,19 @@
/*
- * linux/mm/slab.h
* Written by Mark Hemment, 1996.
* (markhe@nextd.demon.co.uk)
*/
-#if !defined(_LINUX_SLAB_H)
-#define _LINUX_SLAB_H
+#ifndef __SLAB_H__
+#define __SLAB_H__
typedef struct kmem_cache_s kmem_cache_t;
-#include <xen/mm.h>
-#include <xen/cache.h>
+#include <xen/mm.h>
+#include <xen/cache.h>
/* flags for kmem_cache_alloc() */
-#define SLAB_NOFS GFP_NOFS
-#define SLAB_NOIO GFP_NOIO
-#define SLAB_NOHIGHIO GFP_NOHIGHIO
#define SLAB_ATOMIC GFP_ATOMIC
-#define SLAB_USER GFP_USER
#define SLAB_KERNEL GFP_KERNEL
-#define SLAB_NFS GFP_NFS
#define SLAB_DMA GFP_DMA
#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_HIGHIO|__GFP_FS)
@@ -29,7 +23,6 @@ typedef struct kmem_cache_s kmem_cache_t;
* The first 3 are only valid when the allocator as been build
* SLAB_DEBUG_SUPPORT.
*/
-#define SLAB_DEBUG_FREE 0x00000100UL /* Peform (expensive) checks on free */
#define SLAB_DEBUG_INITIAL 0x00000200UL /* Call constructor (as verifier) */
#define SLAB_RED_ZONE 0x00000400UL /* Red zone objs in a cache */
#define SLAB_POISON 0x00000800UL /* Poison objects */
@@ -62,23 +55,4 @@ extern int FASTCALL(kmem_cache_reap(int));
extern void dump_slabinfo();
-#if 0
-extern int slabinfo_read_proc(char *page, char **start, off_t off,
- int count, int *eof, void *data);
-extern int slabinfo_write_proc(struct file *file, const char *buffer,
- unsigned long count, void *data);
-#endif
-
-/* System wide caches */
-extern kmem_cache_t *vm_area_cachep;
-extern kmem_cache_t *mm_cachep;
-extern kmem_cache_t *names_cachep;
-extern kmem_cache_t *files_cachep;
-extern kmem_cache_t *filp_cachep;
-extern kmem_cache_t *dquot_cachep;
-extern kmem_cache_t *bh_cachep;
-extern kmem_cache_t *fs_cachep;
-extern kmem_cache_t *sigact_cachep;
-
-
-#endif /* _LINUX_SLAB_H */
+#endif /* __SLAB_H__ */
diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h
index e73d43805e..79ddb92309 100644
--- a/xen/include/xen/time.h
+++ b/xen/include/xen/time.h
@@ -27,12 +27,12 @@
#ifndef __XEN_TIME_H__
#define __XEN_TIME_H__
-#include <asm/time.h> /* pull in architecture specific time definition */
#include <xen/types.h>
#include <hypervisor-ifs/hypervisor-if.h>
extern int init_xen_time();
+extern unsigned long cpu_khz;
/*
* System Time
@@ -43,6 +43,8 @@ extern int init_xen_time();
* of real time into system time
*/
+typedef s64 s_time_t;
+
s_time_t get_s_time(void);
#define NOW() ((s_time_t)get_s_time())
diff --git a/xen/include/xen/timex.h b/xen/include/xen/timex.h
deleted file mode 100644
index f81a160024..0000000000
--- a/xen/include/xen/timex.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _LINUX_TIMEX_H
-#define _LINUX_TIMEX_H
-
-#include <asm/param.h>
-#include <asm/timex.h>
-
-#endif /* LINUX_TIMEX_H */
diff --git a/xen/include/xen/version.h b/xen/include/xen/version.h
deleted file mode 100644
index a0bbfa972f..0000000000
--- a/xen/include/xen/version.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#define LINUX_VERSION_CODE KERNEL_VERSION(2,4,21)