[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCv0x2ni97mLEar6M9boWCrXzdsqM3JJNMbe=cDitHj+npanw@mail.gmail.com>
Date: Thu, 25 Mar 2021 19:45:23 -0700
From: Ilya Lipnitskiy <ilya.lipnitskiy@...il.com>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: Matthias Brugger <matthias.bgg@...il.com>,
John Crispin <john@...ozen.org>,
Chuanhong Guo <gch981213@...il.com>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
linux-mips@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] MIPS: ralink: mt7621: add memory detection support
On Thu, Mar 25, 2021 at 3:01 AM Thomas Bogendoerfer
<tsbogend@...ha.franken.de> wrote:
>
> On Tue, Mar 16, 2021 at 10:59:02PM -0700, Ilya Lipnitskiy wrote:
> > From: Chuanhong Guo <gch981213@...il.com>
> >
> > mt7621 has the following memory map:
> > 0x0-0x1c000000: lower 448m memory
> > 0x1c000000-0x2000000: peripheral registers
> > 0x20000000-0x2400000: higher 64m memory
> >
> > detect_memory_region in arch/mips/kernel/setup.c only adds the first
> > memory region and isn't suitable for 512m memory detection because
> > it may accidentally read the memory area for peripheral registers.
> >
> > This commit adds memory detection capability for mt7621:
> > 1. Add the highmem area when 512m is detected.
> > 2. Guard memcmp from accessing peripheral registers:
> > This only happens when a user decided to change kernel load address
> > to 256m or higher address. Since this is a quite unusual case, we
> > just skip 512m testing and return 256m as memory size.
> >
> > [...]
>
> I get
>
> WARNING: modpost: vmlinux.o(.text+0x132c): Section mismatch in reference from the function prom_soc_init() to the function .init.text:mt7621_memory_detect()
> The function prom_soc_init() references
> the function __init mt7621_memory_detect().
> This is often because prom_soc_init lacks a __init
> annotation or the annotation of mt7621_memory_detect is wrong.
>
> Can you please fix this ?
Thanks, I will fix it. Having trouble reproducing the error, but I
clearly see the issue. Are you building on a MIPS target or
cross-compiling (I'm cross-compiling and no errors).
Ilya
Powered by blists - more mailing lists