From: broonie@kernel.org
To: Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul@pwsan.com>
Cc: Alexandre Ghiti <alexghiti@rivosinc.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Palmer Dabbelt <palmer@rivosinc.com>
Subject: linux-next: manual merge of the risc-v tree with the risc-v-fixes tree
Date: Thu, 20 Apr 2023 13:40:48 +0100 [thread overview]
Message-ID: <20230420124048.65232-1-broonie@kernel.org> (raw)
Hi all,
Today's linux-next merge of the risc-v tree got a conflict in:
arch/riscv/mm/init.c
between commit:
ef69d2559fe91 ("riscv: Move early dtb mapping into the fixmap region")
from the risc-v-fixes tree and commits:
8589e346bbb67 ("riscv: Move the linear mapping creation in its own function")
3335068f87217 ("riscv: Use PUD/P4D/PGD pages for the linear mapping")
from the risc-v tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc arch/riscv/mm/init.c
index 0f14f4a8d179a,7bd66795165da..0000000000000
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@@ -1070,26 -1112,36 +1092,47 @@@ asmlinkage void __init setup_vm(uintptr
pt_ops_set_fixmap();
}
- static void __init setup_vm_final(void)
+ static void __init create_linear_mapping_range(phys_addr_t start,
+ phys_addr_t end)
{
+ phys_addr_t pa;
uintptr_t va, map_size;
- phys_addr_t pa, start, end;
- u64 i;
- /* Setup swapper PGD for fixmap */
+#if !defined(CONFIG_64BIT)
+ /*
+ * In 32-bit, the device tree lies in a pgd entry, so it must be copied
+ * directly in swapper_pg_dir in addition to the pgd entry that points
+ * to fixmap_pte.
+ */
+ unsigned long idx = pgd_index(__fix_to_virt(FIX_FDT));
+
+ set_pgd(&swapper_pg_dir[idx], early_pg_dir[idx]);
+#endif
- create_pgd_mapping(swapper_pg_dir, FIXADDR_START,
- __pa_symbol(fixmap_pgd_next),
- PGDIR_SIZE, PAGE_TABLE);
++
+ for (pa = start; pa < end; pa += map_size) {
+ va = (uintptr_t)__va(pa);
+ map_size = best_map_size(pa, end - pa);
+
+ create_pgd_mapping(swapper_pg_dir, va, pa, map_size,
+ pgprot_from_va(va));
+ }
+ }
+
+ static void __init create_linear_mapping_page_table(void)
+ {
+ phys_addr_t start, end;
+ u64 i;
+
+ #ifdef CONFIG_STRICT_KERNEL_RWX
+ phys_addr_t ktext_start = __pa_symbol(_start);
+ phys_addr_t ktext_size = __init_data_begin - _start;
+ phys_addr_t krodata_start = __pa_symbol(__start_rodata);
+ phys_addr_t krodata_size = _data - __start_rodata;
+
+ /* Isolate kernel text and rodata so they don't get mapped with a PUD */
+ memblock_mark_nomap(ktext_start, ktext_size);
+ memblock_mark_nomap(krodata_start, krodata_size);
+ #endif
/* Map all memory banks in the linear mapping */
for_each_mem_range(i, &start, &end) {
next reply other threads:[~2023-04-20 12:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 12:40 broonie [this message]
2023-04-20 13:23 ` linux-next: manual merge of the risc-v tree with the risc-v-fixes tree Alexandre Ghiti
2023-04-21 11:40 ` Mark Brown
2023-04-21 11:59 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2024-06-28 13:48 Mark Brown
2021-06-09 0:26 Stephen Rothwell
2021-06-09 0:37 ` Palmer Dabbelt
2020-10-07 23:13 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230420124048.65232-1-broonie@kernel.org \
--to=broonie@kernel.org \
--cc=alexghiti@rivosinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=palmer@rivosinc.com \
--cc=paul@pwsan.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox