mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Huang Ying <ying.huang@intel.com>
Subject: Re: [PATCH] resource, kunit: add dependency on SPARSEMEM
Date: Mon, 23 Sep 2024 06:39:43 -0700	[thread overview]
Message-ID: <435dc218-f7ea-4697-b3ef-6a786e8d1b2c@roeck-us.net> (raw)
In-Reply-To: <CAMuHMdWAuQcFQaQNy2EP_u9vk13g2C3sb3FFBCMAUPyGMgZ+hg@mail.gmail.com>

On 9/23/24 05:58, Geert Uytterhoeven wrote:
> Hi Günter,
> 
> On Mon, Sep 23, 2024 at 12:50 AM Guenter Roeck <linux@roeck-us.net> wrote:
>> Building allmodconfig images on systems with SPARSEMEM=n results in
>> the following message.
>>
>> WARNING: unmet direct dependencies detected for GET_FREE_REGION
>>    Depends on [n]: SPARSEMEM [=n]
>>    Selected by [m]:
>>    - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]
>>
>> and the build ultimately fails.
> 
> Really? What's the build error?

I saw it on hexagon, and I didn't bother writing down the actual build error
message. But it turns out you are correct, the m68k machine does build with
CONFIG_RESOURCE_KUNIT_TEST=y even though SPARSEMEM and with it GET_FREE_REGION
are not set. Never mind, I don't really want or have time to argue. I'll just
disable CONFIG_RESOURCE_KUNIT_TEST when building hexagon images and wherever
else I see the problem.

> It does build for me on m68k, after fixing:
> 
>      --- a/include/linux/mm.h
>      +++ b/include/linux/mm.h
>      @@ -101,7 +101,7 @@ extern int mmap_rnd_compat_bits __read_mostly;
>       # ifdef MAX_PHYSMEM_BITS
>       # define PHYSMEM_END   ((1ULL << MAX_PHYSMEM_BITS) - 1)
>       # else
>      -# define PHYSMEM_END   (-1ULL)
>     +# define PHYSMEM_END   ((phys_addr_t)-1)
>       # endif
>       #endif
> 
>> GET_FREE_REGION depends on SPARSEMEM, so any configuration selecting it
>> also depends on SPARSEMEM. Add the missing dependency.
>>
>> Effectively that means that RESOURCE_KUNIT_TEST is now restricted to
>> systems with SPARSEMEM=y, but that can not be helped.
> 
> Perhaps the individual test(s) that do depend on GET_FREE_REGION should
> be protected by #ifdef CONFIG_GET_FREE_REGION instead? However,
> I have no idea which parts depend on that, as apparently all tests
> succeed on m68k/ARAnyM, with CONFIG_SPARSEMEM=n:
> 
>      KTAP version 1
>      1..1
>          KTAP version 1
>          # Subtest: resource
>          # module: resource_kunit
>          1..3
>          ok 1 resource_test_union
>          ok 2 resource_test_intersection
>          ok 3 resource_test_region_intersects
>      # resource: pass:3 fail:0 skip:0 total:3
>      # Totals: pass:3 fail:0 skip:0 total:3
>      ok 1 resource
> 

Interesting that you get that to boot. The q800 machine crashes for me
when trying to boot it in qemu with the latest upstream kernel, in function
__pte_offset_map_lock(). It bisects to commit 394290cba966 ("mm: turn
USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig options").
Reverting that patch fixes the crash for me. I guess you are not seeing that ?

Thanks,
Guenter


  reply	other threads:[~2024-09-23 13:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 22:50 Guenter Roeck
2024-09-23  1:11 ` Huang, Ying
2024-09-23 12:58 ` Geert Uytterhoeven
2024-09-23 13:39   ` Guenter Roeck [this message]
2024-09-23 13:47     ` Geert Uytterhoeven
2024-09-23 14:23       ` Guenter Roeck
2024-09-23 14:54       ` Guenter Roeck
2024-09-23 16:01         ` Geert Uytterhoeven
2024-09-23 16:25           ` Guenter Roeck
2024-09-24  1:21     ` Huang, Ying
2024-09-24  2:41       ` Guenter Roeck
2024-10-10  6:40         ` Huang, Ying
2024-10-10 16:01           ` Guenter Roeck
2024-10-12  3:43             ` Huang, Ying
2024-10-12  9:36               ` Guenter Roeck
2024-09-24  7:56       ` Geert Uytterhoeven
2024-09-24  8:21         ` Huang, Ying
2024-09-26 18:45           ` Dan Williams
2024-09-27  1:41             ` Huang, Ying

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=435dc218-f7ea-4697-b3ef-6a786e8d1b2c@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ying.huang@intel.com \
    /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®