Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* 2.3.18 patch to get alphas to boot
@ 1999-09-15  0:43 jamesm
  0 siblings, 0 replies; only message in thread
From: jamesm @ 1999-09-15  0:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: axp-list

The following patch against 2.3.18 allows the kernel to compile on
alphas (I have only tested it on my ruffian).  It boots fine, but the
sym53C8xx driver fails to initialize correctly on my machine.  This is
my first patch, so be gentle.  I am not aware of a patch that fixes
these problems, but I apologize if one already exists.

-James McCollough

diff -u --recursive linux/drivers/char/pc_keyb.c linux-2.3.18ac2/drivers/char/pc_keyb.c
--- linux/drivers/char/pc_keyb.c        Tue Sep 14 17:53:42 1999
+++ linux-2.3.18ac2/drivers/char/pc_keyb.c      Tue Sep 14 17:51:24 1999
@@ -37,6 +37,8 @@
 #include <asm/irq.h>
 #include <asm/system.h>
 
+#include <asm/io.h>
+
 /* Some configuration switches are present in the include file... */
 
 #include <linux/pc_keyb.h>
diff -u --recursive linux/include/asm-alpha/keyboard.h linux-2.3.18ac2/include/asm-alpha/keyboard.h
--- linux/include/asm-alpha/keyboard.h  Mon Apr 26 12:54:25 1999
+++ linux-2.3.18ac2/include/asm-alpha/keyboard.h        Tue Sep 14 17:49:17 1999
@@ -37,6 +37,31 @@
 
 #define SYSRQ_KEY 0x54
 
+/* resource allocation */
+#define kbd_request_region()
+#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
+                                             "keyboard", NULL)
+
+/* How to access the keyboard macros on this platform.  */
+#define kbd_read_input() inb(KBD_DATA_REG)
+#define kbd_read_status() inb(KBD_STATUS_REG)
+#define kbd_write_output(val) outb(val, KBD_DATA_REG)
+#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
+
+/* Some stoneage hardware needs delays after some operations.  */
+#define kbd_pause() do { } while(0)
+
+/*
+ * Machine specific bits for the PS/2 driver
+ */
+
+#define AUX_IRQ 12
+
+#define aux_request_irq(hand, dev_id)                                  \
+       request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
+
+#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
+
 #endif /* __KERNEL__ */
 
 #endif /* __ASMalpha_KEYBOARD_H */
diff -u --recursive linux/include/asm-alpha/pgtable.h linux-2.3.18ac2/include/asm-alpha/pgtable.h
--- linux/include/asm-alpha/pgtable.h   Wed Sep  8 13:54:14 1999
+++ linux-2.3.18ac2/include/asm-alpha/pgtable.h Tue Sep 14 17:49:46 1999
@@ -622,6 +622,6 @@
 #define kern_addr_valid(addr)  (1)
 
 #define io_remap_page_range(start, busaddr, size, prot) \
-       remap_page_range(start, virt_to_phys(ioremap(busaddr)), size, prot)
+       remap_page_range(start, virt_to_phys(__ioremap(busaddr)), size, prot)
 
 #endif /* _ALPHA_PGTABLE_H */
diff -u --recursive linux/include/asm-alpha/processor.h linux-2.3.18ac2/include/asm-alpha/processor.h
--- linux/include/asm-alpha/processor.h Wed Aug  4 17:48:00 1999
+++ linux-2.3.18ac2/include/asm-alpha/processor.h       Tue Sep 14 17:50:03 1999
@@ -114,6 +114,8 @@
 /* Do necessary setup to start up a newly executed thread.  */
 extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
 
+struct task_struct;
+
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);

diff -u --recursive linux/include/asm-alpha/socket.h linux-2.3.18ac2/include/asm-alpha/socket.h
--- linux/include/asm-alpha/socket.h    Sun Dec 21 19:41:24 1997
+++ linux-2.3.18ac2/include/asm-alpha/socket.h  Tue Sep 14 17:50:28 1999
@@ -48,4 +48,18 @@
 #define SO_SECURITY_ENCRYPTION_TRANSPORT       20
 #define SO_SECURITY_ENCRYPTION_NETWORK         21
 
+#ifdef __KERNEL__
+/* Socket types. */
+#define SOCK_STREAM    1               /* stream (connection) socket   */
+#define SOCK_DGRAM     2               /* datagram (conn.less) socket  */
+#define SOCK_RAW       3               /* raw socket                   */
+#define SOCK_RDM       4               /* reliably-delivered message   */
+#define SOCK_SEQPACKET 5               /* sequential packet socket     */
+#define SOCK_PACKET    10              /* linux specific way of        */
+                                       /* getting packets at the dev   */
+                                       /* level.  For writing rarp and */
+                                       /* other similar things on the  */
+                                       /* user level.                  */
+#endif                                 
+
 #endif /* _ASM_SOCKET_H */
diff -u --recursive linux/net/core/datagram.c linux-2.3.18ac2/net/core/datagram.c
--- linux/net/core/datagram.c   Fri Sep  3 16:17:43 1999
+++ linux-2.3.18ac2/net/core/datagram.c Tue Sep 14 18:06:49 1999
@@ -27,6 +27,7 @@
 #include <linux/kernel.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
+#include <asm/socket.h>
 #include <linux/mm.h>
 #include <linux/interrupt.h>
 #include <linux/in.h>



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-09-15  0:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-15  0:43 2.3.18 patch to get alphas to boot jamesm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox