* [PATCH] Use CSR numbers instead of names
@ 2019-08-05 13:40 Andreas Schwab
2019-08-05 15:05 ` Anup Patel
2019-08-06 20:49 ` Christoph Hellwig
0 siblings, 2 replies; 12+ messages in thread
From: Andreas Schwab @ 2019-08-05 13:40 UTC (permalink / raw)
To: linux-riscv; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* RE: [PATCH] Use CSR numbers instead of names
2019-08-05 13:40 [PATCH] Use CSR numbers instead of names Andreas Schwab
@ 2019-08-05 15:05 ` Anup Patel
2019-08-06 20:49 ` Christoph Hellwig
1 sibling, 0 replies; 12+ messages in thread
From: Anup Patel @ 2019-08-05 15:05 UTC (permalink / raw)
To: Andreas Schwab, linux-riscv; +Cc: linux-kernel
> -----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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
2019-08-05 13:40 [PATCH] Use CSR numbers instead of names Andreas Schwab
2019-08-05 15:05 ` Anup Patel
@ 2019-08-06 20:49 ` Christoph Hellwig
2019-08-07 0:04 ` Paul Walmsley
1 sibling, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2019-08-06 20:49 UTC (permalink / raw)
To: Andreas Schwab; +Cc: linux-kernel, linux-riscv
Looks good. I've been trying to get the same patch in for about two
month now, maybe this one has more luck..
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
2019-08-06 20:49 ` Christoph Hellwig
@ 2019-08-07 0:04 ` Paul Walmsley
2019-08-07 1:31 ` Bin Meng
0 siblings, 1 reply; 12+ messages in thread
From: Paul Walmsley @ 2019-08-07 0:04 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Andreas Schwab, linux-riscv, linux-kernel
On Tue, 6 Aug 2019, Christoph Hellwig wrote:
> Looks good. I've been trying to get the same patch in for about two
> month now, maybe this one has more luck..
Thanks for your patience. If you have patches from one of your earlier
series that you think should go in as fixes, it's helpful for us if you
split them out from patches that are intended for the regular merge
window.
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
2019-08-07 0:04 ` Paul Walmsley
@ 2019-08-07 1:31 ` Bin Meng
2019-08-07 1:39 ` Paul Walmsley
0 siblings, 1 reply; 12+ messages in thread
From: Bin Meng @ 2019-08-07 1:31 UTC (permalink / raw)
To: Paul Walmsley
Cc: Christoph Hellwig, Andreas Schwab, linux-riscv, linux-kernel
On Wed, Aug 7, 2019 at 8:04 AM Paul Walmsley <paul.walmsley@sifive.com> wrote:
>
> On Tue, 6 Aug 2019, Christoph Hellwig wrote:
>
> > Looks good. I've been trying to get the same patch in for about two
> > month now, maybe this one has more luck..
>
> Thanks for your patience. If you have patches from one of your earlier
> series that you think should go in as fixes, it's helpful for us if you
> split them out from patches that are intended for the regular merge
> window.
I have already sent a similar patch (with more places fixed) on Jul 11.
https://patchwork.kernel.org/patch/11039421/
Regards,
Bin
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
2019-08-07 1:31 ` Bin Meng
@ 2019-08-07 1:39 ` Paul Walmsley
2019-08-07 5:40 ` Christoph Hellwig
0 siblings, 1 reply; 12+ messages in thread
From: Paul Walmsley @ 2019-08-07 1:39 UTC (permalink / raw)
To: Bin Meng; +Cc: Christoph Hellwig, Andreas Schwab, linux-riscv, linux-kernel
On Wed, 7 Aug 2019, Bin Meng wrote:
> On Wed, Aug 7, 2019 at 8:04 AM Paul Walmsley <paul.walmsley@sifive.com> wrote:
> >
> > On Tue, 6 Aug 2019, Christoph Hellwig wrote:
> >
> > > Looks good. I've been trying to get the same patch in for about two
> > > month now, maybe this one has more luck..
> >
> > Thanks for your patience. If you have patches from one of your earlier
> > series that you think should go in as fixes, it's helpful for us if you
> > split them out from patches that are intended for the regular merge
> > window.
>
> I have already sent a similar patch (with more places fixed) on Jul 11.
> https://patchwork.kernel.org/patch/11039421/
Christoph's patch predates yours.
If all looks well with your patch, I'll update it to remove the overlap
and queue it after his.
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
2019-08-07 1:39 ` Paul Walmsley
@ 2019-08-07 5:40 ` Christoph Hellwig
2019-08-07 13:34 ` Bin Meng
0 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2019-08-07 5:40 UTC (permalink / raw)
To: Paul Walmsley
Cc: Christoph Hellwig, Andreas Schwab, linux-riscv, Bin Meng, linux-kernel
On Tue, Aug 06, 2019 at 06:39:59PM -0700, Paul Walmsley wrote:
> >
> > I have already sent a similar patch (with more places fixed) on Jul 11.
> > https://patchwork.kernel.org/patch/11039421/
>
> Christoph's patch predates yours.
>
> If all looks well with your patch, I'll update it to remove the overlap
> and queue it after his.
The one from Bin looks most comprehensive, so maybe go with that, plus
the hunk from Andreas for the instance that was only recently introduced.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
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
0 siblings, 2 replies; 12+ messages in thread
From: Bin Meng @ 2019-08-07 13:34 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Andreas Schwab, linux-riscv, linux-kernel, Paul Walmsley
On Wed, Aug 7, 2019 at 1:40 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Tue, Aug 06, 2019 at 06:39:59PM -0700, Paul Walmsley wrote:
> > >
> > > I have already sent a similar patch (with more places fixed) on Jul 11.
> > > https://patchwork.kernel.org/patch/11039421/
> >
> > Christoph's patch predates yours.
> >
> > If all looks well with your patch, I'll update it to remove the overlap
> > and queue it after his.
>
> The one from Bin looks most comprehensive, so maybe go with that, plus
> the hunk from Andreas for the instance that was only recently introduced.
Thanks Christoph.
I've included your SoB and Andreas's into my v2 patch which added the
changes of arch/riscv/mm/init.c that was recently changed.
https://patchwork.kernel.org/patch/11082147/
Regards,
Bin
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
2019-08-07 13:34 ` Bin Meng
@ 2019-08-07 15:13 ` Christoph Hellwig
2019-08-07 15:47 ` Paul Walmsley
1 sibling, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2019-08-07 15:13 UTC (permalink / raw)
To: Bin Meng
Cc: Christoph Hellwig, Andreas Schwab, linux-riscv, Paul Walmsley,
linux-kernel
On Wed, Aug 07, 2019 at 09:34:03PM +0800, Bin Meng wrote:
> I've included your SoB and Andreas's into my v2 patch which added the
> changes of arch/riscv/mm/init.c that was recently changed.
> https://patchwork.kernel.org/patch/11082147/
I don;t think you need mine at all, as you did the same change
independently. And maybe well just keep the hunk from Andreas separate
to keep it simple.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
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
1 sibling, 2 replies; 12+ messages in thread
From: Paul Walmsley @ 2019-08-07 15:47 UTC (permalink / raw)
To: Bin Meng; +Cc: Christoph Hellwig, Andreas Schwab, linux-riscv, linux-kernel
On Wed, 7 Aug 2019, Bin Meng wrote:
> On Wed, Aug 7, 2019 at 1:40 PM Christoph Hellwig <hch@infradead.org> wrote:
> >
> > On Tue, Aug 06, 2019 at 06:39:59PM -0700, Paul Walmsley wrote:
> > > >
> > > > I have already sent a similar patch (with more places fixed) on Jul 11.
> > > > https://patchwork.kernel.org/patch/11039421/
> > >
> > > Christoph's patch predates yours.
> > >
> > > If all looks well with your patch, I'll update it to remove the overlap
> > > and queue it after his.
> >
> > The one from Bin looks most comprehensive, so maybe go with that, plus
> > the hunk from Andreas for the instance that was only recently introduced.
>
> Thanks Christoph.
>
> I've included your SoB and Andreas's into my v2 patch which added the
> changes of arch/riscv/mm/init.c that was recently changed.
> https://patchwork.kernel.org/patch/11082147/
Best not to add others' Signed-off-by:s unless they explicitly offer them.
Adding a Signed-off-by: for the kernel denotes that that person has
accepted the Developer's Statement of Origin here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n431
Could you please either convert those into Co-developed-by: lines or ask
Christoph and Andreas for explicit Signed-off-by:s, Acked-by:s, or
Reviewed-by:s ?
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
2019-08-07 15:47 ` Paul Walmsley
@ 2019-08-07 15:49 ` Paul Walmsley
2019-08-07 16:09 ` Bin Meng
1 sibling, 0 replies; 12+ messages in thread
From: Paul Walmsley @ 2019-08-07 15:49 UTC (permalink / raw)
To: Bin Meng; +Cc: Christoph Hellwig, Andreas Schwab, linux-riscv, linux-kernel
On Wed, 7 Aug 2019, Paul Walmsley wrote:
> On Wed, 7 Aug 2019, Bin Meng wrote:
>
> > On Wed, Aug 7, 2019 at 1:40 PM Christoph Hellwig <hch@infradead.org> wrote:
> > >
> > > On Tue, Aug 06, 2019 at 06:39:59PM -0700, Paul Walmsley wrote:
> > > > >
> > > > > I have already sent a similar patch (with more places fixed) on Jul 11.
> > > > > https://patchwork.kernel.org/patch/11039421/
> > > >
> > > > Christoph's patch predates yours.
> > > >
> > > > If all looks well with your patch, I'll update it to remove the overlap
> > > > and queue it after his.
> > >
> > > The one from Bin looks most comprehensive, so maybe go with that, plus
> > > the hunk from Andreas for the instance that was only recently introduced.
> >
> > Thanks Christoph.
> >
> > I've included your SoB and Andreas's into my v2 patch which added the
> > changes of arch/riscv/mm/init.c that was recently changed.
> > https://patchwork.kernel.org/patch/11082147/
>
> Best not to add others' Signed-off-by:s unless they explicitly offer them.
> Adding a Signed-off-by: for the kernel denotes that that person has
> accepted the Developer's Statement of Origin here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n431
>
> Could you please either convert those into Co-developed-by: lines or ask
Actually even Co-developed-by: lines require Signed-off-by:s as well:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n548
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Use CSR numbers instead of names
2019-08-07 15:47 ` Paul Walmsley
2019-08-07 15:49 ` Paul Walmsley
@ 2019-08-07 16:09 ` Bin Meng
1 sibling, 0 replies; 12+ messages in thread
From: Bin Meng @ 2019-08-07 16:09 UTC (permalink / raw)
To: Paul Walmsley
Cc: Christoph Hellwig, Andreas Schwab, linux-riscv, linux-kernel
On Wed, Aug 7, 2019 at 11:47 PM Paul Walmsley <paul.walmsley@sifive.com> wrote:
>
> On Wed, 7 Aug 2019, Bin Meng wrote:
>
> > On Wed, Aug 7, 2019 at 1:40 PM Christoph Hellwig <hch@infradead.org> wrote:
> > >
> > > On Tue, Aug 06, 2019 at 06:39:59PM -0700, Paul Walmsley wrote:
> > > > >
> > > > > I have already sent a similar patch (with more places fixed) on Jul 11.
> > > > > https://patchwork.kernel.org/patch/11039421/
> > > >
> > > > Christoph's patch predates yours.
> > > >
> > > > If all looks well with your patch, I'll update it to remove the overlap
> > > > and queue it after his.
> > >
> > > The one from Bin looks most comprehensive, so maybe go with that, plus
> > > the hunk from Andreas for the instance that was only recently introduced.
> >
> > Thanks Christoph.
> >
> > I've included your SoB and Andreas's into my v2 patch which added the
> > changes of arch/riscv/mm/init.c that was recently changed.
> > https://patchwork.kernel.org/patch/11082147/
>
> Best not to add others' Signed-off-by:s unless they explicitly offer them.
> Adding a Signed-off-by: for the kernel denotes that that person has
> accepted the Developer's Statement of Origin here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n431
>
> Could you please either convert those into Co-developed-by: lines or ask
> Christoph and Andreas for explicit Signed-off-by:s, Acked-by:s, or
> Reviewed-by:s ?
OK, I will remove these SoB tags.
Regards,
Bin
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-08-07 16:09 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 13:40 [PATCH] Use CSR numbers instead of names Andreas Schwab
2019-08-05 15:05 ` Anup Patel
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).