mbox series

[v2,0/6] Fixmap support and MM cleanups

Message ID 20190119132650.9978-1-anup.patel@wdc.com (mailing list archive)
Headers show
Series Fixmap support and MM cleanups | expand

Message

Anup Patel Jan. 19, 2019, 1:27 p.m. UTC
This patchset does:
1. Moves MM related code from kernel/setup.c to mm/init.c
2. Implements compile-time fixed mappings

Using fixed mappings available, we can now get earlyprints
even without SBI calls. For example, we can use kernel
parameter "earlycon=uart8250,mmio,0x10000000" to get early
prints on QEMU virt machine without using SBI calls.

The patchset is tested on QEMU virt machine. It is based on
Linux-5.0-rc2 and can be found at riscv_fixmap_v2 branch of:
https://github.com/avpatel/linux.git.

Changes since v1:
 - Use more characters per line in changelog of PATCH3
 - Removed #ifndef __ASSEMBLY__ from PATCH5
 - Use more characters per line in commets of PATCH5
 - Added PATCH6 to implement keepinitrd kernel parameter

Anup Patel (6):
  RISC-V: Move free_initrd_mem() to kernel/setup.c
  RISC-V: Setup init_mm before parse_early_param()
  RISC-V: Move setup_bootmem() to mm/init.c
  RISC-V: Move setup_vm() to mm/init.c
  RISC-V: Implement compile-time fixed mappings
  RISC-V: Implement keepinitrd kernel parameter

 arch/riscv/Kconfig               |   3 +
 arch/riscv/include/asm/fixmap.h  |  44 +++++++++++
 arch/riscv/include/asm/pgtable.h |   1 +
 arch/riscv/kernel/setup.c        | 114 ++++++----------------------
 arch/riscv/mm/init.c             | 124 ++++++++++++++++++++++++++++++-
 5 files changed, 189 insertions(+), 97 deletions(-)
 create mode 100644 arch/riscv/include/asm/fixmap.h

Comments

Anup Patel Feb. 11, 2019, 6:27 a.m. UTC | #1
Hi All,

Any comments on this series ??

Regards,
Anup
Palmer Dabbelt Feb. 12, 2019, 11:15 p.m. UTC | #2
On Sat, 19 Jan 2019 05:27:53 PST (-0800), Anup Patel wrote:
> This patchset does:
> 1. Moves MM related code from kernel/setup.c to mm/init.c
> 2. Implements compile-time fixed mappings
>
> Using fixed mappings available, we can now get earlyprints
> even without SBI calls. For example, we can use kernel
> parameter "earlycon=uart8250,mmio,0x10000000" to get early
> prints on QEMU virt machine without using SBI calls.
>
> The patchset is tested on QEMU virt machine. It is based on
> Linux-5.0-rc2 and can be found at riscv_fixmap_v2 branch of:
> https://github.com/avpatel/linux.git.
>
> Changes since v1:
>  - Use more characters per line in changelog of PATCH3
>  - Removed #ifndef __ASSEMBLY__ from PATCH5
>  - Use more characters per line in commets of PATCH5
>  - Added PATCH6 to implement keepinitrd kernel parameter
>
> Anup Patel (6):
>   RISC-V: Move free_initrd_mem() to kernel/setup.c
>   RISC-V: Setup init_mm before parse_early_param()
>   RISC-V: Move setup_bootmem() to mm/init.c
>   RISC-V: Move setup_vm() to mm/init.c
>   RISC-V: Implement compile-time fixed mappings
>   RISC-V: Implement keepinitrd kernel parameter
>
>  arch/riscv/Kconfig               |   3 +
>  arch/riscv/include/asm/fixmap.h  |  44 +++++++++++
>  arch/riscv/include/asm/pgtable.h |   1 +
>  arch/riscv/kernel/setup.c        | 114 ++++++----------------------
>  arch/riscv/mm/init.c             | 124 ++++++++++++++++++++++++++++++-
>  5 files changed, 189 insertions(+), 97 deletions(-)
>  create mode 100644 arch/riscv/include/asm/fixmap.h

I'm getting some git issue when trying to merge the third patch via email

    $ mhng-pipe-show_stdout 4 | git am -s
    Applying: RISC-V: Move setup_bootmem() to mm/init.c
    error: patch failed: arch/riscv/kernel/setup.c:163
    error: arch/riscv/kernel/setup.c: patch does not apply
    Patch failed at 0001 RISC-V: Move setup_bootmem() to mm/init.c
    Use 'git am --show-current-patch' to see the failed patch
    When you have resolved this problem, run "git am --continue".
    If you prefer to skip this patch, run "git am --skip" instead.
    To restore the original branch and stop patching, run "git am --abort".

can you send a PR with a signed tag?  I'll include this as part of the next 
merge window.

Reviewed-by: Palmer Dabbelt <palmer@sifive.com>

Thanks!
Anup Patel Feb. 13, 2019, 8:21 a.m. UTC | #3
On Wed, Feb 13, 2019 at 4:45 AM Palmer Dabbelt <palmer@sifive.com> wrote:
>
> On Sat, 19 Jan 2019 05:27:53 PST (-0800), Anup Patel wrote:
> > This patchset does:
> > 1. Moves MM related code from kernel/setup.c to mm/init.c
> > 2. Implements compile-time fixed mappings
> >
> > Using fixed mappings available, we can now get earlyprints
> > even without SBI calls. For example, we can use kernel
> > parameter "earlycon=uart8250,mmio,0x10000000" to get early
> > prints on QEMU virt machine without using SBI calls.
> >
> > The patchset is tested on QEMU virt machine. It is based on
> > Linux-5.0-rc2 and can be found at riscv_fixmap_v2 branch of:
> > https://github.com/avpatel/linux.git.
> >
> > Changes since v1:
> >  - Use more characters per line in changelog of PATCH3
> >  - Removed #ifndef __ASSEMBLY__ from PATCH5
> >  - Use more characters per line in commets of PATCH5
> >  - Added PATCH6 to implement keepinitrd kernel parameter
> >
> > Anup Patel (6):
> >   RISC-V: Move free_initrd_mem() to kernel/setup.c
> >   RISC-V: Setup init_mm before parse_early_param()
> >   RISC-V: Move setup_bootmem() to mm/init.c
> >   RISC-V: Move setup_vm() to mm/init.c
> >   RISC-V: Implement compile-time fixed mappings
> >   RISC-V: Implement keepinitrd kernel parameter
> >
> >  arch/riscv/Kconfig               |   3 +
> >  arch/riscv/include/asm/fixmap.h  |  44 +++++++++++
> >  arch/riscv/include/asm/pgtable.h |   1 +
> >  arch/riscv/kernel/setup.c        | 114 ++++++----------------------
> >  arch/riscv/mm/init.c             | 124 ++++++++++++++++++++++++++++++-
> >  5 files changed, 189 insertions(+), 97 deletions(-)
> >  create mode 100644 arch/riscv/include/asm/fixmap.h
>
> I'm getting some git issue when trying to merge the third patch via email
>
>     $ mhng-pipe-show_stdout 4 | git am -s
>     Applying: RISC-V: Move setup_bootmem() to mm/init.c
>     error: patch failed: arch/riscv/kernel/setup.c:163
>     error: arch/riscv/kernel/setup.c: patch does not apply
>     Patch failed at 0001 RISC-V: Move setup_bootmem() to mm/init.c
>     Use 'git am --show-current-patch' to see the failed patch
>     When you have resolved this problem, run "git am --continue".
>     If you prefer to skip this patch, run "git am --skip" instead.
>     To restore the original branch and stop patching, run "git am --abort".
>
> can you send a PR with a signed tag?  I'll include this as part of the next
> merge window.
>
> Reviewed-by: Palmer Dabbelt <palmer@sifive.com>

Okay, I will prepare a PR with following patchsets:
1. Fixmap support and MM cleanups (Author: Anup Patel)
2. riscv: minor fixes and cleanups (Author: Johan Hovold)
3. RISC-V related changes from "Various SMP related fixes" (Author: Atish Patra)

All above patchsets touch same source files so this will
help you.

Regards,
Anup
Johan Hovold Feb. 13, 2019, 9:20 a.m. UTC | #4
On Wed, Feb 13, 2019 at 01:51:43PM +0530, Anup Patel wrote:
> On Wed, Feb 13, 2019 at 4:45 AM Palmer Dabbelt <palmer@sifive.com> wrote:
> >
> > On Sat, 19 Jan 2019 05:27:53 PST (-0800), Anup Patel wrote:
> > > This patchset does:
> > > 1. Moves MM related code from kernel/setup.c to mm/init.c
> > > 2. Implements compile-time fixed mappings

