Re: [PATCH v4] efi/earlycon: Remap entire framebuffer after page initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 05, 2019 at 07:02:56PM +0000, Ard Biesheuvel wrote:
> On Thu, 5 Dec 2019 at 18:56, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Thu, Dec 05, 2019 at 04:42:48PM +0000, Ard Biesheuvel wrote:

> > > +static int __init efi_earlycon_unmap_fb(void)
> > > +{
> > > +     /* unmap the bootconsole fb unless keep_bootcon has left it enabled */
> >
> > > +     if (efi_fb && !(earlycon_console->flags & CON_ENABLED))
> >
> > Isn't efi_fb test superfluous here?
> >
> 
> Well, it could be NULL so it is not superfluous. The initcall() is
> always executed, even if you are not using earlycon=efifb at all.

My point is that memunmap() is no-op for NULL pointer, isn't it?

> > > +             memunmap(efi_fb);
> >
> > > +     return 0;
> > > +}
> > > +late_initcall(efi_earlycon_unmap_fb);

> > I still think we need __exitcall() to clean up the stuff in any case.
> >
> 
> Why? As far as I can tell, exitcalls go straight into a /DISCARD/
> section, and I really don't see the point of carrying dead code in
> this file.

Okay.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux