Skip to contentSkip to conversation

move asm-ia64/efi.h to linux/efi.h ?

Linux-ia64 [email protected] 2 participants 5 messages Aug 13, 2002 – Aug 15, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

David, any further thoughts on moving include/asm-ia64/efi.h to linux/efi.h? Now that EFI GUID Partition Tables are part of the stock 2.4 and 2.5 kernel series, and can be (and will be!) used on x86 platforms too, several people have commented on l-k this week that it doesn't make sense to keep it in asm-ia64. I agree. There's also no ia64-specific code in there.

I'd be happy to work up a patch to move it if there was a chance it would be accepted and submitted to Marcelo and Linus.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#1 US Linux Server provider for 2001 and Q1/2002! (IDC May 2002)

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Tue, 13 Aug 2002 17:38:11 -0500, [email protected] said:

Matt> David, any further thoughts on moving include/asm-ia64/efi.h Matt> to linux/efi.h? Now that EFI GUID Partition Tables are part Matt> of the stock 2.4 and 2.5 kernel series, and can be (and will Matt> be!) used on x86 platforms too, several people have commented Matt> on l-k this week that it doesn't make sense to keep it in Matt> asm-ia64. I agree. There's also no ia64-specific code in Matt> there.

Matt> I'd be happy to work up a patch to move it if there was a Matt> chance it would be accepted and submitted to Marcelo and Matt> Linus.

Oh, I'm obviously totally in favor of that, too. It's convincing Marcelo/Linus which may (or may not) be the hard part. The best argument for getting this into the linux directory would be if you can say that x86 machine XYZ will be shipping with EFI. But even short of that, the fact that we already have the partition support there may be sufficient. So, I'd say: go for it.

	--david
#2 lore raw
In reply to [email protected]
Quoted 4 lines

Matt> David, any further thoughts on moving include/asm-ia64/efi.h Matt> to linux/efi.h?

Oh, I'm obviously totally in favor of that, too.

David, please download and apply
http://domsch.com/linux/patches/ia64/linux-2.5-efihmove.cset
a BK patch against Linus' current BK tree, which also applies cleanly against your 2.5.30 test patch posted two days ago. This moves all instances of #include <asm{"",-ia64}/efi.h> to <linux/efi.h>.

[email protected], 2002-08-13 22:24:31-05:00, [email protected]
Move include/asm-ia64/efi.h to include/linux/efi.h
This is required now that non-ia64 architectures are using EFI code, particularly the EFI GUID Partition Table (GPT) scheme for large disks.

 b/arch/ia64/hp/common/sba_iommu.c |    2 
 b/arch/ia64/hp/zx1/hpzx1_misc.c   |    2 
 b/arch/ia64/kernel/acpi.c         |    2 
 b/arch/ia64/kernel/efi.c          |    2 
 b/arch/ia64/kernel/efivars.c      |    2 
 b/arch/ia64/kernel/fw-emu.c       |    2 
 b/arch/ia64/kernel/palinfo.c      |    2 
 b/arch/ia64/kernel/process.c      |    2 
 b/arch/ia64/kernel/setup.c        |    2 
 b/arch/ia64/kernel/smp.c          |    2 
 b/arch/ia64/kernel/smpboot.c      |    2 
 b/arch/ia64/kernel/time.c         |    2 
 b/arch/ia64/mm/init.c             |    2 
 b/arch/ia64/sn/fakeprom/fpmem.c   |    2 
 b/arch/ia64/sn/fakeprom/fw-emu.c  |    2 
 b/arch/ia64/sn/io/efi-rtc.c       |    2 
 b/arch/ia64/sn/kernel/llsc4.c     |    2 
 b/drivers/acpi/osl.c              |    2 
 b/drivers/char/efirtc.c           |    2 
 b/fs/partitions/efi.h             |    6 
 b/include/asm-ia64/sal.h          |    2 
 b/include/linux/efi.h             |  284
++++++++++++++++++++++++++++++++++++++
 include/asm-ia64/efi.h            |  284
--------------------------------------
 23 files changed, 305 insertions, 309 deletions

I was able to make a default ia64 config compile (after removing the video stuff from .config), and the patch is very straightforward. Please apply, and forward to Linus as part of your 2.5.x merge. I'll post a similar patch against 2.4.x current BK tree soon as I have a moment to make it.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#1 US Linux Server provider for 2001 and Q1/2002! (IDC May 2002)

#3 lore raw
In reply to [email protected]
Quoted 5 lines

David, please download and apply
http://domsch.com/linux/patches/ia64/linux-2.5-efihmove.cset
a BK patch against Linus' current BK tree, which also applies cleanly against your 2.5.30 test patch posted two days ago. This moves all instances of #include <asm{"",-ia64}/efi.h> to <linux/efi.h>.

And, please apply
http://domsch.com/linux/patches/ia64/linux-2.5-efihmove2.cset
which changes the #ifdef _ASM_IA64_EFI_H to _LINUX_EFI_H test.

 efi.h |    6 +++---
 1 files changed, 3 insertions, 3 deletions
include/linux/efi.h +3 -3
diff -Nru a/include/linux/efi.h b/include/linux/efi.h
@@ -1,5 +1,5 @@
-#ifndef _ASM_IA64_EFI_H
-#define _ASM_IA64_EFI_H
+#ifndef _LINUX_EFI_H
+#define _LINUX_EFI_H
 
 /*
  * Extensible Firmware Interface
@@ -281,4 +281,4 @@
 extern struct proc_dir_entry *efi_dir;
 #endif
 
-#endif /* _ASM_IA64_EFI_H */
+#endif /* _LINUX_EFI_H */

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#1 US Linux Server provider for 2001 and Q1/2002! (IDC May 2002)

#4 lore raw
In reply to [email protected]
Quoted 2 lines

I'll post a similar patch against 2.4.x current BK tree soon as I have a moment to make it.

David and Bjorn, three patches against Marcelo's current 2.4.x BK tree:

1)
http://domsch.com/linux/patches/gpt/linux-2.4-gpt-efiguidt.cset
has been in the IA64 port for a while. This fixes the endianness issues with the efi_guid_t type and adds the NULL_GUID definition needed to compile the GPT code.

2)
http://domsch.com/linux/patches/ia64/linux-2.4-efihmove.cset
moves include/asm-ia64/efi.h to include/linux/efi.h similar to the 2.5 patches. This is needed to allow the GPT code to compile on non-IA64 platforms too, necessary for the use of really big disks.

3)
http://domsch.com/linux/patches/gpt/linux-2.4-gpt-efiguidt-unparse.cset
has been the IA64 port for a while. This fixes efi_guid_unparse for endianness.

These need to be applied in the above order, as #1 touches efi.h, #2 touches and moves efi.h, and #3 touches it then too. You've got #1 and #3 already in your tree, but Marcelo and Alan don't have any of these three. I've compiled this on x86 against BK-current building in GPT with no troubles.

Because ia64 isn't sync'd with Marcelo ATM, on ia64 against 2.4.18-ia64-020722 then applying #2, one fixup to arch/ia64/kernel/acpi.c needed, and by moving asm-ia64/efi.h to linux/efi.h, it works great. Because acpi.c and efi.h changed in your patch since you've sync'd with Marcelo, patch 2 above has these problems - easily fixed. Patch attached applies against 2.4.18-ia64-020722 accomplishes same as #2 patch above.

Please apply the attached patch to your local tree, and forward the three BK patches above to Alan and Marcelo for inclusion in 2.4.x mainline. Any other syncs I leave up to you. :-)

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#1 US Linux Server provider for 2001 and Q1/2002! (IDC May 2002)

arch/ia64/kernel/efi.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/efi.c linux-2.4.18-efihmove/arch/ia64/kernel/efi.c
@@ -24,8 +24,8 @@
 #include <linux/types.h>
 #include <linux/time.h>
 #include <linux/proc_fs.h>
+#include <linux/efi.h>
 
-#include <asm/efi.h>
 #include <asm/io.h>
 #include <asm/kregs.h>
 #include <asm/pgtable.h>
arch/ia64/kernel/efivars.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/efivars.c linux-2.4.18-efihmove/arch/ia64/kernel/efivars.c
@@ -65,8 +65,8 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/smp.h>
+#include <linux/efi.h>
 
-#include <asm/efi.h>
 #include <asm/uaccess.h>
 
 MODULE_AUTHOR("Matt Domsch <[email protected]>");
arch/ia64/kernel/fw-emu.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/fw-emu.c linux-2.4.18-efihmove/arch/ia64/kernel/fw-emu.c
@@ -13,7 +13,7 @@
 # include <linux/pci.h>
 #endif
 
-#include <asm/efi.h>
+#include <linux/efi.h>
 #include <asm/io.h>
 #include <asm/pal.h>
 #include <asm/sal.h>
arch/ia64/kernel/palinfo.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/palinfo.c linux-2.4.18-efihmove/arch/ia64/kernel/palinfo.c
@@ -21,10 +21,10 @@
 #include <linux/proc_fs.h>
 #include <linux/mm.h>
 #include <linux/module.h>
+#include <linux/efi.h>
 
 #include <asm/pal.h>
 #include <asm/sal.h>
-#include <asm/efi.h>
 #include <asm/page.h>
 #include <asm/processor.h>
 #ifdef CONFIG_SMP
arch/ia64/kernel/process.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/process.c linux-2.4.18-efihmove/arch/ia64/kernel/process.c
@@ -18,9 +18,9 @@
 #include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/unistd.h>
+#include <linux/efi.h>
 
 #include <asm/delay.h>
-#include <asm/efi.h>
 #include <asm/perfmon.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
arch/ia64/kernel/setup.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/setup.c linux-2.4.18-efihmove/arch/ia64/kernel/setup.c
@@ -29,6 +29,7 @@
 #include <linux/string.h>
 #include <linux/threads.h>
 #include <linux/console.h>
+#include <linux/efi.h>
 
 #include <asm/ia32.h>
 #include <asm/page.h>
@@ -36,7 +37,6 @@
 #include <asm/processor.h>
 #include <asm/sal.h>
 #include <asm/system.h>
-#include <asm/efi.h>
 #include <asm/mca.h>
 #include <asm/smp.h>
 
arch/ia64/kernel/smp.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/smp.c linux-2.4.18-efihmove/arch/ia64/kernel/smp.c
@@ -31,12 +31,12 @@
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include <linux/cache.h>
+#include <linux/efi.h>
 
 #include <asm/atomic.h>
 #include <asm/bitops.h>
 #include <asm/current.h>
 #include <asm/delay.h>
-#include <asm/efi.h>
 #include <asm/machvec.h>
 
 #include <asm/io.h>
arch/ia64/kernel/smpboot.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/smpboot.c linux-2.4.18-efihmove/arch/ia64/kernel/smpboot.c
@@ -23,13 +23,13 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/spinlock.h>
+#include <linux/efi.h>
 
 #include <asm/atomic.h>
 #include <asm/bitops.h>
 #include <asm/cache.h>
 #include <asm/current.h>
 #include <asm/delay.h>
-#include <asm/efi.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/machvec.h>
arch/ia64/kernel/time.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/kernel/time.c linux-2.4.18-efihmove/arch/ia64/kernel/time.c
@@ -15,9 +15,9 @@
 #include <linux/sched.h>
 #include <linux/time.h>
 #include <linux/interrupt.h>
+#include <linux/efi.h>
 
 #include <asm/delay.h>
-#include <asm/efi.h>
 #include <asm/hw_irq.h>
 #include <asm/ptrace.h>
 #include <asm/sal.h>
arch/ia64/mm/init.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/mm/init.c linux-2.4.18-efihmove/arch/ia64/mm/init.c
@@ -14,10 +14,10 @@
 #include <linux/reboot.h>
 #include <linux/slab.h>
 #include <linux/swap.h>
+#include <linux/efi.h>
 
 #include <asm/bitops.h>
 #include <asm/dma.h>
-#include <asm/efi.h>
 #include <asm/ia32.h>
 #include <asm/io.h>
 #include <asm/machvec.h>
