* [PATCH] m68k: mm: fix node memblock init
@ 2020-06-14 22:51 Angelo Dureghello
2020-06-15 6:26 ` Mike Rapoport
0 siblings, 1 reply; 4+ messages in thread
From: Angelo Dureghello @ 2020-06-14 22:51 UTC (permalink / raw)
To: gerg; +Cc: linux-m68k, rppt, Angelo Dureghello
After pulling 5.7.0 (linux-next merge), mcf5441x mmu boot was
hanging silently.
memblock_add() seems not appropriate, since using MAX_NUMNODES
as node id, while memblock_add_node() sets up memory for node id 0.
Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
---
arch/m68k/mm/mcfmmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c
index 29f47923aa46..7d04210d34f0 100644
--- a/arch/m68k/mm/mcfmmu.c
+++ b/arch/m68k/mm/mcfmmu.c
@@ -174,7 +174,7 @@ void __init cf_bootmem_alloc(void)
m68k_memory[0].addr = _rambase;
m68k_memory[0].size = _ramend - _rambase;
- memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
+ memblock_add_node(m68k_memory[0].addr, m68k_memory[0].size, 0);
/* compute total pages in system */
num_pages = PFN_DOWN(_ramend - _rambase);
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] m68k: mm: fix node memblock init
2020-06-14 22:51 [PATCH] m68k: mm: fix node memblock init Angelo Dureghello
@ 2020-06-15 6:26 ` Mike Rapoport
2020-06-15 9:16 ` Angelo Dureghello
0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2020-06-15 6:26 UTC (permalink / raw)
To: Angelo Dureghello; +Cc: gerg, linux-m68k
Ho Angelo,
On Mon, Jun 15, 2020 at 12:51:19AM +0200, Angelo Dureghello wrote:
> After pulling 5.7.0 (linux-next merge), mcf5441x mmu boot was
> hanging silently.
>
> memblock_add() seems not appropriate, since using MAX_NUMNODES
> as node id, while memblock_add_node() sets up memory for node id 0.
>
> Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
The fix is correct, but it is not complete as nommu should be also
fixed.
I've updated your patch with nommu fix [1].
[1] https://lore.kernel.org/lkml/20200615062234.GA7882@kernel.org
> ---
> arch/m68k/mm/mcfmmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c
> index 29f47923aa46..7d04210d34f0 100644
> --- a/arch/m68k/mm/mcfmmu.c
> +++ b/arch/m68k/mm/mcfmmu.c
> @@ -174,7 +174,7 @@ void __init cf_bootmem_alloc(void)
> m68k_memory[0].addr = _rambase;
> m68k_memory[0].size = _ramend - _rambase;
>
> - memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
> + memblock_add_node(m68k_memory[0].addr, m68k_memory[0].size, 0);
>
> /* compute total pages in system */
> num_pages = PFN_DOWN(_ramend - _rambase);
> --
> 2.26.2
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] m68k: mm: fix node memblock init
2020-06-15 6:26 ` Mike Rapoport
@ 2020-06-15 9:16 ` Angelo Dureghello
2020-06-15 9:38 ` Angelo Dureghello
0 siblings, 1 reply; 4+ messages in thread
From: Angelo Dureghello @ 2020-06-15 9:16 UTC (permalink / raw)
To: Mike Rapoport; +Cc: Greg Ungerer, linux-m68k
Hi Mike,
On Mon, Jun 15, 2020 at 8:26 AM Mike Rapoport <rppt@linux.ibm.com> wrote:
>
> Ho Angelo,
>
> On Mon, Jun 15, 2020 at 12:51:19AM +0200, Angelo Dureghello wrote:
> > After pulling 5.7.0 (linux-next merge), mcf5441x mmu boot was
> > hanging silently.
> >
> > memblock_add() seems not appropriate, since using MAX_NUMNODES
> > as node id, while memblock_add_node() sets up memory for node id 0.
> >
> > Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
>
> The fix is correct, but it is not complete as nommu should be also
> fixed.
> I've updated your patch with nommu fix [1].
>
> [1] https://lore.kernel.org/lkml/20200615062234.GA7882@kernel.org
>
Thanks a lot !
Will try the no-mmu fix also in short.
> > ---
> > arch/m68k/mm/mcfmmu.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c
> > index 29f47923aa46..7d04210d34f0 100644
> > --- a/arch/m68k/mm/mcfmmu.c
> > +++ b/arch/m68k/mm/mcfmmu.c
> > @@ -174,7 +174,7 @@ void __init cf_bootmem_alloc(void)
> > m68k_memory[0].addr = _rambase;
> > m68k_memory[0].size = _ramend - _rambase;
> >
> > - memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
> > + memblock_add_node(m68k_memory[0].addr, m68k_memory[0].size, 0);
> >
> > /* compute total pages in system */
> > num_pages = PFN_DOWN(_ramend - _rambase);
> > --
> > 2.26.2
> >
>
> --
> Sincerely yours,
> Mike.
Regards,
angelo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] m68k: mm: fix node memblock init
2020-06-15 9:16 ` Angelo Dureghello
@ 2020-06-15 9:38 ` Angelo Dureghello
0 siblings, 0 replies; 4+ messages in thread
From: Angelo Dureghello @ 2020-06-15 9:38 UTC (permalink / raw)
To: Mike Rapoport; +Cc: Greg Ungerer, linux-m68k
Hi Mike,
tested also no-mmu on mcf5441x, i think the fix itself works.
I think i am not in the recipient list of your new patch,
so i leave you my tested-by for no-mmu here.
Tested-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Then, i see something else wrong when mounting ext4 (sdcard). It seems
to be totally unrelated,
will investigate and help as soon as i have some time.
[ 15.930000] EXT4-fs (mmcblk0p2): recovery complete
[ 15.940000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered
data mode. Opts: (null)
[ 15.950000] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 15.980000] devtmpfs: mounted
[ 15.990000] BUG: Bad page state in process swapper pfn:20127
[ 15.990000] page:47f804e0 refcount:0 mapcount:1 mapping:00000000 index:0x0
[ 15.990000] flags: 0x0()
[ 15.990000] raw: 00000000 00000100 00000122 00000000 00000000
00000000 00000000 00000000
[ 15.990000] page dumped because: nonzero mapcount
[ 15.990000] CPU: 0 PID: 1 Comm: swapper Not tainted
5.7.0stmark2-001-14991-ge6ff2d647c68-dirty #181
[ 15.990000] Stack from 402e1ed4:
[ 15.990000] 402e1ed4 40217bfa 40217bfa 4004fb4e 47f804e0
40216578 40216548 402dc2b4
[ 15.990000] 00020127 ffffffff 47f804e0 4004fbcc 47f804e0
40216578 00000001 47f804e4
[ 15.990000] 4005037e 47f804e0 0000020a 47f72000 ffffffff
40260000 47f804e0 47f72c10
[ 15.990000] 47f72c10 47f804e0 00000000 402e1f40 402e1f40
400504f8 4024d208 00000001
[ 15.990000] 47f72c04 47f804e0 401bee84 4005228a 40052b90
40050f82 47f804e0 00000000
[ 15.990000] 402102d0 40052c52 47f804e0 00000000 00000000
4025cfda 400215dc 40057246
[ 15.990000] Call Trace: [<4004fb4e>] bad_page+0xb4/0xd4
[ 15.990000] [<4004fbcc>] check_free_page+0x5e/0x6a
[ 15.990000] [<4005037e>] free_pcppages_bulk+0x7e/0x10c
[ 15.990000] [<400504f8>] free_unref_page_commit.isra.126+0x6e/0x7c
[ 15.990000] [<401bee84>] memset+0x0/0x80
[ 15.990000] [<4005228a>] __free_pages+0x0/0x14
[ 15.990000] [<40052b90>] adjust_managed_page_count+0x0/0x32
[ 15.990000] [<40050f82>] free_unref_page+0x46/0x50
[ 15.990000] [<40052c52>] free_reserved_area+0x90/0xcc
[ 15.990000] [<400215dc>] complete+0x0/0x2e
[ 15.990000] [<40057246>] kfree+0x0/0x138
[ 15.990000] [<401bf056>] kernel_init+0x0/0xd2
[ 15.990000] [<40002eec>] free_initmem+0x1c/0x24
[ 15.990000] [<4024e000>] set_reset_devices+0x0/0xa
[ 15.990000] [<401bf06a>] kernel_init+0x14/0xd2
[ 15.990000] [<400018c8>] ret_from_kernel_thread+0xc/0x14
I have the prompt anyway here.
Regards,
angelo
On Mon, Jun 15, 2020 at 11:16 AM Angelo Dureghello
<angelo.dureghello@timesys.com> wrote:
>
> Hi Mike,
>
> On Mon, Jun 15, 2020 at 8:26 AM Mike Rapoport <rppt@linux.ibm.com> wrote:
> >
> > Ho Angelo,
> >
> > On Mon, Jun 15, 2020 at 12:51:19AM +0200, Angelo Dureghello wrote:
> > > After pulling 5.7.0 (linux-next merge), mcf5441x mmu boot was
> > > hanging silently.
> > >
> > > memblock_add() seems not appropriate, since using MAX_NUMNODES
> > > as node id, while memblock_add_node() sets up memory for node id 0.
> > >
> > > Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
> >
> > The fix is correct, but it is not complete as nommu should be also
> > fixed.
> > I've updated your patch with nommu fix [1].
> >
> > [1] https://lore.kernel.org/lkml/20200615062234.GA7882@kernel.org
> >
>
> Thanks a lot !
> Will try the no-mmu fix also in short.
>
>
> > > ---
> > > arch/m68k/mm/mcfmmu.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c
> > > index 29f47923aa46..7d04210d34f0 100644
> > > --- a/arch/m68k/mm/mcfmmu.c
> > > +++ b/arch/m68k/mm/mcfmmu.c
> > > @@ -174,7 +174,7 @@ void __init cf_bootmem_alloc(void)
> > > m68k_memory[0].addr = _rambase;
> > > m68k_memory[0].size = _ramend - _rambase;
> > >
> > > - memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
> > > + memblock_add_node(m68k_memory[0].addr, m68k_memory[0].size, 0);
> > >
> > > /* compute total pages in system */
> > > num_pages = PFN_DOWN(_ramend - _rambase);
> > > --
> > > 2.26.2
> > >
> >
> > --
> > Sincerely yours,
> > Mike.
>
> Regards,
> angelo
--
Angelo Dureghello
Timesys
e. angelo.dureghello@timesys.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-15 9:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 22:51 [PATCH] m68k: mm: fix node memblock init Angelo Dureghello
2020-06-15 6:26 ` Mike Rapoport
2020-06-15 9:16 ` Angelo Dureghello
2020-06-15 9:38 ` Angelo Dureghello
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).