diff options
author | Vincent Chen <[email protected]> | 2020-06-23 09:24:17 +0800 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2020-06-25 15:04:13 -0700 |
commit | d0a5fdf4cc83dabcdea668f971b8a2e916437711 (patch) | |
tree | e935af46c7523b5276860f2f617033e962023ffd /tools/perf/scripts/python/export-to-sqlite.py | |
parent | a0fc3b32893b29a7b3a2771b6d63bae16cb1e8de (diff) |
clk: sifive: allocate sufficient memory for struct __prci_data
The (struct __prci_data).hw_clks.hws is an array with dynamic elements.
Using struct_size(pd, hw_clks.hws, ARRAY_SIZE(__prci_init_clocks))
instead of sizeof(*pd) to get the correct memory size of
struct __prci_data for sifive/fu540-prci. After applying this
modifications, the kernel runs smoothly with CONFIG_SLAB_FREELIST_RANDOM
enabled on the HiFive unleashed board.
Fixes: 30b8e27e3b58 ("clk: sifive: add a driver for the SiFive FU540 PRCI IP block")
Signed-off-by: Vincent Chen <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions