From: Anup Patel <Anup.Patel@wdc.com>
To: Andreas Schwab <schwab@suse.de>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>
Cc: "linux-kernel@lists.kernel.org" <linux-kernel@lists.kernel.org>
Subject: RE: [PATCH] Use CSR numbers instead of names
Date: Mon, 5 Aug 2019 15:05:43 +0000 [thread overview]
Message-ID: <MN2PR04MB606150E8CA0E45D54A5796028DDA0@MN2PR04MB6061.namprd04.prod.outlook.com> (raw)
In-Reply-To: <mvmr25z4toj.fsf@suse.de>
> -----Original Message-----
> From: linux-riscv <linux-riscv-bounces@lists.infradead.org> On Behalf Of
> Andreas Schwab
> Sent: Monday, August 5, 2019 7:10 PM
> To: linux-riscv@lists.infradead.org
> Cc: linux-kernel@lists.kernel.org
> Subject: [PATCH] Use CSR numbers instead of names
>
> Fixes: f6635f873a60 ("riscv: move switch_mm to its own file")
> Fixes: 671f9a3e2e24 ("RISC-V: Setup initial page tables in two stages")
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> arch/riscv/mm/context.c | 7 +------
> arch/riscv/mm/init.c | 2 +-
> 2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/arch/riscv/mm/context.c b/arch/riscv/mm/context.c index
> 89ceb3cbe218..beeb5d7f92ea 100644
> --- a/arch/riscv/mm/context.c
> +++ b/arch/riscv/mm/context.c
> @@ -57,12 +57,7 @@ void switch_mm(struct mm_struct *prev, struct
> mm_struct *next,
> cpumask_clear_cpu(cpu, mm_cpumask(prev));
> cpumask_set_cpu(cpu, mm_cpumask(next));
>
> - /*
> - * Use the old spbtr name instead of using the current satp
> - * name to support binutils 2.29 which doesn't know about the
> - * privileged ISA 1.10 yet.
> - */
> - csr_write(sptbr, virt_to_pfn(next->pgd) | SATP_MODE);
> + csr_write(CSR_SATP, virt_to_pfn(next->pgd) | SATP_MODE);
> local_flush_tlb_all();
>
> flush_icache_deferred(next);
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index
> 42bf939693d3..238fc4157f8d 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -435,7 +435,7 @@ static void __init setup_vm_final(void)
> clear_fixmap(FIX_PMD);
>
> /* Move to swapper page table */
> - csr_write(sptbr, PFN_DOWN(__pa(swapper_pg_dir)) |
> SATP_MODE);
> + csr_write(CSR_SATP, PFN_DOWN(__pa(swapper_pg_dir)) |
> SATP_MODE);
> local_flush_tlb_all();
> }
>
> --
> 2.22.0
>
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
Looks good to me.
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Regards,
Anup
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2019-08-05 15:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 13:40 [PATCH] Use CSR numbers instead of names Andreas Schwab
2019-08-05 15:05 ` Anup Patel [this message]
2019-08-06 20:49 ` Christoph Hellwig
2019-08-07 0:04 ` Paul Walmsley
2019-08-07 1:31 ` Bin Meng
2019-08-07 1:39 ` Paul Walmsley
2019-08-07 5:40 ` Christoph Hellwig
2019-08-07 13:34 ` Bin Meng
2019-08-07 15:13 ` Christoph Hellwig
2019-08-07 15:47 ` Paul Walmsley
2019-08-07 15:49 ` Paul Walmsley
2019-08-07 16:09 ` Bin Meng
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=MN2PR04MB606150E8CA0E45D54A5796028DDA0@MN2PR04MB6061.namprd04.prod.outlook.com \
--to=anup.patel@wdc.com \
--cc=linux-kernel@lists.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=schwab@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.