powerpc: Purge bootinfo.h

David Gibson david at gibson.dropbear.id.au
Mon Oct 24 11:41:33 EST 2005


Paulus, another one for the merge tree:

With ARCH=powerpc we assume the presence of a device tree, so we don't
require any support for the old bi_recs method of passing boot
parameters.  Likewise, we've never needed it for ppc64, but we still
had an include/asm-ppc64/bootinfo.h from which nothing was used.  This
patch removes that file, and all references to it in arch/ppc64 and
arch/powerpc.  A related, unused variable 'boot_mem_size' is also
removed from setup_32.c.  The bootinfo stuff remains in ARCH=ppc for
the time being.

Built and booted on Power5 (ARCH=ppc64 and ARCH=powerpc), built for
32-bit powermac (ARCH=powerpc and ARCH=ppc).

Signed-off-by: David Gibson <dwg at au1.ibm.com>

Index: working-2.6/arch/ppc64/kernel/prom.c
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/prom.c	2005-10-24 10:36:11.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/prom.c	2005-10-24 11:27:48.000000000 +1000
@@ -46,7 +46,6 @@
 #include <asm/pgtable.h>
 #include <asm/pci.h>
 #include <asm/iommu.h>
-#include <asm/bootinfo.h>
 #include <asm/ppcdebug.h>
 #include <asm/btext.h>
 #include <asm/sections.h>
Index: working-2.6/arch/ppc64/kernel/prom_init.c
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/prom_init.c	2005-10-14 16:43:39.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/prom_init.c	2005-10-24 11:27:48.000000000 +1000
@@ -44,7 +44,6 @@
 #include <asm/pgtable.h>
 #include <asm/pci.h>
 #include <asm/iommu.h>
-#include <asm/bootinfo.h>
 #include <asm/ppcdebug.h>
 #include <asm/btext.h>
 #include <asm/sections.h>
Index: working-2.6/arch/ppc64/kernel/setup.c
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/setup.c	2005-10-24 10:36:28.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/setup.c	2005-10-24 11:27:48.000000000 +1000
@@ -37,7 +37,6 @@
 #include <asm/prom.h>
 #include <asm/processor.h>
 #include <asm/pgtable.h>
-#include <asm/bootinfo.h>
 #include <asm/smp.h>
 #include <asm/elf.h>
 #include <asm/machdep.h>
Index: working-2.6/include/asm-ppc64/bootinfo.h
===================================================================
--- working-2.6.orig/include/asm-ppc64/bootinfo.h	2005-05-24 14:12:25.000000000 +1000
+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
@@ -1,70 +0,0 @@
-/*
- * Non-machine dependent bootinfo structure.  Basic idea
- * borrowed from the m68k.
- *
- * Copyright (C) 1999 Cort Dougan <cort at ppc.kernel.org>
- * Copyright (c) 2001 PPC64 Team, IBM Corp 
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-
-#ifndef _PPC64_BOOTINFO_H
-#define _PPC64_BOOTINFO_H
-
-#include <asm/types.h>
-
-/* We use a u32 for the type of the fields since they're written by
- * the bootloader which is a 32-bit process and read by the kernel
- * which is a 64-bit process.  This way they can both agree on the
- * size of the type.
- */
-typedef u32 bi_rec_field;
-
-struct bi_record {
-	bi_rec_field tag;	/* tag ID */
-	bi_rec_field size;	/* size of record (in bytes) */
-	bi_rec_field data[0];	/* data */
-};
-
-#define BI_FIRST		0x1010  /* first record - marker */
-#define BI_LAST			0x1011	/* last record - marker */
-#define BI_CMD_LINE		0x1012
-#define BI_BOOTLOADER_ID	0x1013
-#define BI_INITRD		0x1014
-#define BI_SYSMAP		0x1015
-#define BI_MACHTYPE		0x1016
-
-static __inline__ struct bi_record * bi_rec_init(unsigned long addr)
-{
-	struct bi_record *bi_recs;
-	bi_recs = (struct bi_record *)_ALIGN(addr, PAGE_SIZE);
-	bi_recs->size = 0;
-	return bi_recs;
-}
-
-static __inline__ struct bi_record * bi_rec_alloc(struct bi_record *rec,
-						  unsigned long args)
-{
-	rec = (struct bi_record *)((unsigned long)rec + rec->size);
-	rec->size = sizeof(struct bi_record) + args*sizeof(bi_rec_field);
-	return rec;
-}
-
-static __inline__ struct bi_record * bi_rec_alloc_bytes(struct bi_record *rec,
-							unsigned long bytes)
-{
-	rec = (struct bi_record *)((unsigned long)rec + rec->size);
-	rec->size = sizeof(struct bi_record) + bytes;
-	return rec;
-}
-
-static __inline__ struct bi_record * bi_rec_next(struct bi_record *rec)
-{
-	return (struct bi_record *)((unsigned long)rec + rec->size);
-}
-
-#endif /* _PPC64_BOOTINFO_H */
Index: working-2.6/arch/powerpc/mm/mem.c
===================================================================
--- working-2.6.orig/arch/powerpc/mm/mem.c	2005-10-24 10:36:28.000000000 +1000
+++ working-2.6/arch/powerpc/mm/mem.c	2005-10-24 11:27:48.000000000 +1000
@@ -43,7 +43,6 @@
 #include <asm/machdep.h>
 #include <asm/btext.h>
 #include <asm/tlb.h>
-#include <asm/bootinfo.h>
 #include <asm/prom.h>
 #include <asm/lmb.h>
 #include <asm/sections.h>
Index: working-2.6/arch/powerpc/kernel/prom_init.c
===================================================================
--- working-2.6.orig/arch/powerpc/kernel/prom_init.c	2005-10-24 10:36:28.000000000 +1000
+++ working-2.6/arch/powerpc/kernel/prom_init.c	2005-10-24 11:27:48.000000000 +1000
@@ -41,7 +41,6 @@
 #include <asm/pgtable.h>
 #include <asm/pci.h>
 #include <asm/iommu.h>
-#include <asm/bootinfo.h>
 #include <asm/btext.h>
 #include <asm/sections.h>
 #include <asm/machdep.h>
Index: working-2.6/arch/powerpc/kernel/setup_64.c
===================================================================
--- working-2.6.orig/arch/powerpc/kernel/setup_64.c	2005-10-24 10:36:09.000000000 +1000
+++ working-2.6/arch/powerpc/kernel/setup_64.c	2005-10-24 11:27:48.000000000 +1000
@@ -37,7 +37,6 @@
 #include <asm/prom.h>
 #include <asm/processor.h>
 #include <asm/pgtable.h>
-#include <asm/bootinfo.h>
 #include <asm/smp.h>
 #include <asm/elf.h>
 #include <asm/machdep.h>
Index: working-2.6/arch/powerpc/kernel/setup_32.c
===================================================================
--- working-2.6.orig/arch/powerpc/kernel/setup_32.c	2005-10-24 10:36:28.000000000 +1000
+++ working-2.6/arch/powerpc/kernel/setup_32.c	2005-10-24 11:27:48.000000000 +1000
@@ -24,7 +24,6 @@
 #include <asm/prom.h>
 #include <asm/processor.h>
 #include <asm/pgtable.h>
-#include <asm/bootinfo.h>
 #include <asm/setup.h>
 #include <asm/amigappc.h>
 #include <asm/smp.h>
@@ -62,10 +61,6 @@
 boot_infos_t *boot_infos;
 struct ide_machdep_calls ppc_ide_md;
 
-/* Used with the BI_MEMSIZE bootinfo parameter to store the memory
-   size value reported by the boot loader. */
-unsigned long boot_mem_size;
-
 unsigned long ISA_DMA_THRESHOLD;
 unsigned int DMA_MODE_READ;
 unsigned int DMA_MODE_WRITE;
Index: working-2.6/arch/powerpc/mm/init_32.c
===================================================================
--- working-2.6.orig/arch/powerpc/mm/init_32.c	2005-10-24 10:36:28.000000000 +1000
+++ working-2.6/arch/powerpc/mm/init_32.c	2005-10-24 11:27:48.000000000 +1000
@@ -43,7 +43,6 @@
 #include <asm/machdep.h>
 #include <asm/btext.h>
 #include <asm/tlb.h>
-#include <asm/bootinfo.h>
 #include <asm/prom.h>
 #include <asm/lmb.h>
 #include <asm/sections.h>


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/people/dgibson



More information about the Linuxppc64-dev mailing list