]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/machvec.c
Merge branch 'tracing/ftrace' into tracing/urgent
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / machvec.c
index 23c5948f0124675862511d4e7fcb995399ce2a86..c1ea41e5812a5897a5abfc8e8bb94fba925e414d 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/string.h>
 #include <asm/machvec.h>
 #include <asm/sections.h>
+#include <asm/setup.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 
@@ -90,6 +91,13 @@ void __init sh_mv_setup(void)
                machvec_size = ((unsigned long)&__machvec_end -
                                (unsigned long)&__machvec_start);
 
+               /*
+                * Sanity check for machvec section alignment. Ensure
+                * __initmv hasn't been misused.
+                */
+               if (machvec_size % sizeof(struct sh_machine_vector))
+                       panic("machvec misaligned, invalid __initmv use?");
+
                /*
                 * If the machvec hasn't been preselected, use the first
                 * vector (usually the only one) from .machvec.init.
@@ -118,9 +126,6 @@ void __init sh_mv_setup(void)
        mv_set(insb);   mv_set(insw);   mv_set(insl);
        mv_set(outsb);  mv_set(outsw);  mv_set(outsl);
 
-       mv_set(readb);  mv_set(readw);  mv_set(readl);
-       mv_set(writeb); mv_set(writew); mv_set(writel);
-
        mv_set(ioport_map);
        mv_set(ioport_unmap);
        mv_set(irq_demux);