All of lore.kernel.org
 help / color / mirror / Atom feed
* Build error in -next due to 'efi: Add esrt support'
@ 2015-06-05 14:49 Guenter Roeck
  2015-06-05 17:02   ` Peter Jones
  0 siblings, 1 reply; 17+ messages in thread
From: Guenter Roeck @ 2015-06-05 14:49 UTC (permalink / raw)
  To: Peter Jones; +Cc: Matt Fleming, linux-kernel, linux-efi

Building ia64:defconfig ... failed
--------------
Error log:

drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No such file or directory

Guenter

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

* [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 17:02   ` Peter Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Jones @ 2015-06-05 17:02 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Matt Fleming, linux-kernel, linux-efi, Tony Luck, Peter Jones

So, I'm told this problem exists in the world:
----------------------------------------------
Subject: Build error in -next due to 'efi: Add esrt support'

Building ia64:defconfig ... failed
--------------
Error log:

drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
such file or directory
----------------------------------------------

I'm not really sure how it's okay that we have things in asm-generic on
some platforms but not others - is having it the same everywhere not the
whole point of asm-generic?

That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
difficult to imagine new IA64 machines with UEFI 2.5, just don't build
this code there.

To me this looks like a workaround - doing something like:

generic-y += early_ioremap.h

in arch/ia64/include/asm/Kbuild would appear to be more correct, but
ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
and it's a macro.  So adding the above /and/ requiring that asm/io.h be
included /after/ asm/early_ioremap.h in all cases would fix it, but
that's pretty ugly as well.  Since I'm not going to spend the rest of my
life rectifying ia64 headers vs "generic" headers that aren't generic,
it's much simpler to just not build there.

Note that I've only actually tried to build this patch on x86_64, but
esrt.o still gets built there, and that would seem to demonstrate that
the conditional building is working correctly at all the places the code
built before.  I no longer have any ia64 machines handy to test that the
exclusion actually works there.

Signed-off-by: Peter Jones <pjones@redhat.com>
---
 drivers/firmware/efi/Makefile | 5 ++++-
 include/linux/efi.h           | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index 26eabbc..81c8527 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -1,7 +1,10 @@
 #
 # Makefile for linux kernel
 #
-obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
+obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
+ifeq ($(CONFIG_IA64),)
+obj-$(CONFIG_EFI)			+= esrt.o
+endif
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
 obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
 obj-$(CONFIG_UEFI_CPER)			+= cper.o
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 024c27e..1983d17 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
 #endif
 extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
 extern int efi_config_init(efi_config_table_type_t *arch_tables);
+#ifdef CONFIG_IA64
+static inline void efi_esrt_init(void) { }
+#else
 extern void __init efi_esrt_init(void);
+#endif
 extern int efi_config_parse_tables(void *config_tables, int count, int sz,
 				   efi_config_table_type_t *arch_tables);
 extern u64 efi_get_iobase (void);
-- 
2.4.2


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

