summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-18 04:20:23 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-18 04:20:23 +0000
commite62014c38d171383c54eb1fee183f14f592521fc (patch)
tree4b7633718336d145b6173478d26a39cb9dcfe088 /arch
parentc66599c66b70d522363bceb2dec263e76470a3c8 (diff)
Lots of cleanup from Keith with additional tweaks by me. More to
come. Stay frightened :-)
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/arc/console.c33
-rw-r--r--arch/mips/arc/misc.c2
-rw-r--r--arch/mips/config.in9
-rw-r--r--arch/mips/defconfig1
-rw-r--r--arch/mips/defconfig-decstation1
-rw-r--r--arch/mips/defconfig-ip221
-rw-r--r--arch/mips/sgi/kernel/reset.c9
-rw-r--r--arch/mips/sgi/kernel/time.c2
-rw-r--r--arch/mips64/arc/Makefile9
-rw-r--r--arch/mips64/arc/arc_con.c69
-rw-r--r--arch/mips64/arc/console.c26
-rw-r--r--arch/mips64/arc/identify.c5
-rw-r--r--arch/mips64/arc/memory.c120
-rw-r--r--arch/mips64/arc/printf.c37
-rw-r--r--arch/mips64/config.in31
-rw-r--r--arch/mips64/defconfig11
-rw-r--r--arch/mips64/defconfig-ip22142
-rw-r--r--arch/mips64/defconfig-ip2711
-rw-r--r--arch/mips64/kernel/head.S6
-rw-r--r--arch/mips64/kernel/mips64_ksyms.c2
-rw-r--r--arch/mips64/kernel/setup.c51
-rw-r--r--arch/mips64/lib/memcpy.S2
-rw-r--r--arch/mips64/mm/init.c166
-rw-r--r--arch/mips64/mm/r4xx0.c6
-rw-r--r--arch/mips64/mm/umap.c3
-rw-r--r--arch/mips64/sgi-ip22/ip22-hpc.c6
-rw-r--r--arch/mips64/sgi-ip22/ip22-int.c5
-rw-r--r--arch/mips64/sgi-ip22/ip22-mc.c5
-rw-r--r--arch/mips64/sgi-ip22/ip22-reset.c5
-rw-r--r--arch/mips64/sgi-ip22/ip22-sc.c4
-rw-r--r--arch/mips64/sgi-ip22/ip22-setup.c2
-rw-r--r--arch/mips64/sgi-ip22/ip22-timer.c7
-rw-r--r--arch/mips64/sgi-ip22/system.c24
-rw-r--r--arch/mips64/sgi-ip27/ip27-setup.c2
34 files changed, 486 insertions, 329 deletions
diff --git a/arch/mips/arc/console.c b/arch/mips/arc/console.c
index 8138dbd00..3b012c614 100644
--- a/arch/mips/arc/console.c
+++ b/arch/mips/arc/console.c
@@ -15,10 +15,6 @@
#include <linux/kdev_t.h>
#include <linux/major.h>
-#ifdef CONFIG_ARC_CONSOLE
-#define __init
-#endif
-
/*
* IP22 boardcache is not compatible with board caches. Thus we disable it
* during romvec action. Since r4xx0.c is always compiled and linked with your
@@ -29,7 +25,7 @@
* in some way. You should be careful with them.
*/
-void __init prom_putchar(char c)
+void prom_putchar(char c)
{
long cnt;
char it = c;
@@ -53,7 +49,7 @@ char __init prom_getchar(void)
static char ppbuf[1024];
-void __init prom_printf(char *fmt, ...)
+void prom_printf(char *fmt, ...)
{
va_list args;
char ch, *bptr;
@@ -72,28 +68,3 @@ void __init prom_printf(char *fmt, ...)
}
va_end(args);
}
-
-static void
-arc_console_write(struct console *con, const char *s, unsigned n)
-{
- prom_printf("%s", s);
-}
-
-static kdev_t
-arc_console_dev(struct console *c)
-{
- return MKDEV(TTY_MAJOR, 64 + c->index);
-}
-
-static struct console arc_prom_console = {
- name: "prom",
- write: arc_console_write,
- device: arc_console_dev,
- flags: CON_PRINTBUFFER,
- index: -1,
-};
-
-__init void arc_setup_console(void)
-{
- register_console(&arc_prom_console);
-}
diff --git a/arch/mips/arc/misc.c b/arch/mips/arc/misc.c
index 5a7edb774..95a4ef05d 100644
--- a/arch/mips/arc/misc.c
+++ b/arch/mips/arc/misc.c
@@ -56,7 +56,7 @@ void prom_reboot(void)
romvec->reboot();
}
-void prom_imode(void)
+void ArcEnterInteractiveMode(void)
{
bc_disable();
cli();
diff --git a/arch/mips/config.in b/arch/mips/config.in
index fae1fe91d..801b8c4c4 100644
--- a/arch/mips/config.in
+++ b/arch/mips/config.in
@@ -362,15 +362,6 @@ if [ "$CONFIG_NET" = "y" ]; then
if [ ! "$CONFIG_PPP" = "n" ]; then
comment 'CCP compressors for PPP are only built as modules.'
fi
- if [ "$CONFIG_SGI_IP22" = "y" ]; then
- bool 'SGI Seeq ethernet controller support' CONFIG_SGISEEQ
- fi
- if [ "$CONFIG_DECSTATION" = "y" ]; then
- bool 'DEC LANCE ethernet controller support' CONFIG_DECLANCE
- fi
- if [ "$CONFIG_BAGET_MIPS" = "y" ]; then
- tristate 'Baget AMD LANCE support' CONFIG_BAGETLANCE
- fi
fi
fi
endmenu
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
index ccc577cb4..f6b4c9ca1 100644
--- a/arch/mips/defconfig
+++ b/arch/mips/defconfig
@@ -234,7 +234,6 @@ CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_SLIP is not set
# CONFIG_PPP is not set
-CONFIG_SGISEEQ=y
#
# SGI Character devices
diff --git a/arch/mips/defconfig-decstation b/arch/mips/defconfig-decstation
index 48aea4156..ffe757f27 100644
--- a/arch/mips/defconfig-decstation
+++ b/arch/mips/defconfig-decstation
@@ -227,7 +227,6 @@ CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_SLIP is not set
# CONFIG_PPP is not set
-CONFIG_DECLANCE=y
#
# DECStation Character devices
diff --git a/arch/mips/defconfig-ip22 b/arch/mips/defconfig-ip22
index ccc577cb4..f6b4c9ca1 100644
--- a/arch/mips/defconfig-ip22
+++ b/arch/mips/defconfig-ip22
@@ -234,7 +234,6 @@ CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_SLIP is not set
# CONFIG_PPP is not set
-CONFIG_SGISEEQ=y
#
# SGI Character devices
diff --git a/arch/mips/sgi/kernel/reset.c b/arch/mips/sgi/kernel/reset.c
index 53cd9b1e4..c4e6ac1d1 100644
--- a/arch/mips/sgi/kernel/reset.c
+++ b/arch/mips/sgi/kernel/reset.c
@@ -1,12 +1,9 @@
-/* $Id: reset.c,v 1.7 1999/08/11 20:26:51 andrewb Exp $
- *
- * Reset a SGI.
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1997, 1998 by Ralf Baechle
+ * Copyright (C) 1997, 1998, 2001 by Ralf Baechle
*/
#include <linux/kernel.h>
#include <linux/sched.h>
@@ -54,7 +51,7 @@ static void sgi_machine_halt(void)
{
if (shuting_down)
sgi_machine_power_off();
- prom_imode();
+ ArcEnterInteractiveMode();
}
static void sgi_machine_power_off(void)
diff --git a/arch/mips/sgi/kernel/time.c b/arch/mips/sgi/kernel/time.c
index 47ee4f163..a0f4d3de8 100644
--- a/arch/mips/sgi/kernel/time.c
+++ b/arch/mips/sgi/kernel/time.c
@@ -16,6 +16,6 @@ void indy_8254timer_irq(void)
kstat.irqs[0][irq]++;
printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n");
prom_getchar();
- prom_imode();
+ ArcEnterInteractiveMode();
irq_exit(cpu, irq);
}
diff --git a/arch/mips64/arc/Makefile b/arch/mips64/arc/Makefile
index be0f04984..6217a1bdb 100644
--- a/arch/mips64/arc/Makefile
+++ b/arch/mips64/arc/Makefile
@@ -3,13 +3,10 @@
#
L_TARGET = arclib.a
-obj-y := init.o printf.o tree.o env.o cmdline.o misc.o time.o file.o \
- identify.o
-
-ifndef CONFIG_SGI_IP27
- obj-y += console.o
-endif
+obj-y := console.o init.o identify.o tree.o env.o cmdline.o misc.o time.o \
+ file.o
obj-$(CONFIG_ARC_MEMORY) += memory.o
+obj-$(CONFIG_ARC_CONSOLE) += arc_con.o
include $(TOPDIR)/Rules.make
diff --git a/arch/mips64/arc/arc_con.c b/arch/mips64/arc/arc_con.c
new file mode 100644
index 000000000..6fe94a6c7
--- /dev/null
+++ b/arch/mips64/arc/arc_con.c
@@ -0,0 +1,69 @@
+/*
+ * Wrap-around code for a console using the
+ * ARC io-routines.
+ *
+ * Copyright (c) 1998 Harald Koerfgen
+ */
+
+#include <linux/tty.h>
+#include <linux/major.h>
+#include <linux/ptrace.h>
+#include <linux/init.h>
+#include <linux/console.h>
+#include <linux/fs.h>
+
+extern char prom_getchar (void);
+extern void prom_printf (char *, ...);
+
+static void prom_console_write(struct console *co, const char *s,
+ unsigned count)
+{
+ unsigned i;
+
+ /*
+ * Now, do each character
+ */
+ for (i = 0; i < count; i++) {
+ if (*s == 10)
+ prom_printf("%c", 13);
+ prom_printf("%c", *s++);
+ }
+}
+
+static int prom_console_wait_key(struct console *co)
+{
+ return prom_getchar();
+}
+
+static int __init prom_console_setup(struct console *co, char *options)
+{
+ return 0;
+}
+
+static kdev_t prom_console_device(struct console *c)
+{
+ return MKDEV(TTY_MAJOR, 64 + c->index);
+}
+
+static struct console arc_cons = {
+ "ttyS",
+ prom_console_write,
+ NULL,
+ prom_console_device,
+ prom_console_wait_key,
+ NULL,
+ prom_console_setup,
+ CON_PRINTBUFFER,
+ -1,
+ 0,
+ NULL
+};
+
+/*
+ * Register console.
+ */
+
+void __init arc_console_init(void)
+{
+ register_console(&arc_cons);
+}
diff --git a/arch/mips64/arc/console.c b/arch/mips64/arc/console.c
index 31af388dc..2edda7fff 100644
--- a/arch/mips64/arc/console.c
+++ b/arch/mips64/arc/console.c
@@ -6,9 +6,10 @@
* Copyright (C) 1996 David S. Miller (dm@sgi.com)
*/
#include <linux/init.h>
+#include <linux/kernel.h>
#include <asm/sgialib.h>
-void prom_putchar(char c)
+static inline void prom_putchar(char c)
{
ULONG cnt;
CHAR it = c;
@@ -16,12 +17,25 @@ void prom_putchar(char c)
ArcWrite(1, &it, 1, &cnt);
}
-char __init prom_getchar(void)
+static char ppbuf[1024];
+
+void prom_printf(char *fmt, ...)
{
- ULONG cnt;
- CHAR c;
+ va_list args;
+ char ch, *bptr;
+ int i;
+
+ va_start(args, fmt);
+ i = vsprintf(ppbuf, fmt, args);
+
+ bptr = ppbuf;
- ArcRead(0, &c, 1, &cnt);
+ while((ch = *(bptr++)) != 0) {
+ if(ch == '\n')
+ prom_putchar('\r');
- return c;
+ prom_putchar(ch);
+ }
+ va_end(args);
+ return;
}
diff --git a/arch/mips64/arc/identify.c b/arch/mips64/arc/identify.c
index 732d6db5e..4556418ac 100644
--- a/arch/mips64/arc/identify.c
+++ b/arch/mips64/arc/identify.c
@@ -46,10 +46,7 @@ string_to_mach(const char *s)
if(!strcmp(s, mach_table[i].name))
return &mach_table[i];
}
- prom_printf("\nYeee, could not determine architecture type <%s>\n", s);
- prom_printf("press a key to reboot\n");
- prom_getchar();
- ArcEnterInteractiveMode();
+ panic("\nYeee, could not determine architecture type <%s>", s);
return NULL;
}
diff --git a/arch/mips64/arc/memory.c b/arch/mips64/arc/memory.c
index 95051fde4..024cce786 100644
--- a/arch/mips64/arc/memory.c
+++ b/arch/mips64/arc/memory.c
@@ -89,15 +89,15 @@ static inline int memtype_classify_arc (union linux_memtypes type)
switch (type.arc) {
case arc_free:
case arc_fcontig:
- return MEMTYPE_FREE;
+ return BOOT_MEM_RAM;
case arc_atmp:
- return MEMTYPE_PROM;
+ return BOOT_MEM_ROM_DATA;
case arc_eblock:
case arc_rvpage:
case arc_bmem:
case arc_prog:
case arc_aperm:
- return MEMTYPE_DONTUSE;
+ return BOOT_MEM_RESERVED;
default:
BUG();
}
@@ -112,52 +112,18 @@ static int __init prom_memtype_classify (union linux_memtypes type)
return memtype_classify_arc(type);
}
-static inline unsigned long find_max_low_pfn(void)
-{
- struct prom_pmemblock *p, *highest;
- unsigned long pfn;
-
- p = pblocks;
- highest = 0;
- while (p->size != 0) {
- if (!highest || p->base > highest->base)
- highest = p;
- p++;
- }
-
- pfn = (highest->base + highest->size) >> PAGE_SHIFT;
-#ifdef DEBUG
- prom_printf("find_max_low_pfn: 0x%lx pfns.\n", pfn);
-#endif
- return pfn;
-}
-
-static inline struct prom_pmemblock *find_largest_memblock(void)
-{
- struct prom_pmemblock *p, *largest;
-
- p = pblocks;
- largest = 0;
- while (p->size != 0) {
- if (!largest || p->size > largest->size)
- largest = p;
- p++;
- }
-
- return largest;
-}
-
void __init prom_meminit(void)
{
- struct prom_pmemblock *largest;
- unsigned long bootmap_size;
struct linux_mdesc *p;
- int totram;
- int i = 0;
#ifdef DEBUG
+ int i = 0;
+
prom_printf("ARCS MEMORY DESCRIPTOR dump:\n");
+ i=0;
+ prom_printf ("i=%d\n", i);
p = ArcGetMemoryDescriptor(PROM_NULL_MDESC);
+ prom_printf ("i=%d\n", i);
while(p) {
prom_printf("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n",
i, p, p->base, p->pages, mtypes(p->type));
@@ -166,56 +132,17 @@ void __init prom_meminit(void)
}
#endif
- totram = 0;
- i = 0;
p = PROM_NULL_MDESC;
while ((p = ArcGetMemoryDescriptor(p))) {
- pblocks[i].type = prom_memtype_classify(p->type);
- pblocks[i].base = p->base << PAGE_SHIFT;
- pblocks[i].size = p->pages << PAGE_SHIFT;
-
- switch (pblocks[i].type) {
- case MEMTYPE_FREE:
- totram += pblocks[i].size;
-#ifdef DEBUG
- prom_printf("free_chunk[%d]: base=%08lx size=%x\n",
- i, pblocks[i].base,
- pblocks[i].size);
-#endif
- i++;
- break;
- case MEMTYPE_PROM:
-#ifdef DEBUG
- prom_printf("prom_chunk[%d]: base=%08lx size=%x\n",
- i, pblocks[i].base,
- pblocks[i].size);
-#endif
- i++;
- break;
- default:
- break;
- }
- }
- pblocks[i].size = 0;
+ unsigned long base, size;
+ long type;
- max_low_pfn = find_max_low_pfn();
- largest = find_largest_memblock();
- bootmap_size = init_bootmem(largest->base >> PAGE_SHIFT, max_low_pfn);
+ base = p->base << PAGE_SHIFT;
+ size = p->pages << PAGE_SHIFT;
+ type = prom_memtype_classify(p->type);
- for (i = 0; pblocks[i].size; i++)
- if (pblocks[i].type == MEMTYPE_FREE)
- free_bootmem(pblocks[i].base, pblocks[i].size);
-
- /* This test is simpleminded. It will fail if the bootmem bitmap
- falls into multiple adjacent ARC memory areas. */
- if (bootmap_size > largest->size) {
- prom_printf("CRITIAL: overwriting PROM data.\n");
- BUG();
+ add_memory_region(base, size, type);
}
- reserve_bootmem(largest->base, bootmap_size);
-
- printk("PROMLIB: Total free ram %dK / %dMB.\n",
- totram >> 10, totram >> 20);
}
void __init
@@ -223,18 +150,19 @@ prom_free_prom_memory (void)
{
struct prom_pmemblock *p;
unsigned long freed = 0;
- unsigned long addr, end;
+ unsigned long addr;
+ int i;
- for (p = pblocks; p->size != 0; p++) {
- if (p->type != MEMTYPE_PROM)
+ for (i = 0; i < boot_mem_map.nr_map; i++) {
+ if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
continue;
- addr = PAGE_OFFSET + (unsigned long) (long) p->base;
- end = addr + (unsigned long) (long) p->size;
- while (addr < end) {
- ClearPageReserved(virt_to_page(addr));
- set_page_count(virt_to_page(addr), 1);
- free_page(addr);
+ addr = boot_mem_map.map[i].addr;
+ while (addr < boot_mem_map.map[i].addr
+ + boot_mem_map.map[i].size) {
+ ClearPageReserved(virt_to_page(__va(addr)));
+ set_page_count(virt_to_page(__va(addr)), 1);
+ free_page((unsigned long)__va(addr));
addr += PAGE_SIZE;
freed += PAGE_SIZE;
}
diff --git a/arch/mips64/arc/printf.c b/arch/mips64/arc/printf.c
deleted file mode 100644
index 664bb270b..000000000
--- a/arch/mips64/arc/printf.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* $Id: printf.c,v 1.1 1999/08/20 21:13:33 ralf Exp $
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Putting things on the screen using SGI arcs PROM facilities.
- *
- * Copyright (C) 1996 David S. Miller (dm@sgi.com)
- */
-#include <linux/init.h>
-#include <linux/kernel.h>
-
-#include <asm/sgialib.h>
-
-static char ppbuf[1024];
-
-void prom_printf(char *fmt, ...)
-{
- va_list args;
- char ch, *bptr;
- int i;
-
- va_start(args, fmt);
- i = vsprintf(ppbuf, fmt, args);
-
- bptr = ppbuf;
-
- while((ch = *(bptr++)) != 0) {
- if(ch == '\n')
- prom_putchar('\r');
-
- prom_putchar(ch);
- }
- va_end(args);
- return;
-}
diff --git a/arch/mips64/config.in b/arch/mips64/config.in
index 5aa50eb73..bfea8cc6f 100644
--- a/arch/mips64/config.in
+++ b/arch/mips64/config.in
@@ -11,8 +11,10 @@ endmenu
mainmenu_option next_comment
comment 'Machine selection'
-bool 'Support for SGI IP22' CONFIG_SGI_IP22
-bool 'Support for SGI IP27' CONFIG_SGI_IP27
+choice 'Machine type' \
+ "SGI-IP22,Indy/Indigo2 CONFIG_SGI_IP22 \
+ SGI-IP27,Origin200/2000 CONFIG_SGI_IP27 SGI-IP27,Origin200/2000"
+
if [ "$CONFIG_SGI_IP27" = "y" ]; then
bool ' IP27 N-Mode' CONFIG_SGI_SN0_N_MODE
bool ' Discontiguous Memory Support' CONFIG_DISCONTIGMEM
@@ -105,6 +107,11 @@ fi
bool 'System V IPC' CONFIG_SYSVIPC
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
bool 'Sysctl support' CONFIG_SYSCTL
+
+if [ "$CONFIG_ARC32" = "y" ]; then
+ bool 'ARC console support' CONFIG_ARC_CONSOLE
+fi
+
tristate 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF
bool 'Kernel support for Linux/MIPS 32-bit binary compatibility' CONFIG_MIPS32_COMPAT
if [ "$CONFIG_MIPS32_COMPAT" = "y" ]; then
@@ -124,14 +131,12 @@ fi
source drivers/pci/Config.in
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- bool 'Support for frame buffer devices (EXPERIMENTAL)' CONFIG_FB
-fi
-
endmenu
source drivers/mtd/Config.in
+source drivers/parport/Config.in
+
source drivers/block/Config.in
source drivers/md/Config.in
@@ -174,16 +179,6 @@ if [ "$CONFIG_NET" = "y" ]; then
bool 'Network device support' CONFIG_NETDEVICES
if [ "$CONFIG_NETDEVICES" = "y" ]; then
source drivers/net/Config.in
- if [ "$CONFIG_SGI_IP22" = "y" ]; then
- bool 'SGI Seeq ethernet controller support' CONFIG_SGISEEQ
- fi
- if [ "$CONFIG_DECSTATION" = "y" ]; then
- bool 'DEC LANCE ethernet controller support' CONFIG_DECLANCE
- fi
- if [ "$CONFIG_BAGET_MIPS" = "y" ]; then
- tristate 'Baget AMD LANCE support' CONFIG_BAGETLANCE
- tristate 'Baget Backplane Shared Memory support' CONFIG_BAGETBSM
- fi
if [ "$CONFIG_ATM" = "y" ]; then
source drivers/atm/Config.in
fi
@@ -226,6 +221,7 @@ source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
+ source drivers/video/Config.in
if [ "$CONFIG_SGI_IP22" = "y" ]; then
tristate 'SGI Newport Console support' CONFIG_SGI_NEWPORT_CONSOLE
if [ "$CONFIG_SGI_NEWPORT_CONSOLE" != "y" ]; then
@@ -267,4 +263,7 @@ if [ "$CONFIG_MODULES" = "y" ]; then
fi
bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+if [ "$CONFIG_SMP" != "n" ]; then
+ bool 'Run uncached' CONFIG_MIPS_UNCACHED
+fi
endmenu
diff --git a/arch/mips64/defconfig b/arch/mips64/defconfig
index a15cc5785..0353bbf03 100644
--- a/arch/mips64/defconfig
+++ b/arch/mips64/defconfig
@@ -69,6 +69,11 @@ CONFIG_PCI_NAMES=y
# CONFIG_MTD is not set
#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
@@ -187,8 +192,6 @@ CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_PPA is not set
-# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_NCR53C8XX is not set
@@ -254,7 +257,6 @@ CONFIG_SGI_IOC3_ETH=y
# CONFIG_HAMACHI is not set
# CONFIG_SK98LIN is not set
# CONFIG_FDDI is not set
-# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
@@ -303,8 +305,6 @@ CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_UNIX98_PTYS is not set
-# CONFIG_PRINTER is not set
-# CONFIG_PPDEV is not set
#
# I2C support
@@ -458,3 +458,4 @@ CONFIG_KCORE_ELF=y
CONFIG_CROSSCOMPILE=y
# CONFIG_REMOTE_DEBUG is not set
# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_MIPS_UNCACHED is not set
diff --git a/arch/mips64/defconfig-ip22 b/arch/mips64/defconfig-ip22
index 2a9aab549..914501b23 100644
--- a/arch/mips64/defconfig-ip22
+++ b/arch/mips64/defconfig-ip22
@@ -5,7 +5,7 @@
#
# Code maturity level options
#
-# CONFIG_EXPERIMENTAL is not set
+CONFIG_EXPERIMENTAL=y
#
# Machine selection
@@ -44,14 +44,18 @@ CONFIG_NET=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
+# CONFIG_ARC_CONSOLE is not set
CONFIG_BINFMT_ELF=y
-# CONFIG_MIPS32_COMPAT is not set
+CONFIG_MIPS32_COMPAT=y
+CONFIG_BINFMT_ELF32=y
# CONFIG_BINFMT_MISC is not set
#
# Loadable module support
#
-# CONFIG_MODULES is not set
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
#
# Memory Technology Devices (MTD)
@@ -59,6 +63,11 @@ CONFIG_BINFMT_ELF=y
# CONFIG_MTD is not set
#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
@@ -86,7 +95,8 @@ CONFIG_BINFMT_ELF=y
#
# Networking options
#
-# CONFIG_PACKET is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
@@ -101,6 +111,9 @@ CONFIG_IP_PNP_BOOTP=y
# CONFIG_NET_IPGRE is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
#
#
@@ -109,6 +122,14 @@ CONFIG_IP_PNP_BOOTP=y
# CONFIG_ATALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
@@ -131,7 +152,65 @@ CONFIG_IP_PNP_BOOTP=y
#
# SCSI support
#
-# CONFIG_SCSI is not set
+CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_SD_EXTRA_DEVS=40
+CONFIG_CHR_DEV_ST=y
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_SR_EXTRA_DEVS=2
+# CONFIG_CHR_DEV_SG is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_DEBUG_QUEUES is not set
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI low-level drivers
+#
+CONFIG_SGIWD93_SCSI=y
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_DMA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_NCR53C7xx is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_SIM710 is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_DEBUG is not set
#
# I2O device support
@@ -160,16 +239,27 @@ CONFIG_NETDEVICES=y
#
# Ethernet (10 or 100Mbit)
#
-# CONFIG_NET_ETHERNET is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+CONFIG_SGISEEQ=y
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
# CONFIG_SK98LIN is not set
# CONFIG_FDDI is not set
-# CONFIG_PLIP is not set
+# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
@@ -183,12 +273,13 @@ CONFIG_NETDEVICES=y
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
-CONFIG_SGISEEQ=y
#
# Amateur Radio support
@@ -219,8 +310,6 @@ CONFIG_VT_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_UNIX98_PTYS is not set
-# CONFIG_PRINTER is not set
-# CONFIG_PPDEV is not set
#
# I2C support
@@ -270,8 +359,8 @@ CONFIG_VT_CONSOLE=y
# File systems
#
# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
+CONFIG_AUTOFS_FS=y
+CONFIG_AUTOFS4_FS=y
# CONFIG_REISERFS_FS is not set
# CONFIG_REISERFS_CHECK is not set
# CONFIG_ADFS_FS is not set
@@ -287,7 +376,7 @@ CONFIG_VT_CONSOLE=y
# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not set
-# CONFIG_ISO9660_FS is not set
+CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
@@ -316,7 +405,7 @@ CONFIG_EXT2_FS=y
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
CONFIG_ROOT_NFS=y
-# CONFIG_NFSD is not set
+CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
@@ -334,14 +423,31 @@ CONFIG_LOCKD=y
#
# Partition Types
#
-# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
CONFIG_SGI_PARTITION=y
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
# CONFIG_SMB_NLS is not set
# CONFIG_NLS is not set
#
# Console drivers
#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
CONFIG_SGI_NEWPORT_CONSOLE=y
CONFIG_FONT_8x16=y
CONFIG_KCORE_ELF=y
@@ -354,8 +460,10 @@ CONFIG_KCORE_ELF=y
#
# SGI devices
#
-# CONFIG_SGI_SERIAL is not set
+CONFIG_SGI_SERIAL=y
+# CONFIG_SERIAL_CONSOLE is not set
CONFIG_SGI_DS1286=y
+# CONFIG_SGI_NEWPORT_GFX is not set
#
# USB support
@@ -371,5 +479,7 @@ CONFIG_SGI_DS1286=y
# Kernel hacking
#
CONFIG_CROSSCOMPILE=y
+# CONFIG_MIPS_FPE_MODULE is not set
# CONFIG_REMOTE_DEBUG is not set
# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_MIPS_UNCACHED is not set
diff --git a/arch/mips64/defconfig-ip27 b/arch/mips64/defconfig-ip27
index a15cc5785..0353bbf03 100644
--- a/arch/mips64/defconfig-ip27
+++ b/arch/mips64/defconfig-ip27
@@ -69,6 +69,11 @@ CONFIG_PCI_NAMES=y
# CONFIG_MTD is not set
#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
@@ -187,8 +192,6 @@ CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_PPA is not set
-# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_NCR53C8XX is not set
@@ -254,7 +257,6 @@ CONFIG_SGI_IOC3_ETH=y
# CONFIG_HAMACHI is not set
# CONFIG_SK98LIN is not set
# CONFIG_FDDI is not set
-# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
@@ -303,8 +305,6 @@ CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_UNIX98_PTYS is not set
-# CONFIG_PRINTER is not set
-# CONFIG_PPDEV is not set
#
# I2C support
@@ -458,3 +458,4 @@ CONFIG_KCORE_ELF=y
CONFIG_CROSSCOMPILE=y
# CONFIG_REMOTE_DEBUG is not set
# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_MIPS_UNCACHED is not set
diff --git a/arch/mips64/kernel/head.S b/arch/mips64/kernel/head.S
index 4a47176af..e9e35aa20 100644
--- a/arch/mips64/kernel/head.S
+++ b/arch/mips64/kernel/head.S
@@ -33,6 +33,7 @@
#endif
.endm
+#ifdef CONFIG_SGI_IP27
/*
* outputs the local nasid into t1.
*/
@@ -42,6 +43,7 @@
and t1, NSRI_NODEID_MASK
dsrl t1, NSRI_NODEID_SHFT
.endm
+#endif /* CONFIG_SGI_IP27 */
/*
* inputs are the text nasid in t1, data nasid in t2.
@@ -94,9 +96,11 @@ NESTED(kernel_entry, 16, sp) # kernel entry point
ori sp, 0xf # align stack on 16 byte.
xori sp, 0xf
+#ifdef CONFIG_SGI_IP27
GET_NASID_ASM
move t2, t1 # text and data are here
MAPPED_KERNEL_SETUP_TLB
+#endif /* IP27 */
ARC64_TWIDDLE_PC
@@ -131,6 +135,7 @@ NESTED(kernel_entry, 16, sp) # kernel entry point
1: b 1b # just in case ...
END(kernel_entry)
+#ifdef CONFIG_SGI_IP27
NESTED(bootstrap, 16, sp)
GET_NASID_ASM
li t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + KLDIR_OFF_POINTER + K0BASE
@@ -149,6 +154,7 @@ NESTED(bootstrap, 16, sp)
mtc0 t0, CP0_STATUS # thread in copy_thread.
jal cboot
END(bootstrap)
+#endif /* CONFIG_SGI_IP27 */
__FINIT
diff --git a/arch/mips64/kernel/mips64_ksyms.c b/arch/mips64/kernel/mips64_ksyms.c
index fce48b87a..f3f30c034 100644
--- a/arch/mips64/kernel/mips64_ksyms.c
+++ b/arch/mips64/kernel/mips64_ksyms.c
@@ -99,7 +99,9 @@ EXPORT_SYMBOL(__rwsem_wake);
/*
* Base address of ports for Intel style I/O.
*/
+#if defined (CONFIG_PCI) || defined (CONFIG_ISA)
EXPORT_SYMBOL(mips_io_port_base);
+#endif
/*
* Kernel hacking ...
diff --git a/arch/mips64/kernel/setup.c b/arch/mips64/kernel/setup.c
index 7c996a336..b9d49d955 100644
--- a/arch/mips64/kernel/setup.c
+++ b/arch/mips64/kernel/setup.c
@@ -31,7 +31,6 @@
#include <asm/bootinfo.h>
#include <asm/cachectl.h>
#include <asm/cpu.h>
-#include <asm/io.h>
#include <asm/stackframe.h>
#include <asm/system.h>
#include <asm/pgalloc.h>
@@ -87,8 +86,9 @@ unsigned long mips_cputype = CPU_UNKNOWN;
unsigned long mips_machtype = MACH_UNKNOWN;
unsigned long mips_machgroup = MACH_GROUP_UNKNOWN;
+struct boot_mem_map boot_mem_map;
+
unsigned char aux_device_present;
-extern int _end;
extern void load_mmu(void);
@@ -96,15 +96,6 @@ static char command_line[CL_SIZE] = { 0, };
char saved_command_line[CL_SIZE];
extern char arcs_cmdline[CL_SIZE];
-/*
- * mips_io_port_base is the begin of the address space to which x86 style
- * I/O ports are mapped.
- */
-#ifdef CONFIG_SGI_IP27
-/* XXX Origin garbage has no business in this file */
-unsigned long mips_io_port_base = IO_BASE;
-#endif
-
extern void ip22_setup(void);
extern void ip27_setup(void);
@@ -145,14 +136,6 @@ static inline void cpu_probe(void)
void __init setup_arch(char **cmdline_p)
{
-#ifdef CONFIG_BLK_DEV_INITRD
- unsigned long tmp;
- unsigned long *initrd_header;
-#endif
- int i;
- pmd_t *pmd = kpmdtbl;
- pte_t *pte = kptbl;
-
cpu_probe();
load_mmu();
@@ -163,37 +146,15 @@ void __init setup_arch(char **cmdline_p)
ip27_setup();
#endif
+#ifdef CONFIG_ARC_MEMORY
+ bootmem_init ();
+#endif
+
strncpy (command_line, arcs_cmdline, CL_SIZE);
memcpy(saved_command_line, command_line, CL_SIZE);
saved_command_line[CL_SIZE-1] = '\0';
*cmdline_p = command_line;
-#ifdef CONFIG_BLK_DEV_INITRD
-#error "Initrd is broken, please fit it."
- tmp = (((unsigned long)&_end + PAGE_SIZE-1) & PAGE_MASK) - 8;
- if (tmp < (unsigned long)&_end)
- tmp += PAGE_SIZE;
- initrd_header = (unsigned long *)tmp;
- if (initrd_header[0] == 0x494E5244) {
- initrd_start = (unsigned long)&initrd_header[2];
- initrd_end = initrd_start + initrd_header[1];
- initrd_below_start_ok = 1;
- if (initrd_end > memory_end) {
- printk("initrd extends beyond end of memory "
- "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
- initrd_end,memory_end);
- initrd_start = 0;
- } else
- *memory_start_p = initrd_end;
- }
-#endif
-
paging_init();
-
- memset((void *)kptbl, 0, PAGE_SIZE << KPTBL_PAGE_ORDER);
- memset((void *)kpmdtbl, 0, PAGE_SIZE);
- pgd_set(swapper_pg_dir, kpmdtbl);
- for (i = 0; i < (1 << KPTBL_PAGE_ORDER); pmd++,i++,pte+=PTRS_PER_PTE)
- pmd_val(*pmd) = (unsigned long)pte;
}
diff --git a/arch/mips64/lib/memcpy.S b/arch/mips64/lib/memcpy.S
index 494193c78..85b2b079c 100644
--- a/arch/mips64/lib/memcpy.S
+++ b/arch/mips64/lib/memcpy.S
@@ -238,8 +238,10 @@ begin_movement:
andi ta2, a2, 0x40
move_128bytes:
+#if (_MIPS_ISA == _MIPS_ISA_MIPS4)
pref 0, 2*128(a0)
pref 1, 2*128(a1)
+#endif
MOVE_BIGGERCHUNK(a1, a0, 0x00, ta0, ta1, ta3, t0)
MOVE_BIGGERCHUNK(a1, a0, 0x40, ta0, ta1, ta3, t0)
dsubu t8, t8, 0x01
diff --git a/arch/mips64/mm/init.c b/arch/mips64/mm/init.c
index a594c69a0..848c1dd34 100644
--- a/arch/mips64/mm/init.c
+++ b/arch/mips64/mm/init.c
@@ -275,6 +275,157 @@ pte_t __bad_page(void)
return __pte(0);
}
+void __init add_memory_region(unsigned long start, unsigned long size,
+ long type)
+{
+ int x = boot_mem_map.nr_map;
+
+ if (x == BOOT_MEM_MAP_MAX) {
+ printk("Ooops! Too many entries in the memory map!\n");
+ return;
+ }
+
+ boot_mem_map.map[x].addr = start;
+ boot_mem_map.map[x].size = size;
+ boot_mem_map.map[x].type = type;
+ boot_mem_map.nr_map++;
+}
+
+static void __init print_memory_map(void)
+{
+ int i;
+
+ for (i = 0; i < boot_mem_map.nr_map; i++) {
+ printk(" memory: %08lx @ %08lx ",
+ boot_mem_map.map[i].size, boot_mem_map.map[i].addr);
+ switch (boot_mem_map.map[i].type) {
+ case BOOT_MEM_RAM:
+ printk("(usable)\n");
+ break;
+ case BOOT_MEM_ROM_DATA:
+ printk("(ROM data)\n");
+ break;
+ case BOOT_MEM_RESERVED:
+ printk("(reserved)\n");
+ break;
+ default:
+ printk("type %lu\n", boot_mem_map.map[i].type);
+ break;
+ }
+ }
+}
+
+void bootmem_init (void) {
+#ifdef CONFIG_BLK_DEV_INITRD
+ unsigned long tmp;
+ unsigned long *initrd_header;
+#endif
+ unsigned long bootmap_size;
+ unsigned long start_pfn, max_pfn;
+ int i;
+ extern int _end;
+
+#define PFN_UP(x) (((x) + PAGE_SIZE - 1) >> PAGE_SHIFT)
+#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
+#define PFN_PHYS(x) ((x) << PAGE_SHIFT)
+
+ /*
+ * Partially used pages are not usable - thus
+ * we are rounding upwards.
+ */
+ start_pfn = PFN_UP(__pa(&_end));
+
+ /* Find the highest page frame number we have available. */
+ max_pfn = 0;
+ for (i = 0; i < boot_mem_map.nr_map; i++) {
+ unsigned long start, end;
+
+ if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
+ continue;
+
+ start = PFN_UP(boot_mem_map.map[i].addr);
+ end = PFN_DOWN(boot_mem_map.map[i].addr
+ + boot_mem_map.map[i].size);
+
+ if (start >= end)
+ continue;
+ if (end > max_pfn)
+ max_pfn = end;
+ }
+
+ /* Initialize the boot-time allocator. */
+ bootmap_size = init_bootmem(start_pfn, max_pfn);
+
+ /*
+ * Register fully available low RAM pages with the bootmem allocator.
+ */
+ for (i = 0; i < boot_mem_map.nr_map; i++) {
+ unsigned long curr_pfn, last_pfn, size;
+
+ /*
+ * Reserve usable memory.
+ */
+ if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
+ continue;
+
+ /*
+ * We are rounding up the start address of usable memory:
+ */
+ curr_pfn = PFN_UP(boot_mem_map.map[i].addr);
+ if (curr_pfn >= max_pfn)
+ continue;
+ if (curr_pfn < start_pfn)
+ curr_pfn = start_pfn;
+
+ /*
+ * ... and at the end of the usable range downwards:
+ */
+ last_pfn = PFN_DOWN(boot_mem_map.map[i].addr
+ + boot_mem_map.map[i].size);
+
+ if (last_pfn > max_pfn)
+ last_pfn = max_pfn;
+
+ /*
+ * ... finally, did all the rounding and playing
+ * around just make the area go away?
+ */
+ if (last_pfn <= curr_pfn)
+ continue;
+
+ size = last_pfn - curr_pfn;
+ free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size));
+ }
+
+ /* Reserve the bootmap memory. */
+ reserve_bootmem(PFN_PHYS(start_pfn), bootmap_size);
+
+#ifdef CONFIG_BLK_DEV_INITRD
+#error "Initrd is broken, please fit it."
+ tmp = (((unsigned long)&_end + PAGE_SIZE-1) & PAGE_MASK) - 8;
+ if (tmp < (unsigned long)&_end)
+ tmp += PAGE_SIZE;
+ initrd_header = (unsigned long *)tmp;
+ if (initrd_header[0] == 0x494E5244) {
+ initrd_start = (unsigned long)&initrd_header[2];
+ initrd_end = initrd_start + initrd_header[1];
+ initrd_below_start_ok = 1;
+ if (initrd_end > memory_end) {
+ printk("initrd extends beyond end of memory "
+ "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
+ initrd_end,memory_end);
+ initrd_start = 0;
+ } else
+ *memory_start_p = initrd_end;
+ }
+#endif
+
+#undef PFN_UP
+#undef PFN_DOWN
+#undef PFN_PHYS
+
+}
+
void show_mem(void)
{
int i, free = 0, total = 0, reserved = 0;
@@ -312,8 +463,12 @@ extern char __init_begin, __init_end;
void __init paging_init(void)
{
+ pmd_t *pmd = kpmdtbl;
+ pte_t *pte = kptbl;
+
unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
unsigned long max_dma, low;
+ int i;
/* Initialize the entire pgd. */
pgd_init((unsigned long)swapper_pg_dir);
@@ -325,14 +480,25 @@ void __init paging_init(void)
max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
low = max_low_pfn;
+#if defined(CONFIG_PCI) || defined(CONFIG_ISA)
if (low < max_dma)
zones_size[ZONE_DMA] = low;
else {
zones_size[ZONE_DMA] = max_dma;
zones_size[ZONE_NORMAL] = low - max_dma;
}
+#else
+ zones_size[ZONE_DMA] = low;
+#endif
free_area_init(zones_size);
+
+ memset((void *)kptbl, 0, PAGE_SIZE << KPTBL_PAGE_ORDER);
+ memset((void *)kpmdtbl, 0, PAGE_SIZE);
+ pgd_set(swapper_pg_dir, kpmdtbl);
+ for (i = 0; i < (1 << KPTBL_PAGE_ORDER); pmd++,i++,pte+=PTRS_PER_PTE)
+ pmd_val(*pmd) = (unsigned long)pte;
+
}
extern int page_is_ram(unsigned long pagenr);
diff --git a/arch/mips64/mm/r4xx0.c b/arch/mips64/mm/r4xx0.c
index 7aad89728..24e3d19c8 100644
--- a/arch/mips64/mm/r4xx0.c
+++ b/arch/mips64/mm/r4xx0.c
@@ -1017,7 +1017,7 @@ r4k_flush_cache_range_s128d32i32(struct mm_struct *mm, unsigned long start,
struct vm_area_struct *vma;
unsigned long flags;
- if (CPU_CONTEXT(smp_processor_id(), mm) != 0) {
+ if (CPU_CONTEXT(smp_processor_id(), mm) != 0)
return;
start &= PAGE_MASK;
@@ -2384,7 +2384,11 @@ void __init ld_mmu_r4xx0(void)
printk("CPU revision is: %08x\n", read_32bit_cp0_register(CP0_PRID));
+#ifdef CONFIG_MIPS_UNCACHED
+ set_cp0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
+#else
set_cp0_config(CONF_CM_CMASK, CONF_CM_CACHABLE_NONCOHERENT);
+#endif /* UNCACHED */
probe_icache(config);
probe_dcache(config);
diff --git a/arch/mips64/mm/umap.c b/arch/mips64/mm/umap.c
index 81a77122a..8690d9961 100644
--- a/arch/mips64/mm/umap.c
+++ b/arch/mips64/mm/umap.c
@@ -106,7 +106,8 @@ EXPORT_SYMBOL(remove_mapping);
void *vmalloc_uncached (unsigned long size)
{
- return vmalloc_prot (size, PAGE_KERNEL_UNCACHED);
+ return __vmalloc (size, GFP_KERNEL | __GFP_HIGHMEM,
+ PAGE_KERNEL_UNCACHED);
}
static inline void free_pte(pte_t page)
diff --git a/arch/mips64/sgi-ip22/ip22-hpc.c b/arch/mips64/sgi-ip22/ip22-hpc.c
index f0b688e91..fa90a72de 100644
--- a/arch/mips64/sgi-ip22/ip22-hpc.c
+++ b/arch/mips64/sgi-ip22/ip22-hpc.c
@@ -1,9 +1,8 @@
-/* $Id: ip22-hpc.c,v 1.2 1999/10/19 20:51:52 ralf Exp $
- *
+/*
* ip22-hpc.c: Routines for generic manipulation of the HPC controllers.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- * Copyright (C) 1998, 1999 Ralf Baechle
+ * Copyright (C) 1998, 1999, 2001 Ralf Baechle
*/
#include <linux/init.h>
#include <linux/types.h>
@@ -11,7 +10,6 @@
#include <asm/addrspace.h>
#include <asm/sgi/sgihpc.h>
#include <asm/sgi/sgint23.h>
-#include <asm/sgialib.h>
#include <asm/bootinfo.h>
#undef DEBUG_SGIHPC
diff --git a/arch/mips64/sgi-ip22/ip22-int.c b/arch/mips64/sgi-ip22/ip22-int.c
index 774b4fc33..d849422cd 100644
--- a/arch/mips64/sgi-ip22/ip22-int.c
+++ b/arch/mips64/sgi-ip22/ip22-int.c
@@ -34,7 +34,6 @@
#include <asm/sgi/sgi.h>
#include <asm/sgi/sgihpc.h>
#include <asm/sgi/sgint23.h>
-#include <asm/sgialib.h>
/*
* Linux has a controller-independent x86 interrupt architecture.
@@ -287,9 +286,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
- printk("Got irq %d, press a key.", irq);
- prom_getchar();
- ArcEnterInteractiveMode();
+ panic(KERN_DEBUG "Got irq %d, press a key.", irq);
/*
* mask and ack quickly, we don't want the irq controller
diff --git a/arch/mips64/sgi-ip22/ip22-mc.c b/arch/mips64/sgi-ip22/ip22-mc.c
index be8a91a0a..24187d117 100644
--- a/arch/mips64/sgi-ip22/ip22-mc.c
+++ b/arch/mips64/sgi-ip22/ip22-mc.c
@@ -1,5 +1,4 @@
-/* $Id: ip22-mc.c,v 1.2 1999/10/19 20:51:52 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -7,6 +6,7 @@
* indy_mc.c: Routines for manipulating the INDY memory controller.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 2001 Ralf Baechle (ralf@gnu.org)
*/
#include <linux/init.h>
#include <linux/kernel.h>
@@ -15,7 +15,6 @@
#include <asm/ptrace.h>
#include <asm/sgi/sgimc.h>
#include <asm/sgi/sgihpc.h>
-#include <asm/sgialib.h>
/* #define DEBUG_SGIMC */
diff --git a/arch/mips64/sgi-ip22/ip22-reset.c b/arch/mips64/sgi-ip22/ip22-reset.c
index e8d4ff345..8ef06e48b 100644
--- a/arch/mips64/sgi-ip22/ip22-reset.c
+++ b/arch/mips64/sgi-ip22/ip22-reset.c
@@ -1,12 +1,11 @@
-/* $Id: ip22-reset.c,v 1.3 1999/10/08 21:07:51 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Reset an IP22.
*
- * Copyright (C) 1997, 1998, 1999 by Ralf Baechle
+ * Copyright (C) 1997, 1998, 1999, 2001 by Ralf Baechle
*/
#include <linux/kernel.h>
#include <linux/sched.h>
diff --git a/arch/mips64/sgi-ip22/ip22-sc.c b/arch/mips64/sgi-ip22/ip22-sc.c
index 7846f6c21..5e1c351a1 100644
--- a/arch/mips64/sgi-ip22/ip22-sc.c
+++ b/arch/mips64/sgi-ip22/ip22-sc.c
@@ -1,5 +1,4 @@
-/* $Id: ip22-sc.c,v 1.2 1999/12/04 03:59:01 ralf Exp $
- *
+/*
* indy_sc.c: Indy cache management functions.
*
* Copyright (C) 1997 Ralf Baechle (ralf@gnu.org),
@@ -16,7 +15,6 @@
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/bootinfo.h>
-#include <asm/sgialib.h>
#include <asm/mmu_context.h>
/* Secondary cache size in bytes, if present. */
diff --git a/arch/mips64/sgi-ip22/ip22-setup.c b/arch/mips64/sgi-ip22/ip22-setup.c
index a0f429429..f94a07077 100644
--- a/arch/mips64/sgi-ip22/ip22-setup.c
+++ b/arch/mips64/sgi-ip22/ip22-setup.c
@@ -145,7 +145,7 @@ void __init ip22_setup(void)
* graphics console, it is set to "d" for the first serial
* line and "d2" for the second serial line.
*/
- ctype = ArcArcGetEnvironmentVariable("console");
+ ctype = ArcGetEnvironmentVariable("console");
if(*ctype == 'd') {
if(*(ctype+1)=='2')
console_setup ("ttyS1");
diff --git a/arch/mips64/sgi-ip22/ip22-timer.c b/arch/mips64/sgi-ip22/ip22-timer.c
index e98ec596e..9ffc5dad1 100644
--- a/arch/mips64/sgi-ip22/ip22-timer.c
+++ b/arch/mips64/sgi-ip22/ip22-timer.c
@@ -1,5 +1,4 @@
-/* $Id: ip22-timer.c,v 1.6 2000/02/04 07:40:24 ralf Exp $
- *
+/*
* indy_timer.c: Setting up the clock on the INDY 8254 controller.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
@@ -238,9 +237,7 @@ void indy_8254timer_irq(void)
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
- printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n");
- prom_getchar();
- ArcEnterInteractiveMode();
+ panic("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n");
irq_exit(cpu, irq);
}
diff --git a/arch/mips64/sgi-ip22/system.c b/arch/mips64/sgi-ip22/system.c
index ce8b81085..b6f485e76 100644
--- a/arch/mips64/sgi-ip22/system.c
+++ b/arch/mips64/sgi-ip22/system.c
@@ -1,5 +1,4 @@
-/* $Id: system.c,v 1.3 1999/10/19 20:51:52 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -7,6 +6,7 @@
* system.c: Probe the system type using ARCS prom interface library.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 2000, 2001 Ralf Baechle (ralf@gnu.org)
*/
#include <linux/init.h>
#include <linux/kernel.h>
@@ -46,10 +46,7 @@ static int __init string_to_cpu(char *s)
if(!strcmp(s, sgi_cputable[i].name))
return sgi_cputable[i].type;
}
- prom_printf("\nYeee, could not determine MIPS cpu type <%s>\n", s);
- prom_printf("press a key to reboot\n");
- prom_getchar();
- ArcEnterInteractiveMode();
+ panic("\nYeee, could not determine MIPS cpu type <%s>", s);
return 0;
}
@@ -74,23 +71,16 @@ void __init sgi_sysinit(void)
int ncpus = 0;
if(p->type == Cpu) {
- if(++ncpus > 1) {
- prom_printf("\nYeee, SGI MP not ready yet\n");
- prom_printf("press a key to reboot\n");
- prom_getchar();
- ArcEnterInteractiveMode();
- }
+ if (++ncpus > 1)
+ panic("\nYeee, SGI MP not ready yet");
printk("CPU: %s ", p->iname);
cpup = p;
cputype = string_to_cpu(cpup->iname);
}
p = ArcGetPeer(p);
}
- if(cputype == -1) {
- prom_printf("\nYeee, could not find cpu ARCS component\n");
- prom_printf("press a key to reboot\n");
- prom_getchar();
- ArcEnterInteractiveMode();
+ if (cputype == -1) {
+ panic("\nYeee, could not find cpu ARCS component");
}
p = ArcGetChild(cpup);
while(p) {
diff --git a/arch/mips64/sgi-ip27/ip27-setup.c b/arch/mips64/sgi-ip27/ip27-setup.c
index db489de96..26bee3169 100644
--- a/arch/mips64/sgi-ip27/ip27-setup.c
+++ b/arch/mips64/sgi-ip27/ip27-setup.c
@@ -14,6 +14,7 @@
#include <linux/spinlock.h>
#include <linux/sched.h>
#include <linux/smp.h>
+#include <asm/io.h>
#include <asm/sn/types.h>
#include <asm/sn/sn0/addrs.h>
#include <asm/sn/sn0/hubni.h>
@@ -39,6 +40,7 @@
#define DBG(x...)
#endif
+unsigned long mips_io_port_base = IO_BASE;
/*
* get_nasid() returns the physical node id number of the caller.