11 #include <linux/module.h>
12 #include <linux/slab.h>
14 #include <linux/stat.h>
18 #include <asm/setup.h>
23 #ifdef CONFIG_DEBUG_BOOT_PARAMS
24 struct setup_data_node {
30 static ssize_t setup_data_read(
struct file *
file,
char __user *user_buf,
31 size_t count, loff_t *ppos)
46 if (count > node->len - pos)
47 count = node->len -
pos;
49 pa = node->paddr +
sizeof(
struct setup_data) + pos;
51 if (PageHighMem(pg)) {
72 .
read = setup_data_read,
78 create_setup_data_node(
struct dentry *parent,
int no,
79 struct setup_data_node *node)
106 static int __init create_setup_data_nodes(
struct dentry *parent)
108 struct setup_data_node *
node;
130 if (PageHighMem(pg)) {
138 data =
__va(pa_data);
140 node->paddr = pa_data;
141 node->type = data->
type;
142 node->len = data->
len;
143 error = create_setup_data_node(d, no, node);
144 pa_data = data->
next;
165 static int __init boot_params_kdebugfs_init(
void)
184 error = create_setup_data_nodes(dbp);
200 static int __init arch_kdebugfs_init(
void)
205 if (!arch_debugfs_dir)
208 #ifdef CONFIG_DEBUG_BOOT_PARAMS
209 error = boot_params_kdebugfs_init();