Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Make all ports use a common disklabel.h with MAXPAR...
details: https://anonhg.NetBSD.org/src/rev/b48eb490d2e9
branches: trunk
changeset: 786691:b48eb490d2e9
user: matt <matt%NetBSD.org@localhost>
date: Tue May 07 20:42:45 2013 +0000
description:
Make all ports use a common disklabel.h with MAXPARTITIONS set to 16.
Only RAW_PART varies between ports.
diffstat:
sys/arch/acorn26/include/disklabel.h | 4 +--
sys/arch/acorn26/include/types.h | 3 +-
sys/arch/acorn32/include/disklabel.h | 4 +--
sys/arch/arm/include/arm32/types.h | 3 +-
sys/arch/arm/include/disklabel.h | 28 +++++++++++++++++----
sys/arch/cats/include/disklabel.h | 3 +-
sys/arch/epoc32/include/disklabel.h | 38 ++---------------------------
sys/arch/epoc32/include/types.h | 9 +------
sys/arch/evbarm/include/disklabel.h | 3 +-
sys/arch/hpcarm/include/disklabel.h | 44 ++++-----------------------------
sys/arch/hpcarm/include/types.h | 3 +-
sys/arch/iyonix/include/disklabel.h | 3 +-
sys/arch/netwinder/include/disklabel.h | 3 +-
sys/arch/shark/include/disklabel.h | 3 +-
sys/arch/zaurus/include/disklabel.h | 31 ++++-------------------
15 files changed, 50 insertions(+), 132 deletions(-)
diffs (truncated from 351 to 300 lines):
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/acorn26/include/disklabel.h
--- a/sys/arch/acorn26/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/acorn26/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,6 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.4 2011/08/30 12:39:52 bouyer Exp $ */
-
-#define LABELUSESMBR 1
+/* $NetBSD: disklabel.h,v 1.5 2013/05/07 20:42:45 matt Exp $ */
#if HAVE_NBTOOL_CONFIG_H
#include <nbinclude/arm/disklabel.h>
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/acorn26/include/types.h
--- a/sys/arch/acorn26/include/types.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/acorn26/include/types.h Tue May 07 20:42:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.12 2011/06/12 03:35:36 rmind Exp $ */
+/* $NetBSD: types.h,v 1.13 2013/05/07 20:42:45 matt Exp $ */
#ifndef _ACORN26_TYPES_H_
#define _ACORN26_TYPES_H_
@@ -8,5 +8,6 @@
#define __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS
#define __HAVE_MM_MD_DIRECT_MAPPED_PHYS
#define __HAVE_MM_MD_KERNACC
+#define __HAVE_OLD_DISKLABEL
#endif /* _ACORN26_TYPES_H_ */
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/acorn32/include/disklabel.h
--- a/sys/arch/acorn32/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/acorn32/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,6 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.4 2011/08/30 12:39:52 bouyer Exp $ */
-
-#define LABELUSESMBR 1
+/* $NetBSD: disklabel.h,v 1.5 2013/05/07 20:42:45 matt Exp $ */
#if HAVE_NBTOOL_CONFIG_H
#include <nbinclude/arm/disklabel.h>
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/arm/include/arm32/types.h
--- a/sys/arch/arm/include/arm32/types.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/arm/include/arm32/types.h Tue May 07 20:42:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.9 2010/07/07 01:20:50 chs Exp $ */
+/* $NetBSD: types.h,v 1.10 2013/05/07 20:42:47 matt Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -49,5 +49,6 @@
#include <arm/types.h> /* pull in generic ARM definitions */
#define __HAVE_CPU_LWP_SETPRIVATE
+#define __HAVE_OLD_DISKLABEL
#endif /* _ARM_ARM32_TYPES_H_ */
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/arm/include/disklabel.h
--- a/sys/arch/arm/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/arm/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.10 2011/08/30 12:39:53 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.11 2013/05/07 20:42:45 matt Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@@ -47,12 +47,28 @@
#define _ARM_DISKLABEL_H_
#ifndef LABELUSESMBR
-#define LABELUSESMBR 0 /* no MBR partitionning */
+#define LABELUSESMBR 1 /* no MBR partitionning */
+#endif
+#define LABELSECTOR 1 /* sector containing label */
+#define LABELOFFSET 0 /* offset of label in sector */
+#define MAXPARTITIONS 16 /* number of partitions */
+#define OLDMAXPARTITIONS 8 /* old number of partitions */
+#ifndef RAW_PART
+#define RAW_PART 2 /* raw partition: XX?c */
#endif
-#define LABELSECTOR 1 /* sector containing label */
-#define LABELOFFSET 0 /* offset of label in sector */
-#define MAXPARTITIONS 8 /* number of partitions */
-#define RAW_PART 2 /* raw partition: XX?c */
+
+/*
+ * We use the highest bit of the minor number for the partition number.
+ * This maintains backward compatibility with device nodes created before
+ * MAXPARTITIONS was increased.
+ */
+#define __ARM_MAXDISKS ((1 << 20) / MAXPARTITIONS)
+#define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __ARM_MAXDISKS)
+#define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \
+ ((minor(dev) / (__ARM_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))
+#define DISKMINOR(unit, part) \
+ (((unit) * OLDMAXPARTITIONS) + ((part) % OLDMAXPARTITIONS) + \
+ ((part) / OLDMAXPARTITIONS) * (__ARM_MAXDISKS * OLDMAXPARTITIONS))
#if HAVE_NBTOOL_CONFIG_H
#include <nbinclude/sys/dkbad.h>
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/cats/include/disklabel.h
--- a/sys/arch/cats/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/cats/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,6 +1,5 @@
-/* $NetBSD: disklabel.h,v 1.6 2011/08/30 12:39:53 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.7 2013/05/07 20:42:45 matt Exp $ */
-#define LABELUSESMBR 1
#if HAVE_NBTOOL_CONFIG_H
#include <nbinclude/arm/disklabel.h>
#else
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/epoc32/include/disklabel.h
--- a/sys/arch/epoc32/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/epoc32/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.2 2013/05/02 03:56:40 matt Exp $ */
+/* $NetBSD: disklabel.h,v 1.3 2013/05/07 20:42:46 matt Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -33,44 +33,12 @@
#ifndef _EPOC32_DISKLABEL_H_
#define _EPOC32_DISKLABEL_H_
-#define LABELUSESMBR 1 /* use MBR partitionning */
-#define LABELSECTOR 1 /* sector containing label */
-#define LABELOFFSET 0 /* offset of label in sector */
-#define MAXPARTITIONS 16 /* number of partitions */
-#define OLDMAXPARTITIONS 8 /* number of partitions before 1.6 */
#define RAW_PART 3 /* raw partition: XX?d (XXX) */
-/*
- * We use the highest bit of the minor number for the partition number.
- * This maintains backward compatibility with device nodes created before
- * MAXPARTITIONS was increased.
- */
-#define __EPOC32_MAXDISKS ((1 << 20) / MAXPARTITIONS)
-#define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __EPOC32_MAXDISKS)
-#define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \
- ((minor(dev) / (__EPOC32_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))
-#define DISKMINOR(unit, part) \
- (((unit) * OLDMAXPARTITIONS) + ((part) % OLDMAXPARTITIONS) + \
- ((part) / OLDMAXPARTITIONS) * (__EPOC32_MAXDISKS * OLDMAXPARTITIONS))
-
-/* Pull in MBR partition definitions. */
#if HAVE_NBTOOL_CONFIG_H
-#include <nbinclude/sys/bootblock.h>
+#include <nbinclude/arm/disklabel.h>
#else
-#include <sys/bootblock.h>
+#include <arm/disklabel.h>
#endif /* HAVE_NBTOOL_CONFIG_H */
-#ifndef __ASSEMBLER__
-#if HAVE_NBTOOL_CONFIG_H
-#include <nbinclude/sys/dkbad.h>
-#else
-#include <sys/dkbad.h>
-#endif /* HAVE_NBTOOL_CONFIG_H */
-struct cpu_disklabel {
- struct mbr_partition dosparts[MBR_PART_COUNT];
-#define __HAVE_DISKLABEL_DKBAD
- struct dkbad bad;
-};
-#endif
-
#endif /* _EPOC32_DISKLABEL_H_ */
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/epoc32/include/types.h
--- a/sys/arch/epoc32/include/types.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/epoc32/include/types.h Tue May 07 20:42:45 2013 +0000
@@ -1,10 +1,3 @@
-/* $NetBSD: types.h,v 1.2 2013/05/02 03:56:40 matt Exp $ */
-
-#ifndef _EPOC32_TYPES_H_
-#define _EPOC32_TYPES_H_
+/* $NetBSD: types.h,v 1.3 2013/05/07 20:42:46 matt Exp $ */
#include <arm/arm32/types.h>
-
-#define __HAVE_OLD_DISKLABEL
-
-#endif /* _EPOC32_TYPES_H_ */
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/evbarm/include/disklabel.h
--- a/sys/arch/evbarm/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/evbarm/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,6 +1,5 @@
-/* $NetBSD: disklabel.h,v 1.4 2011/08/30 12:39:54 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.5 2013/05/07 20:42:46 matt Exp $ */
-#define LABELUSESMBR 1
#if HAVE_NBTOOL_CONFIG_H
#include <nbinclude/arm/disklabel.h>
#else
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/hpcarm/include/disklabel.h
--- a/sys/arch/hpcarm/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/hpcarm/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.9 2011/08/30 12:39:55 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.10 2013/05/07 20:42:46 matt Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -30,47 +30,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _MACHINE_DISKLABEL_H_
-#define _MACHINE_DISKLABEL_H_
+#ifndef _HPCARM_DISKLABEL_H_
+#define _HPCARM_DISKLABEL_H_
-#define LABELUSESMBR 1 /* use MBR partitionning */
-#define LABELSECTOR 1 /* sector containing label */
-#define LABELOFFSET 0 /* offset of label in sector */
-#define MAXPARTITIONS 16 /* number of partitions */
-#define OLDMAXPARTITIONS 8 /* number of partitions before 1.6 */
#define RAW_PART 3 /* raw partition: XX?d (XXX) */
-/*
- * We use the highest bit of the minor number for the partition number.
- * This maintains backward compatibility with device nodes created before
- * MAXPARTITIONS was increased.
- */
-#define __HPCARM_MAXDISKS ((1 << 20) / MAXPARTITIONS)
-#define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __HPCARM_MAXDISKS)
-#define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \
- ((minor(dev) / (__HPCARM_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))
-#define DISKMINOR(unit, part) \
- (((unit) * OLDMAXPARTITIONS) + ((part) % OLDMAXPARTITIONS) + \
- ((part) / OLDMAXPARTITIONS) * (__HPCARM_MAXDISKS * OLDMAXPARTITIONS))
-
-/* Pull in MBR partition definitions. */
#if HAVE_NBTOOL_CONFIG_H
-#include <nbinclude/sys/bootblock.h>
+#include <nbinclude/arm/disklabel.h>
#else
-#include <sys/bootblock.h>
+#include <arm/disklabel.h>
#endif /* HAVE_NBTOOL_CONFIG_H */
-#ifndef __ASSEMBLER__
-#if HAVE_NBTOOL_CONFIG_H
-#include <nbinclude/sys/dkbad.h>
-#else
-#include <sys/dkbad.h>
-#endif /* HAVE_NBTOOL_CONFIG_H */
-struct cpu_disklabel {
- struct mbr_partition dosparts[MBR_PART_COUNT];
-#define __HAVE_DISKLABEL_DKBAD
- struct dkbad bad;
-};
-#endif
-
-#endif /* _MACHINE_DISKLABEL_H_ */
+#endif /* _HPCARM_DISKLABEL_H_ */
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/hpcarm/include/types.h
--- a/sys/arch/hpcarm/include/types.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/hpcarm/include/types.h Tue May 07 20:42:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.14 2010/07/17 15:13:18 tsutsui Exp $ */
+/* $NetBSD: types.h,v 1.15 2013/05/07 20:42:46 matt Exp $ */
#ifndef _HPCARM_TYPES_H_
#define _HPCARM_TYPES_H_
@@ -6,7 +6,6 @@
#include <arm/arm32/types.h>
#define __HAVE_DEVICE_REGISTER
-#define __HAVE_OLD_DISKLABEL
#define __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS
#endif
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/iyonix/include/disklabel.h
--- a/sys/arch/iyonix/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/iyonix/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,6 +1,5 @@
-/* $NetBSD: disklabel.h,v 1.4 2011/08/30 12:39:56 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.5 2013/05/07 20:42:46 matt Exp $ */
-#define LABELUSESMBR 1
#if HAVE_NBTOOL_CONFIG_H
#include <nbinclude/arm/disklabel.h>
#else
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/netwinder/include/disklabel.h
--- a/sys/arch/netwinder/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/netwinder/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,6 +1,5 @@
-/* $NetBSD: disklabel.h,v 1.6 2011/08/30 12:39:57 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.7 2013/05/07 20:42:46 matt Exp $ */
-#define LABELUSESMBR 1
#if HAVE_NBTOOL_CONFIG_H
#include <nbinclude/arm/disklabel.h>
#else
diff -r 71e3e30e28bc -r b48eb490d2e9 sys/arch/shark/include/disklabel.h
--- a/sys/arch/shark/include/disklabel.h Tue May 07 20:11:54 2013 +0000
+++ b/sys/arch/shark/include/disklabel.h Tue May 07 20:42:45 2013 +0000
@@ -1,6 +1,5 @@
-/* $NetBSD: disklabel.h,v 1.4 2011/08/30 12:39:58 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.5 2013/05/07 20:42:47 matt Exp $ */
-#define LABELUSESMBR 1
#if HAVE_NBTOOL_CONFIG_H
Home |
Main Index |
Thread Index |
Old Index