* [PATCH] efi: sysfb_efi: fix build when EFI is not set
@ 2021-07-27 5:04 Randy Dunlap
2021-07-27 7:05 ` Ard Biesheuvel
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Randy Dunlap @ 2021-07-27 5:04 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Ard Biesheuvel, linux-efi, dri-devel,
Javier Martinez Canillas, Thomas Zimmermann, Mark Brown,
linux-next
When # CONFIG_EFI is not set, there are 2 definitions of
sysfb_apply_efi_quirks(). The stub from sysfb.h should be used
and the __init function from sysfb_efi.c should not be used.
../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’
__init void sysfb_apply_efi_quirks(struct platform_device *pd)
^~~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0:
../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here
static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-next@vger.kernel.org
---
drivers/firmware/efi/sysfb_efi.c | 2 ++
1 file changed, 2 insertions(+)
--- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c
+++ linext-20210726/drivers/firmware/efi/sysfb_efi.c
@@ -332,6 +332,7 @@ static const struct fwnode_operations ef
.add_links = efifb_add_links,
};
+#ifdef CONFIG_EFI
static struct fwnode_handle efifb_fwnode;
__init void sysfb_apply_efi_quirks(struct platform_device *pd)
@@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc
pd->dev.fwnode = &efifb_fwnode;
}
}
+#endif
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set
2021-07-27 5:04 [PATCH] efi: sysfb_efi: fix build when EFI is not set Randy Dunlap
@ 2021-07-27 7:05 ` Ard Biesheuvel
2021-07-27 7:54 ` Javier Martinez Canillas
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2021-07-27 7:05 UTC (permalink / raw)
To: Randy Dunlap
Cc: Linux Kernel Mailing List, linux-efi, dri-devel,
Javier Martinez Canillas, Thomas Zimmermann, Mark Brown,
Linux Next Mailing List
On Tue, 27 Jul 2021 at 07:05, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> When # CONFIG_EFI is not set, there are 2 definitions of
> sysfb_apply_efi_quirks(). The stub from sysfb.h should be used
> and the __init function from sysfb_efi.c should not be used.
>
> ../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’
> __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> ^~~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0:
> ../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here
> static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: linux-efi@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Javier Martinez Canillas <javierm@redhat.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: linux-next@vger.kernel.org
Acked-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> drivers/firmware/efi/sysfb_efi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c
> +++ linext-20210726/drivers/firmware/efi/sysfb_efi.c
> @@ -332,6 +332,7 @@ static const struct fwnode_operations ef
> .add_links = efifb_add_links,
> };
>
> +#ifdef CONFIG_EFI
> static struct fwnode_handle efifb_fwnode;
>
> __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> @@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc
> pd->dev.fwnode = &efifb_fwnode;
> }
> }
> +#endif
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set
2021-07-27 5:04 [PATCH] efi: sysfb_efi: fix build when EFI is not set Randy Dunlap
2021-07-27 7:05 ` Ard Biesheuvel
@ 2021-07-27 7:54 ` Javier Martinez Canillas
2021-07-27 9:15 ` Thomas Zimmermann
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2021-07-27 7:54 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Ard Biesheuvel, linux-efi, dri-devel, Thomas Zimmermann,
Mark Brown, linux-next
On 7/27/21 7:04 AM, Randy Dunlap wrote:
> When # CONFIG_EFI is not set, there are 2 definitions of
> sysfb_apply_efi_quirks(). The stub from sysfb.h should be used
> and the __init function from sysfb_efi.c should not be used.
>
> ../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’
> __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> ^~~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0:
> ../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here
> static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: linux-efi@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Javier Martinez Canillas <javierm@redhat.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: linux-next@vger.kernel.org
> ---
> drivers/firmware/efi/sysfb_efi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c
> +++ linext-20210726/drivers/firmware/efi/sysfb_efi.c
> @@ -332,6 +332,7 @@ static const struct fwnode_operations ef
> .add_links = efifb_add_links,
> };
>
> +#ifdef CONFIG_EFI
> static struct fwnode_handle efifb_fwnode;
>
> __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> @@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc
> pd->dev.fwnode = &efifb_fwnode;
> }
> }
> +#endif
>
Thanks for the patch.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set
2021-07-27 5:04 [PATCH] efi: sysfb_efi: fix build when EFI is not set Randy Dunlap
2021-07-27 7:05 ` Ard Biesheuvel
2021-07-27 7:54 ` Javier Martinez Canillas
@ 2021-07-27 9:15 ` Thomas Zimmermann
2021-07-27 9:54 ` Daniel Vetter
2021-07-27 16:25 ` kernel test robot
2021-07-28 8:39 ` Geert Uytterhoeven
4 siblings, 1 reply; 8+ messages in thread
From: Thomas Zimmermann @ 2021-07-27 9:15 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Ard Biesheuvel, linux-efi, dri-devel, Javier Martinez Canillas,
Mark Brown, linux-next
[-- Attachment #1.1: Type: text/plain, Size: 2989 bytes --]
Hi
Am 27.07.21 um 07:04 schrieb Randy Dunlap:
> When # CONFIG_EFI is not set, there are 2 definitions of
> sysfb_apply_efi_quirks(). The stub from sysfb.h should be used
> and the __init function from sysfb_efi.c should not be used.
>
> ../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’
> __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> ^~~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0:
> ../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here
> static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: linux-efi@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Javier Martinez Canillas <javierm@redhat.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: linux-next@vger.kernel.org
Thanks for the patch. It should have a fixes line
> dim fixes 8633ef82f101c040427b57d4df7b706261420b94
Fixes: 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer
setup for all arches")
... and maybe a few more of the CCs below
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Nicolas Saenz Julienne <nsaenz@kernel.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: linux-efi@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Best regards
Thomas
> ---
> drivers/firmware/efi/sysfb_efi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c
> +++ linext-20210726/drivers/firmware/efi/sysfb_efi.c
> @@ -332,6 +332,7 @@ static const struct fwnode_operations ef
> .add_links = efifb_add_links,
> };
>
> +#ifdef CONFIG_EFI
> static struct fwnode_handle efifb_fwnode;
>
> __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> @@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc
> pd->dev.fwnode = &efifb_fwnode;
> }
> }
> +#endif
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set
2021-07-27 9:15 ` Thomas Zimmermann
@ 2021-07-27 9:54 ` Daniel Vetter
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2021-07-27 9:54 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: Randy Dunlap, linux-kernel, linux-efi, Mark Brown,
Javier Martinez Canillas, dri-devel, linux-next, Ard Biesheuvel
On Tue, Jul 27, 2021 at 11:15:36AM +0200, Thomas Zimmermann wrote:
> Hi
>
> Am 27.07.21 um 07:04 schrieb Randy Dunlap:
> > When # CONFIG_EFI is not set, there are 2 definitions of
> > sysfb_apply_efi_quirks(). The stub from sysfb.h should be used
> > and the __init function from sysfb_efi.c should not be used.
> >
> > ../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’
> > __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> > ^~~~~~~~~~~~~~~~~~~~~~
> > In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0:
> > ../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here
> > static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
> > ^~~~~~~~~~~~~~~~~~~~~~
> >
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Ard Biesheuvel <ardb@kernel.org>
> > Cc: linux-efi@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: Javier Martinez Canillas <javierm@redhat.com>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > Cc: Mark Brown <broonie@kernel.org>
> > Cc: linux-next@vger.kernel.org
>
> Thanks for the patch. It should have a fixes line
>
> > dim fixes 8633ef82f101c040427b57d4df7b706261420b94
>
> Fixes: 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer setup
> for all arches")
Added this and pushed to drm-next (because atm drm-next isn't in
linux-next because of this).
drm-next also has -rc3 backmerge for the nouveau fix, so I think a good
time to backmerge the entire pile into drm-misc-next?
-Daniel
>
>
> ... and maybe a few more of the CCs below
>
> Cc: Javier Martinez Canillas <javierm@redhat.com>
>
> Cc: Borislav Petkov <bp@suse.de>
>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>
> Cc: Ard Biesheuvel <ardb@kernel.org>
>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>
> Cc: John Stultz <john.stultz@linaro.org>
>
> Cc: Colin Ian King <colin.king@canonical.com>
>
> Cc: Nicolas Saenz Julienne <nsaenz@kernel.org>
>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
>
> Cc: Maxime Ripard <maxime@cerno.tech>
>
> Cc: linux-efi@vger.kernel.org
>
> Cc: linux-riscv@lists.infradead.org
>
>
> Best regards
> Thomas
>
> > ---
> > drivers/firmware/efi/sysfb_efi.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > --- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c
> > +++ linext-20210726/drivers/firmware/efi/sysfb_efi.c
> > @@ -332,6 +332,7 @@ static const struct fwnode_operations ef
> > .add_links = efifb_add_links,
> > };
> > +#ifdef CONFIG_EFI
> > static struct fwnode_handle efifb_fwnode;
> > __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> > @@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc
> > pd->dev.fwnode = &efifb_fwnode;
> > }
> > }
> > +#endif
> >
>
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set
2021-07-27 5:04 [PATCH] efi: sysfb_efi: fix build when EFI is not set Randy Dunlap
` (2 preceding siblings ...)
2021-07-27 9:15 ` Thomas Zimmermann
@ 2021-07-27 16:25 ` kernel test robot
2021-07-28 8:39 ` Geert Uytterhoeven
4 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-07-27 16:25 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: clang-built-linux, kbuild-all, Randy Dunlap, Ard Biesheuvel,
linux-efi, dri-devel, Javier Martinez Canillas,
Thomas Zimmermann, Mark Brown, linux-next
[-- Attachment #1: Type: text/plain, Size: 22673 bytes --]
Hi Randy,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20210726]
[cannot apply to efi/next linux/master linus/master v5.14-rc3 v5.14-rc2 v5.14-rc1 v5.14-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Randy-Dunlap/efi-sysfb_efi-fix-build-when-EFI-is-not-set/20210727-130620
base: 2265c5286967c58db9a99ed1b74105977507e690
config: x86_64-randconfig-a006-20210727 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c658b472f3e61e1818e1909bf02f3d65470018a5)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/1b739039e35b622cdf14dcfdc9d24862aeb4a711
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/efi-sysfb_efi-fix-build-when-EFI-is-not-set/20210727-130620
git checkout 1b739039e35b622cdf14dcfdc9d24862aeb4a711
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/firmware/efi/sysfb_efi.c:72:6: warning: no previous prototype for function 'efifb_setup_from_dmi' [-Wmissing-prototypes]
void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
^
drivers/firmware/efi/sysfb_efi.c:72:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
^
static
>> drivers/firmware/efi/sysfb_efi.c:190:35: warning: unused variable 'efifb_dmi_system_table' [-Wunused-const-variable]
static const struct dmi_system_id efifb_dmi_system_table[] __initconst = {
^
>> drivers/firmware/efi/sysfb_efi.c:240:35: warning: unused variable 'efifb_dmi_swap_width_height' [-Wunused-const-variable]
static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
^
>> drivers/firmware/efi/sysfb_efi.c:331:39: warning: unused variable 'efifb_fwnode_ops' [-Wunused-const-variable]
static const struct fwnode_operations efifb_fwnode_ops = {
^
4 warnings generated.
vim +/efifb_dmi_system_table +190 drivers/firmware/efi/sysfb_efi.c
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 178
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 179 #define EFIFB_DMI_SYSTEM_ID(vendor, name, enumid) \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 180 { \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 181 efifb_set_system, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 182 name, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 183 { \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 184 DMI_MATCH(DMI_BIOS_VENDOR, vendor), \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 185 DMI_MATCH(DMI_PRODUCT_NAME, name) \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 186 }, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 187 &efifb_dmi_list[enumid] \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 188 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 189
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 @190 static const struct dmi_system_id efifb_dmi_system_table[] __initconst = {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 191 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac4,1", M_I17),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 192 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 193 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac5,1", M_I20),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 194 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac5,1", M_I20),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 195 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 196 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac6,1", M_I24),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 197 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac6,1", M_I24),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 198 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac7,1", M_I20_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 199 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac8,1", M_I24_8_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 200 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac10,1", M_I24_10_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 201 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac11,1", M_I27_11_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 202 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "Macmini1,1", M_MINI),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 203 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "Macmini3,1", M_MINI_3_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 204 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "Macmini4,1", M_MINI_4_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 205 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook1,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 206 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 207 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook2,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 208 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook2,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 209 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 210 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook3,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 211 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook3,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 212 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook4,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 213 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook5,1", M_MB_5_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 214 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook6,1", M_MB_6_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 215 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook7,1", M_MB_7_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 216 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir1,1", M_MBA),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 217 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir3,1", M_MBA_3),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 218 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro1,1", M_MBP),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 219 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,1", M_MBP_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 220 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,2", M_MBP_2_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 221 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro2,1", M_MBP_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 222 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro3,1", M_MBP_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 223 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro3,1", M_MBP_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 224 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro4,1", M_MBP_4),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 225 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,1", M_MBP_5_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 226 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,2", M_MBP_5_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 227 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,3", M_MBP_5_3),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 228 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,1", M_MBP_6_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 229 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,2", M_MBP_6_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 230 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro7,1", M_MBP_7_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 231 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro8,2", M_MBP_8_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 232 {},
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 233 };
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 234
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 235 /*
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 236 * Some devices have a portrait LCD but advertise a landscape resolution (and
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 237 * pitch). We simply swap width and height for these devices so that we can
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 238 * correctly deal with some of them coming with multiple resolutions.
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 239 */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 @240 static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 241 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 242 /*
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 243 * Lenovo MIIX310-10ICR, only some batches have the troublesome
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 244 * 800x1280 portrait screen. Luckily the portrait version has
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 245 * its own BIOS version, so we match on that.
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 246 */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 247 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 248 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 249 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10ICR"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 250 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1HCN44WW"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 251 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 252 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 253 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 254 /* Lenovo MIIX 320-10ICR with 800x1280 portrait screen */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 255 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 256 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 257 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 258 "Lenovo MIIX 320-10ICR"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 259 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 260 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 261 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 262 /* Lenovo D330 with 800x1280 or 1200x1920 portrait screen */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 263 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 264 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 265 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 266 "Lenovo ideapad D330-10IGM"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 267 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 268 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 269 {},
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 270 };
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 271
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 272 static bool efifb_overlaps_pci_range(const struct of_pci_range *range)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 273 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 274 u64 fb_base = screen_info.lfb_base;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 275
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 276 if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 277 fb_base |= (u64)(unsigned long)screen_info.ext_lfb_base << 32;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 278
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 279 return fb_base >= range->cpu_addr &&
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 280 fb_base < (range->cpu_addr + range->size);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 281 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 282
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 283 static struct device_node *find_pci_overlap_node(void)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 284 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 285 struct device_node *np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 286
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 287 for_each_node_by_type(np, "pci") {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 288 struct of_pci_range_parser parser;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 289 struct of_pci_range range;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 290 int err;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 291
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 292 err = of_pci_range_parser_init(&parser, np);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 293 if (err) {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 294 pr_warn("of_pci_range_parser_init() failed: %d\n", err);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 295 continue;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 296 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 297
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 298 for_each_of_pci_range(&parser, &range)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 299 if (efifb_overlaps_pci_range(&range))
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 300 return np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 301 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 302 return NULL;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 303 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 304
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 305 /*
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 306 * If the efifb framebuffer is backed by a PCI graphics controller, we have
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 307 * to ensure that this relation is expressed using a device link when
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 308 * running in DT mode, or the probe order may be reversed, resulting in a
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 309 * resource reservation conflict on the memory window that the efifb
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 310 * framebuffer steals from the PCIe host bridge.
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 311 */
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 312 static int efifb_add_links(struct fwnode_handle *fwnode)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 313 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 314 struct device_node *sup_np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 315
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 316 sup_np = find_pci_overlap_node();
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 317
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 318 /*
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 319 * If there's no PCI graphics controller backing the efifb, we are
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 320 * done here.
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 321 */
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 322 if (!sup_np)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 323 return 0;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 324
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 325 fwnode_link_add(fwnode, of_fwnode_handle(sup_np));
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 326 of_node_put(sup_np);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 327
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 328 return 0;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 329 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 330
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 @331 static const struct fwnode_operations efifb_fwnode_ops = {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 332 .add_links = efifb_add_links,
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 333 };
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 334
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39765 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set
2021-07-27 5:04 [PATCH] efi: sysfb_efi: fix build when EFI is not set Randy Dunlap
` (3 preceding siblings ...)
2021-07-27 16:25 ` kernel test robot
@ 2021-07-28 8:39 ` Geert Uytterhoeven
2021-07-28 8:50 ` Ard Biesheuvel
4 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2021-07-28 8:39 UTC (permalink / raw)
To: Randy Dunlap
Cc: Linux Kernel Mailing List, Ard Biesheuvel, linux-efi,
DRI Development, Javier Martinez Canillas, Thomas Zimmermann,
Mark Brown, Linux-Next
Hi Randy,
On Tue, Jul 27, 2021 at 7:06 AM Randy Dunlap <rdunlap@infradead.org> wrote:
> When # CONFIG_EFI is not set, there are 2 definitions of
> sysfb_apply_efi_quirks(). The stub from sysfb.h should be used
> and the __init function from sysfb_efi.c should not be used.
>
> ../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’
> __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> ^~~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0:
> ../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here
> static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Thanks for your patch!
> --- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c
> +++ linext-20210726/drivers/firmware/efi/sysfb_efi.c
> @@ -332,6 +332,7 @@ static const struct fwnode_operations ef
> .add_links = efifb_add_links,
> };
>
> +#ifdef CONFIG_EFI
> static struct fwnode_handle efifb_fwnode;
>
> __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> @@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc
> pd->dev.fwnode = &efifb_fwnode;
> }
> }
> +#endif
How come you enter drivers/firmware/efi/ without CONFIG_EFI?
Oh:
drivers/firmware/Makefile:obj-$(CONFIG_EFI) += efi/
drivers/firmware/Makefile:obj-$(CONFIG_UEFI_CPER) += efi/
Looks like UEFI_CPER is not related to EFI at all (it's not set in
my arm64 config which has CONFIG_EFI=y). Perhaps it should be moved
to drivers/acpi/ instead?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set
2021-07-28 8:39 ` Geert Uytterhoeven
@ 2021-07-28 8:50 ` Ard Biesheuvel
0 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2021-07-28 8:50 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Randy Dunlap, Linux Kernel Mailing List, linux-efi,
DRI Development, Javier Martinez Canillas, Thomas Zimmermann,
Mark Brown, Linux-Next
On Wed, 28 Jul 2021 at 10:39, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Randy,
>
> On Tue, Jul 27, 2021 at 7:06 AM Randy Dunlap <rdunlap@infradead.org> wrote:
> > When # CONFIG_EFI is not set, there are 2 definitions of
> > sysfb_apply_efi_quirks(). The stub from sysfb.h should be used
> > and the __init function from sysfb_efi.c should not be used.
> >
> > ../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’
> > __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> > ^~~~~~~~~~~~~~~~~~~~~~
> > In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0:
> > ../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here
> > static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
> > ^~~~~~~~~~~~~~~~~~~~~~
> >
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>
> Thanks for your patch!
>
> > --- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c
> > +++ linext-20210726/drivers/firmware/efi/sysfb_efi.c
> > @@ -332,6 +332,7 @@ static const struct fwnode_operations ef
> > .add_links = efifb_add_links,
> > };
> >
> > +#ifdef CONFIG_EFI
> > static struct fwnode_handle efifb_fwnode;
> >
> > __init void sysfb_apply_efi_quirks(struct platform_device *pd)
> > @@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc
> > pd->dev.fwnode = &efifb_fwnode;
> > }
> > }
> > +#endif
>
> How come you enter drivers/firmware/efi/ without CONFIG_EFI?
>
> Oh:
>
> drivers/firmware/Makefile:obj-$(CONFIG_EFI) += efi/
> drivers/firmware/Makefile:obj-$(CONFIG_UEFI_CPER) += efi/
>
> Looks like UEFI_CPER is not related to EFI at all (it's not set in
> my arm64 config which has CONFIG_EFI=y). Perhaps it should be moved
> to drivers/acpi/ instead?
>
I think we should move this into drivers/firmware/cper/ instead, or
simply into drivers/firmware/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-07-28 8:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 5:04 [PATCH] efi: sysfb_efi: fix build when EFI is not set Randy Dunlap
2021-07-27 7:05 ` Ard Biesheuvel
2021-07-27 7:54 ` Javier Martinez Canillas
2021-07-27 9:15 ` Thomas Zimmermann
2021-07-27 9:54 ` Daniel Vetter
2021-07-27 16:25 ` kernel test robot
2021-07-28 8:39 ` Geert Uytterhoeven
2021-07-28 8:50 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).