Skip to content

Commit a09434f

Browse files
committed
Merge tag 'riscv-for-linus-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fixes from Palmer Dabbelt: - fix the sifive-l2-cache device tree bindings for json-schema compatibility. This does not change the intended behavior of the binding. - avoid improperly freeing necessary resources during early boot. * tag 'riscv-for-linus-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix a number of free'd resources in init_resources() dt-bindings: sifive-l2-cache: Fix 'select' matching
2 parents 5479a7f + aa3e1ba commit a09434f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ allOf:
2424
select:
2525
properties:
2626
compatible:
27-
items:
28-
- enum:
29-
- sifive,fu540-c000-ccache
30-
- sifive,fu740-c000-ccache
27+
contains:
28+
enum:
29+
- sifive,fu540-c000-ccache
30+
- sifive,fu740-c000-ccache
3131

3232
required:
3333
- compatible

arch/riscv/kernel/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ static void __init init_resources(void)
229229
}
230230

231231
/* Clean-up any unused pre-allocated resources */
232-
mem_res_sz = (num_resources - res_idx + 1) * sizeof(*mem_res);
233-
memblock_free(__pa(mem_res), mem_res_sz);
232+
if (res_idx >= 0)
233+
memblock_free(__pa(mem_res), (res_idx + 1) * sizeof(*mem_res));
234234
return;
235235

236236
error:

0 commit comments

Comments
 (0)