Re: [PATCH] x86/boot/e820: Re-enable fallback if e820 table is empty

From: Andy Shevchenko

Date: Wed Apr 15 2026 - 10:26:25 EST


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.

--
With Best Regards,
Andy Shevchenko