[Skiboot] [PATCH] core/init: Use '_' as separator in names of "exports" properties
Michael Ellerman
mpe at ellerman.id.au
Tue Apr 4 13:22:19 AEST 2017
The names of the properties under /ibm,opal/firmware/exports are used
directly by Linux to create files in sysfs. To remain consistent with
the existing naming of OPAL sysfs files, use '_' as the separator.
In particular for the symbol map which is already exported separately,
it's cleaner for the two files to have the same name, eg:
/sys/firmware/opal/exports/symbol_map
/sys/firmware/opal/symbol_map
Fixes: 9ffbfe269ec6 ("core/init: Add hdat-map property to OPAL node")
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
core/opal.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/core/opal.c b/core/opal.c
index 7bc403c2e552..73223b1fe200 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -135,8 +135,13 @@ static void add_opal_firmware_exports_node(struct dt_node *node)
uint64_t sym_start = (uint64_t)__sym_map_start;
uint64_t sym_size = (uint64_t)__sym_map_end - sym_start;
- dt_add_property_u64s(exports, "symbol-map", sym_start, sym_size);
- dt_add_property_u64s(exports, "hdat-map", SPIRA_HEAP_BASE,
+ /*
+ * These property names will be used by Linux as the user-visible file
+ * name, so make them meaningful if possible. We use _ as the separator
+ * here to remain consistent with existing file names in /sys/opal.
+ */
+ dt_add_property_u64s(exports, "symbol_map", sym_start, sym_size);
+ dt_add_property_u64s(exports, "hdat_map", SPIRA_HEAP_BASE,
SPIRA_HEAP_SIZE);
}
--
2.7.4
More information about the Skiboot
mailing list