All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firmware: google: Properly state IOMEM dependency
@ 2022-02-24  4:01 ` David Gow
  0 siblings, 0 replies; 6+ messages in thread
From: David Gow @ 2022-02-24  4:01 UTC (permalink / raw)
  To: Julius Werner, Greg Kroah-Hartman, Ben Hutchings
  Cc: David Gow, linux-kernel, linux-um

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 IOMEM is not enabled, 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@google.com>
---
 drivers/firmware/google/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/google/Kconfig b/drivers/firmware/google/Kconfig
index 931544c9f63d..7ac866a985c6 100644
--- a/drivers/firmware/google/Kconfig
+++ b/drivers/firmware/google/Kconfig
@@ -21,7 +21,7 @@ config GOOGLE_SMI
 
 config GOOGLE_COREBOOT_TABLE
 	tristate "Coreboot Table Access"
-	depends on ACPI || OF
+	depends on IOMEM && (ACPI || OF)
 	help
 	  This option enables the coreboot_table module, which provides other
 	  firmware modules access to the coreboot table. The coreboot table
-- 
2.35.1.473.g83b2b277ed-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] firmware: google: Properly state IOMEM dependency
@ 2022-02-24  4:01 ` David Gow
  0 siblings, 0 replies; 6+ messages in thread
From: David Gow @ 2022-02-24  4:01 UTC (permalink / raw)
  To: Julius Werner, Greg Kroah-Hartman, Ben Hutchings
  Cc: David Gow, linux-kernel, linux-um

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 IOMEM is not enabled, 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@google.com>
---
 drivers/firmware/google/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/google/Kconfig b/drivers/firmware/google/Kconfig
index 931544c9f63d..7ac866a985c6 100644
--- a/drivers/firmware/google/Kconfig
+++ b/drivers/firmware/google/Kconfig
@@ -21,7 +21,7 @@ config GOOGLE_SMI
 
 config GOOGLE_COREBOOT_TABLE
 	tristate "Coreboot Table Access"
-	depends on ACPI || OF
+	depends on IOMEM && (ACPI || OF)
 	help
 	  This option enables the coreboot_table module, which provides other
 	  firmware modules access to the coreboot table. The coreboot table
-- 
2.35.1.473.g83b2b277ed-goog


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] firmware: google: Properly state IOMEM dependency
  2022-02-24  4:01 ` David Gow
@ 2022-02-24  8:02   ` Anton Ivanov
  -1 siblings, 0 replies; 6+ messages in thread
From: Anton Ivanov @ 2022-02-24  8:02 UTC (permalink / raw)
  To: David Gow, Julius Werner, Greg Kroah-Hartman, Ben Hutchings
  Cc: linux-kernel, linux-um



On 24/02/2022 04:01, 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 IOMEM is not enabled, 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@google.com>
> ---
>   drivers/firmware/google/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/google/Kconfig b/drivers/firmware/google/Kconfig
> index 931544c9f63d..7ac866a985c6 100644
> --- a/drivers/firmware/google/Kconfig
> +++ b/drivers/firmware/google/Kconfig
> @@ -21,7 +21,7 @@ config GOOGLE_SMI
>   
>   config GOOGLE_COREBOOT_TABLE
>   	tristate "Coreboot Table Access"
> -	depends on ACPI || OF
> +	depends on IOMEM && (ACPI || OF)
>   	help
>   	  This option enables the coreboot_table module, which provides other
>   	  firmware modules access to the coreboot table. The coreboot table
> 
Acked-By: anton ivanov <anton.ivanov@cambridgegreys.com>

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] firmware: google: Properly state IOMEM dependency
@ 2022-02-24  8:02   ` Anton Ivanov
  0 siblings, 0 replies; 6+ messages in thread
From: Anton Ivanov @ 2022-02-24  8:02 UTC (permalink / raw)
  To: David Gow, Julius Werner, Greg Kroah-Hartman, Ben Hutchings
  Cc: linux-kernel, linux-um



On 24/02/2022 04:01, 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 IOMEM is not enabled, 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@google.com>
> ---
>   drivers/firmware/google/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/google/Kconfig b/drivers/firmware/google/Kconfig
> index 931544c9f63d..7ac866a985c6 100644
> --- a/drivers/firmware/google/Kconfig
> +++ b/drivers/firmware/google/Kconfig
> @@ -21,7 +21,7 @@ config GOOGLE_SMI
>   
>   config GOOGLE_COREBOOT_TABLE
>   	tristate "Coreboot Table Access"
> -	depends on ACPI || OF
> +	depends on IOMEM && (ACPI || OF)
>   	help
>   	  This option enables the coreboot_table module, which provides other
>   	  firmware modules access to the coreboot table. The coreboot table
> 
Acked-By: anton ivanov <anton.ivanov@cambridgegreys.com>

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] firmware: google: Properly state IOMEM dependency
  2022-02-24  8:02   ` Anton Ivanov
@ 2022-02-25  1:46     ` Julius Werner
  -1 siblings, 0 replies; 6+ messages in thread
From: Julius Werner @ 2022-02-25  1:46 UTC (permalink / raw)
  To: Anton Ivanov
  Cc: David Gow, Julius Werner, Greg Kroah-Hartman, Ben Hutchings,
	LKML, linux-um

Acked-By: Julius Werner <jwerner@chromium.org>

On Thu, Feb 24, 2022 at 12:02 AM Anton Ivanov
<anton.ivanov@cambridgegreys.com> wrote:
>
>
>
> On 24/02/2022 04:01, 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 IOMEM is not enabled, 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@google.com>
> > ---
> >   drivers/firmware/google/Kconfig | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/google/Kconfig b/drivers/firmware/google/Kconfig
> > index 931544c9f63d..7ac866a985c6 100644
> > --- a/drivers/firmware/google/Kconfig
> > +++ b/drivers/firmware/google/Kconfig
> > @@ -21,7 +21,7 @@ config GOOGLE_SMI
> >
> >   config GOOGLE_COREBOOT_TABLE
> >       tristate "Coreboot Table Access"
> > -     depends on ACPI || OF
> > +     depends on IOMEM && (ACPI || OF)
> >       help
> >         This option enables the coreboot_table module, which provides other
> >         firmware modules access to the coreboot table. The coreboot table
> >
> Acked-By: anton ivanov <anton.ivanov@cambridgegreys.com>
>
> --
> Anton R. Ivanov
> Cambridgegreys Limited. Registered in England. Company Number 10273661
> https://www.cambridgegreys.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] firmware: google: Properly state IOMEM dependency
@ 2022-02-25  1:46     ` Julius Werner
  0 siblings, 0 replies; 6+ messages in thread
From: Julius Werner @ 2022-02-25  1:46 UTC (permalink / raw)
  To: Anton Ivanov
  Cc: David Gow, Julius Werner, Greg Kroah-Hartman, Ben Hutchings,
	LKML, linux-um

Acked-By: Julius Werner <jwerner@chromium.org>

On Thu, Feb 24, 2022 at 12:02 AM Anton Ivanov
<anton.ivanov@cambridgegreys.com> wrote:
>
>
>
> On 24/02/2022 04:01, 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 IOMEM is not enabled, 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@google.com>
> > ---
> >   drivers/firmware/google/Kconfig | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/google/Kconfig b/drivers/firmware/google/Kconfig
> > index 931544c9f63d..7ac866a985c6 100644
> > --- a/drivers/firmware/google/Kconfig
> > +++ b/drivers/firmware/google/Kconfig
> > @@ -21,7 +21,7 @@ config GOOGLE_SMI
> >
> >   config GOOGLE_COREBOOT_TABLE
> >       tristate "Coreboot Table Access"
> > -     depends on ACPI || OF
> > +     depends on IOMEM && (ACPI || OF)
> >       help
> >         This option enables the coreboot_table module, which provides other
> >         firmware modules access to the coreboot table. The coreboot table
> >
> Acked-By: anton ivanov <anton.ivanov@cambridgegreys.com>
>
> --
> Anton R. Ivanov
> Cambridgegreys Limited. Registered in England. Company Number 10273661
> https://www.cambridgegreys.com/

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-25  1:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24  4:01 [PATCH] firmware: google: Properly state IOMEM dependency David Gow
2022-02-24  4:01 ` David Gow
2022-02-24  8:02 ` Anton Ivanov
2022-02-24  8:02   ` Anton Ivanov
2022-02-25  1:46   ` Julius Werner
2022-02-25  1:46     ` Julius Werner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.