M68k 2.3.99-pre3-6 compile fixes

From: David Woodhouse (dwmw2@infradead.org)
Date: Thu Mar 23 2000 - 12:40:24 EST


This (along with an evil #define ADBREQ_RAW 0) makes 2.3.99-pre3-6 compile for
me. Someone who actually knows a little about m68k asm probably ought to check
what I've done for flush_icache_page.

Now to see if it boots....

Index: arch/m68k/kernel/ints.c
===================================================================
RCS file: /cvs/linux/arch/m68k/kernel/ints.c,v
retrieving revision 1.2.2.2
diff -u -w -r1.2.2.2 ints.c
--- arch/m68k/kernel/ints.c 1999/10/07 14:51:23 1.2.2.2
+++ arch/m68k/kernel/ints.c 2000/03/23 17:35:16
@@ -206,6 +206,10 @@
         return 0;
 }
 
+void init_irq_proc(void)
+{
+}
+
 static void dummy_enable_irq(unsigned int irq)
 {
         printk("calling uninitialized enable_irq()\n");
Index: arch/m68k/kernel/signal.c
===================================================================
RCS file: /cvs/linux/arch/m68k/kernel/signal.c,v
retrieving revision 1.1.1.5.2.5
diff -u -w -r1.1.1.5.2.5 signal.c
--- arch/m68k/kernel/signal.c 2000/02/05 14:26:08 1.1.1.5.2.5
+++ arch/m68k/kernel/signal.c 2000/03/23 17:35:16
@@ -1049,7 +1049,6 @@
                                 info.si_code = SI_USER;
                                 info.si_pid = current->p_pptr->pid;
                                 info.si_uid = current->p_pptr->uid;
- info.si_uid16 = high2lowuid(current->p_pptr->uid);
                         }
 
                         /* If the (new) signal is now blocked, requeue it. */
