17 #include <linux/string.h>
19 #include <linux/kernel.h>
20 #include <linux/module.h>
21 #include <linux/types.h>
23 #include <linux/slab.h>
72 &memmap_start_attr.
attr,
73 &memmap_end_attr.
attr,
74 &memmap_type_attr.
attr,
78 static const struct sysfs_ops memmap_attr_ops = {
79 .show = memmap_attr_show,
83 .sysfs_ops = &memmap_attr_ops,
84 .default_attrs = def_attrs,
116 entry->
end = end - 1;
118 INIT_LIST_HEAD(&entry->
list);
131 static int map_entries_nr;
132 static struct kset *mmap_kset;
140 entry->
kobj.kset = mmap_kset;
168 firmware_map_add_entry(start, end, type, entry);
170 add_sysfs_fw_map_entry(entry);
196 return firmware_map_add_entry(start, end, type, entry);
206 (
unsigned long long)entry->
start);
212 (
unsigned long long)entry->
end);
220 #define to_memmap_attr(_attr) container_of(_attr, struct memmap_attribute, attr)
221 #define to_memmap_entry(obj) container_of(obj, struct firmware_map_entry, kobj)
229 return memmap_attr->
show(entry, buf);
240 static int __init firmware_memmap_init(
void)
245 add_sysfs_fw_map_entry(entry);