History

Merge tag 'riscv-for-linus-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt: - A fix to align kexec'd kernels to PMD boundries - The T-Head dcache.cva encoding was incorrect, it has been fixed to invalidate all caches (as opposed to just the L1) * tag 'riscv-for-linus-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: errata: fix T-Head dcache.cva encoding riscv: kexec: Align the kexeced kernel entry

Linus Torvalds committed 3 years ago

Commit 82210972 parents 9fdfb15 8eb8fe62 files · +9 −3Browse files

Unified · Split

2 files
  1. arch/riscv/include/asm/errata_list.h +2 −2
  2. arch/riscv/kernel/elf_kexec.c +7 −1
arch/riscv/include/asm/errata_list.h+2−2
@@ -105,7 +105,7 @@ asm volatile(ALTERNATIVE( \ · 104 unmodified lines
105 * | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 |105 * | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 |
106 * 0000001 01001 rs1 000 00000 0001011106 * 0000001 01001 rs1 000 00000 0001011
107 * dcache.cva rs1 (clean, virtual address)107 * dcache.cva rs1 (clean, virtual address)
108 * 0000001 00100 rs1 000 00000 0001011108 * 0000001 00101 rs1 000 00000 0001011
109 *109 *
110 * dcache.cipa rs1 (clean then invalidate, physical address)110 * dcache.cipa rs1 (clean then invalidate, physical address)
111 * | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 |111 * | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 |
@@ -118,7 +118,7 @@ asm volatile(ALTERNATIVE( \ · 6 unmodified lines
118 * 0000000 11001 00000 000 00000 0001011118 * 0000000 11001 00000 000 00000 0001011
119 */119 */
120#define THEAD_inval_A0 ".long 0x0265000b"120#define THEAD_inval_A0 ".long 0x0265000b"
121#define THEAD_clean_A0 ".long 0x0245000b"121#define THEAD_clean_A0 ".long 0x0255000b"
122#define THEAD_flush_A0 ".long 0x0275000b"122#define THEAD_flush_A0 ".long 0x0275000b"
123#define THEAD_SYNC_S ".long 0x0190000b"123#define THEAD_SYNC_S ".long 0x0190000b"
124 124
arch/riscv/kernel/elf_kexec.c+7−1
@@ -98,7 +98,13 @@ static int elf_find_pbase(struct kimage *image, unsigned long kernel_len, · 97 unmodified lines
98 kbuf.image = image;98 kbuf.image = image;
99 kbuf.buf_min = lowest_paddr;99 kbuf.buf_min = lowest_paddr;
100 kbuf.buf_max = ULONG_MAX;100 kbuf.buf_max = ULONG_MAX;
101 kbuf.buf_align = PAGE_SIZE;101
102 /*
103 * Current riscv boot protocol requires 2MB alignment for
104 * RV64 and 4MB alignment for RV32
105 *
106 */
107 kbuf.buf_align = PMD_SIZE;
102 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;108 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
103 kbuf.memsz = ALIGN(kernel_len, PAGE_SIZE);109 kbuf.memsz = ALIGN(kernel_len, PAGE_SIZE);
104 kbuf.top_down = false;110 kbuf.top_down = false;