Skip to content

Commit 036d2e8

Browse files
mpestewartsmith
authored andcommitted
core/init: Use '_' as separator in names of "exports" properties
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: 9ffbfe2 ("core/init: Add hdat-map property to OPAL node") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
1 parent c2bfa35 commit 036d2e8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/opal.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,13 @@ static void add_opal_firmware_exports_node(struct dt_node *node)
135135
uint64_t sym_start = (uint64_t)__sym_map_start;
136136
uint64_t sym_size = (uint64_t)__sym_map_end - sym_start;
137137

138-
dt_add_property_u64s(exports, "symbol-map", sym_start, sym_size);
139-
dt_add_property_u64s(exports, "hdat-map", SPIRA_HEAP_BASE,
138+
/*
139+
* These property names will be used by Linux as the user-visible file
140+
* name, so make them meaningful if possible. We use _ as the separator
141+
* here to remain consistent with existing file names in /sys/opal.
142+
*/
143+
dt_add_property_u64s(exports, "symbol_map", sym_start, sym_size);
144+
dt_add_property_u64s(exports, "hdat_map", SPIRA_HEAP_BASE,
140145
SPIRA_HEAP_SIZE);
141146
}
142147

0 commit comments

Comments
 (0)