mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Gow <david@davidgow.net>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@kernel.org>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, Andy Shevchenko <andy@kernel.org>,
	Arnd Bergmann <arnd@kernel.org>,
	Nikolay Borisov <nik.borisov@suse.com>,
	"H . Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/boot/e820: Re-enable fallback if e820 table is empty
Date: Thu, 16 Apr 2026 15:07:28 +0800	[thread overview]
Message-ID: <65a1963f-5d9c-4b11-8983-9806ce94cbe1@davidgow.net> (raw)
In-Reply-To: <ad-gACayQvP7dfr6@ashevche-desk.local>

Le 15/04/2026 à 10:26 PM, Andy Shevchenko a écrit :
> On Wed, Apr 15, 2026 at 09:50:32PM +0800, David Gow wrote:
>> Le 15/04/2026 à 4:51 PM, Andy Shevchenko a écrit :
>>> On Wed, Apr 15, 2026 at 08:30:18AM +0800, David Gow wrote:
> 
> ...
> 
>>>>    	struct boot_e820_entry *entry = entries;
>>>> +	/* If there aren't any entries, we'll want to fall-back to another source. */
>>>> +	if (!nr_entries)
>>>> +		return -1;
>>>
>>> Can we return -ENODATA or -ENOENT here?
>>
>> Sounds like a good idea. The previous code (like this) used -1 for both
>> "there are no entires" and "there are entries which look bogus". Maybe we
>> should replace the latter with -EINVAL, too.
> 
> Maybe, but is it related to (coupled with) this change? If not, we can do it
> later if needed.
> 

I think it's probably related enough: append_e820_table() only has the 
one other error return. That being said, I don't think it matters too 
much either way: there's exactly one caller which checks the return 
value, and it only cares that it's nonzero. We could just replace the 
whole thing with a bool. (Or, if we wanted to be more brave, with the 
count of entries added, though that'd complicate the caller a bit if we 
wanted to preserve the same behaviour.)

Regardless, I've sent out v2 here:
https://lore.kernel.org/all/20260416065746.1896647-1-david@davidgow.net/

Cheers,
-- David

      reply	other threads:[~2026-04-16  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15  0:30 David Gow
2026-04-15  8:51 ` Andy Shevchenko
2026-04-15 13:50   ` David Gow
2026-04-15 14:26     ` Andy Shevchenko
2026-04-16  7:07       ` David Gow [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=65a1963f-5d9c-4b11-8983-9806ce94cbe1@davidgow.net \
    --to=david@davidgow.net \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=arnd@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nik.borisov@suse.com \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.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®