Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32543/arch/vax/boot
Modified Files:
cpu_sel.c
Log Message:
- Move the new code to the head of the file; with the ifdef in place,
this silences a number of warnings (about now unused functions).
Index: cpu_sel.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/cpu_sel.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- cpu_sel.c 29 Sep 2004 10:45:45 -0000 1.11
+++ cpu_sel.c 29 Sep 2004 10:47:57 -0000 1.12
@@ -11,6 +11,53 @@
#include <asm/vaxcpu.h> /* CPU type definitions */
+#ifdef USE_NEW_VECTORS
+extern struct machvec_match __init_vecmatch_start, __init_vecmatch_end;
+
+struct vax_mv *
+idcpu (void)
+{
+ unsigned long sid;
+ unsigned long sidex;
+ struct machvec_match *mvm;
+
+ sid = __mfpr (PR_SID);
+
+ for (mvm = &__init_vecmatch_start; mvm < &__init_vecmatch_end; mvm++) {
+ if ((sid & mvm->sid_mask) == mvm->sid_match) {
+ /*
+ * No sidex known? Accept the vector.
+ * FIXME: Maybe sort the metch structs to have
+ * those with "long" masks first, then the loose
+ * entries with weaker/shorter masks
+ */
+ if (!mvm->sidex_addr)
+ return mvm->mv;
+
+ /*
+ * If a SIDEX match was supplied, too, check it!
+ */
+ sidex = * ((unsigned long *) mvm->sidex_addr);
+ if ((sidex & mvm->sidex_mask) == mvm->sidex_match) {
+ mvm->mv->sidex = sidex;
+ return mvm->mv;
+ }
+ }
+ }
+
+ /*
+ * No matching vector found, so you're on your own to get a SID
+ * and SIDEX value and add it to one of the existing vectors (if
+ * that works for you) or create an own vector for your machine.
+ */
+ HALT;
+
+ /* Not reached */
+ return NULL;
+}
+
+#else /* USE_NEW_VECTORS */
+
static struct vax_mv *idcpu_uvax2(unsigned int sid)
{
unsigned int subtype;
@@ -226,51 +273,6 @@
#endif
}
-#ifdef USE_NEW_VECTORS
-extern struct machvec_match __init_vecmatch_start, __init_vecmatch_end;
-
-struct vax_mv *
-idcpu (void)
-{
- unsigned long sid;
- unsigned long sidex;
- struct machvec_match *mvm;
-
- sid = __mfpr (PR_SID);
-
- for (mvm = &__init_vecmatch_start; mvm < &__init_vecmatch_end; mvm++) {
- if ((sid & mvm->sid_mask) == mvm->sid_match) {
- /*
- * No sidex known? Accept the vector.
- * FIXME: Maybe sort the metch structs to have
- * those with "long" masks first, then the loose
- * entries with weaker/shorter masks
- */
- if (!mvm->sidex_addr)
- return mvm->mv;
-
- /*
- * If a SIDEX match was supplied, too, check it!
- */
- sidex = * ((unsigned long *) mvm->sidex_addr);
- if ((sidex & mvm->sidex_mask) == mvm->sidex_match) {
- mvm->mv->sidex = sidex;
- return mvm->mv;
- }
- }
- }
-
- /*
- * No matching vector found, so you're on your own to get a SID
- * and SIDEX value and add it to one of the existing vectors (if
- * that works for you) or create an own vector for your machine.
- */
- HALT;
-
- /* Not reached */
- return NULL;
-}
-#else
struct vax_mv *idcpu(void)
{
unsigned int sid;
|