[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya+EUDVYdBvRa7xI@kernel.org>
Date: Tue, 7 Dec 2021 17:57:04 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Mark-PK Tsai <mark-pk.tsai@...iatek.com>
Cc: linux@...linux.org.uk, matthias.bgg@...il.com,
rmk+kernel@...linux.org.uk, arnd@...db.de,
akpm@...ux-foundation.org, linux@...ck-us.net,
wangkefeng.wang@...wei.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
yj.chiang@...iatek.com
Subject: Re: [PATCH] arm: remove [_text, _stext) from kernel code resource
On Fri, Dec 03, 2021 at 10:14:16PM +0800, Mark-PK Tsai wrote:
> Remove the [_text, _stext) from Kernel Code.
> Although there are some startup code in head.text, they
> are freed to the buddy system after kernel boot.
Hmm, I don't see it is being freed anywhere. Can you elaborate when and how
the range [_text, _stext) is freed?
> And we have memory protection mechanism use this
> which have false alarm when some other IPs doing dma
> if the dma page frame is in the [_text, _stext).
>
> Below are my iomem resource and reserved memory information:
> console:/ # grep Kernel /proc/iomem
> 20208000-219fffff : Kernel code
> 21b00000-21c2e76f : Kernel data
>
> console:/ # cat /sys/kernel/debug/memblock/reserved
> 0: 0x20201000..0x20207fff
> 1: 0x20300000..0x21c2e76f
What are the addresses of _text and _stext in your configuration?
What these dumps are supposed to show here?
> Signed-off-by: Mark-PK Tsai <mark-pk.tsai@...iatek.com>
> ---
> arch/arm/kernel/setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index 284a80c0b6e1..85ffc9501e38 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -851,7 +851,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
> struct resource *res;
> u64 i;
>
> - kernel_code.start = virt_to_phys(_text);
> + kernel_code.start = virt_to_phys(_stext);
> kernel_code.end = virt_to_phys(__init_begin - 1);
> kernel_data.start = virt_to_phys(_sdata);
> kernel_data.end = virt_to_phys(_end - 1);
> --
> 2.18.0
>
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists