ia64/xen-unstable

changeset 8914:a2bb5a3242a1

[IA64] another one to remove unused linux files within xen/ia64

This patch is to remove more unused linux files inside xen and also some
duplicated ones, like slab.h and cpumask.h. This should help reduce
duplicated definitions conflicting with xen's.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
author awilliam@xenbuild.aw
date Fri Feb 24 10:50:27 2006 -0700 (2006-02-24)
parents b7e2628695e3
children d44e8ace51a3
files xen/include/asm-ia64/config.h xen/include/asm-ia64/domain.h xen/include/asm-ia64/linux-null/linux/slab.h xen/include/asm-ia64/linux-xen/linux/README.origin xen/include/asm-ia64/linux-xen/linux/cpumask.h xen/include/asm-ia64/linux/README.origin xen/include/asm-ia64/linux/slab.h
line diff
     1.1 --- a/xen/include/asm-ia64/config.h	Fri Feb 24 10:32:27 2006 -0700
     1.2 +++ b/xen/include/asm-ia64/config.h	Fri Feb 24 10:50:27 2006 -0700
     1.3 @@ -211,6 +211,9 @@ void sort_main_extable(void);
     1.4  
     1.5  // see include/asm-ia64/mm.h, handle remaining page_info uses until gone
     1.6  #define page_info page
     1.7 +// Deprivated linux inf and put here for short time compatibility
     1.8 +#define kmalloc(s, t) xmalloc_bytes((s))
     1.9 +#define kfree(s) xfree((s))
    1.10  
    1.11  // see common/keyhandler.c
    1.12  #define	nop()	asm volatile ("nop 0")
     2.1 --- a/xen/include/asm-ia64/domain.h	Fri Feb 24 10:32:27 2006 -0700
     2.2 +++ b/xen/include/asm-ia64/domain.h	Fri Feb 24 10:50:27 2006 -0700
     2.3 @@ -9,6 +9,7 @@
     2.4  #include <public/arch-ia64.h>
     2.5  #include <asm/vmx_platform.h>
     2.6  #include <xen/list.h>
     2.7 +#include <xen/cpumask.h>
     2.8  
     2.9  extern void domain_relinquish_resources(struct domain *);
    2.10  
     4.1 --- a/xen/include/asm-ia64/linux-xen/linux/README.origin	Fri Feb 24 10:32:27 2006 -0700
     4.2 +++ b/xen/include/asm-ia64/linux-xen/linux/README.origin	Fri Feb 24 10:50:27 2006 -0700
     4.3 @@ -5,7 +5,6 @@
     4.4  # (e.g. with #ifdef XEN or XEN in a comment) so that they can be
     4.5  # easily updated to future versions of the corresponding Linux files.
     4.6  
     4.7 -cpumask.h 		-> linux/include/linux/cpumask.h
     4.8  gfp.h	 		-> linux/include/linux/gfp.h
     4.9  hardirq.h 		-> linux/include/linux/hardirq.h
    4.10  interrupt.h 		-> linux/include/linux/interrupt.h
     5.1 --- a/xen/include/asm-ia64/linux-xen/linux/cpumask.h	Fri Feb 24 10:32:27 2006 -0700
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,397 +0,0 @@
     5.4 -#ifndef __LINUX_CPUMASK_H
     5.5 -#define __LINUX_CPUMASK_H
     5.6 -
     5.7 -/*
     5.8 - * Cpumasks provide a bitmap suitable for representing the
     5.9 - * set of CPU's in a system, one bit position per CPU number.
    5.10 - *
    5.11 - * See detailed comments in the file linux/bitmap.h describing the
    5.12 - * data type on which these cpumasks are based.
    5.13 - *
    5.14 - * For details of cpumask_scnprintf() and cpumask_parse(),
    5.15 - * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c.
    5.16 - * For details of cpulist_scnprintf() and cpulist_parse(), see
    5.17 - * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c.
    5.18 - *
    5.19 - * The available cpumask operations are:
    5.20 - *
    5.21 - * void cpu_set(cpu, mask)		turn on bit 'cpu' in mask
    5.22 - * void cpu_clear(cpu, mask)		turn off bit 'cpu' in mask
    5.23 - * void cpus_setall(mask)		set all bits
    5.24 - * void cpus_clear(mask)		clear all bits
    5.25 - * int cpu_isset(cpu, mask)		true iff bit 'cpu' set in mask
    5.26 - * int cpu_test_and_set(cpu, mask)	test and set bit 'cpu' in mask
    5.27 - *
    5.28 - * void cpus_and(dst, src1, src2)	dst = src1 & src2  [intersection]
    5.29 - * void cpus_or(dst, src1, src2)	dst = src1 | src2  [union]
    5.30 - * void cpus_xor(dst, src1, src2)	dst = src1 ^ src2
    5.31 - * void cpus_andnot(dst, src1, src2)	dst = src1 & ~src2
    5.32 - * void cpus_complement(dst, src)	dst = ~src
    5.33 - *
    5.34 - * int cpus_equal(mask1, mask2)		Does mask1 == mask2?
    5.35 - * int cpus_intersects(mask1, mask2)	Do mask1 and mask2 intersect?
    5.36 - * int cpus_subset(mask1, mask2)	Is mask1 a subset of mask2?
    5.37 - * int cpus_empty(mask)			Is mask empty (no bits sets)?
    5.38 - * int cpus_full(mask)			Is mask full (all bits sets)?
    5.39 - * int cpus_weight(mask)		Hamming weigh - number of set bits
    5.40 - *
    5.41 - * void cpus_shift_right(dst, src, n)	Shift right
    5.42 - * void cpus_shift_left(dst, src, n)	Shift left
    5.43 - *
    5.44 - * int first_cpu(mask)			Number lowest set bit, or NR_CPUS
    5.45 - * int next_cpu(cpu, mask)		Next cpu past 'cpu', or NR_CPUS
    5.46 - *
    5.47 - * cpumask_t cpumask_of_cpu(cpu)	Return cpumask with bit 'cpu' set
    5.48 - * CPU_MASK_ALL				Initializer - all bits set
    5.49 - * CPU_MASK_NONE			Initializer - no bits set
    5.50 - * unsigned long *cpus_addr(mask)	Array of unsigned long's in mask
    5.51 - *
    5.52 - * int cpumask_scnprintf(buf, len, mask) Format cpumask for printing
    5.53 - * int cpumask_parse(ubuf, ulen, mask)	Parse ascii string as cpumask
    5.54 - * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing
    5.55 - * int cpulist_parse(buf, map)		Parse ascii string as cpulist
    5.56 - *
    5.57 - * for_each_cpu_mask(cpu, mask)		for-loop cpu over mask
    5.58 - *
    5.59 - * int num_online_cpus()		Number of online CPUs
    5.60 - * int num_possible_cpus()		Number of all possible CPUs
    5.61 - * int num_present_cpus()		Number of present CPUs
    5.62 - *
    5.63 - * int cpu_online(cpu)			Is some cpu online?
    5.64 - * int cpu_possible(cpu)		Is some cpu possible?
    5.65 - * int cpu_present(cpu)			Is some cpu present (can schedule)?
    5.66 - *
    5.67 - * int any_online_cpu(mask)		First online cpu in mask
    5.68 - *
    5.69 - * for_each_cpu(cpu)			for-loop cpu over cpu_possible_map
    5.70 - * for_each_online_cpu(cpu)		for-loop cpu over cpu_online_map
    5.71 - * for_each_present_cpu(cpu)		for-loop cpu over cpu_present_map
    5.72 - *
    5.73 - * Subtlety:
    5.74 - * 1) The 'type-checked' form of cpu_isset() causes gcc (3.3.2, anyway)
    5.75 - *    to generate slightly worse code.  Note for example the additional
    5.76 - *    40 lines of assembly code compiling the "for each possible cpu"
    5.77 - *    loops buried in the disk_stat_read() macros calls when compiling
    5.78 - *    drivers/block/genhd.c (arch i386, CONFIG_SMP=y).  So use a simple
    5.79 - *    one-line #define for cpu_isset(), instead of wrapping an inline
    5.80 - *    inside a macro, the way we do the other calls.
    5.81 - */
    5.82 -
    5.83 -#include <linux/kernel.h>
    5.84 -#include <linux/threads.h>
    5.85 -#include <linux/bitmap.h>
    5.86 -#include <asm/bug.h>
    5.87 -
    5.88 -typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
    5.89 -extern cpumask_t _unused_cpumask_arg_;
    5.90 -
    5.91 -#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
    5.92 -static inline void __cpu_set(int cpu, volatile cpumask_t *dstp)
    5.93 -{
    5.94 -	set_bit(cpu, dstp->bits);
    5.95 -}
    5.96 -
    5.97 -#define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst))
    5.98 -static inline void __cpu_clear(int cpu, volatile cpumask_t *dstp)
    5.99 -{
   5.100 -	clear_bit(cpu, dstp->bits);
   5.101 -}
   5.102 -
   5.103 -#define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS)
   5.104 -static inline void __cpus_setall(cpumask_t *dstp, int nbits)
   5.105 -{
   5.106 -	bitmap_fill(dstp->bits, nbits);
   5.107 -}
   5.108 -
   5.109 -#define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS)
   5.110 -static inline void __cpus_clear(cpumask_t *dstp, int nbits)
   5.111 -{
   5.112 -	bitmap_zero(dstp->bits, nbits);
   5.113 -}
   5.114 -
   5.115 -/* No static inline type checking - see Subtlety (1) above. */
   5.116 -#define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits)
   5.117 -
   5.118 -#define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask))
   5.119 -static inline int __cpu_test_and_set(int cpu, cpumask_t *addr)
   5.120 -{
   5.121 -	return test_and_set_bit(cpu, addr->bits);
   5.122 -}
   5.123 -
   5.124 -#define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS)
   5.125 -static inline void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
   5.126 -					const cpumask_t *src2p, int nbits)
   5.127 -{
   5.128 -	bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
   5.129 -}
   5.130 -
   5.131 -#define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS)
   5.132 -static inline void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
   5.133 -					const cpumask_t *src2p, int nbits)
   5.134 -{
   5.135 -	bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
   5.136 -}
   5.137 -
   5.138 -#define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS)
   5.139 -static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
   5.140 -					const cpumask_t *src2p, int nbits)
   5.141 -{
   5.142 -	bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
   5.143 -}
   5.144 -
   5.145 -#define cpus_andnot(dst, src1, src2) \
   5.146 -				__cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS)
   5.147 -static inline void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
   5.148 -					const cpumask_t *src2p, int nbits)
   5.149 -{
   5.150 -	bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
   5.151 -}
   5.152 -
   5.153 -#define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS)
   5.154 -static inline void __cpus_complement(cpumask_t *dstp,
   5.155 -					const cpumask_t *srcp, int nbits)
   5.156 -{
   5.157 -	bitmap_complement(dstp->bits, srcp->bits, nbits);
   5.158 -}
   5.159 -
   5.160 -#define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS)
   5.161 -static inline int __cpus_equal(const cpumask_t *src1p,
   5.162 -					const cpumask_t *src2p, int nbits)
   5.163 -{
   5.164 -	return bitmap_equal(src1p->bits, src2p->bits, nbits);
   5.165 -}
   5.166 -
   5.167 -#define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS)
   5.168 -static inline int __cpus_intersects(const cpumask_t *src1p,
   5.169 -					const cpumask_t *src2p, int nbits)
   5.170 -{
   5.171 -	return bitmap_intersects(src1p->bits, src2p->bits, nbits);
   5.172 -}
   5.173 -
   5.174 -#define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS)
   5.175 -static inline int __cpus_subset(const cpumask_t *src1p,
   5.176 -					const cpumask_t *src2p, int nbits)
   5.177 -{
   5.178 -	return bitmap_subset(src1p->bits, src2p->bits, nbits);
   5.179 -}
   5.180 -
   5.181 -#define cpus_empty(src) __cpus_empty(&(src), NR_CPUS)
   5.182 -static inline int __cpus_empty(const cpumask_t *srcp, int nbits)
   5.183 -{
   5.184 -	return bitmap_empty(srcp->bits, nbits);
   5.185 -}
   5.186 -
   5.187 -#define cpus_full(cpumask) __cpus_full(&(cpumask), NR_CPUS)
   5.188 -static inline int __cpus_full(const cpumask_t *srcp, int nbits)
   5.189 -{
   5.190 -	return bitmap_full(srcp->bits, nbits);
   5.191 -}
   5.192 -
   5.193 -#define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS)
   5.194 -static inline int __cpus_weight(const cpumask_t *srcp, int nbits)
   5.195 -{
   5.196 -	return bitmap_weight(srcp->bits, nbits);
   5.197 -}
   5.198 -
   5.199 -#define cpus_shift_right(dst, src, n) \
   5.200 -			__cpus_shift_right(&(dst), &(src), (n), NR_CPUS)
   5.201 -static inline void __cpus_shift_right(cpumask_t *dstp,
   5.202 -					const cpumask_t *srcp, int n, int nbits)
   5.203 -{
   5.204 -	bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
   5.205 -}
   5.206 -
   5.207 -#define cpus_shift_left(dst, src, n) \
   5.208 -			__cpus_shift_left(&(dst), &(src), (n), NR_CPUS)
   5.209 -static inline void __cpus_shift_left(cpumask_t *dstp,
   5.210 -					const cpumask_t *srcp, int n, int nbits)
   5.211 -{
   5.212 -	bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
   5.213 -}
   5.214 -
   5.215 -#define first_cpu(src) __first_cpu(&(src), NR_CPUS)
   5.216 -static inline int __first_cpu(const cpumask_t *srcp, int nbits)
   5.217 -{
   5.218 -	return min_t(int, nbits, find_first_bit(srcp->bits, nbits));
   5.219 -}
   5.220 -
   5.221 -#define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS)
   5.222 -static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits)
   5.223 -{
   5.224 -	return min_t(int, nbits, find_next_bit(srcp->bits, nbits, n+1));
   5.225 -}
   5.226 -
   5.227 -#define cpumask_of_cpu(cpu)						\
   5.228 -({									\
   5.229 -	typeof(_unused_cpumask_arg_) m;					\
   5.230 -	if (sizeof(m) == sizeof(unsigned long)) {			\
   5.231 -		m.bits[0] = 1UL<<(cpu);					\
   5.232 -	} else {							\
   5.233 -		cpus_clear(m);						\
   5.234 -		cpu_set((cpu), m);					\
   5.235 -	}								\
   5.236 -	m;								\
   5.237 -})
   5.238 -
   5.239 -#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
   5.240 -
   5.241 -#if NR_CPUS <= BITS_PER_LONG
   5.242 -
   5.243 -#define CPU_MASK_ALL							\
   5.244 -(cpumask_t) { {								\
   5.245 -	[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD			\
   5.246 -} }
   5.247 -
   5.248 -#else
   5.249 -
   5.250 -#define CPU_MASK_ALL							\
   5.251 -(cpumask_t) { {								\
   5.252 -	[0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL,			\
   5.253 -	[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD			\
   5.254 -} }
   5.255 -
   5.256 -#endif
   5.257 -
   5.258 -#define CPU_MASK_NONE							\
   5.259 -(cpumask_t) { {								\
   5.260 -	[0 ... BITS_TO_LONGS(NR_CPUS)-1] =  0UL				\
   5.261 -} }
   5.262 -
   5.263 -#define CPU_MASK_CPU0							\
   5.264 -(cpumask_t) { {								\
   5.265 -	[0] =  1UL							\
   5.266 -} }
   5.267 -
   5.268 -#define cpus_addr(src) ((src).bits)
   5.269 -
   5.270 -#define cpumask_scnprintf(buf, len, src) \
   5.271 -			__cpumask_scnprintf((buf), (len), &(src), NR_CPUS)
   5.272 -static inline int __cpumask_scnprintf(char *buf, int len,
   5.273 -					const cpumask_t *srcp, int nbits)
   5.274 -{
   5.275 -	return bitmap_scnprintf(buf, len, srcp->bits, nbits);
   5.276 -}
   5.277 -
   5.278 -#define cpumask_parse(ubuf, ulen, dst) \
   5.279 -			__cpumask_parse((ubuf), (ulen), &(dst), NR_CPUS)
   5.280 -static inline int __cpumask_parse(const char __user *buf, int len,
   5.281 -					cpumask_t *dstp, int nbits)
   5.282 -{
   5.283 -	return bitmap_parse(buf, len, dstp->bits, nbits);
   5.284 -}
   5.285 -
   5.286 -#define cpulist_scnprintf(buf, len, src) \
   5.287 -			__cpulist_scnprintf((buf), (len), &(src), NR_CPUS)
   5.288 -static inline int __cpulist_scnprintf(char *buf, int len,
   5.289 -					const cpumask_t *srcp, int nbits)
   5.290 -{
   5.291 -	return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
   5.292 -}
   5.293 -
   5.294 -#define cpulist_parse(buf, dst) __cpulist_parse((buf), &(dst), NR_CPUS)
   5.295 -static inline int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
   5.296 -{
   5.297 -	return bitmap_parselist(buf, dstp->bits, nbits);
   5.298 -}
   5.299 -
   5.300 -#if NR_CPUS > 1
   5.301 -#define for_each_cpu_mask(cpu, mask)		\
   5.302 -	for ((cpu) = first_cpu(mask);		\
   5.303 -		(cpu) < NR_CPUS;		\
   5.304 -		(cpu) = next_cpu((cpu), (mask)))
   5.305 -#else /* NR_CPUS == 1 */
   5.306 -#define for_each_cpu_mask(cpu, mask) for ((cpu) = 0; (cpu) < 1; (cpu)++)
   5.307 -#endif /* NR_CPUS */
   5.308 -
   5.309 -/*
   5.310 - * The following particular system cpumasks and operations manage
   5.311 - * possible, present and online cpus.  Each of them is a fixed size
   5.312 - * bitmap of size NR_CPUS.
   5.313 - *
   5.314 - *  #ifdef CONFIG_HOTPLUG_CPU
   5.315 - *     cpu_possible_map - all NR_CPUS bits set
   5.316 - *     cpu_present_map  - has bit 'cpu' set iff cpu is populated
   5.317 - *     cpu_online_map   - has bit 'cpu' set iff cpu available to scheduler
   5.318 - *  #else
   5.319 - *     cpu_possible_map - has bit 'cpu' set iff cpu is populated
   5.320 - *     cpu_present_map  - copy of cpu_possible_map
   5.321 - *     cpu_online_map   - has bit 'cpu' set iff cpu available to scheduler
   5.322 - *  #endif
   5.323 - *
   5.324 - *  In either case, NR_CPUS is fixed at compile time, as the static
   5.325 - *  size of these bitmaps.  The cpu_possible_map is fixed at boot
   5.326 - *  time, as the set of CPU id's that it is possible might ever
   5.327 - *  be plugged in at anytime during the life of that system boot.
   5.328 - *  The cpu_present_map is dynamic(*), representing which CPUs
   5.329 - *  are currently plugged in.  And cpu_online_map is the dynamic
   5.330 - *  subset of cpu_present_map, indicating those CPUs available
   5.331 - *  for scheduling.
   5.332 - *
   5.333 - *  If HOTPLUG is enabled, then cpu_possible_map is forced to have
   5.334 - *  all NR_CPUS bits set, otherwise it is just the set of CPUs that
   5.335 - *  ACPI reports present at boot.
   5.336 - *
   5.337 - *  If HOTPLUG is enabled, then cpu_present_map varies dynamically,
   5.338 - *  depending on what ACPI reports as currently plugged in, otherwise
   5.339 - *  cpu_present_map is just a copy of cpu_possible_map.
   5.340 - *
   5.341 - *  (*) Well, cpu_present_map is dynamic in the hotplug case.  If not
   5.342 - *      hotplug, it's a copy of cpu_possible_map, hence fixed at boot.
   5.343 - *
   5.344 - * Subtleties:
   5.345 - * 1) UP arch's (NR_CPUS == 1, CONFIG_SMP not defined) hardcode
   5.346 - *    assumption that their single CPU is online.  The UP
   5.347 - *    cpu_{online,possible,present}_maps are placebos.  Changing them
   5.348 - *    will have no useful affect on the following num_*_cpus()
   5.349 - *    and cpu_*() macros in the UP case.  This ugliness is a UP
   5.350 - *    optimization - don't waste any instructions or memory references
   5.351 - *    asking if you're online or how many CPUs there are if there is
   5.352 - *    only one CPU.
   5.353 - * 2) Most SMP arch's #define some of these maps to be some
   5.354 - *    other map specific to that arch.  Therefore, the following
   5.355 - *    must be #define macros, not inlines.  To see why, examine
   5.356 - *    the assembly code produced by the following.  Note that
   5.357 - *    set1() writes phys_x_map, but set2() writes x_map:
   5.358 - *        int x_map, phys_x_map;
   5.359 - *        #define set1(a) x_map = a
   5.360 - *        inline void set2(int a) { x_map = a; }
   5.361 - *        #define x_map phys_x_map
   5.362 - *        main(){ set1(3); set2(5); }
   5.363 - */
   5.364 -
   5.365 -extern cpumask_t cpu_possible_map;
   5.366 -#ifndef XEN
   5.367 -extern cpumask_t cpu_online_map;
   5.368 -#endif
   5.369 -extern cpumask_t cpu_present_map;
   5.370 -
   5.371 -#if NR_CPUS > 1
   5.372 -#define num_online_cpus()	cpus_weight(cpu_online_map)
   5.373 -#define num_possible_cpus()	cpus_weight(cpu_possible_map)
   5.374 -#define num_present_cpus()	cpus_weight(cpu_present_map)
   5.375 -#define cpu_online(cpu)		cpu_isset((cpu), cpu_online_map)
   5.376 -#define cpu_possible(cpu)	cpu_isset((cpu), cpu_possible_map)
   5.377 -#define cpu_present(cpu)	cpu_isset((cpu), cpu_present_map)
   5.378 -#else
   5.379 -#define num_online_cpus()	1
   5.380 -#define num_possible_cpus()	1
   5.381 -#define num_present_cpus()	1
   5.382 -#define cpu_online(cpu)		((cpu) == 0)
   5.383 -#define cpu_possible(cpu)	((cpu) == 0)
   5.384 -#define cpu_present(cpu)	((cpu) == 0)
   5.385 -#endif
   5.386 -
   5.387 -#define any_online_cpu(mask)			\
   5.388 -({						\
   5.389 -	int cpu;				\
   5.390 -	for_each_cpu_mask(cpu, (mask))		\
   5.391 -		if (cpu_online(cpu))		\
   5.392 -			break;			\
   5.393 -	cpu;					\
   5.394 -})
   5.395 -
   5.396 -#define for_each_cpu(cpu)	  for_each_cpu_mask((cpu), cpu_possible_map)
   5.397 -#define for_each_online_cpu(cpu)  for_each_cpu_mask((cpu), cpu_online_map)
   5.398 -#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
   5.399 -
   5.400 -#endif /* __LINUX_CPUMASK_H */
     6.1 --- a/xen/include/asm-ia64/linux/README.origin	Fri Feb 24 10:32:27 2006 -0700
     6.2 +++ b/xen/include/asm-ia64/linux/README.origin	Fri Feb 24 10:50:27 2006 -0700
     6.3 @@ -23,7 +23,6 @@ preempt.h		-> linux/include/linux/preemp
     6.4  rbtree.h		-> linux/include/linux/rbtree.h
     6.5  rwsem.h			-> linux/include/linux/rwsem.h
     6.6  seqlock.h		-> linux/include/linux/seqlock.h
     6.7 -slab.h			-> linux/include/linux/slab.h
     6.8  sort.h			-> linux/include/linux/sort.h
     6.9  stddef.h		-> linux/include/linux/stddef.h
    6.10  thread_info.h		-> linux/include/linux/thread_info.h
     7.1 --- a/xen/include/asm-ia64/linux/slab.h	Fri Feb 24 10:32:27 2006 -0700
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,137 +0,0 @@
     7.4 -/*
     7.5 - * linux/mm/slab.h
     7.6 - * Written by Mark Hemment, 1996.
     7.7 - * (markhe@nextd.demon.co.uk)
     7.8 - */
     7.9 -
    7.10 -#ifndef _LINUX_SLAB_H
    7.11 -#define	_LINUX_SLAB_H
    7.12 -
    7.13 -#if	defined(__KERNEL__)
    7.14 -
    7.15 -typedef struct kmem_cache_s kmem_cache_t;
    7.16 -
    7.17 -#include	<linux/config.h>	/* kmalloc_sizes.h needs CONFIG_ options */
    7.18 -#include	<linux/gfp.h>
    7.19 -#include	<linux/init.h>
    7.20 -#include	<linux/types.h>
    7.21 -#include	<asm/page.h>		/* kmalloc_sizes.h needs PAGE_SIZE */
    7.22 -#include	<asm/cache.h>		/* kmalloc_sizes.h needs L1_CACHE_BYTES */
    7.23 -
    7.24 -/* flags for kmem_cache_alloc() */
    7.25 -#define	SLAB_NOFS		GFP_NOFS
    7.26 -#define	SLAB_NOIO		GFP_NOIO
    7.27 -#define	SLAB_ATOMIC		GFP_ATOMIC
    7.28 -#define	SLAB_USER		GFP_USER
    7.29 -#define	SLAB_KERNEL		GFP_KERNEL
    7.30 -#define	SLAB_DMA		GFP_DMA
    7.31 -
    7.32 -#define SLAB_LEVEL_MASK		GFP_LEVEL_MASK
    7.33 -
    7.34 -#define	SLAB_NO_GROW		__GFP_NO_GROW	/* don't grow a cache */
    7.35 -
    7.36 -/* flags to pass to kmem_cache_create().
    7.37 - * The first 3 are only valid when the allocator as been build
    7.38 - * SLAB_DEBUG_SUPPORT.
    7.39 - */
    7.40 -#define	SLAB_DEBUG_FREE		0x00000100UL	/* Peform (expensive) checks on free */
    7.41 -#define	SLAB_DEBUG_INITIAL	0x00000200UL	/* Call constructor (as verifier) */
    7.42 -#define	SLAB_RED_ZONE		0x00000400UL	/* Red zone objs in a cache */
    7.43 -#define	SLAB_POISON		0x00000800UL	/* Poison objects */
    7.44 -#define	SLAB_NO_REAP		0x00001000UL	/* never reap from the cache */
    7.45 -#define	SLAB_HWCACHE_ALIGN	0x00002000UL	/* align objs on a h/w cache lines */
    7.46 -#define SLAB_CACHE_DMA		0x00004000UL	/* use GFP_DMA memory */
    7.47 -#define SLAB_MUST_HWCACHE_ALIGN	0x00008000UL	/* force alignment */
    7.48 -#define SLAB_STORE_USER		0x00010000UL	/* store the last owner for bug hunting */
    7.49 -#define SLAB_RECLAIM_ACCOUNT	0x00020000UL	/* track pages allocated to indicate
    7.50 -						   what is reclaimable later*/
    7.51 -#define SLAB_PANIC		0x00040000UL	/* panic if kmem_cache_create() fails */
    7.52 -#define SLAB_DESTROY_BY_RCU	0x00080000UL	/* defer freeing pages to RCU */
    7.53 -
    7.54 -/* flags passed to a constructor func */
    7.55 -#define	SLAB_CTOR_CONSTRUCTOR	0x001UL		/* if not set, then deconstructor */
    7.56 -#define SLAB_CTOR_ATOMIC	0x002UL		/* tell constructor it can't sleep */
    7.57 -#define	SLAB_CTOR_VERIFY	0x004UL		/* tell constructor it's a verify call */
    7.58 -
    7.59 -/* prototypes */
    7.60 -extern void __init kmem_cache_init(void);
    7.61 -
    7.62 -extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
    7.63 -				       void (*)(void *, kmem_cache_t *, unsigned long),
    7.64 -				       void (*)(void *, kmem_cache_t *, unsigned long));
    7.65 -extern int kmem_cache_destroy(kmem_cache_t *);
    7.66 -extern int kmem_cache_shrink(kmem_cache_t *);
    7.67 -extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
    7.68 -extern void kmem_cache_free(kmem_cache_t *, void *);
    7.69 -extern unsigned int kmem_cache_size(kmem_cache_t *);
    7.70 -extern const char *kmem_cache_name(kmem_cache_t *);
    7.71 -extern kmem_cache_t *kmem_find_general_cachep(size_t size, unsigned int __nocast gfpflags);
    7.72 -
    7.73 -/* Size description struct for general caches. */
    7.74 -struct cache_sizes {
    7.75 -	size_t		 cs_size;
    7.76 -	kmem_cache_t	*cs_cachep;
    7.77 -	kmem_cache_t	*cs_dmacachep;
    7.78 -};
    7.79 -extern struct cache_sizes malloc_sizes[];
    7.80 -extern void *__kmalloc(size_t, unsigned int __nocast);
    7.81 -
    7.82 -static inline void *kmalloc(size_t size, unsigned int __nocast flags)
    7.83 -{
    7.84 -	if (__builtin_constant_p(size)) {
    7.85 -		int i = 0;
    7.86 -#define CACHE(x) \
    7.87 -		if (size <= x) \
    7.88 -			goto found; \
    7.89 -		else \
    7.90 -			i++;
    7.91 -#include "kmalloc_sizes.h"
    7.92 -#undef CACHE
    7.93 -		{
    7.94 -			extern void __you_cannot_kmalloc_that_much(void);
    7.95 -			__you_cannot_kmalloc_that_much();
    7.96 -		}
    7.97 -found:
    7.98 -		return kmem_cache_alloc((flags & GFP_DMA) ?
    7.99 -			malloc_sizes[i].cs_dmacachep :
   7.100 -			malloc_sizes[i].cs_cachep, flags);
   7.101 -	}
   7.102 -	return __kmalloc(size, flags);
   7.103 -}
   7.104 -
   7.105 -extern void *kcalloc(size_t, size_t, unsigned int __nocast);
   7.106 -extern void kfree(const void *);
   7.107 -extern unsigned int ksize(const void *);
   7.108 -
   7.109 -#ifdef CONFIG_NUMA
   7.110 -extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node);
   7.111 -extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node);
   7.112 -#else
   7.113 -static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
   7.114 -{
   7.115 -	return kmem_cache_alloc(cachep, flags);
   7.116 -}
   7.117 -static inline void *kmalloc_node(size_t size, unsigned int __nocast flags, int node)
   7.118 -{
   7.119 -	return kmalloc(size, flags);
   7.120 -}
   7.121 -#endif
   7.122 -
   7.123 -extern int FASTCALL(kmem_cache_reap(int));
   7.124 -extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
   7.125 -
   7.126 -/* System wide caches */
   7.127 -extern kmem_cache_t	*vm_area_cachep;
   7.128 -extern kmem_cache_t	*names_cachep;
   7.129 -extern kmem_cache_t	*files_cachep;
   7.130 -extern kmem_cache_t	*filp_cachep;
   7.131 -extern kmem_cache_t	*fs_cachep;
   7.132 -extern kmem_cache_t	*signal_cachep;
   7.133 -extern kmem_cache_t	*sighand_cachep;
   7.134 -extern kmem_cache_t	*bio_cachep;
   7.135 -
   7.136 -extern atomic_t slab_reclaim_pages;
   7.137 -
   7.138 -#endif	/* __KERNEL__ */
   7.139 -
   7.140 -#endif	/* _LINUX_SLAB_H */