arch/ia64/sn/fakeprom/fpmem.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/sn/fakeprom/fpmem.c linux-2.4.18-efihmove/arch/ia64/sn/fakeprom/fpmem.c
@@ -18,7 +18,7 @@
  */
 
 #include <linux/config.h>
-#include <asm/efi.h>
+#include <linux/efi.h>
 #include "fpmem.h"
 
 /*
arch/ia64/sn/fakeprom/fw-emu.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/sn/fakeprom/fw-emu.c linux-2.4.18-efihmove/arch/ia64/sn/fakeprom/fw-emu.c
@@ -36,7 +36,7 @@
  * http://oss.sgi.com/projects/GenInfo/NoticeExplan
  */
 #include <linux/config.h>
-#include <asm/efi.h>
+#include <linux/efi.h>
 #include <asm/pal.h>
 #include <asm/sal.h>
 #include <asm/sn/sn_sal.h>
arch/ia64/sn/io/efi-rtc.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/sn/io/efi-rtc.c linux-2.4.18-efihmove/arch/ia64/sn/io/efi-rtc.c
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/errno.h>
-#include <asm/efi.h>
+#include <linux/efi.h>
 #include <asm/sn/klclock.h>
 
 /*
arch/ia64/sn/kernel/llsc4.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/arch/ia64/sn/kernel/llsc4.c linux-2.4.18-efihmove/arch/ia64/sn/kernel/llsc4.c
@@ -17,7 +17,7 @@
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include <linux/string.h>
-#include <asm/efi.h>
+#include <linux/efi.h>
 #include <asm/page.h>
 #include <linux/threads.h>
 #include <asm/sn/simulator.h>
drivers/acpi/osl.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/drivers/acpi/osl.c linux-2.4.18-efihmove/drivers/acpi/osl.c
@@ -37,7 +37,7 @@
 #include "acpi.h"
 
 #ifdef CONFIG_ACPI_EFI
-#include <asm/efi.h>
+#include <linux/efi.h>
 u64 efi_mem_attributes (u64 phys_addr);
 #endif
 
drivers/char/efirtc.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/drivers/char/efirtc.c linux-2.4.18-efihmove/drivers/char/efirtc.c
@@ -35,8 +35,8 @@
 #include <linux/init.h>
 #include <linux/rtc.h>
 #include <linux/proc_fs.h>
+#include <linux/efi.h>
 
-#include <asm/efi.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
drivers/char/hcdp_serial.c +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/drivers/char/hcdp_serial.c linux-2.4.18-efihmove/drivers/char/hcdp_serial.c
@@ -15,9 +15,9 @@
 #include <linux/init.h>
 #include <linux/serial.h>
 #include <linux/serialP.h>
+#include <linux/efi.h>
 #include <asm/serial.h>
 #include <asm/io.h>
-#include <asm/efi.h>
 #include <linux/hcdp_serial.h>
 
 #undef SERIAL_DEBUG_HCDP
fs/partitions/efi.h +1 -5
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/fs/partitions/efi.h linux-2.4.18-efihmove/fs/partitions/efi.h
@@ -33,11 +33,7 @@
 #include <linux/major.h>
 #include <linux/string.h>
 #include <linux/blk.h>
-/*
- * Yes, specifying asm-ia64 is ugly, but this lets it build on
- * other platforms too, until efi.h moves to include/linux.
- */
-#include <asm-ia64/efi.h>
+#include <linux/efi.h>
 
 #define MSDOS_MBR_SIGNATURE 0xaa55
 #define EFI_PMBR_OSTYPE_EFI 0xEF
include/asm-ia64/efi.h +0 -284

284 lines not on this page · raw message

include/asm-ia64/sal.h +1 -1
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.4.18-ia64/include/asm-ia64/sal.h linux-2.4.18-efihmove/include/asm-ia64/sal.h
@@ -24,9 +24,9 @@
  */
 
 #include <linux/spinlock.h>
+#include <linux/efi.h>
 
 #include <asm/pal.h>
-#include <asm/efi.h>
 #include <asm/system.h>
 #include <asm/fpu.h>
 
include/linux/efi.h +284 -0

284 lines not on this page · raw message