Index: drivers/char/mem.c
===================================================================
RCS file: /cvs/linux/drivers/char/mem.c,v
retrieving revision 1.4.2.19
diff -u -w -r1.4.2.19 mem.c
--- drivers/char/mem.c 2000/03/21 17:19:19 1.4.2.19
+++ drivers/char/mem.c 2000/03/23 17:35:17
@@ -583,7 +583,9 @@
         {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
         {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
         {3, "null", S_IRUGO | S_IWUGO, &null_fops},
+#if !defined(__mc68000__)
         {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
+#endif
         {5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
         {7, "full", S_IRUGO | S_IWUGO, &full_fops},
         {8, "random", S_IRUGO | S_IWUSR, &random_fops},
Index: drivers/nubus/nubus.c
===================================================================
RCS file: /cvs/linux/drivers/nubus/nubus.c,v
retrieving revision 1.1.1.3.2.3
diff -u -w -r1.1.1.3.2.3 nubus.c
--- drivers/nubus/nubus.c 1999/11/09 09:12:11 1.1.1.3.2.3
+++ drivers/nubus/nubus.c 2000/03/23 17:35:17
@@ -966,6 +966,7 @@
 static int nubus_read_proc(char *buf, char **start, off_t off,
                                 int count, int *eof, void *data)
 {
+ struct nubus_board *board;
         int nprinted, len, begin = 0;
         int slot;
 
@@ -973,7 +974,7 @@
         /* Walk the list of NuBus boards */
         for (board = nubus_boards; board != NULL; board = board->next)
         {
- nprinted = sprint_nubus_board(board, buf + len, size - len);
+ nprinted = sprint_nubus_board(board, buf + len, count - len);
                 if (nprinted < 0)
                         break;
                 len += nprinted;
@@ -987,7 +988,7 @@
         if (slot==16 || len+begin < off)
                 *eof = 1;
         off -= begin;
- *strat = buf + off;
+ *start = buf + off;
         len -= off;
         if (len>count)
                 len = count;
Index: drivers/sound/os.h
===================================================================
RCS file: /cvs/linux/drivers/sound/os.h,v
retrieving revision 1.1.1.3
diff -u -w -r1.1.1.3 os.h
--- drivers/sound/os.h 1998/11/16 09:20:10 1.1.1.3
+++ drivers/sound/os.h 2000/03/23 17:35:18
@@ -32,7 +32,9 @@
 #include <linux/vmalloc.h>
 #include <asm/uaccess.h>
 #include <linux/poll.h>
+#ifdef CONFIG_PCI
 #include <linux/pci.h>
+#endif
 #endif
 
 #include <linux/wrapper.h>
Index: include/asm-m68k/keyboard.h
===================================================================
RCS file: /cvs/linux/include/asm-m68k/keyboard.h,v
retrieving revision 1.3
diff -u -w -r1.3 keyboard.h
--- include/asm-m68k/keyboard.h 1999/05/12 16:48:52 1.3
+++ include/asm-m68k/keyboard.h 2000/03/23 17:35:19
@@ -19,7 +19,9 @@
 #ifdef CONFIG_Q40
 #include <asm/q40_keyboard.h>
 #endif
-
+#ifdef CONFIG_MAC
+#define SYSRQ_KEY 0x7f
+#endif
 static __inline__ int kbd_setkeycode(unsigned int scancode,
                                      unsigned int keycode)
 {
Index: include/asm-m68k/mman.h
===================================================================
RCS file: /cvs/linux/include/asm-m68k/mman.h,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 mman.h
--- include/asm-m68k/mman.h 1998/10/28 21:23:49 1.1.1.1
+++ include/asm-m68k/mman.h 2000/03/23 17:35:19
@@ -25,6 +25,13 @@
 #define MCL_CURRENT 1 /* lock all current mappings */
 #define MCL_FUTURE 2 /* lock all future mappings */
 
+#define MADV_NORMAL 0x0 /* default page-in behavior */
+#define MADV_RANDOM 0x1 /* page-in minimum required */
+#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
+#define MADV_WILLNEED 0x3 /* pre-fault pages */
+#define MADV_DONTNEED 0x4 /* discard these pages */
+
+
 /* compatibility flags */
 #define MAP_ANON MAP_ANONYMOUS
 #define MAP_FILE 0
Index: include/asm-m68k/pgalloc.h
===================================================================
RCS file: /cvs/linux/include/asm-m68k/Attic/pgalloc.h,v
retrieving revision 1.1.2.2
diff -u -w -r1.1.2.2 pgalloc.h
--- include/asm-m68k/pgalloc.h 2000/02/14 20:34:37 1.1.2.2
+++ include/asm-m68k/pgalloc.h 2000/03/23 17:35:19
@@ -297,6 +297,26 @@
         }
 }
 
+extern inline void __flush_icache_page(unsigned long page_va)
+{
+ if (CPU_IS_040_OR_060) {
+ __asm__ __volatile__("nop\n\t"
+ ".chip 68040\n\t"
+ "cpushp %%dc,(%0)\n\t"
+ "cinvp %%ic,(%0)\n\t"
+ ".chip 68k"
+ : : "a" (virt_to_phys((void *)page_va)));
+ } else {
+ unsigned long tmp;
+ __asm__ __volatile__("movec %%cacr,%0\n\t"
+ "orw %1,%0\n\t"
+ "movec %0,%%cacr"
+ : "=&d" (tmp)
+ : "di" (FLUSH_I));
+ }
+}
+#define flush_icache_page(vm,pg) __flush_icache_page(page_address(pg))
+
 /* Push n pages at kernel virtual address and clear the icache */
 extern inline void flush_icache_range (unsigned long address,
                                        unsigned long endaddr)
Index: kernel/ksyms.c
===================================================================
RCS file: /cvs/linux/kernel/ksyms.c,v
retrieving revision 1.3.2.32
diff -u -w -r1.3.2.32 ksyms.c
--- kernel/ksyms.c 2000/03/22 12:16:24 1.3.2.32
+++ kernel/ksyms.c 2000/03/23 17:35:20
@@ -496,8 +496,12 @@
 EXPORT_SYMBOL(get_fast_time);
 
 /* library functions */
+#ifndef __HAVE_ARCH_STRNICMP
 EXPORT_SYMBOL(strnicmp);
+#endif
+#ifndef __HAVE_ARCH_STRSPN
 EXPORT_SYMBOL(strspn);
+#endif
 
 /* software interrupts */
 EXPORT_SYMBOL(tasklet_hi_vec);

--
dwmw2

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:38 EST