ia64/linux-2.6.18-xen.hg

view include/asm-m68k/delay.h @ 452:c7ed6fe5dca0

kexec: dont initialise regions in reserve_memory()

There is no need to initialise efi_memmap_res and boot_param_res in
reserve_memory() for the initial xen domain as it is done in
machine_kexec_setup_resources() using values from the kexec hypercall.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 10:55:18 2008 +0000 (2008-02-28)
parents 831230e53067
children
line source
1 #ifndef _M68K_DELAY_H
2 #define _M68K_DELAY_H
4 #include <asm/param.h>
6 /*
7 * Copyright (C) 1994 Hamish Macdonald
8 *
9 * Delay routines, using a pre-computed "loops_per_jiffy" value.
10 */
12 static inline void __delay(unsigned long loops)
13 {
14 __asm__ __volatile__ ("1: subql #1,%0; jcc 1b"
15 : "=d" (loops) : "0" (loops));
16 }
18 extern void __bad_udelay(void);
20 /*
21 * Use only for very small delays ( < 1 msec). Should probably use a
22 * lookup table, really, as the multiplications take much too long with
23 * short delays. This is a "reasonable" implementation, though (and the
24 * first constant multiplications gets optimized away if the delay is
25 * a constant)
26 */
27 static inline void __const_udelay(unsigned long xloops)
28 {
29 unsigned long tmp;
31 __asm__ ("mulul %2,%0:%1"
32 : "=d" (xloops), "=d" (tmp)
33 : "d" (xloops), "1" (loops_per_jiffy));
34 __delay(xloops * HZ);
35 }
37 static inline void __udelay(unsigned long usecs)
38 {
39 __const_udelay(usecs * 4295); /* 2**32 / 1000000 */
40 }
42 #define udelay(n) (__builtin_constant_p(n) ? \
43 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 4295)) : \
44 __udelay(n))
46 static inline unsigned long muldiv(unsigned long a, unsigned long b,
47 unsigned long c)
48 {
49 unsigned long tmp;
51 __asm__ ("mulul %2,%0:%1; divul %3,%0:%1"
52 : "=d" (tmp), "=d" (a)
53 : "d" (b), "d" (c), "1" (a));
54 return a;
55 }
57 #endif /* defined(_M68K_DELAY_H) */