From: Michal Hocko <mhocko@kernel.org>
To: Stefan Agner <stefan@agner.ch>
Cc: Russell King - ARM Linux <linux@armlinux.org.uk>,
LKML <linux-kernel@vger.kernel.org>,
linux-kernel-owner@vger.kernel.org
Subject: Re: arch/arm/kernel/setup.c fails to compile for NOMMU
Date: Mon, 11 Mar 2019 09:52:08 +0100 [thread overview]
Message-ID: <20190311085208.GY5232@dhcp22.suse.cz> (raw)
In-Reply-To: <be04f030b480d88aed666698dcd06c5e@agner.ch>
On Tue 05-03-19 23:08:45, Stefan Agner wrote:
> Hi Michal,
>
> On 06.04.2018 11:56, Michal Hocko wrote:
> > On Fri 25-08-17 08:45:40, Michal Hocko wrote:
> >> On Thu 24-08-17 17:17:41, Russell King - ARM Linux wrote:
> >> > On Fri, Aug 18, 2017 at 01:24:02PM +0200, Michal Hocko wrote:
> >> > > Hi Russel,
> >> > > I have a battery of configs for compile testing and for some time I've
> >> > > been seeing the following compilation error with nommu config (attached)
> >> > >
> >> > > arch/arm/kernel/setup.c: In function 'reserve_crashkernel':
> >> > > arch/arm/kernel/setup.c:1005:25: error: 'SECTION_SIZE' undeclared (first
> >> > > use in this function)
> >> > > crash_size, SECTION_SIZE);
> >> > >
> >> > > I didn't get to look what is going on here, maybe my config is just too
> >> > > artificial but the primary reason is that SECTION_SIZE is not defined in
> >> > > pgtable-nommu.h. To be honest I am not familiar with nommu very much and
> >> > > it smells like the whole reserve_crashkernel doesn't really make any
> >> > > sense on those configs. Could you have a look what is the best fix
> >> > > please?
> >> >
> >> > Hi,
> >> >
> >> > I suspect that mach-netx has never been tested in nommu configurations
> >> > (ditto for many of the older platforms, which pre-date merging nommu
> >> > support.)
> >> >
> >> > Maybe the best solution is to make these old platforms depend on MMU.
> >> >
> >> > However, I'm wondering whether kexec makes sense for !MMU - that's
> >> > probably something that hasn't been tested and doesn't actually work.
> >> > So maybe another approach would be to make kexec depend on MMU for
> >> > ARM - but I'm afraid I don't really know.
> >>
> >> Yeah, I've disabled KEXEC in my testing config. All I do care about is
> >> to test nommu specific code paths in MM code.
> >>
> >> > I only have very limited nommu experience.
> >>
> >> me too
> >>
> >> So what would you say about the following?
> >
> > It's been some time and it seems this has fallen between cracks. Is this
> > worth puruing or I should just forget about it and drop it on the floor?
>
> I actually came across this issue during some randconfig testing. Your
> change looks good to me:
>
> Reviewed-by: Stefan Agner <stefan@agner.ch>
>
> Fixes for the ARM core usually go through Russell's patch tracker, did
> you submit you patch there?
>
> See also:
> https://www.arm.linux.org.uk/developer/patches/info.php
Thanks! I am quite busy though so please feel free to resubmit if you
feel this is worth it.
> --
> Stefan
>
> >> ---
> >> From 2707f3bf00181bbc9dcf6a1f287eb7369141e955 Mon Sep 17 00:00:00 2001
> >> From: Michal Hocko <mhocko@suse.com>
> >> Date: Fri, 25 Aug 2017 08:40:09 +0200
> >> Subject: [PATCH] arm: make kexec depend on MMU
> >>
> >> arm nommu config with KEXEC enabled doesn't compile
> >> arch/arm/kernel/setup.c: In function 'reserve_crashkernel':
> >> arch/arm/kernel/setup.c:1005:25: error: 'SECTION_SIZE' undeclared (first
> >> use in this function)
> >> crash_size, SECTION_SIZE);
> >>
> >> since 61603016e212 ("ARM: kexec: fix crashkernel= handling") which is
> >> over one year without anybody noticing. I have only noticed beause of
> >> my testing nommu config which somehow gained CONFIG_KEXEC without
> >> an intention. This suggests that nobody is actually using KEXEC
> >> on nommu ARM configs. It is even a question whether kexec works with
> >> nommu.
> >>
> >> Make KEXEC depend on MMU to make this clear. If somebody wants to enable
> >> there will be probably more things to take care.
> >>
> >> Signed-off-by: Michal Hocko <mhocko@suse.com>
> >> ---
> >> arch/arm/Kconfig | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> >> index 3f4aa9179337..c8603195d7fc 100644
> >> --- a/arch/arm/Kconfig
> >> +++ b/arch/arm/Kconfig
> >> @@ -2003,6 +2003,7 @@ config KEXEC
> >> bool "Kexec system call (EXPERIMENTAL)"
> >> depends on (!SMP || PM_SLEEP_SMP)
> >> depends on !CPU_V7M
> >> + depends on MMU
> >> select KEXEC_CORE
> >> help
> >> kexec is a system call that implements the ability to shutdown your
> >> --
> >> 2.13.2
> >>
> >> --
> >> Michal Hocko
> >> SUSE Labs
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2019-03-11 8:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 11:24 Michal Hocko
2017-08-24 16:17 ` Russell King - ARM Linux
2017-08-25 6:45 ` Michal Hocko
2018-04-06 9:56 ` Michal Hocko
2019-03-05 22:08 ` Stefan Agner
2019-03-11 8:52 ` Michal Hocko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190311085208.GY5232@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=linux-kernel-owner@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=stefan@agner.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®