blob: d70d8c20229c1d3d9a8a4f8a99b8e897591f91f0 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Michael Ernstc05ffc42008-01-26 14:10:55 +01002 * SCLP control programm identification
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
Michael Ernstc05ffc42008-01-26 14:10:55 +01004 * Copyright IBM Corp. 2001, 2007
5 * Author(s): Martin Peschke <mpeschke@de.ibm.com>
6 * Michael Ernst <mernst@de.ibm.com>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 */
8
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <linux/kmod.h>
10#include <linux/module.h>
11#include <linux/moduleparam.h>
Michael Ernstc05ffc42008-01-26 14:10:55 +010012#include <linux/version.h>
13#include "sclp_cpi_sys.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
Christian Borntraegerb3c14d02006-12-15 17:18:20 +010015MODULE_LICENSE("GPL");
Michael Ernstc05ffc42008-01-26 14:10:55 +010016MODULE_DESCRIPTION("Identify this operating system instance "
17 "to the System z hardware");
18MODULE_AUTHOR("Martin Peschke <mpeschke@de.ibm.com>, "
19 "Michael Ernst <mernst@de.ibm.com>");
Christian Borntraegerb3c14d02006-12-15 17:18:20 +010020
Michael Ernstc05ffc42008-01-26 14:10:55 +010021static char *system_name = "";
22static char *sysplex_name = "";
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Linus Torvalds1da177e2005-04-16 15:20:36 -070024module_param(system_name, charp, 0);
25MODULE_PARM_DESC(system_name, "e.g. hostname - max. 8 characters");
Linus Torvalds1da177e2005-04-16 15:20:36 -070026module_param(sysplex_name, charp, 0);
27MODULE_PARM_DESC(sysplex_name, "if applicable - max. 8 characters");
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Michael Ernstc05ffc42008-01-26 14:10:55 +010029static int __init cpi_module_init(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070030{
Michael Ernstc05ffc42008-01-26 14:10:55 +010031 return sclp_cpi_set_data(system_name, sysplex_name, "LINUX",
32 LINUX_VERSION_CODE);
Linus Torvalds1da177e2005-04-16 15:20:36 -070033}
34
Linus Torvalds1da177e2005-04-16 15:20:36 -070035static void __exit cpi_module_exit(void)
36{
37}
38
Linus Torvalds1da177e2005-04-16 15:20:36 -070039module_init(cpi_module_init);
40module_exit(cpi_module_exit);