ia64/linux-2.6.18-xen.hg

view arch/mips/kernel/irixinv.c @ 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 /*
2 * Support the inventory interface for IRIX binaries
3 * This is invoked before the mm layer is working, so we do not
4 * use the linked lists for the inventory yet.
5 *
6 * Miguel de Icaza, 1997.
7 */
8 #include <linux/mm.h>
9 #include <asm/inventory.h>
10 #include <asm/uaccess.h>
12 #define MAX_INVENTORY 50
13 int inventory_items = 0;
15 static inventory_t inventory [MAX_INVENTORY];
17 void add_to_inventory (int class, int type, int controller, int unit, int state)
18 {
19 inventory_t *ni = &inventory [inventory_items];
21 if (inventory_items == MAX_INVENTORY)
22 return;
24 ni->inv_class = class;
25 ni->inv_type = type;
26 ni->inv_controller = controller;
27 ni->inv_unit = unit;
28 ni->inv_state = state;
29 ni->inv_next = ni;
30 inventory_items++;
31 }
33 int dump_inventory_to_user (void __user *userbuf, int size)
34 {
35 inventory_t *inv = &inventory [0];
36 inventory_t __user *user = userbuf;
37 int v;
39 if (!access_ok(VERIFY_WRITE, userbuf, size))
40 return -EFAULT;
42 for (v = 0; v < inventory_items; v++){
43 inv = &inventory [v];
44 if (copy_to_user (user, inv, sizeof (inventory_t)))
45 return -EFAULT;
46 user++;
47 }
48 return inventory_items * sizeof (inventory_t);
49 }
51 int __init init_inventory(void)
52 {
53 /*
54 * gross hack while we put the right bits all over the kernel
55 * most likely this will not let just anyone run the X server
56 * until we put the right values all over the place
57 */
58 add_to_inventory (10, 3, 0, 0, 16400);
59 add_to_inventory (1, 1, 150, -1, 12);
60 add_to_inventory (1, 3, 0, 0, 8976);
61 add_to_inventory (1, 2, 0, 0, 8976);
62 add_to_inventory (4, 8, 0, 0, 2);
63 add_to_inventory (5, 5, 0, 0, 1);
64 add_to_inventory (3, 3, 0, 0, 32768);
65 add_to_inventory (3, 4, 0, 0, 32768);
66 add_to_inventory (3, 8, 0, 0, 524288);
67 add_to_inventory (3, 9, 0, 0, 64);
68 add_to_inventory (3, 1, 0, 0, 67108864);
69 add_to_inventory (12, 3, 0, 0, 16);
70 add_to_inventory (8, 7, 17, 0, 16777472);
71 add_to_inventory (8, 0, 0, 0, 1);
72 add_to_inventory (2, 1, 0, 13, 2);
73 add_to_inventory (2, 2, 0, 2, 0);
74 add_to_inventory (2, 2, 0, 1, 0);
75 add_to_inventory (7, 14, 0, 0, 6);
77 return 0;
78 }