mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Dan Carpenter" <dan.carpenter@linaro.org>,
	"Naresh Kamboju" <naresh.kamboju@linaro.org>,
	"Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
Cc: "open list" <linux-kernel@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	lkft-triage@lists.linaro.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Ard Biesheuvel" <ardb@kernel.org>, shuah <shuah@kernel.org>,
	"Anders Roxell" <anders.roxell@linaro.org>
Subject: Re: selftests: mincore: mincore_selftest fails only on qemu-armv7
Date: Mon, 15 May 2023 14:13:28 +0200	[thread overview]
Message-ID: <3696666f-9b48-405c-a715-8adf927fd86e@app.fastmail.com> (raw)
In-Reply-To: <a9e9a1a7-346a-475e-961c-ec8568613b45@kili.mountain>

On Mon, May 15, 2023, at 13:51, Dan Carpenter wrote:
> On Mon, May 15, 2023 at 03:29:02PM +0530, Naresh Kamboju wrote:
>> The selftests: mincore: mincore_selftest fails only on qemu-armv7 running
>
> tools/testing/selftests/mincore/mincore_selftest.c
>    139  TEST(check_huge_pages)
>    140  {
>    141          unsigned char vec[1];
>    142          char *addr;
>    143          int retval;
>    144          int page_size;
>    145  
>    146          page_size = sysconf(_SC_PAGESIZE);
>    147  
>    148          errno = 0;
>    149          addr = mmap(NULL, page_size, PROT_READ | PROT_WRITE,
>    150                  MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB,
>    151                  -1, 0);
>    152          if (addr == MAP_FAILED) {
>    153                  if (errno == ENOMEM)
>
> On Armv7 is a 32bit machine so HUGETLB isn't enabled and the errno can
> be -EINVAL.  It's has returned this for 10 years.

I expected it to be enabled on 32-bit as well, but I see that
on normal ARMv7 without CONFIG_ARM_LPAE, it is indeed
always turned off, and the asm/pgtable-2level.h does not
define a way to use sections or supersections in user space:

arch/arm/Kconfig:       select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE

      Arnd

  reply	other threads:[~2023-05-15 12:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15  9:59 Naresh Kamboju
2023-05-15 11:51 ` Dan Carpenter
2023-05-15 12:13   ` Arnd Bergmann [this message]
2023-05-15 12:32   ` Ricardo Cañuelo

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=3696666f-9b48-405c-a715-8adf927fd86e@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=ardb@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=ricardo.canuelo@collabora.com \
    --cc=shuah@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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®