diff -Naur linux-2.6.19.1/include/asm-mips/compat.h linux-mips-2.6.19.1/include/asm-mips/compat.h --- linux-2.6.19.1/include/asm-mips/compat.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/compat.h 2006-12-11 15:38:26.000000000 -0800 @@ -5,6 +5,7 @@ */ #include #include +#include #define COMPAT_USER_HZ 100 @@ -32,6 +33,7 @@ s32 val[2]; } compat_fsid_t; typedef s32 compat_timer_t; +typedef s32 compat_key_t; typedef s32 compat_int_t; typedef s32 compat_long_t; @@ -146,4 +148,71 @@ return (void __user *) (regs->regs[29] - len); } +struct compat_ipc64_perm { + compat_key_t key; + __compat_uid32_t uid; + __compat_gid32_t gid; + __compat_uid32_t cuid; + __compat_gid32_t cgid; + compat_mode_t mode; + unsigned short seq; + unsigned short __pad2; + compat_ulong_t __unused1; + compat_ulong_t __unused2; +}; + +struct compat_semid64_ds { + struct compat_ipc64_perm sem_perm; + compat_time_t sem_otime; + compat_time_t sem_ctime; + compat_ulong_t sem_nsems; + compat_ulong_t __unused1; + compat_ulong_t __unused2; +}; + +struct compat_msqid64_ds { + struct compat_ipc64_perm msg_perm; +#ifndef CONFIG_CPU_LITTLE_ENDIAN + compat_ulong_t __unused1; +#endif + compat_time_t msg_stime; +#ifdef CONFIG_CPU_LITTLE_ENDIAN + compat_ulong_t __unused1; +#endif +#ifndef CONFIG_CPU_LITTLE_ENDIAN + compat_ulong_t __unused2; +#endif + compat_time_t msg_rtime; +#ifdef CONFIG_CPU_LITTLE_ENDIAN + compat_ulong_t __unused2; +#endif +#ifndef CONFIG_CPU_LITTLE_ENDIAN + compat_ulong_t __unused3; +#endif + compat_time_t msg_ctime; +#ifdef CONFIG_CPU_LITTLE_ENDIAN + compat_ulong_t __unused3; +#endif + compat_ulong_t msg_cbytes; + compat_ulong_t msg_qnum; + compat_ulong_t msg_qbytes; + compat_pid_t msg_lspid; + compat_pid_t msg_lrpid; + compat_ulong_t __unused4; + compat_ulong_t __unused5; +}; + +struct compat_shmid64_ds { + struct compat_ipc64_perm shm_perm; + compat_size_t shm_segsz; + compat_time_t shm_atime; + compat_time_t shm_dtime; + compat_time_t shm_ctime; + compat_pid_t shm_cpid; + compat_pid_t shm_lpid; + compat_ulong_t shm_nattch; + compat_ulong_t __unused1; + compat_ulong_t __unused2; +}; + #endif /* _ASM_COMPAT_H */ diff -Naur linux-2.6.19.1/include/asm-mips/io.h linux-mips-2.6.19.1/include/asm-mips/io.h --- linux-2.6.19.1/include/asm-mips/io.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/io.h 2006-12-11 15:38:26.000000000 -0800 @@ -518,34 +518,6 @@ } /* - * Memory Mapped I/O - */ -#define ioread8(addr) readb(addr) -#define ioread16(addr) readw(addr) -#define ioread32(addr) readl(addr) - -#define iowrite8(b,addr) writeb(b,addr) -#define iowrite16(w,addr) writew(w,addr) -#define iowrite32(l,addr) writel(l,addr) - -#define ioread8_rep(a,b,c) readsb(a,b,c) -#define ioread16_rep(a,b,c) readsw(a,b,c) -#define ioread32_rep(a,b,c) readsl(a,b,c) - -#define iowrite8_rep(a,b,c) writesb(a,b,c) -#define iowrite16_rep(a,b,c) writesw(a,b,c) -#define iowrite32_rep(a,b,c) writesl(a,b,c) - -/* Create a virtual mapping cookie for an IO port range */ -extern void __iomem *ioport_map(unsigned long port, unsigned int nr); -extern void ioport_unmap(void __iomem *); - -/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ -struct pci_dev; -extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); -extern void pci_iounmap(struct pci_dev *dev, void __iomem *); - -/* * ISA space is 'always mapped' on currently supported MIPS systems, no need * to explicitly ioremap() it. The fact that the ISA IO space is mapped * to PAGE_OFFSET is pure coincidence - it does not mean ISA values diff -Naur linux-2.6.19.1/include/asm-mips/mach-au1x00/au1000.h linux-mips-2.6.19.1/include/asm-mips/mach-au1x00/au1000.h --- linux-2.6.19.1/include/asm-mips/mach-au1x00/au1000.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/mach-au1x00/au1000.h 2006-12-11 15:38:26.000000000 -0800 @@ -39,6 +39,7 @@ #ifndef _LANGUAGE_ASSEMBLY #include +#include #include /* cpu pipeline flush */ @@ -1664,12 +1665,12 @@ * addresses. For PCI IO, it's simpler because we get to do the ioremap * ourselves and then adjust the device's resources. */ -#define Au1500_EXT_CFG 0x600000000ULL -#define Au1500_EXT_CFG_TYPE1 0x680000000ULL -#define Au1500_PCI_IO_START 0x500000000ULL -#define Au1500_PCI_IO_END 0x5000FFFFFULL -#define Au1500_PCI_MEM_START 0x440000000ULL -#define Au1500_PCI_MEM_END 0x44FFFFFFFULL +#define Au1500_EXT_CFG ((resource_size_t) 0x600000000ULL) +#define Au1500_EXT_CFG_TYPE1 ((resource_size_t) 0x680000000ULL) +#define Au1500_PCI_IO_START ((resource_size_t) 0x500000000ULL) +#define Au1500_PCI_IO_END ((resource_size_t) 0x5000FFFFFULL) +#define Au1500_PCI_MEM_START ((resource_size_t) 0x440000000ULL) +#define Au1500_PCI_MEM_END ((resource_size_t) 0x44FFFFFFFULL) #define PCI_IO_START (Au1500_PCI_IO_START + 0x1000) #define PCI_IO_END (Au1500_PCI_IO_END) diff -Naur linux-2.6.19.1/include/asm-mips/mach-au1x00/au1xxx_ide.h linux-mips-2.6.19.1/include/asm-mips/mach-au1x00/au1xxx_ide.h --- linux-2.6.19.1/include/asm-mips/mach-au1x00/au1xxx_ide.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/mach-au1x00/au1xxx_ide.h 2006-12-11 15:38:26.000000000 -0800 @@ -83,6 +83,7 @@ } _auide_hwif; #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA + /* HD white list */ static const struct drive_list_entry dma_white_list [] = { /* diff -Naur linux-2.6.19.1/include/asm-mips/mach-ip27/irq.h linux-mips-2.6.19.1/include/asm-mips/mach-ip27/irq.h --- linux-2.6.19.1/include/asm-mips/mach-ip27/irq.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/mach-ip27/irq.h 2006-12-11 15:38:26.000000000 -0800 @@ -10,8 +10,6 @@ #ifndef __ASM_MACH_IP27_IRQ_H #define __ASM_MACH_IP27_IRQ_H -#include - /* * A hardwired interrupt number is completly stupid for this system - a * large configuration might have thousands if not tenthousands of diff -Naur linux-2.6.19.1/include/asm-mips/mach-ip27/topology.h linux-mips-2.6.19.1/include/asm-mips/mach-ip27/topology.h --- linux-2.6.19.1/include/asm-mips/mach-ip27/topology.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/mach-ip27/topology.h 2006-12-11 15:38:26.000000000 -0800 @@ -1,7 +1,6 @@ #ifndef _ASM_MACH_TOPOLOGY_H #define _ASM_MACH_TOPOLOGY_H 1 -#include #include #include diff -Naur linux-2.6.19.1/include/asm-mips/page.h linux-mips-2.6.19.1/include/asm-mips/page.h --- linux-2.6.19.1/include/asm-mips/page.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/page.h 2006-12-11 15:38:26.000000000 -0800 @@ -59,16 +59,13 @@ flush_data_cache_page((unsigned long)addr); } -static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, - struct page *to) -{ - extern void (*flush_data_cache_page)(unsigned long addr); - - copy_page(vto, vfrom); - if (!cpu_has_ic_fills_f_dc || - pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK)) - flush_data_cache_page((unsigned long)vto); -} +extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, + struct page *to); +struct vm_area_struct; +extern void copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); + +#define __HAVE_ARCH_COPY_USER_HIGHPAGE /* * These are used to make use of C type-checking.. diff -Naur linux-2.6.19.1/include/asm-mips/pci.h linux-mips-2.6.19.1/include/asm-mips/pci.h --- linux-2.6.19.1/include/asm-mips/pci.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/pci.h 2006-12-11 15:38:26.000000000 -0800 @@ -187,4 +187,10 @@ /* Do platform specific device initialization at pci_enable_device() time */ extern int pcibios_plat_dev_init(struct pci_dev *dev); +/* Chances are this interrupt is wired PC-style ... */ +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +{ + return channel ? 15 : 14; +} + #endif /* _ASM_PCI_H */ diff -Naur linux-2.6.19.1/include/asm-mips/ptrace.h linux-mips-2.6.19.1/include/asm-mips/ptrace.h --- linux-2.6.19.1/include/asm-mips/ptrace.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/ptrace.h 2006-12-11 15:38:26.000000000 -0800 @@ -84,6 +84,14 @@ extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit); +extern NORET_TYPE void die(const char *, struct pt_regs *); + +static inline void die_if_kernel(const char *str, struct pt_regs *regs) +{ + if (unlikely(!user_mode(regs))) + die(str, regs); +} + #endif #endif /* _ASM_PTRACE_H */ diff -Naur linux-2.6.19.1/include/asm-mips/sn/arch.h linux-mips-2.6.19.1/include/asm-mips/sn/arch.h --- linux-2.6.19.1/include/asm-mips/sn/arch.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/sn/arch.h 2006-12-11 15:38:26.000000000 -0800 @@ -18,7 +18,6 @@ #endif typedef u64 hubreg_t; -typedef u64 nic_t; #define cputonasid(cpu) (cpu_data[(cpu)].p_nasid) #define cputoslice(cpu) (cpu_data[(cpu)].p_slice) diff -Naur linux-2.6.19.1/include/asm-mips/sn/klconfig.h linux-mips-2.6.19.1/include/asm-mips/sn/klconfig.h --- linux-2.6.19.1/include/asm-mips/sn/klconfig.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/sn/klconfig.h 2006-12-11 15:38:26.000000000 -0800 @@ -61,6 +61,8 @@ #endif /* CONFIG_SGI_IP35 */ #endif /* CONFIG_SGI_IP27 || CONFIG_SGI_IP35 */ +typedef u64 nic_t; + #define KLCFGINFO_MAGIC 0xbeedbabe typedef s32 klconf_off_t; @@ -176,7 +178,7 @@ /* --- New Macros for the changed kl_config_hdr_t structure --- */ #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ - (unsigned long)_k + (_k->ch_malloc_hdr_off))) + ((unsigned long)_k + (_k->ch_malloc_hdr_off))) #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) diff -Naur linux-2.6.19.1/include/asm-mips/system.h linux-mips-2.6.19.1/include/asm-mips/system.h --- linux-2.6.19.1/include/asm-mips/system.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/asm-mips/system.h 2006-12-11 15:38:26.000000000 -0800 @@ -18,7 +18,6 @@ #include #include #include -#include #include /* @@ -472,14 +471,6 @@ extern unsigned long ebase; extern void per_cpu_trap_init(void); -extern NORET_TYPE void die(const char *, struct pt_regs *); - -static inline void die_if_kernel(const char *str, struct pt_regs *regs) -{ - if (unlikely(!user_mode(regs))) - die(str, regs); -} - extern int stop_a_enabled; /* diff -Naur linux-2.6.19.1/include/linux/highmem.h linux-mips-2.6.19.1/include/linux/highmem.h --- linux-2.6.19.1/include/linux/highmem.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/linux/highmem.h 2006-12-11 15:38:26.000000000 -0800 @@ -94,7 +94,10 @@ kunmap_atomic(kaddr, KM_USER0); } -static inline void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr) +#ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE + +static inline void copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma) { char *vfrom, *vto; @@ -107,6 +110,8 @@ smp_wmb(); } +#endif + static inline void copy_highpage(struct page *to, struct page *from) { char *vfrom, *vto; diff -Naur linux-2.6.19.1/include/linux/pci_ids.h linux-mips-2.6.19.1/include/linux/pci_ids.h --- linux-2.6.19.1/include/linux/pci_ids.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/linux/pci_ids.h 2006-12-11 15:38:26.000000000 -0800 @@ -1604,6 +1604,9 @@ #define PCI_VENDOR_ID_SATSAGEM 0x1267 #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 +#define PCI_VENDOR_ID_SILICON_MOTION 0x126f +#define PCI_DEVICE_ID_SM501_VOYAGER_GX_REV_AA 0x0501 +#define PCI_DEVICE_ID_SM501_VOYAGER_GX_REV_B 0x0510 #define PCI_VENDOR_ID_ENSONIQ 0x1274 #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 diff -Naur linux-2.6.19.1/include/linux/serial.h linux-mips-2.6.19.1/include/linux/serial.h --- linux-2.6.19.1/include/linux/serial.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/linux/serial.h 2006-12-11 15:38:26.000000000 -0800 @@ -76,7 +76,8 @@ #define PORT_16654 11 #define PORT_16850 12 #define PORT_RSA 13 /* RSA-DV II/S card */ -#define PORT_MAX 13 +#define PORT_SB1250 14 +#define PORT_MAX 14 #define SERIAL_IO_PORT 0 #define SERIAL_IO_HUB6 1 diff -Naur linux-2.6.19.1/include/linux/serial_ip3106.h linux-mips-2.6.19.1/include/linux/serial_ip3106.h --- linux-2.6.19.1/include/linux/serial_ip3106.h 2006-12-11 11:32:53.000000000 -0800 +++ linux-mips-2.6.19.1/include/linux/serial_ip3106.h 2006-12-11 15:38:26.000000000 -0800 @@ -78,4 +78,16 @@ #define IP3106_UART_FIFO_RXFIFO 0x00001F00 #define IP3106_UART_FIFO_RBRTHR 0x000000FF +#define ip3106_lcr(base,port) *(volatile u32 *)(base+(port*0x1000) + 0x000) +#define ip3106_mcr(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x004) +#define ip3106_baud(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x008) +#define ip3106_cfg(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x00C) +#define ip3106_fifo(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x028) +#define ip3106_istat(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE0) +#define ip3106_ien(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE4) +#define ip3106_iclr(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE8) +#define ip3106_iset(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFEC) +#define ip3106_pd(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFF4) +#define ip3106_mid(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFFC) + #endif