From 4b35ee7fea60f42b5b205c23372b3f90e90064a4 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 9 May 2004 23:52:56 -0700 Subject: [PATCH] MIPS update From: Ralf Baechle - Kconfig cleanups: - enable DMA_NONCOHERENT, DMA_COHERENT or DMA_IP27 via reverse dependencies - untangle VRC4171 / VRC4173 selection - R10000 support enables PREFETCH - SEAD needs IRQ_CPU - Update defconfig against latest Kconfig files. - Fix computation of return address if syscall number was out of range - Add power managment hooks in signal code. - Don't try to handle signals when previous context was not in user mode. - Fix serial interface setup for VR41xx systems. - Build fixes after CLEAR_BITMAP changed name. - Removes bogus comment from - is dead. - Start collecting common definitions for PMON firmware in - Define ARCH_MIN_TASKALIGN to 8; we have 64-bit members even on 32-bit kernels if we're running on MIPS II or better. --- include/asm-mips/checksum.h | 4 ---- include/asm-mips/hdreg.h | 2 +- include/asm-mips/mach-au1x00/au1000.h | 19 +++++++++++++++-- include/asm-mips/mach-db1x00/db1x00.h | 31 ++++++++++++++++++++-------- include/asm-mips/pmon.h | 22 ++++++++++++++++++++ include/asm-mips/processor.h | 2 ++ include/asm-mips/ptrace.h | 2 ++ include/asm-mips/thread_info.h | 6 ++++-- include/asm-mips/unistd.h | 39 +++++++++++++++++++++++++++++------ include/asm-mips/vr41xx/vr41xx.h | 20 +++++++++++------- 10 files changed, 116 insertions(+), 31 deletions(-) create mode 100644 include/asm-mips/pmon.h (limited to 'include') diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index 0db85f430619..e31681afb1af 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h @@ -120,10 +120,6 @@ static inline unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl) return csum_fold(csum); } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ static inline unsigned int csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, unsigned short proto, unsigned int sum) diff --git a/include/asm-mips/hdreg.h b/include/asm-mips/hdreg.h index 7f7fd1af0af3..5989bbc97cbf 100644 --- a/include/asm-mips/hdreg.h +++ b/include/asm-mips/hdreg.h @@ -1 +1 @@ -#include +#warning this file is obsolete, please do not use it diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index 91b1b07a5d78..326f266968ab 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h @@ -1141,14 +1141,14 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; #define Au1500_PCI_MEM_START 0x440000000 #define Au1500_PCI_MEM_END 0x44FFFFFFF -#define PCI_IO_START (Au1500_PCI_IO_START + 0x300) +#define PCI_IO_START (Au1500_PCI_IO_START + 0x1000) #define PCI_IO_END (Au1500_PCI_IO_END) #define PCI_MEM_START (Au1500_PCI_MEM_START) #define PCI_MEM_END (Au1500_PCI_MEM_END) #define PCI_FIRST_DEVFN (0<<3) #define PCI_LAST_DEVFN (19<<3) -#define IOPORT_RESOURCE_START 0x00000000 +#define IOPORT_RESOURCE_START 0x00001000 /* skip the legacy ide probing */ #define IOPORT_RESOURCE_END 0xffffffff #define IOMEM_RESOURCE_START 0x10000000 #define IOMEM_RESOURCE_END 0xffffffff @@ -1199,5 +1199,20 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; #elif defined(CONFIG_SOC_AU1100) #define NUM_ETH_INTERFACES 1 #endif +/* Processor information base on prid. + * Copied from PowerPC. + */ +struct cpu_spec { + /* CPU is matched via (PRID & prid_mask) == prid_value */ + unsigned int prid_mask; + unsigned int prid_value; + + char *cpu_name; + unsigned int cpu_od; /* Set Config[OD] */ + unsigned int cpu_bclk; /* Enable BCLK switching */ +}; + +extern struct cpu_spec cpu_specs[]; +extern struct cpu_spec *cur_cpu_spec[]; #endif diff --git a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h index 65990e18a4ec..3b03b0b0a7e9 100644 --- a/include/asm-mips/mach-db1x00/db1x00.h +++ b/include/asm-mips/mach-db1x00/db1x00.h @@ -27,21 +27,34 @@ #ifndef __ASM_DB1X00_H #define __ASM_DB1X00_H +#ifdef CONFIG_MIPS_DB1550 +#define BCSR_KSEG1_ADDR 0xAF000000 +#else +#define BCSR_KSEG1_ADDR 0xAE000000 +#endif /* * Overlay data structure of the Db1x00 board registers. - * Registers located at physical 1E0000xx, KSEG1 0xAE0000xx + * Registers located at physical 0E0000xx, KSEG1 0xAE0000xx */ typedef volatile struct { - /*00*/ unsigned long whoami; - /*04*/ unsigned long status; - /*08*/ unsigned long switches; - /*0C*/ unsigned long resets; - /*10*/ unsigned long pcmcia; - /*14*/ unsigned long specific; - /*18*/ unsigned long leds; - /*1C*/ unsigned long swreset; + /*00*/ unsigned short whoami; + unsigned short reserved0; + /*04*/ unsigned short status; + unsigned short reserved1; + /*08*/ unsigned short switches; + unsigned short reserved2; + /*0C*/ unsigned short resets; + unsigned short reserved3; + /*10*/ unsigned short pcmcia; + unsigned short reserved4; + /*14*/ unsigned short specific; + unsigned short reserved5; + /*18*/ unsigned short leds; + unsigned short reserved6; + /*1C*/ unsigned short swreset; + unsigned short reserved7; } BCSR; diff --git a/include/asm-mips/pmon.h b/include/asm-mips/pmon.h new file mode 100644 index 000000000000..0162517854d4 --- /dev/null +++ b/include/asm-mips/pmon.h @@ -0,0 +1,22 @@ +/* + * 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) 2004 by Ralf Baechle + */ +#ifndef _ASM_PMON_H +#define _ASM_PMON_H + +struct callvectors { + int (*open) (char*, int, int); /* 0 */ + int (*close) (int); /* 4 */ + int (*read) (int, void*, int); /* 8 */ + int (*write) (int, void*, int); /* 12 */ + off_t (*lseek) (int, off_t, int); /* 16 */ + int (*printf) (const char*, ...); /* 20 */ + void (*cacheflush) (void); /* 24 */ + char* (*gets) (char*); /* 28 */ +}; + +#endif /* _ASM_PMON_H */ diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index f13b15ac0b10..70534af2a59c 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h @@ -175,6 +175,8 @@ typedef struct { unsigned long seg; } mm_segment_t; +#define ARCH_MIN_TASKALIGN 8 + /* * If you change thread_struct remember to change the #defines below too! */ diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h index 36df5fc7b37b..19cadb6579fd 100644 --- a/include/asm-mips/ptrace.h +++ b/include/asm-mips/ptrace.h @@ -69,6 +69,8 @@ struct pt_regs { extern void show_regs(struct pt_regs *); +extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit); + #endif #endif /* _ASM_PTRACE_H */ diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 82889016dc5b..11782520310b 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h @@ -110,6 +110,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ +#define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ @@ -118,12 +119,13 @@ register struct thread_info *__current_thread_info __asm__("$28"); #define _TIF_NOTIFY_RESUME (1<