[PATCH v2] firmware: google: Properly state IOMEM dependency

David Gow davidgow at google.com
Fri Feb 25 06:55:03 PST 2022


On Fri, Feb 25, 2022 at 6:47 PM Greg Kroah-Hartman
<gregkh at linuxfoundation.org> wrote:
>
> On Fri, Feb 25, 2022 at 12:15:02PM +0800, David Gow wrote:
> > The Google Coreboot implementation requires IOMEM functions
> > (memmremap, memunmap, devm_memremap), but does not specify this is its
> > Kconfig. This results in build errors when HAS_IOMEM is not set, such as
> > on some UML configurations:
> >
> > /usr/bin/ld: drivers/firmware/google/coreboot_table.o: in function `coreboot_table_probe':
> > coreboot_table.c:(.text+0x311): undefined reference to `memremap'
> > /usr/bin/ld: coreboot_table.c:(.text+0x34e): undefined reference to `memunmap'
> > /usr/bin/ld: drivers/firmware/google/memconsole-coreboot.o: in function `memconsole_probe':
> > memconsole-coreboot.c:(.text+0x12d): undefined reference to `memremap'
> > /usr/bin/ld: memconsole-coreboot.c:(.text+0x17e): undefined reference to `devm_memremap'
> > /usr/bin/ld: memconsole-coreboot.c:(.text+0x191): undefined reference to `memunmap'
> > /usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_section_destroy.isra.0':
> > vpd.c:(.text+0x300): undefined reference to `memunmap'
> > /usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_section_init':
> > vpd.c:(.text+0x382): undefined reference to `memremap'
> > /usr/bin/ld: vpd.c:(.text+0x459): undefined reference to `memunmap'
> > /usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_probe':
> > vpd.c:(.text+0x59d): undefined reference to `memremap'
> > /usr/bin/ld: vpd.c:(.text+0x5d3): undefined reference to `memunmap'
> > collect2: error: ld returned 1 exit status
> >
> > Signed-off-by: David Gow <davidgow at google.com>
> > Acked-By: anton ivanov <anton.ivanov at cambridgegreys.com>
> > Acked-By: Julius Werner <jwerner at chromium.org>
> > ---
>
> What commit id does this fix?
>
> thanks,
>
> greg k-h

As best I can tell, this[1] is the most sensible answer:

Fixes: a28aad66da ("firmware: coreboot: Collapse platform drivers into
bus core")

However, I think the first actual HAS_IOMEM-dependent calls were
introduced earlier, in "firmware: google memconsole: Add coreboot
support"[2], it just (a) never caused a problem under UML due to the
ACPI requirement, and (b) this fix won't apply particularly cleanly to
anything earlier than [1] anyway.

-- David

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a28aad66da8bd19b249670d003bb9a698bdda397
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d384d6f43d1ec3f1225ab0275fd592c5980bd830
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4003 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-um/attachments/20220225/56876ce5/attachment.p7s>


More information about the linux-um mailing list