> > >  arch/riscv/Kconfig               |   3 +
> > >  arch/riscv/include/asm/fixmap.h  |  44 +++++++++++
> > >  arch/riscv/include/asm/pgtable.h |   1 +
> > >  arch/riscv/kernel/setup.c        | 114 ++++++----------------------
> > >  arch/riscv/mm/init.c             | 124 ++++++++++++++++++++++++++++++-
> > >  5 files changed, 189 insertions(+), 97 deletions(-)
> > >  create mode 100644 arch/riscv/include/asm/fixmap.h
> >
> > I'm getting some git issue when trying to merge the third patch via email
> >
> >     $ mhng-pipe-show_stdout 4 | git am -s
> >     Applying: RISC-V: Move setup_bootmem() to mm/init.c
> >     error: patch failed: arch/riscv/kernel/setup.c:163
> >     error: arch/riscv/kernel/setup.c: patch does not apply
> >     Patch failed at 0001 RISC-V: Move setup_bootmem() to mm/init.c
> >     Use 'git am --show-current-patch' to see the failed patch
> >     When you have resolved this problem, run "git am --continue".
> >     If you prefer to skip this patch, run "git am --skip" instead.
> >     To restore the original branch and stop patching, run "git am --abort".
> >
> > can you send a PR with a signed tag?  I'll include this as part of the next
> > merge window.
> >
> > Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
> 
> Okay, I will prepare a PR with following patchsets:
> 1. Fixmap support and MM cleanups (Author: Anup Patel)
> 2. riscv: minor fixes and cleanups (Author: Johan Hovold)
> 3. RISC-V related changes from "Various SMP related fixes" (Author: Atish Patra)
> 
> All above patchsets touch same source files so this will
> help you.

I'd suggest keeping these separate. Your series failed to apply, and it
looks like you've now posted a v4 to address that.

If your series is merged before mine, I'm sure any conflicts are
trivial, or I can always respin.

Atish's series might need another revision, so that one should not be
included either.

Johan
Palmer Dabbelt Feb. 14, 2019, 12:37 a.m. UTC | #5
On Wed, 13 Feb 2019 00:21:43 PST (-0800), anup@brainfault.org wrote:
> On Wed, Feb 13, 2019 at 4:45 AM Palmer Dabbelt <palmer@sifive.com> wrote:
>>
>> On Sat, 19 Jan 2019 05:27:53 PST (-0800), Anup Patel wrote:
>> > This patchset does:
>> > 1. Moves MM related code from kernel/setup.c to mm/init.c
>> > 2. Implements compile-time fixed mappings
>> >
>> > Using fixed mappings available, we can now get earlyprints
>> > even without SBI calls. For example, we can use kernel
>> > parameter "earlycon=uart8250,mmio,0x10000000" to get early
>> > prints on QEMU virt machine without using SBI calls.
>> >
>> > The patchset is tested on QEMU virt machine. It is based on
>> > Linux-5.0-rc2 and can be found at riscv_fixmap_v2 branch of:
>> > https://github.com/avpatel/linux.git.
>> >
>> > Changes since v1:
>> >  - Use more characters per line in changelog of PATCH3
>> >  - Removed #ifndef __ASSEMBLY__ from PATCH5
>> >  - Use more characters per line in commets of PATCH5
>> >  - Added PATCH6 to implement keepinitrd kernel parameter
>> >
>> > Anup Patel (6):
>> >   RISC-V: Move free_initrd_mem() to kernel/setup.c
>> >   RISC-V: Setup init_mm before parse_early_param()
>> >   RISC-V: Move setup_bootmem() to mm/init.c
>> >   RISC-V: Move setup_vm() to mm/init.c
>> >   RISC-V: Implement compile-time fixed mappings
>> >   RISC-V: Implement keepinitrd kernel parameter
>> >
>> >  arch/riscv/Kconfig               |   3 +
>> >  arch/riscv/include/asm/fixmap.h  |  44 +++++++++++
>> >  arch/riscv/include/asm/pgtable.h |   1 +
>> >  arch/riscv/kernel/setup.c        | 114 ++++++----------------------
>> >  arch/riscv/mm/init.c             | 124 ++++++++++++++++++++++++++++++-
>> >  5 files changed, 189 insertions(+), 97 deletions(-)
>> >  create mode 100644 arch/riscv/include/asm/fixmap.h
>>
>> I'm getting some git issue when trying to merge the third patch via email
>>
>>     $ mhng-pipe-show_stdout 4 | git am -s
>>     Applying: RISC-V: Move setup_bootmem() to mm/init.c
>>     error: patch failed: arch/riscv/kernel/setup.c:163
>>     error: arch/riscv/kernel/setup.c: patch does not apply
>>     Patch failed at 0001 RISC-V: Move setup_bootmem() to mm/init.c
>>     Use 'git am --show-current-patch' to see the failed patch
>>     When you have resolved this problem, run "git am --continue".
>>     If you prefer to skip this patch, run "git am --skip" instead.
>>     To restore the original branch and stop patching, run "git am --abort".
>>
>> can you send a PR with a signed tag?  I'll include this as part of the next
>> merge window.
>>
>> Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
>
> Okay, I will prepare a PR with following patchsets:
> 1. Fixmap support and MM cleanups (Author: Anup Patel)
> 2. riscv: minor fixes and cleanups (Author: Johan Hovold)
> 3. RISC-V related changes from "Various SMP related fixes" (Author: Atish Patra)
>
> All above patchsets touch same source files so this will
> help you.

Thanks.  There's also a handful of comments from Christoph that I agree with 
about the keepinitrd stuff.
Anup Patel Feb. 14, 2019, 8:28 a.m. UTC | #6
On Thu, Feb 14, 2019 at 6:07 AM Palmer Dabbelt <palmer@sifive.com> wrote:
>
> On Wed, 13 Feb 2019 00:21:43 PST (-0800), anup@brainfault.org wrote:
> > On Wed, Feb 13, 2019 at 4:45 AM Palmer Dabbelt <palmer@sifive.com> wrote:
> >>
> >> On Sat, 19 Jan 2019 05:27:53 PST (-0800), Anup Patel wrote:
> >> > This patchset does:
> >> > 1. Moves MM related code from kernel/setup.c to mm/init.c
> >> > 2. Implements compile-time fixed mappings
> >> >
> >> > Using fixed mappings available, we can now get earlyprints
> >> > even without SBI calls. For example, we can use kernel
> >> > parameter "earlycon=uart8250,mmio,0x10000000" to get early
> >> > prints on QEMU virt machine without using SBI calls.
> >> >
> >> > The patchset is tested on QEMU virt machine. It is based on
> >> > Linux-5.0-rc2 and can be found at riscv_fixmap_v2 branch of:
> >> > https://github.com/avpatel/linux.git.
> >> >
> >> > Changes since v1:
> >> >  - Use more characters per line in changelog of PATCH3
> >> >  - Removed #ifndef __ASSEMBLY__ from PATCH5
> >> >  - Use more characters per line in commets of PATCH5
> >> >  - Added PATCH6 to implement keepinitrd kernel parameter
> >> >
> >> > Anup Patel (6):
> >> >   RISC-V: Move free_initrd_mem() to kernel/setup.c
> >> >   RISC-V: Setup init_mm before parse_early_param()
> >> >   RISC-V: Move setup_bootmem() to mm/init.c
> >> >   RISC-V: Move setup_vm() to mm/init.c
> >> >   RISC-V: Implement compile-time fixed mappings
> >> >   RISC-V: Implement keepinitrd kernel parameter
> >> >
> >> >  arch/riscv/Kconfig               |   3 +
> >> >  arch/riscv/include/asm/fixmap.h  |  44 +++++++++++
> >> >  arch/riscv/include/asm/pgtable.h |   1 +
> >> >  arch/riscv/kernel/setup.c        | 114 ++++++----------------------
> >> >  arch/riscv/mm/init.c             | 124 ++++++++++++++++++++++++++++++-
> >> >  5 files changed, 189 insertions(+), 97 deletions(-)
> >> >  create mode 100644 arch/riscv/include/asm/fixmap.h
> >>
> >> I'm getting some git issue when trying to merge the third patch via email
> >>
> >>     $ mhng-pipe-show_stdout 4 | git am -s
> >>     Applying: RISC-V: Move setup_bootmem() to mm/init.c
> >>     error: patch failed: arch/riscv/kernel/setup.c:163
> >>     error: arch/riscv/kernel/setup.c: patch does not apply
> >>     Patch failed at 0001 RISC-V: Move setup_bootmem() to mm/init.c
> >>     Use 'git am --show-current-patch' to see the failed patch
> >>     When you have resolved this problem, run "git am --continue".
> >>     If you prefer to skip this patch, run "git am --skip" instead.
> >>     To restore the original branch and stop patching, run "git am --abort".
> >>
> >> can you send a PR with a signed tag?  I'll include this as part of the next
> >> merge window.
> >>
> >> Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
> >
> > Okay, I will prepare a PR with following patchsets:
> > 1. Fixmap support and MM cleanups (Author: Anup Patel)
> > 2. riscv: minor fixes and cleanups (Author: Johan Hovold)
> > 3. RISC-V related changes from "Various SMP related fixes" (Author: Atish Patra)
> >
> > All above patchsets touch same source files so this will
> > help you.
>
> Thanks.  There's also a handful of comments from Christoph that I agree with
> about the keepinitrd stuff.

I have sent PR with Fixmap patches only.

Johan and Atish will rebase their patches based on your tree.

Regards,
Anup