blob: db442cd6621ec9d838325c15c2f47cbb102992a1 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Xpram.c -- the S/390 expanded memory RAM-disk
3 *
4 * significant parts of this code are based on
5 * the sbull device driver presented in
6 * A. Rubini: Linux Device Drivers
7 *
8 * Author of XPRAM specific coding: Reinhard Buendgen
9 * buendgen@de.ibm.com
10 * Rewrite for 2.5: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 *
12 * External interfaces:
13 * Interfaces to linux kernel
14 * xpram_setup: read kernel parameters
15 * Device specific file operations
16 * xpram_iotcl
17 * xpram_open
18 *
19 * "ad-hoc" partitioning:
20 * the expanded memory can be partitioned among several devices
21 * (with different minors). The partitioning set up can be
22 * set by kernel or module parameters (int devs & int sizes[])
23 *
24 * Potential future improvements:
25 * generic hard disk support to replace ad-hoc partitioning
26 */
27
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +010028#define KMSG_COMPONENT "xpram"
29#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
30
Linus Torvalds1da177e2005-04-16 15:20:36 -070031#include <linux/module.h>
32#include <linux/moduleparam.h>
33#include <linux/ctype.h> /* isdigit, isxdigit */
34#include <linux/errno.h>
35#include <linux/init.h>
36#include <linux/slab.h>
37#include <linux/blkdev.h>
38#include <linux/blkpg.h>
39#include <linux/hdreg.h> /* HDIO_GETGEO */
40#include <linux/sysdev.h>
41#include <linux/bio.h>
Michael Holzheu14532092009-06-16 10:30:27 +020042#include <linux/suspend.h>
43#include <linux/platform_device.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070044#include <asm/uaccess.h>
Michael Holzheu14532092009-06-16 10:30:27 +020045#include <asm/checksum.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
47#define XPRAM_NAME "xpram"
48#define XPRAM_DEVS 1 /* one partition */
49#define XPRAM_MAX_DEVS 32 /* maximal number of devices (partitions) */
50
Linus Torvalds1da177e2005-04-16 15:20:36 -070051typedef struct {
52 unsigned int size; /* size of xpram segment in pages */
53 unsigned int offset; /* start page of xpram segment */
Michael Holzheu14532092009-06-16 10:30:27 +020054 unsigned int csum; /* partition checksum for suspend */
Linus Torvalds1da177e2005-04-16 15:20:36 -070055} xpram_device_t;
56
57static xpram_device_t xpram_devices[XPRAM_MAX_DEVS];
58static unsigned int xpram_sizes[XPRAM_MAX_DEVS];
59static struct gendisk *xpram_disks[XPRAM_MAX_DEVS];
Martin Schwidefsky3ce66092008-10-10 21:33:24 +020060static struct request_queue *xpram_queues[XPRAM_MAX_DEVS];
Linus Torvalds1da177e2005-04-16 15:20:36 -070061static unsigned int xpram_pages;
62static int xpram_devs;
63
64/*
65 * Parameter parsing functions.
66 */
Heiko Carstens5c898ba2006-07-12 16:40:14 +020067static int __initdata devs = XPRAM_DEVS;
68static char __initdata *sizes[XPRAM_MAX_DEVS];
Linus Torvalds1da177e2005-04-16 15:20:36 -070069
70module_param(devs, int, 0);
Heiko Carstens5c898ba2006-07-12 16:40:14 +020071module_param_array(sizes, charp, NULL, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -070072
73MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \
74 "the default is " __MODULE_STRING(XPRAM_DEVS) "\n");
75MODULE_PARM_DESC(sizes, "list of device (partition) sizes " \
76 "the defaults are 0s \n" \
77 "All devices with size 0 equally partition the "
78 "remaining space on the expanded strorage not "
79 "claimed by explicit sizes\n");
80MODULE_LICENSE("GPL");
81
Linus Torvalds1da177e2005-04-16 15:20:36 -070082/*
83 * Copy expanded memory page (4kB) into main memory
84 * Arguments
85 * page_addr: address of target page
86 * xpage_index: index of expandeded memory page
87 * Return value
88 * 0: if operation succeeds
89 * -EIO: if pgin failed
90 * -ENXIO: if xpram has vanished
91 */
92static int xpram_page_in (unsigned long page_addr, unsigned int xpage_index)
93{
Martin Schwidefsky94c12cc2006-09-28 16:56:43 +020094 int cc = 2; /* return unused cc 2 if pgin traps */
Linus Torvalds1da177e2005-04-16 15:20:36 -070095
Martin Schwidefsky94c12cc2006-09-28 16:56:43 +020096 asm volatile(
97 " .insn rre,0xb22e0000,%1,%2\n" /* pgin %1,%2 */
98 "0: ipm %0\n"
99 " srl %0,28\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100 "1:\n"
Martin Schwidefsky94c12cc2006-09-28 16:56:43 +0200101 EX_TABLE(0b,1b)
102 : "+d" (cc) : "a" (__pa(page_addr)), "d" (xpage_index) : "cc");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103 if (cc == 3)
104 return -ENXIO;
Martin Schwidefsky8df22b42008-07-14 09:59:24 +0200105 if (cc == 2)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106 return -ENXIO;
Martin Schwidefsky8df22b42008-07-14 09:59:24 +0200107 if (cc == 1)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108 return -EIO;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109 return 0;
110}
111
112/*
113 * Copy a 4kB page of main memory to an expanded memory page
114 * Arguments
115 * page_addr: address of source page
116 * xpage_index: index of expandeded memory page
117 * Return value
118 * 0: if operation succeeds
119 * -EIO: if pgout failed
120 * -ENXIO: if xpram has vanished
121 */
122static long xpram_page_out (unsigned long page_addr, unsigned int xpage_index)
123{
Martin Schwidefsky94c12cc2006-09-28 16:56:43 +0200124 int cc = 2; /* return unused cc 2 if pgin traps */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125
Martin Schwidefsky94c12cc2006-09-28 16:56:43 +0200126 asm volatile(
127 " .insn rre,0xb22f0000,%1,%2\n" /* pgout %1,%2 */
128 "0: ipm %0\n"
129 " srl %0,28\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130 "1:\n"
Martin Schwidefsky94c12cc2006-09-28 16:56:43 +0200131 EX_TABLE(0b,1b)
132 : "+d" (cc) : "a" (__pa(page_addr)), "d" (xpage_index) : "cc");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133 if (cc == 3)
134 return -ENXIO;
Martin Schwidefsky8df22b42008-07-14 09:59:24 +0200135 if (cc == 2)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136 return -ENXIO;
Martin Schwidefsky8df22b42008-07-14 09:59:24 +0200137 if (cc == 1)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138 return -EIO;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139 return 0;
140}
141
142/*
143 * Check if xpram is available.
144 */
Michael Holzheu14532092009-06-16 10:30:27 +0200145static int xpram_present(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700146{
147 unsigned long mem_page;
148 int rc;
149
150 mem_page = (unsigned long) __get_free_page(GFP_KERNEL);
151 if (!mem_page)
152 return -ENOMEM;
153 rc = xpram_page_in(mem_page, 0);
154 free_page(mem_page);
155 return rc ? -ENXIO : 0;
156}
157
158/*
159 * Return index of the last available xpram page.
160 */
Michael Holzheu14532092009-06-16 10:30:27 +0200161static unsigned long xpram_highest_page_index(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162{
163 unsigned int page_index, add_bit;
164 unsigned long mem_page;
165
166 mem_page = (unsigned long) __get_free_page(GFP_KERNEL);
167 if (!mem_page)
168 return 0;
169
170 page_index = 0;
171 add_bit = 1ULL << (sizeof(unsigned int)*8 - 1);
172 while (add_bit > 0) {
173 if (xpram_page_in(mem_page, page_index | add_bit) == 0)
174 page_index |= add_bit;
175 add_bit >>= 1;
176 }
177
178 free_page (mem_page);
179
180 return page_index;
181}
182
183/*
184 * Block device make request function.
185 */
Jens Axboe165125e2007-07-24 09:28:11 +0200186static int xpram_make_request(struct request_queue *q, struct bio *bio)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187{
188 xpram_device_t *xdev = bio->bi_bdev->bd_disk->private_data;
189 struct bio_vec *bvec;
190 unsigned int index;
191 unsigned long page_addr;
192 unsigned long bytes;
193 int i;
194
195 if ((bio->bi_sector & 7) != 0 || (bio->bi_size & 4095) != 0)
196 /* Request is not page-aligned. */
197 goto fail;
198 if ((bio->bi_size >> 12) > xdev->size)
199 /* Request size is no page-aligned. */
200 goto fail;
201 if ((bio->bi_sector >> 3) > 0xffffffffU - xdev->offset)
202 goto fail;
203 index = (bio->bi_sector >> 3) + xdev->offset;
204 bio_for_each_segment(bvec, bio, i) {
205 page_addr = (unsigned long)
206 kmap(bvec->bv_page) + bvec->bv_offset;
207 bytes = bvec->bv_len;
208 if ((page_addr & 4095) != 0 || (bytes & 4095) != 0)
209 /* More paranoia. */
210 goto fail;
211 while (bytes > 0) {
212 if (bio_data_dir(bio) == READ) {
213 if (xpram_page_in(page_addr, index) != 0)
214 goto fail;
215 } else {
216 if (xpram_page_out(page_addr, index) != 0)
217 goto fail;
218 }
219 page_addr += 4096;
220 bytes -= 4096;
221 index++;
222 }
223 }
224 set_bit(BIO_UPTODATE, &bio->bi_flags);
Martin Schwidefsky14622222007-10-12 16:11:53 +0200225 bio_endio(bio, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226 return 0;
227fail:
NeilBrown6712ecf2007-09-27 12:47:43 +0200228 bio_io_error(bio);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700229 return 0;
230}
231
Christoph Hellwiga885c8c2006-01-08 01:02:50 -0800232static int xpram_getgeo(struct block_device *bdev, struct hd_geometry *geo)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700234 unsigned long size;
Christoph Hellwiga885c8c2006-01-08 01:02:50 -0800235
Linus Torvalds1da177e2005-04-16 15:20:36 -0700236 /*
237 * get geometry: we have to fake one... trim the size to a
238 * multiple of 64 (32k): tell we have 16 sectors, 4 heads,
239 * whatever cylinders. Tell also that data starts at sector. 4.
240 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241 size = (xpram_pages * 8) & ~0x3f;
Christoph Hellwiga885c8c2006-01-08 01:02:50 -0800242 geo->cylinders = size >> 6;
243 geo->heads = 4;
244 geo->sectors = 16;
245 geo->start = 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700246 return 0;
247}
248
249static struct block_device_operations xpram_devops =
250{
251 .owner = THIS_MODULE,
Christoph Hellwiga885c8c2006-01-08 01:02:50 -0800252 .getgeo = xpram_getgeo,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700253};
254
255/*
256 * Setup xpram_sizes array.
257 */
258static int __init xpram_setup_sizes(unsigned long pages)
259{
260 unsigned long mem_needed;
261 unsigned long mem_auto;
Heiko Carstensf257b062006-07-17 16:09:23 +0200262 unsigned long long size;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700263 int mem_auto_no;
264 int i;
265
266 /* Check number of devices. */
267 if (devs <= 0 || devs > XPRAM_MAX_DEVS) {
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100268 pr_err("%d is not a valid number of XPRAM devices\n",devs);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700269 return -EINVAL;
270 }
271 xpram_devs = devs;
272
273 /*
274 * Copy sizes array to xpram_sizes and align partition
275 * sizes to page boundary.
276 */
277 mem_needed = 0;
278 mem_auto_no = 0;
279 for (i = 0; i < xpram_devs; i++) {
Heiko Carstensf257b062006-07-17 16:09:23 +0200280 if (sizes[i]) {
281 size = simple_strtoull(sizes[i], &sizes[i], 0);
282 switch (sizes[i][0]) {
283 case 'g':
284 case 'G':
285 size <<= 20;
286 break;
287 case 'm':
288 case 'M':
289 size <<= 10;
290 }
291 xpram_sizes[i] = (size + 3) & -4UL;
292 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700293 if (xpram_sizes[i])
294 mem_needed += xpram_sizes[i];
295 else
296 mem_auto_no++;
297 }
298
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100299 pr_info(" number of devices (partitions): %d \n", xpram_devs);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700300 for (i = 0; i < xpram_devs; i++) {
301 if (xpram_sizes[i])
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100302 pr_info(" size of partition %d: %u kB\n",
303 i, xpram_sizes[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700304 else
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100305 pr_info(" size of partition %d to be set "
306 "automatically\n",i);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700307 }
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100308 pr_info(" memory needed (for sized partitions): %lu kB\n",
309 mem_needed);
310 pr_info(" partitions to be sized automatically: %d\n",
311 mem_auto_no);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700312
313 if (mem_needed > pages * 4) {
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100314 pr_err("Not enough expanded memory available\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700315 return -EINVAL;
316 }
317
318 /*
319 * partitioning:
320 * xpram_sizes[i] != 0; partition i has size xpram_sizes[i] kB
321 * else: ; all partitions with zero xpram_sizes[i]
322 * partition equally the remaining space
323 */
324 if (mem_auto_no) {
325 mem_auto = ((pages - mem_needed / 4) / mem_auto_no) * 4;
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100326 pr_info(" automatically determined "
327 "partition size: %lu kB\n", mem_auto);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700328 for (i = 0; i < xpram_devs; i++)
329 if (xpram_sizes[i] == 0)
330 xpram_sizes[i] = mem_auto;
331 }
332 return 0;
333}
334
Linus Torvalds1da177e2005-04-16 15:20:36 -0700335static int __init xpram_setup_blkdev(void)
336{
337 unsigned long offset;
338 int i, rc = -ENOMEM;
339
340 for (i = 0; i < xpram_devs; i++) {
Martin Schwidefsky3ce66092008-10-10 21:33:24 +0200341 xpram_disks[i] = alloc_disk(1);
342 if (!xpram_disks[i])
Linus Torvalds1da177e2005-04-16 15:20:36 -0700343 goto out;
Martin Schwidefsky3ce66092008-10-10 21:33:24 +0200344 xpram_queues[i] = blk_alloc_queue(GFP_KERNEL);
345 if (!xpram_queues[i]) {
346 put_disk(xpram_disks[i]);
347 goto out;
348 }
349 blk_queue_make_request(xpram_queues[i], xpram_make_request);
Martin K. Petersene1defc42009-05-22 17:17:49 -0400350 blk_queue_logical_block_size(xpram_queues[i], 4096);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700351 }
352
353 /*
354 * Register xpram major.
355 */
356 rc = register_blkdev(XPRAM_MAJOR, XPRAM_NAME);
357 if (rc < 0)
358 goto out;
359
Linus Torvalds1da177e2005-04-16 15:20:36 -0700360 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700361 * Setup device structures.
362 */
363 offset = 0;
364 for (i = 0; i < xpram_devs; i++) {
365 struct gendisk *disk = xpram_disks[i];
366
367 xpram_devices[i].size = xpram_sizes[i] / 4;
368 xpram_devices[i].offset = offset;
369 offset += xpram_devices[i].size;
370 disk->major = XPRAM_MAJOR;
371 disk->first_minor = i;
372 disk->fops = &xpram_devops;
373 disk->private_data = &xpram_devices[i];
Martin Schwidefsky3ce66092008-10-10 21:33:24 +0200374 disk->queue = xpram_queues[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700375 sprintf(disk->disk_name, "slram%d", i);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700376 set_capacity(disk, xpram_sizes[i] << 1);
377 add_disk(disk);
378 }
379
380 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700381out:
Martin Schwidefsky3ce66092008-10-10 21:33:24 +0200382 while (i--) {
383 blk_cleanup_queue(xpram_queues[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700384 put_disk(xpram_disks[i]);
Martin Schwidefsky3ce66092008-10-10 21:33:24 +0200385 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700386 return rc;
387}
388
389/*
Michael Holzheu14532092009-06-16 10:30:27 +0200390 * Save checksums for all partitions.
391 */
392static int xpram_save_checksums(void)
393{
394 unsigned long mem_page;
395 int rc, i;
396
397 rc = 0;
398 mem_page = (unsigned long) __get_free_page(GFP_KERNEL);
399 if (!mem_page)
400 return -ENOMEM;
401 for (i = 0; i < xpram_devs; i++) {
402 rc = xpram_page_in(mem_page, xpram_devices[i].offset);
403 if (rc)
404 goto fail;
405 xpram_devices[i].csum = csum_partial((const void *) mem_page,
406 PAGE_SIZE, 0);
407 }
408fail:
409 free_page(mem_page);
410 return rc ? -ENXIO : 0;
411}
412
413/*
414 * Verify checksums for all partitions.
415 */
416static int xpram_validate_checksums(void)
417{
418 unsigned long mem_page;
419 unsigned int csum;
420 int rc, i;
421
422 rc = 0;
423 mem_page = (unsigned long) __get_free_page(GFP_KERNEL);
424 if (!mem_page)
425 return -ENOMEM;
426 for (i = 0; i < xpram_devs; i++) {
427 rc = xpram_page_in(mem_page, xpram_devices[i].offset);
428 if (rc)
429 goto fail;
430 csum = csum_partial((const void *) mem_page, PAGE_SIZE, 0);
431 if (xpram_devices[i].csum != csum) {
432 rc = -EINVAL;
433 goto fail;
434 }
435 }
436fail:
437 free_page(mem_page);
438 return rc ? -ENXIO : 0;
439}
440
441/*
442 * Resume failed: Print error message and call panic.
443 */
444static void xpram_resume_error(const char *message)
445{
Christian Borntraeger2c48c4d2009-07-07 16:37:11 +0200446 pr_err("Resuming the system failed: %s\n", message);
Michael Holzheu14532092009-06-16 10:30:27 +0200447 panic("xpram resume error\n");
448}
449
450/*
451 * Check if xpram setup changed between suspend and resume.
452 */
453static int xpram_restore(struct device *dev)
454{
455 if (!xpram_pages)
456 return 0;
457 if (xpram_present() != 0)
458 xpram_resume_error("xpram disappeared");
459 if (xpram_pages != xpram_highest_page_index() + 1)
460 xpram_resume_error("Size of xpram changed");
461 if (xpram_validate_checksums())
462 xpram_resume_error("Data of xpram changed");
463 return 0;
464}
465
466/*
467 * Save necessary state in suspend.
468 */
469static int xpram_freeze(struct device *dev)
470{
471 return xpram_save_checksums();
472}
473
474static struct dev_pm_ops xpram_pm_ops = {
475 .freeze = xpram_freeze,
476 .restore = xpram_restore,
477};
478
479static struct platform_driver xpram_pdrv = {
480 .driver = {
481 .name = XPRAM_NAME,
482 .owner = THIS_MODULE,
483 .pm = &xpram_pm_ops,
484 },
485};
486
487static struct platform_device *xpram_pdev;
488
489/*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490 * Finally, the init/exit functions.
491 */
492static void __exit xpram_exit(void)
493{
494 int i;
495 for (i = 0; i < xpram_devs; i++) {
496 del_gendisk(xpram_disks[i]);
Martin Schwidefsky3ce66092008-10-10 21:33:24 +0200497 blk_cleanup_queue(xpram_queues[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700498 put_disk(xpram_disks[i]);
499 }
500 unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME);
Michael Holzheu14532092009-06-16 10:30:27 +0200501 platform_device_unregister(xpram_pdev);
502 platform_driver_unregister(&xpram_pdrv);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700503}
504
505static int __init xpram_init(void)
506{
507 int rc;
508
509 /* Find out size of expanded memory. */
510 if (xpram_present() != 0) {
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100511 pr_err("No expanded memory available\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700512 return -ENODEV;
513 }
Christian Borntraegere620c492006-09-20 15:59:32 +0200514 xpram_pages = xpram_highest_page_index() + 1;
Martin Schwidefskyd1c2f892008-12-25 13:39:31 +0100515 pr_info(" %u pages expanded memory found (%lu KB).\n",
516 xpram_pages, (unsigned long) xpram_pages*4);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517 rc = xpram_setup_sizes(xpram_pages);
518 if (rc)
519 return rc;
Michael Holzheu14532092009-06-16 10:30:27 +0200520 rc = platform_driver_register(&xpram_pdrv);
521 if (rc)
522 return rc;
523 xpram_pdev = platform_device_register_simple(XPRAM_NAME, -1, NULL, 0);
524 if (IS_ERR(xpram_pdev)) {
525 rc = PTR_ERR(xpram_pdev);
526 goto fail_platform_driver_unregister;
527 }
528 rc = xpram_setup_blkdev();
529 if (rc)
530 goto fail_platform_device_unregister;
531 return 0;
532
533fail_platform_device_unregister:
534 platform_device_unregister(xpram_pdev);
535fail_platform_driver_unregister:
536 platform_driver_unregister(&xpram_pdrv);
537 return rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538}
539
540module_init(xpram_init);
541module_exit(xpram_exit);