* [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 17:02   ` Peter Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Jones @ 2015-06-05 17:02 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Matt Fleming, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, Tony Luck, Peter Jones

So, I'm told this problem exists in the world:
----------------------------------------------
Subject: Build error in -next due to 'efi: Add esrt support'

Building ia64:defconfig ... failed
--------------
Error log:

drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
such file or directory
----------------------------------------------

I'm not really sure how it's okay that we have things in asm-generic on
some platforms but not others - is having it the same everywhere not the
whole point of asm-generic?

That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
difficult to imagine new IA64 machines with UEFI 2.5, just don't build
this code there.

To me this looks like a workaround - doing something like:

generic-y += early_ioremap.h

in arch/ia64/include/asm/Kbuild would appear to be more correct, but
ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
and it's a macro.  So adding the above /and/ requiring that asm/io.h be
included /after/ asm/early_ioremap.h in all cases would fix it, but
that's pretty ugly as well.  Since I'm not going to spend the rest of my
life rectifying ia64 headers vs "generic" headers that aren't generic,
it's much simpler to just not build there.

Note that I've only actually tried to build this patch on x86_64, but
esrt.o still gets built there, and that would seem to demonstrate that
the conditional building is working correctly at all the places the code
built before.  I no longer have any ia64 machines handy to test that the
exclusion actually works there.

Signed-off-by: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 drivers/firmware/efi/Makefile | 5 ++++-
 include/linux/efi.h           | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index 26eabbc..81c8527 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -1,7 +1,10 @@
 #
 # Makefile for linux kernel
 #
-obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
+obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
+ifeq ($(CONFIG_IA64),)
+obj-$(CONFIG_EFI)			+= esrt.o
+endif
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
 obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
 obj-$(CONFIG_UEFI_CPER)			+= cper.o
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 024c27e..1983d17 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
 #endif
 extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
 extern int efi_config_init(efi_config_table_type_t *arch_tables);
+#ifdef CONFIG_IA64
+static inline void efi_esrt_init(void) { }
+#else
 extern void __init efi_esrt_init(void);
+#endif
 extern int efi_config_parse_tables(void *config_tables, int count, int sz,
 				   efi_config_table_type_t *arch_tables);
 extern u64 efi_get_iobase (void);
-- 
2.4.2

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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 17:11     ` Guenter Roeck
  0 siblings, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2015-06-05 17:11 UTC (permalink / raw)
  To: Peter Jones; +Cc: Matt Fleming, linux-kernel, linux-efi, Tony Luck

On Fri, Jun 05, 2015 at 01:02:26PM -0400, Peter Jones wrote:
> So, I'm told this problem exists in the world:
> ----------------------------------------------
> Subject: Build error in -next due to 'efi: Add esrt support'
> 
> Building ia64:defconfig ... failed
> --------------
> Error log:
> 
> drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
> such file or directory
> ----------------------------------------------
> 
> I'm not really sure how it's okay that we have things in asm-generic on
> some platforms but not others - is having it the same everywhere not the
> whole point of asm-generic?
> 
> That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
> difficult to imagine new IA64 machines with UEFI 2.5, just don't build
> this code there.
> 
> To me this looks like a workaround - doing something like:
> 
> generic-y += early_ioremap.h
> 
> in arch/ia64/include/asm/Kbuild would appear to be more correct, but
> ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
> and it's a macro.  So adding the above /and/ requiring that asm/io.h be
> included /after/ asm/early_ioremap.h in all cases would fix it, but
> that's pretty ugly as well.  Since I'm not going to spend the rest of my
> life rectifying ia64 headers vs "generic" headers that aren't generic,
> it's much simpler to just not build there.
> 
> Note that I've only actually tried to build this patch on x86_64, but
> esrt.o still gets built there, and that would seem to demonstrate that
> the conditional building is working correctly at all the places the code
> built before.  I no longer have any ia64 machines handy to test that the
> exclusion actually works there.
> 
> Signed-off-by: Peter Jones <pjones@redhat.com>
> ---
>  drivers/firmware/efi/Makefile | 5 ++++-
>  include/linux/efi.h           | 4 ++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
> index 26eabbc..81c8527 100644
> --- a/drivers/firmware/efi/Makefile
> +++ b/drivers/firmware/efi/Makefile
> @@ -1,7 +1,10 @@
>  #
>  # Makefile for linux kernel
>  #
> -obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
> +obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
> +ifeq ($(CONFIG_IA64),)
> +obj-$(CONFIG_EFI)			+= esrt.o
> +endif

Hi Peter,

How about adding a hidden Kconfig option instead ?

config EFI_ESRT
	bool
	depends on !IA64
	default true

Then you could use

obj-$(CONFIG_EFI_ESRT)	+= esrt.o

>  obj-$(CONFIG_EFI_VARS)			+= efivars.o
>  obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
>  obj-$(CONFIG_UEFI_CPER)			+= cper.o
> diff --git a/include/linux/efi.h b/include/linux/efi.h
> index 024c27e..1983d17 100644
> --- a/include/linux/efi.h
> +++ b/include/linux/efi.h
> @@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
>  #endif
>  extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
>  extern int efi_config_init(efi_config_table_type_t *arch_tables);
> +#ifdef CONFIG_IA64

and use CONFIG_EFI_ESRT here.

Thanks,
Guenter

> +static inline void efi_esrt_init(void) { }
> +#else
>  extern void __init efi_esrt_init(void);
> +#endif
>  extern int efi_config_parse_tables(void *config_tables, int count, int sz,
>  				   efi_config_table_type_t *arch_tables);
>  extern u64 efi_get_iobase (void);
> -- 
> 2.4.2
> 

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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 17:11     ` Guenter Roeck
  0 siblings, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2015-06-05 17:11 UTC (permalink / raw)
  To: Peter Jones
  Cc: Matt Fleming, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, Tony Luck

On Fri, Jun 05, 2015 at 01:02:26PM -0400, Peter Jones wrote:
> So, I'm told this problem exists in the world:
> ----------------------------------------------
> Subject: Build error in -next due to 'efi: Add esrt support'
> 
> Building ia64:defconfig ... failed
> --------------
> Error log:
> 
> drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
> such file or directory
> ----------------------------------------------
> 
> I'm not really sure how it's okay that we have things in asm-generic on
> some platforms but not others - is having it the same everywhere not the
> whole point of asm-generic?
> 
> That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
> difficult to imagine new IA64 machines with UEFI 2.5, just don't build
> this code there.
> 
> To me this looks like a workaround - doing something like:
> 
> generic-y += early_ioremap.h
> 
> in arch/ia64/include/asm/Kbuild would appear to be more correct, but
> ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
> and it's a macro.  So adding the above /and/ requiring that asm/io.h be
> included /after/ asm/early_ioremap.h in all cases would fix it, but
> that's pretty ugly as well.  Since I'm not going to spend the rest of my
> life rectifying ia64 headers vs "generic" headers that aren't generic,
> it's much simpler to just not build there.
> 
> Note that I've only actually tried to build this patch on x86_64, but
> esrt.o still gets built there, and that would seem to demonstrate that
> the conditional building is working correctly at all the places the code
> built before.  I no longer have any ia64 machines handy to test that the
> exclusion actually works there.
> 
> Signed-off-by: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/firmware/efi/Makefile | 5 ++++-
>  include/linux/efi.h           | 4 ++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
> index 26eabbc..81c8527 100644
> --- a/drivers/firmware/efi/Makefile
> +++ b/drivers/firmware/efi/Makefile
> @@ -1,7 +1,10 @@
>  #
>  # Makefile for linux kernel
>  #
> -obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
> +obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
> +ifeq ($(CONFIG_IA64),)
> +obj-$(CONFIG_EFI)			+= esrt.o
> +endif

Hi Peter,

How about adding a hidden Kconfig option instead ?

config EFI_ESRT
	bool
	depends on !IA64
	default true

Then you could use

obj-$(CONFIG_EFI_ESRT)	+= esrt.o

>  obj-$(CONFIG_EFI_VARS)			+= efivars.o
>  obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
>  obj-$(CONFIG_UEFI_CPER)			+= cper.o
> diff --git a/include/linux/efi.h b/include/linux/efi.h
> index 024c27e..1983d17 100644
> --- a/include/linux/efi.h
> +++ b/include/linux/efi.h
> @@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
>  #endif
>  extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
>  extern int efi_config_init(efi_config_table_type_t *arch_tables);
> +#ifdef CONFIG_IA64

and use CONFIG_EFI_ESRT here.

Thanks,
Guenter

> +static inline void efi_esrt_init(void) { }
> +#else
>  extern void __init efi_esrt_init(void);
> +#endif
>  extern int efi_config_parse_tables(void *config_tables, int count, int sz,
>  				   efi_config_table_type_t *arch_tables);
>  extern u64 efi_get_iobase (void);
> -- 
> 2.4.2
> 

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

* RE: [PATCH] efi: Work around ia64 build problem with ESRT driver.
  2015-06-05 17:02   ` Peter Jones
  (?)
  (?)
@ 2015-06-05 17:14   ` Luck, Tony
  -1 siblings, 0 replies; 17+ messages in thread
From: Luck, Tony @ 2015-06-05 17:14 UTC (permalink / raw)
  To: Peter Jones, Guenter Roeck; +Cc: Fleming, Matt, linux-kernel, linux-efi

-obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
+obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
+ifeq ($(CONFIG_IA64),)
+obj-$(CONFIG_EFI)			+= esrt.o
+endif
 
I doubt that ia64 systems are going to start implementing ERST - so it's fine with me
to drop it from the build.

Guenter's suggestion of a new CONFIG_EFI_ESRT looks a bit prettier that that
    ifeq ($(CONFIG_IA64),)

but either way:

Acked-by: Tony Luck <tony.luck@intel.com>


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

* [PATCH] efi: Work around ia64 build problem with ESRT driver.
  2015-06-05 17:11     ` Guenter Roeck
  (?)
@ 2015-06-05 18:54     ` Peter Jones
  2015-06-05 19:13         ` Peter Jones
  -1 siblings, 1 reply; 17+ messages in thread
From: Peter Jones @ 2015-06-05 18:54 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Matt Fleming, linux-kernel, linux-efi, Tony Luck, Peter Jones

So, I'm told this problem exists in the world:
----------------------------------------------
Subject: Build error in -next due to 'efi: Add esrt support'

Building ia64:defconfig ... failed
--------------
Error log:

drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
such file or directory
----------------------------------------------

I'm not really sure how it's okay that we have things in asm-generic on
some platforms but not others - is having it the same everywhere not the
whole point of asm-generic?

That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
difficult to imagine new IA64 machines with UEFI 2.5, just don't build
this code there.

To me this looks like a workaround - doing something like:

generic-y += early_ioremap.h

in arch/ia64/include/asm/Kbuild would appear to be more correct, but
ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
and it's a macro.  So adding the above /and/ requiring that asm/io.h be
included /after/ asm/early_ioremap.h in all cases would fix it, but
that's pretty ugly as well.  Since I'm not going to spend the rest of my
life rectifying ia64 headers vs "generic" headers that aren't generic,
it's much simpler to just not build there.

Note that I've only actually tried to build this patch on x86_64, but
esrt.o still gets built there, and that would seem to demonstrate that
the conditional building is working correctly at all the places the code
built before.  I no longer have any ia64 machines handy to test that the
exclusion actually works there.

Signed-off-by: Peter Jones <pjones@redhat.com>
Acked-by: Tony Luck <tony.luck@intel.com>
---
 drivers/firmware/efi/Kconfig  | 5 +++++
 drivers/firmware/efi/Makefile | 3 ++-
 include/linux/efi.h           | 4 ++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 8de4da5..2272ff0 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -18,6 +18,11 @@ config EFI_VARS
 	  Subsequent efibootmgr releases may be found at:
 	  <http://github.com/vathpela/efibootmgr>
 
+config EFI_ESRT
+	bool
+	depends on EFI && !IA64
+	default true
+
 config EFI_VARS_PSTORE
 	tristate "Register efivars backend for pstore"
 	depends on EFI_VARS && PSTORE
diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index 26eabbc..6fd3da9 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -1,8 +1,9 @@
 #
 # Makefile for linux kernel
 #
-obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
+obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
+obj-$(CONFIG_EFI_ESRT)			+= esrt.o
 obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
 obj-$(CONFIG_UEFI_CPER)			+= cper.o
 obj-$(CONFIG_EFI_RUNTIME_MAP)		+= runtime-map.o
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 024c27e..2092965 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
 #endif
 extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
 extern int efi_config_init(efi_config_table_type_t *arch_tables);
+#ifdef CONFIG_EFI_ESRT
 extern void __init efi_esrt_init(void);
+#else
+static inline void efi_esrt_init(void) { }
+#endif
 extern int efi_config_parse_tables(void *config_tables, int count, int sz,
 				   efi_config_table_type_t *arch_tables);
 extern u64 efi_get_iobase (void);
-- 
2.4.2


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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 19:13         ` Peter Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Jones @ 2015-06-05 19:13 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Matt Fleming, linux-kernel, linux-efi, Tony Luck

On Fri, Jun 05, 2015 at 02:54:35PM -0400, Peter Jones wrote:
> Note that I've only actually tried to build this patch on x86_64, but
> esrt.o still gets built there, and that would seem to demonstrate that
> the conditional building is working correctly at all the places the code
> built before.  I no longer have any ia64 machines handy to test that the
> exclusion actually works there.

This, of course, is a total lie.  I'll send a reply patch in which it's
actually true.

> Acked-by: Tony Luck <tony.luck@intel.com>

So sorry, Tony.

-- 
        Peter

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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 19:13         ` Peter Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Jones @ 2015-06-05 19:13 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Matt Fleming, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, Tony Luck

On Fri, Jun 05, 2015 at 02:54:35PM -0400, Peter Jones wrote:
> Note that I've only actually tried to build this patch on x86_64, but
> esrt.o still gets built there, and that would seem to demonstrate that
> the conditional building is working correctly at all the places the code
> built before.  I no longer have any ia64 machines handy to test that the
> exclusion actually works there.

This, of course, is a total lie.  I'll send a reply patch in which it's
actually true.

> Acked-by: Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

So sorry, Tony.

-- 
        Peter

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

* [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 19:14           ` Peter Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Jones @ 2015-06-05 19:14 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Matt Fleming, linux-kernel, linux-efi, Tony Luck, Peter Jones

So, I'm told this problem exists in the world:
----------------------------------------------
Subject: Build error in -next due to 'efi: Add esrt support'

Building ia64:defconfig ... failed
--------------
Error log:

drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
such file or directory
----------------------------------------------

I'm not really sure how it's okay that we have things in asm-generic on
some platforms but not others - is having it the same everywhere not the
whole point of asm-generic?

That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
difficult to imagine new IA64 machines with UEFI 2.5, just don't build
this code there.

To me this looks like a workaround - doing something like:

generic-y += early_ioremap.h

in arch/ia64/include/asm/Kbuild would appear to be more correct, but
ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
and it's a macro.  So adding the above /and/ requiring that asm/io.h be
included /after/ asm/early_ioremap.h in all cases would fix it, but
that's pretty ugly as well.  Since I'm not going to spend the rest of my
life rectifying ia64 headers vs "generic" headers that aren't generic,
it's much simpler to just not build there.

Note that I've only actually tried to build this patch on x86_64, but
esrt.o still gets built there, and that would seem to demonstrate that
the conditional building is working correctly at all the places the code
built before.  I no longer have any ia64 machines handy to test that the
exclusion actually works there.

Signed-off-by: Peter Jones <pjones@redhat.com>
Acked-by: Tony Luck <tony.luck@intel.com>
---
 drivers/firmware/efi/Kconfig  | 5 +++++
 drivers/firmware/efi/Makefile | 3 ++-
 include/linux/efi.h           | 4 ++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 8de4da5..54071c1 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -18,6 +18,11 @@ config EFI_VARS
 	  Subsequent efibootmgr releases may be found at:
 	  <http://github.com/vathpela/efibootmgr>
 
+config EFI_ESRT
+	bool
+	depends on EFI && !IA64
+	default y
+
 config EFI_VARS_PSTORE
 	tristate "Register efivars backend for pstore"
 	depends on EFI_VARS && PSTORE
diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index 26eabbc..6fd3da9 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -1,8 +1,9 @@
 #
 # Makefile for linux kernel
 #
-obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
+obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
+obj-$(CONFIG_EFI_ESRT)			+= esrt.o
 obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
 obj-$(CONFIG_UEFI_CPER)			+= cper.o
 obj-$(CONFIG_EFI_RUNTIME_MAP)		+= runtime-map.o
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 024c27e..2092965 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
 #endif
 extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
 extern int efi_config_init(efi_config_table_type_t *arch_tables);
+#ifdef CONFIG_EFI_ESRT
 extern void __init efi_esrt_init(void);
+#else
+static inline void efi_esrt_init(void) { }
+#endif
 extern int efi_config_parse_tables(void *config_tables, int count, int sz,
 				   efi_config_table_type_t *arch_tables);
 extern u64 efi_get_iobase (void);
-- 
2.4.2


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

* [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 19:14           ` Peter Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Jones @ 2015-06-05 19:14 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Matt Fleming, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, Tony Luck, Peter Jones

So, I'm told this problem exists in the world:
----------------------------------------------
Subject: Build error in -next due to 'efi: Add esrt support'

Building ia64:defconfig ... failed
--------------
Error log:

drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
such file or directory
----------------------------------------------

I'm not really sure how it's okay that we have things in asm-generic on
some platforms but not others - is having it the same everywhere not the
whole point of asm-generic?

That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
difficult to imagine new IA64 machines with UEFI 2.5, just don't build
this code there.

To me this looks like a workaround - doing something like:

generic-y += early_ioremap.h

in arch/ia64/include/asm/Kbuild would appear to be more correct, but
ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
and it's a macro.  So adding the above /and/ requiring that asm/io.h be
included /after/ asm/early_ioremap.h in all cases would fix it, but
that's pretty ugly as well.  Since I'm not going to spend the rest of my
life rectifying ia64 headers vs "generic" headers that aren't generic,
it's much simpler to just not build there.

Note that I've only actually tried to build this patch on x86_64, but
esrt.o still gets built there, and that would seem to demonstrate that
the conditional building is working correctly at all the places the code
built before.  I no longer have any ia64 machines handy to test that the
exclusion actually works there.

Signed-off-by: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Acked-by: Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/firmware/efi/Kconfig  | 5 +++++
 drivers/firmware/efi/Makefile | 3 ++-
 include/linux/efi.h           | 4 ++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 8de4da5..54071c1 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -18,6 +18,11 @@ config EFI_VARS
 	  Subsequent efibootmgr releases may be found at:
 	  <http://github.com/vathpela/efibootmgr>
 
+config EFI_ESRT
+	bool
+	depends on EFI && !IA64
+	default y
+
 config EFI_VARS_PSTORE
 	tristate "Register efivars backend for pstore"
 	depends on EFI_VARS && PSTORE
diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index 26eabbc..6fd3da9 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -1,8 +1,9 @@
 #
 # Makefile for linux kernel
 #
-obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
+obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
+obj-$(CONFIG_EFI_ESRT)			+= esrt.o
 obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
 obj-$(CONFIG_UEFI_CPER)			+= cper.o
 obj-$(CONFIG_EFI_RUNTIME_MAP)		+= runtime-map.o
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 024c27e..2092965 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
 #endif
 extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
 extern int efi_config_init(efi_config_table_type_t *arch_tables);
+#ifdef CONFIG_EFI_ESRT
 extern void __init efi_esrt_init(void);
+#else
+static inline void efi_esrt_init(void) { }
+#endif
 extern int efi_config_parse_tables(void *config_tables, int count, int sz,
 				   efi_config_table_type_t *arch_tables);
 extern u64 efi_get_iobase (void);
-- 
2.4.2

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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 19:23             ` Guenter Roeck
  0 siblings, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2015-06-05 19:23 UTC (permalink / raw)
  To: Peter Jones; +Cc: Matt Fleming, linux-kernel, linux-efi, Tony Luck

On Fri, Jun 05, 2015 at 03:14:54PM -0400, Peter Jones wrote:
> So, I'm told this problem exists in the world:
> ----------------------------------------------
> Subject: Build error in -next due to 'efi: Add esrt support'
> 
> Building ia64:defconfig ... failed
> --------------
> Error log:
> 
> drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
> such file or directory
> ----------------------------------------------
> 
> I'm not really sure how it's okay that we have things in asm-generic on
> some platforms but not others - is having it the same everywhere not the
> whole point of asm-generic?
> 
> That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
> difficult to imagine new IA64 machines with UEFI 2.5, just don't build
> this code there.
> 
> To me this looks like a workaround - doing something like:
> 
> generic-y += early_ioremap.h
> 
> in arch/ia64/include/asm/Kbuild would appear to be more correct, but
> ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
> and it's a macro.  So adding the above /and/ requiring that asm/io.h be
> included /after/ asm/early_ioremap.h in all cases would fix it, but
> that's pretty ugly as well.  Since I'm not going to spend the rest of my
> life rectifying ia64 headers vs "generic" headers that aren't generic,
> it's much simpler to just not build there.
> 
> Note that I've only actually tried to build this patch on x86_64, but
> esrt.o still gets built there, and that would seem to demonstrate that
> the conditional building is working correctly at all the places the code
> built before.  I no longer have any ia64 machines handy to test that the
> exclusion actually works there.
> 
> Signed-off-by: Peter Jones <pjones@redhat.com>
> Acked-by: Tony Luck <tony.luck@intel.com>

The ia64:defconfig build passes with this patch, so

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
(Compile-)Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter

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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-05 19:23             ` Guenter Roeck
  0 siblings, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2015-06-05 19:23 UTC (permalink / raw)
  To: Peter Jones
  Cc: Matt Fleming, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, Tony Luck

On Fri, Jun 05, 2015 at 03:14:54PM -0400, Peter Jones wrote:
> So, I'm told this problem exists in the world:
> ----------------------------------------------
> Subject: Build error in -next due to 'efi: Add esrt support'
> 
> Building ia64:defconfig ... failed
> --------------
> Error log:
> 
> drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
> such file or directory
> ----------------------------------------------
> 
> I'm not really sure how it's okay that we have things in asm-generic on
> some platforms but not others - is having it the same everywhere not the
> whole point of asm-generic?
> 
> That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
> difficult to imagine new IA64 machines with UEFI 2.5, just don't build
> this code there.
> 
> To me this looks like a workaround - doing something like:
> 
> generic-y += early_ioremap.h
> 
> in arch/ia64/include/asm/Kbuild would appear to be more correct, but
> ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
> and it's a macro.  So adding the above /and/ requiring that asm/io.h be
> included /after/ asm/early_ioremap.h in all cases would fix it, but
> that's pretty ugly as well.  Since I'm not going to spend the rest of my
> life rectifying ia64 headers vs "generic" headers that aren't generic,
> it's much simpler to just not build there.
> 
> Note that I've only actually tried to build this patch on x86_64, but
> esrt.o still gets built there, and that would seem to demonstrate that
> the conditional building is working correctly at all the places the code
> built before.  I no longer have any ia64 machines handy to test that the
> exclusion actually works there.
> 
> Signed-off-by: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Acked-by: Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

The ia64:defconfig build passes with this patch, so

Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
(Compile-)Tested-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

Guenter

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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-08 10:09             ` Matt Fleming
  0 siblings, 0 replies; 17+ messages in thread
From: Matt Fleming @ 2015-06-08 10:09 UTC (permalink / raw)
  To: Peter Jones
  Cc: Guenter Roeck, Matt Fleming, linux-kernel, linux-efi, Tony Luck,
	Mark Salter, H. Peter Anvin, Catalin Marinas, Andrew Morton

On Fri, 05 Jun, at 03:14:54PM, Peter Jones wrote:
> So, I'm told this problem exists in the world:
> ----------------------------------------------
> Subject: Build error in -next due to 'efi: Add esrt support'
> 
> Building ia64:defconfig ... failed
> --------------
> Error log:
> 
> drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
> such file or directory
> ----------------------------------------------
> 
> I'm not really sure how it's okay that we have things in asm-generic on
> some platforms but not others - is having it the same everywhere not the
> whole point of asm-generic?
> 
> That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
> difficult to imagine new IA64 machines with UEFI 2.5, just don't build
> this code there.
> 
> To me this looks like a workaround - doing something like:
> 
> generic-y += early_ioremap.h
> 
> in arch/ia64/include/asm/Kbuild would appear to be more correct, but
> ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
> and it's a macro.  So adding the above /and/ requiring that asm/io.h be
> included /after/ asm/early_ioremap.h in all cases would fix it, but
> that's pretty ugly as well.  Since I'm not going to spend the rest of my
> life rectifying ia64 headers vs "generic" headers that aren't generic,
> it's much simpler to just not build there.
> 
> Note that I've only actually tried to build this patch on x86_64, but
> esrt.o still gets built there, and that would seem to demonstrate that
> the conditional building is working correctly at all the places the code
> built before.  I no longer have any ia64 machines handy to test that the
> exclusion actually works there.
> 
> Signed-off-by: Peter Jones <pjones@redhat.com>
> Acked-by: Tony Luck <tony.luck@intel.com>
> ---
>  drivers/firmware/efi/Kconfig  | 5 +++++
>  drivers/firmware/efi/Makefile | 3 ++-
>  include/linux/efi.h           | 4 ++++
>  3 files changed, 11 insertions(+), 1 deletion(-)
 
Thanks Peter, I picked this up with everyone's Ack/Test tags.

But now let's Cc some more people that can answer the questions you
posed above, which would be the people mentioned in commit 9e5c33d7aeee
("mm: create generic early_ioremap() support").

Folks, is it legitimate to have headers in include/asm-generic/ that
aren't available to all architectures? The build failure incurred by
directly including asm/early_ioremap.h is noted above.

> diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
> index 8de4da5..54071c1 100644
> --- a/drivers/firmware/efi/Kconfig
> +++ b/drivers/firmware/efi/Kconfig
> @@ -18,6 +18,11 @@ config EFI_VARS
>  	  Subsequent efibootmgr releases may be found at:
>  	  <http://github.com/vathpela/efibootmgr>
>  
> +config EFI_ESRT
> +	bool
> +	depends on EFI && !IA64
> +	default y
> +
>  config EFI_VARS_PSTORE
>  	tristate "Register efivars backend for pstore"
>  	depends on EFI_VARS && PSTORE
> diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
> index 26eabbc..6fd3da9 100644
> --- a/drivers/firmware/efi/Makefile
> +++ b/drivers/firmware/efi/Makefile
> @@ -1,8 +1,9 @@
>  #
>  # Makefile for linux kernel
>  #
> -obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
> +obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
>  obj-$(CONFIG_EFI_VARS)			+= efivars.o
> +obj-$(CONFIG_EFI_ESRT)			+= esrt.o
>  obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
>  obj-$(CONFIG_UEFI_CPER)			+= cper.o
>  obj-$(CONFIG_EFI_RUNTIME_MAP)		+= runtime-map.o
> diff --git a/include/linux/efi.h b/include/linux/efi.h
> index 024c27e..2092965 100644
> --- a/include/linux/efi.h
> +++ b/include/linux/efi.h
> @@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
>  #endif
>  extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
>  extern int efi_config_init(efi_config_table_type_t *arch_tables);
> +#ifdef CONFIG_EFI_ESRT
>  extern void __init efi_esrt_init(void);
> +#else
> +static inline void efi_esrt_init(void) { }
> +#endif
>  extern int efi_config_parse_tables(void *config_tables, int count, int sz,
>  				   efi_config_table_type_t *arch_tables);
>  extern u64 efi_get_iobase (void);
> -- 
> 2.4.2
> 

-- 
Matt Fleming, Intel Open Source Technology Center

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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-08 10:09             ` Matt Fleming
  0 siblings, 0 replies; 17+ messages in thread
From: Matt Fleming @ 2015-06-08 10:09 UTC (permalink / raw)
  To: Peter Jones
  Cc: Guenter Roeck, Matt Fleming, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, Tony Luck, Mark Salter,
	H. Peter Anvin, Catalin Marinas, Andrew Morton

On Fri, 05 Jun, at 03:14:54PM, Peter Jones wrote:
> So, I'm told this problem exists in the world:
> ----------------------------------------------
> Subject: Build error in -next due to 'efi: Add esrt support'
> 
> Building ia64:defconfig ... failed
> --------------
> Error log:
> 
> drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
> such file or directory
> ----------------------------------------------
> 
> I'm not really sure how it's okay that we have things in asm-generic on
> some platforms but not others - is having it the same everywhere not the
> whole point of asm-generic?
> 
> That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
> difficult to imagine new IA64 machines with UEFI 2.5, just don't build
> this code there.
> 
> To me this looks like a workaround - doing something like:
> 
> generic-y += early_ioremap.h
> 
> in arch/ia64/include/asm/Kbuild would appear to be more correct, but
> ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
> and it's a macro.  So adding the above /and/ requiring that asm/io.h be
> included /after/ asm/early_ioremap.h in all cases would fix it, but
> that's pretty ugly as well.  Since I'm not going to spend the rest of my
> life rectifying ia64 headers vs "generic" headers that aren't generic,
> it's much simpler to just not build there.
> 
> Note that I've only actually tried to build this patch on x86_64, but
> esrt.o still gets built there, and that would seem to demonstrate that
> the conditional building is working correctly at all the places the code
> built before.  I no longer have any ia64 machines handy to test that the
> exclusion actually works there.
> 
> Signed-off-by: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Acked-by: Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/firmware/efi/Kconfig  | 5 +++++
>  drivers/firmware/efi/Makefile | 3 ++-
>  include/linux/efi.h           | 4 ++++
>  3 files changed, 11 insertions(+), 1 deletion(-)
 
Thanks Peter, I picked this up with everyone's Ack/Test tags.

But now let's Cc some more people that can answer the questions you
posed above, which would be the people mentioned in commit 9e5c33d7aeee
("mm: create generic early_ioremap() support").

Folks, is it legitimate to have headers in include/asm-generic/ that
aren't available to all architectures? The build failure incurred by
directly including asm/early_ioremap.h is noted above.

> diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
> index 8de4da5..54071c1 100644
> --- a/drivers/firmware/efi/Kconfig
> +++ b/drivers/firmware/efi/Kconfig
> @@ -18,6 +18,11 @@ config EFI_VARS
>  	  Subsequent efibootmgr releases may be found at:
>  	  <http://github.com/vathpela/efibootmgr>
>  
> +config EFI_ESRT
> +	bool
> +	depends on EFI && !IA64
> +	default y
> +
>  config EFI_VARS_PSTORE
>  	tristate "Register efivars backend for pstore"
>  	depends on EFI_VARS && PSTORE
> diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
> index 26eabbc..6fd3da9 100644
> --- a/drivers/firmware/efi/Makefile
> +++ b/drivers/firmware/efi/Makefile
> @@ -1,8 +1,9 @@
>  #
>  # Makefile for linux kernel
>  #
> -obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
> +obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
>  obj-$(CONFIG_EFI_VARS)			+= efivars.o
> +obj-$(CONFIG_EFI_ESRT)			+= esrt.o
>  obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
>  obj-$(CONFIG_UEFI_CPER)			+= cper.o
>  obj-$(CONFIG_EFI_RUNTIME_MAP)		+= runtime-map.o
> diff --git a/include/linux/efi.h b/include/linux/efi.h
> index 024c27e..2092965 100644
> --- a/include/linux/efi.h
> +++ b/include/linux/efi.h
> @@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
>  #endif
>  extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
>  extern int efi_config_init(efi_config_table_type_t *arch_tables);
> +#ifdef CONFIG_EFI_ESRT
>  extern void __init efi_esrt_init(void);
> +#else
> +static inline void efi_esrt_init(void) { }
> +#endif
>  extern int efi_config_parse_tables(void *config_tables, int count, int sz,
>  				   efi_config_table_type_t *arch_tables);
>  extern u64 efi_get_iobase (void);
> -- 
> 2.4.2
> 

-- 
Matt Fleming, Intel Open Source Technology Center

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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-08 15:51               ` Mark Salter
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Salter @ 2015-06-08 15:51 UTC (permalink / raw)
  To: Matt Fleming
  Cc: Peter Jones, Guenter Roeck, Matt Fleming, linux-kernel,
	linux-efi, Tony Luck, H. Peter Anvin, Catalin Marinas,
	Andrew Morton

On Mon, 2015-06-08 at 11:09 +0100, Matt Fleming wrote:
> On Fri, 05 Jun, at 03:14:54PM, Peter Jones wrote:
> > So, I'm told this problem exists in the world:
> > ----------------------------------------------
> > Subject: Build error in -next due to 'efi: Add esrt support'
> > 
> > Building ia64:defconfig ... failed
> > --------------
> > Error log:
> > 
> > drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
> > such file or directory
> > ----------------------------------------------
> > 
> > I'm not really sure how it's okay that we have things in asm-generic on
> > some platforms but not others - is having it the same everywhere not the
> > whole point of asm-generic?
> > 
> > That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
> > difficult to imagine new IA64 machines with UEFI 2.5, just don't build
> > this code there.
> > 
> > To me this looks like a workaround - doing something like:
> > 
> > generic-y += early_ioremap.h
> > 
> > in arch/ia64/include/asm/Kbuild would appear to be more correct, but
> > ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
> > and it's a macro.  So adding the above /and/ requiring that asm/io.h be
> > included /after/ asm/early_ioremap.h in all cases would fix it, but
> > that's pretty ugly as well.  Since I'm not going to spend the rest of my
> > life rectifying ia64 headers vs "generic" headers that aren't generic,
> > it's much simpler to just not build there.
> > 
> > Note that I've only actually tried to build this patch on x86_64, but
> > esrt.o still gets built there, and that would seem to demonstrate that
> > the conditional building is working correctly at all the places the code
> > built before.  I no longer have any ia64 machines handy to test that the
> > exclusion actually works there.
> > 
> > Signed-off-by: Peter Jones <pjones@redhat.com>
> > Acked-by: Tony Luck <tony.luck@intel.com>
> > ---
> >  drivers/firmware/efi/Kconfig  | 5 +++++
> >  drivers/firmware/efi/Makefile | 3 ++-
> >  include/linux/efi.h           | 4 ++++
> >  3 files changed, 11 insertions(+), 1 deletion(-)
>  
> Thanks Peter, I picked this up with everyone's Ack/Test tags.
> 
> But now let's Cc some more people that can answer the questions you
> posed above, which would be the people mentioned in commit 9e5c33d7aeee
> ("mm: create generic early_ioremap() support").
> 
> Folks, is it legitimate to have headers in include/asm-generic/ that
> aren't available to all architectures? The build failure incurred by
> directly including asm/early_ioremap.h is noted above.

To answer generally, yes it is legitimate to have asm-generic headers
which are not used by all architectures.

The intent of asm-generic/fixmap.h was to consolidate the generic
bits copied by all architectures *which implemented fixmap.h* in
<arch>/include/asm. Not all architecture need to involve page
table mappings for fixmap-like support and fixmap makes no sense for
!MMU arches.

> 
> > diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
> > index 8de4da5..54071c1 100644
> > --- a/drivers/firmware/efi/Kconfig
> > +++ b/drivers/firmware/efi/Kconfig
> > @@ -18,6 +18,11 @@ config EFI_VARS
> >  	  Subsequent efibootmgr releases may be found at:
> >  	  <http://github.com/vathpela/efibootmgr>
> >  
> > +config EFI_ESRT
> > +	bool
> > +	depends on EFI && !IA64
> > +	default y
> > +
> >  config EFI_VARS_PSTORE
> >  	tristate "Register efivars backend for pstore"
> >  	depends on EFI_VARS && PSTORE
> > diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
> > index 26eabbc..6fd3da9 100644
> > --- a/drivers/firmware/efi/Makefile
> > +++ b/drivers/firmware/efi/Makefile
> > @@ -1,8 +1,9 @@
> >  #
> >  # Makefile for linux kernel
> >  #
> > -obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
> > +obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
> >  obj-$(CONFIG_EFI_VARS)			+= efivars.o
> > +obj-$(CONFIG_EFI_ESRT)			+= esrt.o
> >  obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
> >  obj-$(CONFIG_UEFI_CPER)			+= cper.o
> >  obj-$(CONFIG_EFI_RUNTIME_MAP)		+= runtime-map.o
> > diff --git a/include/linux/efi.h b/include/linux/efi.h
> > index 024c27e..2092965 100644
> > --- a/include/linux/efi.h
> > +++ b/include/linux/efi.h
> > @@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
> >  #endif
> >  extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
> >  extern int efi_config_init(efi_config_table_type_t *arch_tables);
> > +#ifdef CONFIG_EFI_ESRT
> >  extern void __init efi_esrt_init(void);
> > +#else
> > +static inline void efi_esrt_init(void) { }
> > +#endif
> >  extern int efi_config_parse_tables(void *config_tables, int count, int sz,
> >  				   efi_config_table_type_t *arch_tables);
> >  extern u64 efi_get_iobase (void);
> > -- 
> > 2.4.2
> > 
> 



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

* Re: [PATCH] efi: Work around ia64 build problem with ESRT driver.
@ 2015-06-08 15:51               ` Mark Salter
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Salter @ 2015-06-08 15:51 UTC (permalink / raw)
  To: Matt Fleming
  Cc: Peter Jones, Guenter Roeck, Matt Fleming,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, Tony Luck, H. Peter Anvin,
	Catalin Marinas, Andrew Morton

On Mon, 2015-06-08 at 11:09 +0100, Matt Fleming wrote:
> On Fri, 05 Jun, at 03:14:54PM, Peter Jones wrote:
> > So, I'm told this problem exists in the world:
> > ----------------------------------------------
> > Subject: Build error in -next due to 'efi: Add esrt support'
> > 
> > Building ia64:defconfig ... failed
> > --------------
> > Error log:
> > 
> > drivers/firmware/efi/esrt.c:28:31: fatal error: asm/early_ioremap.h: No
> > such file or directory
> > ----------------------------------------------
> > 
> > I'm not really sure how it's okay that we have things in asm-generic on
> > some platforms but not others - is having it the same everywhere not the
> > whole point of asm-generic?
> > 
> > That said, ia64 doesn't have early-ioremap.h .  So instead, since it's
> > difficult to imagine new IA64 machines with UEFI 2.5, just don't build
> > this code there.
> > 
> > To me this looks like a workaround - doing something like:
> > 
> > generic-y += early_ioremap.h
> > 
> > in arch/ia64/include/asm/Kbuild would appear to be more correct, but
> > ia64 has its own early_memremap() decl in arch/ia64/include/asm/io.h ,
> > and it's a macro.  So adding the above /and/ requiring that asm/io.h be
> > included /after/ asm/early_ioremap.h in all cases would fix it, but
> > that's pretty ugly as well.  Since I'm not going to spend the rest of my
> > life rectifying ia64 headers vs "generic" headers that aren't generic,
> > it's much simpler to just not build there.
> > 
> > Note that I've only actually tried to build this patch on x86_64, but
> > esrt.o still gets built there, and that would seem to demonstrate that
> > the conditional building is working correctly at all the places the code
> > built before.  I no longer have any ia64 machines handy to test that the
> > exclusion actually works there.
> > 
> > Signed-off-by: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > Acked-by: Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > ---
> >  drivers/firmware/efi/Kconfig  | 5 +++++
> >  drivers/firmware/efi/Makefile | 3 ++-
> >  include/linux/efi.h           | 4 ++++
> >  3 files changed, 11 insertions(+), 1 deletion(-)
>  
> Thanks Peter, I picked this up with everyone's Ack/Test tags.
> 
> But now let's Cc some more people that can answer the questions you
> posed above, which would be the people mentioned in commit 9e5c33d7aeee
> ("mm: create generic early_ioremap() support").
> 
> Folks, is it legitimate to have headers in include/asm-generic/ that
> aren't available to all architectures? The build failure incurred by
> directly including asm/early_ioremap.h is noted above.

To answer generally, yes it is legitimate to have asm-generic headers
which are not used by all architectures.

The intent of asm-generic/fixmap.h was to consolidate the generic
bits copied by all architectures *which implemented fixmap.h* in
<arch>/include/asm. Not all architecture need to involve page
table mappings for fixmap-like support and fixmap makes no sense for
!MMU arches.

> 
> > diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
> > index 8de4da5..54071c1 100644
> > --- a/drivers/firmware/efi/Kconfig
> > +++ b/drivers/firmware/efi/Kconfig
> > @@ -18,6 +18,11 @@ config EFI_VARS
> >  	  Subsequent efibootmgr releases may be found at:
> >  	  <http://github.com/vathpela/efibootmgr>
> >  
> > +config EFI_ESRT
> > +	bool
> > +	depends on EFI && !IA64
> > +	default y
> > +
> >  config EFI_VARS_PSTORE
> >  	tristate "Register efivars backend for pstore"
> >  	depends on EFI_VARS && PSTORE
> > diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
> > index 26eabbc..6fd3da9 100644
> > --- a/drivers/firmware/efi/Makefile
> > +++ b/drivers/firmware/efi/Makefile
> > @@ -1,8 +1,9 @@
> >  #
> >  # Makefile for linux kernel
> >  #
> > -obj-$(CONFIG_EFI)			+= efi.o esrt.o vars.o reboot.o
> > +obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o
> >  obj-$(CONFIG_EFI_VARS)			+= efivars.o
> > +obj-$(CONFIG_EFI_ESRT)			+= esrt.o
> >  obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
> >  obj-$(CONFIG_UEFI_CPER)			+= cper.o
> >  obj-$(CONFIG_EFI_RUNTIME_MAP)		+= runtime-map.o
> > diff --git a/include/linux/efi.h b/include/linux/efi.h
> > index 024c27e..2092965 100644
> > --- a/include/linux/efi.h
> > +++ b/include/linux/efi.h
> > @@ -879,7 +879,11 @@ static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned lon
> >  #endif
> >  extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
> >  extern int efi_config_init(efi_config_table_type_t *arch_tables);
> > +#ifdef CONFIG_EFI_ESRT
> >  extern void __init efi_esrt_init(void);
> > +#else
> > +static inline void efi_esrt_init(void) { }
> > +#endif
> >  extern int efi_config_parse_tables(void *config_tables, int count, int sz,
> >  				   efi_config_table_type_t *arch_tables);
> >  extern u64 efi_get_iobase (void);
> > -- 
> > 2.4.2
> > 
> 

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

end of thread, other threads:[~2015-06-08 15:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-05 14:49 Build error in -next due to 'efi: Add esrt support' Guenter Roeck
2015-06-05 17:02 ` [PATCH] efi: Work around ia64 build problem with ESRT driver Peter Jones
2015-06-05 17:02   ` Peter Jones
2015-06-05 17:11   ` Guenter Roeck
2015-06-05 17:11     ` Guenter Roeck
2015-06-05 18:54     ` Peter Jones
2015-06-05 19:13       ` Peter Jones
2015-06-05 19:13         ` Peter Jones
2015-06-05 19:14         ` Peter Jones
2015-06-05 19:14           ` Peter Jones
2015-06-05 19:23           ` Guenter Roeck
2015-06-05 19:23             ` Guenter Roeck
2015-06-08 10:09           ` Matt Fleming
2015-06-08 10:09             ` Matt Fleming
2015-06-08 15:51             ` Mark Salter
2015-06-08 15:51               ` Mark Salter
2015-06-05 17:14   ` Luck, Tony

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.