Quasi newbie question: What to do about fixing kernel unaligned traps?

William Volkman (wkv@rmii.com)
Fri, 1 Dec 1995 04:38:46 -0700 (MST)


Hi,
I included the ide-cd driver in my kernel and it seems to work
fine (just required an #include <asm/segment.h>). The only
side effect is now I get kernel unaligned traps at startup
and whenver I change a cd. I've started tracking down where
these come from but before I start hacking I would like to get
your opinion on the best approach to fix these?

Another question while I've (hopefully) gotten your attention.
While debugging Milo I discovered a problem with gcc 2.7.0
doing sign extension for unsigned data and wanted to ask
if perhaps the constants should have a 'UL' tacked on to
them (I had to apply the following patch the 'asm-alpha/system.h'
to fix a problem).
Thanks,
Bill V.

8<----------8<----------8<----------8<----------8<----------8<----------8<----
--- linux/drivers/block/ide-cd.c.orig Fri Dec 1 03:24:48 1995
+++ linux/drivers/block/ide-cd.c Fri Dec 1 03:26:00 1995
@@ -99,6 +99,7 @@
#include <linux/cdrom.h>
#include <asm/irq.h>
#include <asm/io.h>
+#include <asm/segment.h>

#define _IDE_CD_C /* used in blk.h */
#include "ide.h"
--- linux/include/asm-alpha/system.h.orig Sat Nov 25 09:54:56 1995
+++ linux/include/asm-alpha/system.h Fri Dec 1 02:44:13 1995
@@ -21,12 +21,12 @@

#define KERNEL_START 0xfffffc0000300000
#define SWAPPER_PGD 0xfffffc0000300000
-#define INIT_STACK 0xfffffc0000302000
+#define INIT_STACK 0xfffffc0000302000UL
#define EMPTY_PGT 0xfffffc0000304000
#define EMPTY_PGE 0xfffffc0000308000
#define ZERO_PGE 0xfffffc000030A000

-#define START_ADDR 0xfffffc0000310000
+#define START_ADDR 0xfffffc0000310000UL
#define START_SIZE (2*1024*1024)

#ifndef __ASSEMBLY__