aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/irixinv.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/irixinv.c')
-rw-r--r--arch/mips/kernel/irixinv.c78
1 files changed, 0 insertions, 78 deletions
diff --git a/arch/mips/kernel/irixinv.c b/arch/mips/kernel/irixinv.c
deleted file mode 100644
index cf2dcd3d6a93..000000000000
--- a/arch/mips/kernel/irixinv.c
+++ /dev/null
@@ -1,78 +0,0 @@
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>
11
12#define MAX_INVENTORY 50
13int inventory_items = 0;
14
15static inventory_t inventory [MAX_INVENTORY];
16
17void add_to_inventory(int class, int type, int controller, int unit, int state)
18{
19 inventory_t *ni = &inventory [inventory_items];
20
21 if (inventory_items == MAX_INVENTORY)
22 return;
23
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}
32
33int 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;
38
39 if (!access_ok(VERIFY_WRITE, userbuf, size))
40 return -EFAULT;
41
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}
50
51int __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);
76
77 return 0;
78}