Skip to content

Commit

Permalink
core/init: Use '_' as separator in names of "exports" properties
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mpe authored and stewartsmith committed Apr 5, 2017
1 parent c2bfa35 commit 036d2e8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/opal.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit 036d2e8

Please sign in to comment.