summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/core_cia.h41
-rw-r--r--include/asm-alpha/core_pyxis.h17
-rw-r--r--include/asm-alpha/ipcbuf.h28
-rw-r--r--include/asm-alpha/msgbuf.h27
-rw-r--r--include/asm-alpha/pci.h5
-rw-r--r--include/asm-alpha/posix_types.h7
-rw-r--r--include/asm-alpha/sembuf.h22
-rw-r--r--include/asm-alpha/shmbuf.h38
-rw-r--r--include/asm-arm/arch-arc/serial.h4
-rw-r--r--include/asm-arm/arch-arc/system.h3
-rw-r--r--include/asm-arm/arch-cl7500/system.h2
-rw-r--r--include/asm-arm/arch-ebsa110/system.h1
-rw-r--r--include/asm-arm/arch-ebsa285/io.h4
-rw-r--r--include/asm-arm/arch-ebsa285/irq.h13
-rw-r--r--include/asm-arm/arch-ebsa285/system.h1
-rw-r--r--include/asm-arm/arch-nexuspci/system.h1
-rw-r--r--include/asm-arm/arch-rpc/system.h3
-rw-r--r--include/asm-arm/arch-sa1100/hardware.h4
-rw-r--r--include/asm-arm/arch-sa1100/ide.h98
-rw-r--r--include/asm-arm/arch-sa1100/memory.h16
-rw-r--r--include/asm-arm/arch-sa1100/param.h2
-rw-r--r--include/asm-arm/arch-sa1100/serial.h2
-rw-r--r--include/asm-arm/arch-sa1100/system.h9
-rw-r--r--include/asm-arm/arch-sa1100/uncompress.h52
-rw-r--r--include/asm-arm/checksum.h36
-rw-r--r--include/asm-arm/div64.h33
-rw-r--r--include/asm-arm/io.h16
-rw-r--r--include/asm-arm/iomd.h18
-rw-r--r--include/asm-arm/ipcbuf.h29
-rw-r--r--include/asm-arm/msgbuf.h31
-rw-r--r--include/asm-arm/page.h6
-rw-r--r--include/asm-arm/posix_types.h7
-rw-r--r--include/asm-arm/proc-armv/uncompress.h2
-rw-r--r--include/asm-arm/proc-fns.h8
-rw-r--r--include/asm-arm/sembuf.h25
-rw-r--r--include/asm-arm/shmbuf.h42
-rw-r--r--include/asm-arm/sigcontext.h1
-rw-r--r--include/asm-arm/siginfo.h16
-rw-r--r--include/asm-arm/stat.h37
-rw-r--r--include/asm-arm/string.h3
-rw-r--r--include/asm-arm/system.h13
-rw-r--r--include/asm-arm/unistd.h30
-rw-r--r--include/asm-i386/apic.h393
-rw-r--r--include/asm-i386/apicdef.h359
-rw-r--r--include/asm-i386/bugs.h12
-rw-r--r--include/asm-i386/fixmap.h12
-rw-r--r--include/asm-i386/hardirq.h1
-rw-r--r--include/asm-i386/hw_irq.h22
-rw-r--r--include/asm-i386/io_apic.h134
-rw-r--r--include/asm-i386/ipcbuf.h29
-rw-r--r--include/asm-i386/mpspec.h168
-rw-r--r--include/asm-i386/msgbuf.h31
-rw-r--r--include/asm-i386/pci.h3
-rw-r--r--include/asm-i386/pgalloc.h2
-rw-r--r--include/asm-i386/pgtable.h78
-rw-r--r--include/asm-i386/posix_types.h7
-rw-r--r--include/asm-i386/processor.h3
-rw-r--r--include/asm-i386/sembuf.h25
-rw-r--r--include/asm-i386/shmbuf.h42
-rw-r--r--include/asm-i386/siginfo.h16
-rw-r--r--include/asm-i386/smp.h218
-rw-r--r--include/asm-i386/smplock.h2
-rw-r--r--include/asm-i386/spinlock.h2
-rw-r--r--include/asm-i386/unistd.h19
-rw-r--r--include/asm-m68k/ipcbuf.h29
-rw-r--r--include/asm-m68k/msgbuf.h31
-rw-r--r--include/asm-m68k/posix_types.h7
-rw-r--r--include/asm-m68k/sembuf.h25
-rw-r--r--include/asm-m68k/shmbuf.h42
-rw-r--r--include/asm-m68k/siginfo.h16
-rw-r--r--include/asm-m68k/unistd.h19
-rw-r--r--include/asm-mips/checksum.h26
-rw-r--r--include/asm-mips/ipcbuf.h28
-rw-r--r--include/asm-mips/msgbuf.h27
-rw-r--r--include/asm-mips/offset.h48
-rw-r--r--include/asm-mips/pci.h5
-rw-r--r--include/asm-mips/posix_types.h9
-rw-r--r--include/asm-mips/sembuf.h22
-rw-r--r--include/asm-mips/shmbuf.h38
-rw-r--r--include/asm-mips/string.h27
-rw-r--r--include/asm-mips64/checksum.h20
-rw-r--r--include/asm-mips64/ipcbuf.h28
-rw-r--r--include/asm-mips64/msgbuf.h27
-rw-r--r--include/asm-mips64/offset.h48
-rw-r--r--include/asm-mips64/pci.h5
-rw-r--r--include/asm-mips64/posix_types.h9
-rw-r--r--include/asm-mips64/sembuf.h22
-rw-r--r--include/asm-mips64/shmbuf.h38
-rw-r--r--include/asm-ppc/board.h6
-rw-r--r--include/asm-ppc/hw_irq.h2
-rw-r--r--include/asm-ppc/io.h2
-rw-r--r--include/asm-ppc/ipcbuf.h11
-rw-r--r--include/asm-ppc/irq.h116
-rw-r--r--include/asm-ppc/msgbuf.h26
-rw-r--r--include/asm-ppc/oak.h37
-rw-r--r--include/asm-ppc/pci.h3
-rw-r--r--include/asm-ppc/pgtable.h95
-rw-r--r--include/asm-ppc/posix_types.h7
-rw-r--r--include/asm-ppc/processor.h559
-rw-r--r--include/asm-ppc/sembuf.h20
-rw-r--r--include/asm-ppc/shmbuf.h37
-rw-r--r--include/asm-ppc/stat.h52
-rw-r--r--include/asm-sparc/a.out.h27
-rw-r--r--include/asm-sparc/asm_offsets.h404
-rw-r--r--include/asm-sparc/asmmacro.h3
-rw-r--r--include/asm-sparc/ipcbuf.h31
-rw-r--r--include/asm-sparc/msgbuf.h31
-rw-r--r--include/asm-sparc/page.h42
-rw-r--r--include/asm-sparc/pgalloc.h14
-rw-r--r--include/asm-sparc/posix_types.h12
-rw-r--r--include/asm-sparc/processor.h8
-rw-r--r--include/asm-sparc/sembuf.h25
-rw-r--r--include/asm-sparc/shmbuf.h42
-rw-r--r--include/asm-sparc/uaccess.h6
-rw-r--r--include/asm-sparc/unistd.h47
-rw-r--r--include/asm-sparc64/asm_offsets.h504
-rw-r--r--include/asm-sparc64/floppy.h19
-rw-r--r--include/asm-sparc64/ipcbuf.h28
-rw-r--r--include/asm-sparc64/msgbuf.h27
-rw-r--r--include/asm-sparc64/ns87303.h42
-rw-r--r--include/asm-sparc64/parport.h46
-rw-r--r--include/asm-sparc64/pci.h3
-rw-r--r--include/asm-sparc64/posix_types.h7
-rw-r--r--include/asm-sparc64/sembuf.h22
-rw-r--r--include/asm-sparc64/shmbuf.h38
-rw-r--r--include/asm-sparc64/unistd.h44
-rw-r--r--include/linux/acpi.h30
-rw-r--r--include/linux/blkdev.h3
-rw-r--r--include/linux/byteorder/generic.h16
-rw-r--r--include/linux/capability.h4
-rw-r--r--include/linux/cyclades.h6
-rw-r--r--include/linux/cyclomx.h12
-rw-r--r--include/linux/cycx_cfm.h25
-rw-r--r--include/linux/cycx_drv.h3
-rw-r--r--include/linux/cycx_x25.h7
-rw-r--r--include/linux/elf.h4
-rw-r--r--include/linux/elfcore.h4
-rw-r--r--include/linux/ext2_fs.h13
-rw-r--r--include/linux/ext2_fs_sb.h4
-rw-r--r--include/linux/fb.h24
-rw-r--r--include/linux/fs.h21
-rw-r--r--include/linux/genhd.h2
-rw-r--r--include/linux/hdreg.h95
-rw-r--r--include/linux/hfs_fs.h13
-rw-r--r--include/linux/highuid.h115
-rw-r--r--include/linux/i2o.h54
-rw-r--r--include/linux/ide.h25
-rw-r--r--include/linux/init.h18
-rw-r--r--include/linux/input.h17
-rw-r--r--include/linux/ipc.h25
-rw-r--r--include/linux/isapnp.h40
-rw-r--r--include/linux/kbd_kern.h2
-rw-r--r--include/linux/major.h4
-rw-r--r--include/linux/mm.h42
-rw-r--r--include/linux/module.h5
-rw-r--r--include/linux/msg.h4
-rw-r--r--include/linux/ncp_fs.h28
-rw-r--r--include/linux/ncp_fs_sb.h2
-rw-r--r--include/linux/ncp_mount.h46
-rw-r--r--include/linux/ntfs_fs_i.h4
-rw-r--r--include/linux/pci.h66
-rw-r--r--include/linux/pci_ids.h12
-rw-r--r--include/linux/posix_types.h10
-rw-r--r--include/linux/proc_fs.h6
-rw-r--r--include/linux/qnx4_fs.h62
-rw-r--r--include/linux/qnx4_fs_i.h42
-rw-r--r--include/linux/qnx4_fs_sb.h12
-rw-r--r--include/linux/qnxtypes.h25
-rw-r--r--include/linux/sched.h41
-rw-r--r--include/linux/sem.h19
-rw-r--r--include/linux/shm.h9
-rw-r--r--include/linux/smb_fs.h5
-rw-r--r--include/linux/smp.h2
-rw-r--r--include/linux/spinlock.h2
-rw-r--r--include/linux/stddef.h4
-rw-r--r--include/linux/string.h5
-rw-r--r--include/linux/sysctl.h10
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/types.h23
-rw-r--r--include/linux/ufs_fs_i.h4
-rw-r--r--include/linux/umsdos_fs.h12
-rw-r--r--include/linux/usbdev_fs_i.h11
-rw-r--r--include/linux/usbdev_fs_sb.h10
-rw-r--r--include/net/dn.h7
-rw-r--r--include/net/dn_dev.h85
-rw-r--r--include/net/dn_fib.h214
-rw-r--r--include/net/dn_nsp.h146
-rw-r--r--include/net/dn_route.h23
-rw-r--r--include/net/icmp.h5
-rw-r--r--include/net/if_inet6.h54
-rw-r--r--include/net/ip.h11
-rw-r--r--include/net/ipv6.h17
-rw-r--r--include/net/pkt_sched.h1
-rw-r--r--include/net/snmp.h13
-rw-r--r--include/net/sock.h17
-rw-r--r--include/net/tcp.h10
-rw-r--r--include/net/udp.h5
-rw-r--r--include/pcmcia/cisreg.h23
-rw-r--r--include/pcmcia/cistpl.h6
-rw-r--r--include/pcmcia/cs.h3
-rw-r--r--include/pcmcia/cs_types.h6
-rw-r--r--include/pcmcia/version.h6
202 files changed, 5043 insertions, 2092 deletions
diff --git a/include/asm-alpha/core_cia.h b/include/asm-alpha/core_cia.h
index b549029d1..34b2f03b8 100644
--- a/include/asm-alpha/core_cia.h
+++ b/include/asm-alpha/core_cia.h
@@ -218,32 +218,12 @@
* Data structure for handling CIA machine checks.
*/
-/* EV5-specific info. */
-struct el_CIA_procdata {
- unsigned long shadow[8]; /* PALmode shadow registers */
- unsigned long paltemp[24]; /* PAL temporary registers */
- /* EV5-specific fields */
- unsigned long exc_addr; /* Address of excepting instruction. */
- unsigned long exc_sum; /* Summary of arithmetic traps. */
- unsigned long exc_mask; /* Exception mask (from exc_sum). */
- unsigned long exc_base; /* PALbase at time of exception. */
- unsigned long isr; /* Interrupt summary register. */
- unsigned long icsr; /* Ibox control register. */
- unsigned long ic_perr_stat;
- unsigned long dc_perr_stat;
- unsigned long va; /* Effective VA of fault or miss. */
- unsigned long mm_stat;
- unsigned long sc_addr;
- unsigned long sc_stat;
- unsigned long bc_tag_addr;
- unsigned long ei_addr;
- unsigned long fill_syn;
- unsigned long ei_stat;
- unsigned long ld_lock;
-};
-
/* System-specific info. */
struct el_CIA_sysdata_mcheck {
+#if 0
+ /* ??? Where did this come from. It appears to bear no
+ relation to the cia logout written in the milo sources.
+ Who knows what happens in the srm console... */
unsigned long coma_gcr;
unsigned long coma_edsr;
unsigned long coma_ter;
@@ -285,6 +265,19 @@ struct el_CIA_sysdata_mcheck {
unsigned long epic_data5;
unsigned long epic_data6;
unsigned long epic_data7;
+#else
+ unsigned long cpu_err0;
+ unsigned long cpu_err1;
+ unsigned long cia_err;
+ unsigned long cia_stat;
+ unsigned long err_mask;
+ unsigned long cia_syn;
+ unsigned long mem_err0;
+ unsigned long mem_err1;
+ unsigned long pci_err0;
+ unsigned long pci_err1;
+ unsigned long pci_err2;
+#endif
};
diff --git a/include/asm-alpha/core_pyxis.h b/include/asm-alpha/core_pyxis.h
index efdcd7d43..2850a949c 100644
--- a/include/asm-alpha/core_pyxis.h
+++ b/include/asm-alpha/core_pyxis.h
@@ -203,6 +203,10 @@
* Data structure for handling PYXIS machine checks:
*/
struct el_PYXIS_sysdata_mcheck {
+#if 0
+ /* ??? Where did this come from. It appears to bear no
+ relation to the pyxis logout written in the milo sources.
+ Who knows what happens in the srm console... */
u_long coma_gcr;
u_long coma_edsr;
u_long coma_ter;
@@ -244,6 +248,19 @@ struct el_PYXIS_sysdata_mcheck {
u_long epic_data5;
u_long epic_data6;
u_long epic_data7;
+#else
+ unsigned long cpu_err0;
+ unsigned long cpu_err1;
+ unsigned long cia_err;
+ unsigned long cia_stat;
+ unsigned long err_mask;
+ unsigned long cia_syn;
+ unsigned long mem_err0;
+ unsigned long mem_err1;
+ unsigned long pci_err0;
+ unsigned long pci_err1;
+ unsigned long pci_err2;
+#endif
};
diff --git a/include/asm-alpha/ipcbuf.h b/include/asm-alpha/ipcbuf.h
new file mode 100644
index 000000000..d9c0e1a50
--- /dev/null
+++ b/include/asm-alpha/ipcbuf.h
@@ -0,0 +1,28 @@
+#ifndef _ALPHA_IPCBUF_H
+#define _ALPHA_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit seq
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ __kernel_mode_t mode;
+ unsigned short seq;
+ unsigned short __pad1;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ALPHA_IPCBUF_H */
diff --git a/include/asm-alpha/msgbuf.h b/include/asm-alpha/msgbuf.h
new file mode 100644
index 000000000..98496501a
--- /dev/null
+++ b/include/asm-alpha/msgbuf.h
@@ -0,0 +1,27 @@
+#ifndef _ALPHA_MSGBUF_H
+#define _ALPHA_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ALPHA_MSGBUF_H */
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
index f78c9b975..cc4ecb4bb 100644
--- a/include/asm-alpha/pci.h
+++ b/include/asm-alpha/pci.h
@@ -1,6 +1,8 @@
#ifndef __ALPHA_PCI_H
#define __ALPHA_PCI_H
+#include <asm/machvec.h>
+
/*
* The following structure is used to manage multiple PCI busses.
*/
@@ -27,5 +29,8 @@ struct pci_controler {
#define pcibios_assign_all_busses() 1
+#define PCIBIOS_MIN_IO alpha_mv.min_io_address
+#define PCIBIOS_MIN_MEM alpha_mv.min_mem_address
+
#endif /* __ALPHA_PCI_H */
diff --git a/include/asm-alpha/posix_types.h b/include/asm-alpha/posix_types.h
index 357a44704..01a1021a6 100644
--- a/include/asm-alpha/posix_types.h
+++ b/include/asm-alpha/posix_types.h
@@ -26,11 +26,18 @@ typedef long __kernel_clock_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
typedef struct {
int val[2];
} __kernel_fsid_t;
+typedef __kernel_uid_t __kernel_old_uid_t;
+typedef __kernel_gid_t __kernel_old_gid_t;
+typedef __kernel_uid_t __kernel_uid32_t;
+typedef __kernel_gid_t __kernel_gid32_t;
+
#ifdef __KERNEL__
#ifndef __GNUC__
diff --git a/include/asm-alpha/sembuf.h b/include/asm-alpha/sembuf.h
new file mode 100644
index 000000000..7b38b1534
--- /dev/null
+++ b/include/asm-alpha/sembuf.h
@@ -0,0 +1,22 @@
+#ifndef _ALPHA_SEMBUF_H
+#define _ALPHA_SEMBUF_H
+
+/*
+ * The semid64_ds structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ALPHA_SEMBUF_H */
diff --git a/include/asm-alpha/shmbuf.h b/include/asm-alpha/shmbuf.h
new file mode 100644
index 000000000..37ee84f05
--- /dev/null
+++ b/include/asm-alpha/shmbuf.h
@@ -0,0 +1,38 @@
+#ifndef _ALPHA_SHMBUF_H
+#define _ALPHA_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ __kernel_time_t shm_dtime; /* last detach time */
+ __kernel_time_t shm_ctime; /* last change time */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _ALPHA_SHMBUF_H */
diff --git a/include/asm-arm/arch-arc/serial.h b/include/asm-arm/arch-arc/serial.h
index c068ac62f..16d5bd73b 100644
--- a/include/asm-arm/arch-arc/serial.h
+++ b/include/asm-arm/arch-arc/serial.h
@@ -28,13 +28,13 @@
#if defined(CONFIG_ARCH_A5K)
/* UART CLK PORT IRQ FLAGS */
-#define STD_SERIAL_PORT_DEFNS
+#define STD_SERIAL_PORT_DEFNS \
{ 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \
{ 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */
#else
-#define STD_SERIAL_PORT_DEFNS
+#define STD_SERIAL_PORT_DEFNS \
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */
diff --git a/include/asm-arm/arch-arc/system.h b/include/asm-arm/arch-arc/system.h
index e88114616..7f204b1f5 100644
--- a/include/asm-arm/arch-arc/system.h
+++ b/include/asm-arm/arch-arc/system.h
@@ -20,7 +20,8 @@
#endif
-#define arch_do_idle() do { } while (0)
+#define arch_do_idle() do { } while (0)
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
diff --git a/include/asm-arm/arch-cl7500/system.h b/include/asm-arm/arch-cl7500/system.h
index 767730a4c..201c5c305 100644
--- a/include/asm-arm/arch-cl7500/system.h
+++ b/include/asm-arm/arch-cl7500/system.h
@@ -24,4 +24,6 @@
#define arch_do_idle() \
outb(0, IOMD_SUSMODE)
+#define arch_power_off() do { } while (0)
+
#endif
diff --git a/include/asm-arm/arch-ebsa110/system.h b/include/asm-arm/arch-ebsa110/system.h
index 05e2be707..39f4c84a4 100644
--- a/include/asm-arm/arch-ebsa110/system.h
+++ b/include/asm-arm/arch-ebsa110/system.h
@@ -7,6 +7,7 @@
#define __ASM_ARCH_SYSTEM_H
#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
diff --git a/include/asm-arm/arch-ebsa285/io.h b/include/asm-arm/arch-ebsa285/io.h
index 7861f8470..877625fa8 100644
--- a/include/asm-arm/arch-ebsa285/io.h
+++ b/include/asm-arm/arch-ebsa285/io.h
@@ -16,7 +16,7 @@
* Translation of various region addresses to virtual addresses
*/
#define __io_pci(a) (PCIO_BASE + (a))
-#if 0
+#if 1
#define __mem_pci(a) ((unsigned long)(a))
#define __mem_isa(a) (PCIMEM_BASE + (unsigned long)(a))
#else
@@ -91,7 +91,7 @@ extern __inline__ void __arch_putw(unsigned int value, unsigned long a)
#define __arch_ioremap(off,size,nocache) \
({ \
unsigned long _off = (off), _size = (size); \
- void *_ret = NULL; \
+ void *_ret = (void *)0; \
if (valid_ioaddr(_off, _size)) \
_ret = __ioremap(io_to_phys(_off), _size, 0); \
_ret; \
diff --git a/include/asm-arm/arch-ebsa285/irq.h b/include/asm-arm/arch-ebsa285/irq.h
index 195aad743..3a4faaf24 100644
--- a/include/asm-arm/arch-ebsa285/irq.h
+++ b/include/asm-arm/arch-ebsa285/irq.h
@@ -44,8 +44,19 @@ static int isa_irq = -1;
static inline int fixup_irq(unsigned int irq)
{
#ifdef CONFIG_HOST_FOOTBRIDGE
- if (irq == isa_irq)
+ if (irq == isa_irq) {
irq = *(unsigned char *)PCIIACK_BASE;
+
+ /*
+ * The NetWinder appears to randomly give wrong interrupt
+ * numbers from time to time. When it does, map them to
+ * the unused IRQ 13
+ */
+ if (irq >= NR_IRQS) {
+ printk(KERN_ERR "Strange interrupt %d?\n", irq);
+ irq = _ISA_IRQ(13);
+ }
+ }
#endif
return irq;
diff --git a/include/asm-arm/arch-ebsa285/system.h b/include/asm-arm/arch-ebsa285/system.h
index ee7573804..ace6afbd6 100644
--- a/include/asm-arm/arch-ebsa285/system.h
+++ b/include/asm-arm/arch-ebsa285/system.h
@@ -9,6 +9,7 @@
#include <asm/leds.h>
#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
diff --git a/include/asm-arm/arch-nexuspci/system.h b/include/asm-arm/arch-nexuspci/system.h
index c1605d3fa..2f8fc9eac 100644
--- a/include/asm-arm/arch-nexuspci/system.h
+++ b/include/asm-arm/arch-nexuspci/system.h
@@ -8,5 +8,6 @@
#define arch_do_idle() do { } while (0)
#define arch_reset(mode) do { } while (0)
+#define arch_power_off() do { } while (0)
#endif
diff --git a/include/asm-arm/arch-rpc/system.h b/include/asm-arm/arch-rpc/system.h
index c40aadcad..c5100fd1a 100644
--- a/include/asm-arm/arch-rpc/system.h
+++ b/include/asm-arm/arch-rpc/system.h
@@ -7,7 +7,8 @@
#include <asm/iomd.h>
#include <asm/io.h>
-#define arch_do_idle() cpu_do_idle()
+#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h
index 407641aa9..86358d96b 100644
--- a/include/asm-arm/arch-sa1100/hardware.h
+++ b/include/asm-arm/arch-sa1100/hardware.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-brutus/hardware.h
*
- * Copyright (C) 1998 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (C) 1998 Nicolas Pitre <nico@cam.org>
*
* This file contains the hardware definitions for SA1100 architecture
*/
@@ -12,7 +12,7 @@
/* Flushing areas */
#define FLUSH_BASE_PHYS 0xe0000000 /* SA1100 zero bank */
#define FLUSH_BASE 0xdf000000
-#define FLUSH_BASE_MINICACHE 0xde000000
+#define FLUSH_BASE_MINICACHE 0xdf800000
/*
* PCMCIA IO is mapped to 0xe0000000. We are likely to use in*()/out*()
diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h
new file mode 100644
index 000000000..3a1f00e3d
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/ide.h
@@ -0,0 +1,98 @@
+/*
+ * linux/include/asm-arm/arch-sa1100/ide.h
+ *
+ * Copyright (c) 1998 Hugo Fiennes & Nicolas Pitre
+ *
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_BLK_DEV_IDE
+
+#include <asm/irq.h>
+#include <asm/arch/hardware.h>
+
+/*
+ * Set up a hw structure for a specified data port, control port and IRQ.
+ * This should follow whatever the default interface uses.
+ */
+static __inline__ void
+ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq)
+{
+ ide_ioreg_t reg;
+ int i;
+
+ memset(hw, 0, sizeof(*hw));
+
+#ifdef CONFIG_SA1100_EMPEG
+/* The Empeg board has the first two address lines unused */
+#define IO_SHIFT 2
+#else
+#define IO_SHIFT 0
+#endif
+
+ reg = (ide_ioreg_t) (data_port << IO_SHIFT);
+ for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
+ hw->io_ports[i] = reg;
+ reg += (1 << IO_SHIFT);
+ }
+ hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) (ctrl_port << IO_SHIFT);
+ hw->irq = irq;
+}
+
+/*
+ * This registers the standard ports for this architecture with the IDE
+ * driver.
+ */
+static __inline__ void
+ide_init_default_hwifs(void)
+{
+ hw_regs_t hw;
+
+#if defined( CONFIG_SA1100_EMPEG )
+ /* First, do the SA1100 setup */
+
+ /* PCMCIA IO space */
+ MECR=0x21062106;
+
+ /* Issue 3 is much neater than issue 2 */
+ GPDR&=~(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+
+ /* Interrupts on rising edge: lines are inverted before they get to
+ the SA */
+ GRER&=~(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+ GFER|=(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+
+ /* Take hard drives out of reset */
+ GPSR=(EMPEG_IDERESET);
+
+ /* Clear GEDR */
+ GEDR=0xffffffff;
+
+ /* Sonja and her successors have two IDE ports. */
+ /* MAC 23/4/1999, swap these round so that the left hand
+ hard disk is hda when viewed from the front. This
+ doesn't match the silkscreen however. */
+ ide_init_hwif_ports(&hw,0x10,0x1e,EMPEG_IRQ_IDE2);
+ ide_register_hw(&hw, NULL);
+ ide_init_hwif_ports(&hw,0x00,0x0e,EMPEG_IRQ_IDE1);
+ ide_register_hw(&hw, NULL);
+
+#elif defined( CONFIG_SA1100_VICTOR )
+ /* Enable appropriate GPIOs as interrupt lines */
+ GPDR &= ~GPIO_GPIO7;
+ GRER |= GPIO_GPIO7;
+ GFER &= ~GPIO_GPIO7;
+ GEDR = GPIO_GPIO7;
+ /* set the pcmcia interface timing */
+ MECR = 0x00060006;
+
+ ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_GPIO7);
+ ide_register_hw(&hw, NULL);
+#else
+#error Missing IDE interface definition in include/asm/arch/ide.h
+#endif
+}
+
+#endif
+
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h
index 884157c86..4c2126208 100644
--- a/include/asm-arm/arch-sa1100/memory.h
+++ b/include/asm-arm/arch-sa1100/memory.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-sa1100/memory.h
*
- * Copyright (c) 1999 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
*/
#ifndef __ASM_ARCH_MEMORY_H
@@ -12,23 +12,27 @@
* Task size: 3GB
*/
#define TASK_SIZE (0xc0000000UL)
+#define TASK_SIZE_26 (0x04000000UL)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
-#define PHYS_OFFSET (0x00000000UL)
+
+/*
+ * Physical DRAM offset is 0xc0000000 on the SA1100
+ */
+#define PHYS_OFFSET (0xc0000000UL)
+
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
/*
* The following gives a maximum memory size of 128MB (32MB in each bank).
- *
- * Does this still need to be optimised for one bank machines?
*/
-#define __virt_to_phys(x) (((x) & 0xe0ffffff) | ((x) & 0x06000000) << 2)
-#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x30000000) >> 2)
+#define __virt_to_phys(x) (((x) & 0xf9ffffff) | ((x) & 0x06000000) << 2)
+#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x18000000) >> 2)
/*
* Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-sa1100/param.h b/include/asm-arm/arch-sa1100/param.h
index 3444dc74c..f0ea52b17 100644
--- a/include/asm-arm/arch-sa1100/param.h
+++ b/include/asm-arm/arch-sa1100/param.h
@@ -1,3 +1,3 @@
/*
- * linux/include/asm-arm/arch-ebsa110/param.h
+ * linux/include/asm-arm/arch-sa1100/param.h
*/
diff --git a/include/asm-arm/arch-sa1100/serial.h b/include/asm-arm/arch-sa1100/serial.h
index f57de7f4a..83db935a5 100644
--- a/include/asm-arm/arch-sa1100/serial.h
+++ b/include/asm-arm/arch-sa1100/serial.h
@@ -1,6 +1,6 @@
/*
* include/asm-arm/arch-sa1100/serial.h
- * (C) 1999 Nicolas Pitre <nico@visuaide.com>
+ * (C) 1999 Nicolas Pitre <nico@cam.org>
*
* All this is intended to be used with a 16550-like UART on the SA1100's
* PCMCIA bus. It has nothing to do with the SA1100's internal serial ports.
diff --git a/include/asm-arm/arch-sa1100/system.h b/include/asm-arm/arch-sa1100/system.h
index 24072c298..49b4bdca2 100644
--- a/include/asm-arm/arch-sa1100/system.h
+++ b/include/asm-arm/arch-sa1100/system.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-sa1100/system.h
*
- * Copyright (c) 1999 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
*/
#include <linux/config.h>
@@ -25,6 +25,9 @@
#endif
+#if 0
+#define arch_do_idle() cpu_do_idle()
+#else
/* Enter SA1100 idle mode (see data sheet sec 9.5).
* It seems that the wait-on-interrupt just hang the CPU forever if it's
* on the end of a cache line. Workaround: we force an explicit alignment
@@ -41,3 +44,7 @@
" mcr p15, 0, %0, c15, c1, 2 @ Reenable clock switching \n" \
: : "r" (&ICIP) : "cc" ); \
} while (0)
+#endif
+
+#define arch_power_off() do { } while (0)
+
diff --git a/include/asm-arm/arch-sa1100/uncompress.h b/include/asm-arm/arch-sa1100/uncompress.h
new file mode 100644
index 000000000..ffdad2180
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/uncompress.h
@@ -0,0 +1,52 @@
+/*
+ * linux/include/asm-arm/arch-brutus/uncompress.h
+ *
+ * (C) 1999 Nicolas Pitre <nico@cam.org>
+ */
+
+#include <linux/config.h>
+
+#if defined(CONFIG_SA1100_EMPEG) || \
+ defined(CONFIG_SA1100_VICTOR) || \
+ defined(CONFIG_SA1100_LART)
+
+#include "hardware.h"
+#include "serial_reg.h"
+
+static volatile unsigned long* serial_port = (unsigned long*)_Ser3UTCR0;
+
+/*
+ * The following code assumes the serial port has already been
+ * initialized by the bootloader or such...
+ */
+
+static void puts( const char *s )
+{
+ int i;
+
+ for (i = 0; *s; i++, s++) {
+ /* wait for space in the UART's transmiter */
+ while( !(serial_port[UTSR1] & UTSR1_TNF) );
+
+ /* send the character out. */
+ serial_port[UART_TX] = *s;
+
+ /* if a LF, also do CR... */
+ if (*s == 10) {
+ while( !(serial_port[UTSR1] & UTSR1_TNF) );
+ serial_port[UART_TX] = 13;
+ }
+ }
+}
+
+#else
+
+#define puts( x )
+
+#endif
+
+
+/* Nothing to do for these */
+#define arch_decomp_setup()
+#define arch_decomp_wdog()
+
diff --git a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h
index b827c490c..5e1fb8792 100644
--- a/include/asm-arm/checksum.h
+++ b/include/asm-arm/checksum.h
@@ -4,7 +4,7 @@
* IP checksum routines
*
* Copyright (C) Original authors of ../asm-i386/checksum.h
- * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1996-1999 Russell King
*/
#ifndef __ASM_ARM_CHECKSUM_H
#define __ASM_ARM_CHECKSUM_H
@@ -37,37 +37,25 @@ csum_partial_copy_nocheck(const char *src, char *dst, int len, int sum);
unsigned int
csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr);
-#if 0
-/*
- * This combination is currently not used, but possible:
- */
-unsigned int
-csum_partial_copy_to_user(const char *src, char *dst, int len, int sum, int *err_ptr);
-#endif
-
/*
* These are the old (and unsafe) way of doing checksums, a warning message will be
* printed if they are used and an exception occurs.
*
* these functions should go away after some time.
*/
-#define csum_partial_copy_fromuser csum_partial_copy
-unsigned int
-csum_partial_copy(const char *src, char *dst, int len, int sum);
+#define csum_partial_copy(src,dst,len,sum) csum_partial_copy_nocheck(src,dst,len,sum)
/*
* This is a version of ip_compute_csum() optimized for IP headers,
* which always checksum on 4 octet boundaries.
- *
- * Converted and optimised for ARM by R. M. King.
*/
static inline unsigned short
ip_fast_csum(unsigned char * iph, unsigned int ihl)
{
unsigned int sum, tmp1;
- __asm__ __volatile__(
- "sub %2, %2, #5 @ ip_fast_csum
+ __asm__ __volatile__(
+ "sub %2, %2, #5 @ ip_fast_csum
ldr %0, [%1], #4
ldr %3, [%1], #4
adds %0, %0, %3
@@ -86,10 +74,10 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl)
mvn %0, %0
mov %0, %0, lsr #16
"
- : "=&r" (sum), "=&r" (iph), "=&r" (ihl), "=&r" (tmp1)
+ : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1)
: "1" (iph), "2" (ihl)
: "cc");
- return(sum);
+ return sum;
}
/*
@@ -130,7 +118,17 @@ static inline unsigned short int
csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
unsigned int proto, unsigned int sum)
{
- return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
+ __asm__(
+ "adds %0, %1, %2 @ csum_tcpudp_magic
+ adcs %0, %0, %3
+ adcs %0, %0, %4
+ adcs %0, %0, %5
+ adds %0, %0, %0, lsl #16
+ addcs %0, %0, #0x10000"
+ : "=&r"(sum)
+ : "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len) << 16), "Ir" (proto << 8)
+ : "cc");
+ return (~sum) >> 16;
}
diff --git a/include/asm-arm/div64.h b/include/asm-arm/div64.h
index fc473b6f0..27fec4ee6 100644
--- a/include/asm-arm/div64.h
+++ b/include/asm-arm/div64.h
@@ -1,32 +1,13 @@
#ifndef __ASM_ARM_DIV64
#define __ASM_ARM_DIV64
-/*
- * unsigned long long division. Yuck Yuck! What is Linux coming to?
- * This is 100% disgusting
- */
-#define do_div(n,base) \
-({ \
- unsigned long __low, __low2, __high, __rem; \
- __low = (n) & 0xffffffff; \
- __high = (n) >> 32; \
- if (__high) { \
- __rem = __high % (unsigned long)base; \
- __high = __high / (unsigned long)base; \
- __low2 = __low >> 16; \
- __low2 += __rem << 16; \
- __rem = __low2 % (unsigned long)base; \
- __low2 = __low2 / (unsigned long)base; \
- __low = __low & 0xffff; \
- __low += __rem << 16; \
- __rem = __low % (unsigned long)base; \
- __low = __low / (unsigned long)base; \
- n = __low + (__low2 << 16) + (__high << 32); \
- } else { \
- __rem = __low % (unsigned long)base; \
- n = (__low / (unsigned long)base); \
- } \
- __rem; \
+/* We're not 64-bit, but... */
+#define do_div(n,base) \
+({ \
+ int __res; \
+ __res = ((unsigned long)n) % (unsigned int)base; \
+ n = ((unsigned long)n) / (unsigned int)base; \
+ __res; \
})
#endif
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 96dc9883d..7e2192902 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -42,10 +42,6 @@ extern void insl(unsigned int port, void *from, int len);
#ifdef __KERNEL__
-#ifndef NULL
-#define NULL ((void *) 0)
-#endif
-
#include <asm/arch/memory.h>
extern __inline__ unsigned long virt_to_phys(volatile void *x)
@@ -86,6 +82,14 @@ extern void _memcpy_fromio(void *, unsigned long, unsigned long);
extern void _memcpy_toio(unsigned long, const void *, unsigned long);
extern void _memset_io(unsigned long, int, unsigned long);
+#define __raw_writeb(val,addr) __arch_putb(val,addr)
+#define __raw_writew(val,addr) __arch_putw(val,addr)
+#define __raw_writel(val,addr) __arch_putl(val,addr)
+
+#define __raw_readb(addr) __arch_getb(addr)
+#define __raw_readw(addr) __arch_getw(addr)
+#define __raw_readl(addr) __arch_getl(addr)
+
/*
* If this architecture has PCI memory IO, then define the read/write
* macros.
@@ -151,11 +155,11 @@ out:
#define isa_writew(val,addr) __arch_putw(val,__mem_isa(addr))
#define isa_writel(val,addr) __arch_putl(val,__mem_isa(addr))
#define isa_memset_io(a,b,c) _memset_io(__mem_isa(a),(b),(c))
-#define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa((b)),(c))
+#define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa(b),(c))
#define isa_memcpy_toio(a,b,c) _memcpy_toio(__mem_isa((a)),(b),(c))
#define isa_eth_io_copy_and_sum(a,b,c,d) \
- eth_copy_and_sum((a),__mem_isa((b),(c),(d))
+ eth_copy_and_sum((a),__mem_isa(b),(c),(d))
static inline int
isa_check_signature(unsigned long io_addr, const unsigned char *signature,
diff --git a/include/asm-arm/iomd.h b/include/asm-arm/iomd.h
index 299b4c5a0..9726cd55d 100644
--- a/include/asm-arm/iomd.h
+++ b/include/asm-arm/iomd.h
@@ -11,7 +11,7 @@
#define IOMD_KARTRX __IOMD(0x004)
#define IOMD_KCTRL __IOMD(0x008)
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_IOLINES __IOMD(0x00C)
#endif
@@ -20,6 +20,10 @@
#define IOMD_IRQCLRA __IOMD(0x014)
#define IOMD_IRQMASKA __IOMD(0x018)
+#ifdef CONFIG_ARCH_CLPS7500
+#define IOMD_SUSMODE __IOMD(0x01C)
+#endif
+
#define IOMD_IRQSTATB __IOMD(0x020)
#define IOMD_IRQREQB __IOMD(0x024)
#define IOMD_IRQMASKB __IOMD(0x028)
@@ -28,6 +32,10 @@
#define IOMD_FIQREQ __IOMD(0x034)
#define IOMD_FIQMASK __IOMD(0x038)
+#ifdef CONFIG_ARCH_CLPS7500
+#define IOMD_CLKCTL __IOMD(0x03C)
+#endif
+
#define IOMD_T0CNTL __IOMD(0x040)
#define IOMD_T0LTCHL __IOMD(0x040)
#define IOMD_T0CNTH __IOMD(0x044)
@@ -42,7 +50,7 @@
#define IOMD_T1GO __IOMD(0x058)
#define IOMD_T1LATCH __IOMD(0x05c)
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_IRQSTATC __IOMD(0x060)
#define IOMD_IRQREQC __IOMD(0x064)
#define IOMD_IRQMASKC __IOMD(0x068)
@@ -59,7 +67,7 @@
#ifdef CONFIG_ARCH_RPC
#define IOMD_DRAMCR __IOMD(0x088)
#endif
-#define IOMD_VREFCR __IOMD(0x08C)
+#define IOMD_REFCR __IOMD(0x08C)
#define IOMD_FSIZE __IOMD(0x090)
#define IOMD_ID0 __IOMD(0x094)
@@ -71,7 +79,7 @@
#define IOMD_MOUSEY __IOMD(0x0A4)
#endif
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_MSEDAT __IOMD(0x0A8)
#define IOMD_MSECTL __IOMD(0x0Ac)
#endif
@@ -84,7 +92,7 @@
#ifdef CONFIG_ARCH_RPC
#define IOMD_DMAEXT __IOMD(0x0CC)
#endif
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_ASTCR __IOMD(0x0CC)
#define IOMD_DRAMCR __IOMD(0x0D0)
#define IOMD_SELFREF __IOMD(0x0D4)
diff --git a/include/asm-arm/ipcbuf.h b/include/asm-arm/ipcbuf.h
new file mode 100644
index 000000000..97683975f
--- /dev/null
+++ b/include/asm-arm/ipcbuf.h
@@ -0,0 +1,29 @@
+#ifndef __ASMARM_IPCBUF_H
+#define __ASMARM_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for arm architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_uid32_t cuid;
+ __kernel_gid32_t cgid;
+ __kernel_mode_t mode;
+ unsigned short __pad1;
+ unsigned short seq;
+ unsigned short __pad2;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* __ASMARM_IPCBUF_H */
diff --git a/include/asm-arm/msgbuf.h b/include/asm-arm/msgbuf.h
new file mode 100644
index 000000000..33b35b946
--- /dev/null
+++ b/include/asm-arm/msgbuf.h
@@ -0,0 +1,31 @@
+#ifndef _ASMARM_MSGBUF_H
+#define _ASMARM_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for arm architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ unsigned long __unused1;
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ unsigned long __unused2;
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long __unused3;
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+#endif /* _ASMARM_MSGBUF_H */
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index 7ea5157ec..f46fadbb8 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -69,9 +69,9 @@ extern void __bug(const char *file, int line, void *data);
#include <asm/arch/memory.h>
-#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
-#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT)
+#define __pa(x) __virt_to_phys((unsigned long)(x))
+#define __va(x) ((void *)__phys_to_virt((unsigned long)(x)))
+#define MAP_NR(addr) ((__pa(addr) - PHYS_OFFSET) >> PAGE_SHIFT)
#endif
diff --git a/include/asm-arm/posix_types.h b/include/asm-arm/posix_types.h
index 102be60df..8ad590dd4 100644
--- a/include/asm-arm/posix_types.h
+++ b/include/asm-arm/posix_types.h
@@ -32,6 +32,13 @@ typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
diff --git a/include/asm-arm/proc-armv/uncompress.h b/include/asm-arm/proc-armv/uncompress.h
index acce2de35..e67566d5d 100644
--- a/include/asm-arm/proc-armv/uncompress.h
+++ b/include/asm-arm/proc-armv/uncompress.h
@@ -11,7 +11,7 @@ static inline void proc_decomp_setup (void)
eor r0, r0, #0x44 << 24
eor r0, r0, #0x01 << 16
eor r0, r0, #0xA1 << 8
- movs r0, r0, lsr #4
+ movs r0, r0, lsr #5
mcreq p15, 0, r0, c7, c5, 0 @ flush I cache
mrceq p15, 0, r0, c1, c0
orreq r0, r0, #1 << 12
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
index 6bbe53e7c..703f653b8 100644
--- a/include/asm-arm/proc-fns.h
+++ b/include/asm-arm/proc-fns.h
@@ -47,6 +47,14 @@
# define CPU_NAME sa110
# endif
# endif
+# ifdef CONFIG_CPU_SA1100
+# ifdef CPU_NAME
+# undef MULTI_CPU
+# define MULTI_CPU
+# else
+# define CPU_NAME sa1100
+# endif
+# endif
#endif
#ifndef MULTI_CPU
diff --git a/include/asm-arm/sembuf.h b/include/asm-arm/sembuf.h
new file mode 100644
index 000000000..1c0283954
--- /dev/null
+++ b/include/asm-arm/sembuf.h
@@ -0,0 +1,25 @@
+#ifndef _ASMARM_SEMBUF_H
+#define _ASMARM_SEMBUF_H
+
+/*
+ * The semid64_ds structure for arm architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ unsigned long __unused1;
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long __unused2;
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _ASMARM_SEMBUF_H */
diff --git a/include/asm-arm/shmbuf.h b/include/asm-arm/shmbuf.h
new file mode 100644
index 000000000..2e5c67ba1
--- /dev/null
+++ b/include/asm-arm/shmbuf.h
@@ -0,0 +1,42 @@
+#ifndef _ASMARM_SHMBUF_H
+#define _ASMARM_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for arm architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ unsigned long __unused1;
+ __kernel_time_t shm_dtime; /* last detach time */
+ unsigned long __unused2;
+ __kernel_time_t shm_ctime; /* last change time */
+ unsigned long __unused3;
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _ASMARM_SHMBUF_H */
diff --git a/include/asm-arm/sigcontext.h b/include/asm-arm/sigcontext.h
index 6ce49457f..fc0b80b6a 100644
--- a/include/asm-arm/sigcontext.h
+++ b/include/asm-arm/sigcontext.h
@@ -27,6 +27,7 @@ struct sigcontext {
unsigned long arm_lr;
unsigned long arm_pc;
unsigned long arm_cpsr;
+ unsigned long fault_address;
};
diff --git a/include/asm-arm/siginfo.h b/include/asm-arm/siginfo.h
index c08847d32..4ffd51452 100644
--- a/include/asm-arm/siginfo.h
+++ b/include/asm-arm/siginfo.h
@@ -24,7 +24,8 @@ typedef struct siginfo {
/* kill() */
struct {
pid_t _pid; /* sender's pid */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
+ uid_t _uid32; /* sender's uid */
} _kill;
/* POSIX.1b timers */
@@ -36,17 +37,19 @@ typedef struct siginfo {
/* POSIX.1b signals */
struct {
pid_t _pid; /* sender's pid */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
sigval_t _sigval;
+ uid_t _uid32; /* sender's uid */
} _rt;
/* SIGCHLD */
struct {
pid_t _pid; /* which child */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
int _status; /* exit code */
clock_t _utime;
clock_t _stime;
+ uid_t _uid32; /* sender's uid */
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
@@ -62,11 +65,18 @@ typedef struct siginfo {
} _sifields;
} siginfo_t;
+#define UID16_SIGINFO_COMPAT_NEEDED
+
/*
* How these fields are to be accessed.
*/
#define si_pid _sifields._kill._pid
+#ifdef __KERNEL__
+#define si_uid _sifields._kill._uid32
+#define si_uid16 _sifields._kill._uid
+#else
#define si_uid _sifields._kill._uid
+#endif /* __KERNEL__ */
#define si_status _sifields._sigchld._status
#define si_utime _sifields._sigchld._utime
#define si_stime _sifields._sigchld._stime
diff --git a/include/asm-arm/stat.h b/include/asm-arm/stat.h
index 970e0eb62..5346b0223 100644
--- a/include/asm-arm/stat.h
+++ b/include/asm-arm/stat.h
@@ -38,5 +38,40 @@ struct stat {
unsigned long __unused5;
};
-/* Someone please add a glibc/arm compatible stat64 struct here. */
+/* This matches struct stat64 in glibc2.1, hence the absolutely
+ * insane amounts of padding around dev_t's.
+ */
+struct stat64 {
+ unsigned short st_dev;
+ unsigned char __pad0[10];
+
+ unsigned long st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+
+ unsigned long st_uid;
+ unsigned long st_gid;
+
+ unsigned short st_rdev;
+ unsigned char __pad3[10];
+
+ long long st_size;
+ unsigned long st_blksize;
+
+ unsigned long st_blocks; /* Number 512-byte blocks allocated. */
+ unsigned long __pad4; /* future possible st_blocks high bits */
+
+ unsigned long st_atime;
+ unsigned long __pad5;
+
+ unsigned long st_mtime;
+ unsigned long __pad6;
+
+ unsigned long st_ctime;
+ unsigned long __pad7; /* will be high 32 bits of ctime someday */
+
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
#endif
diff --git a/include/asm-arm/string.h b/include/asm-arm/string.h
index 5d631341e..72b89fa70 100644
--- a/include/asm-arm/string.h
+++ b/include/asm-arm/string.h
@@ -19,7 +19,6 @@ extern char * strchr(const char * s, int c);
#define __HAVE_ARCH_MEMSET
extern void __memzero(void *ptr, __kernel_size_t n);
-extern void __memset(void *ptr, int v, __kernel_size_t n);
#define memset(p,v,n) \
({ \
@@ -27,7 +26,7 @@ extern void __memset(void *ptr, int v, __kernel_size_t n);
if (__builtin_constant_p((v)) && (v) == 0) \
__memzero((p),(n)); \
else \
- __memset((p),(v),(n)); \
+ memset((p),(v),(n)); \
} \
(p); \
})
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 8725ad806..9c9b95d8a 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -42,6 +42,7 @@ extern unsigned int __machine_arch_type;
#define MACH_TYPE_LACIE_NAS 13
#define MACH_TYPE_CLPS7500 14
#define MACH_TYPE_SHARK 15
+#define MACH_TYPE_SA1100 16
/*
* Sort out a definition for machine_arch_type
@@ -124,6 +125,18 @@ extern unsigned int __machine_arch_type;
# define machine_is_co285() (0)
#endif
+#ifdef CONFIG_ARCH_SA1100
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_SA1100
+# endif
+# define machine_is_sa1100() (machine_arch_type == MACH_TYPE_SA1100
+#else
+# define machine_is_sa1100() (0)
+#endif
+
#ifndef machine_arch_type
#define machine_arch_type __machine_arch_type
#endif
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index 7bfbf2349..ca6da3e13 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -7,7 +7,6 @@
* This file contains the system call numbers.
*/
-#define __NR_setup (__NR_SYSCALL_BASE+ 0) /* used only by init, to get system going */
#define __NR_exit (__NR_SYSCALL_BASE+ 1)
#define __NR_fork (__NR_SYSCALL_BASE+ 2)
#define __NR_read (__NR_SYSCALL_BASE+ 3)
@@ -25,7 +24,7 @@
#define __NR_chmod (__NR_SYSCALL_BASE+ 15)
#define __NR_lchown (__NR_SYSCALL_BASE+ 16)
#define __NR_break (__NR_SYSCALL_BASE+ 17)
-#define __NR_oldstat (__NR_SYSCALL_BASE+ 18)
+
#define __NR_lseek (__NR_SYSCALL_BASE+ 19)
#define __NR_getpid (__NR_SYSCALL_BASE+ 20)
#define __NR_mount (__NR_SYSCALL_BASE+ 21)
@@ -35,7 +34,7 @@
#define __NR_stime (__NR_SYSCALL_BASE+ 25)
#define __NR_ptrace (__NR_SYSCALL_BASE+ 26)
#define __NR_alarm (__NR_SYSCALL_BASE+ 27)
-#define __NR_oldfstat (__NR_SYSCALL_BASE+ 28)
+
#define __NR_pause (__NR_SYSCALL_BASE+ 29)
#define __NR_utime (__NR_SYSCALL_BASE+ 30)
#define __NR_stty (__NR_SYSCALL_BASE+ 31)
@@ -83,7 +82,7 @@
#define __NR_sigpending (__NR_SYSCALL_BASE+ 73)
#define __NR_sethostname (__NR_SYSCALL_BASE+ 74)
#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75)
-#define __NR_old_getrlimit (__NR_SYSCALL_BASE+ 76)
+#define __NR_old_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */
#define __NR_getrusage (__NR_SYSCALL_BASE+ 77)
#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78)
#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79)
@@ -91,7 +90,7 @@
#define __NR_setgroups (__NR_SYSCALL_BASE+ 81)
#define __NR_select (__NR_SYSCALL_BASE+ 82)
#define __NR_symlink (__NR_SYSCALL_BASE+ 83)
-#define __NR_oldlstat (__NR_SYSCALL_BASE+ 84)
+
#define __NR_readlink (__NR_SYSCALL_BASE+ 85)
#define __NR_uselib (__NR_SYSCALL_BASE+ 86)
#define __NR_swapon (__NR_SYSCALL_BASE+ 87)
@@ -198,13 +197,32 @@
/* 188 reserved */
/* 189 reserved */
#define __NR_vfork (__NR_SYSCALL_BASE+190)
-#define __NR_getrlimit (__NR_SYSCALL_BASE+191)
+#define __NR_getrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */
#define __NR_mmap2 (__NR_SYSCALL_BASE+192)
#define __NR_truncate64 (__NR_SYSCALL_BASE+193)
#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194)
#define __NR_stat64 (__NR_SYSCALL_BASE+195)
#define __NR_lstat64 (__NR_SYSCALL_BASE+196)
#define __NR_fstat64 (__NR_SYSCALL_BASE+197)
+#define __NR_lchown32 (__NR_SYSCALL_BASE+198)
+#define __NR_getuid32 (__NR_SYSCALL_BASE+199)
+#define __NR_getgid32 (__NR_SYSCALL_BASE+200)
+#define __NR_geteuid32 (__NR_SYSCALL_BASE+201)
+#define __NR_getegid32 (__NR_SYSCALL_BASE+202)
+#define __NR_setreuid32 (__NR_SYSCALL_BASE+203)
+#define __NR_setregid32 (__NR_SYSCALL_BASE+204)
+#define __NR_getgroups32 (__NR_SYSCALL_BASE+205)
+#define __NR_setgroups32 (__NR_SYSCALL_BASE+206)
+#define __NR_fchown32 (__NR_SYSCALL_BASE+207)
+#define __NR_setresuid32 (__NR_SYSCALL_BASE+208)
+#define __NR_getresuid32 (__NR_SYSCALL_BASE+209)
+#define __NR_setresgid32 (__NR_SYSCALL_BASE+210)
+#define __NR_getresgid32 (__NR_SYSCALL_BASE+211)
+#define __NR_chown32 (__NR_SYSCALL_BASE+212)
+#define __NR_setuid32 (__NR_SYSCALL_BASE+213)
+#define __NR_setgid32 (__NR_SYSCALL_BASE+214)
+#define __NR_setfsuid32 (__NR_SYSCALL_BASE+215)
+#define __NR_setfsgid32 (__NR_SYSCALL_BASE+216)
#define __sys2(x) #x
#define __sys1(x) __sys2(x)
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h
index 69fcbac3e..3c6e6aa4b 100644
--- a/include/asm-i386/apic.h
+++ b/include/asm-i386/apic.h
@@ -1,358 +1,65 @@
#ifndef __ASM_APIC_H
#define __ASM_APIC_H
-/*
- * Constants for various Intel APICs. (local APIC, IOAPIC, etc.)
- *
- * Alan Cox <Alan.Cox@linux.org>, 1995.
- */
-#define APIC_PHYS_BASE 0xfee00000 /* IA s/w dev Vol 3, Section 7.4 */
-
-#define APIC_ID 0x20
-#define GET_APIC_ID(x) (((x)>>24)&0x0F)
-#define APIC_LVR 0x30
-#define GET_APIC_VERSION(x) ((x)&0xFF)
-#define GET_APIC_MAXLVT(x) (((x)>>16)&0x0F)
-#define APIC_INTEGRATED(x) ((x)&0xF0)
-#define APIC_TASKPRI 0x80
-#define APIC_TPRI_MASK 0xFF
-#define APIC_ARBPRI 0x90
-#define APIC_ARBPRI_MASK 0xFF
-#define APIC_PROCPRI 0xA0
-#define APIC_EOI 0xB0
-#define APIC_EIO_ACK 0x0 /* Write this to the EOI register */
-#define APIC_RRR 0xC0
-#define APIC_LDR 0xD0
-#define APIC_LDR_MASK (0xFF<<24)
-#define GET_APIC_LOGICAL_ID(x) (((x)>>24)&0xFF)
-#define SET_APIC_LOGICAL_ID(x) (((x)<<24))
-#define APIC_ALL_CPUS 0xFF
-#define APIC_DFR 0xE0
-#define GET_APIC_DFR(x) (((x)>>28)&0x0F)
-#define SET_APIC_DFR(x) ((x)<<28)
-#define APIC_SPIV 0xF0
-#define APIC_ISR 0x100
-#define APIC_TMR 0x180
-#define APIC_IRR 0x200
-#define APIC_ESR 0x280
-#define APIC_ESR_SEND_CS 0x00001
-#define APIC_ESR_RECV_CS 0x00002
-#define APIC_ESR_SEND_ACC 0x00004
-#define APIC_ESR_RECV_ACC 0x00008
-#define APIC_ESR_SENDILL 0x00020
-#define APIC_ESR_RECVILL 0x00040
-#define APIC_ESR_ILLREGA 0x00080
-#define APIC_ICR 0x300
-#define APIC_DEST_SELF 0x40000
-#define APIC_DEST_ALLINC 0x80000
-#define APIC_DEST_ALLBUT 0xC0000
-#define APIC_DEST_RR_MASK 0x30000
-#define APIC_DEST_RR_INVALID 0x00000
-#define APIC_DEST_RR_INPROG 0x10000
-#define APIC_DEST_RR_VALID 0x20000
-#define APIC_DEST_LEVELTRIG 0x08000
-#define APIC_DEST_ASSERT 0x04000
-#define APIC_DEST_BUSY 0x01000
-#define APIC_DEST_LOGICAL 0x00800
-#define APIC_DEST_DM_FIXED 0x00000
-#define APIC_DEST_DM_LOWEST 0x00100
-#define APIC_DEST_DM_SMI 0x00200
-#define APIC_DEST_DM_REMRD 0x00300
-#define APIC_DEST_DM_NMI 0x00400
-#define APIC_DEST_DM_INIT 0x00500
-#define APIC_DEST_DM_STARTUP 0x00600
-#define APIC_DEST_VECTOR_MASK 0x000FF
-#define APIC_ICR2 0x310
-#define GET_APIC_DEST_FIELD(x) (((x)>>24)&0xFF)
-#define SET_APIC_DEST_FIELD(x) ((x)<<24)
-#define APIC_LVTT 0x320
-#define APIC_LVTPC 0x340
-#define APIC_LVT0 0x350
-#define APIC_LVT_TIMER_BASE_MASK (0x3<<18)
-#define GET_APIC_TIMER_BASE(x) (((x)>>18)&0x3)
-#define SET_APIC_TIMER_BASE(x) (((x)<<18))
-#define APIC_TIMER_BASE_CLKIN 0x0
-#define APIC_TIMER_BASE_TMBASE 0x1
-#define APIC_TIMER_BASE_DIV 0x2
-#define APIC_LVT_TIMER_PERIODIC (1<<17)
-#define APIC_LVT_MASKED (1<<16)
-#define APIC_LVT_LEVEL_TRIGGER (1<<15)
-#define APIC_LVT_REMOTE_IRR (1<<14)
-#define APIC_INPUT_POLARITY (1<<13)
-#define APIC_SEND_PENDING (1<<12)
-#define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7)
-#define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8))
-#define APIC_MODE_FIXED 0x0
-#define APIC_MODE_NMI 0x4
-#define APIC_MODE_EXINT 0x7
-#define APIC_LVT1 0x360
-#define APIC_LVTERR 0x370
-#define APIC_TMICT 0x380
-#define APIC_TMCCT 0x390
-#define APIC_TDCR 0x3E0
-#define APIC_TDR_DIV_TMBASE (1<<2)
-#define APIC_TDR_DIV_1 0xB
-#define APIC_TDR_DIV_2 0x0
-#define APIC_TDR_DIV_4 0x1
-#define APIC_TDR_DIV_8 0x2
-#define APIC_TDR_DIV_16 0x3
-#define APIC_TDR_DIV_32 0x8
-#define APIC_TDR_DIV_64 0x9
-#define APIC_TDR_DIV_128 0xA
+#include <linux/config.h>
+#include <asm/apicdef.h>
+
+#define APIC_DEBUG 1
-#define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
+#ifdef CONFIG_X86_LOCAL_APIC
-#define MAX_IO_APICS 8
+#if APIC_DEBUG
+#define Dprintk(x...) printk(##x)
+#else
+#define Dprintk(x...)
+#endif
/*
- * the local APIC register structure, memory mapped. Not terribly well
- * tested, but we might eventually use this one in the future - the
- * problem why we cannot use it right now is the P5 APIC, it has an
- * errata which cannot take 8-bit reads and writes, only 32-bit ones ...
+ * Basic functions accessing APICs.
*/
-#define u32 unsigned int
-
-#define lapic ((volatile struct local_apic *)APIC_BASE)
-
-struct local_apic {
-
-/*000*/ struct { u32 __reserved[4]; } __reserved_01;
-
-/*010*/ struct { u32 __reserved[4]; } __reserved_02;
-
-/*020*/ struct { /* APIC ID Register */
- u32 __reserved_1 : 24,
- phys_apic_id : 4,
- __reserved_2 : 4;
- u32 __reserved[3];
- } id;
-
-/*030*/ const
- struct { /* APIC Version Register */
- u32 version : 8,
- __reserved_1 : 8,
- max_lvt : 8,
- __reserved_2 : 8;
- u32 __reserved[3];
- } version;
-
-/*040*/ struct { u32 __reserved[4]; } __reserved_03;
-
-/*050*/ struct { u32 __reserved[4]; } __reserved_04;
-
-/*060*/ struct { u32 __reserved[4]; } __reserved_05;
-
-/*070*/ struct { u32 __reserved[4]; } __reserved_06;
-
-/*080*/ struct { /* Task Priority Register */
- u32 priority : 8,
- __reserved_1 : 24;
- u32 __reserved_2[3];
- } tpr;
-
-/*090*/ const
- struct { /* Arbitration Priority Register */
- u32 priority : 8,
- __reserved_1 : 24;
- u32 __reserved_2[3];
- } apr;
-
-/*0A0*/ const
- struct { /* Processor Priority Register */
- u32 priority : 8,
- __reserved_1 : 24;
- u32 __reserved_2[3];
- } ppr;
-
-/*0B0*/ struct { /* End Of Interrupt Register */
- u32 eoi;
- u32 __reserved[3];
- } eoi;
-
-/*0C0*/ struct { u32 __reserved[4]; } __reserved_07;
-
-/*0D0*/ struct { /* Logical Destination Register */
- u32 __reserved_1 : 24,
- logical_dest : 8;
- u32 __reserved_2[3];
- } ldr;
-
-/*0E0*/ struct { /* Destination Format Register */
- u32 __reserved_1 : 28,
- model : 4;
- u32 __reserved_2[3];
- } dfr;
-
-/*0F0*/ struct { /* Spurious Interrupt Vector Register */
- u32 spurious_vector : 8,
- apic_enabled : 1,
- focus_cpu : 1,
- __reserved_2 : 22;
- u32 __reserved_3[3];
- } svr;
-
-/*100*/ struct { /* In Service Register */
-/*170*/ u32 bitfield;
- u32 __reserved[3];
- } isr [8];
-
-/*180*/ struct { /* Trigger Mode Register */
-/*1F0*/ u32 bitfield;
- u32 __reserved[3];
- } tmr [8];
-/*200*/ struct { /* Interrupt Request Register */
-/*270*/ u32 bitfield;
- u32 __reserved[3];
- } irr [8];
+extern __inline void apic_write(unsigned long reg, unsigned long v)
+{
+ *((volatile unsigned long *)(APIC_BASE+reg))=v;
+}
-/*280*/ union { /* Error Status Register */
- struct {
- u32 send_cs_error : 1,
- receive_cs_error : 1,
- send_accept_error : 1,
- receive_accept_error : 1,
- __reserved_1 : 1,
- send_illegal_vector : 1,
- receive_illegal_vector : 1,
- illegal_register_address : 1,
- __reserved_2 : 24;
- u32 __reserved_3[3];
- } error_bits;
- struct {
- u32 errors;
- u32 __reserved_3[3];
- } all_errors;
- } esr;
+extern __inline unsigned long apic_read(unsigned long reg)
+{
+ return *((volatile unsigned long *)(APIC_BASE+reg));
+}
-/*290*/ struct { u32 __reserved[4]; } __reserved_08;
+extern unsigned int apic_timer_irqs [NR_CPUS];
-/*2A0*/ struct { u32 __reserved[4]; } __reserved_09;
-
-/*2B0*/ struct { u32 __reserved[4]; } __reserved_10;
-
-/*2C0*/ struct { u32 __reserved[4]; } __reserved_11;
-
-/*2D0*/ struct { u32 __reserved[4]; } __reserved_12;
-
-/*2E0*/ struct { u32 __reserved[4]; } __reserved_13;
-
-/*2F0*/ struct { u32 __reserved[4]; } __reserved_14;
-
-/*300*/ struct { /* Interrupt Command Register 1 */
- u32 vector : 8,
- delivery_mode : 3,
- destination_mode : 1,
- delivery_status : 1,
- __reserved_1 : 1,
- level : 1,
- trigger : 1,
- __reserved_2 : 2,
- shorthand : 2,
- __reserved_3 : 12;
- u32 __reserved_4[3];
- } icr1;
-
-/*310*/ struct { /* Interrupt Command Register 2 */
- union {
- u32 __reserved_1 : 24,
- phys_dest : 4,
- __reserved_2 : 4;
- u32 __reserved_3 : 24,
- logical_dest : 8;
- } dest;
- u32 __reserved_4[3];
- } icr2;
-
-/*320*/ struct { /* LVT - Timer */
- u32 vector : 8,
- __reserved_1 : 4,
- delivery_status : 1,
- __reserved_2 : 3,
- mask : 1,
- timer_mode : 1,
- __reserved_3 : 14;
- u32 __reserved_4[3];
- } lvt_timer;
-
-/*330*/ struct { u32 __reserved[4]; } __reserved_15;
-
-/*340*/ struct { /* LVT - Performance Counter */
- u32 vector : 8,
- delivery_mode : 3,
- __reserved_1 : 1,
- delivery_status : 1,
- __reserved_2 : 3,
- mask : 1,
- __reserved_3 : 15;
- u32 __reserved_4[3];
- } lvt_pc;
-
-/*350*/ struct { /* LVT - LINT0 */
- u32 vector : 8,
- delivery_mode : 3,
- __reserved_1 : 1,
- delivery_status : 1,
- polarity : 1,
- remote_irr : 1,
- trigger : 1,
- mask : 1,
- __reserved_2 : 15;
- u32 __reserved_3[3];
- } lvt_lint0;
-
-/*360*/ struct { /* LVT - LINT1 */
- u32 vector : 8,
- delivery_mode : 3,
- __reserved_1 : 1,
- delivery_status : 1,
- polarity : 1,
- remote_irr : 1,
- trigger : 1,
- mask : 1,
- __reserved_2 : 15;
- u32 __reserved_3[3];
- } lvt_lint1;
-
-/*370*/ struct { /* LVT - Error */
- u32 vector : 8,
- __reserved_1 : 4,
- delivery_status : 1,
- __reserved_2 : 3,
- mask : 1,
- __reserved_3 : 15;
- u32 __reserved_4[3];
- } lvt_error;
-
-/*380*/ struct { /* Timer Initial Count Register */
- u32 initial_count;
- u32 __reserved_2[3];
- } timer_icr;
-
-/*390*/ const
- struct { /* Timer Current Count Register */
- u32 curr_count;
- u32 __reserved_2[3];
- } timer_ccr;
-
-/*3A0*/ struct { u32 __reserved[4]; } __reserved_16;
-
-/*3B0*/ struct { u32 __reserved[4]; } __reserved_17;
-
-/*3C0*/ struct { u32 __reserved[4]; } __reserved_18;
-
-/*3D0*/ struct { u32 __reserved[4]; } __reserved_19;
-
-/*3E0*/ struct { /* Timer Divide Configuration Register */
- u32 divisor : 4,
- __reserved_1 : 28;
- u32 __reserved_2[3];
- } timer_dcr;
-
-/*3F0*/ struct { u32 __reserved[4]; } __reserved_20;
-
-} __attribute__ ((packed));
+#ifdef CONFIG_X86_GOOD_APIC
+# define FORCE_READ_AROUND_WRITE 0
+# define apic_readaround(x)
+#else
+# define FORCE_READ_AROUND_WRITE 1
+# define apic_readaround(x) apic_read(x)
+#endif
-#undef u32
+#define apic_write_around(x,y) \
+ do { apic_readaround(x); apic_write(x,y); } while (0)
+
+extern inline void ack_APIC_irq(void)
+{
+ /* Clear the IPI */
+
+ apic_readaround(APIC_EOI);
+ /*
+ * on P6+ cores (CONFIG_X86_GOOD_APIC) ack_APIC_irq() actually
+ * gets compiled as a single instruction ... yummie.
+ */
+ apic_write(APIC_EOI, 0); /* Docs say use 0 for future compatibility */
+}
+
+extern int get_maxlvt(void);
+extern void disable_local_APIC (void);
+extern void cache_APIC_registers (void);
+extern void setup_local_APIC (void);
+extern void init_apic_mappings(void);
+extern void smp_local_timer_interrupt(struct pt_regs * regs);
+extern void setup_APIC_clocks(void);
+#endif
#endif
diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h
new file mode 100644
index 000000000..c47395384
--- /dev/null
+++ b/include/asm-i386/apicdef.h
@@ -0,0 +1,359 @@
+#ifndef __ASM_APICDEF_H
+#define __ASM_APICDEF_H
+
+/*
+ * Constants for various Intel APICs. (local APIC, IOAPIC, etc.)
+ *
+ * Alan Cox <Alan.Cox@linux.org>, 1995.
+ * Ingo Molnar <mingo@redhat.com>, 1999, 2000
+ */
+#define APIC_PHYS_BASE 0xfee00000 /* IA s/w dev Vol 3, Section 7.4 */
+
+#define APIC_ID 0x20
+#define GET_APIC_ID(x) (((x)>>24)&0x0F)
+#define APIC_LVR 0x30
+#define GET_APIC_VERSION(x) ((x)&0xFF)
+#define GET_APIC_MAXLVT(x) (((x)>>16)&0x0F)
+#define APIC_INTEGRATED(x) ((x)&0xF0)
+#define APIC_TASKPRI 0x80
+#define APIC_TPRI_MASK 0xFF
+#define APIC_ARBPRI 0x90
+#define APIC_ARBPRI_MASK 0xFF
+#define APIC_PROCPRI 0xA0
+#define APIC_EOI 0xB0
+#define APIC_EIO_ACK 0x0 /* Write this to the EOI register */
+#define APIC_RRR 0xC0
+#define APIC_LDR 0xD0
+#define APIC_LDR_MASK (0xFF<<24)
+#define GET_APIC_LOGICAL_ID(x) (((x)>>24)&0xFF)
+#define SET_APIC_LOGICAL_ID(x) (((x)<<24))
+#define APIC_ALL_CPUS 0xFF
+#define APIC_DFR 0xE0
+#define GET_APIC_DFR(x) (((x)>>28)&0x0F)
+#define SET_APIC_DFR(x) ((x)<<28)
+#define APIC_SPIV 0xF0
+#define APIC_ISR 0x100
+#define APIC_TMR 0x180
+#define APIC_IRR 0x200
+#define APIC_ESR 0x280
+#define APIC_ESR_SEND_CS 0x00001
+#define APIC_ESR_RECV_CS 0x00002
+#define APIC_ESR_SEND_ACC 0x00004
+#define APIC_ESR_RECV_ACC 0x00008
+#define APIC_ESR_SENDILL 0x00020
+#define APIC_ESR_RECVILL 0x00040
+#define APIC_ESR_ILLREGA 0x00080
+#define APIC_ICR 0x300
+#define APIC_DEST_SELF 0x40000
+#define APIC_DEST_ALLINC 0x80000
+#define APIC_DEST_ALLBUT 0xC0000
+#define APIC_DEST_RR_MASK 0x30000
+#define APIC_DEST_RR_INVALID 0x00000
+#define APIC_DEST_RR_INPROG 0x10000
+#define APIC_DEST_RR_VALID 0x20000
+#define APIC_DEST_LEVELTRIG 0x08000
+#define APIC_DEST_ASSERT 0x04000
+#define APIC_DEST_BUSY 0x01000
+#define APIC_DEST_LOGICAL 0x00800
+#define APIC_DEST_DM_FIXED 0x00000
+#define APIC_DEST_DM_LOWEST 0x00100
+#define APIC_DEST_DM_SMI 0x00200
+#define APIC_DEST_DM_REMRD 0x00300
+#define APIC_DEST_DM_NMI 0x00400
+#define APIC_DEST_DM_INIT 0x00500
+#define APIC_DEST_DM_STARTUP 0x00600
+#define APIC_DEST_VECTOR_MASK 0x000FF
+#define APIC_ICR2 0x310
+#define GET_APIC_DEST_FIELD(x) (((x)>>24)&0xFF)
+#define SET_APIC_DEST_FIELD(x) ((x)<<24)
+#define APIC_LVTT 0x320
+#define APIC_LVTPC 0x340
+#define APIC_LVT0 0x350
+#define APIC_LVT_TIMER_BASE_MASK (0x3<<18)
+#define GET_APIC_TIMER_BASE(x) (((x)>>18)&0x3)
+#define SET_APIC_TIMER_BASE(x) (((x)<<18))
+#define APIC_TIMER_BASE_CLKIN 0x0
+#define APIC_TIMER_BASE_TMBASE 0x1
+#define APIC_TIMER_BASE_DIV 0x2
+#define APIC_LVT_TIMER_PERIODIC (1<<17)
+#define APIC_LVT_MASKED (1<<16)
+#define APIC_LVT_LEVEL_TRIGGER (1<<15)
+#define APIC_LVT_REMOTE_IRR (1<<14)
+#define APIC_INPUT_POLARITY (1<<13)
+#define APIC_SEND_PENDING (1<<12)
+#define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7)
+#define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8))
+#define APIC_MODE_FIXED 0x0
+#define APIC_MODE_NMI 0x4
+#define APIC_MODE_EXINT 0x7
+#define APIC_LVT1 0x360
+#define APIC_LVTERR 0x370
+#define APIC_TMICT 0x380
+#define APIC_TMCCT 0x390
+#define APIC_TDCR 0x3E0
+#define APIC_TDR_DIV_TMBASE (1<<2)
+#define APIC_TDR_DIV_1 0xB
+#define APIC_TDR_DIV_2 0x0
+#define APIC_TDR_DIV_4 0x1
+#define APIC_TDR_DIV_8 0x2
+#define APIC_TDR_DIV_16 0x3
+#define APIC_TDR_DIV_32 0x8
+#define APIC_TDR_DIV_64 0x9
+#define APIC_TDR_DIV_128 0xA
+
+#define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
+
+#define MAX_IO_APICS 8
+
+/*
+ * the local APIC register structure, memory mapped. Not terribly well
+ * tested, but we might eventually use this one in the future - the
+ * problem why we cannot use it right now is the P5 APIC, it has an
+ * errata which cannot take 8-bit reads and writes, only 32-bit ones ...
+ */
+#define u32 unsigned int
+
+#define lapic ((volatile struct local_apic *)APIC_BASE)
+
+struct local_apic {
+
+/*000*/ struct { u32 __reserved[4]; } __reserved_01;
+
+/*010*/ struct { u32 __reserved[4]; } __reserved_02;
+
+/*020*/ struct { /* APIC ID Register */
+ u32 __reserved_1 : 24,
+ phys_apic_id : 4,
+ __reserved_2 : 4;
+ u32 __reserved[3];
+ } id;
+
+/*030*/ const
+ struct { /* APIC Version Register */
+ u32 version : 8,
+ __reserved_1 : 8,
+ max_lvt : 8,
+ __reserved_2 : 8;
+ u32 __reserved[3];
+ } version;
+
+/*040*/ struct { u32 __reserved[4]; } __reserved_03;
+
+/*050*/ struct { u32 __reserved[4]; } __reserved_04;
+
+/*060*/ struct { u32 __reserved[4]; } __reserved_05;
+
+/*070*/ struct { u32 __reserved[4]; } __reserved_06;
+
+/*080*/ struct { /* Task Priority Register */
+ u32 priority : 8,
+ __reserved_1 : 24;
+ u32 __reserved_2[3];
+ } tpr;
+
+/*090*/ const
+ struct { /* Arbitration Priority Register */
+ u32 priority : 8,
+ __reserved_1 : 24;
+ u32 __reserved_2[3];
+ } apr;
+
+/*0A0*/ const
+ struct { /* Processor Priority Register */
+ u32 priority : 8,
+ __reserved_1 : 24;
+ u32 __reserved_2[3];
+ } ppr;
+
+/*0B0*/ struct { /* End Of Interrupt Register */
+ u32 eoi;
+ u32 __reserved[3];
+ } eoi;
+
+/*0C0*/ struct { u32 __reserved[4]; } __reserved_07;
+
+/*0D0*/ struct { /* Logical Destination Register */
+ u32 __reserved_1 : 24,
+ logical_dest : 8;
+ u32 __reserved_2[3];
+ } ldr;
+
+/*0E0*/ struct { /* Destination Format Register */
+ u32 __reserved_1 : 28,
+ model : 4;
+ u32 __reserved_2[3];
+ } dfr;
+
+/*0F0*/ struct { /* Spurious Interrupt Vector Register */
+ u32 spurious_vector : 8,
+ apic_enabled : 1,
+ focus_cpu : 1,
+ __reserved_2 : 22;
+ u32 __reserved_3[3];
+ } svr;
+
+/*100*/ struct { /* In Service Register */
+/*170*/ u32 bitfield;
+ u32 __reserved[3];
+ } isr [8];
+
+/*180*/ struct { /* Trigger Mode Register */
+/*1F0*/ u32 bitfield;
+ u32 __reserved[3];
+ } tmr [8];
+
+/*200*/ struct { /* Interrupt Request Register */
+/*270*/ u32 bitfield;
+ u32 __reserved[3];
+ } irr [8];
+
+/*280*/ union { /* Error Status Register */
+ struct {
+ u32 send_cs_error : 1,
+ receive_cs_error : 1,
+ send_accept_error : 1,
+ receive_accept_error : 1,
+ __reserved_1 : 1,
+ send_illegal_vector : 1,
+ receive_illegal_vector : 1,
+ illegal_register_address : 1,
+ __reserved_2 : 24;
+ u32 __reserved_3[3];
+ } error_bits;
+ struct {
+ u32 errors;
+ u32 __reserved_3[3];
+ } all_errors;
+ } esr;
+
+/*290*/ struct { u32 __reserved[4]; } __reserved_08;
+
+/*2A0*/ struct { u32 __reserved[4]; } __reserved_09;
+
+/*2B0*/ struct { u32 __reserved[4]; } __reserved_10;
+
+/*2C0*/ struct { u32 __reserved[4]; } __reserved_11;
+
+/*2D0*/ struct { u32 __reserved[4]; } __reserved_12;
+
+/*2E0*/ struct { u32 __reserved[4]; } __reserved_13;
+
+/*2F0*/ struct { u32 __reserved[4]; } __reserved_14;
+
+/*300*/ struct { /* Interrupt Command Register 1 */
+ u32 vector : 8,
+ delivery_mode : 3,
+ destination_mode : 1,
+ delivery_status : 1,
+ __reserved_1 : 1,
+ level : 1,
+ trigger : 1,
+ __reserved_2 : 2,
+ shorthand : 2,
+ __reserved_3 : 12;
+ u32 __reserved_4[3];
+ } icr1;
+
+/*310*/ struct { /* Interrupt Command Register 2 */
+ union {
+ u32 __reserved_1 : 24,
+ phys_dest : 4,
+ __reserved_2 : 4;
+ u32 __reserved_3 : 24,
+ logical_dest : 8;
+ } dest;
+ u32 __reserved_4[3];
+ } icr2;
+
+/*320*/ struct { /* LVT - Timer */
+ u32 vector : 8,
+ __reserved_1 : 4,
+ delivery_status : 1,
+ __reserved_2 : 3,
+ mask : 1,
+ timer_mode : 1,
+ __reserved_3 : 14;
+ u32 __reserved_4[3];
+ } lvt_timer;
+
+/*330*/ struct { u32 __reserved[4]; } __reserved_15;
+
+/*340*/ struct { /* LVT - Performance Counter */
+ u32 vector : 8,
+ delivery_mode : 3,
+ __reserved_1 : 1,
+ delivery_status : 1,
+ __reserved_2 : 3,
+ mask : 1,
+ __reserved_3 : 15;
+ u32 __reserved_4[3];
+ } lvt_pc;
+
+/*350*/ struct { /* LVT - LINT0 */
+ u32 vector : 8,
+ delivery_mode : 3,
+ __reserved_1 : 1,
+ delivery_status : 1,
+ polarity : 1,
+ remote_irr : 1,
+ trigger : 1,
+ mask : 1,
+ __reserved_2 : 15;
+ u32 __reserved_3[3];
+ } lvt_lint0;
+
+/*360*/ struct { /* LVT - LINT1 */
+ u32 vector : 8,
+ delivery_mode : 3,
+ __reserved_1 : 1,
+ delivery_status : 1,
+ polarity : 1,
+ remote_irr : 1,
+ trigger : 1,
+ mask : 1,
+ __reserved_2 : 15;
+ u32 __reserved_3[3];
+ } lvt_lint1;
+
+/*370*/ struct { /* LVT - Error */
+ u32 vector : 8,
+ __reserved_1 : 4,
+ delivery_status : 1,
+ __reserved_2 : 3,
+ mask : 1,
+ __reserved_3 : 15;
+ u32 __reserved_4[3];
+ } lvt_error;
+
+/*380*/ struct { /* Timer Initial Count Register */
+ u32 initial_count;
+ u32 __reserved_2[3];
+ } timer_icr;
+
+/*390*/ const
+ struct { /* Timer Current Count Register */
+ u32 curr_count;
+ u32 __reserved_2[3];
+ } timer_ccr;
+
+/*3A0*/ struct { u32 __reserved[4]; } __reserved_16;
+
+/*3B0*/ struct { u32 __reserved[4]; } __reserved_17;
+
+/*3C0*/ struct { u32 __reserved[4]; } __reserved_18;
+
+/*3D0*/ struct { u32 __reserved[4]; } __reserved_19;
+
+/*3E0*/ struct { /* Timer Divide Configuration Register */
+ u32 divisor : 4,
+ __reserved_1 : 28;
+ u32 __reserved_2[3];
+ } timer_dcr;
+
+/*3F0*/ struct { u32 __reserved[4]; } __reserved_20;
+
+} __attribute__ ((packed));
+
+#undef u32
+
+#endif
diff --git a/include/asm-i386/bugs.h b/include/asm-i386/bugs.h
index 4ae25be50..dbaa8d261 100644
--- a/include/asm-i386/bugs.h
+++ b/include/asm-i386/bugs.h
@@ -398,8 +398,16 @@ static void __init check_config(void)
* If we configured ourselves for a TSC, we'd better have one!
*/
#ifdef CONFIG_X86_TSC
- if (!(boot_cpu_data.x86_capability & X86_FEATURE_TSC))
- panic("Kernel compiled for Pentium+, requires TSC");
+ if (!cpu_has_tsc)
+ panic("Kernel compiled for Pentium+, requires TSC feature!");
+#endif
+
+/*
+ * If we configured ourselves for PGE, we'd better have it.
+ */
+#ifdef CONFIG_X86_PGE
+ if (!cpu_has_pge)
+ panic("Kernel compiled for PPro+, requires PGE feature!");
#endif
/*
diff --git a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h
index 01f6a1871..9a906bcff 100644
--- a/include/asm-i386/fixmap.h
+++ b/include/asm-i386/fixmap.h
@@ -15,7 +15,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
-#include <asm/apic.h>
+#include <asm/apicdef.h>
#include <asm/page.h>
#ifdef CONFIG_HIGHMEM
#include <linux/threads.h>
@@ -68,8 +68,16 @@ enum fixed_addresses {
__end_of_fixed_addresses
};
-extern void set_fixmap (enum fixed_addresses idx, unsigned long phys);
+extern void __set_fixmap (enum fixed_addresses idx,
+ unsigned long phys, pgprot_t flags);
+#define set_fixmap(idx, phys) \
+ __set_fixmap(idx, phys, PAGE_KERNEL)
+/*
+ * Some hardware wants to get fixmapped without caching.
+ */
+#define set_fixmap_nocache(idx, phys) \
+ __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
/*
* used by vmalloc.c.
*
diff --git a/include/asm-i386/hardirq.h b/include/asm-i386/hardirq.h
index 4679cb3ef..fc8ff9016 100644
--- a/include/asm-i386/hardirq.h
+++ b/include/asm-i386/hardirq.h
@@ -25,6 +25,7 @@ extern unsigned int local_irq_count[NR_CPUS];
#else
#include <asm/atomic.h>
+#include <asm/smp.h>
extern unsigned char global_irq_holder;
extern unsigned volatile int global_irq_lock;
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index 84d73ee13..f6c102a7e 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -89,26 +89,8 @@ extern volatile unsigned long irq_err_count;
extern char _stext, _etext;
-#define MAX_IRQ_SOURCES 128
-#define MAX_MP_BUSSES 32
-enum mp_bustype {
- MP_BUS_ISA,
- MP_BUS_EISA,
- MP_BUS_PCI
-};
-extern int mp_bus_id_to_type [MAX_MP_BUSSES];
-extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
-
-
-#ifdef __SMP__
#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
-#else
-
-#define IO_APIC_IRQ(x) (0)
-
-#endif
-
#define __STR(x) #x
#define STR(x) __STR(x)
@@ -134,8 +116,6 @@ extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
"movl %esp, %ebx\n\t" \
"andl $-8192, %ebx\n\t"
-#ifdef __SMP__
-
/*
* SMP has a few special interrupts for IPI messages
*/
@@ -171,8 +151,6 @@ SYMBOL_NAME_STR(x) ":\n\t" \
"addl $4,%esp\n\t" \
"jmp ret_from_intr\n");
-#endif /* __SMP__ */
-
#define BUILD_COMMON_IRQ() \
asmlinkage void call_do_IRQ(void); \
__asm__( \
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h
new file mode 100644
index 000000000..2068753df
--- /dev/null
+++ b/include/asm-i386/io_apic.h
@@ -0,0 +1,134 @@
+#ifndef __ASM_IO_APIC_H
+#define __ASM_IO_APIC_H
+
+#include <asm/types.h>
+
+/*
+ * Intel IO-APIC support for SMP and UP systems.
+ *
+ * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
+ */
+
+#define IO_APIC_BASE(idx) \
+ ((volatile int *)__fix_to_virt(FIX_IO_APIC_BASE_0 + idx))
+
+/*
+ * The structure of the IO-APIC:
+ */
+struct IO_APIC_reg_00 {
+ __u32 __reserved_2 : 24,
+ ID : 4,
+ __reserved_1 : 4;
+} __attribute__ ((packed));
+
+struct IO_APIC_reg_01 {
+ __u32 version : 8,
+ __reserved_2 : 8,
+ entries : 8,
+ __reserved_1 : 8;
+} __attribute__ ((packed));
+
+struct IO_APIC_reg_02 {
+ __u32 __reserved_2 : 24,
+ arbitration : 4,
+ __reserved_1 : 4;
+} __attribute__ ((packed));
+
+/*
+ * # of IO-APICs and # of IRQ routing registers
+ */
+extern int nr_ioapics;
+extern int nr_ioapic_registers[MAX_IO_APICS];
+
+enum ioapic_irq_destination_types {
+ dest_Fixed = 0,
+ dest_LowestPrio = 1,
+ dest_SMI = 2,
+ dest__reserved_1 = 3,
+ dest_NMI = 4,
+ dest_INIT = 5,
+ dest__reserved_2 = 6,
+ dest_ExtINT = 7
+};
+
+struct IO_APIC_route_entry {
+ __u32 vector : 8,
+ delivery_mode : 3, /* 000: FIXED
+ * 001: lowest prio
+ * 111: ExtINT
+ */
+ dest_mode : 1, /* 0: physical, 1: logical */
+ delivery_status : 1,
+ polarity : 1,
+ irr : 1,
+ trigger : 1, /* 0: edge, 1: level */
+ mask : 1, /* 0: enabled, 1: disabled */
+ __reserved_2 : 15;
+
+ union { struct { __u32
+ __reserved_1 : 24,
+ physical_dest : 4,
+ __reserved_2 : 4;
+ } physical;
+
+ struct { __u32
+ __reserved_1 : 24,
+ logical_dest : 8;
+ } logical;
+ } dest;
+
+} __attribute__ ((packed));
+
+/*
+ * MP-BIOS irq configuration table structures:
+ */
+
+/* I/O APIC entries */
+extern struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS];
+
+/* # of MP IRQ source entries */
+extern int mp_irq_entries;
+
+/* MP IRQ source entries */
+extern struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
+
+/* non-0 if default (table-less) MP configuration */
+extern int mpc_default_type;
+
+static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
+{
+ *IO_APIC_BASE(apic) = reg;
+ return *(IO_APIC_BASE(apic)+4);
+}
+
+static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
+{
+ *IO_APIC_BASE(apic) = reg;
+ *(IO_APIC_BASE(apic)+4) = value;
+}
+
+/*
+ * Re-write a value: to be used for read-modify-write
+ * cycles where the read already set up the index register.
+ */
+static inline void io_apic_modify(unsigned int apic, unsigned int value)
+{
+ *(IO_APIC_BASE(apic)+4) = value;
+}
+
+/*
+ * Synchronize the IO-APIC and the CPU by doing
+ * a dummy read from the IO-APIC
+ */
+static inline void io_apic_sync(unsigned int apic)
+{
+ (void) *(IO_APIC_BASE(apic)+4);
+}
+
+extern int nmi_watchdog;
+/* 1 if "noapic" boot option passed */
+extern int skip_ioapic_setup;
+extern void IO_APIC_init_uniprocessor (void);
+
+#endif
+
diff --git a/include/asm-i386/ipcbuf.h b/include/asm-i386/ipcbuf.h
new file mode 100644
index 000000000..0dcad4f84
--- /dev/null
+++ b/include/asm-i386/ipcbuf.h
@@ -0,0 +1,29 @@
+#ifndef __i386_IPCBUF_H__
+#define __i386_IPCBUF_H__
+
+/*
+ * The ipc64_perm structure for i386 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_uid32_t cuid;
+ __kernel_gid32_t cgid;
+ __kernel_mode_t mode;
+ unsigned short __pad1;
+ unsigned short seq;
+ unsigned short __pad2;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* __i386_IPCBUF_H__ */
diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h
new file mode 100644
index 000000000..7597fd40a
--- /dev/null
+++ b/include/asm-i386/mpspec.h
@@ -0,0 +1,168 @@
+#ifndef __ASM_MPSPEC_H
+#define __ASM_MPSPEC_H
+
+/*
+ * Structure definitions for SMP machines following the
+ * Intel Multiprocessing Specification 1.1 and 1.4.
+ */
+
+/*
+ * This tag identifies where the SMP configuration
+ * information is.
+ */
+
+#define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_')
+
+struct intel_mp_floating
+{
+ char mpf_signature[4]; /* "_MP_" */
+ unsigned long mpf_physptr; /* Configuration table address */
+ unsigned char mpf_length; /* Our length (paragraphs) */
+ unsigned char mpf_specification;/* Specification version */
+ unsigned char mpf_checksum; /* Checksum (makes sum 0) */
+ unsigned char mpf_feature1; /* Standard or configuration ? */
+ unsigned char mpf_feature2; /* Bit7 set for IMCR|PIC */
+ unsigned char mpf_feature3; /* Unused (0) */
+ unsigned char mpf_feature4; /* Unused (0) */
+ unsigned char mpf_feature5; /* Unused (0) */
+};
+
+struct mp_config_table
+{
+ char mpc_signature[4];
+#define MPC_SIGNATURE "PCMP"
+ unsigned short mpc_length; /* Size of table */
+ char mpc_spec; /* 0x01 */
+ char mpc_checksum;
+ char mpc_oem[8];
+ char mpc_productid[12];
+ unsigned long mpc_oemptr; /* 0 if not present */
+ unsigned short mpc_oemsize; /* 0 if not present */
+ unsigned short mpc_oemcount;
+ unsigned long mpc_lapic; /* APIC address */
+ unsigned long reserved;
+};
+
+/* Followed by entries */
+
+#define MP_PROCESSOR 0
+#define MP_BUS 1
+#define MP_IOAPIC 2
+#define MP_INTSRC 3
+#define MP_LINTSRC 4
+
+struct mpc_config_processor
+{
+ unsigned char mpc_type;
+ unsigned char mpc_apicid; /* Local APIC number */
+ unsigned char mpc_apicver; /* Its versions */
+ unsigned char mpc_cpuflag;
+#define CPU_ENABLED 1 /* Processor is available */
+#define CPU_BOOTPROCESSOR 2 /* Processor is the BP */
+ unsigned long mpc_cpufeature;
+#define CPU_STEPPING_MASK 0x0F
+#define CPU_MODEL_MASK 0xF0
+#define CPU_FAMILY_MASK 0xF00
+ unsigned long mpc_featureflag; /* CPUID feature value */
+ unsigned long mpc_reserved[2];
+};
+
+struct mpc_config_bus
+{
+ unsigned char mpc_type;
+ unsigned char mpc_busid;
+ unsigned char mpc_bustype[6] __attribute((packed));
+};
+
+#define BUSTYPE_EISA "EISA"
+#define BUSTYPE_ISA "ISA"
+#define BUSTYPE_INTERN "INTERN" /* Internal BUS */
+#define BUSTYPE_MCA "MCA"
+#define BUSTYPE_VL "VL" /* Local bus */
+#define BUSTYPE_PCI "PCI"
+#define BUSTYPE_PCMCIA "PCMCIA"
+
+struct mpc_config_ioapic
+{
+ unsigned char mpc_type;
+ unsigned char mpc_apicid;
+ unsigned char mpc_apicver;
+ unsigned char mpc_flags;
+#define MPC_APIC_USABLE 0x01
+ unsigned long mpc_apicaddr;
+};
+
+struct mpc_config_intsrc
+{
+ unsigned char mpc_type;
+ unsigned char mpc_irqtype;
+ unsigned short mpc_irqflag;
+ unsigned char mpc_srcbus;
+ unsigned char mpc_srcbusirq;
+ unsigned char mpc_dstapic;
+ unsigned char mpc_dstirq;
+};
+
+enum mp_irq_source_types {
+ mp_INT = 0,
+ mp_NMI = 1,
+ mp_SMI = 2,
+ mp_ExtINT = 3
+};
+
+#define MP_IRQDIR_DEFAULT 0
+#define MP_IRQDIR_HIGH 1
+#define MP_IRQDIR_LOW 3
+
+
+struct mpc_config_lintsrc
+{
+ unsigned char mpc_type;
+ unsigned char mpc_irqtype;
+ unsigned short mpc_irqflag;
+ unsigned char mpc_srcbusid;
+ unsigned char mpc_srcbusirq;
+ unsigned char mpc_destapic;
+#define MP_APIC_ALL 0xFF
+ unsigned char mpc_destapiclint;
+};
+
+/*
+ * Default configurations
+ *
+ * 1 2 CPU ISA 82489DX
+ * 2 2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining
+ * 3 2 CPU EISA 82489DX
+ * 4 2 CPU MCA 82489DX
+ * 5 2 CPU ISA+PCI
+ * 6 2 CPU EISA+PCI
+ * 7 2 CPU MCA+PCI
+ */
+
+#define MAX_IRQ_SOURCES 128
+#define MAX_MP_BUSSES 32
+enum mp_bustype {
+ MP_BUS_ISA,
+ MP_BUS_EISA,
+ MP_BUS_PCI
+};
+extern int mp_bus_id_to_type [MAX_MP_BUSSES];
+extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
+
+extern unsigned int boot_cpu_id;
+extern unsigned long phys_cpu_present_map;
+extern int smp_found_config;
+extern void init_smp_config(void);
+extern int nr_ioapics;
+extern int apic_version [NR_CPUS];
+extern int mp_bus_id_to_type [MAX_MP_BUSSES];
+extern int mp_irq_entries;
+extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES];
+extern int mpc_default_type;
+extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
+extern int mp_current_pci_id;
+extern unsigned long mp_lapic_addr;
+extern int pic_mode;
+
+#endif
+
diff --git a/include/asm-i386/msgbuf.h b/include/asm-i386/msgbuf.h
new file mode 100644
index 000000000..b8d659c15
--- /dev/null
+++ b/include/asm-i386/msgbuf.h
@@ -0,0 +1,31 @@
+#ifndef _I386_MSGBUF_H
+#define _I386_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for i386 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ unsigned long __unused1;
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ unsigned long __unused2;
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long __unused3;
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+#endif /* _I386_MSGBUF_H */
diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h
index d7c59f21b..ef5198dfc 100644
--- a/include/asm-i386/pci.h
+++ b/include/asm-i386/pci.h
@@ -7,5 +7,8 @@
#define pcibios_assign_all_busses() 0
+#define PCIBIOS_MIN_IO 0x1000
+#define PCIBIOS_MIN_MEM 0x10000000
+
#endif /* __i386_PCI_H */
diff --git a/include/asm-i386/pgalloc.h b/include/asm-i386/pgalloc.h
index 3cdfac12f..fd01afad1 100644
--- a/include/asm-i386/pgalloc.h
+++ b/include/asm-i386/pgalloc.h
@@ -195,7 +195,7 @@ extern inline void set_pgdir(unsigned long address, pgd_t entry)
#ifndef __SMP__
#define flush_tlb() __flush_tlb()
-#define flush_tlb_all() __flush_tlb()
+#define flush_tlb_all() __flush_tlb_all()
#define local_flush_tlb() __flush_tlb()
static inline void flush_tlb_mm(struct mm_struct *mm)
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 336c27c67..e4f8afcf3 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -27,8 +27,49 @@ extern pgd_t swapper_pg_dir[1024];
#define flush_page_to_ram(page) do { } while (0)
#define flush_icache_range(start, end) do { } while (0)
-#define __flush_tlb() \
-do { unsigned long tmpreg; __asm__ __volatile__("movl %%cr3,%0\n\tmovl %0,%%cr3":"=r" (tmpreg) : :"memory"); } while (0)
+#define __flush_tlb() \
+ do { \
+ __asm__ __volatile__ \
+ ("movl %0, %%cr3;" \
+ : \
+ : "r" __pa(current->active_mm->pgd) \
+ : "memory" \
+ ); \
+ } while (0)
+
+/*
+ * Global pages have to be flushed a bit differently. Not a real
+ * performance problem because this does not happen often.
+ */
+#define __flush_tlb_global() \
+ do { \
+ __asm__ __volatile__( \
+ "movl %0, %%cr4; # turn off PGE \n" \
+ "mov %2, %%cr3; # flush TLB \n" \
+ "mov %1, %%cr4; # turn PGE back on \n" \
+ : \
+ : "r" (mmu_cr4_features), \
+ "r" (mmu_cr4_features & ~X86_CR4_PGE), \
+ "r" (__pa(current->active_mm->pgd)) \
+ : "memory"); \
+ } while (0)
+
+extern unsigned long pgkern_mask;
+
+/*
+ * Do not check the PGE bit unnecesserily if this is a PPro+ kernel.
+ */
+#ifdef CONFIG_X86_PGE
+# define __flush_tlb_all() __flush_tlb_global()
+#else
+# define __flush_tlb_all() \
+ do { \
+ if (cpu_has_pge) \
+ __flush_tlb_global(); \
+ else \
+ __flush_tlb(); \
+ } while (0)
+#endif
#ifndef CONFIG_X86_INVLPG
#define __flush_tlb_one(addr) __flush_tlb()
@@ -116,12 +157,37 @@ extern unsigned long empty_zero_page[1024];
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
-#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
-#define PAGE_KERNEL_RO __pgprot(_PAGE_PRESENT | _PAGE_DIRTY | _PAGE_ACCESSED)
+
+#define __PAGE_KERNEL \
+ (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
+#define __PAGE_KERNEL_NOCACHE \
+ (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_PCD | _PAGE_ACCESSED)
+#define __PAGE_KERNEL_RO \
+ (_PAGE_PRESENT | _PAGE_DIRTY | _PAGE_ACCESSED)
+
+#ifdef CONFIG_X86_PGE
+# define MAKE_GLOBAL(x) __pgprot((x) | _PAGE_GLOBAL)
+#else
+# define MAKE_GLOBAL(x) \
+ ({ \
+ pgprot_t __ret; \
+ \
+ if (cpu_has_pge) \
+ __ret = __pgprot((x) | _PAGE_GLOBAL); \
+ else \
+ __ret = __pgprot(x); \
+ __ret; \
+ })
+#endif
+
+#define PAGE_KERNEL MAKE_GLOBAL(__PAGE_KERNEL)
+#define PAGE_KERNEL_RO MAKE_GLOBAL(__PAGE_KERNEL_RO)
+#define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
/*
- * The i386 can't do page protection for execute, and considers that the same are read.
- * Also, write permissions imply read permissions. This is the closest we can get..
+ * The i386 can't do page protection for execute, and considers that
+ * the same are read. Also, write permissions imply read permissions.
+ * This is the closest we can get..
*/
#define __P000 PAGE_NONE
#define __P001 PAGE_READONLY
diff --git a/include/asm-i386/posix_types.h b/include/asm-i386/posix_types.h
index 0a794e306..5529f3270 100644
--- a/include/asm-i386/posix_types.h
+++ b/include/asm-i386/posix_types.h
@@ -24,6 +24,13 @@ typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h
index 242d8e3eb..e5ccac281 100644
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -57,6 +57,7 @@ struct cpuinfo_x86 {
#define X86_VENDOR_UMC 3
#define X86_VENDOR_NEXGEN 4
#define X86_VENDOR_CENTAUR 5
+#define X86_VENDOR_RISE 6
#define X86_VENDOR_UNKNOWN 0xff
/*
@@ -114,7 +115,7 @@ extern struct cpuinfo_x86 cpu_data[];
#define cpu_has_pae \
(boot_cpu_data.x86_capability & X86_FEATURE_PAE)
#define cpu_has_tsc \
- (cpu_data[smp_processor_id()].x86_capability & X86_FEATURE_TSC)
+ (boot_cpu_data.x86_capability & X86_FEATURE_TSC)
extern char ignore_irq13;
diff --git a/include/asm-i386/sembuf.h b/include/asm-i386/sembuf.h
new file mode 100644
index 000000000..323835166
--- /dev/null
+++ b/include/asm-i386/sembuf.h
@@ -0,0 +1,25 @@
+#ifndef _I386_SEMBUF_H
+#define _I386_SEMBUF_H
+
+/*
+ * The semid64_ds structure for i386 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ unsigned long __unused1;
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long __unused2;
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _I386_SEMBUF_H */
diff --git a/include/asm-i386/shmbuf.h b/include/asm-i386/shmbuf.h
new file mode 100644
index 000000000..d1cdc3cb0
--- /dev/null
+++ b/include/asm-i386/shmbuf.h
@@ -0,0 +1,42 @@
+#ifndef _I386_SHMBUF_H
+#define _I386_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for i386 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ unsigned long __unused1;
+ __kernel_time_t shm_dtime; /* last detach time */
+ unsigned long __unused2;
+ __kernel_time_t shm_ctime; /* last change time */
+ unsigned long __unused3;
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _I386_SHMBUF_H */
diff --git a/include/asm-i386/siginfo.h b/include/asm-i386/siginfo.h
index 7c805525c..467aa9d39 100644
--- a/include/asm-i386/siginfo.h
+++ b/include/asm-i386/siginfo.h
@@ -24,7 +24,8 @@ typedef struct siginfo {
/* kill() */
struct {
pid_t _pid; /* sender's pid */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
+ uid_t _uid32; /* sender's uid */
} _kill;
/* POSIX.1b timers */
@@ -36,17 +37,19 @@ typedef struct siginfo {
/* POSIX.1b signals */
struct {
pid_t _pid; /* sender's pid */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
sigval_t _sigval;
+ uid_t _uid32; /* sender's uid */
} _rt;
/* SIGCHLD */
struct {
pid_t _pid; /* which child */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
int _status; /* exit code */
clock_t _utime;
clock_t _stime;
+ uid_t _uid32; /* sender's uid */
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
@@ -62,11 +65,18 @@ typedef struct siginfo {
} _sifields;
} siginfo_t;
+#define UID16_SIGINFO_COMPAT_NEEDED
+
/*
* How these fields are to be accessed.
*/
#define si_pid _sifields._kill._pid
+#ifdef __KERNEL__
+#define si_uid _sifields._kill._uid32
+#define si_uid16 _sifields._kill._uid
+#else
#define si_uid _sifields._kill._uid
+#endif /* __KERNEL__ */
#define si_status _sifields._sigchld._status
#define si_utime _sifields._sigchld._utime
#define si_stime _sifields._sigchld._stime
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index 3425c2cd1..15c2d11b0 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -4,228 +4,64 @@
/*
* We need the APIC definitions automatically as part of 'smp.h'
*/
+#ifndef ASSEMBLY
#include <linux/config.h>
+#include <linux/threads.h>
+#include <linux/ptrace.h>
+#endif
+
#ifdef CONFIG_X86_LOCAL_APIC
#ifndef ASSEMBLY
#include <asm/fixmap.h>
-#include <asm/apic.h>
#include <asm/bitops.h>
+#include <asm/mpspec.h>
+#include <asm/io_apic.h>
+#include <asm/apic.h>
#endif
#endif
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#ifndef ASSEMBLY
-#include <linux/threads.h>
-#include <linux/ptrace.h>
-
-/*
- * Support definitions for SMP machines following the intel multiprocessing
- * specification
- */
-
-/*
- * This tag identifies where the SMP configuration
- * information is.
- */
-
-#define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_')
-
-struct intel_mp_floating
-{
- char mpf_signature[4]; /* "_MP_" */
- unsigned long mpf_physptr; /* Configuration table address */
- unsigned char mpf_length; /* Our length (paragraphs) */
- unsigned char mpf_specification;/* Specification version */
- unsigned char mpf_checksum; /* Checksum (makes sum 0) */
- unsigned char mpf_feature1; /* Standard or configuration ? */
- unsigned char mpf_feature2; /* Bit7 set for IMCR|PIC */
- unsigned char mpf_feature3; /* Unused (0) */
- unsigned char mpf_feature4; /* Unused (0) */
- unsigned char mpf_feature5; /* Unused (0) */
-};
-
-struct mp_config_table
-{
- char mpc_signature[4];
-#define MPC_SIGNATURE "PCMP"
- unsigned short mpc_length; /* Size of table */
- char mpc_spec; /* 0x01 */
- char mpc_checksum;
- char mpc_oem[8];
- char mpc_productid[12];
- unsigned long mpc_oemptr; /* 0 if not present */
- unsigned short mpc_oemsize; /* 0 if not present */
- unsigned short mpc_oemcount;
- unsigned long mpc_lapic; /* APIC address */
- unsigned long reserved;
-};
-
-/* Followed by entries */
-
-#define MP_PROCESSOR 0
-#define MP_BUS 1
-#define MP_IOAPIC 2
-#define MP_INTSRC 3
-#define MP_LINTSRC 4
-
-struct mpc_config_processor
-{
- unsigned char mpc_type;
- unsigned char mpc_apicid; /* Local APIC number */
- unsigned char mpc_apicver; /* Its versions */
- unsigned char mpc_cpuflag;
-#define CPU_ENABLED 1 /* Processor is available */
-#define CPU_BOOTPROCESSOR 2 /* Processor is the BP */
- unsigned long mpc_cpufeature;
-#define CPU_STEPPING_MASK 0x0F
-#define CPU_MODEL_MASK 0xF0
-#define CPU_FAMILY_MASK 0xF00
- unsigned long mpc_featureflag; /* CPUID feature value */
- unsigned long mpc_reserved[2];
-};
-
-struct mpc_config_bus
-{
- unsigned char mpc_type;
- unsigned char mpc_busid;
- unsigned char mpc_bustype[6] __attribute((packed));
-};
-
-#define BUSTYPE_EISA "EISA"
-#define BUSTYPE_ISA "ISA"
-#define BUSTYPE_INTERN "INTERN" /* Internal BUS */
-#define BUSTYPE_MCA "MCA"
-#define BUSTYPE_VL "VL" /* Local bus */
-#define BUSTYPE_PCI "PCI"
-#define BUSTYPE_PCMCIA "PCMCIA"
-
-/* We don't understand the others */
-
-struct mpc_config_ioapic
-{
- unsigned char mpc_type;
- unsigned char mpc_apicid;
- unsigned char mpc_apicver;
- unsigned char mpc_flags;
-#define MPC_APIC_USABLE 0x01
- unsigned long mpc_apicaddr;
-};
-
-struct mpc_config_intsrc
-{
- unsigned char mpc_type;
- unsigned char mpc_irqtype;
- unsigned short mpc_irqflag;
- unsigned char mpc_srcbus;
- unsigned char mpc_srcbusirq;
- unsigned char mpc_dstapic;
- unsigned char mpc_dstirq;
-};
-
-enum mp_irq_source_types {
- mp_INT = 0,
- mp_NMI = 1,
- mp_SMI = 2,
- mp_ExtINT = 3
-};
-
-#define MP_IRQDIR_DEFAULT 0
-#define MP_IRQDIR_HIGH 1
-#define MP_IRQDIR_LOW 3
-
-
-struct mpc_config_lintsrc
-{
- unsigned char mpc_type;
- unsigned char mpc_irqtype;
- unsigned short mpc_irqflag;
- unsigned char mpc_srcbusid;
- unsigned char mpc_srcbusirq;
- unsigned char mpc_destapic;
-#define MP_APIC_ALL 0xFF
- unsigned char mpc_destapiclint;
-};
-
-
/*
- * Default configurations
- *
- * 1 2 CPU ISA 82489DX
- * 2 2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining
- * 3 2 CPU EISA 82489DX
- * 4 2 CPU MCA 82489DX
- * 5 2 CPU ISA+PCI
- * 6 2 CPU EISA+PCI
- * 7 2 CPU MCA+PCI
- */
-
-/*
- * Private routines/data
+ * Private routines/data
*/
-extern int smp_found_config;
-extern void init_smp_config(void);
-extern void init_smp_mappings(void);
extern void smp_alloc_memory(void);
-extern unsigned long cpu_present_map;
+extern unsigned long phys_cpu_present_map;
extern unsigned long cpu_online_map;
extern volatile unsigned long smp_invalidate_needed;
extern int pic_mode;
extern void smp_flush_tlb(void);
-extern int get_maxlvt(void);
-extern void disable_local_APIC (void);
extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs);
extern void smp_send_reschedule(int cpu);
extern void smp_invalidate_rcv(void); /* Process an NMI */
-extern void smp_local_timer_interrupt(struct pt_regs * regs);
extern void (*mtrr_hook) (void);
-extern void setup_APIC_clocks(void);
extern void zap_low_mappings (void);
-extern volatile int cpu_number_map[NR_CPUS];
-extern volatile int __cpu_logical_map[NR_CPUS];
-extern inline int cpu_logical_map(int cpu)
-{
- return __cpu_logical_map[cpu];
-}
-extern __inline void apic_write(unsigned long reg, unsigned long v)
+/*
+ * On x86 all CPUs are mapped 1:1 to the APIC space.
+ * This simplifies scheduling and IPI sending and
+ * compresses data structures.
+ */
+extern inline int cpu_logical_map(int cpu)
{
- *((volatile unsigned long *)(APIC_BASE+reg))=v;
+ return cpu;
}
-
-extern __inline unsigned long apic_read(unsigned long reg)
+extern inline int cpu_number_map(int cpu)
{
- return *((volatile unsigned long *)(APIC_BASE+reg));
+ return cpu;
}
-extern unsigned int apic_timer_irqs [NR_CPUS];
-
-#ifdef CONFIG_X86_GOOD_APIC
-# define FORCE_READ_AROUND_WRITE 0
-# define apic_readaround(x)
-#else
-# define FORCE_READ_AROUND_WRITE 1
-# define apic_readaround(x) apic_read(x)
-#endif
-
-#define apic_write_around(x,y) \
- do { apic_readaround(x); apic_write(x,y); } while (0)
-
-extern inline void ack_APIC_irq(void)
-{
- /* Clear the IPI */
-
- apic_readaround(APIC_EOI);
- /*
- * on P6+ cores (CONFIG_X86_GOOD_APIC) ack_APIC_irq() actually
- * gets compiled as a single instruction ... yummie.
- */
- apic_write(APIC_EOI, 0); /* Docs say use 0 for future compatibility */
-}
+/*
+ * Some lowlevel functions might want to know about
+ * the real APIC ID <-> CPU # mapping.
+ */
+extern volatile int x86_apicid_to_cpu[NR_CPUS];
+extern volatile int x86_cpu_to_apicid[NR_CPUS];
/*
- * General functions that each host system must provide.
+ * General functions that each host system must provide.
*/
extern void smp_boot_cpus(void);
diff --git a/include/asm-i386/smplock.h b/include/asm-i386/smplock.h
index ed5c58254..2c4b30791 100644
--- a/include/asm-i386/smplock.h
+++ b/include/asm-i386/smplock.h
@@ -5,6 +5,8 @@
*/
#include <linux/interrupt.h>
#include <linux/spinlock.h>
+#include <linux/sched.h>
+#include <asm/current.h>
extern spinlock_t kernel_flag;
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h
index 5cf17b846..44a2e59e5 100644
--- a/include/asm-i386/spinlock.h
+++ b/include/asm-i386/spinlock.h
@@ -96,7 +96,7 @@ extern inline void spin_unlock(spinlock_t *lock)
:"=m" (__dummy_lock(lock)));
}
-#define spin_trylock(lock) (!test_and_set_bit(0,(lock)))
+#define spin_trylock(lock) ({ !test_and_set_bit(0,(lock)); })
/*
* Read-write spinlocks, allowing multiple readers
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index 5ddbd7635..22286e151 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -202,6 +202,25 @@
#define __NR_stat64 195
#define __NR_lstat64 196
#define __NR_fstat64 197
+#define __NR_lchown32 198
+#define __NR_getuid32 199
+#define __NR_getgid32 200
+#define __NR_geteuid32 201
+#define __NR_getegid32 202
+#define __NR_setreuid32 203
+#define __NR_setregid32 204
+#define __NR_getgroups32 205
+#define __NR_setgroups32 206
+#define __NR_fchown32 207
+#define __NR_setresuid32 208
+#define __NR_getresuid32 209
+#define __NR_setresgid32 210
+#define __NR_getresgid32 211
+#define __NR_chown32 212
+#define __NR_setuid32 213
+#define __NR_setgid32 214
+#define __NR_setfsuid32 215
+#define __NR_setfsgid32 216
/* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
diff --git a/include/asm-m68k/ipcbuf.h b/include/asm-m68k/ipcbuf.h
new file mode 100644
index 000000000..a623ea3f0
--- /dev/null
+++ b/include/asm-m68k/ipcbuf.h
@@ -0,0 +1,29 @@
+#ifndef __m68k_IPCBUF_H__
+#define __m68k_IPCBUF_H__
+
+/*
+ * The user_ipc_perm structure for m68k architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_uid32_t cuid;
+ __kernel_gid32_t cgid;
+ __kernel_mode_t mode;
+ unsigned short __pad1;
+ unsigned short seq;
+ unsigned short __pad2;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* __m68k_IPCBUF_H__ */
diff --git a/include/asm-m68k/msgbuf.h b/include/asm-m68k/msgbuf.h
new file mode 100644
index 000000000..9ce71a86d
--- /dev/null
+++ b/include/asm-m68k/msgbuf.h
@@ -0,0 +1,31 @@
+#ifndef _M68K_MSGBUF_H
+#define _M68K_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for m68k architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ unsigned long __unused1;
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ unsigned long __unused2;
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long __unused3;
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+#endif /* _M68K_MSGBUF_H */
diff --git a/include/asm-m68k/posix_types.h b/include/asm-m68k/posix_types.h
index 460de0b30..fa372b226 100644
--- a/include/asm-m68k/posix_types.h
+++ b/include/asm-m68k/posix_types.h
@@ -24,6 +24,13 @@ typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
diff --git a/include/asm-m68k/sembuf.h b/include/asm-m68k/sembuf.h
new file mode 100644
index 000000000..e2af7d471
--- /dev/null
+++ b/include/asm-m68k/sembuf.h
@@ -0,0 +1,25 @@
+#ifndef _M68K_SEMBUF_H
+#define _M68K_SEMBUF_H
+
+/*
+ * The semid64_ds structure for m68k architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ unsigned long __unused1;
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long __unused2;
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _M68K_SEMBUF_H */
diff --git a/include/asm-m68k/shmbuf.h b/include/asm-m68k/shmbuf.h
new file mode 100644
index 000000000..358ecbfb9
--- /dev/null
+++ b/include/asm-m68k/shmbuf.h
@@ -0,0 +1,42 @@
+#ifndef _M68K_SHMBUF_H
+#define _M68K_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for m68k architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ unsigned long __unused1;
+ __kernel_time_t shm_dtime; /* last detach time */
+ unsigned long __unused2;
+ __kernel_time_t shm_ctime; /* last change time */
+ unsigned long __unused3;
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _M68K_SHMBUF_H */
diff --git a/include/asm-m68k/siginfo.h b/include/asm-m68k/siginfo.h
index 4061e6f72..2dac2b063 100644
--- a/include/asm-m68k/siginfo.h
+++ b/include/asm-m68k/siginfo.h
@@ -24,7 +24,8 @@ typedef struct siginfo {
/* kill() */
struct {
pid_t _pid; /* sender's pid */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
+ uid_t _uid32; /* sender's uid */
} _kill;
/* POSIX.1b timers */
@@ -36,17 +37,19 @@ typedef struct siginfo {
/* POSIX.1b signals */
struct {
pid_t _pid; /* sender's pid */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
sigval_t _sigval;
+ uid_t _uid32; /* sender's uid */
} _rt;
/* SIGCHLD */
struct {
pid_t _pid; /* which child */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
int _status; /* exit code */
clock_t _utime;
clock_t _stime;
+ uid_t _uid32; /* sender's uid */
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
@@ -62,11 +65,18 @@ typedef struct siginfo {
} _sifields;
} siginfo_t;
+#define UID16_SIGINFO_COMPAT_NEEDED
+
/*
* How these fields are to be accessed.
*/
#define si_pid _sifields._kill._pid
+#ifdef __KERNEL__
+#define si_uid _sifields._kill._uid32
+#define si_uid16 _sifields._kill._uid
+#else
#define si_uid _sifields._kill._uid
+#endif /* __KERNEL__ */
#define si_status _sifields._sigchld._status
#define si_utime _sifields._sigchld._utime
#define si_stime _sifields._sigchld._stime
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index e2e8e7ddb..715eb6496 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -201,6 +201,25 @@
#define __NR_stat64 195
#define __NR_lstat64 196
#define __NR_fstat64 197
+#define __NR_chown32 198
+#define __NR_getuid32 199
+#define __NR_getgid32 200
+#define __NR_geteuid32 201
+#define __NR_getegid32 202
+#define __NR_setreuid32 203
+#define __NR_setregid32 204
+#define __NR_getgroups32 205
+#define __NR_setgroups32 206
+#define __NR_fchown32 207
+#define __NR_setresuid32 208
+#define __NR_getresuid32 209
+#define __NR_setresgid32 210
+#define __NR_getresgid32 211
+#define __NR_lchown32 212
+#define __NR_setuid32 213
+#define __NR_setgid32 214
+#define __NR_setfsuid32 215
+#define __NR_setfsgid32 216
/* user-visible error numbers are in the range -1 - -122: see
<asm-m68k/errno.h> */
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h
index 6ca4bd70e..5d4f314dc 100644
--- a/include/asm-mips/checksum.h
+++ b/include/asm-mips/checksum.h
@@ -1,4 +1,4 @@
-/* $Id: checksum.h,v 1.5 1998/07/10 01:14:54 ralf Exp $
+/* $Id: checksum.h,v 1.6 1998/09/19 19:19:36 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
@@ -6,8 +6,8 @@
*
* Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle
*/
-#ifndef __ASM_MIPS_CHECKSUM_H
-#define __ASM_MIPS_CHECKSUM_H
+#ifndef _ASM_CHECKSUM_H
+#define _ASM_CHECKSUM_H
/*
* computes the checksum of a memory block at buff, length len,
@@ -36,9 +36,23 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len,
unsigned int sum, int *errp);
+/*
+ * Copy and checksum to user
+ */
#define HAVE_CSUM_COPY_USER
-unsigned int csum_and_copy_to_user (const char *src, char *dst,
- int len, int sum, int *err_ptr);
+extern inline unsigned int
+csum_and_copy_to_user (const char *src, char *dst,
+ int len, int sum, int *err_ptr)
+{
+ sum = csum_partial(src, len, sum);
+
+ if (copy_to_user(dst, src, len)) {
+ *err_ptr = -EFAULT;
+ return -1;
+ }
+
+ return sum;
+}
/*
* the same as csum_partial, but copies from user space (but on MIPS
@@ -252,4 +266,4 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
return csum_fold(sum);
}
-#endif /* __ASM_MIPS_CHECKSUM_H */
+#endif /* _ASM_CHECKSUM_H */
diff --git a/include/asm-mips/ipcbuf.h b/include/asm-mips/ipcbuf.h
new file mode 100644
index 000000000..4c898f677
--- /dev/null
+++ b/include/asm-mips/ipcbuf.h
@@ -0,0 +1,28 @@
+#ifndef _ASM_IPCBUF_H
+#define _ASM_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit seq
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ __kernel_mode_t mode;
+ unsigned short seq;
+ unsigned short __pad1;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_IPCBUF_H */
diff --git a/include/asm-mips/msgbuf.h b/include/asm-mips/msgbuf.h
new file mode 100644
index 000000000..81d6e7145
--- /dev/null
+++ b/include/asm-mips/msgbuf.h
@@ -0,0 +1,27 @@
+#ifndef _ASM_MSGBUF_H
+#define _ASM_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_MSGBUF_H */
diff --git a/include/asm-mips/offset.h b/include/asm-mips/offset.h
index 93634b6cf..d90dfcac9 100644
--- a/include/asm-mips/offset.h
+++ b/include/asm-mips/offset.h
@@ -49,33 +49,33 @@
#define TASK_FLAGS 4
#define TASK_SIGPENDING 8
#define TASK_NEED_RESCHED 20
-#define TASK_COUNTER 24
-#define TASK_PRIORITY 28
-#define TASK_MM 792
+#define TASK_COUNTER 32
+#define TASK_PRIORITY 36
+#define TASK_MM 44
#define TASK_STRUCT_SIZE 888
/* MIPS specific thread_struct offsets. */
-#define THREAD_REG16 568
-#define THREAD_REG17 572
-#define THREAD_REG18 576
-#define THREAD_REG19 580
-#define THREAD_REG20 584
-#define THREAD_REG21 588
-#define THREAD_REG22 592
-#define THREAD_REG23 596
-#define THREAD_REG29 600
-#define THREAD_REG30 604
-#define THREAD_REG31 608
-#define THREAD_STATUS 612
-#define THREAD_FPU 616
-#define THREAD_BVADDR 752
-#define THREAD_BUADDR 756
-#define THREAD_ECODE 760
-#define THREAD_TRAPNO 764
-#define THREAD_MFLAGS 768
-#define THREAD_CURDS 772
-#define THREAD_TRAMP 776
-#define THREAD_OLDCTX 780
+#define THREAD_REG16 576
+#define THREAD_REG17 580
+#define THREAD_REG18 584
+#define THREAD_REG19 588
+#define THREAD_REG20 592
+#define THREAD_REG21 596
+#define THREAD_REG22 600
+#define THREAD_REG23 604
+#define THREAD_REG29 608
+#define THREAD_REG30 612
+#define THREAD_REG31 616
+#define THREAD_STATUS 620
+#define THREAD_FPU 624
+#define THREAD_BVADDR 760
+#define THREAD_BUADDR 764
+#define THREAD_ECODE 768
+#define THREAD_TRAPNO 772
+#define THREAD_MFLAGS 776
+#define THREAD_CURDS 780
+#define THREAD_TRAMP 784
+#define THREAD_OLDCTX 788
/* Linux mm_struct offsets. */
#define MM_USERS 16
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h
index 853e19b32..b6a865e9a 100644
--- a/include/asm-mips/pci.h
+++ b/include/asm-mips/pci.h
@@ -1,4 +1,4 @@
-/* $Id: pci.h,v 1.5 1999/01/04 16:09:24 ralf Exp $
+/* $Id: pci.h,v 1.6 1999/10/09 00:01:43 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
@@ -13,4 +13,7 @@
#define pcibios_assign_all_busses() 0
+#define PCIBIOS_MIN_IO 0x1000
+#define PCIBIOS_MIN_MEM 0x10000000
+
#endif /* _ASM_PCI_H */
diff --git a/include/asm-mips/posix_types.h b/include/asm-mips/posix_types.h
index 3ddd7def2..a1e1080e7 100644
--- a/include/asm-mips/posix_types.h
+++ b/include/asm-mips/posix_types.h
@@ -1,4 +1,4 @@
-/* $Id: posix_types.h,v 1.5 1998/08/25 09:22:00 ralf Exp $
+/* $Id: posix_types.h,v 1.6 2000/02/04 23:32:54 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
@@ -33,6 +33,13 @@ typedef long __kernel_clock_t;
typedef long __kernel_daddr_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef long __kernel_uid32_t;
+typedef long __kernel_gid32_t;
+typedef __kernel_uid_t __kernel_old_uid_t;
+typedef __kernel_gid_t __kernel_old_gid_t;
+
#ifdef __GNUC__
typedef long long __kernel_loff_t;
#endif
diff --git a/include/asm-mips/sembuf.h b/include/asm-mips/sembuf.h
new file mode 100644
index 000000000..31892984e
--- /dev/null
+++ b/include/asm-mips/sembuf.h
@@ -0,0 +1,22 @@
+#ifndef _ASM_SEMBUF_H
+#define _ASM_SEMBUF_H
+
+/*
+ * The semid64_ds structure for the MIPS architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_SEMBUF_H */
diff --git a/include/asm-mips/shmbuf.h b/include/asm-mips/shmbuf.h
new file mode 100644
index 000000000..077cfced3
--- /dev/null
+++ b/include/asm-mips/shmbuf.h
@@ -0,0 +1,38 @@
+#ifndef _ASM_SHMBUF_H
+#define _ASM_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for the MIPS architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ __kernel_time_t shm_dtime; /* last detach time */
+ __kernel_time_t shm_ctime; /* last change time */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _ASM_SHMBUF_H */
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h
index 502822d0e..b152af535 100644
--- a/include/asm-mips/string.h
+++ b/include/asm-mips/string.h
@@ -1,4 +1,4 @@
-/* $Id: string.h,v 1.10 1999/04/11 18:37:56 harald Exp $
+/* $Id: string.h,v 1.11 1999/08/13 17:07:28 harald 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
@@ -91,30 +91,31 @@ extern __inline__ int strcmp(__const__ char *__cs, __const__ char *__ct)
}
#define __HAVE_ARCH_STRNCMP
-extern __inline__ int strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count)
+extern __inline__ int
+strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count)
{
- int __res;
+ int __res;
- __asm__ __volatile__(
+ __asm__ __volatile__(
".set\tnoreorder\n\t"
".set\tnoat\n"
- "1:\tlbu\t%3,(%1)\n\t"
+ "1:\tlbu\t%3,(%0)\n\t"
"beqz\t%2,2f\n\t"
- "lbu\t$1,(%0)\n\t"
- "addiu\t%1,1\n\t"
- "subu\t%3,$1,%3\n\t"
- "bnez\t%3,2f\n\t"
+ "lbu\t$1,(%1)\n\t"
+ "subu\t%2,1\n\t"
+ "bne\t$1,%3,3f\n\t"
"addiu\t%0,1\n\t"
- "bnez\t%1,1b\n"
- "addiu\t%2,-1\n"
- "2:\n\t"
+ "bnez\t%3,1b\n\t"
+ "addiu\t%1,1\n"
+ "2:\tmove\t%3,$1\n"
+ "3:\tsubu\t%3,$1\n\t"
".set\tat\n\t"
".set\treorder"
: "=r" (__cs), "=r" (__ct), "=r" (__count), "=r" (__res)
: "0" (__cs), "1" (__ct), "2" (__count)
: "$1");
- return __res;
+ return __res;
}
#define __HAVE_ARCH_MEMSET
diff --git a/include/asm-mips64/checksum.h b/include/asm-mips64/checksum.h
index 5c928cfb5..7d389ed21 100644
--- a/include/asm-mips64/checksum.h
+++ b/include/asm-mips64/checksum.h
@@ -1,4 +1,4 @@
-/* $Id: checksum.h,v 1.3 1999/11/19 20:35:48 ralf Exp $
+/* $Id: checksum.h,v 1.3 1999/11/19 23:22:59 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
@@ -37,9 +37,23 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len,
unsigned int sum, int *errp);
+/*
+ * Copy and checksum to user
+ */
#define HAVE_CSUM_COPY_USER
-unsigned int csum_and_copy_to_user (const char *src, char *dst,
- int len, int sum, int *err_ptr);
+extern inline unsigned int
+csum_and_copy_to_user (const char *src, char *dst,
+ int len, int sum, int *err_ptr)
+{
+ sum = csum_partial(src, len, sum);
+
+ if (copy_to_user(dst, src, len)) {
+ *err_ptr = -EFAULT;
+ return -1;
+ }
+
+ return sum;
+}
/*
* the same as csum_partial, but copies from user space (but on MIPS
diff --git a/include/asm-mips64/ipcbuf.h b/include/asm-mips64/ipcbuf.h
new file mode 100644
index 000000000..4c898f677
--- /dev/null
+++ b/include/asm-mips64/ipcbuf.h
@@ -0,0 +1,28 @@
+#ifndef _ASM_IPCBUF_H
+#define _ASM_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit seq
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ __kernel_mode_t mode;
+ unsigned short seq;
+ unsigned short __pad1;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_IPCBUF_H */
diff --git a/include/asm-mips64/msgbuf.h b/include/asm-mips64/msgbuf.h
new file mode 100644
index 000000000..81d6e7145
--- /dev/null
+++ b/include/asm-mips64/msgbuf.h
@@ -0,0 +1,27 @@
+#ifndef _ASM_MSGBUF_H
+#define _ASM_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_MSGBUF_H */
diff --git a/include/asm-mips64/offset.h b/include/asm-mips64/offset.h
index a7711ea2d..d292080de 100644
--- a/include/asm-mips64/offset.h
+++ b/include/asm-mips64/offset.h
@@ -49,33 +49,33 @@
#define TASK_FLAGS 8
#define TASK_SIGPENDING 16
#define TASK_NEED_RESCHED 40
-#define TASK_COUNTER 48
-#define TASK_PRIORITY 56
-#define TASK_MM 1304
+#define TASK_COUNTER 56
+#define TASK_PRIORITY 64
+#define TASK_MM 80
#define TASK_STRUCT_SIZE 1448
/* MIPS specific thread_struct offsets. */
-#define THREAD_REG16 864
-#define THREAD_REG17 872
-#define THREAD_REG18 880
-#define THREAD_REG19 888
-#define THREAD_REG20 896
-#define THREAD_REG21 904
-#define THREAD_REG22 912
-#define THREAD_REG23 920
-#define THREAD_REG29 928
-#define THREAD_REG30 936
-#define THREAD_REG31 944
-#define THREAD_STATUS 952
-#define THREAD_FPU 960
-#define THREAD_BVADDR 1224
-#define THREAD_BUADDR 1232
-#define THREAD_ECODE 1240
-#define THREAD_TRAPNO 1248
-#define THREAD_MFLAGS 1256
-#define THREAD_CURDS 1264
-#define THREAD_TRAMP 1272
-#define THREAD_OLDCTX 1280
+#define THREAD_REG16 880
+#define THREAD_REG17 888
+#define THREAD_REG18 896
+#define THREAD_REG19 904
+#define THREAD_REG20 912
+#define THREAD_REG21 920
+#define THREAD_REG22 928
+#define THREAD_REG23 936
+#define THREAD_REG29 944
+#define THREAD_REG30 952
+#define THREAD_REG31 960
+#define THREAD_STATUS 968
+#define THREAD_FPU 976
+#define THREAD_BVADDR 1240
+#define THREAD_BUADDR 1248
+#define THREAD_ECODE 1256
+#define THREAD_TRAPNO 1264
+#define THREAD_MFLAGS 1272
+#define THREAD_CURDS 1280
+#define THREAD_TRAMP 1288
+#define THREAD_OLDCTX 1296
/* Linux mm_struct offsets. */
#define MM_USERS 32
diff --git a/include/asm-mips64/pci.h b/include/asm-mips64/pci.h
index 89eca5bf3..96a39ad98 100644
--- a/include/asm-mips64/pci.h
+++ b/include/asm-mips64/pci.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: pci.h,v 1.1 1999/12/04 03:59:12 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
@@ -13,4 +13,7 @@
#define pcibios_assign_all_busses() 0
+#define PCIBIOS_MIN_IO 0x1000
+#define PCIBIOS_MIN_MEM 0x10000000
+
#endif /* _ASM_PCI_H */
diff --git a/include/asm-mips64/posix_types.h b/include/asm-mips64/posix_types.h
index 24a997ba7..94d973f65 100644
--- a/include/asm-mips64/posix_types.h
+++ b/include/asm-mips64/posix_types.h
@@ -1,4 +1,4 @@
-/* $Id: posix_types.h,v 1.2 1999/12/04 03:59:12 ralf Exp $
+/* $Id: posix_types.h,v 1.3 2000/02/04 23:32:54 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
@@ -34,6 +34,13 @@ typedef int __kernel_clock_t;
typedef long __kernel_daddr_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef int __kernel_uid32_t;
+typedef int __kernel_gid32_t;
+typedef __kernel_uid_t __kernel_old_uid_t;
+typedef __kernel_gid_t __kernel_old_gid_t;
+
#ifdef __GNUC__
typedef long long __kernel_loff_t;
#endif
diff --git a/include/asm-mips64/sembuf.h b/include/asm-mips64/sembuf.h
new file mode 100644
index 000000000..31892984e
--- /dev/null
+++ b/include/asm-mips64/sembuf.h
@@ -0,0 +1,22 @@
+#ifndef _ASM_SEMBUF_H
+#define _ASM_SEMBUF_H
+
+/*
+ * The semid64_ds structure for the MIPS architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_SEMBUF_H */
diff --git a/include/asm-mips64/shmbuf.h b/include/asm-mips64/shmbuf.h
new file mode 100644
index 000000000..077cfced3
--- /dev/null
+++ b/include/asm-mips64/shmbuf.h
@@ -0,0 +1,38 @@
+#ifndef _ASM_SHMBUF_H
+#define _ASM_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for the MIPS architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ __kernel_time_t shm_dtime; /* last detach time */
+ __kernel_time_t shm_ctime; /* last change time */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _ASM_SHMBUF_H */
diff --git a/include/asm-ppc/board.h b/include/asm-ppc/board.h
index 39ab9da51..1476a232a 100644
--- a/include/asm-ppc/board.h
+++ b/include/asm-ppc/board.h
@@ -27,6 +27,12 @@
extern "C" {
#endif
+/*
+ * The "residual" board information structure the boot loader passes
+ * into the kernel.
+ */
+
+extern unsigned char __res[];
#ifdef __cplusplus
diff --git a/include/asm-ppc/hw_irq.h b/include/asm-ppc/hw_irq.h
index a0deca1ea..6a417940b 100644
--- a/include/asm-ppc/hw_irq.h
+++ b/include/asm-ppc/hw_irq.h
@@ -34,7 +34,7 @@ struct int_control_struct
extern struct int_control_struct int_control;
extern unsigned long timer_interrupt_intercept;
extern unsigned long do_IRQ_intercept;
-void timer_interrupt(struct pt_regs *);
+int timer_interrupt(struct pt_regs *);
extern void __no_use_sti(void);
extern void __no_use_cli(void);
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 051aed929..21e4930de 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -100,7 +100,7 @@ extern void _outsw_ns(volatile unsigned short *port, const void *buf, int ns);
extern void _insl_ns(volatile unsigned long *port, void *buf, int nl);
extern void _outsl_ns(volatile unsigned long *port, const void *buf, int nl);
-#define IO_SPACE_LIMIT 0xffff
+#define IO_SPACE_LIMIT ~0
#define memset_io(a,b,c) memset((a),(b),(c))
#define memcpy_fromio(a,b,c) memcpy((a),(b),(c))
diff --git a/include/asm-ppc/ipcbuf.h b/include/asm-ppc/ipcbuf.h
new file mode 100644
index 000000000..98c75e646
--- /dev/null
+++ b/include/asm-ppc/ipcbuf.h
@@ -0,0 +1,11 @@
+#ifndef __PPC_IPCBUF_H__
+#define __PPC_IPCBUF_H__
+
+/*
+ * The ipc64_perm structure for the PPC is identical to kern_ipc_perm
+ * as we have always had 32-bit UIDs and GIDs in the kernel.
+ */
+
+#define ipc64_perm kern_ipc_perm
+
+#endif /* __PPC_IPCBUF_H__ */
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h
index 40b372fe2..11a272bba 100644
--- a/include/asm-ppc/irq.h
+++ b/include/asm-ppc/irq.h
@@ -9,50 +9,47 @@ extern void disable_irq(unsigned int);
extern void disable_irq_nosync(unsigned int);
extern void enable_irq(unsigned int);
-#ifndef CONFIG_8xx
-
-#ifdef CONFIG_APUS
-#define enable_irq m68k_enable_irq
-#define disable_irq m68k_disable_irq
-#include <asm-m68k/irq.h>
-#undef enable_irq
-#undef disable_irq
-#else /* CONFIG_APUS */
+#if defined(CONFIG_4xx)
/*
- * this is the # irq's for all ppc arch's (pmac/chrp/prep)
- * so it is the max of them all - which happens to be powermac
- * at present (G3 powermacs have 64).
+ * The PowerPC 403 cores' Asynchronous Interrupt Controller (AIC) has
+ * 32 possible interrupts, a majority of which are not implemented on
+ * all cores. There are six configurable, external interrupt pins and
+ * there are eight internal interrupts for the on-chip serial port
+ * (SPU), DMA controller, and JTAG controller.
+ *
+ * The PowerPC 405 cores' Universal Interrupt Controller (UIC) has 32
+ * possible interrupts as well. There are seven, configurable external
+ * interrupt pins and there are 17 internal interrupts for the on-chip
+ * serial port, DMA controller, on-chip Ethernet controller, PCI, etc.
+ *
*/
-#define NR_IRQS 128
-
-#endif /* CONFIG_APUS */
-
-#define NUM_8259_INTERRUPTS 16
-#define IRQ_8259_CASCADE 16
-#define openpic_to_irq(n) ((n)+NUM_8259_INTERRUPTS)
-#define irq_to_openpic(n) ((n)-NUM_8259_INTERRUPTS)
-#ifndef CONFIG_APUS
-/*
- * This gets called from serial.c, which is now used on
- * powermacs as well as prep/chrp boxes.
- * Prep and chrp both have cascaded 8259 PICs.
- */
-static __inline__ int irq_cannonicalize(int irq)
+#define NR_IRQS 32
+
+#define AIC_INT0 (0)
+#define AIC_INT4 (4)
+#define AIC_INT5 (5)
+#define AIC_INT6 (6)
+#define AIC_INT7 (7)
+#define AIC_INT8 (8)
+#define AIC_INT9 (9)
+#define AIC_INT10 (10)
+#define AIC_INT11 (11)
+#define AIC_INT27 (27)
+#define AIC_INT28 (28)
+#define AIC_INT29 (29)
+#define AIC_INT30 (30)
+#define AIC_INT31 (31)
+
+
+static __inline__ int
+irq_cannonicalize(int irq)
{
- if (ppc_md.irq_cannonicalize)
- {
- return ppc_md.irq_cannonicalize(irq);
- }
- else
- {
- return irq;
- }
+ return (irq);
}
-#endif
-#else /* CONFIG_8xx */
+#elif defined(CONFIG_8xx)
/* The MPC8xx cores have 16 possible interrupts. There are eight
* possible level sensitive interrupts assigned and generated internally
@@ -120,6 +117,49 @@ static __inline__ int irq_cannonicalize(int irq)
return irq;
}
-#endif /* CONFIG_8xx */
+#else
+
+#ifdef CONFIG_APUS
+#define enable_irq m68k_enable_irq
+#define disable_irq m68k_disable_irq
+#include <asm-m68k/irq.h>
+#undef enable_irq
+#undef disable_irq
+#else /* CONFIG_APUS */
+
+/*
+ * this is the # irq's for all ppc arch's (pmac/chrp/prep)
+ * so it is the max of them all - which happens to be powermac
+ * at present (G3 powermacs have 64).
+ */
+#define NR_IRQS 128
+
+#endif /* CONFIG_APUS */
+
+#define NUM_8259_INTERRUPTS 16
+#define IRQ_8259_CASCADE 16
+#define openpic_to_irq(n) ((n)+NUM_8259_INTERRUPTS)
+#define irq_to_openpic(n) ((n)-NUM_8259_INTERRUPTS)
+
+#ifndef CONFIG_APUS
+/*
+ * This gets called from serial.c, which is now used on
+ * powermacs as well as prep/chrp boxes.
+ * Prep and chrp both have cascaded 8259 PICs.
+ */
+static __inline__ int irq_cannonicalize(int irq)
+{
+ if (ppc_md.irq_cannonicalize)
+ {
+ return ppc_md.irq_cannonicalize(irq);
+ }
+ else
+ {
+ return irq;
+ }
+}
+#endif /* !CONFIG_APUS */
#endif
+
+#endif /* _ASM_IRQ_H */
diff --git a/include/asm-ppc/msgbuf.h b/include/asm-ppc/msgbuf.h
new file mode 100644
index 000000000..ebfb950a2
--- /dev/null
+++ b/include/asm-ppc/msgbuf.h
@@ -0,0 +1,26 @@
+#ifndef _PPC_MSGBUF_H
+#define _PPC_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for the PPC architecture.
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ unsigned int __unused0;
+ unsigned int __unused1;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ unsigned int __unused2;
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ unsigned int __unused3;
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+#endif /* _PPC_MSGBUF_H */
diff --git a/include/asm-ppc/oak.h b/include/asm-ppc/oak.h
index b85cc84ed..c906f5c4d 100644
--- a/include/asm-ppc/oak.h
+++ b/include/asm-ppc/oak.h
@@ -14,6 +14,8 @@
#ifndef __OAK_H__
#define __OAK_H__
+#include <asm/irq.h>
+
#ifdef __cplusplus
extern "C" {
@@ -23,6 +25,41 @@ extern "C" {
#define _ISA_MEM_BASE 0
#define PCI_DRAM_OFFSET 0
+/* Memory map for the "Oak" evaluation board */
+
+#define PPC403SPU_IO_BASE 0x40000000 /* 403 On-chip serial port */
+#define PPC403SPU_IO_SIZE 0x00000008
+#define OAKSERIAL_IO_BASE 0x7E000000 /* NS16550DV serial port */
+#define OAKSERIAL_IO_SIZE 0x00000008
+#define OAKNET_IO_BASE 0xF4000000 /* NS83902AV Ethernet */
+#define OAKNET_IO_SIZE 0x00000040
+#define OAKPROM_IO_BASE 0xFFFE0000 /* AMD 29F010 Flash ROM */
+#define OAKPROM_IO_SIZE 0x00020000
+
+
+/* Interrupt assignments fixed by the hardware implementation */
+
+#define PPC403SPU_RX_INT AIC_INT4
+#define PPC403SPU_TX_INT AIC_INT5
+#define OAKNET_INT AIC_INT27
+#define OAKSERIAL_INT AIC_INT28
+
+/*
+ * Data structure defining board information maintained by the boot
+ * ROM on IBM's "Oak" evaluation board. An effort has been made to
+ * keep the field names consistent with the 8xx 'bd_t' board info
+ * structures.
+ */
+
+typedef struct board_info {
+ unsigned char bi_s_version[4]; /* Version of this structure */
+ unsigned char bi_r_version[30]; /* Version of the IBM ROM */
+ unsigned int bi_memsize; /* DRAM installed, in bytes */
+ unsigned char bi_enetaddr[6]; /* Ethernet MAC address */
+ unsigned int bi_intfreq; /* Processor speed, in Hz */
+ unsigned int bi_busfreq; /* Bus speed, in Hz */
+} bd_t;
+
#ifdef __cplusplus
}
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
index d1f8eb158..698ecc518 100644
--- a/include/asm-ppc/pci.h
+++ b/include/asm-ppc/pci.h
@@ -7,4 +7,7 @@
*/
#define pcibios_assign_all_busses() 0
+#define PCIBIOS_MIN_IO 0x1000
+#define PCIBIOS_MIN_MEM 0x10000000
+
#endif /* __PPC_PCI_H */
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index 3c1eec8c0..3949a7b5f 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -4,20 +4,21 @@
#include <linux/config.h>
#ifndef __ASSEMBLY__
+#include <linux/sched.h>
#include <linux/threads.h>
#include <asm/processor.h> /* For TASK_SIZE */
#include <asm/mmu.h>
#include <asm/page.h>
-#ifndef CONFIG_8xx
-struct mm_struct;
-struct vm_area_struct;
+#if defined(CONFIG_4xx)
extern void local_flush_tlb_all(void);
extern void local_flush_tlb_mm(struct mm_struct *mm);
extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
extern void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
- unsigned long end);
-#else /* CONFIG_8xx */
+ unsigned long end);
+extern inline void flush_hash_page(unsigned context, unsigned long va)
+ { }
+#elif defined(CONFIG_8xx)
#define __tlbia() asm volatile ("tlbia" : : )
extern inline void local_flush_tlb_all(void)
@@ -32,6 +33,14 @@ extern inline void local_flush_tlb_range(struct mm_struct *mm,
{ __tlbia(); }
extern inline void flush_hash_page(unsigned context, unsigned long va)
{ }
+#else
+struct mm_struct;
+struct vm_area_struct;
+extern void local_flush_tlb_all(void);
+extern void local_flush_tlb_mm(struct mm_struct *mm);
+extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
+extern void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
+ unsigned long end);
#endif
#define flush_tlb_all local_flush_tlb_all
@@ -148,8 +157,59 @@ extern unsigned long ioremap_bot, ioremap_base;
* Bits in a linux-style PTE. These match the bits in the
* (hardware-defined) PowerPC PTE as closely as possible.
*/
-#ifndef CONFIG_8xx
-/* Definitions for 60x, 740/750, etc. */
+
+#if defined(CONFIG_4xx)
+/*
+ * At present, all PowerPC 400-class processors share a similar TLB
+ * architecture. The instruction and data sides share a unified, 64-entry,
+ * fully-associative TLB which is maintained under software control. In
+ * addition, the instruction side has a hardware-managed, 4-entry, fully-
+ * associative TLB which serves as a first level to the shared TLB. These
+ * two TLBs are known as the UTLB and ITLB, respectively.
+ */
+
+#define PPC4XX_TLB_SIZE 64
+
+/*
+ * TLB entries are defined by a "high" tag portion and a "low" data portion.
+ * On all architectures, the data portion is 32-bits.
+ */
+
+#define TLB_LO 1
+#define TLB_HI 0
+
+#define TLB_DATA TLB_LO
+#define TLB_TAG TLB_HI
+
+/* Tag portion */
+
+#define TLB_EPN_MASK 0xFFFFFC00 /* Effective Page Number */
+#define TLB_PAGESZ_MASK 0x00000380
+#define TLB_PAGESZ(x) (((x) & 0x7) << 7)
+#define PAGESZ_1K 0
+#define PAGESZ_4K 1
+#define PAGESZ_16K 2
+#define PAGESZ_64K 3
+#define PAGESZ_256K 4
+#define PAGESZ_1M 5
+#define PAGESZ_4M 6
+#define PAGESZ_16M 7
+#define TLB_VALID 0x00000040 /* Entry is valid */
+
+/* Data portion */
+
+#define TLB_RPN_MASK 0xFFFFFC00 /* Real Page Number */
+#define TLB_PERM_MASK 0x00000300
+#define TLB_EX 0x00000200 /* Instruction execution allowed */
+#define TLB_WR 0x00000100 /* Writes permitted */
+#define TLB_ZSEL_MASK 0x000000F0
+#define TLB_ZSEL(x) (((x) & 0xF) << 4)
+#define TLB_ATTR_MASK 0x0000000F
+#define TLB_W 0x00000008 /* Caching is write-through */
+#define TLB_I 0x00000004 /* Caching is inhibited */
+#define TLB_M 0x00000002 /* Memory is coherent */
+#define TLB_G 0x00000001 /* Memory is guarded from prefetch */
+
#define _PAGE_PRESENT 0x001 /* software: pte contains a translation */
#define _PAGE_USER 0x002 /* matches one of the PP bits */
#define _PAGE_RW 0x004 /* software: user write access allowed */
@@ -160,9 +220,8 @@ extern unsigned long ioremap_bot, ioremap_base;
#define _PAGE_DIRTY 0x080 /* C: page changed */
#define _PAGE_ACCESSED 0x100 /* R: page referenced */
#define _PAGE_HWWRITE 0x200 /* software: _PAGE_RW & _PAGE_DIRTY */
-#define _PAGE_SHARED 0
-
-#else
+#define _PAGE_SHARED 0
+#elif defined(CONFIG_8xx)
/* Definitions for 8xx embedded chips. */
#define _PAGE_PRESENT 0x0001 /* Page is valid */
#define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */
@@ -183,8 +242,20 @@ extern unsigned long ioremap_bot, ioremap_base;
* protection.
*/
#define _PAGE_HWWRITE _PAGE_DIRTY
-
-#endif /* CONFIG_8xx */
+#else
+/* Definitions for 60x, 740/750, etc. */
+#define _PAGE_PRESENT 0x001 /* software: pte contains a translation */
+#define _PAGE_USER 0x002 /* matches one of the PP bits */
+#define _PAGE_RW 0x004 /* software: user write access allowed */
+#define _PAGE_GUARDED 0x008
+#define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
+#define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
+#define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
+#define _PAGE_DIRTY 0x080 /* C: page changed */
+#define _PAGE_ACCESSED 0x100 /* R: page referenced */
+#define _PAGE_HWWRITE 0x200 /* software: _PAGE_RW & _PAGE_DIRTY */
+#define _PAGE_SHARED 0
+#endif
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
diff --git a/include/asm-ppc/posix_types.h b/include/asm-ppc/posix_types.h
index 893b90f70..f6d0d70ea 100644
--- a/include/asm-ppc/posix_types.h
+++ b/include/asm-ppc/posix_types.h
@@ -24,6 +24,13 @@ typedef long __kernel_clock_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef short __kernel_ipc_pid_t;
+typedef unsigned int __kernel_uid16_t;
+typedef unsigned int __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+
+typedef unsigned int __kernel_old_uid_t;
+typedef unsigned int __kernel_old_gid_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index f9158fc70..9d32dd011 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -12,28 +12,34 @@
#include <asm/ptrace.h>
#include <asm/residual.h>
-/* Bit encodings for Machine State Register (MSR) */
+/* Machine State Register (MSR) Fields */
+
#ifdef CONFIG_PPC64
#define MSR_SF (1<<63)
#define MSR_ISF (1<<61)
-#endif /* CONFIG_PPC64 */
+#endif /* CONFIG_PPC64 */
#define MSR_VEC (1<<25) /* Enable AltiVec */
#define MSR_POW (1<<18) /* Enable Power Management */
+#define MSR_WE (1<<18) /* Wait State Enable */
#define MSR_TGPR (1<<17) /* TLB Update registers in use */
-#define MSR_ILE (1<<16) /* Interrupt Little-Endian enable */
-#define MSR_EE (1<<15) /* External Interrupt enable */
-#define MSR_PR (1<<14) /* Supervisor/User privilege */
+#define MSR_CE (1<<17) /* Critical Interrupt Enable */
+#define MSR_ILE (1<<16) /* Interrupt Little Endian */
+#define MSR_EE (1<<15) /* External Interrupt Enable */
+#define MSR_PR (1<<14) /* Problem State / Privilege Level */
#define MSR_FP (1<<13) /* Floating Point enable */
-#define MSR_ME (1<<12) /* Machine Check enable */
+#define MSR_ME (1<<12) /* Machine Check Enable */
#define MSR_FE0 (1<<11) /* Floating Exception mode 0 */
#define MSR_SE (1<<10) /* Single Step */
#define MSR_BE (1<<9) /* Branch Trace */
+#define MSR_DE (1<<9) /* Debug Exception Enable */
#define MSR_FE1 (1<<8) /* Floating Exception mode 1 */
#define MSR_IP (1<<6) /* Exception prefix 0x000/0xFFF */
-#define MSR_IR (1<<5) /* Instruction MMU enable */
-#define MSR_DR (1<<4) /* Data MMU enable */
+#define MSR_IR (1<<5) /* Instruction Relocate */
+#define MSR_DR (1<<4) /* Data Relocate */
+#define MSR_PE (1<<3) /* Protection Enable */
+#define MSR_PX (1<<2) /* Protection Exclusive Mode */
#define MSR_RI (1<<1) /* Recoverable Exception */
-#define MSR_LE (1<<0) /* Little-Endian enable */
+#define MSR_LE (1<<0) /* Little Endian */
#ifdef CONFIG_APUS_FAST_EXCEPT
#define MSR_ MSR_ME|MSR_IP|MSR_RI
@@ -43,30 +49,8 @@
#define MSR_KERNEL MSR_|MSR_IR|MSR_DR
#define MSR_USER MSR_KERNEL|MSR_PR|MSR_EE
-/* Bit encodings for Hardware Implementation Register (HID0)
- on PowerPC 603, 604, etc. processors (not 601). */
-#define HID0_EMCP (1<<31) /* Enable Machine Check pin */
-#define HID0_EBA (1<<29) /* Enable Bus Address Parity */
-#define HID0_EBD (1<<28) /* Enable Bus Data Parity */
-#define HID0_SBCLK (1<<27)
-#define HID0_EICE (1<<26)
-#define HID0_ECLK (1<<25)
-#define HID0_PAR (1<<24)
-#define HID0_DOZE (1<<23)
-#define HID0_NAP (1<<22)
-#define HID0_SLEEP (1<<21)
-#define HID0_DPM (1<<20)
-#define HID0_ICE (1<<15) /* Instruction Cache Enable */
-#define HID0_DCE (1<<14) /* Data Cache Enable */
-#define HID0_ILOCK (1<<13) /* Instruction Cache Lock */
-#define HID0_DLOCK (1<<12) /* Data Cache Lock */
-#define HID0_ICFI (1<<11) /* Instruction Cache Flash Invalidate */
-#define HID0_DCI (1<<10) /* Data Cache Invalidate */
-#define HID0_SIED (1<<7) /* Serial Instruction Execution [Disable] */
-#define HID0_BHTE (1<<2) /* Branch History Table Enable */
-#define HID0_BTCD (1<<1) /* Branch target cache disable */
-
-/* fpscr settings */
+/* Floating Point Status and Control Register (FPSCR) Fields */
+
#define FPSCR_FX 0x80000000 /* FPU exception summary */
#define FPSCR_FEX 0x40000000 /* FPU enabled exception summary */
#define FPSCR_VX 0x20000000 /* Invalid operation summary */
@@ -95,17 +79,418 @@
#define FPSCR_NI 0x00000004 /* FPU non IEEE-Mode */
#define FPSCR_RN 0x00000003 /* FPU rounding control */
-#define _MACH_prep 1
-#define _MACH_Pmac 2 /* pmac or pmac clone (non-chrp) */
-#define _MACH_chrp 4 /* chrp machine */
-#define _MACH_mbx 8 /* Motorola MBX board */
-#define _MACH_apus 16 /* amiga with phase5 powerup */
-#define _MACH_fads 32 /* Motorola FADS board */
-#define _MACH_rpxlite 64 /* RPCG RPX-Lite 8xx board */
-#define _MACH_bseip 128 /* Bright Star Engineering ip-Engine */
-#define _MACH_yk 256 /* Motorola Yellowknife */
-#define _MACH_gemini 512 /* Synergy Microsystems gemini board */
-#define _MACH_classic 1024 /* RPCG RPX-Classic 8xx board */
+/* Special Purpose Registers (SPRNs)*/
+
+#define SPRN_CDBCR 0x3D7 /* Cache Debug Control Register */
+#define SPRN_CTR 0x009 /* Count Register */
+#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
+#define SPRN_DAC1 0x3F6 /* Data Address Compare 1 */
+#define SPRN_DAC2 0x3F7 /* Data Address Compare 2 */
+#define SPRN_DAR 0x013 /* Data Address Register */
+#define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */
+#define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */
+#define SPRN_DBAT1L 0x21B /* Data BAT 1 Lower Register */
+#define SPRN_DBAT1U 0x21A /* Data BAT 1 Upper Register */
+#define SPRN_DBAT2L 0x21D /* Data BAT 2 Lower Register */
+#define SPRN_DBAT2U 0x21C /* Data BAT 2 Upper Register */
+#define SPRN_DBAT3L 0x21F /* Data BAT 3 Lower Register */
+#define SPRN_DBAT3U 0x21E /* Data BAT 3 Upper Register */
+#define SPRN_DBCR 0x3F2 /* Debug Control Regsiter */
+#define DBCR_EDM 0x80000000
+#define DBCR_IDM 0x40000000
+#define DBCR_RST(x) (((x) & 0x3) << 28)
+#define DBCR_RST_NONE 0
+#define DBCR_RST_CORE 1
+#define DBCR_RST_CHIP 2
+#define DBCR_RST_SYSTEM 3
+#define DBCR_IC 0x08000000 /* Instruction Completion Debug Evnt */
+#define DBCR_BT 0x04000000 /* Branch Taken Debug Event */
+#define DBCR_EDE 0x02000000 /* Exception Debug Event */
+#define DBCR_TDE 0x01000000 /* TRAP Debug Event */
+#define DBCR_FER 0x00F80000 /* First Events Remaining Mask */
+#define DBCR_FT 0x00040000 /* Freeze Timers on Debug Event */
+#define DBCR_IA1 0x00020000 /* Instr. Addr. Compare 1 Enable */
+#define DBCR_IA2 0x00010000 /* Instr. Addr. Compare 2 Enable */
+#define DBCR_D1R 0x00008000 /* Data Addr. Compare 1 Read Enable */
+#define DBCR_D1W 0x00004000 /* Data Addr. Compare 1 Write Enable */
+#define DBCR_D1S(x) (((x) & 0x3) << 12) /* Data Adrr. Compare 1 Size */
+#define DAC_BYTE 0
+#define DAC_HALF 1
+#define DAC_WORD 2
+#define DAC_QUAD 3
+#define DBCR_D2R 0x00000800 /* Data Addr. Compare 2 Read Enable */
+#define DBCR_D2W 0x00000400 /* Data Addr. Compare 2 Write Enable */
+#define DBCR_D2S(x) (((x) & 0x3) << 8) /* Data Addr. Compare 2 Size */
+#define DBCR_SBT 0x00000040 /* Second Branch Taken Debug Event */
+#define DBCR_SED 0x00000020 /* Second Exception Debug Event */
+#define DBCR_STD 0x00000010 /* Second Trap Debug Event */
+#define DBCR_SIA 0x00000008 /* Second IAC Enable */
+#define DBCR_SDA 0x00000004 /* Second DAC Enable */
+#define DBCR_JOI 0x00000002 /* JTAG Serial Outbound Int. Enable */
+#define DBCR_JII 0x00000001 /* JTAG Serial Inbound Int. Enable */
+#define SPRN_DBCR0 0x3F2 /* Debug Control Register 0 */
+#define SPRN_DBCR1 0x3BD /* Debug Control Register 1 */
+#define SPRN_DBSR 0x3F0 /* Debug Status Register */
+#define SPRN_DCCR 0x3FA /* Data Cache Cacheability Register */
+#define DCCR_NOCACHE 0 /* Noncacheable */
+#define DCCR_CACHE 1 /* Cacheable */
+#define SPRN_DCMP 0x3D1 /* Data TLB Compare Register */
+#define SPRN_DCWR 0x3BA /* Data Cache Write-thru Register */
+#define DCWR_COPY 0 /* Copy-back */
+#define DCWR_WRITE 1 /* Write-through */
+#define SPRN_DEAR 0x3D5 /* Data Error Address Register */
+#define SPRN_DEC 0x016 /* Decrement Register */
+#define SPRN_DMISS 0x3D0 /* Data TLB Miss Register */
+#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
+#define SPRN_EAR 0x11A /* External Address Register */
+#define SPRN_ESR 0x3D4 /* Exception Syndrome Register */
+#define ESR_IMCP 0x80000000 /* Instr. Machine Check - Protection */
+#define ESR_IMCN 0x40000000 /* Instr. Machine Check - Non-config */
+#define ESR_IMCB 0x20000000 /* Instr. Machine Check - Bus error */
+#define ESR_IMCT 0x10000000 /* Instr. Machine Check - Timeout */
+#define ESR_PIL 0x08000000 /* Program Exception - Illegal */
+#define ESR_PPR 0x04000000 /* Program Exception - Priveleged */
+#define ESR_PTR 0x02000000 /* Program Exception - Trap */
+#define ESR_DST 0x00800000 /* Storage Exception - Data miss */
+#define ESR_DIZ 0x00400000 /* Storage Exception - Zone fault */
+#define SPRN_EVPR 0x3D6 /* Exception Vector Prefix Register */
+#define SPRN_HASH1 0x3D2 /* Primary Hash Address Register */
+#define SPRN_HASH2 0x3D3 /* Secondary Hash Address Resgister */
+#define SPRN_HID0 0x3F0 /* Hardware Implementation Register 0 */
+#define HID0_EMCP (1<<31) /* Enable Machine Check pin */
+#define HID0_EBA (1<<29) /* Enable Bus Address Parity */
+#define HID0_EBD (1<<28) /* Enable Bus Data Parity */
+#define HID0_SBCLK (1<<27)
+#define HID0_EICE (1<<26)
+#define HID0_ECLK (1<<25)
+#define HID0_PAR (1<<24)
+#define HID0_DOZE (1<<23)
+#define HID0_NAP (1<<22)
+#define HID0_SLEEP (1<<21)
+#define HID0_DPM (1<<20)
+#define HID0_ICE (1<<15) /* Instruction Cache Enable */
+#define HID0_DCE (1<<14) /* Data Cache Enable */
+#define HID0_ILOCK (1<<13) /* Instruction Cache Lock */
+#define HID0_DLOCK (1<<12) /* Data Cache Lock */
+#define HID0_ICFI (1<<11) /* Instr. Cache Flash Invalidate */
+#define HID0_DCI (1<<10) /* Data Cache Invalidate */
+#define HID0_SIED (1<<7) /* Serial Instr. Execution [Disable] */
+#define HID0_BHTE (1<<2) /* Branch History Table Enable */
+#define HID0_BTCD (1<<1) /* Branch target cache disable */
+#define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */
+#define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */
+#define SPRN_IAC1 0x3F4 /* Instruction Address Compare 1 */
+#define SPRN_IAC2 0x3F5 /* Instruction Address Compare 2 */
+#define SPRN_IBAT0L 0x211 /* Instruction BAT 0 Lower Register */
+#define SPRN_IBAT0U 0x210 /* Instruction BAT 0 Upper Register */
+#define SPRN_IBAT1L 0x213 /* Instruction BAT 1 Lower Register */
+#define SPRN_IBAT1U 0x212 /* Instruction BAT 1 Upper Register */
+#define SPRN_IBAT2L 0x215 /* Instruction BAT 2 Lower Register */
+#define SPRN_IBAT2U 0x214 /* Instruction BAT 2 Upper Register */
+#define SPRN_IBAT3L 0x217 /* Instruction BAT 3 Lower Register */
+#define SPRN_IBAT3U 0x216 /* Instruction BAT 3 Upper Register */
+#define SPRN_ICCR 0x3FB /* Instruction Cache Cacheability Register */
+#define ICCR_NOCACHE 0 /* Noncacheable */
+#define ICCR_CACHE 1 /* Cacheable */
+#define SPRN_ICDBDR 0x3D3 /* Instruction Cache Debug Data Register */
+#define SPRN_ICMP 0x3D5 /* Instruction TLB Compare Register */
+#define SPRN_ICTC 0x3FB /* Instruction Cache Throttling Control Reg */
+#define SPRN_IMISS 0x3D4 /* Instruction TLB Miss Register */
+#define SPRN_IMMR 0x27E /* Internal Memory Map Register */
+#define SPRN_L2CR 0x3F9 /* Level 2 Cache Control Regsiter */
+#define SPRN_LR 0x008 /* Link Register */
+#define SPRN_MMCR0 0x3B8 /* Monitor Mode Control Register 0 */
+#define SPRN_MMCR1 0x3BC /* Monitor Mode Control Register 1 */
+#define SPRN_PBL1 0x3FC /* Protection Bound Lower 1 */
+#define SPRN_PBL2 0x3FE /* Protection Bound Lower 2 */
+#define SPRN_PBU1 0x3FD /* Protection Bound Upper 1 */
+#define SPRN_PBU2 0x3FF /* Protection Bound Upper 2 */
+#define SPRN_PID 0x3B1 /* Process ID */
+#define SPRN_PIR 0x3FF /* Processor Identification Register */
+#define SPRN_PIT 0x3DB /* Programmable Interval Timer */
+#define SPRN_PMC1 0x3B9 /* Performance Counter Register 1 */
+#define SPRN_PMC2 0x3BA /* Performance Counter Register 2 */
+#define SPRN_PMC3 0x3BD /* Performance Counter Register 3 */
+#define SPRN_PMC4 0x3BE /* Performance Counter Register 4 */
+#define SPRN_PVR 0x11F /* Processor Version Register */
+#define SPRN_RPA 0x3D6 /* Required Physical Address Register */
+#define SPRN_SDA 0x3BF /* Sampled Data Address Register */
+#define SPRN_SDR1 0x019 /* MMU Hash Base Register */
+#define SPRN_SGR 0x3B9 /* Storage Guarded Register */
+#define SGR_NORMAL 0
+#define SGR_GUARDED 1
+#define SPRN_SIA 0x3BB /* Sampled Instruction Address Register */
+#define SPRN_SPRG0 0x110 /* Special Purpose Register General 0 */
+#define SPRN_SPRG1 0x111 /* Special Purpose Register General 1 */
+#define SPRN_SPRG2 0x112 /* Special Purpose Register General 2 */
+#define SPRN_SPRG3 0x113 /* Special Purpose Register General 3 */
+#define SPRN_SRR0 0x01A /* Save/Restore Register 0 */
+#define SPRN_SRR1 0x01B /* Save/Restore Register 1 */
+#define SPRN_SRR2 0x3DE /* Save/Restore Register 2 */
+#define SPRN_SRR3 0x3DF /* Save/Restore Register 3 */
+#define SPRN_TBHI 0x3DC /* Time Base High */
+#define SPRN_TBHU 0x3CC /* Time Base High User-mode */
+#define SPRN_TBLO 0x3DD /* Time Base Low */
+#define SPRN_TBLU 0x3CD /* Time Base Low User-mode */
+#define SPRN_TBRL 0x10D /* Time Base Read Lower Register */
+#define SPRN_TBRU 0x10C /* Time Base Read Upper Register */
+#define SPRN_TBWL 0x11D /* Time Base Write Lower Register */
+#define SPRN_TBWU 0x11C /* Time Base Write Upper Register */
+#define SPRN_TCR 0x3DA /* Timer Control Register */
+#define TCR_WP(x) (((x)&0x3)<<30) /* WDT Period */
+#define WP_2_17 0 /* 2^17 clocks */
+#define WP_2_21 1 /* 2^21 clocks */
+#define WP_2_25 2 /* 2^25 clocks */
+#define WP_2_29 3 /* 2^29 clocks */
+#define TCR_WRC(x) (((x)&0x3)<<28) /* WDT Reset Control */
+#define WRC_NONE 0 /* No reset will occur */
+#define WRC_CORE 1 /* Core reset will occur */
+#define WRC_CHIP 2 /* Chip reset will occur */
+#define WRC_SYSTEM 3 /* System reset will occur */
+#define TCR_WIE 0x08000000 /* WDT Interrupt Enable */
+#define TCR_PIE 0x04000000 /* PIT Interrupt Enable */
+#define TCR_FP(x) (((x)&0x3)<<24) /* FIT Period */
+#define FP_2_9 0 /* 2^9 clocks */
+#define FP_2_13 1 /* 2^13 clocks */
+#define FP_2_17 2 /* 2^17 clocks */
+#define FP_2_21 3 /* 2^21 clocks */
+#define TCR_FIE 0x00800000 /* FIT Interrupt Enable */
+#define TCR_ARE 0x00400000 /* Auto Reload Enable */
+#define SPRN_THRM1 0x3FC /* Thermal Management Register 1 */
+#define THRM1_TIN (1<<0)
+#define THRM1_TIV (1<<1)
+#define THRM1_THRES (0x7f<<2)
+#define THRM1_TID (1<<29)
+#define THRM1_TIE (1<<30)
+#define THRM1_V (1<<31)
+#define SPRN_THRM2 0x3FD /* Thermal Management Register 2 */
+#define SPRN_THRM3 0x3FE /* Thermal Management Register 3 */
+#define THRM3_E (1<<31)
+#define SPRN_TSR 0x3D8 /* Timer Status Register */
+#define TSR_ENW 0x80000000 /* Enable Next Watchdog */
+#define TSR_WIS 0x40000000 /* WDT Interrupt Status */
+#define TSR_WRS(x) (((x)&0x3)<<28) /* WDT Reset Status */
+#define WRS_NONE 0 /* No WDT reset occurred */
+#define WRS_CORE 1 /* WDT forced core reset */
+#define WRS_CHIP 2 /* WDT forced chip reset */
+#define WRS_SYSTEM 3 /* WDT forced system reset */
+#define TSR_PIS 0x08000000 /* PIT Interrupt Status */
+#define TSR_FIS 0x04000000 /* FIT Interrupt Status */
+#define SPRN_UMMCR0 0x3A8 /* User Monitor Mode Control Register 0 */
+#define SPRN_UMMCR1 0x3AC /* User Monitor Mode Control Register 0 */
+#define SPRN_UPMC1 0x3A9 /* User Performance Counter Register 1 */
+#define SPRN_UPMC2 0x3AA /* User Performance Counter Register 2 */
+#define SPRN_UPMC3 0x3AD /* User Performance Counter Register 3 */
+#define SPRN_UPMC4 0x3AE /* User Performance Counter Register 4 */
+#define SPRN_USIA 0x3AB /* User Sampled Instruction Address Register */
+#define SPRN_XER 0x001 /* Fixed Point Exception Register */
+#define SPRN_ZPR 0x3B0 /* Zone Protection Register */
+
+/* Short-hand versions for a number of the above SPRNs */
+
+#define CTR SPRN_CTR /* Counter Register */
+#define DAR SPRN_DAR /* Data Address Register */
+#define DABR SPRN_DABR /* Data Address Breakpoint Register */
+#define DBAT0L SPRN_DBAT0L /* Data BAT 0 Lower Register */
+#define DBAT0U SPRN_DBAT0U /* Data BAT 0 Upper Register */
+#define DBAT1L SPRN_DBAT1L /* Data BAT 1 Lower Register */
+#define DBAT1U SPRN_DBAT1U /* Data BAT 1 Upper Register */
+#define DBAT2L SPRN_DBAT2L /* Data BAT 2 Lower Register */
+#define DBAT2U SPRN_DBAT2U /* Data BAT 2 Upper Register */
+#define DBAT3L SPRN_DBAT3L /* Data BAT 3 Lower Register */
+#define DBAT3U SPRN_DBAT3U /* Data BAT 3 Upper Register */
+#define DCMP SPRN_DCMP /* Data TLB Compare Register */
+#define DEC SPRN_DEC /* Decrement Register */
+#define DMISS SPRN_DMISS /* Data TLB Miss Register */
+#define DSISR SPRN_DSISR /* Data Storage Interrupt Status Register */
+#define EAR SPRN_EAR /* External Address Register */
+#define HASH1 SPRN_HASH1 /* Primary Hash Address Register */
+#define HASH2 SPRN_HASH2 /* Secondary Hash Address Register */
+#define HID0 SPRN_HID0 /* Hardware Implementation Register 0 */
+#define HID1 SPRN_HID1 /* Hardware Implementation Register 1 */
+#define IABR SPRN_IABR /* Instruction Address Breakpoint Register */
+#define IBAT0L SPRN_IBAT0L /* Instruction BAT 0 Lower Register */
+#define IBAT0U SPRN_IBAT0U /* Instruction BAT 0 Upper Register */
+#define IBAT1L SPRN_IBAT1L /* Instruction BAT 1 Lower Register */
+#define IBAT1U SPRN_IBAT1U /* Instruction BAT 1 Upper Register */
+#define IBAT2L SPRN_IBAT2L /* Instruction BAT 2 Lower Register */
+#define IBAT2U SPRN_IBAT2U /* Instruction BAT 2 Upper Register */
+#define IBAT3L SPRN_IBAT3L /* Instruction BAT 3 Lower Register */
+#define IBAT3U SPRN_IBAT3U /* Instruction BAT 3 Upper Register */
+#define ICMP SPRN_ICMP /* Instruction TLB Compare Register */
+#define IMISS SPRN_IMISS /* Instruction TLB Miss Register */
+#define IMMR SPRN_IMMR /* PPC 860/821 Internal Memory Map Register */
+#define L2CR SPRN_L2CR /* PPC 750 L2 control register */
+#define LR SPRN_LR
+#define PVR SPRN_PVR /* Processor Version */
+#define RPA SPRN_RPA /* Required Physical Address Register */
+#define SDR1 SPRN_SDR1 /* MMU hash base register */
+#define SPR0 SPRN_SPRG0 /* Supervisor Private Registers */
+#define SPR1 SPRN_SPRG1
+#define SPR2 SPRN_SPRG2
+#define SPR3 SPRN_SPRG3
+#define SPRG0 SPRN_SPRG0
+#define SPRG1 SPRN_SPRG1
+#define SPRG2 SPRN_SPRG2
+#define SPRG3 SPRN_SPRG3
+#define SRR0 SPRN_SRR0 /* Save and Restore Register 0 */
+#define SRR1 SPRN_SRR1 /* Save and Restore Register 1 */
+#define TBRL SPRN_TBRL /* Time Base Read Lower Register */
+#define TBRU SPRN_TBRU /* Time Base Read Upper Register */
+#define TBWL SPRN_TBWL /* Time Base Write Lower Register */
+#define TBWU SPRN_TBWU /* Time Base Write Upper Register */
+#define THRM1 SPRN_THRM1 /* Thermal Management Register 1 */
+#define THRM2 SPRN_THRM2 /* Thermal Management Register 2 */
+#define THRM3 SPRN_THRM3 /* Thermal Management Register 3 */
+#define XER SPRN_XER
+
+
+/* Device Control Registers */
+
+#define DCRN_BEAR 0x090 /* Bus Error Address Register */
+#define DCRN_BESR 0x091 /* Bus Error Syndrome Register */
+#define BESR_DSES 0x80000000 /* Data-Side Error Status */
+#define BESR_DMES 0x40000000 /* DMA Error Status */
+#define BESR_RWS 0x20000000 /* Read/Write Status */
+#define BESR_ETMASK 0x1C000000 /* Error Type */
+#define ET_PROT 0
+#define ET_PARITY 1
+#define ET_NCFG 2
+#define ET_BUSERR 4
+#define ET_BUSTO 6
+#define DCRN_DMACC0 0x0C4 /* DMA Chained Count Register 0 */
+#define DCRN_DMACC1 0x0CC /* DMA Chained Count Register 1 */
+#define DCRN_DMACC2 0x0D4 /* DMA Chained Count Register 2 */
+#define DCRN_DMACC3 0x0DC /* DMA Chained Count Register 3 */
+#define DCRN_DMACR0 0x0C0 /* DMA Channel Control Register 0 */
+#define DCRN_DMACR1 0x0C8 /* DMA Channel Control Register 1 */
+#define DCRN_DMACR2 0x0D0 /* DMA Channel Control Register 2 */
+#define DCRN_DMACR3 0x0D8 /* DMA Channel Control Register 3 */
+#define DCRN_DMACT0 0x0C1 /* DMA Count Register 0 */
+#define DCRN_DMACT1 0x0C9 /* DMA Count Register 1 */
+#define DCRN_DMACT2 0x0D1 /* DMA Count Register 2 */
+#define DCRN_DMACT3 0x0D9 /* DMA Count Register 3 */
+#define DCRN_DMADA0 0x0C2 /* DMA Destination Address Register 0 */
+#define DCRN_DMADA1 0x0CA /* DMA Destination Address Register 1 */
+#define DCRN_DMADA2 0x0D2 /* DMA Destination Address Register 2 */
+#define DCRN_DMADA3 0x0DA /* DMA Destination Address Register 3 */
+#define DCRN_DMASA0 0x0C3 /* DMA Source Address Register 0 */
+#define DCRN_DMASA1 0x0CB /* DMA Source Address Register 1 */
+#define DCRN_DMASA2 0x0D3 /* DMA Source Address Register 2 */
+#define DCRN_DMASA3 0x0DB /* DMA Source Address Register 3 */
+#define DCRN_DMASR 0x0E0 /* DMA Status Register */
+#define DCRN_EXIER 0x042 /* External Interrupt Enable Register */
+#define EXIER_CIE 0x80000000 /* Critical Interrupt Enable */
+#define EXIER_SRIE 0x08000000 /* Serial Port Rx Int. Enable */
+#define EXIER_STIE 0x04000000 /* Serial Port Tx Int. Enable */
+#define EXIER_JRIE 0x02000000 /* JTAG Serial Port Rx Int. Enable */
+#define EXIER_JTIE 0x01000000 /* JTAG Serial Port Tx Int. Enable */
+#define EXIER_D0IE 0x00800000 /* DMA Channel 0 Interrupt Enable */
+#define EXIER_D1IE 0x00400000 /* DMA Channel 1 Interrupt Enable */
+#define EXIER_D2IE 0x00200000 /* DMA Channel 2 Interrupt Enable */
+#define EXIER_D3IE 0x00100000 /* DMA Channel 3 Interrupt Enable */
+#define EXIER_E0IE 0x00000010 /* External Interrupt 0 Enable */
+#define EXIER_E1IE 0x00000008 /* External Interrupt 1 Enable */
+#define EXIER_E2IE 0x00000004 /* External Interrupt 2 Enable */
+#define EXIER_E3IE 0x00000002 /* External Interrupt 3 Enable */
+#define EXIER_E4IE 0x00000001 /* External Interrupt 4 Enable */
+#define DCRN_EXISR 0x040 /* External Interrupt Status Register */
+#define DCRN_IOCR 0x0A0 /* Input/Output Configuration Register */
+#define IOCR_E0TE 0x80000000
+#define IOCR_E0LP 0x40000000
+#define IOCR_E1TE 0x20000000
+#define IOCR_E1LP 0x10000000
+#define IOCR_E2TE 0x08000000
+#define IOCR_E2LP 0x04000000
+#define IOCR_E3TE 0x02000000
+#define IOCR_E3LP 0x01000000
+#define IOCR_E4TE 0x00800000
+#define IOCR_E4LP 0x00400000
+#define IOCR_EDT 0x00080000
+#define IOCR_SOR 0x00040000
+#define IOCR_EDO 0x00008000
+#define IOCR_2XC 0x00004000
+#define IOCR_ATC 0x00002000
+#define IOCR_SPD 0x00001000
+#define IOCR_BEM 0x00000800
+#define IOCR_PTD 0x00000400
+#define IOCR_ARE 0x00000080
+#define IOCR_DRC 0x00000020
+#define IOCR_RDM(x) (((x) & 0x3) << 3)
+#define IOCR_TCS 0x00000004
+#define IOCR_SCS 0x00000002
+#define IOCR_SPC 0x00000001
+
+
+/* Processor Version Register */
+
+/* Processor Version Register (PVR) field extraction */
+
+#define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */
+#define PVR_REV(pvr) (((pvr) >> 0) & 0xFFFF) /* Revison field */
+
+/*
+ * IBM has further subdivided the standard PowerPC 16-bit version and
+ * revision subfields of the PVR for the PowerPC 403s into the following:
+ */
+
+#define PVR_FAM(pvr) (((pvr) >> 20) & 0xFFF) /* Family field */
+#define PVR_MEM(pvr) (((pvr) >> 16) & 0xF) /* Member field */
+#define PVR_CORE(pvr) (((pvr) >> 12) & 0xF) /* Core field */
+#define PVR_CFG(pvr) (((pvr) >> 8) & 0xF) /* Configuration field */
+#define PVR_MAJ(pvr) (((pvr) >> 4) & 0xF) /* Major revision field */
+#define PVR_MIN(pvr) (((pvr) >> 0) & 0xF) /* Minor revision field */
+
+/* Processor Version Numbers */
+
+#define PVR_403GA 0x00200000
+#define PVR_403GB 0x00200100
+#define PVR_403GC 0x00200200
+#define PVR_403GCX 0x00201400
+#define PVR_405GP 0x40110000
+#define PVR_601 0x00010000
+#define PVR_602 0x00050000
+#define PVR_603 0x00030000
+#define PVR_603e 0x00060000
+#define PVR_603ev 0x00070000
+#define PVR_603r 0x00071000
+#define PVR_604 0x00040000
+#define PVR_604e 0x00090000
+#define PVR_604r 0x000A0000
+#define PVR_620 0x00140000
+#define PVR_740 0x00080000
+#define PVR_750 PVR_740
+#define PVR_740P 0x10080000
+#define PVR_750P PVR_740P
+/*
+ * For the 8xx processors, all of them report the same PVR family for
+ * the PowerPC core. The various versions of these processors must be
+ * differentiated by the version number in the Communication Processor
+ * Module (CPM).
+ */
+#define PVR_821 0x00500000
+#define PVR_823 PVR_821
+#define PVR_850 PVR_821
+#define PVR_860 PVR_821
+#define PVR_7400 0x000C0000
+#define PVR_8240 0x00810100
+#define PVR_8260 PVR_8240
+
+
+#define _MACH_prep 0x00000001
+#define _MACH_Pmac 0x00000002 /* pmac or pmac clone (non-chrp) */
+#define _MACH_chrp 0x00000004 /* chrp machine */
+#define _MACH_mbx 0x00000008 /* Motorola MBX board */
+#define _MACH_apus 0x00000010 /* amiga with phase5 powerup */
+#define _MACH_fads 0x00000020 /* Motorola FADS board */
+#define _MACH_rpxlite 0x00000040 /* RPCG RPX-Lite 8xx board */
+#define _MACH_bseip 0x00000080 /* Bright Star Engineering ip-Engine */
+#define _MACH_yk 0x00000100 /* Motorola Yellowknife */
+#define _MACH_gemini 0x00000200 /* Synergy Microsystems gemini board */
+#define _MACH_classic 0x00000400 /* RPCG RPX-Classic 8xx board */
+#define _MACH_oak 0x00000800 /* IBM "Oak" 403 eval. board */
+#define _MACH_walnut 0x00001000 /* IBM "Walnut" 405GP eval. board */
+
/* see residual.h for these */
#define _PREP_Motorola 0x01 /* motorola prep */
@@ -133,69 +518,27 @@
.globl n;\
n:
-#define TBRU 269 /* Time base Upper/Lower (Reading) */
-#define TBRL 268
-#define TBWU 284 /* Time base Upper/Lower (Writing) */
-#define TBWL 285
-#define XER 1
-#define LR 8
-#define CTR 9
-#define HID0 1008 /* Hardware Implementation */
-#define PVR 287 /* Processor Version */
-#define IBAT0U 528 /* Instruction BAT #0 Upper/Lower */
-#define IBAT0L 529
-#define IBAT1U 530 /* Instruction BAT #1 Upper/Lower */
-#define IBAT1L 531
-#define IBAT2U 532 /* Instruction BAT #2 Upper/Lower */
-#define IBAT2L 533
-#define IBAT3U 534 /* Instruction BAT #3 Upper/Lower */
-#define IBAT3L 535
-#define DBAT0U 536 /* Data BAT #0 Upper/Lower */
-#define DBAT0L 537
-#define DBAT1U 538 /* Data BAT #1 Upper/Lower */
-#define DBAT1L 539
-#define DBAT2U 540 /* Data BAT #2 Upper/Lower */
-#define DBAT2L 541
-#define DBAT3U 542 /* Data BAT #3 Upper/Lower */
-#define DBAT3L 543
-#define DMISS 976 /* TLB Lookup/Refresh registers */
-#define DCMP 977
-#define HASH1 978
-#define HASH2 979
-#define IMISS 980
-#define ICMP 981
-#define RPA 982
-#define SDR1 25 /* MMU hash base register */
-#define DAR 19 /* Data Address Register */
-#define SPR0 272 /* Supervisor Private Registers */
-#define SPRG0 272
-#define SPR1 273
-#define SPRG1 273
-#define SPR2 274
-#define SPRG2 274
-#define SPR3 275
-#define SPRG3 275
-#define DSISR 18
-#define SRR0 26 /* Saved Registers (exception) */
-#define SRR1 27
-#define IABR 1010 /* Instruction Address Breakpoint */
-#define DEC 22 /* Decrementer */
-#define EAR 282 /* External Address Register */
-#define L2CR 1017 /* PPC 750 L2 control register */
-#define IMMR 638 /* PPC 860/821 Internal Memory Map Register */
-
-#define THRM1 1020
-#define THRM2 1021
-#define THRM3 1022
-#define THRM1_TIN 0x1
-#define THRM1_TIV 0x2
-#define THRM1_THRES (0x7f<<2)
-#define THRM1_TID (1<<29)
-#define THRM1_TIE (1<<30)
-#define THRM1_V (1<<31)
-#define THRM3_E (1<<31)
+/* Macros for setting and retrieving special purpose registers */
+
+#define stringify(s) tostring(s)
+#define tostring(s) #s
+
+#define mfdcr(rn) ({unsigned int rval; \
+ asm volatile("mfdcr %0," stringify(rn) \
+ : "=r" (rval)); rval;})
+#define mtdcr(rn, v) asm volatile("mtdcr " stringify(rn) ",%0" : : "r" (v))
+
+#define mfmsr() ({unsigned int rval; \
+ asm volatile("mfmsr %0" : "=r" (rval)); rval;})
+#define mtmsr(v) asm volatile("mtmsr %0" : : "r" (v))
+
+#define mfspr(rn) ({unsigned int rval; \
+ asm volatile("mfspr %0," stringify(rn) \
+ : "=r" (rval)); rval;})
+#define mtspr(rn, v) asm volatile("mtspr " stringify(rn) ",%0" : : "r" (v))
/* Segment Registers */
+
#define SR0 0
#define SR1 1
#define SR2 2
@@ -353,6 +696,12 @@ void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
#elif defined(CONFIG_8xx)
#define _machine _MACH_8xx
#define have_of 0
+#elif defined(CONFIG_OAK)
+#define _machine _MACH_oak
+#define have_of 0
+#elif defined(CONFIG_WALNUT)
+#define _machine _MACH_walnut
+#define have_of 0
#elif defined(CONFIG_APUS)
#define _machine _MACH_apus
#define have_of 0
diff --git a/include/asm-ppc/sembuf.h b/include/asm-ppc/sembuf.h
new file mode 100644
index 000000000..6b6a182a8
--- /dev/null
+++ b/include/asm-ppc/sembuf.h
@@ -0,0 +1,20 @@
+#ifndef _PPC_SEMBUF_H
+#define _PPC_SEMBUF_H
+
+/*
+ * The semid64_ds structure for PPC architecture.
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ unsigned int __unused0;
+ unsigned int __unused1;
+ __kernel_time_t sem_otime; /* last semop time */
+ unsigned int __unused2;
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _PPC_SEMBUF_H */
diff --git a/include/asm-ppc/shmbuf.h b/include/asm-ppc/shmbuf.h
new file mode 100644
index 000000000..df84f0b09
--- /dev/null
+++ b/include/asm-ppc/shmbuf.h
@@ -0,0 +1,37 @@
+#ifndef _PPC_SHMBUF_H
+#define _PPC_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for PPC architecture.
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ unsigned int __unused0;
+ size_t shm_segsz; /* size of segment (bytes) */
+ unsigned long __unused1;
+ __kernel_time_t shm_atime; /* last attach time */
+ unsigned long __unused2;
+ __kernel_time_t shm_dtime; /* last detach time */
+ unsigned long __unused3;
+ __kernel_time_t shm_ctime; /* last change time */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _PPC_SHMBUF_H */
diff --git a/include/asm-ppc/stat.h b/include/asm-ppc/stat.h
index 7cc8654e0..538da77bb 100644
--- a/include/asm-ppc/stat.h
+++ b/include/asm-ppc/stat.h
@@ -38,39 +38,29 @@ struct stat {
unsigned long __unused5;
};
-/* This matches struct stat64 in glibc2.1, hence the absolutely
- * insane amounts of padding around dev_t's.
+/* This matches struct stat64 in glibc2.1.
*/
struct stat64 {
- unsigned short st_dev;
- unsigned char __pad0[10];
+ unsigned long long st_dev; /* Device. */
+ unsigned short int __pad1;
+ unsigned long st_ino; /* File serial number. */
+ unsigned int st_mode; /* File mode. */
+ unsigned int st_nlink; /* Link count. */
+ unsigned int st_uid; /* User ID of the file's owner. */
+ unsigned int st_gid; /* Group ID of the file's group. */
+ unsigned long long st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+ long long st_size; /* Size of file, in bytes. */
+ long st_blksize; /* Optimal block size for I/O. */
- unsigned long st_ino;
- unsigned int st_mode;
- unsigned int st_nlink;
-
- unsigned long st_uid;
- unsigned long st_gid;
-
- unsigned short st_rdev;
- unsigned char __pad3[10];
-
- long long st_size;
- unsigned long st_blksize;
-
- unsigned long st_blocks; /* Number 512-byte blocks allocated. */
- unsigned long __pad4; /* future possible st_blocks high bits */
-
- unsigned long st_atime;
- unsigned long __pad5;
-
- unsigned long st_mtime;
- unsigned long __pad6;
-
- unsigned long st_ctime;
- unsigned long __pad7; /* will be high 32 bits of ctime someday */
-
- unsigned long __unused1;
- unsigned long __unused2;
+ long long st_blocks; /* Number 512-byte blocks allocated. */
+ long st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ long st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ long st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
};
#endif
diff --git a/include/asm-sparc/a.out.h b/include/asm-sparc/a.out.h
index 25ddaf086..e4e83eb01 100644
--- a/include/asm-sparc/a.out.h
+++ b/include/asm-sparc/a.out.h
@@ -1,4 +1,4 @@
-/* $Id: a.out.h,v 1.12 1998/02/05 14:20:00 jj Exp $ */
+/* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton Exp $ */
#ifndef __SPARC_A_OUT_H__
#define __SPARC_A_OUT_H__
@@ -89,30 +89,9 @@ struct relocation_info /* used when header.a_machtype == M_SPARC */
#ifdef __KERNEL__
-#include <linux/config.h>
-#include <asm/btfixup.h>
+#include <asm/page.h>
-#ifdef CONFIG_SUN4
-
-#define STACK_TOP (0xefffe000UL)
-
-#else
-
-extern unsigned long stack_top;
-
-# ifndef MODULE
-
- BTFIXUPDEF_SETHI_INIT(stack_top,0xeffff000)
-
-# define STACK_TOP ((unsigned long)BTFIXUP_SETHI(stack_top))
-
-# else /* MODULE */
-
-# define STACK_TOP (stack_top)
-
-# endif /* MODULE */
-
-#endif /* !CONFIG_SUN4 */
+#define STACK_TOP (PAGE_OFFSET - PAGE_SIZE)
#endif /* __KERNEL__ */
diff --git a/include/asm-sparc/asm_offsets.h b/include/asm-sparc/asm_offsets.h
index 1eda0d280..58f26364c 100644
--- a/include/asm-sparc/asm_offsets.h
+++ b/include/asm-sparc/asm_offsets.h
@@ -18,168 +18,174 @@
#define ASIZ_task_exec_domain 0x00000004
#define AOFF_task_need_resched 0x00000014
#define ASIZ_task_need_resched 0x00000004
-#define AOFF_task_counter 0x00000018
+#define AOFF_task_avg_slice 0x00000018
+#define ASIZ_task_avg_slice 0x00000004
+#define AOFF_task_lock_depth 0x0000001c
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000020
#define ASIZ_task_counter 0x00000004
-#define AOFF_task_priority 0x0000001c
+#define AOFF_task_priority 0x00000024
#define ASIZ_task_priority 0x00000004
-#define AOFF_task_avg_slice 0x00000020
-#define ASIZ_task_avg_slice 0x00000004
-#define AOFF_task_has_cpu 0x00000024
+#define AOFF_task_policy 0x00000028
+#define ASIZ_task_policy 0x00000004
+#define AOFF_task_mm 0x0000002c
+#define ASIZ_task_mm 0x00000004
+#define AOFF_task_active_mm 0x00000030
+#define ASIZ_task_active_mm 0x00000004
+#define AOFF_task_has_cpu 0x00000034
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000028
+#define AOFF_task_processor 0x00000038
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x0000002c
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x00000030
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000034
-#define ASIZ_task_next_task 0x00000004
-#define AOFF_task_prev_task 0x00000038
-#define ASIZ_task_prev_task 0x00000004
#define AOFF_task_run_list 0x0000003c
#define ASIZ_task_run_list 0x00000008
-#define AOFF_task_binfmt 0x00000044
+#define AOFF_task_next_task 0x00000044
+#define ASIZ_task_next_task 0x00000004
+#define AOFF_task_prev_task 0x00000048
+#define ASIZ_task_prev_task 0x00000004
+#define AOFF_task_last_processor 0x0000004c
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000050
#define ASIZ_task_binfmt 0x00000004
-#define AOFF_task_exit_code 0x00000048
+#define AOFF_task_exit_code 0x00000054
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000004c
+#define AOFF_task_exit_signal 0x00000058
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000050
+#define AOFF_task_pdeath_signal 0x0000005c
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000054
+#define AOFF_task_personality 0x00000060
#define ASIZ_task_personality 0x00000004
-#define AOFF_task_pid 0x0000005c
+#define AOFF_task_pid 0x00000068
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000060
+#define AOFF_task_pgrp 0x0000006c
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x00000064
+#define AOFF_task_tty_old_pgrp 0x00000070
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x00000068
+#define AOFF_task_session 0x00000074
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x0000006c
+#define AOFF_task_leader 0x00000078
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x00000070
+#define AOFF_task_p_opptr 0x0000007c
#define ASIZ_task_p_opptr 0x00000004
-#define AOFF_task_p_pptr 0x00000074
+#define AOFF_task_p_pptr 0x00000080
#define ASIZ_task_p_pptr 0x00000004
-#define AOFF_task_p_cptr 0x00000078
+#define AOFF_task_p_cptr 0x00000084
#define ASIZ_task_p_cptr 0x00000004
-#define AOFF_task_p_ysptr 0x0000007c
+#define AOFF_task_p_ysptr 0x00000088
#define ASIZ_task_p_ysptr 0x00000004
-#define AOFF_task_p_osptr 0x00000080
+#define AOFF_task_p_osptr 0x0000008c
#define ASIZ_task_p_osptr 0x00000004
-#define AOFF_task_pidhash_next 0x00000084
+#define AOFF_task_pidhash_next 0x00000090
#define ASIZ_task_pidhash_next 0x00000004
-#define AOFF_task_pidhash_pprev 0x00000088
+#define AOFF_task_pidhash_pprev 0x00000094
#define ASIZ_task_pidhash_pprev 0x00000004
-#define AOFF_task_wait_chldexit 0x0000008c
+#define AOFF_task_wait_chldexit 0x00000098
#define ASIZ_task_wait_chldexit 0x00000010
-#define AOFF_task_vfork_sem 0x0000009c
+#define AOFF_task_vfork_sem 0x000000a8
#define ASIZ_task_vfork_sem 0x00000004
-#define AOFF_task_policy 0x000000a0
-#define ASIZ_task_policy 0x00000004
-#define AOFF_task_rt_priority 0x000000a4
+#define AOFF_task_rt_priority 0x000000ac
#define ASIZ_task_rt_priority 0x00000004
-#define AOFF_task_it_real_value 0x000000a8
+#define AOFF_task_it_real_value 0x000000b0
#define ASIZ_task_it_real_value 0x00000004
-#define AOFF_task_it_prof_value 0x000000ac
+#define AOFF_task_it_prof_value 0x000000b4
#define ASIZ_task_it_prof_value 0x00000004
-#define AOFF_task_it_virt_value 0x000000b0
+#define AOFF_task_it_virt_value 0x000000b8
#define ASIZ_task_it_virt_value 0x00000004
-#define AOFF_task_it_real_incr 0x000000b4
+#define AOFF_task_it_real_incr 0x000000bc
#define ASIZ_task_it_real_incr 0x00000004
-#define AOFF_task_it_prof_incr 0x000000b8
+#define AOFF_task_it_prof_incr 0x000000c0
#define ASIZ_task_it_prof_incr 0x00000004
-#define AOFF_task_it_virt_incr 0x000000bc
+#define AOFF_task_it_virt_incr 0x000000c4
#define ASIZ_task_it_virt_incr 0x00000004
-#define AOFF_task_real_timer 0x000000c0
+#define AOFF_task_real_timer 0x000000c8
#define ASIZ_task_real_timer 0x00000014
-#define AOFF_task_times 0x000000d4
+#define AOFF_task_times 0x000000dc
#define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000e4
+#define AOFF_task_start_time 0x000000ec
#define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000e8
+#define AOFF_task_per_cpu_utime 0x000000f0
#define ASIZ_task_per_cpu_utime 0x00000004
-#define AOFF_task_min_flt 0x000000f0
+#define AOFF_task_min_flt 0x000000f8
#define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x000000f4
+#define AOFF_task_maj_flt 0x000000fc
#define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x000000f8
+#define AOFF_task_nswap 0x00000100
#define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x000000fc
+#define AOFF_task_cmin_flt 0x00000104
#define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x00000100
+#define AOFF_task_cmaj_flt 0x00000108
#define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x00000104
+#define AOFF_task_cnswap 0x0000010c
#define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x0000010a
-#define ASIZ_task_uid 0x00000002
-#define AOFF_task_euid 0x0000010c
-#define ASIZ_task_euid 0x00000002
-#define AOFF_task_suid 0x0000010e
-#define ASIZ_task_suid 0x00000002
-#define AOFF_task_fsuid 0x00000110
-#define ASIZ_task_fsuid 0x00000002
-#define AOFF_task_gid 0x00000112
-#define ASIZ_task_gid 0x00000002
-#define AOFF_task_egid 0x00000114
-#define ASIZ_task_egid 0x00000002
-#define AOFF_task_sgid 0x00000116
-#define ASIZ_task_sgid 0x00000002
-#define AOFF_task_fsgid 0x00000118
-#define ASIZ_task_fsgid 0x00000002
-#define AOFF_task_ngroups 0x0000011c
+#define AOFF_task_uid 0x00000114
+#define ASIZ_task_uid 0x00000004
+#define AOFF_task_euid 0x00000118
+#define ASIZ_task_euid 0x00000004
+#define AOFF_task_suid 0x0000011c
+#define ASIZ_task_suid 0x00000004
+#define AOFF_task_fsuid 0x00000120
+#define ASIZ_task_fsuid 0x00000004
+#define AOFF_task_gid 0x00000124
+#define ASIZ_task_gid 0x00000004
+#define AOFF_task_egid 0x00000128
+#define ASIZ_task_egid 0x00000004
+#define AOFF_task_sgid 0x0000012c
+#define ASIZ_task_sgid 0x00000004
+#define AOFF_task_fsgid 0x00000130
+#define ASIZ_task_fsgid 0x00000004
+#define AOFF_task_ngroups 0x00000134
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000120
-#define ASIZ_task_groups 0x00000040
-#define AOFF_task_cap_effective 0x00000160
+#define AOFF_task_groups 0x00000138
+#define ASIZ_task_groups 0x00000080
+#define AOFF_task_cap_effective 0x000001b8
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000164
+#define AOFF_task_cap_inheritable 0x000001bc
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000168
+#define AOFF_task_cap_permitted 0x000001c0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x0000016c
+#define AOFF_task_user 0x000001c4
#define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x00000170
+#define AOFF_task_rlim 0x000001c8
#define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x000001c0
+#define AOFF_task_used_math 0x00000218
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x000001c2
+#define AOFF_task_comm 0x0000021a
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x000001d4
+#define AOFF_task_link_count 0x0000022c
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x000001d8
+#define AOFF_task_tty 0x00000230
#define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x000001dc
+#define AOFF_task_semundo 0x00000234
#define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x000001e0
+#define AOFF_task_semsleeping 0x00000238
#define ASIZ_task_semsleeping 0x00000004
-#define AOFF_task_thread 0x000001e8
+#define AOFF_task_thread 0x00000240
#define ASIZ_task_thread 0x00000388
-#define AOFF_task_fs 0x00000570
+#define AOFF_task_fs 0x000005c8
#define ASIZ_task_fs 0x00000004
-#define AOFF_task_files 0x00000574
+#define AOFF_task_files 0x000005cc
#define ASIZ_task_files 0x00000004
-#define AOFF_task_mm 0x00000578
-#define ASIZ_task_mm 0x00000004
-#define AOFF_task_active_mm 0x0000057c
-#define ASIZ_task_active_mm 0x00000004
-#define AOFF_task_sigmask_lock 0x00000580
+#define AOFF_task_sigmask_lock 0x000005d0
#define ASIZ_task_sigmask_lock 0x00000000
-#define AOFF_task_sig 0x00000580
+#define AOFF_task_sig 0x000005d0
#define ASIZ_task_sig 0x00000004
-#define AOFF_task_signal 0x00000584
+#define AOFF_task_signal 0x000005d4
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x0000058c
+#define AOFF_task_blocked 0x000005dc
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000594
+#define AOFF_task_sigqueue 0x000005e4
#define ASIZ_task_sigqueue 0x00000004
-#define AOFF_task_sigqueue_tail 0x00000598
+#define AOFF_task_sigqueue_tail 0x000005e8
#define ASIZ_task_sigqueue_tail 0x00000004
-#define AOFF_task_sas_ss_sp 0x0000059c
+#define AOFF_task_sas_ss_sp 0x000005ec
#define ASIZ_task_sas_ss_sp 0x00000004
-#define AOFF_task_sas_ss_size 0x000005a0
+#define AOFF_task_sas_ss_size 0x000005f0
#define ASIZ_task_sas_ss_size 0x00000004
+#define AOFF_task_parent_exec_id 0x000005f4
+#define ASIZ_task_parent_exec_id 0x00000004
+#define AOFF_task_self_exec_id 0x000005f8
+#define ASIZ_task_self_exec_id 0x00000004
+#define AOFF_task_exit_sem 0x000005fc
+#define ASIZ_task_exit_sem 0x0000001c
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000004
#define AOFF_mm_mmap_avl 0x00000004
@@ -280,6 +286,8 @@
#define ASIZ_thread_core_exec 0x00000020
#define AOFF_thread_new_signal 0x00000380
#define ASIZ_thread_new_signal 0x00000004
+#define AOFF_thread_refcount 0x00000384
+#define ASIZ_thread_refcount 0x00000004
#else /* CONFIG_SMP */
@@ -295,168 +303,174 @@
#define ASIZ_task_exec_domain 0x00000004
#define AOFF_task_need_resched 0x00000014
#define ASIZ_task_need_resched 0x00000004
-#define AOFF_task_counter 0x00000018
+#define AOFF_task_avg_slice 0x00000018
+#define ASIZ_task_avg_slice 0x00000004
+#define AOFF_task_lock_depth 0x0000001c
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000020
#define ASIZ_task_counter 0x00000004
-#define AOFF_task_priority 0x0000001c
+#define AOFF_task_priority 0x00000024
#define ASIZ_task_priority 0x00000004
-#define AOFF_task_avg_slice 0x00000020
-#define ASIZ_task_avg_slice 0x00000004
-#define AOFF_task_has_cpu 0x00000024
+#define AOFF_task_policy 0x00000028
+#define ASIZ_task_policy 0x00000004
+#define AOFF_task_mm 0x0000002c
+#define ASIZ_task_mm 0x00000004
+#define AOFF_task_active_mm 0x00000030
+#define ASIZ_task_active_mm 0x00000004
+#define AOFF_task_has_cpu 0x00000034
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000028
+#define AOFF_task_processor 0x00000038
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x0000002c
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x00000030
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000034
-#define ASIZ_task_next_task 0x00000004
-#define AOFF_task_prev_task 0x00000038
-#define ASIZ_task_prev_task 0x00000004
#define AOFF_task_run_list 0x0000003c
#define ASIZ_task_run_list 0x00000008
-#define AOFF_task_binfmt 0x00000044
+#define AOFF_task_next_task 0x00000044
+#define ASIZ_task_next_task 0x00000004
+#define AOFF_task_prev_task 0x00000048
+#define ASIZ_task_prev_task 0x00000004
+#define AOFF_task_last_processor 0x0000004c
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000050
#define ASIZ_task_binfmt 0x00000004
-#define AOFF_task_exit_code 0x00000048
+#define AOFF_task_exit_code 0x00000054
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000004c
+#define AOFF_task_exit_signal 0x00000058
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000050
+#define AOFF_task_pdeath_signal 0x0000005c
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000054
+#define AOFF_task_personality 0x00000060
#define ASIZ_task_personality 0x00000004
-#define AOFF_task_pid 0x0000005c
+#define AOFF_task_pid 0x00000068
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000060
+#define AOFF_task_pgrp 0x0000006c
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x00000064
+#define AOFF_task_tty_old_pgrp 0x00000070
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x00000068
+#define AOFF_task_session 0x00000074
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x0000006c
+#define AOFF_task_leader 0x00000078
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x00000070
+#define AOFF_task_p_opptr 0x0000007c
#define ASIZ_task_p_opptr 0x00000004
-#define AOFF_task_p_pptr 0x00000074
+#define AOFF_task_p_pptr 0x00000080
#define ASIZ_task_p_pptr 0x00000004
-#define AOFF_task_p_cptr 0x00000078
+#define AOFF_task_p_cptr 0x00000084
#define ASIZ_task_p_cptr 0x00000004
-#define AOFF_task_p_ysptr 0x0000007c
+#define AOFF_task_p_ysptr 0x00000088
#define ASIZ_task_p_ysptr 0x00000004
-#define AOFF_task_p_osptr 0x00000080
+#define AOFF_task_p_osptr 0x0000008c
#define ASIZ_task_p_osptr 0x00000004
-#define AOFF_task_pidhash_next 0x00000084
+#define AOFF_task_pidhash_next 0x00000090
#define ASIZ_task_pidhash_next 0x00000004
-#define AOFF_task_pidhash_pprev 0x00000088
+#define AOFF_task_pidhash_pprev 0x00000094
#define ASIZ_task_pidhash_pprev 0x00000004
-#define AOFF_task_wait_chldexit 0x0000008c
+#define AOFF_task_wait_chldexit 0x00000098
#define ASIZ_task_wait_chldexit 0x00000018
-#define AOFF_task_vfork_sem 0x000000a4
+#define AOFF_task_vfork_sem 0x000000b0
#define ASIZ_task_vfork_sem 0x00000004
-#define AOFF_task_policy 0x000000a8
-#define ASIZ_task_policy 0x00000004
-#define AOFF_task_rt_priority 0x000000ac
+#define AOFF_task_rt_priority 0x000000b4
#define ASIZ_task_rt_priority 0x00000004
-#define AOFF_task_it_real_value 0x000000b0
+#define AOFF_task_it_real_value 0x000000b8
#define ASIZ_task_it_real_value 0x00000004
-#define AOFF_task_it_prof_value 0x000000b4
+#define AOFF_task_it_prof_value 0x000000bc
#define ASIZ_task_it_prof_value 0x00000004
-#define AOFF_task_it_virt_value 0x000000b8
+#define AOFF_task_it_virt_value 0x000000c0
#define ASIZ_task_it_virt_value 0x00000004
-#define AOFF_task_it_real_incr 0x000000bc
+#define AOFF_task_it_real_incr 0x000000c4
#define ASIZ_task_it_real_incr 0x00000004
-#define AOFF_task_it_prof_incr 0x000000c0
+#define AOFF_task_it_prof_incr 0x000000c8
#define ASIZ_task_it_prof_incr 0x00000004
-#define AOFF_task_it_virt_incr 0x000000c4
+#define AOFF_task_it_virt_incr 0x000000cc
#define ASIZ_task_it_virt_incr 0x00000004
-#define AOFF_task_real_timer 0x000000c8
+#define AOFF_task_real_timer 0x000000d0
#define ASIZ_task_real_timer 0x00000014
-#define AOFF_task_times 0x000000dc
+#define AOFF_task_times 0x000000e4
#define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000ec
+#define AOFF_task_start_time 0x000000f4
#define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000f0
+#define AOFF_task_per_cpu_utime 0x000000f8
#define ASIZ_task_per_cpu_utime 0x00000080
-#define AOFF_task_min_flt 0x000001f0
+#define AOFF_task_min_flt 0x000001f8
#define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x000001f4
+#define AOFF_task_maj_flt 0x000001fc
#define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x000001f8
+#define AOFF_task_nswap 0x00000200
#define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x000001fc
+#define AOFF_task_cmin_flt 0x00000204
#define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x00000200
+#define AOFF_task_cmaj_flt 0x00000208
#define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x00000204
+#define AOFF_task_cnswap 0x0000020c
#define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x0000020a
-#define ASIZ_task_uid 0x00000002
-#define AOFF_task_euid 0x0000020c
-#define ASIZ_task_euid 0x00000002
-#define AOFF_task_suid 0x0000020e
-#define ASIZ_task_suid 0x00000002
-#define AOFF_task_fsuid 0x00000210
-#define ASIZ_task_fsuid 0x00000002
-#define AOFF_task_gid 0x00000212
-#define ASIZ_task_gid 0x00000002
-#define AOFF_task_egid 0x00000214
-#define ASIZ_task_egid 0x00000002
-#define AOFF_task_sgid 0x00000216
-#define ASIZ_task_sgid 0x00000002
-#define AOFF_task_fsgid 0x00000218
-#define ASIZ_task_fsgid 0x00000002
-#define AOFF_task_ngroups 0x0000021c
+#define AOFF_task_uid 0x00000214
+#define ASIZ_task_uid 0x00000004
+#define AOFF_task_euid 0x00000218
+#define ASIZ_task_euid 0x00000004
+#define AOFF_task_suid 0x0000021c
+#define ASIZ_task_suid 0x00000004
+#define AOFF_task_fsuid 0x00000220
+#define ASIZ_task_fsuid 0x00000004
+#define AOFF_task_gid 0x00000224
+#define ASIZ_task_gid 0x00000004
+#define AOFF_task_egid 0x00000228
+#define ASIZ_task_egid 0x00000004
+#define AOFF_task_sgid 0x0000022c
+#define ASIZ_task_sgid 0x00000004
+#define AOFF_task_fsgid 0x00000230
+#define ASIZ_task_fsgid 0x00000004
+#define AOFF_task_ngroups 0x00000234
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000220
-#define ASIZ_task_groups 0x00000040
-#define AOFF_task_cap_effective 0x00000260
+#define AOFF_task_groups 0x00000238
+#define ASIZ_task_groups 0x00000080
+#define AOFF_task_cap_effective 0x000002b8
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000264
+#define AOFF_task_cap_inheritable 0x000002bc
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000268
+#define AOFF_task_cap_permitted 0x000002c0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x0000026c
+#define AOFF_task_user 0x000002c4
#define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x00000270
+#define AOFF_task_rlim 0x000002c8
#define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x000002c0
+#define AOFF_task_used_math 0x00000318
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x000002c2
+#define AOFF_task_comm 0x0000031a
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x000002d4
+#define AOFF_task_link_count 0x0000032c
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x000002d8
+#define AOFF_task_tty 0x00000330
#define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x000002dc
+#define AOFF_task_semundo 0x00000334
#define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x000002e0
+#define AOFF_task_semsleeping 0x00000338
#define ASIZ_task_semsleeping 0x00000004
-#define AOFF_task_thread 0x000002e8
+#define AOFF_task_thread 0x00000340
#define ASIZ_task_thread 0x00000388
-#define AOFF_task_fs 0x00000670
+#define AOFF_task_fs 0x000006c8
#define ASIZ_task_fs 0x00000004
-#define AOFF_task_files 0x00000674
+#define AOFF_task_files 0x000006cc
#define ASIZ_task_files 0x00000004
-#define AOFF_task_mm 0x00000678
-#define ASIZ_task_mm 0x00000004
-#define AOFF_task_active_mm 0x0000067c
-#define ASIZ_task_active_mm 0x00000004
-#define AOFF_task_sigmask_lock 0x00000680
+#define AOFF_task_sigmask_lock 0x000006d0
#define ASIZ_task_sigmask_lock 0x00000008
-#define AOFF_task_sig 0x00000688
+#define AOFF_task_sig 0x000006d8
#define ASIZ_task_sig 0x00000004
-#define AOFF_task_signal 0x0000068c
+#define AOFF_task_signal 0x000006dc
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000694
+#define AOFF_task_blocked 0x000006e4
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x0000069c
+#define AOFF_task_sigqueue 0x000006ec
#define ASIZ_task_sigqueue 0x00000004
-#define AOFF_task_sigqueue_tail 0x000006a0
+#define AOFF_task_sigqueue_tail 0x000006f0
#define ASIZ_task_sigqueue_tail 0x00000004
-#define AOFF_task_sas_ss_sp 0x000006a4
+#define AOFF_task_sas_ss_sp 0x000006f4
#define ASIZ_task_sas_ss_sp 0x00000004
-#define AOFF_task_sas_ss_size 0x000006a8
+#define AOFF_task_sas_ss_size 0x000006f8
#define ASIZ_task_sas_ss_size 0x00000004
+#define AOFF_task_parent_exec_id 0x000006fc
+#define ASIZ_task_parent_exec_id 0x00000004
+#define AOFF_task_self_exec_id 0x00000700
+#define ASIZ_task_self_exec_id 0x00000004
+#define AOFF_task_exit_sem 0x00000704
+#define ASIZ_task_exit_sem 0x00000024
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000004
#define AOFF_mm_mmap_avl 0x00000004
@@ -557,6 +571,8 @@
#define ASIZ_thread_core_exec 0x00000020
#define AOFF_thread_new_signal 0x00000380
#define ASIZ_thread_new_signal 0x00000004
+#define AOFF_thread_refcount 0x00000384
+#define ASIZ_thread_refcount 0x00000004
#endif /* CONFIG_SMP */
diff --git a/include/asm-sparc/asmmacro.h b/include/asm-sparc/asmmacro.h
index 553495c08..d1441ec0a 100644
--- a/include/asm-sparc/asmmacro.h
+++ b/include/asm-sparc/asmmacro.h
@@ -39,9 +39,6 @@
or %tmp, %lo(C_LABEL(cpu_offset)), %tmp; \
ld [%tmp + %reg], %reg;
-#define GET_PAGE_OFFSET(reg) \
- sethi BTFIXUP_SETHI_INIT(page_offset,0xf0000000), %reg;
-
/* All trap entry points _must_ begin with this macro or else you
* lose. It makes sure the kernel has a proper window so that
* c-code can be called.
diff --git a/include/asm-sparc/ipcbuf.h b/include/asm-sparc/ipcbuf.h
new file mode 100644
index 000000000..9bef02d04
--- /dev/null
+++ b/include/asm-sparc/ipcbuf.h
@@ -0,0 +1,31 @@
+#ifndef _SPARC_IPCBUF_H
+#define _SPARC_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for sparc architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode
+ * - 32-bit seq
+ * - 2 miscellaneous 64-bit values (so that this structure matches
+ * sparc64 ipc64_perm)
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_uid32_t cuid;
+ __kernel_gid32_t cgid;
+ unsigned short __pad1;
+ __kernel_mode_t mode;
+ unsigned short __pad2;
+ unsigned short seq;
+ unsigned long long __unused1;
+ unsigned long long __unused2;
+};
+
+#endif /* _SPARC_IPCBUF_H */
diff --git a/include/asm-sparc/msgbuf.h b/include/asm-sparc/msgbuf.h
new file mode 100644
index 000000000..8cec9ad0b
--- /dev/null
+++ b/include/asm-sparc/msgbuf.h
@@ -0,0 +1,31 @@
+#ifndef _SPARC64_MSGBUF_H
+#define _SPARC64_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ unsigned int __pad1;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ unsigned int __pad2;
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ unsigned int __pad3;
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_MSGBUF_H */
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h
index a3754dfe2..352590e2e 100644
--- a/include/asm-sparc/page.h
+++ b/include/asm-sparc/page.h
@@ -1,4 +1,4 @@
-/* $Id: page.h,v 1.45 1999/07/03 08:58:05 davem Exp $
+/* $Id: page.h,v 1.46 2000/01/08 16:38:22 anton Exp $
* page.h: Various defines and such for MMU operations on the Sparc for
* the Linux kernel.
*
@@ -28,32 +28,14 @@
#ifndef __ASSEMBLY__
#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int *)0=0; } while (0)
+
#define PAGE_BUG(page) do { \
- BUG(); } while (0)
+ BUG(); \
+} while (0)
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE)
-extern unsigned long page_offset;
-
-BTFIXUPDEF_SETHI_INIT(page_offset,0xf0000000)
-
-#ifdef MODULE
-#define PAGE_OFFSET (page_offset)
-#else
-#define PAGE_OFFSET BTFIXUP_SETHI(page_offset)
-#endif
-
-/* translate between physical and virtual addresses */
-BTFIXUPDEF_CALL_CONST(unsigned long, mmu_v2p, unsigned long)
-BTFIXUPDEF_CALL_CONST(unsigned long, mmu_p2v, unsigned long)
-
-#define mmu_v2p(vaddr) BTFIXUP_CALL(mmu_v2p)(vaddr)
-#define mmu_p2v(paddr) BTFIXUP_CALL(mmu_p2v)(paddr)
-
-#define __pa(x) (mmu_v2p((unsigned long)(x)))
-#define __va(x) ((void *)(mmu_p2v((unsigned long)(x))))
-
/* The following structure is used to hold the physical
* memory configuration of the machine. This is filled in
* probe_memory() and is later used by mem_init() to set up
@@ -273,20 +255,20 @@ BTFIXUPDEF_SETHI(sparc_unmapped_base)
#define TASK_UNMAPPED_BASE BTFIXUP_SETHI(sparc_unmapped_base)
-/* to align the pointer to the (next) page boundary */
-#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
-
-/* Now, to allow for very large physical memory configurations we
- * place the page pool both above the kernel and below the kernel.
- */
-#define MAP_NR(addr) ((((unsigned long) (addr)) - PAGE_OFFSET) >> PAGE_SHIFT)
-
#else /* !(__ASSEMBLY__) */
#define __pgprot(x) (x)
#endif /* !(__ASSEMBLY__) */
+/* to align the pointer to the (next) page boundary */
+#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
+
+#define PAGE_OFFSET 0xf0000000
+#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
+#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
+#define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT)
+
#endif /* __KERNEL__ */
#endif /* _SPARC_PAGE_H */
diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h
index c8e5d1062..ab87c0629 100644
--- a/include/asm-sparc/pgalloc.h
+++ b/include/asm-sparc/pgalloc.h
@@ -1,4 +1,4 @@
-/* $Id: pgalloc.h,v 1.1 1999/12/28 04:13:35 anton Exp $ */
+/* $Id: pgalloc.h,v 1.2 2000/01/15 00:51:42 anton Exp $ */
#ifndef _SPARC_PGALLOC_H
#define _SPARC_PGALLOC_H
@@ -30,10 +30,10 @@ BTFIXUPDEF_CALL(void, local_flush_tlb_page, struct vm_area_struct *, unsigned lo
#define local_flush_tlb_range(mm,start,end) BTFIXUP_CALL(local_flush_tlb_range)(mm,start,end)
#define local_flush_tlb_page(vma,addr) BTFIXUP_CALL(local_flush_tlb_page)(vma,addr)
-BTFIXUPDEF_CALL(void, local_flush_page_to_ram, struct page *)
+BTFIXUPDEF_CALL(void, local_flush_page_to_ram, unsigned long)
BTFIXUPDEF_CALL(void, local_flush_sig_insns, struct mm_struct *, unsigned long)
-#define local_flush_page_to_ram(page) BTFIXUP_CALL(local_flush_page_to_ram)(page)
+#define local_flush_page_to_ram(addr) BTFIXUP_CALL(local_flush_page_to_ram)(addr)
#define local_flush_sig_insns(mm,insn_addr) BTFIXUP_CALL(local_flush_sig_insns)(mm,insn_addr)
extern void smp_flush_cache_all(void);
@@ -49,7 +49,7 @@ extern void smp_flush_tlb_range(struct mm_struct *mm,
unsigned long start,
unsigned long end);
extern void smp_flush_tlb_page(struct vm_area_struct *mm, unsigned long page);
-extern void smp_flush_page_to_ram(struct page *page);
+extern void smp_flush_page_to_ram(unsigned long page);
extern void smp_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr);
#endif
@@ -74,12 +74,14 @@ BTFIXUPDEF_CALL(void, flush_tlb_page, struct vm_area_struct *, unsigned long)
#define flush_tlb_range(mm,start,end) BTFIXUP_CALL(flush_tlb_range)(mm,start,end)
#define flush_tlb_page(vma,addr) BTFIXUP_CALL(flush_tlb_page)(vma,addr)
-BTFIXUPDEF_CALL(void, flush_page_to_ram, struct page *)
+BTFIXUPDEF_CALL(void, __flush_page_to_ram, unsigned long)
BTFIXUPDEF_CALL(void, flush_sig_insns, struct mm_struct *, unsigned long)
-#define flush_page_to_ram(page) BTFIXUP_CALL(flush_page_to_ram)(page)
+#define __flush_page_to_ram(addr) BTFIXUP_CALL(__flush_page_to_ram)(addr)
#define flush_sig_insns(mm,insn_addr) BTFIXUP_CALL(flush_sig_insns)(mm,insn_addr)
+#define flush_page_to_ram(page) __flush_page_to_ram(page_address(page))
+
extern struct pgtable_cache_struct {
unsigned long *pgd_cache;
unsigned long *pte_cache;
diff --git a/include/asm-sparc/posix_types.h b/include/asm-sparc/posix_types.h
index 4ec175150..72991ca02 100644
--- a/include/asm-sparc/posix_types.h
+++ b/include/asm-sparc/posix_types.h
@@ -7,13 +7,7 @@
* assume GCC is being used.
*/
-/* When cross-compilation is no longer an issue, fix this. */
-#if defined(__svr4__) || defined(__ELF__)
typedef unsigned int __kernel_size_t;
-#else
-typedef long unsigned int __kernel_size_t;
-#endif /* !(__svr4__ || __ELF__) */
-
typedef int __kernel_ssize_t;
typedef long int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
@@ -31,6 +25,12 @@ typedef short __kernel_nlink_t;
typedef long __kernel_daddr_t;
typedef long __kernel_off_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
diff --git a/include/asm-sparc/processor.h b/include/asm-sparc/processor.h
index 8505ce5d4..a74493500 100644
--- a/include/asm-sparc/processor.h
+++ b/include/asm-sparc/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.75 2000/01/07 20:21:42 davem Exp $
+/* $Id: processor.h,v 1.76 2000/01/09 09:13:38 anton Exp $
* include/asm-sparc/processor.h
*
* Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
@@ -22,6 +22,7 @@
#include <asm/segment.h>
#include <asm/btfixup.h>
#include <asm/page.h>
+#include <asm/atomic.h>
/*
* Bus types
@@ -88,6 +89,7 @@ struct thread_struct {
mm_segment_t current_ds;
struct exec core_exec; /* just what it says. */
int new_signal;
+ atomic_t refcount; /* used for sun4c only */
};
#define SPARC_FLAG_KTHREAD 0x1 /* task is a kernel thread */
@@ -201,11 +203,11 @@ extern struct task_struct *last_task_used_math;
/* Allocation and freeing of basic task resources. */
BTFIXUPDEF_CALL(struct task_struct *, alloc_task_struct, void)
BTFIXUPDEF_CALL(void, free_task_struct, struct task_struct *)
+BTFIXUPDEF_CALL(void, get_task_struct, struct task_struct *)
#define alloc_task_struct() BTFIXUP_CALL(alloc_task_struct)()
#define free_task_struct(tsk) BTFIXUP_CALL(free_task_struct)(tsk)
-
-/* XXX Anton, here is where you implement get_task_struct et al. */
+#define get_task_struct(tsk) BTFIXUP_CALL(get_task_struct)(tsk)
#define init_task (init_task_union.task)
#define init_stack (init_task_union.stack)
diff --git a/include/asm-sparc/sembuf.h b/include/asm-sparc/sembuf.h
new file mode 100644
index 000000000..47b2ef9bc
--- /dev/null
+++ b/include/asm-sparc/sembuf.h
@@ -0,0 +1,25 @@
+#ifndef _SPARC_SEMBUF_H
+#define _SPARC_SEMBUF_H
+
+/*
+ * The semid64_ds structure for sparc architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ unsigned int __pad1;
+ __kernel_time_t sem_otime; /* last semop time */
+ unsigned int __pad2;
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_SEMBUF_H */
diff --git a/include/asm-sparc/shmbuf.h b/include/asm-sparc/shmbuf.h
new file mode 100644
index 000000000..1ff9da8be
--- /dev/null
+++ b/include/asm-sparc/shmbuf.h
@@ -0,0 +1,42 @@
+#ifndef _SPARC_SHMBUF_H
+#define _SPARC_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for sparc architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ unsigned int __pad1;
+ __kernel_time_t shm_atime; /* last attach time */
+ unsigned int __pad2;
+ __kernel_time_t shm_dtime; /* last detach time */
+ unsigned int __pad3;
+ __kernel_time_t shm_ctime; /* last change time */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _SPARC_SHMBUF_H */
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h
index 65d8a36d3..c026a21fa 100644
--- a/include/asm-sparc/uaccess.h
+++ b/include/asm-sparc/uaccess.h
@@ -1,4 +1,4 @@
-/* $Id: uaccess.h,v 1.20 1999/11/23 08:56:45 davem Exp $
+/* $Id: uaccess.h,v 1.21 2000/01/08 16:38:23 anton Exp $
* uaccess.h: User space memore access functions.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -34,10 +34,10 @@
#define segment_eq(a,b) ((a).seg == (b).seg)
-/* We have there a nice not-mapped page at page_offset - PAGE_SIZE, so that this test
+/* We have there a nice not-mapped page at PAGE_OFFSET - PAGE_SIZE, so that this test
* can be fairly lightweight.
* No one can read/write anything from userland in the kernel space by setting
- * large size and address near to page_offset - a fault will break his intentions.
+ * large size and address near to PAGE_OFFSET - a fault will break his intentions.
*/
#define __user_ok(addr,size) ((addr) < STACK_TOP)
#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
index 757012fc5..f16345145 100644
--- a/include/asm-sparc/unistd.h
+++ b/include/asm-sparc/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.60 2000/01/05 07:37:50 jj Exp $ */
+/* $Id: unistd.h,v 1.63 2000/01/12 11:47:40 anton Exp $ */
#ifndef _SPARC_UNISTD_H
#define _SPARC_UNISTD_H
@@ -46,11 +46,11 @@
#define __NR_sigaltstack 28 /* Common */
#define __NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */
#define __NR_utime 30 /* Implemented via utimes() under SunOS */
-/* #define __NR_stty 31 Implemented via ioctl() under SunOS */
-/* #define __NR_gtty 32 Implemented via ioctl() under SunOS */
+#define __NR_lchown32 31 /* Linux sparc32 specific */
+#define __NR_fchown32 32 /* Linux sparc32 specific */
#define __NR_access 33 /* Common */
#define __NR_nice 34 /* Implemented via get/setpriority() in SunOS */
-/* #define __NR_ftime 35 Implemented via gettimeofday() in SunOS */
+#define __NR_chown32 35 /* Linux sparc32 specific */
#define __NR_sync 36 /* Common */
#define __NR_kill 37 /* Common */
#define __NR_stat 38 /* Common */
@@ -59,7 +59,7 @@
#define __NR_dup 41 /* Common */
#define __NR_pipe 42 /* Common */
#define __NR_times 43 /* Implemented via getrusage() in SunOS */
-/* #define __NR_profil 44 Common */
+#define __NR_getuid32 44 /* Linux sparc32 specific */
#define __NR_umount2 45 /* Linux Specific */
#define __NR_setgid 46 /* Implemented via setregid() in SunOS */
#define __NR_getgid 47 /* Common */
@@ -68,7 +68,7 @@
#define __NR_getegid 50 /* SunOS calls getgid() */
#define __NR_acct 51 /* Common */
/* #define __NR_ni_syscall 52 ENOSYS under SunOS */
-/* #define __NR_mctl 53 SunOS specific */
+#define __NR_getgid32 53 /* Linux sparc32 specific */
#define __NR_ioctl 54 /* Common */
#define __NR_reboot 55 /* Common */
#define __NR_mmap2 56 /* Linux sparc32 Specific */
@@ -84,32 +84,32 @@
#define __NR_vfork 66 /* Common */
#define __NR_pread 67 /* Linux Specific */
#define __NR_pwrite 68 /* Linux Specific */
-/* #define __NR_sbrk 69 SunOS Specific */
-/* #define __NR_sstk 70 SunOS Specific */
+#define __NR_geteuid32 69 /* Linux sparc32, sbrk under SunOS */
+#define __NR_getegid32 70 /* Linux sparc32, sstk under SunOS */
#define __NR_mmap 71 /* Common */
-/* #define __NR_vadvise 72 SunOS Specific */
+#define __NR_setreuid32 72 /* Linux sparc32, vadvise under SunOS */
#define __NR_munmap 73 /* Common */
#define __NR_mprotect 74 /* Common */
-/* #define __NR_madvise 75 SunOS Specific */
+#define __NR_madvise 75 /* Common */
#define __NR_vhangup 76 /* Common */
#define __NR_truncate64 77 /* Linux sparc32 Specific */
-/* #define __NR_mincore 78 SunOS Specific */
+#define __NR_mincore 78 /* Common */
#define __NR_getgroups 79 /* Common */
#define __NR_setgroups 80 /* Common */
#define __NR_getpgrp 81 /* Common */
-/* #define __NR_setpgrp 82 setpgid, same difference... */
+#define __NR_setgroups32 82 /* Linux sparc32, setpgrp under SunOS */
#define __NR_setitimer 83 /* Common */
#define __NR_ftruncate64 84 /* Linux sparc32 Specific */
#define __NR_swapon 85 /* Common */
#define __NR_getitimer 86 /* Common */
-/* #define __NR_gethostname 87 SunOS Specific */
+#define __NR_setuid32 87 /* Linux sparc32, gethostname under SunOS */
#define __NR_sethostname 88 /* Common */
-/* #define __NR_getdtablesize 89 SunOS Specific */
+#define __NR_setgid32 89 /* Linux sparc32, getdtablesize under SunOS */
#define __NR_dup2 90 /* Common */
-/* #define __NR_getdopt 91 SunOS Specific */
+#define __NR_setfsuid32 91 /* Linux sparc32, getdopt under SunOS */
#define __NR_fcntl 92 /* Common */
#define __NR_select 93 /* Common */
-/* #define __NR_setdopt 94 SunOS Specific */
+#define __NR_setfsgid32 94 /* Linux sparc32, setdopt under SunOS */
#define __NR_fsync 95 /* Common */
#define __NR_setpriority 96 /* Common */
#define __NR_socket 97 /* Common */
@@ -123,14 +123,14 @@
#define __NR_rt_sigtimedwait 105 /* Linux Specific */
#define __NR_rt_sigqueueinfo 106 /* Linux Specific */
#define __NR_rt_sigsuspend 107 /* Linux Specific */
-/* #define __NR_sigvec 108 SunOS Specific */
-/* #define __NR_sigblock 109 SunOS Specific */
-/* #define __NR_sigsetmask 110 SunOS Specific */
-/* #define __NR_sigpause 111 SunOS Specific */
-/* #define __NR_sigstack 112 SunOS Specific */
+#define __NR_setresuid32 108 /* Linux Specific, sigvec under SunOS */
+#define __NR_getresuid32 109 /* Linux Specific, sigblock under SunOS */
+#define __NR_setresgid32 110 /* Linux Specific, sigsetmask under SunOS */
+#define __NR_getresgid32 111 /* Linux Specific, sigpause under SunOS */
+#define __NR_setregid32 112 /* Linux sparc32, sigstack under SunOS */
#define __NR_recvmsg 113 /* Common */
#define __NR_sendmsg 114 /* Common */
-/* #define __NR_vtrace 115 SunOS Specific */
+#define __NR_getgroups32 115 /* Linux sparc32, vtrace under SunOS */
#define __NR_gettimeofday 116 /* Common */
#define __NR_getrusage 117 /* Common */
#define __NR_getsockopt 118 /* Common */
@@ -225,7 +225,7 @@
#define __NR_syslog 207 /* Linux Specific */
/* #define __NR_olduname 208 Linux Specific */
/* #define __NR_iopl 209 Linux Specific - i386 specific, unused */
-#define __NR_idle 210 /* Linux Specific */
+/* #define __NR_idle 210 Linux Specific - was sys_idle, now unused */
/* #define __NR_vm86 211 Linux Specific - i386 specific, unused */
#define __NR_waitpid 212 /* Linux Specific */
#define __NR_swapoff 213 /* Linux Specific */
@@ -416,7 +416,6 @@ return -1; \
* some others too.
*/
#define __NR__exit __NR_exit
-static __inline__ _syscall0(int,idle)
static __inline__ _syscall0(int,pause)
static __inline__ _syscall0(int,sync)
static __inline__ _syscall0(pid_t,setsid)
diff --git a/include/asm-sparc64/asm_offsets.h b/include/asm-sparc64/asm_offsets.h
index 8c36daca1..07dfc1d30 100644
--- a/include/asm-sparc64/asm_offsets.h
+++ b/include/asm-sparc64/asm_offsets.h
@@ -24,152 +24,152 @@
#define ASIZ_task_exec_domain 0x00000008
#define AOFF_task_need_resched 0x00000020
#define ASIZ_task_need_resched 0x00000008
-#define AOFF_task_counter 0x00000028
+#define AOFF_task_avg_slice 0x00000028
+#define ASIZ_task_avg_slice 0x00000008
+#define AOFF_task_lock_depth 0x00000030
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000038
#define ASIZ_task_counter 0x00000008
-#define AOFF_task_priority 0x00000030
+#define AOFF_task_priority 0x00000040
#define ASIZ_task_priority 0x00000008
-#define AOFF_task_avg_slice 0x00000038
-#define ASIZ_task_avg_slice 0x00000008
-#define AOFF_task_has_cpu 0x00000040
+#define AOFF_task_policy 0x00000048
+#define ASIZ_task_policy 0x00000008
+#define AOFF_task_mm 0x00000050
+#define ASIZ_task_mm 0x00000008
+#define AOFF_task_active_mm 0x00000058
+#define ASIZ_task_active_mm 0x00000008
+#define AOFF_task_has_cpu 0x00000060
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000044
+#define AOFF_task_processor 0x00000064
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x00000048
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x0000004c
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000050
+#define AOFF_task_run_list 0x00000068
+#define ASIZ_task_run_list 0x00000010
+#define AOFF_task_next_task 0x00000078
#define ASIZ_task_next_task 0x00000008
-#define AOFF_task_prev_task 0x00000058
+#define AOFF_task_prev_task 0x00000080
#define ASIZ_task_prev_task 0x00000008
-#define AOFF_task_run_list 0x00000060
-#define ASIZ_task_run_list 0x00000010
-#define AOFF_task_binfmt 0x00000070
+#define AOFF_task_last_processor 0x00000088
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000090
#define ASIZ_task_binfmt 0x00000008
-#define AOFF_task_exit_code 0x00000078
+#define AOFF_task_exit_code 0x00000098
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000007c
+#define AOFF_task_exit_signal 0x0000009c
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000080
+#define AOFF_task_pdeath_signal 0x000000a0
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000088
+#define AOFF_task_personality 0x000000a8
#define ASIZ_task_personality 0x00000008
-#define AOFF_task_pid 0x00000094
+#define AOFF_task_pid 0x000000b4
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000098
+#define AOFF_task_pgrp 0x000000b8
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x0000009c
+#define AOFF_task_tty_old_pgrp 0x000000bc
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x000000a0
+#define AOFF_task_session 0x000000c0
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x000000a4
+#define AOFF_task_leader 0x000000c4
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x000000a8
+#define AOFF_task_p_opptr 0x000000c8
#define ASIZ_task_p_opptr 0x00000008
-#define AOFF_task_p_pptr 0x000000b0
+#define AOFF_task_p_pptr 0x000000d0
#define ASIZ_task_p_pptr 0x00000008
-#define AOFF_task_p_cptr 0x000000b8
+#define AOFF_task_p_cptr 0x000000d8
#define ASIZ_task_p_cptr 0x00000008
-#define AOFF_task_p_ysptr 0x000000c0
+#define AOFF_task_p_ysptr 0x000000e0
#define ASIZ_task_p_ysptr 0x00000008
-#define AOFF_task_p_osptr 0x000000c8
+#define AOFF_task_p_osptr 0x000000e8
#define ASIZ_task_p_osptr 0x00000008
-#define AOFF_task_pidhash_next 0x000000d0
+#define AOFF_task_pidhash_next 0x000000f0
#define ASIZ_task_pidhash_next 0x00000008
-#define AOFF_task_pidhash_pprev 0x000000d8
+#define AOFF_task_pidhash_pprev 0x000000f8
#define ASIZ_task_pidhash_pprev 0x00000008
-#define AOFF_task_wait_chldexit 0x000000e0
+#define AOFF_task_wait_chldexit 0x00000100
#define ASIZ_task_wait_chldexit 0x00000020
-#define AOFF_task_vfork_sem 0x00000100
+#define AOFF_task_vfork_sem 0x00000120
#define ASIZ_task_vfork_sem 0x00000008
-#define AOFF_task_policy 0x00000108
-#define ASIZ_task_policy 0x00000008
-#define AOFF_task_rt_priority 0x00000110
+#define AOFF_task_rt_priority 0x00000128
#define ASIZ_task_rt_priority 0x00000008
-#define AOFF_task_it_real_value 0x00000118
+#define AOFF_task_it_real_value 0x00000130
#define ASIZ_task_it_real_value 0x00000008
-#define AOFF_task_it_prof_value 0x00000120
+#define AOFF_task_it_prof_value 0x00000138
#define ASIZ_task_it_prof_value 0x00000008
-#define AOFF_task_it_virt_value 0x00000128
+#define AOFF_task_it_virt_value 0x00000140
#define ASIZ_task_it_virt_value 0x00000008
-#define AOFF_task_it_real_incr 0x00000130
+#define AOFF_task_it_real_incr 0x00000148
#define ASIZ_task_it_real_incr 0x00000008
-#define AOFF_task_it_prof_incr 0x00000138
+#define AOFF_task_it_prof_incr 0x00000150
#define ASIZ_task_it_prof_incr 0x00000008
-#define AOFF_task_it_virt_incr 0x00000140
+#define AOFF_task_it_virt_incr 0x00000158
#define ASIZ_task_it_virt_incr 0x00000008
-#define AOFF_task_real_timer 0x00000148
+#define AOFF_task_real_timer 0x00000160
#define ASIZ_task_real_timer 0x00000028
-#define AOFF_task_times 0x00000170
+#define AOFF_task_times 0x00000188
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x00000190
+#define AOFF_task_start_time 0x000001a8
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x00000198
+#define AOFF_task_per_cpu_utime 0x000001b0
#define ASIZ_task_per_cpu_utime 0x00000008
-#define AOFF_task_min_flt 0x000001a8
+#define AOFF_task_min_flt 0x000001c0
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000001b0
+#define AOFF_task_maj_flt 0x000001c8
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000001b8
+#define AOFF_task_nswap 0x000001d0
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000001c0
+#define AOFF_task_cmin_flt 0x000001d8
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000001c8
+#define AOFF_task_cmaj_flt 0x000001e0
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000001d0
+#define AOFF_task_cnswap 0x000001e8
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000001dc
+#define AOFF_task_uid 0x000001f4
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000001e0
+#define AOFF_task_euid 0x000001f8
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000001e4
+#define AOFF_task_suid 0x000001fc
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000001e8
+#define AOFF_task_fsuid 0x00000200
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000001ec
+#define AOFF_task_gid 0x00000204
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000001f0
+#define AOFF_task_egid 0x00000208
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000001f4
+#define AOFF_task_sgid 0x0000020c
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000001f8
+#define AOFF_task_fsgid 0x00000210
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000001fc
+#define AOFF_task_ngroups 0x00000214
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000200
+#define AOFF_task_groups 0x00000218
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000280
+#define AOFF_task_cap_effective 0x00000298
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000284
+#define AOFF_task_cap_inheritable 0x0000029c
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000288
+#define AOFF_task_cap_permitted 0x000002a0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000290
+#define AOFF_task_user 0x000002a8
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000298
+#define AOFF_task_rlim 0x000002b0
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000338
+#define AOFF_task_used_math 0x00000350
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000033a
+#define AOFF_task_comm 0x00000352
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000034c
+#define AOFF_task_link_count 0x00000364
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000350
+#define AOFF_task_tty 0x00000368
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000358
+#define AOFF_task_semundo 0x00000370
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000360
+#define AOFF_task_semsleeping 0x00000378
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x00000370
+#define AOFF_task_thread 0x00000380
#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000007d0
+#define AOFF_task_fs 0x000007e0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000007d8
+#define AOFF_task_files 0x000007e8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_mm 0x000007e0
-#define ASIZ_task_mm 0x00000008
-#define AOFF_task_active_mm 0x000007e8
-#define ASIZ_task_active_mm 0x00000008
#define AOFF_task_sigmask_lock 0x000007f0
#define ASIZ_task_sigmask_lock 0x00000000
#define AOFF_task_sig 0x000007f0
@@ -318,175 +318,175 @@
#define ASIZ_task_exec_domain 0x00000008
#define AOFF_task_need_resched 0x00000020
#define ASIZ_task_need_resched 0x00000008
-#define AOFF_task_counter 0x00000028
+#define AOFF_task_avg_slice 0x00000028
+#define ASIZ_task_avg_slice 0x00000008
+#define AOFF_task_lock_depth 0x00000030
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000038
#define ASIZ_task_counter 0x00000008
-#define AOFF_task_priority 0x00000030
+#define AOFF_task_priority 0x00000040
#define ASIZ_task_priority 0x00000008
-#define AOFF_task_avg_slice 0x00000038
-#define ASIZ_task_avg_slice 0x00000008
-#define AOFF_task_has_cpu 0x00000040
+#define AOFF_task_policy 0x00000048
+#define ASIZ_task_policy 0x00000008
+#define AOFF_task_mm 0x00000050
+#define ASIZ_task_mm 0x00000008
+#define AOFF_task_active_mm 0x00000058
+#define ASIZ_task_active_mm 0x00000008
+#define AOFF_task_has_cpu 0x00000060
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000044
+#define AOFF_task_processor 0x00000064
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x00000048
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x0000004c
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000050
+#define AOFF_task_run_list 0x00000068
+#define ASIZ_task_run_list 0x00000010
+#define AOFF_task_next_task 0x00000078
#define ASIZ_task_next_task 0x00000008
-#define AOFF_task_prev_task 0x00000058
+#define AOFF_task_prev_task 0x00000080
#define ASIZ_task_prev_task 0x00000008
-#define AOFF_task_run_list 0x00000060
-#define ASIZ_task_run_list 0x00000010
-#define AOFF_task_binfmt 0x00000070
+#define AOFF_task_last_processor 0x00000088
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000090
#define ASIZ_task_binfmt 0x00000008
-#define AOFF_task_exit_code 0x00000078
+#define AOFF_task_exit_code 0x00000098
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000007c
+#define AOFF_task_exit_signal 0x0000009c
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000080
+#define AOFF_task_pdeath_signal 0x000000a0
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000088
+#define AOFF_task_personality 0x000000a8
#define ASIZ_task_personality 0x00000008
-#define AOFF_task_pid 0x00000094
+#define AOFF_task_pid 0x000000b4
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000098
+#define AOFF_task_pgrp 0x000000b8
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x0000009c
+#define AOFF_task_tty_old_pgrp 0x000000bc
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x000000a0
+#define AOFF_task_session 0x000000c0
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x000000a4
+#define AOFF_task_leader 0x000000c4
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x000000a8
+#define AOFF_task_p_opptr 0x000000c8
#define ASIZ_task_p_opptr 0x00000008
-#define AOFF_task_p_pptr 0x000000b0
+#define AOFF_task_p_pptr 0x000000d0
#define ASIZ_task_p_pptr 0x00000008
-#define AOFF_task_p_cptr 0x000000b8
+#define AOFF_task_p_cptr 0x000000d8
#define ASIZ_task_p_cptr 0x00000008
-#define AOFF_task_p_ysptr 0x000000c0
+#define AOFF_task_p_ysptr 0x000000e0
#define ASIZ_task_p_ysptr 0x00000008
-#define AOFF_task_p_osptr 0x000000c8
+#define AOFF_task_p_osptr 0x000000e8
#define ASIZ_task_p_osptr 0x00000008
-#define AOFF_task_pidhash_next 0x000000d0
+#define AOFF_task_pidhash_next 0x000000f0
#define ASIZ_task_pidhash_next 0x00000008
-#define AOFF_task_pidhash_pprev 0x000000d8
+#define AOFF_task_pidhash_pprev 0x000000f8
#define ASIZ_task_pidhash_pprev 0x00000008
-#define AOFF_task_wait_chldexit 0x000000e0
+#define AOFF_task_wait_chldexit 0x00000100
#define ASIZ_task_wait_chldexit 0x00000028
-#define AOFF_task_vfork_sem 0x00000108
+#define AOFF_task_vfork_sem 0x00000128
#define ASIZ_task_vfork_sem 0x00000008
-#define AOFF_task_policy 0x00000110
-#define ASIZ_task_policy 0x00000008
-#define AOFF_task_rt_priority 0x00000118
+#define AOFF_task_rt_priority 0x00000130
#define ASIZ_task_rt_priority 0x00000008
-#define AOFF_task_it_real_value 0x00000120
+#define AOFF_task_it_real_value 0x00000138
#define ASIZ_task_it_real_value 0x00000008
-#define AOFF_task_it_prof_value 0x00000128
+#define AOFF_task_it_prof_value 0x00000140
#define ASIZ_task_it_prof_value 0x00000008
-#define AOFF_task_it_virt_value 0x00000130
+#define AOFF_task_it_virt_value 0x00000148
#define ASIZ_task_it_virt_value 0x00000008
-#define AOFF_task_it_real_incr 0x00000138
+#define AOFF_task_it_real_incr 0x00000150
#define ASIZ_task_it_real_incr 0x00000008
-#define AOFF_task_it_prof_incr 0x00000140
+#define AOFF_task_it_prof_incr 0x00000158
#define ASIZ_task_it_prof_incr 0x00000008
-#define AOFF_task_it_virt_incr 0x00000148
+#define AOFF_task_it_virt_incr 0x00000160
#define ASIZ_task_it_virt_incr 0x00000008
-#define AOFF_task_real_timer 0x00000150
+#define AOFF_task_real_timer 0x00000168
#define ASIZ_task_real_timer 0x00000028
-#define AOFF_task_times 0x00000178
+#define AOFF_task_times 0x00000190
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x00000198
+#define AOFF_task_start_time 0x000001b0
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001a0
+#define AOFF_task_per_cpu_utime 0x000001b8
#define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x000003a0
+#define AOFF_task_min_flt 0x000003b8
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003a8
+#define AOFF_task_maj_flt 0x000003c0
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003b0
+#define AOFF_task_nswap 0x000003c8
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003b8
+#define AOFF_task_cmin_flt 0x000003d0
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003c0
+#define AOFF_task_cmaj_flt 0x000003d8
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003c8
+#define AOFF_task_cnswap 0x000003e0
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000003d4
+#define AOFF_task_uid 0x000003ec
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000003d8
+#define AOFF_task_euid 0x000003f0
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000003dc
+#define AOFF_task_suid 0x000003f4
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000003e0
+#define AOFF_task_fsuid 0x000003f8
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000003e4
+#define AOFF_task_gid 0x000003fc
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000003e8
+#define AOFF_task_egid 0x00000400
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000003ec
+#define AOFF_task_sgid 0x00000404
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000003f0
+#define AOFF_task_fsgid 0x00000408
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000003f4
+#define AOFF_task_ngroups 0x0000040c
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x000003f8
+#define AOFF_task_groups 0x00000410
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000478
+#define AOFF_task_cap_effective 0x00000490
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x0000047c
+#define AOFF_task_cap_inheritable 0x00000494
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000480
+#define AOFF_task_cap_permitted 0x00000498
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000488
+#define AOFF_task_user 0x000004a0
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000490
+#define AOFF_task_rlim 0x000004a8
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000530
+#define AOFF_task_used_math 0x00000548
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x00000532
+#define AOFF_task_comm 0x0000054a
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x00000544
+#define AOFF_task_link_count 0x0000055c
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000548
+#define AOFF_task_tty 0x00000560
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000550
+#define AOFF_task_semundo 0x00000568
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000558
+#define AOFF_task_semsleeping 0x00000570
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x00000560
+#define AOFF_task_thread 0x00000580
#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000009c0
+#define AOFF_task_fs 0x000009e0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000009c8
+#define AOFF_task_files 0x000009e8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_mm 0x000009d0
-#define ASIZ_task_mm 0x00000008
-#define AOFF_task_active_mm 0x000009d8
-#define ASIZ_task_active_mm 0x00000008
-#define AOFF_task_sigmask_lock 0x000009e0
+#define AOFF_task_sigmask_lock 0x000009f0
#define ASIZ_task_sigmask_lock 0x00000001
-#define AOFF_task_sig 0x000009e8
+#define AOFF_task_sig 0x000009f8
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x000009f0
+#define AOFF_task_signal 0x00000a00
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x000009f8
+#define AOFF_task_blocked 0x00000a08
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000a00
+#define AOFF_task_sigqueue 0x00000a10
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000a08
+#define AOFF_task_sigqueue_tail 0x00000a18
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000a10
+#define AOFF_task_sas_ss_sp 0x00000a20
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000a18
+#define AOFF_task_sas_ss_size 0x00000a28
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000a20
+#define AOFF_task_parent_exec_id 0x00000a30
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000a24
+#define AOFF_task_self_exec_id 0x00000a34
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_exit_sem 0x00000a28
+#define AOFF_task_exit_sem 0x00000a38
#define ASIZ_task_exit_sem 0x00000038
-#define ASIZ_task 0x00000a60
+#define ASIZ_task 0x00000a70
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
@@ -610,152 +610,152 @@
#define ASIZ_task_exec_domain 0x00000008
#define AOFF_task_need_resched 0x00000020
#define ASIZ_task_need_resched 0x00000008
-#define AOFF_task_counter 0x00000028
+#define AOFF_task_avg_slice 0x00000028
+#define ASIZ_task_avg_slice 0x00000008
+#define AOFF_task_lock_depth 0x00000030
+#define ASIZ_task_lock_depth 0x00000004
+#define AOFF_task_counter 0x00000038
#define ASIZ_task_counter 0x00000008
-#define AOFF_task_priority 0x00000030
+#define AOFF_task_priority 0x00000040
#define ASIZ_task_priority 0x00000008
-#define AOFF_task_avg_slice 0x00000038
-#define ASIZ_task_avg_slice 0x00000008
-#define AOFF_task_has_cpu 0x00000040
+#define AOFF_task_policy 0x00000048
+#define ASIZ_task_policy 0x00000008
+#define AOFF_task_mm 0x00000050
+#define ASIZ_task_mm 0x00000008
+#define AOFF_task_active_mm 0x00000058
+#define ASIZ_task_active_mm 0x00000008
+#define AOFF_task_has_cpu 0x00000060
#define ASIZ_task_has_cpu 0x00000004
-#define AOFF_task_processor 0x00000044
+#define AOFF_task_processor 0x00000064
#define ASIZ_task_processor 0x00000004
-#define AOFF_task_last_processor 0x00000048
-#define ASIZ_task_last_processor 0x00000004
-#define AOFF_task_lock_depth 0x0000004c
-#define ASIZ_task_lock_depth 0x00000004
-#define AOFF_task_next_task 0x00000050
+#define AOFF_task_run_list 0x00000068
+#define ASIZ_task_run_list 0x00000010
+#define AOFF_task_next_task 0x00000078
#define ASIZ_task_next_task 0x00000008
-#define AOFF_task_prev_task 0x00000058
+#define AOFF_task_prev_task 0x00000080
#define ASIZ_task_prev_task 0x00000008
-#define AOFF_task_run_list 0x00000060
-#define ASIZ_task_run_list 0x00000010
-#define AOFF_task_binfmt 0x00000070
+#define AOFF_task_last_processor 0x00000088
+#define ASIZ_task_last_processor 0x00000004
+#define AOFF_task_binfmt 0x00000090
#define ASIZ_task_binfmt 0x00000008
-#define AOFF_task_exit_code 0x00000078
+#define AOFF_task_exit_code 0x00000098
#define ASIZ_task_exit_code 0x00000004
-#define AOFF_task_exit_signal 0x0000007c
+#define AOFF_task_exit_signal 0x0000009c
#define ASIZ_task_exit_signal 0x00000004
-#define AOFF_task_pdeath_signal 0x00000080
+#define AOFF_task_pdeath_signal 0x000000a0
#define ASIZ_task_pdeath_signal 0x00000004
-#define AOFF_task_personality 0x00000088
+#define AOFF_task_personality 0x000000a8
#define ASIZ_task_personality 0x00000008
-#define AOFF_task_pid 0x00000094
+#define AOFF_task_pid 0x000000b4
#define ASIZ_task_pid 0x00000004
-#define AOFF_task_pgrp 0x00000098
+#define AOFF_task_pgrp 0x000000b8
#define ASIZ_task_pgrp 0x00000004
-#define AOFF_task_tty_old_pgrp 0x0000009c
+#define AOFF_task_tty_old_pgrp 0x000000bc
#define ASIZ_task_tty_old_pgrp 0x00000004
-#define AOFF_task_session 0x000000a0
+#define AOFF_task_session 0x000000c0
#define ASIZ_task_session 0x00000004
-#define AOFF_task_leader 0x000000a4
+#define AOFF_task_leader 0x000000c4
#define ASIZ_task_leader 0x00000004
-#define AOFF_task_p_opptr 0x000000a8
+#define AOFF_task_p_opptr 0x000000c8
#define ASIZ_task_p_opptr 0x00000008
-#define AOFF_task_p_pptr 0x000000b0
+#define AOFF_task_p_pptr 0x000000d0
#define ASIZ_task_p_pptr 0x00000008
-#define AOFF_task_p_cptr 0x000000b8
+#define AOFF_task_p_cptr 0x000000d8
#define ASIZ_task_p_cptr 0x00000008
-#define AOFF_task_p_ysptr 0x000000c0
+#define AOFF_task_p_ysptr 0x000000e0
#define ASIZ_task_p_ysptr 0x00000008
-#define AOFF_task_p_osptr 0x000000c8
+#define AOFF_task_p_osptr 0x000000e8
#define ASIZ_task_p_osptr 0x00000008
-#define AOFF_task_pidhash_next 0x000000d0
+#define AOFF_task_pidhash_next 0x000000f0
#define ASIZ_task_pidhash_next 0x00000008
-#define AOFF_task_pidhash_pprev 0x000000d8
+#define AOFF_task_pidhash_pprev 0x000000f8
#define ASIZ_task_pidhash_pprev 0x00000008
-#define AOFF_task_wait_chldexit 0x000000e0
+#define AOFF_task_wait_chldexit 0x00000100
#define ASIZ_task_wait_chldexit 0x00000030
-#define AOFF_task_vfork_sem 0x00000110
+#define AOFF_task_vfork_sem 0x00000130
#define ASIZ_task_vfork_sem 0x00000008
-#define AOFF_task_policy 0x00000118
-#define ASIZ_task_policy 0x00000008
-#define AOFF_task_rt_priority 0x00000120
+#define AOFF_task_rt_priority 0x00000138
#define ASIZ_task_rt_priority 0x00000008
-#define AOFF_task_it_real_value 0x00000128
+#define AOFF_task_it_real_value 0x00000140
#define ASIZ_task_it_real_value 0x00000008
-#define AOFF_task_it_prof_value 0x00000130
+#define AOFF_task_it_prof_value 0x00000148
#define ASIZ_task_it_prof_value 0x00000008
-#define AOFF_task_it_virt_value 0x00000138
+#define AOFF_task_it_virt_value 0x00000150
#define ASIZ_task_it_virt_value 0x00000008
-#define AOFF_task_it_real_incr 0x00000140
+#define AOFF_task_it_real_incr 0x00000158
#define ASIZ_task_it_real_incr 0x00000008
-#define AOFF_task_it_prof_incr 0x00000148
+#define AOFF_task_it_prof_incr 0x00000160
#define ASIZ_task_it_prof_incr 0x00000008
-#define AOFF_task_it_virt_incr 0x00000150
+#define AOFF_task_it_virt_incr 0x00000168
#define ASIZ_task_it_virt_incr 0x00000008
-#define AOFF_task_real_timer 0x00000158
+#define AOFF_task_real_timer 0x00000170
#define ASIZ_task_real_timer 0x00000028
-#define AOFF_task_times 0x00000180
+#define AOFF_task_times 0x00000198
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x000001a0
+#define AOFF_task_start_time 0x000001b8
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001a8
+#define AOFF_task_per_cpu_utime 0x000001c0
#define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x000003a8
+#define AOFF_task_min_flt 0x000003c0
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003b0
+#define AOFF_task_maj_flt 0x000003c8
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003b8
+#define AOFF_task_nswap 0x000003d0
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003c0
+#define AOFF_task_cmin_flt 0x000003d8
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003c8
+#define AOFF_task_cmaj_flt 0x000003e0
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003d0
+#define AOFF_task_cnswap 0x000003e8
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000003dc
+#define AOFF_task_uid 0x000003f4
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x000003e0
+#define AOFF_task_euid 0x000003f8
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x000003e4
+#define AOFF_task_suid 0x000003fc
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x000003e8
+#define AOFF_task_fsuid 0x00000400
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x000003ec
+#define AOFF_task_gid 0x00000404
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x000003f0
+#define AOFF_task_egid 0x00000408
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x000003f4
+#define AOFF_task_sgid 0x0000040c
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x000003f8
+#define AOFF_task_fsgid 0x00000410
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x000003fc
+#define AOFF_task_ngroups 0x00000414
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000400
+#define AOFF_task_groups 0x00000418
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x00000480
+#define AOFF_task_cap_effective 0x00000498
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x00000484
+#define AOFF_task_cap_inheritable 0x0000049c
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x00000488
+#define AOFF_task_cap_permitted 0x000004a0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x00000490
+#define AOFF_task_user 0x000004a8
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x00000498
+#define AOFF_task_rlim 0x000004b0
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000538
+#define AOFF_task_used_math 0x00000550
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000053a
+#define AOFF_task_comm 0x00000552
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000054c
+#define AOFF_task_link_count 0x00000564
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000550
+#define AOFF_task_tty 0x00000568
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000558
+#define AOFF_task_semundo 0x00000570
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000560
+#define AOFF_task_semsleeping 0x00000578
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x00000570
+#define AOFF_task_thread 0x00000580
#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000009d0
+#define AOFF_task_fs 0x000009e0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000009d8
+#define AOFF_task_files 0x000009e8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_mm 0x000009e0
-#define ASIZ_task_mm 0x00000008
-#define AOFF_task_active_mm 0x000009e8
-#define ASIZ_task_active_mm 0x00000008
#define AOFF_task_sigmask_lock 0x000009f0
#define ASIZ_task_sigmask_lock 0x0000000c
#define AOFF_task_sig 0x00000a00
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
index fda381c48..9a7fd950a 100644
--- a/include/asm-sparc64/floppy.h
+++ b/include/asm-sparc64/floppy.h
@@ -1,4 +1,4 @@
-/* $Id: floppy.h,v 1.23 1999/09/21 14:39:34 davem Exp $
+/* $Id: floppy.h,v 1.24 2000/01/09 15:16:34 ecd Exp $
* asm-sparc64/floppy.h: Sparc specific parts of the Floppy driver.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -574,7 +574,6 @@ static unsigned long __init sun_floppy_init(void)
struct linux_ebus_device *edev = 0;
unsigned long config = 0;
unsigned long auxio_reg;
- unsigned char cfg;
for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
@@ -669,9 +668,7 @@ static unsigned long __init sun_floppy_init(void)
return sun_floppy_types[0];
/* Enable PC-AT mode. */
- cfg = ns87303_readb(config, ASC);
- cfg |= 0xc0;
- ns87303_writeb(config, ASC, cfg);
+ ns87303_modify(config, ASC, 0, 0xc0);
#ifdef PCI_FDC_SWAP_DRIVES
/*
@@ -682,15 +679,9 @@ static unsigned long __init sun_floppy_init(void)
* Set the drive exchange bit in FCR on NS87303,
* make shure other bits are sane before doing so.
*/
- cfg = ns87303_readb(config, FER);
- cfg &= ~(FER_EDM);
- ns87303_writeb(config, FER, cfg);
- cfg = ns87303_readb(config, ASC);
- cfg &= ~(ASC_DRV2_SEL);
- ns87303_writeb(config, ASC, cfg);
- cfg = ns87303_readb(config, FCR);
- cfg |= FCR_LDE;
- ns87303_writeb(config, FCR, cfg);
+ ns87303_modify(config, FER, FER_EDM, 0);
+ ns87303_modify(config, ASC, ASC_DRV2_SEL, 0);
+ ns87303_modify(config, FCR, 0, FCR_LDE);
cfg = sun_floppy_types[0];
sun_floppy_types[0] = sun_floppy_types[1];
diff --git a/include/asm-sparc64/ipcbuf.h b/include/asm-sparc64/ipcbuf.h
new file mode 100644
index 000000000..9c5bf1bc4
--- /dev/null
+++ b/include/asm-sparc64/ipcbuf.h
@@ -0,0 +1,28 @@
+#ifndef _SPARC64_IPCBUF_H
+#define _SPARC64_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit seq
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ __kernel_mode_t mode;
+ unsigned short __pad1;
+ unsigned short seq;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_IPCBUF_H */
diff --git a/include/asm-sparc64/msgbuf.h b/include/asm-sparc64/msgbuf.h
new file mode 100644
index 000000000..55c101bd0
--- /dev/null
+++ b/include/asm-sparc64/msgbuf.h
@@ -0,0 +1,27 @@
+#ifndef _SPARC64_MSGBUF_H
+#define _SPARC64_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_MSGBUF_H */
diff --git a/include/asm-sparc64/ns87303.h b/include/asm-sparc64/ns87303.h
index cfd159a5a..89ac8c4ad 100644
--- a/include/asm-sparc64/ns87303.h
+++ b/include/asm-sparc64/ns87303.h
@@ -1,4 +1,4 @@
-/* $Id: ns87303.h,v 1.2 1998/09/13 15:38:50 ecd Exp $
+/* $Id: ns87303.h,v 1.3 2000/01/09 15:16:34 ecd Exp $
* ns87303.h: Configuration Register Description for the
* National Semiconductor PC87303 (SuperIO).
*
@@ -45,7 +45,7 @@
#define FCR_LDE 0x10 /* Logical Drive Exchange */
#define FCR_ZWS_ENA 0x20 /* Enable short host read/write in ECP/EPP */
-/* Printer Controll Register (PCR) bits */
+/* Printer Control Register (PCR) bits */
#define PCR_EPP_ENABLE 0x01
#define PCR_EPP_IEEE 0x02 /* Enable EPP Version 1.9 (IEEE 1284) */
#define PCR_ECP_ENABLE 0x04
@@ -61,27 +61,51 @@
#define ASC_LPT_IRQ7 0x01 /* Allways use IRQ7 for LPT */
#define ASC_DRV2_SEL 0x02 /* Logical Drive Exchange controlled by TDR */
+#define FER_RESERVED 0x00
+#define FAR_RESERVED 0x00
+#define PTR_RESERVED 0x73
+#define FCR_RESERVED 0xc4
+#define PCR_RESERVED 0x10
+#define KRR_RESERVED 0x00
+#define PMC_RESERVED 0x98
+#define TUP_RESERVED 0xfb
+#define SIP_RESERVED 0x00
+#define ASC_RESERVED 0x18
+#define CS0CF0_RESERVED 0x00
+#define CS0CF1_RESERVED 0x08
+#define CS1CF0_RESERVED 0x00
+#define CS1CF1_RESERVED 0x08
+
#ifdef __KERNEL__
#include <asm/system.h>
#include <asm/io.h>
-static __inline__ void ns87303_writeb(unsigned long port, int index,
- unsigned char value)
+static __inline__ int ns87303_modify(unsigned long port, unsigned int index,
+ unsigned char clr, unsigned char set)
{
+ static unsigned char reserved[] = {
+ FER_RESERVED, FAR_RESERVED, PTR_RESERVED, FCR_RESERVED,
+ PCR_RESERVED, KRR_RESERVED, PMC_RESERVED, TUP_RESERVED,
+ SIP_RESERVED, ASC_RESERVED, CS0CF0_RESERVED, CS0CF1_RESERVED,
+ CS1CF0_RESERVED, CS1CF1_RESERVED
+ };
unsigned long flags;
+ unsigned char value;
+
+ if (index > 0x0d)
+ return -EINVAL;
save_flags(flags); cli();
outb(index, port);
+ value = inb(port + 1);
+ value &= ~(reserved[index] | clr);
+ value |= set;
outb(value, port + 1);
outb(value, port + 1);
restore_flags(flags);
-}
-static __inline__ unsigned char ns87303_readb(unsigned long port, int index)
-{
- outb(index, port);
- return inb(port + 1);
+ return 0;
}
#endif /* __KERNEL__ */
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h
index 67a0da1fa..97aeaf7f6 100644
--- a/include/asm-sparc64/parport.h
+++ b/include/asm-sparc64/parport.h
@@ -1,4 +1,4 @@
-/* $Id: parport.h,v 1.5 1999/08/30 10:14:52 davem Exp $
+/* $Id: parport.h,v 1.6 2000/01/09 15:16:34 ecd Exp $
* parport.h: sparc64 specific parport initialization and dma.
*
* Copyright (C) 1999 Eddie C. Dost (ecd@skynet.be)
@@ -19,8 +19,6 @@
#define __maybe_initdata __initdata
#endif
-#undef HAVE_SLOW_DEVICES
-
#define PARPORT_PC_MAX_PORTS PARPORT_MAX
static struct linux_ebus_dma *sparc_ebus_dmas[PARPORT_PC_MAX_PORTS];
@@ -33,7 +31,7 @@ reset_dma(unsigned int dmanr)
writel(EBUS_DCSR_RESET, &sparc_ebus_dmas[dmanr]->dcsr);
udelay(1);
dcsr = EBUS_DCSR_BURST_SZ_16 | EBUS_DCSR_TCI_DIS |
- EBUS_DCSR_EN_CNT;
+ EBUS_DCSR_EN_CNT | EBUS_DCSR_INT_EN;
writel(dcsr, &sparc_ebus_dmas[dmanr]->dcsr);
}
@@ -62,11 +60,8 @@ disable_dma(unsigned int dmanr)
writel(dcsr, &sparc_ebus_dmas[dmanr]->dcsr);
dcsr = readl(&sparc_ebus_dmas[dmanr]->dcsr);
- if (dcsr & EBUS_DCSR_ERR_PEND) {
+ if (dcsr & EBUS_DCSR_ERR_PEND)
reset_dma(dmanr);
- dcsr &= ~(EBUS_DCSR_ERR_PEND);
- }
- writel(dcsr, &sparc_ebus_dmas[dmanr]->dcsr);
}
}
@@ -105,15 +100,11 @@ set_dma_count(unsigned int dmanr, unsigned int count)
static __inline__ int
get_dma_residue(unsigned int dmanr)
{
- unsigned int dcsr;
int res;
res = readl(&sparc_ebus_dmas[dmanr]->dbcr);
- if (res != 0) {
- dcsr = readl(&sparc_ebus_dmas[dmanr]->dcsr);
+ if (res != 0)
reset_dma(dmanr);
- writel(dcsr, &sparc_ebus_dmas[dmanr]->dcsr);
- }
return res;
}
@@ -136,36 +127,25 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
if (!strcmp(edev->prom_name, "ecpp")) {
unsigned long base = edev->resource[0].start;
unsigned long config = edev->resource[1].start;
- unsigned char cfg;
sparc_ebus_dmas[count] =
(struct linux_ebus_dma *)
edev->resource[2].start;
reset_dma(count);
+ /* Configure IRQ to Push Pull, Level Low */
/* Enable ECP, set bit 2 of the CTR first */
outb(0x04, base + 0x02);
- cfg = ns87303_readb(config, PCR);
- cfg |= (PCR_ECP_ENABLE | PCR_ECP_CLK_ENA);
- ns87303_writeb(config, PCR, cfg);
+ ns87303_modify(config, PCR,
+ PCR_EPP_ENABLE |
+ PCR_IRQ_ODRAIN,
+ PCR_ECP_ENABLE |
+ PCR_ECP_CLK_ENA |
+ PCR_IRQ_POLAR);
/* CTR bit 5 controls direction of port */
- cfg = ns87303_readb(config, PTR);
- cfg |= PTR_LPT_REG_DIR;
- ns87303_writeb(config, PTR, cfg);
-
- /* Configure IRQ to Push Pull, Level Low */
- cfg = ns87303_readb(config, PCR);
- cfg &= ~(PCR_IRQ_ODRAIN);
- cfg |= PCR_IRQ_POLAR;
- ns87303_writeb(config, PCR, cfg);
-
-#ifndef HAVE_SLOW_DEVICES
- /* Enable Zero Wait State for ECP */
- cfg = ns87303_readb(config, FCR);
- cfg |= FCR_ZWS_ENA;
- ns87303_writeb(config, FCR, cfg);
-#endif
+ ns87303_modify(config, PTR,
+ 0, PTR_LPT_REG_DIR);
if (parport_pc_probe_port(base, base + 0x400,
edev->irqs[0],
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h
index 98f706e01..4131b698f 100644
--- a/include/asm-sparc64/pci.h
+++ b/include/asm-sparc64/pci.h
@@ -9,6 +9,9 @@
*/
#define pcibios_assign_all_busses() 0
+#define PCIBIOS_MIN_IO 0UL
+#define PCIBIOS_MIN_MEM 0UL
+
struct pci_dev;
/* Allocate and map kernel buffer using consistant mode DMA for PCI device.
diff --git a/include/asm-sparc64/posix_types.h b/include/asm-sparc64/posix_types.h
index e0836990a..e2a024e3e 100644
--- a/include/asm-sparc64/posix_types.h
+++ b/include/asm-sparc64/posix_types.h
@@ -29,6 +29,13 @@ typedef unsigned int __kernel_nlink_t;
typedef int __kernel_daddr_t;
typedef long __kernel_off_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+
+typedef __kernel_uid_t __kernel_old_uid_t;
+typedef __kernel_gid_t __kernel_old_gid_t;
+typedef __kernel_uid_t __kernel_uid32_t;
+typedef __kernel_gid_t __kernel_gid32_t;
/* Note this piece of asymmetry from the v9 ABI. */
typedef int __kernel_suseconds_t;
diff --git a/include/asm-sparc64/sembuf.h b/include/asm-sparc64/sembuf.h
new file mode 100644
index 000000000..99f04e4e2
--- /dev/null
+++ b/include/asm-sparc64/sembuf.h
@@ -0,0 +1,22 @@
+#ifndef _SPARC64_SEMBUF_H
+#define _SPARC64_SEMBUF_H
+
+/*
+ * The semid64_ds structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _SPARC64_SEMBUF_H */
diff --git a/include/asm-sparc64/shmbuf.h b/include/asm-sparc64/shmbuf.h
new file mode 100644
index 000000000..61c2ef42e
--- /dev/null
+++ b/include/asm-sparc64/shmbuf.h
@@ -0,0 +1,38 @@
+#ifndef _SPARC64_SHMBUF_H
+#define _SPARC64_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for sparc64 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ __kernel_time_t shm_atime; /* last attach time */
+ __kernel_time_t shm_dtime; /* last detach time */
+ __kernel_time_t shm_ctime; /* last change time */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _SPARC64_SHMBUF_H */
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index 8c9b29bc6..49c063d44 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.37 2000/01/05 07:37:55 jj Exp $ */
+/* $Id: unistd.h,v 1.39 2000/01/11 17:34:05 jj Exp $ */
#ifndef _SPARC64_UNISTD_H
#define _SPARC64_UNISTD_H
@@ -46,11 +46,11 @@
#define __NR_sigaltstack 28 /* Common */
#define __NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */
#define __NR_utime 30 /* Implemented via utimes() under SunOS */
-/* #define __NR_stty 31 Implemented via ioctl() under SunOS */
-/* #define __NR_gtty 32 Implemented via ioctl() under SunOS */
+/* #define __NR_lchown32 31 Linux sparc32 specific */
+/* #define __NR_fchown32 32 Linux sparc32 specific */
#define __NR_access 33 /* Common */
#define __NR_nice 34 /* Implemented via get/setpriority() in SunOS */
-/* #define __NR_ftime 35 Implemented via gettimeofday() in SunOS */
+/* #define __NR_chown32 35 Linux sparc32 specific */
#define __NR_sync 36 /* Common */
#define __NR_kill 37 /* Common */
#define __NR_stat 38 /* Common */
@@ -59,7 +59,7 @@
#define __NR_dup 41 /* Common */
#define __NR_pipe 42 /* Common */
#define __NR_times 43 /* Implemented via getrusage() in SunOS */
-/* #define __NR_profil 44 Common */
+/* #define __NR_getuid32 44 Linux sparc32 specific */
#define __NR_umount2 45 /* Linux Specific */
#define __NR_setgid 46 /* Implemented via setregid() in SunOS */
#define __NR_getgid 47 /* Common */
@@ -68,7 +68,7 @@
#define __NR_getegid 50 /* SunOS calls getgid() */
#define __NR_acct 51 /* Common */
#define __NR_memory_ordering 52 /* Linux Specific */
-/* #define __NR_mctl 53 SunOS specific */
+/* #define __NR_getgid32 53 Linux sparc32 specific */
#define __NR_ioctl 54 /* Common */
#define __NR_reboot 55 /* Common */
/* #define __NR_mmap2 56 Linux sparc32 Specific */
@@ -84,32 +84,32 @@
#define __NR_vfork 66 /* Common */
#define __NR_pread 67 /* Linux Specific */
#define __NR_pwrite 68 /* Linux Specific */
-/* #define __NR_sbrk 69 SunOS Specific */
-/* #define __NR_sstk 70 SunOS Specific */
+/* #define __NR_geteuid32 69 Linux sparc32, sbrk under SunOS */
+/* #define __NR_getegid32 70 Linux sparc32, sstk under SunOS */
#define __NR_mmap 71 /* Common */
-/* #define __NR_vadvise 72 SunOS Specific */
+/* #define __NR_setreuid32 72 Linux sparc32, vadvise under SunOS */
#define __NR_munmap 73 /* Common */
#define __NR_mprotect 74 /* Common */
-/* #define __NR_madvise 75 SunOS Specific */
+#define __NR_madvise 75 /* Common */
#define __NR_vhangup 76 /* Common */
/* #define __NR_truncate64 77 Linux sparc32 Specific */
-/* #define __NR_mincore 78 SunOS Specific */
+#define __NR_mincore 78 /* Common */
#define __NR_getgroups 79 /* Common */
#define __NR_setgroups 80 /* Common */
#define __NR_getpgrp 81 /* Common */
-/* #define __NR_setpgrp 82 setpgid, same difference... */
+/* #define __NR_setgroups32 82 Linux sparc32, setpgrp under SunOS */
#define __NR_setitimer 83 /* Common */
/* #define __NR_ftruncate64 84 Linux sparc32 Specific */
#define __NR_swapon 85 /* Common */
#define __NR_getitimer 86 /* Common */
-/* #define __NR_gethostname 87 SunOS Specific */
+/* #define __NR_setuid32 87 Linux sparc32, gethostname under SunOS */
#define __NR_sethostname 88 /* Common */
-/* #define __NR_getdtablesize 89 SunOS Specific */
+/* #define __NR_setgid32 89 Linux sparc32, getdtablesize under SunOS */
#define __NR_dup2 90 /* Common */
-/* #define __NR_getdopt 91 SunOS Specific */
+/* #define __NR_setfsuid32 91 Linux sparc32, getdopt under SunOS */
#define __NR_fcntl 92 /* Common */
#define __NR_select 93 /* Common */
-/* #define __NR_setdopt 94 SunOS Specific */
+/* #define __NR_setfsgid32 94 Linux sparc32, setdopt under SunOS */
#define __NR_fsync 95 /* Common */
#define __NR_setpriority 96 /* Common */
#define __NR_socket 97 /* Common */
@@ -123,14 +123,14 @@
#define __NR_rt_sigtimedwait 105 /* Linux Specific */
#define __NR_rt_sigqueueinfo 106 /* Linux Specific */
#define __NR_rt_sigsuspend 107 /* Linux Specific */
-/* #define __NR_sigvec 108 SunOS Specific */
-/* #define __NR_sigblock 109 SunOS Specific */
-/* #define __NR_sigsetmask 110 SunOS Specific */
-/* #define __NR_sigpause 111 SunOS Specific */
-/* #define __NR_sigstack 112 SunOS Specific */
+#define __NR_setresuid 108 /* Linux Specific, sigvec under SunOS */
+#define __NR_getresuid 109 /* Linux Specific, sigblock under SunOS */
+#define __NR_setresgid 110 /* Linux Specific, sigsetmask under SunOS */
+#define __NR_getresgid 111 /* Linux Specific, sigpause under SunOS */
+/* #define __NR_setregid32 75 Linux sparc32, sigstack under SunOS */
#define __NR_recvmsg 113 /* Common */
#define __NR_sendmsg 114 /* Common */
-/* #define __NR_vtrace 115 SunOS Specific */
+/* #define __NR_getgroups32 115 Linux sparc32, vtrace under SunOS */
#define __NR_gettimeofday 116 /* Common */
#define __NR_getrusage 117 /* Common */
#define __NR_getsockopt 118 /* Common */
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index f2f655150..c96ef3283 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -356,6 +356,8 @@ enum
ACPI_GPE_LEVEL,
ACPI_EVENT,
ACPI_P_BLK,
+ ACPI_ENTER_LVL2_LAT,
+ ACPI_ENTER_LVL3_LAT,
ACPI_P_LVL2_LAT,
ACPI_P_LVL3_LAT,
ACPI_S0_SLP_TYP,
@@ -401,4 +403,32 @@ enum
#define ACPI_PIIX4_PMREGMISC 0x80
#define ACPI_PIIX4_PMIOSE 0x01
+/*
+ * VIA-specific ACPI info (for systems with VT82C586B but no ACPI tables)
+ */
+
+#define ACPI_VIA_INT_MODEL 0x00
+
+#define ACPI_VIA_SMI_CMD 0x002f
+#define ACPI_VIA_ACPI_ENABLE 0xa1
+#define ACPI_VIA_ACPI_DISABLE 0xa0
+
+#define ACPI_VIA_PM1_EVT 0x0000
+#define ACPI_VIA_PM1_CNT 0x0004
+#define ACPI_VIA_PM_TMR 0x0008
+#define ACPI_VIA_GPE0 0x0020
+#define ACPI_VIA_P_BLK 0x0010
+
+#define ACPI_VIA_PM1_EVT_LEN 0x04
+#define ACPI_VIA_PM1_CNT_LEN 0x02
+#define ACPI_VIA_PM_TM_LEN 0x04
+#define ACPI_VIA_GPE0_LEN 0x04
+
+#define ACPI_VIA_DUTY_OFFSET 1
+#define ACPI_VIA_DUTY_WIDTH 3
+
+#define ACPI_VIA_DAY_ALARM 0x7d
+#define ACPI_VIA_MON_ALARM 0x7e
+#define ACPI_VIA_CENTURY 0x7f
+
#endif /* _LINUX_ACPI_H */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 77d31cc9a..e8b4c0b9b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -104,7 +104,8 @@ struct sec_size {
extern struct sec_size * blk_sec[MAX_BLKDEV];
extern struct blk_dev_struct blk_dev[MAX_BLKDEV];
extern wait_queue_head_t wait_for_request;
-extern void resetup_one_dev(struct gendisk *dev, int drive);
+extern void grok_partitions(struct gendisk *dev, int drive, unsigned minors, long size);
+extern void register_disk(struct gendisk *dev, kdev_t first, unsigned minors, struct block_device_operations *ops, long size);
extern void unplug_device(void * data);
extern void make_request(int major,int rw, struct buffer_head * bh);
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h
index 8fae0f0ef..d3d63a5a1 100644
--- a/include/linux/byteorder/generic.h
+++ b/include/linux/byteorder/generic.h
@@ -129,7 +129,7 @@
* also have a macro for them in case some strange program
* wants to take the address of the thing or something..
*
- * Note that these traditionally return a "long", even though
+ * Note that these used to return a "long" in libc5, even though
* long is often 64-bit these days.. Thus the casts.
*
* They have to be macros in order to do the constant folding
@@ -146,9 +146,14 @@
* Do the prototypes. Somebody might want to take the
* address or some such sick thing..
*/
+#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2)
+extern __u32 ntohl(__u32);
+extern __u32 htonl(__u32);
+#else
extern unsigned long int ntohl(unsigned long int);
-extern unsigned short int ntohs(unsigned short int);
extern unsigned long int htonl(unsigned long int);
+#endif
+extern unsigned short int ntohs(unsigned short int);
extern unsigned short int htons(unsigned short int);
@@ -159,9 +164,14 @@ extern unsigned short int htons(unsigned short int);
#define ___ntohl(x) __be32_to_cpu(x)
#define ___ntohs(x) __be16_to_cpu(x)
+#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2)
+#define htonl(x) ___htonl(x)
+#define ntohl(x) ___ntohl(x)
+#else
#define htonl(x) ((unsigned long)___htonl(x))
-#define htons(x) ___htons(x)
#define ntohl(x) ((unsigned long)___ntohl(x))
+#endif
+#define htons(x) ___htons(x)
#define ntohs(x) ___ntohs(x)
#endif /* OPTIMIZE */
diff --git a/include/linux/capability.h b/include/linux/capability.h
index c73053d95..394c96bfa 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -89,9 +89,9 @@ typedef __u32 kernel_cap_t;
/* Overrides the following restrictions that the effective user ID
shall match the file owner ID when setting the S_ISUID and S_ISGID
bits on that file; that the effective group ID (or one of the
- supplementary group IDs shall match the file owner ID when setting
+ supplementary group IDs) shall match the file owner ID when setting
the S_ISGID bit on that file; that the S_ISUID and S_ISGID bits are
- cleared on successful return from chown(2). */
+ cleared on successful return from chown(2) (not implemented). */
#define CAP_FSETID 4
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index 768e815c6..9aff2f0af 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -1,4 +1,4 @@
-/* $Revision: 2.6 $$Date: 1998/08/10 16:57:01 $
+/* $Revision: 3.0 $$Date: 1998/11/02 14:20:59 $
* linux/include/linux/cyclades.h
*
* This file was initially written by
@@ -7,6 +7,9 @@
*
* This file contains the general definitions for the cyclades.c driver
*$Log: cyclades.h,v $
+ *Revision 3.0 1998/11/02 14:20:59 ivan
+ *added nports field on cyclades_card structure;
+ *
*Revision 2.5 1998/08/03 16:57:01 ivan
*added cyclades_idle_stats structure;
*
@@ -502,6 +505,7 @@ struct cyclades_card {
int irq;
int num_chips; /* 0 if card absent, -1 if Z/PCI, else Y */
int first_line; /* minor number of first channel on card */
+ int nports; /* Number of ports in the card */
int bus_index; /* address shift - 0 for ISA, 1 for PCI */
int intr_enabled; /* FW Interrupt flag - 0 disabled, 1 enabled */
#ifdef __KERNEL__
diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h
index d94e45b41..2e387395e 100644
--- a/include/linux/cyclomx.h
+++ b/include/linux/cyclomx.h
@@ -1,10 +1,10 @@
/*
-* cyclomx.h CYCLOM X Multiprotocol WAN Link Driver.
+* cyclomx.h Cyclom 2X WAN Link Driver.
* User-level API definitions.
*
* Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
*
-* Copyright: (c) 1998, 1999 Arnaldo Carvalho de Melo
+* Copyright: (c) 1998-2000 Arnaldo Carvalho de Melo
*
* Based on wanpipe.h by Gene Kozin <genek@compuserve.com>
*
@@ -15,8 +15,8 @@
* ============================================================================
* 1999/05/19 acme wait_queue_head_t wait_stats(support for 2.3.*)
* 1999/01/03 acme judicious use of data types
-* Dec 27, 1998 Arnaldo cleanup: PACKED not needed
-* Aug 08, 1998 Arnaldo Version 0.0.1
+* 1998/12/27 acme cleanup: PACKED not needed
+* 1998/08/08 acme Version 0.0.1
*/
#ifndef _CYCLOMX_H
#define _CYCLOMX_H
@@ -28,8 +28,8 @@
#ifdef __KERNEL__
/* Kernel Interface */
-#include <linux/cycx_drv.h> /* CYCLOM X support module API definitions */
-#include <linux/cycx_cfm.h> /* CYCLOM X firmware module definitions */
+#include <linux/cycx_drv.h> /* Cyclom 2X support module API definitions */
+#include <linux/cycx_cfm.h> /* Cyclom 2X firmware module definitions */
#ifdef CONFIG_CYCLOMX_X25
#include <linux/cycx_x25.h>
#endif
diff --git a/include/linux/cycx_cfm.h b/include/linux/cycx_cfm.h
index 3ea78dc9e..3f5f38689 100644
--- a/include/linux/cycx_cfm.h
+++ b/include/linux/cycx_cfm.h
@@ -1,9 +1,10 @@
/*
-* cycx_cfm.h CYCLOM X Multiprotocol WAN Link Driver.
-* Definitions for the CYCLOM X Firmware Module (CFM).
+* cycx_cfm.h Cyclom 2X WAN Link Driver.
+* Definitions for the Cyclom 2X Firmware Module (CFM).
*
* Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
-* Copyright: (c) 1998, 1999 Arnaldo Carvalho de Melo
+*
+* Copyright: (c) 1998-2000 Arnaldo Carvalho de Melo
*
* Based on sdlasfm.h by Gene Kozin <74604.152@compuserve.com>
*
@@ -12,7 +13,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
* ============================================================================
-* Aug 08, 1998 Arnaldo Initial version.
+* 1998/08/08 acme Initial version.
*/
#ifndef _CYCX_CFM_H
#define _CYCX_CFM_H
@@ -31,25 +32,25 @@
/* Firmware Commands */
#define GEN_POWER_ON 0x1280
-#define GEN_SET_SEG 0x1401 /* boot segment setting. */
-#define GEN_BOOT_DAT 0x1402 /* boot data. */
-#define GEN_START 0x1403 /* board start. */
-#define GEN_DEFPAR 0x1404 /* buffer length for boot. */
+#define GEN_SET_SEG 0x1401 /* boot segment setting. */
+#define GEN_BOOT_DAT 0x1402 /* boot data. */
+#define GEN_START 0x1403 /* board start. */
+#define GEN_DEFPAR 0x1404 /* buffer length for boot. */
-/* Adapter types */
+/* Adapter Types */
#define CYCX_2X 2
+/* for now only the 2X is supported, no plans to support 8X or 16X */
#define CYCX_8X 8
#define CYCX_16X 16
#define CFID_X25_2X 5200
-
/* Data Types */
typedef struct cfm_info /* firmware module information */
{
unsigned short codeid; /* firmware ID */
- unsigned short version; /* firmaware version number */
+ unsigned short version; /* firmware version number */
unsigned short adapter[CFM_MAX_CYCX]; /* compatible adapter types */
unsigned long memsize; /* minimum memory size */
unsigned short reserved[2]; /* reserved */
@@ -61,7 +62,7 @@ typedef struct cfm_info /* firmware module information */
unsigned long datasize; /* configuration data size */
} cfm_info_t;
-typedef struct cfm /* CYCX firmware file structire */
+typedef struct cfm /* CYCX firmware file structure */
{
char signature[80]; /* CFM file signature */
unsigned short version; /* file format version */
diff --git a/include/linux/cycx_drv.h b/include/linux/cycx_drv.h
index b456e1f15..88b3f5f51 100644
--- a/include/linux/cycx_drv.h
+++ b/include/linux/cycx_drv.h
@@ -2,7 +2,8 @@
* cycx_drv.h CYCX Support Module. Kernel API Definitions.
*
* Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
-* Copyright: (c) 1998, 1999 Arnaldo Carvalho de Melo
+*
+* Copyright: (c) 1998-2000 Arnaldo Carvalho de Melo
*
* Based on sdladrv.h by Gene Kozin <genek@compuserve.com>
*
diff --git a/include/linux/cycx_x25.h b/include/linux/cycx_x25.h
index e242e5795..4fa2e967e 100644
--- a/include/linux/cycx_x25.h
+++ b/include/linux/cycx_x25.h
@@ -3,7 +3,7 @@
*
* Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
*
-* Copyright: (c) 1998, 1999 Arnaldo Carvalho de Melo
+* Copyright: (c) 1998-2000 Arnaldo Carvalho de Melo
*
* Based on sdla_x25.h by Gene Kozin <74604.152@compuserve.com>
*
@@ -13,9 +13,8 @@
* 2 of the License, or (at your option) any later version.
* ============================================================================
* 1999/01/03 acme judicious use of data types
-*
* 1999/01/02 acme #define X25_ACK_N3 0x4411
-* Dec 28, 1998 Arnaldo cleanup: lot'o'things removed
+* 1998/12/28 acme cleanup: lot'o'things removed
* commands listed,
* TX25Cmd & TX25Config structs
* typedef'ed
@@ -31,7 +30,7 @@
#define X25_MBOX_OFFS 0x300 /* general mailbox block */
#define X25_RXMBOX_OFFS 0x340 /* receive mailbox */
-/* DATA STRUCTURES */
+/* Data Structures */
/* X.25 Command Block. */
typedef struct X25Cmd
{
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 3b5742a8f..6f70727ab 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -78,6 +78,10 @@ typedef __u64 Elf64_Word;
*/
#define EM_ALPHA 0x9026
+/*
+ * This is an interim value for S390 architecture
+ */
+#define EM_S390 0xA390
/* This is the info that is needed to parse the dynamic section of the file */
#define DT_NULL 0
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 5c1cb05bd..6dd1a31b2 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -71,8 +71,8 @@ struct elf_prpsinfo
char pr_zomb; /* zombie */
char pr_nice; /* nice val */
unsigned long pr_flag; /* flags */
- uid_t pr_uid;
- gid_t pr_gid;
+ __kernel_uid_t pr_uid;
+ __kernel_gid_t pr_gid;
pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
/* Lots missing */
char pr_fname[16]; /* filename of executable */
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 45a0f7f94..d2300c599 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -216,13 +216,13 @@ struct ext2_group_desc
*/
struct ext2_inode {
__u16 i_mode; /* File mode */
- __u16 i_uid; /* Owner Uid */
+ __u16 i_uid; /* Low 16 bits of Owner Uid */
__u32 i_size; /* Size in bytes */
__u32 i_atime; /* Access time */
__u32 i_ctime; /* Creation time */
__u32 i_mtime; /* Modification time */
__u32 i_dtime; /* Deletion Time */
- __u16 i_gid; /* Group Id */
+ __u16 i_gid; /* Low 16 bits of Group Id */
__u16 i_links_count; /* Links count */
__u32 i_blocks; /* Blocks count */
__u32 i_flags; /* File flags */
@@ -247,7 +247,9 @@ struct ext2_inode {
__u8 l_i_frag; /* Fragment number */
__u8 l_i_fsize; /* Fragment size */
__u16 i_pad1;
- __u32 l_i_reserved2[2];
+ __u16 l_i_uid_high; /* these 2 fields */
+ __u16 l_i_gid_high; /* were reserved2[0] */
+ __u32 l_i_reserved2;
} linux2;
struct {
__u8 h_i_frag; /* Fragment number */
@@ -272,6 +274,10 @@ struct ext2_inode {
#define i_reserved1 osd1.linux1.l_i_reserved1
#define i_frag osd2.linux2.l_i_frag
#define i_fsize osd2.linux2.l_i_fsize
+#define i_uid_low i_uid
+#define i_gid_low i_gid
+#define i_uid_high osd2.linux2.l_i_uid_high
+#define i_gid_high osd2.linux2.l_i_gid_high
#define i_reserved2 osd2.linux2.l_i_reserved2
#endif
@@ -310,6 +316,7 @@ struct ext2_inode {
#define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
#define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
#define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
+#define EXT2_MOUNT_NO_UID32 0x0200 /* Disable 32-bit UIDs */
#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
diff --git a/include/linux/ext2_fs_sb.h b/include/linux/ext2_fs_sb.h
index 207216323..10d7bbb9d 100644
--- a/include/linux/ext2_fs_sb.h
+++ b/include/linux/ext2_fs_sb.h
@@ -50,8 +50,8 @@ struct ext2_sb_info {
unsigned long s_block_bitmap_number[EXT2_MAX_GROUP_LOADED];
struct buffer_head * s_block_bitmap[EXT2_MAX_GROUP_LOADED];
unsigned long s_mount_opt;
- unsigned short s_resuid;
- unsigned short s_resgid;
+ uid_t s_resuid;
+ gid_t s_resgid;
unsigned short s_mount_state;
unsigned short s_pad;
int s_addr_per_block_bits;
diff --git a/include/linux/fb.h b/include/linux/fb.h
index c537cfb36..56a0f03b6 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -197,6 +197,12 @@ struct fb_con2fbmap {
__u32 framebuffer;
};
+/* VESA Blanking Levels */
+#define VESA_NO_BLANKING 0
+#define VESA_VSYNC_SUSPEND 1
+#define VESA_HSYNC_SUSPEND 2
+#define VESA_POWERDOWN 3
+
struct fb_monspecs {
__u32 hfmin; /* hfreq lower limit (Hz) */
__u32 hfmax; /* hfreq upper limit (Hz) */
@@ -261,9 +267,13 @@ struct fb_info {
char modename[40]; /* default video mode */
kdev_t node;
int flags;
+ int open; /* Has this been open already ? */
#define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */
+ struct fb_var_screeninfo var; /* Current var */
+ struct fb_fix_screeninfo fix; /* Current fix */
+ struct fb_monspecs monspecs; /* Current Monitor specs */
struct fb_ops *fbops;
- struct fb_monspecs monspecs;
+ char *screen_base; /* Virtual address */
struct display *disp; /* initial display variable */
struct vc_data *display_fg; /* Console visible on this display */
char fontname[40]; /* default font name */
@@ -275,8 +285,11 @@ struct fb_info {
void (*blank)(int, struct fb_info*); /* tell fb to (un)blank the screen */
/* arg = 0: unblank */
/* arg > 0: VESA level (arg-1) */
-
+ void *pseudo_palette; /* Fake palette of 16 colors and
+ the cursor's color for non
+ palette mode */
/* From here on everything is device dependent */
+ void *par;
};
#ifdef MODULE
@@ -383,13 +396,6 @@ extern int fb_set_cmap(struct fb_cmap *cmap, int kspc,
extern struct fb_cmap *fb_default_cmap(int len);
extern void fb_invert_cmaps(void);
-/* VESA Blanking Levels */
-#define VESA_NO_BLANKING 0
-#define VESA_VSYNC_SUSPEND 1
-#define VESA_HSYNC_SUSPEND 2
-#define VESA_POWERDOWN 3
-
-
struct fb_videomode {
const char *name; /* optional */
u32 refresh; /* optional */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e6c0c4c29..0046b3f7e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -277,6 +277,7 @@ extern void set_bh_page(struct buffer_head *bh, struct page *page, unsigned long
#include <linux/udf_fs_i.h>
#include <linux/ncp_fs_i.h>
#include <linux/proc_fs_i.h>
+#include <linux/usbdev_fs_i.h>
/*
* Attribute flags. These should be or-ed together to figure out what
@@ -414,6 +415,7 @@ struct inode {
struct ncp_inode_info ncpfs_i;
struct proc_inode_info proc_i;
struct socket socket_i;
+ struct usbdev_inode_info usbdev_i;
void *generic_ip;
} u;
};
@@ -545,6 +547,7 @@ extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
#include <linux/bfs_fs_sb.h>
#include <linux/udf_fs_sb.h>
#include <linux/ncp_fs_sb.h>
+#include <linux/usbdev_fs_sb.h>
extern struct list_head super_blocks;
@@ -592,6 +595,7 @@ struct super_block {
struct bfs_sb_info bfs_sb;
struct udf_sb_info udf_sb;
struct ncp_sb_info ncpfs_sb;
+ struct usbdev_sb_info usbdevfs_sb;
void *generic_sbp;
} u;
/*
@@ -810,7 +814,8 @@ extern void refile_buffer(struct buffer_head * buf);
#define BUF_CLEAN 0
#define BUF_LOCKED 1 /* Buffers scheduled for write */
#define BUF_DIRTY 2 /* Dirty buffers, not yet scheduled for write */
-#define NR_LIST 3
+#define BUF_PROTECTED 3 /* Ramdisk persistent storage */
+#define NR_LIST 4
/*
* This is called by bh->b_end_io() handlers when I/O has completed.
@@ -836,6 +841,19 @@ extern inline void mark_buffer_clean(struct buffer_head * bh)
__mark_buffer_clean(bh);
}
+#define atomic_set_buffer_protected(bh) test_and_set_bit(BH_Protected, &(bh)->b_state)
+
+extern inline void __mark_buffer_protected(struct buffer_head *bh)
+{
+ refile_buffer(bh);
+}
+
+extern inline void mark_buffer_protected(struct buffer_head * bh)
+{
+ if (!atomic_set_buffer_protected(bh))
+ __mark_buffer_protected(bh);
+}
+
extern void FASTCALL(__mark_buffer_dirty(struct buffer_head *bh, int flag));
#define atomic_set_buffer_dirty(bh) test_and_set_bit(BH_Dirty, &(bh)->b_state)
@@ -1011,7 +1029,6 @@ extern int read_ahead[];
extern ssize_t char_write(struct file *, const char *, size_t, loff_t *);
extern ssize_t block_write(struct file *, const char *, size_t, loff_t *);
-extern int block_fsync(struct file *, struct dentry *);
extern int file_fsync(struct file *, struct dentry *);
extern int generic_buffer_fdatasync(struct inode *inode, unsigned long start_idx, unsigned long end_idx);
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index be07a362e..8b743b450 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -53,9 +53,7 @@ struct gendisk {
int minor_shift; /* number of times minor is shifted to
get real minor */
int max_p; /* maximum partitions per device */
- int max_nr; /* maximum number of real devices */
- void (*init)(struct gendisk *); /* Initialization called before we do our thing */
struct hd_struct *part; /* [indexed by minor] */
int *sizes; /* [idem], device size in blocks */
int nr_real; /* number of real devices */
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h
index a986cbcac..a2f08879c 100644
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -59,8 +59,8 @@
#define WIN_CHECKPOWERMODE1 0xE5
#define WIN_CHECKPOWERMODE2 0x98
-#define WIN_DOORLOCK 0xde /* lock door on removable drives */
-#define WIN_DOORUNLOCK 0xdf /* unlock door on removable drives */
+#define WIN_DOORLOCK 0xDE /* lock door on removable drives */
+#define WIN_DOORUNLOCK 0xDF /* unlock door on removable drives */
#define WIN_MULTREAD 0xC4 /* read sectors using multiple mode */
#define WIN_MULTWRITE 0xC5 /* write sectors using multiple mode */
@@ -68,20 +68,24 @@
#define WIN_IDENTIFY 0xEC /* ask drive to identify itself */
#define WIN_IDENTIFY_DMA 0xEE /* same as WIN_IDENTIFY, but DMA */
#define WIN_SETFEATURES 0xEF /* set special drive features */
-#define WIN_READDMA 0xc8 /* read sectors using DMA transfers */
-#define WIN_WRITEDMA 0xca /* write sectors using DMA transfers */
+#define WIN_READDMA 0xC8 /* read sectors using DMA transfers */
+#define WIN_WRITEDMA 0xCA /* write sectors using DMA transfers */
+
+#define WIN_QUEUED_SERVICE 0xA2 /* */
+#define WIN_READDMA_QUEUED 0xC7 /* read sectors using Queued DMA transfers */
+#define WIN_WRITEDMA_QUEUED 0xCC /* write sectors using Queued DMA transfers */
#define WIN_READ_BUFFER 0xE4 /* force read only 1 sector */
#define WIN_WRITE_BUFFER 0xE8 /* force write only 1 sector */
-#define WIN_SMART 0xb0 /* self-monitoring and reporting */
+#define WIN_SMART 0xB0 /* self-monitoring and reporting */
/* Additional drive command codes used by ATAPI devices. */
#define WIN_PIDENTIFY 0xA1 /* identify ATAPI device */
#define WIN_SRST 0x08 /* ATAPI soft reset command */
-#define WIN_PACKETCMD 0xa0 /* Send a packet command. */
+#define WIN_PACKETCMD 0xA0 /* Send a packet command. */
-#define EXABYTE_ENABLE_NEST 0xf0
+#define EXABYTE_ENABLE_NEST 0xF0
/* WIN_SMART sub-commands */
@@ -227,32 +231,43 @@ struct hd_driveid {
unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */
unsigned short eide_pio; /* min cycle time (ns), no IORDY */
unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */
- unsigned short word69;
- unsigned short word70;
+#if 0
+ unsigned short words69_74[6]; /* reserved words 69-74 */
+#else
+ unsigned short word69; /* reserved (word 69) */
+ unsigned short word70; /* reserved (word 70) */
/* HDIO_GET_IDENTITY currently returns only words 0 through 70 */
- unsigned short word71;
- unsigned short word72;
- unsigned short word73;
- unsigned short word74;
- unsigned short word75;
- unsigned short word76;
- unsigned short word77;
- unsigned short word78;
- unsigned short word79;
- unsigned short word80;
- unsigned short word81;
- unsigned short command_sets; /* bits 0:Smart 1:Security 2:Removable 3:PM */
- unsigned short word83; /* bits 14:Smart Enabled 13:0 zero */
- unsigned short word84;
- unsigned short word85;
- unsigned short word86;
- unsigned short word87;
- unsigned short dma_ultra;
+ unsigned short word71; /* reserved (word 71) */
+ unsigned short word72; /* reserved (word 72) */
+ unsigned short word73; /* reserved (word 73) */
+ unsigned short word74; /* reserved (word 74) */
+#endif
+ unsigned short queue_depth; /* */
+#if 0
+ unsigned short words76_79[4]; /* reserved words 76-79 */
+#else
+ unsigned short word76; /* reserved (word 76) */
+ unsigned short word77; /* reserved (word 77) */
+ unsigned short word78; /* reserved (word 78) */
+ unsigned short word79; /* reserved (word 79) */
+#endif
+ unsigned short major_rev_num; /* */
+ unsigned short minor_rev_num; /* */
+ unsigned short command_set_1; /* bits 0:Smart 1:Security 2:Removable 3:PM */
+ unsigned short command_set_2; /* bits 14:Smart Enabled 13:0 zero */
+ unsigned short cfsse; /* command set-feature supported extensions */
+ unsigned short cfs_enable_1; /* command set-feature enabled */
+ unsigned short cfs_enable_2; /* command set-feature enabled */
+ unsigned short csf_default; /* command set-feature default */
+ unsigned short dma_ultra; /* */
unsigned short word89; /* reserved (word 89) */
unsigned short word90; /* reserved (word 90) */
- unsigned short word91; /* reserved (word 91) */
+ unsigned short CurAPMvalues; /* current APM values */
unsigned short word92; /* reserved (word 92) */
- unsigned short word93; /* reserved (word 93) */
+ unsigned short hw_config; /* hardware config */
+#if 0
+ unsigned short words94_126[34];/* reserved words 94-126 */
+#else
unsigned short word94; /* reserved (word 94) */
unsigned short word95; /* reserved (word 95) */
unsigned short word96; /* reserved (word 96) */
@@ -286,9 +301,27 @@ struct hd_driveid {
unsigned short word124; /* reserved (word 124) */
unsigned short word125; /* reserved (word 125) */
unsigned short word126; /* reserved (word 126) */
+#endif
unsigned short word127; /* reserved (word 127) */
- unsigned short security; /* bits 0:support 1:enabled 2:locked 3:frozen */
- unsigned short reserved[127];
+ unsigned short dlf; /* device lock function
+ * 15:9 reserved
+ * 8 security level 1:max 0:high
+ * 7:6 reserved
+ * 5 enhanced erase
+ * 4 expire
+ * 3 frozen
+ * 2 locked
+ * 1 en/disabled
+ * 0 capability
+ */
+ unsigned short csfo; /* current set features options
+ * 15:4 reserved
+ * 3 auto reassign
+ * 2 reverting
+ * 1 read-look-ahead
+ * 0 write cache
+ */
+ unsigned short reserved[126];
};
/*
diff --git a/include/linux/hfs_fs.h b/include/linux/hfs_fs.h
index ef2bc4105..4c9543a5d 100644
--- a/include/linux/hfs_fs.h
+++ b/include/linux/hfs_fs.h
@@ -140,6 +140,19 @@ struct hfs_hdr_layout {
*order[HFS_HDR_MAX]; /* 'descr' ordered by offset */
};
+/* header layout for netatalk's v1 appledouble file format */
+struct hfs_nat_hdr {
+ hfs_lword_t magic;
+ hfs_lword_t version;
+ hfs_byte_t homefs[16];
+ hfs_word_t entries;
+ hfs_byte_t descrs[12*5];
+ hfs_byte_t real_name[255]; /* id=3 */
+ hfs_byte_t comment[200]; /* id=4 XXX: not yet implemented */
+ hfs_byte_t old_info[16]; /* id=7 */
+ hfs_u8 finderinfo[32]; /* id=9 */
+};
+
/*
* Default header layout for Netatalk and AppleDouble
*/
diff --git a/include/linux/highuid.h b/include/linux/highuid.h
new file mode 100644
index 000000000..40f121ca7
--- /dev/null
+++ b/include/linux/highuid.h
@@ -0,0 +1,115 @@
+#ifndef _LINUX_HIGHUID_H
+#define _LINUX_HIGHUID_H
+
+#include <linux/config.h>
+#include <linux/types.h>
+
+/*
+ * general notes:
+ *
+ * CONFIG_UID16 is defined if the given architecture needs to
+ * support backwards compatibility for old system calls.
+ *
+ * kernel code should use uid_t and gid_t at all times when dealing with
+ * kernel-private data.
+ *
+ * old_uid_t and old_gid_t should only be different if CONFIG_UID16 is
+ * defined, else the platform should provide dummy typedefs for them
+ * such that they are equivalent to __kernel_{u,g}id_t.
+ *
+ * uid16_t and gid16_t are used on all architectures. (when dealing
+ * with structures hard coded to 16 bits, such as in filesystems)
+ */
+
+
+/*
+ * This is the "overflow" UID and GID. They are used to signify uid/gid
+ * overflow to old programs when they request uid/gid information but are
+ * using the old 16 bit interfaces.
+ * When you run a libc5 program, it will think that all highuid files or
+ * processes are owned by this uid/gid.
+ * The idea is that it's better to do so than possibly return 0 in lieu of
+ * 65536, etc.
+ */
+
+extern int overflowuid;
+extern int overflowgid;
+
+#define DEFAULT_OVERFLOWUID 65534
+#define DEFAULT_OVERFLOWGID 65534
+
+#ifdef CONFIG_UID16
+
+/* prevent uid mod 65536 effect by returning a default value for high UIDs */
+#define high2lowuid(uid) ((uid) > 65535) ? (old_uid_t)overflowuid : (old_uid_t)(uid)
+#define high2lowgid(gid) ((gid) > 65535) ? (old_gid_t)overflowgid : (old_gid_t)(gid)
+/*
+ * -1 is different in 16 bits than it is in 32 bits
+ * these macros are used by chown(), setreuid(), ...,
+ */
+#define low2highuid(uid) ((uid) == (old_uid_t)-1) ? (uid_t)-1 : (uid_t)(uid)
+#define low2highgid(gid) ((gid) == (old_gid_t)-1) ? (gid_t)-1 : (gid_t)(gid)
+
+/* Avoid extra ifdefs with these macros */
+
+#define SET_UID16(var, uid) var = high2lowuid(uid)
+#define SET_GID16(var, gid) var = high2lowgid(gid)
+#define NEW_TO_OLD_UID(uid) high2lowuid(uid)
+#define NEW_TO_OLD_GID(gid) high2lowgid(gid)
+
+/* specific to fs/stat.c */
+#define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
+#define SET_OLDSTAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
+#define SET_STAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
+#define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
+
+/* specific to kernel/signal.c */
+#ifdef UID16_SIGINFO_COMPAT_NEEDED
+#define SET_SIGINFO_UID16(var, uid) var = high2lowuid(uid)
+#else
+#define SET_SIGINFO_UID16(var, uid) do { ; } while (0)
+#endif
+
+#else
+
+#define SET_UID16(var, uid) do { ; } while (0)
+#define SET_GID16(var, gid) do { ; } while (0)
+#define NEW_TO_OLD_UID(uid) uid
+#define NEW_TO_OLD_GID(gid) gid
+
+#define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = uid
+#define SET_OLDSTAT_GID(stat, gid) (stat).st_gid = gid
+#define SET_STAT_UID(stat, uid) (stat).st_uid = uid
+#define SET_STAT_GID(stat, gid) (stat).st_gid = gid
+
+#define SET_SIGINFO_UID16(var, uid) do { ; } while (0)
+
+#endif /* CONFIG_UID16 */
+
+
+/*
+ * Everything below this line is needed on all architectures, to deal with
+ * filesystems that only store 16 bits of the UID/GID, etc.
+ */
+
+/*
+ * This is the UID and GID that will get written to disk if a filesystem
+ * only supports 16-bit UIDs and the kernel has a high UID/GID to write
+ */
+extern int fs_overflowuid;
+extern int fs_overflowgid;
+
+#define DEFAULT_FS_OVERFLOWUID 65534
+#define DEFAULT_FS_OVERFLOWGID 65534
+
+/*
+ * Since these macros are used in architectures that only need limited
+ * 16-bit UID back compatibility, we won't use old_uid_t and old_gid_t
+ */
+#define fs_high2lowuid(uid) (uid > 65535) ? (uid16_t)fs_overflowuid : (uid16_t)uid
+#define fs_high2lowgid(gid) (gid > 65535) ? (gid16_t)fs_overflowgid : (gid16_t)gid
+
+#define low_16_bits(x) x & 0xFFFF
+#define high_16_bits(x) (x & 0xFFFF0000) >> 16
+
+#endif /* _LINUX_HIGHUID_H */
diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index 01140c30a..b73ca4732 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -26,12 +26,8 @@
#define I2OSWDEL _IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer)
#define I2OVALIDATE _IOR(I2O_MAGIC_NUMBER,8,u32)
#define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html)
-
-/* On hold until we figure this out
-#define I2OEVTREG _IO(I2O_MAGIC_NUMBER,10)
-#define I2OEVTCLR _IO(I2O_MAGIC_NUMBER,11)
-#define I2OEVTGET _IO(I2O_MAGIC_NUMBER,12)
- */
+#define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id)
+#define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info)
struct i2o_cmd_hrtlct
{
@@ -73,6 +69,33 @@ struct i2o_html
unsigned int qlen; /* Length in bytes of query string buffer */
};
+#define I2O_EVT_Q_LEN 32
+
+struct i2o_evt_id
+{
+ unsigned int iop;
+ unsigned int tid;
+ unsigned int evt_mask;
+};
+
+//
+// Event data size = frame size - message header + evt indicator
+#define I2O_EVT_DATA_SIZE 88
+
+struct i2o_evt_info
+{
+ struct i2o_evt_id id;
+ unsigned char evt_data[I2O_EVT_DATA_SIZE];
+ unsigned int data_size;
+};
+
+struct i2o_evt_get
+{
+ struct i2o_evt_info info;
+ int pending;
+ int lost;
+};
+
/**************************************************************************
* HRT related constants and structures
@@ -263,8 +286,12 @@ typedef struct _i2o_status_block {
struct i2o_message
{
- u32 version_size;
- u32 function_addr;
+ u8 version_offset;
+ u8 flags;
+ u16 size;
+ u32 target_tid:12;
+ u32 init_tid:12;
+ u32 function:8;
u32 initiator_context;
/* List follows */
};
@@ -471,14 +498,8 @@ extern inline void i2o_flush_reply(struct i2o_controller *c, u32 m)
I2O_REPLY_WRITE32(c,m);
}
-
-struct i2o_controller *i2o_controller_chain;
-
-extern int i2o_quiesce_controller(struct i2o_controller *);
-extern int i2o_clear_controller(struct i2o_controller *);
extern int i2o_install_controller(struct i2o_controller *);
extern int i2o_delete_controller(struct i2o_controller *);
-extern int i2o_activate_controller(struct i2o_controller *);
extern void i2o_unlock_controller(struct i2o_controller *);
extern struct i2o_controller *i2o_find_controller(int);
extern int i2o_status_get(struct i2o_controller *);
@@ -487,8 +508,6 @@ extern int i2o_num_controllers;
extern int i2o_install_handler(struct i2o_handler *);
extern int i2o_remove_handler(struct i2o_handler *);
-extern int i2o_install_device(struct i2o_controller *, struct i2o_device *);
-extern int i2o_delete_device(struct i2o_device *);
extern int i2o_claim_device(struct i2o_device *, struct i2o_handler *, u32);
extern int i2o_release_device(struct i2o_device *, struct i2o_handler *, u32);
@@ -505,14 +524,13 @@ extern int i2o_query_table(int, struct i2o_controller *, int, int, int, void *,
extern int i2o_clear_table(struct i2o_controller *, int, int);
extern int i2o_row_add_table(struct i2o_controller *, int, int, int, void *,
int);
-extern int i2o_row_delete_table(struct i2o_controller *, int, int, int, void *,
- int);
extern int i2o_event_register(struct i2o_controller *, int, int, u32);
extern int i2o_event_ack(struct i2o_controller *, int, int, u32, void *, int);
extern void i2o_run_queue(struct i2o_controller *);
extern void i2o_report_status(const char *, const char *, u32 *);
+extern void i2o_dump_message(u32 *);
extern const char *i2o_get_class_name(int);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index af5519d34..1b438bf74 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -513,17 +513,17 @@ read_proc_t proc_ide_read_geometry;
*/
#define IDE_SUBDRIVER_VERSION 1
-typedef int (ide_cleanup_proc)(ide_drive_t *);
-typedef ide_startstop_t (ide_do_request_proc)(ide_drive_t *, struct request *, unsigned long);
-typedef void (ide_end_request_proc)(byte, ide_hwgroup_t *);
-typedef int (ide_ioctl_proc)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
-typedef int (ide_open_proc)(struct inode *, struct file *, ide_drive_t *);
-typedef void (ide_release_proc)(struct inode *, struct file *, ide_drive_t *);
-typedef int (ide_check_media_change_proc)(ide_drive_t *);
-typedef void (ide_pre_reset_proc)(ide_drive_t *);
-typedef unsigned long (ide_capacity_proc)(ide_drive_t *);
-typedef ide_startstop_t (ide_special_proc)(ide_drive_t *);
-typedef void (ide_setting_proc)(ide_drive_t *);
+typedef int (ide_cleanup_proc)(ide_drive_t *);
+typedef ide_startstop_t (ide_do_request_proc)(ide_drive_t *, struct request *, unsigned long);
+typedef void (ide_end_request_proc)(byte, ide_hwgroup_t *);
+typedef int (ide_ioctl_proc)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
+typedef int (ide_open_proc)(struct inode *, struct file *, ide_drive_t *);
+typedef void (ide_release_proc)(struct inode *, struct file *, ide_drive_t *);
+typedef int (ide_check_media_change_proc)(ide_drive_t *);
+typedef void (ide_pre_reset_proc)(ide_drive_t *);
+typedef unsigned long (ide_capacity_proc)(ide_drive_t *);
+typedef ide_startstop_t (ide_special_proc)(ide_drive_t *);
+typedef void (ide_setting_proc)(ide_drive_t *);
typedef struct ide_driver_s {
const char *name;
@@ -757,7 +757,6 @@ int drive_is_flashcard (ide_drive_t *drive);
int ide_spin_wait_hwgroup(ide_drive_t *drive, unsigned long *flags);
void ide_timer_expiry (unsigned long data);
void ide_intr (int irq, void *dev_id, struct pt_regs *regs);
-void ide_geninit (struct gendisk *gd);
void do_ide0_request (request_queue_t * q);
#if MAX_HWIFS > 1
void do_ide1_request (request_queue_t * q);
@@ -831,7 +830,7 @@ int ide_replace_subdriver(ide_drive_t *drive, const char *driver);
#endif /* CONFIG_BLK_DEV_OFFBOARD */
unsigned long ide_find_free_region (unsigned short size) __init;
-void ide_scan_pcibus (void) __init;
+void ide_scan_pcibus (int scan_direction) __init;
#endif
#ifdef CONFIG_BLK_DEV_IDEDMA
#define BAD_DMA_DRIVE 0
diff --git a/include/linux/init.h b/include/linux/init.h
index 98497fe18..4d4e6e156 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_INIT_H
#define _LINUX_INIT_H
+#include <linux/config.h>
+
/* These macros are used to mark some functions or
* initialized data (doesn't apply to uninitialized data)
* as `initialization' functions. The kernel can take this
@@ -68,9 +70,9 @@ extern struct kernel_param __setup_start, __setup_end;
* or exit time.
*/
#define __init __attribute__ ((__section__ (".text.init")))
-#define __exit __attribute__ ((unused, __section__(".text.init")))
+#define __exit __attribute__ ((unused, __section__(".text.exit")))
#define __initdata __attribute__ ((__section__ (".data.init")))
-#define __exitdata __attribute__ ((unused, __section__ (".data.init")))
+#define __exitdata __attribute__ ((unused, __section__ (".data.exit")))
#define __initsetup __attribute__ ((unused,__section__ (".setup.init")))
#define __init_call __attribute__ ((unused,__section__ (".initcall.init")))
@@ -113,4 +115,16 @@ extern struct kernel_param __setup_start, __setup_end;
#define __initlocaldata
#endif
+#ifdef CONFIG_HOTPLUG
+#define __devinit
+#define __devinitdata
+#define __devexit
+#define __devexitdata
+#else
+#define __devinit __init
+#define __devinitdata __initdata
+#define __devexit __exit
+#define __devexitdata __exitdata
+#endif
+
#endif /* _LINUX_INIT_H */
diff --git a/include/linux/input.h b/include/linux/input.h
index 9269790da..1e998c944 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -284,6 +284,13 @@ struct input_event {
#define BTN_START 0x13b
#define BTN_MODE 0x13c
+#define BTN_DIGI 0x140
+#define BTN_PEN 0x140
+#define BTN_RUBBER 0x141
+#define BTN_PEN_SIDE 0x142
+#define BTN_PEN_SIDE2 0x143
+#define BTN_NEAR 0x144
+
#define KEY_MAX 0x1ff
/*
@@ -319,16 +326,18 @@ struct input_event {
#define ABS_HAT2Y 0x15
#define ABS_HAT3X 0x16
#define ABS_HAT3Y 0x17
-#define ABS_MISC 0x18
+#define ABS_PRESSURE 0x18
+#define ABS_DISTANCE 0x19
+#define ABS_MISC 0x1a
#define ABS_MAX 0x1f
/*
* LEDs
*/
-#define LED_SCROLLL 0x00
-#define LED_NUML 0x01
-#define LED_CAPSL 0x02
+#define LED_NUML 0x00
+#define LED_CAPSL 0x01
+#define LED_SCROLLL 0x02
#define LED_COMPOSE 0x03
#define LED_KANA 0x04
#define LED_MAX 0x0f
diff --git a/include/linux/ipc.h b/include/linux/ipc.h
index 0aec0d93c..4366dfad0 100644
--- a/include/linux/ipc.h
+++ b/include/linux/ipc.h
@@ -5,6 +5,7 @@
#define IPC_PRIVATE ((__kernel_key_t) 0)
+/* Obsolete, used only for backwards compatibility and libc5 compiles */
struct ipc_perm
{
__kernel_key_t key;
@@ -16,6 +17,9 @@ struct ipc_perm
unsigned short seq;
};
+/* Include the definition of ipc64_perm */
+#include <asm/ipcbuf.h>
+
/* resource get request flags */
#define IPC_CREAT 00001000 /* create if key is nonexistent */
#define IPC_EXCL 00002000 /* fail if key exists */
@@ -36,10 +40,31 @@ struct ipc_perm
#define IPC_STAT 2 /* get ipc_perm options */
#define IPC_INFO 3 /* see ipcs */
+/*
+ * Version flags for semctl, msgctl, and shmctl commands
+ * These are passed as bitflags or-ed with the actual command
+ */
+#define IPC_OLD 0 /* Old version (no 32-bit UID support on many
+ architectures) */
+#define IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger
+ message sizes, etc. */
+
#ifdef __KERNEL__
#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */
+/* used by in-kernel data structures */
+struct kern_ipc_perm
+{
+ key_t key;
+ uid_t uid;
+ gid_t gid;
+ uid_t cuid;
+ gid_t cgid;
+ mode_t mode;
+ unsigned long seq;
+};
+
#endif /* __KERNEL__ */
#endif /* _LINUX_IPC_H */
diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h
index 66368dfcb..5a074285e 100644
--- a/include/linux/isapnp.h
+++ b/include/linux/isapnp.h
@@ -128,7 +128,9 @@ struct isapnp_resources {
struct isapnp_resources *next; /* next resource */
};
-#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
+#if defined(CONFIG_ISAPNP) || defined(CONFIG_ISAPNP_MODULE)
+
+#define __ISAPNP__
/* lowlevel configuration */
int isapnp_present(void);
@@ -146,6 +148,8 @@ void isapnp_activate(unsigned char device);
void isapnp_deactivate(unsigned char device);
void isapnp_fixup_device(struct pci_dev *dev);
void *isapnp_alloc(long size);
+int isapnp_proc_init(void);
+int isapnp_proc_done(void);
/* manager */
struct pci_bus *isapnp_find_card(unsigned short vendor,
unsigned short device,
@@ -161,6 +165,14 @@ void isapnp_resource_change(struct resource *resource,
/* init/main.c */
int isapnp_init(void);
+extern struct list_head isapnp_cards;
+extern struct list_head isapnp_devices;
+
+#define isapnp_for_each_card(card) \
+ for(card = pci_bus_b(isapnp_cards.next); card != pci_bus_b(&isapnp_cards); card = pci_bus_b(card->node.next))
+#define isapnp_for_each_dev(dev) \
+ for(dev = pci_dev_g(isapnp_devices.next); dev != pci_dev_g(&isapnp_devices); dev = pci_dev_g(dev->global_list.next))
+
#else /* !CONFIG_ISAPNP */
/* lowlevel configuration */
@@ -173,21 +185,21 @@ extern inline unsigned int isapnp_read_dword(unsigned char idx) { return 0xfffff
extern inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; }
extern inline void isapnp_write_word(unsigned char idx, unsigned short val) { ; }
extern inline void isapnp_write_dword(unsigned char idx, unsigned int val) { ; }
-extern void isapnp_wake(unsigned char csn) { ; }
-extern void isapnp_device(unsigned char device) { ; }
-extern void isapnp_activate(unsigned char device) { ; }
-extern void isapnp_deactivate(unsigned char device) { ; }
+extern inline void isapnp_wake(unsigned char csn) { ; }
+extern inline void isapnp_device(unsigned char device) { ; }
+extern inline void isapnp_activate(unsigned char device) { ; }
+extern inline void isapnp_deactivate(unsigned char device) { ; }
/* manager */
-extern struct pci_bus *isapnp_find_card(unsigned short vendor,
- unsigned short device,
- struct pci_bus *from) { return NULL; }
-extern struct pci_dev *isapnp_find_dev(struct pci_bus *card,
- unsigned short vendor,
- unsigned short function,
+extern inline struct pci_bus *isapnp_find_card(unsigned short vendor,
+ unsigned short device,
+ struct pci_bus *from) { return NULL; }
+extern inline struct pci_dev *isapnp_find_dev(struct pci_bus *card,
+ unsigned short vendor,
+ unsigned short function,
struct pci_dev *from) { return NULL; }
-extern void isapnp_resource_change(struct resource *resource,
- unsigned long start,
- unsigned long size) { ; }
+extern inline void isapnp_resource_change(struct resource *resource,
+ unsigned long start,
+ unsigned long size) { ; }
#endif /* CONFIG_ISAPNP */
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h
index f5ae9ed93..9b215fb14 100644
--- a/include/linux/kbd_kern.h
+++ b/include/linux/kbd_kern.h
@@ -69,6 +69,8 @@ extern void setledstate(struct kbd_struct *kbd, unsigned int led);
extern int do_poke_blanked_console;
+extern void (*kbd_ledfunc)(unsigned int led);
+
extern inline void show_console(void)
{
do_poke_blanked_console = 1;
diff --git a/include/linux/major.h b/include/linux/major.h
index 8773bf72e..2eaa1741d 100644
--- a/include/linux/major.h
+++ b/include/linux/major.h
@@ -108,8 +108,12 @@
#define SPECIALIX_NORMAL_MAJOR 75
#define SPECIALIX_CALLOUT_MAJOR 76
+#define DASD_MAJOR 94 /* Official assignations from Peter */
+
#define LVM_CHAR_MAJOR 109 /* Logical Volume Manager */
+#define MDISK_MAJOR 95 /* Official assignations from Peter */
+
#define I2O_MAJOR 80 /* 80->87 */
#define IDE6_MAJOR 88
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a05d74bd8..d5daeba2c 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -44,7 +44,7 @@ struct vm_area_struct {
struct vm_area_struct *vm_next;
pgprot_t vm_page_prot;
- unsigned short vm_flags;
+ unsigned long vm_flags;
/* AVL tree of VM areas per task, sorted by address */
short vm_avl_height;
@@ -66,26 +66,26 @@ struct vm_area_struct {
/*
* vm_flags..
*/
-#define VM_READ 0x0001 /* currently active flags */
-#define VM_WRITE 0x0002
-#define VM_EXEC 0x0004
-#define VM_SHARED 0x0008
-
-#define VM_MAYREAD 0x0010 /* limits for mprotect() etc */
-#define VM_MAYWRITE 0x0020
-#define VM_MAYEXEC 0x0040
-#define VM_MAYSHARE 0x0080
-
-#define VM_GROWSDOWN 0x0100 /* general info on the segment */
-#define VM_GROWSUP 0x0200
-#define VM_SHM 0x0400 /* shared memory area, don't swap out */
-#define VM_DENYWRITE 0x0800 /* ETXTBSY on write attempts.. */
-
-#define VM_EXECUTABLE 0x1000
-#define VM_LOCKED 0x2000
-#define VM_IO 0x4000 /* Memory mapped I/O or similar */
-
-#define VM_STACK_FLAGS 0x0177
+#define VM_READ 0x00000001 /* currently active flags */
+#define VM_WRITE 0x00000002
+#define VM_EXEC 0x00000004
+#define VM_SHARED 0x00000008
+
+#define VM_MAYREAD 0x00000010 /* limits for mprotect() etc */
+#define VM_MAYWRITE 0x00000020
+#define VM_MAYEXEC 0x00000040
+#define VM_MAYSHARE 0x00000080
+
+#define VM_GROWSDOWN 0x00000100 /* general info on the segment */
+#define VM_GROWSUP 0x00000200
+#define VM_SHM 0x00000400 /* shared memory area, don't swap out */
+#define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */
+
+#define VM_EXECUTABLE 0x00001000
+#define VM_LOCKED 0x00002000
+#define VM_IO 0x00004000 /* Memory mapped I/O or similar */
+
+#define VM_STACK_FLAGS 0x00000177
/*
* mapping from the currently active vm_flags protection bits (the
diff --git a/include/linux/module.h b/include/linux/module.h
index ce2d3aa98..56d29ce62 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -188,6 +188,10 @@ const char __module_parm_desc_##var[] \
__attribute__((section(".modinfo"))) = \
"parm_desc_" __MODULE_STRING(var) "=" desc
+#define MODULE_DEVICE_TABLE(type,name) \
+const struct type##_device_id * __module_##type##_device_table = name
+/* not put to .modinfo section to avoid section type conflicts */
+
/* The attributes of a section are set the first time the section is
seen; we want .modinfo to not be allocated. */
@@ -218,6 +222,7 @@ const char __module_using_checksums[] __attribute__((section(".modinfo"))) =
#define MODULE_SUPPORTED_DEVICE(name)
#define MODULE_PARM(var,type)
#define MODULE_PARM_DESC(var,desc)
+#define MODULE_DEVICE_TABLE(type,name)
#ifndef __GENKSYMS__
diff --git a/include/linux/msg.h b/include/linux/msg.h
index 38d10dd72..4dfca8d49 100644
--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -11,6 +11,7 @@
#define MSG_NOERROR 010000 /* no error if message is too big */
#define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/
+/* Obsolete, used only for backwards compatibility and libc5 compiles */
struct msqid_ds {
struct ipc_perm msg_perm;
struct msg *msg_first; /* first message on queue,unused */
@@ -27,6 +28,9 @@ struct msqid_ds {
__kernel_ipc_pid_t msg_lrpid; /* last receive pid */
};
+/* Include the definition of msqid64_ds */
+#include <asm/msgbuf.h>
+
/* message buffer for msgsnd and msgrcv calls */
struct msgbuf {
long mtype; /* type of message */
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index 0ce8596ed..a9d46d35b 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -37,6 +37,20 @@ struct ncp_fs_info {
__u32 directory_id;
};
+struct ncp_fs_info_v2 {
+ int version;
+ unsigned long mounted_uid;
+ unsigned int connection;
+ unsigned int buffer_size;
+
+ unsigned int volume_number;
+ __u32 directory_id;
+
+ __u32 dummy1;
+ __u32 dummy2;
+ __u32 dummy3;
+};
+
struct ncp_sign_init
{
char sign_root[8];
@@ -90,19 +104,15 @@ struct ncp_nls_ioctl
};
#define NCP_IOC_NCPREQUEST _IOR('n', 1, struct ncp_ioctl_request)
-#define NCP_IOC_GETMOUNTUID _IOW('n', 2, __kernel_uid_t)
-
-#if 1
-#ifdef __KERNEL__
-/* remove after ncpfs-2.0.13 gets released or at the beginning of kernel-2.1. codefreeze */
-#define NCP_IOC_GETMOUNTUID_INT _IOW('n', 2, unsigned int)
-#endif
-#endif
+#define NCP_IOC_GETMOUNTUID _IOW('n', 2, __kernel_old_uid_t)
+#define NCP_IOC_GETMOUNTUID2 _IOW('n', 2, unsigned long)
#define NCP_IOC_CONN_LOGGED_IN _IO('n', 3)
-#define NCP_GET_FS_INFO_VERSION (1)
+#define NCP_GET_FS_INFO_VERSION (1)
#define NCP_IOC_GET_FS_INFO _IOWR('n', 4, struct ncp_fs_info)
+#define NCP_GET_FS_INFO_VERSION_V2 (2)
+#define NCP_IOC_GET_FS_INFO_V2 _IOWR('n', 4, struct ncp_fs_info_v2)
#define NCP_IOC_SIGN_INIT _IOR('n', 5, struct ncp_sign_init)
#define NCP_IOC_SIGN_WANTED _IOR('n', 6, int)
diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h
index 46f100eb4..fbb1537b3 100644
--- a/include/linux/ncp_fs_sb.h
+++ b/include/linux/ncp_fs_sb.h
@@ -18,7 +18,7 @@
struct ncp_server {
- struct ncp_mount_data m; /* Nearly all of the mount data is of
+ struct ncp_mount_data_kernel m; /* Nearly all of the mount data is of
interest for us later, so we store
it completely. */
diff --git a/include/linux/ncp_mount.h b/include/linux/ncp_mount.h
index a276ab1e4..d74092d08 100644
--- a/include/linux/ncp_mount.h
+++ b/include/linux/ncp_mount.h
@@ -40,4 +40,50 @@ struct ncp_mount_data {
__kernel_mode_t dir_mode;
};
+#define NCP_MOUNT_VERSION_V4 (4)
+
+struct ncp_mount_data_v4 {
+ int version;
+ unsigned long flags; /* NCP_MOUNT_* flags */
+ /* MIPS uses long __kernel_uid_t, but... */
+ /* we neever pass -1, so it is safe */
+ unsigned long mounted_uid; /* Who may umount() this filesystem? */
+ /* MIPS uses long __kernel_pid_t */
+ long wdog_pid; /* Who cares for our watchdog packets? */
+
+ unsigned int ncp_fd; /* The socket to the ncp port */
+ unsigned int time_out; /* How long should I wait after
+ sending a NCP request? */
+ unsigned int retry_count; /* And how often should I retry? */
+
+ /* MIPS uses long __kernel_uid_t... */
+ /* we never pass -1, so it is safe */
+ unsigned long uid;
+ unsigned long gid;
+ /* MIPS uses unsigned long __kernel_mode_t */
+ unsigned long file_mode;
+ unsigned long dir_mode;
+};
+
+#ifdef __KERNEL__
+
+struct ncp_mount_data_kernel {
+ unsigned long flags; /* NCP_MOUNT_* flags */
+ unsigned int int_flags; /* internal flags */
+#define NCP_IMOUNT_LOGGEDIN_POSSIBLE 0x0001
+ __kernel_uid32_t mounted_uid; /* Who may umount() this filesystem? */
+ __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */
+ unsigned int ncp_fd; /* The socket to the ncp port */
+ unsigned int time_out; /* How long should I wait after
+ sending a NCP request? */
+ unsigned int retry_count; /* And how often should I retry? */
+ unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_mode_t file_mode;
+ __kernel_mode_t dir_mode;
+};
+
+#endif /* __KERNEL__ */
+
#endif
diff --git a/include/linux/ntfs_fs_i.h b/include/linux/ntfs_fs_i.h
index cab27748c..0bc8d7806 100644
--- a/include/linux/ntfs_fs_i.h
+++ b/include/linux/ntfs_fs_i.h
@@ -24,11 +24,11 @@ typedef __kernel_mode_t ntmode_t;
#endif
#ifndef NTFS_UID_T
#define NTFS_UID_T
-typedef __kernel_uid_t ntfs_uid_t;
+typedef uid_t ntfs_uid_t;
#endif
#ifndef NTFS_GID_T
#define NTFS_GID_T
-typedef __kernel_gid_t ntfs_gid_t;
+typedef gid_t ntfs_gid_t;
#endif
#ifndef NTFS_SIZE_T
#define NTFS_SIZE_T
diff --git a/include/linux/pci.h b/include/linux/pci.h
index b17e40361..3c51b15e7 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -311,9 +311,10 @@ struct pci_dev {
unsigned short subsystem_device;
unsigned int class; /* 3 bytes: (base,sub,prog-if) */
u8 hdr_type; /* PCI header type (`multi' flag masked out) */
- u8 rom_base_reg; /* Which config register controls the ROM */
+ u8 rom_base_reg; /* which config register controls the ROM */
- unsigned short regs;
+ struct pci_driver *driver; /* which driver has allocated this device */
+ void *driver_data; /* data private to the driver */
/* device is compatible with these IDs */
unsigned short vendor_compatible[DEVICE_COUNT_COMPATIBLE];
@@ -328,12 +329,13 @@ struct pci_dev {
struct resource dma_resource[DEVICE_COUNT_DMA];
struct resource irq_resource[DEVICE_COUNT_IRQ];
- char name[48]; /* Device name */
- char slot_name[8]; /* Slot name */
- int active; /* device is active */
- int ro; /* Read/Only */
+ char name[48]; /* device name */
+ char slot_name[8]; /* slot name */
+ int active; /* ISAPnP: device is active */
+ int ro; /* ISAPnP: read only */
+ unsigned short regs; /* ISAPnP: supported registers */
- int (*prepare)(struct pci_dev *dev);
+ int (*prepare)(struct pci_dev *dev); /* ISAPnP hooks */
int (*activate)(struct pci_dev *dev);
int (*deactivate)(struct pci_dev *dev);
};
@@ -490,36 +492,42 @@ int pci_assign_resource(struct pci_dev *dev, int i);
#define pci_for_each_dev(dev) \
for(dev = pci_dev_g(pci_devices.next); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.next))
+#define pci_for_each_dev_reverse(dev) \
+ for(dev = pci_dev_g(pci_devices.prev); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.prev))
+
/* Helper functions for low-level code (drivers/pci/setup.c) */
int pci_claim_resource(struct pci_dev *, int);
-void pci_assign_unassigned_resources(u32 min_io, u32 min_mem);
+void pci_assign_unassigned_resources(void);
void pci_set_bus_ranges(void);
void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
int (*)(struct pci_dev *, u8, u8));
-/*
- * simple PCI probing for drivers (drivers/pci/helper.c)
- */
-
-struct pci_simple_probe_entry;
-typedef int (*pci_simple_probe_callback) (struct pci_dev *dev, int match_num,
- const struct pci_simple_probe_entry *ent,
- void *drvr_data);
-
-struct pci_simple_probe_entry {
- unsigned short vendor; /* vendor id, PCI_ANY_ID, or 0 for last entry */
- unsigned short device; /* device id, PCI_ANY_ID, or 0 for last entry */
- unsigned short subsys_vendor; /* subsystem vendor id, 0 for don't care */
- unsigned short subsys_device; /* subsystem device id, 0 for don't care */
- void *dev_data; /* driver-private, entry-specific data */
-};
+/* New-style probing supporting hot-pluggable devices */
-int pci_simple_probe (const struct pci_simple_probe_entry *list,
- size_t match_limit, pci_simple_probe_callback cb,
- void *drvr_data);
+struct pci_device_id {
+ unsigned int vendor, device; /* Vendor and device ID or PCI_ANY_ID */
+ unsigned int subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */
+ unsigned int class, class_mask; /* (class,subclass,prog-if) triplet */
+ unsigned long driver_data; /* Data private to the driver */
+};
+struct pci_driver {
+ struct list_head node;
+ char *name;
+ const struct pci_device_id *id_table; /* NULL if wants all devices */
+ int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
+ void (*remove)(struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
+ void (*suspend)(struct pci_dev *dev); /* Device suspended */
+ void (*resume)(struct pci_dev *dev); /* Device woken up */
+};
+int pci_register_driver(struct pci_driver *);
+void pci_unregister_driver(struct pci_driver *);
+void pci_insert_device(struct pci_dev *, struct pci_bus *);
+void pci_remove_device(struct pci_dev *);
+struct pci_driver *pci_dev_driver(struct pci_dev *);
+const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, struct pci_dev *dev);
/*
* If the system does not have PCI, clearly these return errors. Define
@@ -556,10 +564,6 @@ unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from)
extern inline void pci_set_master(struct pci_dev *dev) { }
extern inline int pci_enable_device(struct pci_dev *dev) { return 0; }
-extern inline int pci_simple_probe (const struct pci_simple_probe_entry *list, size_t match_limit,
- pci_simple_probe_callback cb, void *drvr_data)
-{ return 0; }
-
#endif /* !CONFIG_PCI */
/*
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 76818a639..23e74d28b 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -163,6 +163,10 @@
#define PCI_DEVICE_ID_ATI_215LG 0x4c47
#define PCI_DEVICE_ID_ATI_264LT 0x4c54
#define PCI_DEVICE_ID_ATI_264VT 0x5654
+#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245
+#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246
+#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b
+#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c
#define PCI_VENDOR_ID_VLSI 0x1004
#define PCI_DEVICE_ID_VLSI_82C592 0x0005
@@ -249,6 +253,12 @@
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
#define PCI_DEVICE_ID_AMD_SCSI 0x2020
+#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006
+#define PCI_DEVICE_ID_AMD_VIPER_7403 0x7403
+#define PCI_DEVICE_ID_AMD_VIPER_7408 0x7408
+#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409
+#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B
+#define PCI_DEVICE_ID_AMD_VIPER_740C 0x740C
#define PCI_VENDOR_ID_TRIDENT 0x1023
#define PCI_DEVICE_ID_TRIDENT_9320 0x9320
@@ -498,6 +508,7 @@
#define PCI_DEVICE_ID_CMD_643 0x0643
#define PCI_DEVICE_ID_CMD_646 0x0646
#define PCI_DEVICE_ID_CMD_647 0x0647
+#define PCI_DEVICE_ID_CMD_648 0x0648
#define PCI_DEVICE_ID_CMD_670 0x0670
#define PCI_VENDOR_ID_VISION 0x1098
@@ -784,6 +795,7 @@
#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465
#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466
#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475
+#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476
#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478
#define PCI_VENDOR_ID_ARTOP 0x1191
diff --git a/include/linux/posix_types.h b/include/linux/posix_types.h
index 338160e48..3ee2ed9de 100644
--- a/include/linux/posix_types.h
+++ b/include/linux/posix_types.h
@@ -1,15 +1,7 @@
#ifndef _LINUX_POSIX_TYPES_H
#define _LINUX_POSIX_TYPES_H
-/*
- * This file is generally used by user-level software, so you need to
- * be a little careful about namespace pollution etc. Also, we cannot
- * assume GCC is being used.
- */
-
-#ifndef NULL
-# define NULL ((void *) 0)
-#endif
+#include <linux/stddef.h>
/*
* This allows for 1024 file descriptors: if NR_OPEN is ever grown
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 3e98379ed..1678b897c 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -181,11 +181,11 @@ extern inline struct proc_dir_entry *create_proc_entry(const char *name,
mode_t mode, struct proc_dir_entry *parent) { return NULL; }
extern inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {};
-extern inline proc_dir_entry *proc_symlink(const char *name,
+extern inline struct proc_dir_entry *proc_symlink(const char *name,
struct proc_dir_entry *parent,char *dest) {return NULL;}
-extern inline proc_dir_entry *proc_mknod(const char *name,mode_t mode,
+extern inline struct proc_dir_entry *proc_mknod(const char *name,mode_t mode,
struct proc_dir_entry *parent,kdev_t rdev) {return NULL;}
-extern struct proc_dir_entry *proc_mkdir(const char *name,
+extern inline struct proc_dir_entry *proc_mkdir(const char *name,
struct proc_dir_entry *parent) {return NULL;}
extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index c1b803e2f..8cac77c3c 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -2,8 +2,8 @@
* Name : qnx4_fs.h
* Author : Richard Frowijn
* Function : qnx4 global filesystem definitions
- * Version : 1.0.1
- * Last modified : 1999-12-13
+ * Version : 1.0.2
+ * Last modified : 2000-01-06
*
* History : 23-03-1998 created
*/
@@ -41,41 +41,41 @@
* This is the original qnx4 inode layout on disk.
*/
struct qnx4_inode_entry {
- char di_fname[QNX4_SHORT_NAME_MAX];
- qnx4_off_t di_size;
- qnx4_xtnt_t di_first_xtnt;
- unsigned long di_xblk;
- time_t di_ftime;
- time_t di_mtime;
- time_t di_atime;
- time_t di_ctime;
- qnx4_nxtnt_t di_num_xtnts;
- mode_t di_mode;
- qnx4_muid_t di_uid;
- qnx4_mgid_t di_gid;
- qnx4_nlink_t di_nlink;
- char di_zero[4];
- qnx4_ftype_t di_type;
- unsigned char di_status;
+ char di_fname[QNX4_SHORT_NAME_MAX];
+ qnx4_off_t di_size;
+ qnx4_xtnt_t di_first_xtnt;
+ __u32 di_xblk;
+ __s32 di_ftime;
+ __s32 di_mtime;
+ __s32 di_atime;
+ __s32 di_ctime;
+ qnx4_nxtnt_t di_num_xtnts;
+ qnx4_mode_t di_mode;
+ qnx4_muid_t di_uid;
+ qnx4_mgid_t di_gid;
+ qnx4_nlink_t di_nlink;
+ __u8 di_zero[4];
+ qnx4_ftype_t di_type;
+ __u8 di_status;
};
struct qnx4_link_info {
- char dl_fname[QNX4_NAME_MAX];
- unsigned long dl_inode_blk;
- unsigned char dl_inode_ndx;
- unsigned char dl_spare[10];
- unsigned char dl_status;
+ char dl_fname[QNX4_NAME_MAX];
+ __u32 dl_inode_blk;
+ __u8 dl_inode_ndx;
+ __u8 dl_spare[10];
+ __u8 dl_status;
};
struct qnx4_xblk {
- unsigned long xblk_next_xblk;
- unsigned long xblk_prev_xblk;
- unsigned char xblk_num_xtnts;
- char xblk_spare[3];
- long xblk_num_blocks;
- qnx4_xtnt_t xblk_xtnts[QNX4_MAX_XTNTS_PER_XBLK];
- char xblk_signature[8];
- qnx4_xtnt_t xblk_first_xtnt;
+ __u32 xblk_next_xblk;
+ __u32 xblk_prev_xblk;
+ __u8 xblk_num_xtnts;
+ __u8 xblk_spare[3];
+ __s32 xblk_num_blocks;
+ qnx4_xtnt_t xblk_xtnts[QNX4_MAX_XTNTS_PER_XBLK];
+ char xblk_signature[8];
+ qnx4_xtnt_t xblk_first_xtnt;
};
struct qnx4_super_block {
diff --git a/include/linux/qnx4_fs_i.h b/include/linux/qnx4_fs_i.h
index 5582c8121..57439fe57 100644
--- a/include/linux/qnx4_fs_i.h
+++ b/include/linux/qnx4_fs_i.h
@@ -2,11 +2,11 @@
* Name : qnx4_fs_i.h
* Author : Richard Frowijn
* Function : qnx4 inode definitions
- * Version : 1.0
- * Last modified : 25-05-1998
- *
+ * Version : 1.0.2
+ * Last modified : 2000-01-06
+ *
* History : 23-03-1998 created
- *
+ *
*/
#ifndef _QNX4_FS_I
#define _QNX4_FS_I
@@ -14,25 +14,25 @@
#include <linux/qnxtypes.h>
/*
- * qnx4 fs inode entry
+ * qnx4 fs inode entry
*/
struct qnx4_inode_info {
- char i_reserved[16]; /* 16 */
- qnx4_off_t i_size; /* 4 */
- qnx4_xtnt_t i_first_xtnt; /* 8 */
- long i_xblk; /* 4 */
- time_t i_ftime; /* 4 */
- time_t i_mtime; /* 4 */
- time_t i_atime; /* 4 */
- time_t i_ctime; /* 4 */
- qnx4_nxtnt_t i_num_xtnts; /* 2 */
- mode_t i_mode; /* 2 */
- qnx4_muid_t i_uid; /* 2 */
- qnx4_mgid_t i_gid; /* 2 */
- qnx4_nlink_t i_nlink; /* 2 */
- char i_zero[4]; /* 4 */
- qnx4_ftype_t i_type; /* 1 */
- unsigned char i_status; /* 1 */
+ char i_reserved[16]; /* 16 */
+ qnx4_off_t i_size; /* 4 */
+ qnx4_xtnt_t i_first_xtnt; /* 8 */
+ __u32 i_xblk; /* 4 */
+ __s32 i_ftime; /* 4 */
+ __s32 i_mtime; /* 4 */
+ __s32 i_atime; /* 4 */
+ __s32 i_ctime; /* 4 */
+ qnx4_nxtnt_t i_num_xtnts; /* 2 */
+ qnx4_mode_t i_mode; /* 2 */
+ qnx4_muid_t i_uid; /* 2 */
+ qnx4_mgid_t i_gid; /* 2 */
+ qnx4_nlink_t i_nlink; /* 2 */
+ __u8 i_zero[4]; /* 4 */
+ qnx4_ftype_t i_type; /* 1 */
+ __u8 i_status; /* 1 */
};
#endif
diff --git a/include/linux/qnx4_fs_sb.h b/include/linux/qnx4_fs_sb.h
index 35abd99f1..1f62cc0cc 100644
--- a/include/linux/qnx4_fs_sb.h
+++ b/include/linux/qnx4_fs_sb.h
@@ -2,8 +2,8 @@
* Name : qnx4_fs_sb.h
* Author : Richard Frowijn
* Function : qnx4 superblock definitions
- * Version : 1.0
- * Last modified : 20-05-1998
+ * Version : 1.0.2
+ * Last modified : 2000-01-06
*
* History : 23-03-1998 created
*
@@ -18,10 +18,10 @@
*/
struct qnx4_sb_info {
- struct buffer_head *sb_buf; /* superblock buffer */
- struct qnx4_super_block *sb; /* our superblock */
- unsigned int Version; /* may be useful */
- struct qnx4_inode_entry *BitMap; /* useful */
+ struct buffer_head *sb_buf; /* superblock buffer */
+ struct qnx4_super_block *sb; /* our superblock */
+ unsigned int Version; /* may be useful */
+ struct qnx4_inode_entry *BitMap; /* useful */
};
#endif
diff --git a/include/linux/qnxtypes.h b/include/linux/qnxtypes.h
index 0a700e1cd..fb518e318 100644
--- a/include/linux/qnxtypes.h
+++ b/include/linux/qnxtypes.h
@@ -2,27 +2,28 @@
* Name : qnxtypes.h
* Author : Richard Frowijn
* Function : standard qnx types
- * Version : 1.0
- * Last modified : 22-03-1998
- *
+ * Version : 1.0.2
+ * Last modified : 2000-01-06
+ *
* History : 22-03-1998 created
- *
+ *
*/
#ifndef _QNX4TYPES_H
#define _QNX4TYPES_H
-typedef unsigned short qnx4_nxtnt_t;
-typedef unsigned char qnx4_ftype_t;
+typedef __u16 qnx4_nxtnt_t;
+typedef __u8 qnx4_ftype_t;
typedef struct {
- long xtnt_blk;
- long xtnt_size;
+ __u32 xtnt_blk;
+ __u32 xtnt_size;
} qnx4_xtnt_t;
-typedef unsigned short qnx4_muid_t;
-typedef unsigned short qnx4_mgid_t;
-typedef unsigned long qnx4_off_t;
-typedef unsigned short qnx4_nlink_t;
+typedef __u16 qnx4_mode_t;
+typedef __u16 qnx4_muid_t;
+typedef __u16 qnx4_mgid_t;
+typedef __u32 qnx4_off_t;
+typedef __u16 qnx4_nlink_t;
#endif
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ec1ad0e83..615eba6c5 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -120,10 +120,6 @@ struct sched_param {
int sched_priority;
};
-#ifndef NULL
-#define NULL ((void *) 0)
-#endif
-
#ifdef __KERNEL__
#include <linux/spinlock.h>
@@ -274,17 +270,19 @@ struct task_struct {
struct exec_domain *exec_domain;
volatile long need_resched;
-/* various fields */
+ cycles_t avg_slice;
+ int lock_depth; /* Lock depth. We can context switch in and out of holding a syscall kernel lock... */
+/* begin intel cache line */
long counter;
long priority;
- cycles_t avg_slice;
-/* SMP and runqueue state */
+ unsigned long policy;
+/* memory management info */
+ struct mm_struct *mm, *active_mm;
int has_cpu;
int processor;
- int last_processor;
- int lock_depth; /* Lock depth. We can context switch in and out of holding a syscall kernel lock... */
- struct task_struct *next_task, *prev_task;
struct list_head run_list;
+ struct task_struct *next_task, *prev_task;
+ int last_processor;
/* task state */
struct linux_binfmt *binfmt;
@@ -313,7 +311,7 @@ struct task_struct {
wait_queue_head_t wait_chldexit; /* for wait4() */
struct semaphore *vfork_sem; /* for vfork() */
- unsigned long policy, rt_priority;
+ unsigned long rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
unsigned long it_real_incr, it_prof_incr, it_virt_incr;
struct timer_list real_timer;
@@ -346,10 +344,6 @@ struct task_struct {
struct fs_struct *fs;
/* open file information */
struct files_struct *files;
-
-/* memory management info */
- struct mm_struct *mm, *active_mm;
-
/* signal handlers */
spinlock_t sigmask_lock; /* Protects signal and blocked */
struct signal_struct *sig;
@@ -398,16 +392,20 @@ struct task_struct {
*/
#define INIT_TASK(name) \
/* state etc */ { 0,0,0,KERNEL_DS,&default_exec_domain,0, \
-/* counter */ DEF_PRIORITY,DEF_PRIORITY,0, \
-/* SMP */ 0,0,0,-1, \
-/* schedlink */ &init_task,&init_task, LIST_HEAD_INIT(init_task.run_list), \
+/* avg_slice */ 0, -1, \
+/* counter */ DEF_PRIORITY,DEF_PRIORITY,SCHED_OTHER, \
+/* mm */ NULL, &init_mm, \
+/* has_cpu */ 0,0, \
+/* run_list */ LIST_HEAD_INIT(init_task.run_list), \
+/* next_task */ &init_task,&init_task, \
+/* last_proc */ 0, \
/* binfmt */ NULL, \
/* ec,brk... */ 0,0,0,0,0,0, \
/* pid etc.. */ 0,0,0,0,0, \
/* proc links*/ &init_task,&init_task,NULL,NULL,NULL, \
/* pidhash */ NULL, NULL, \
/* chld wait */ __WAIT_QUEUE_HEAD_INITIALIZER(name.wait_chldexit), NULL, \
-/* timeout */ SCHED_OTHER,0,0,0,0,0,0,0, \
+/* timeout */ 0,0,0,0,0,0,0, \
/* timer */ { NULL, NULL, 0, 0, it_real_fn }, \
/* utime */ {0,0,0,0},0, \
/* per CPU times */ {0, }, {0, }, \
@@ -426,7 +424,6 @@ struct task_struct {
/* thread */ INIT_THREAD, \
/* fs */ &init_fs, \
/* files */ &init_files, \
-/* mm */ NULL, &init_mm, \
/* signals */ SPIN_LOCK_UNLOCKED, &init_signals, {{0}}, {{0}}, NULL, &init_task.sigqueue, 0, 0, \
/* exec cts */ 0,0, \
/* exit_sem */ __MUTEX_INITIALIZER(name.exit_sem), \
@@ -508,10 +505,10 @@ extern long FASTCALL(interruptible_sleep_on_timeout(wait_queue_head_t *q,
extern void FASTCALL(wake_up_process(struct task_struct * tsk));
#define wake_up(x) __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE | TASK_EXCLUSIVE)
-#define wake_up_all(x) __wake_up_all((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE)
+#define wake_up_all(x) __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE)
#define wake_up_sync(x) __wake_up_sync((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE | TASK_EXCLUSIVE)
#define wake_up_interruptible(x) __wake_up((x),TASK_INTERRUPTIBLE | TASK_EXCLUSIVE)
-#define wake_up_interruptible_all(x) __wake_up_all((x),TASK_INTERRUPTIBLE)
+#define wake_up_interruptible_all(x) __wake_up((x),TASK_INTERRUPTIBLE)
#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE | TASK_EXCLUSIVE)
extern int in_group_p(gid_t);
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 234d4eebf..7013af7ea 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -19,7 +19,7 @@
#define SEM_STAT 18
#define SEM_INFO 19
-/* One semid data structure for each set of semaphores in the system. */
+/* Obsolete, used only for backwards compatibility and libc5 compiles */
struct semid_ds {
struct ipc_perm sem_perm; /* permissions .. see ipc.h */
__kernel_time_t sem_otime; /* last semop time */
@@ -31,6 +31,9 @@ struct semid_ds {
unsigned short sem_nsems; /* no. of semaphores in array */
};
+/* Include the definition of semid64_ds */
+#include <asm/sembuf.h>
+
/* semop system calls takes an array of these. */
struct sembuf {
unsigned short sem_num; /* semaphore index in array */
@@ -81,6 +84,18 @@ struct sem {
int sempid; /* pid of last operation */
};
+/* One sem_array data structure for each set of semaphores in the system. */
+struct sem_array {
+ struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */
+ time_t sem_otime; /* last semop time */
+ time_t sem_ctime; /* last change time */
+ struct sem *sem_base; /* ptr to first semaphore in array */
+ struct sem_queue *sem_pending; /* pending operations to be processed */
+ struct sem_queue **sem_pending_last; /* last pending operation */
+ struct sem_undo *undo; /* undo requests on this array */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+};
+
/* One queue for each sleeping process in the system. */
struct sem_queue {
struct sem_queue * next; /* next entry in the queue */
@@ -89,7 +104,7 @@ struct sem_queue {
struct sem_undo * undo; /* undo structure */
int pid; /* process id of requesting process */
int status; /* completion status of operation */
- struct semid_ds * sma; /* semaphore array for operations */
+ struct sem_array * sma; /* semaphore array for operations */
int id; /* internal sem id */
struct sembuf * sops; /* array of pending operations */
int nsops; /* number of operations */
diff --git a/include/linux/shm.h b/include/linux/shm.h
index 909adb12e..2f24729f6 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -16,9 +16,10 @@
#include <asm/shmparam.h>
+/* Obsolete, used only for backwards compatibility and libc5 compiles */
struct shmid_ds {
struct ipc_perm shm_perm; /* operation perms */
- size_t shm_segsz; /* size of segment (bytes) */
+ int shm_segsz; /* size of segment (bytes) */
__kernel_time_t shm_atime; /* last attach time */
__kernel_time_t shm_dtime; /* last detach time */
__kernel_time_t shm_ctime; /* last change time */
@@ -30,6 +31,9 @@ struct shmid_ds {
void *shm_unused3; /* unused */
};
+/* Include the definition of shmid64_ds and shminfo64 */
+#include <asm/shmbuf.h>
+
/* permission flag for shmget */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
@@ -47,8 +51,9 @@ struct shmid_ds {
#define SHM_STAT 13
#define SHM_INFO 14
+/* Obsolete, used only for backwards compatibility */
struct shminfo {
- size_t shmmax;
+ int shmmax;
int shmmin;
int shmmni;
int shmseg;
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h
index 11dfce7dd..451ff761a 100644
--- a/include/linux/smb_fs.h
+++ b/include/linux/smb_fs.h
@@ -14,9 +14,12 @@
/*
* ioctl commands
*/
-#define SMB_IOC_GETMOUNTUID _IOR('u', 1, __kernel_uid_t)
+#define SMB_IOC_GETMOUNTUID _IOR('u', 1, __kernel_old_uid_t)
#define SMB_IOC_NEWCONN _IOW('u', 2, struct smb_conn_opt)
+/* __kernel_uid_t can never change, so we have to use __kernel_uid32_t */
+#define SMB_IOC_GETMOUNTUID32 _IOR('u', 3, __kernel_uid32_t)
+
#ifdef __KERNEL__
#include <asm/unaligned.h>
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 27423ec66..2c6771a4f 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -80,7 +80,7 @@ extern volatile int smp_msg_id;
#define smp_threads_ready 1
#define kernel_lock()
#define cpu_logical_map(cpu) 0
-#define smp_call_function(func,info,retry,wait) 0
+#define smp_call_function(func,info,retry,wait) ({ 0; })
#endif
#endif
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index b76cb1434..6c1d060d0 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -53,7 +53,7 @@
#define spin_lock_init(lock) do { } while(0)
#define spin_lock(lock) (void)(lock) /* Not "unused variable". */
-#define spin_trylock(lock) (1)
+#define spin_trylock(lock) ({1; })
#define spin_unlock_wait(lock) do { } while(0)
#define spin_unlock(lock) do { } while(0)
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index 39da8088d..dfa232215 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -2,7 +2,11 @@
#define _LINUX_STDDEF_H
#undef NULL
+#if defined(__cplusplus)
+#define NULL 0
+#else
#define NULL ((void *)0)
+#endif
#undef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
diff --git a/include/linux/string.h b/include/linux/string.h
index 6c9147718..e5002746b 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -2,10 +2,7 @@
#define _LINUX_STRING_H_
#include <linux/types.h> /* for size_t */
-
-#ifndef NULL
-#define NULL ((void *) 0)
-#endif
+#include <linux/stddef.h> /* for NULL */
#ifdef __cplusplus
extern "C" {
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index e2f711135..d0a68c502 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -108,7 +108,9 @@ enum
KERN_MSGMNI=42, /* int: msg queue identifiers */
KERN_SEM=43, /* struct: sysv semaphore limits */
KERN_SPARC_STOP_A=44, /* int: Sparc Stop-A enable */
- KERN_SHMMNI=45 /* int: shm array identifiers */
+ KERN_SHMMNI=45, /* int: shm array identifiers */
+ KERN_OVERFLOWUID=46, /* int: overflow UID */
+ KERN_OVERFLOWGID=47 /* int: overflow GID */
};
@@ -472,7 +474,7 @@ enum {
NET_DECNET_CONF_DEV_T1 = 2,
NET_DECNET_CONF_DEV_T2 = 3,
NET_DECNET_CONF_DEV_T3 = 4,
- NET_DECNET_CONF_DEV_COST = 5,
+ NET_DECNET_CONF_DEV_FORWARDING = 5,
NET_DECNET_CONF_DEV_BLKSIZE = 6,
NET_DECNET_CONF_DEV_STATE = 7
};
@@ -491,7 +493,9 @@ enum
FS_MAXFILE=7, /* int:maximum number of filedescriptors that can be allocated */
FS_DENTRY=8,
FS_NRSUPER=9, /* int:current number of allocated super_blocks */
- FS_MAXSUPER=10 /* int:maximum number of super_blocks that can be allocated */
+ FS_MAXSUPER=10, /* int:maximum number of super_blocks that can be allocated */
+ FS_OVERFLOWUID=11, /* int: overflow UID */
+ FS_OVERFLOWGID=12 /* int: overflow GID */
};
/* CTL_DEBUG names: */
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 39ebb0391..df7b3fe7c 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -350,6 +350,8 @@ extern int rs_init(void);
extern int lp_init(void);
extern int pty_init(void);
extern void tty_init(void);
+extern int mxser_init(void);
+extern int moxa_init(void);
extern int ip2_init(void);
extern int pcxe_init(void);
extern int pc_init(void);
diff --git a/include/linux/types.h b/include/linux/types.h
index a53a4ccc1..196c5f4e0 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_TYPES_H
#define _LINUX_TYPES_H
+#include <linux/config.h>
#include <linux/posix_types.h>
#include <asm/types.h>
@@ -13,12 +14,30 @@ typedef __kernel_mode_t mode_t;
typedef __kernel_nlink_t nlink_t;
typedef __kernel_off_t off_t;
typedef __kernel_pid_t pid_t;
-typedef __kernel_uid_t uid_t;
-typedef __kernel_gid_t gid_t;
typedef __kernel_daddr_t daddr_t;
typedef __kernel_key_t key_t;
typedef __kernel_suseconds_t suseconds_t;
+#ifdef __KERNEL__
+typedef __kernel_uid32_t uid_t;
+typedef __kernel_gid32_t gid_t;
+typedef __kernel_uid16_t uid16_t;
+typedef __kernel_gid16_t gid16_t;
+
+#ifdef CONFIG_UID16
+/* This is defined by include/asm-{arch}/posix_types.h */
+typedef __kernel_old_uid_t old_uid_t;
+typedef __kernel_old_gid_t old_gid_t;
+#endif /* CONFIG_UID16 */
+
+/* libc5 includes this file to define uid_t, thus uid_t can never change
+ * when it is included by non-kernel code
+ */
+#else
+typedef __kernel_uid_t uid_t;
+typedef __kernel_gid_t gid_t;
+#endif /* __KERNEL__ */
+
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __kernel_loff_t loff_t;
#endif
diff --git a/include/linux/ufs_fs_i.h b/include/linux/ufs_fs_i.h
index df4c75755..7dd979114 100644
--- a/include/linux/ufs_fs_i.h
+++ b/include/linux/ufs_fs_i.h
@@ -22,8 +22,8 @@ struct ufs_inode_info {
__u32 i_flags;
__u32 i_gen;
__u32 i_shadow;
- __u32 i_uid;
- __u32 i_gid;
+ __u32 i_unused1;
+ __u32 i_unused2;
__u32 i_oeftflag;
__u16 i_osync;
__u32 i_lastfrag;
diff --git a/include/linux/umsdos_fs.h b/include/linux/umsdos_fs.h
index d4a675e78..56ebe78aa 100644
--- a/include/linux/umsdos_fs.h
+++ b/include/linux/umsdos_fs.h
@@ -65,8 +65,8 @@ struct umsdos_dirent {
unsigned char name_len; /* if == 0, then this entry is not used */
unsigned char flags; /* UMSDOS_xxxx */
unsigned short nlink; /* How many hard links point to this entry */
- uid_t uid; /* Owner user id */
- gid_t gid; /* Group id */
+ __kernel_uid_t uid; /* Owner user id */
+ __kernel_gid_t gid; /* Group id */
time_t atime; /* Access time */
time_t mtime; /* Last modification time */
time_t ctime; /* Creation time */
@@ -145,8 +145,8 @@ struct umsdos_ioctl {
ino_t st_ino;
umode_t st_mode;
nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
+ __kernel_uid_t st_uid;
+ __kernel_gid_t st_gid;
dev_t st_rdev;
unsigned short __pad2;
off_t st_size;
@@ -158,8 +158,8 @@ struct umsdos_ioctl {
unsigned long __unused2;
time_t st_ctime;
unsigned long __unused3;
- unsigned long __unused4;
- unsigned long __unused5;
+ uid_t st_uid32;
+ gid_t st_gid32;
} stat;
char version, release;
};
diff --git a/include/linux/usbdev_fs_i.h b/include/linux/usbdev_fs_i.h
new file mode 100644
index 000000000..13bfad540
--- /dev/null
+++ b/include/linux/usbdev_fs_i.h
@@ -0,0 +1,11 @@
+struct usb_device;
+struct usb_bus;
+
+struct usbdev_inode_info {
+ struct list_head dlist;
+ struct list_head slist;
+ union {
+ struct usb_device *dev;
+ struct usb_bus *bus;
+ } p;
+};
diff --git a/include/linux/usbdev_fs_sb.h b/include/linux/usbdev_fs_sb.h
new file mode 100644
index 000000000..7e161efd8
--- /dev/null
+++ b/include/linux/usbdev_fs_sb.h
@@ -0,0 +1,10 @@
+struct usbdev_sb_info {
+ struct list_head slist;
+ struct list_head ilist;
+ uid_t devuid;
+ gid_t devgid;
+ umode_t devmode;
+ uid_t busuid;
+ gid_t busgid;
+ umode_t busmode;
+};
diff --git a/include/net/dn.h b/include/net/dn.h
index dde6da176..f8d48def6 100644
--- a/include/net/dn.h
+++ b/include/net/dn.h
@@ -120,7 +120,6 @@ struct dn_scp /* Session Control Port */
/*
* src,dst : Source and Destination DECnet addresses
- * neigh: Address from which we've just got this skb.
* hops : Number of hops through the network
* dst_port, src_port : NSP port numbers
* services, info : Useful data extracted from conninit messages
@@ -134,13 +133,12 @@ struct dn_scp /* Session Control Port */
*
* As a general policy, this structure keeps all addresses in network
* byte order, and all else in host byte order. Thus dst, src, dst_port
- * src_port and neigh are in network order. All else is in host order.
+ * and src_port are in network order. All else is in host order.
*
*/
struct dn_skb_cb {
unsigned short dst;
unsigned short src;
- unsigned short neigh;
unsigned short hops;
unsigned short dst_port;
unsigned short src_port;
@@ -184,7 +182,7 @@ extern struct sock *dn_sklist_find_listener(struct sockaddr_dn *addr);
extern struct sock *dn_find_by_skb(struct sk_buff *skb);
#define DN_ASCBUF_LEN 7
extern char *dn_addr2asc(dn_address, char *);
-extern void dn_destroy_sock(struct sock *sk);
+extern int dn_destroy_timer(struct sock *sk);
extern int dn_sockaddr2username(struct sockaddr_dn *addr, unsigned char *buf, unsigned char type);
extern int dn_username2sockaddr(unsigned char *data, int len, struct sockaddr_dn *addr, unsigned char *type);
@@ -196,7 +194,6 @@ extern void dn_stop_fast_timer(struct sock *sk);
extern dn_address decnet_address;
extern unsigned char decnet_ether_address[6];
-extern int decnet_node_type;
extern int decnet_debug_level;
extern int decnet_time_wait;
extern int decnet_dn_count;
diff --git a/include/net/dn_dev.h b/include/net/dn_dev.h
index aae14d087..b042b8248 100644
--- a/include/net/dn_dev.h
+++ b/include/net/dn_dev.h
@@ -45,10 +45,11 @@ struct dn_ifaddr {
* device will come up. In the dn_dev structure, it is the actual
* state.
*
- * The cost field is used in the routing algorithm.
+ * Things have changed here. I've killed timer1 since its a user space
+ * issue for a user space routing deamon to sort out. The kernel does
+ * not need to be bothered with it.
*
* Timers:
- * t1 - Routing timer, send routing messages when it expires
* t2 - Rate limit timer, min time between routing and hello messages
* t3 - Hello timer, send hello messages when it expires
*
@@ -56,30 +57,27 @@ struct dn_ifaddr {
* up() - Called to initialize device, return value can veto use of
* device with DECnet.
* down() - Called to turn device off when it goes down
- * timer1() - Called when timer 1 goes off
* timer3() - Called when timer 3 goes off
*
* sysctl - Hook for sysctl things
*
*/
struct dn_dev_parms {
- int type; /* ARPHRD_xxx */
- int mode; /* Broadcast, Unicast, Mulitpoint */
+ int type; /* ARPHRD_xxx */
+ int mode; /* Broadcast, Unicast, Mulitpoint */
#define DN_DEV_BCAST 1
#define DN_DEV_UCAST 2
#define DN_DEV_MPOINT 4
- int state; /* Initial state */
- int cost; /* Default cost of device */
- unsigned short blksize; /* Block Size */
- unsigned long t1; /* Default value of t1 */
- unsigned long t2; /* Default value of t2 */
- unsigned long t3; /* Default value of t3 */
- int priority; /* Priority to be a router */
- char *name; /* Name for sysctl */
- int ctl_name; /* Index for sysctl */
+ int state; /* Initial state */
+ int forwarding; /* 0=EndNode, 1=L1Router, 2=L2Router */
+ unsigned short blksize; /* Block Size */
+ unsigned long t2; /* Default value of t2 */
+ unsigned long t3; /* Default value of t3 */
+ int priority; /* Priority to be a router */
+ char *name; /* Name for sysctl */
+ int ctl_name; /* Index for sysctl */
int (*up)(struct net_device *);
void (*down)(struct net_device *);
- void (*timer1)(struct net_device *);
void (*timer3)(struct net_device *);
void *sysctl;
};
@@ -91,7 +89,7 @@ struct dn_dev {
struct dn_dev_parms parms;
char use_long;
struct timer_list timer;
- unsigned long t3, t1;
+ unsigned long t3;
struct neigh_parms *neigh_parms;
unsigned char addr[ETH_ALEN];
struct neighbour *router; /* Default router on circuit */
@@ -124,33 +122,34 @@ struct dn_long_packet
/*------------------------- DRP - Routing messages ---------------------*/
- struct endnode_hello_message
- {
- unsigned char msgflg __attribute__((packed));
- unsigned char tiver[3] __attribute__((packed));
- unsigned char id[6] __attribute__((packed));
- unsigned char iinfo __attribute__((packed));
- unsigned short blksize __attribute__((packed));
- unsigned char area __attribute__((packed));
- unsigned char seed[8] __attribute__((packed));
- unsigned char neighbor[6] __attribute__((packed));
- unsigned short timer __attribute__((packed));
- unsigned char mpd __attribute__((packed));
- unsigned char datalen __attribute__((packed));
- unsigned char data[2] __attribute__((packed));
- };
- struct rtnode_hello_message
- {
- unsigned char msgflg __attribute__((packed));
- unsigned char tiver[3] __attribute__((packed));
- unsigned char id[6] __attribute__((packed));
- unsigned char iinfo __attribute__((packed));
- unsigned short blksize __attribute__((packed));
- unsigned char priority __attribute__((packed));
- unsigned char area __attribute__((packed));
- unsigned short timer __attribute__((packed));
- unsigned char mpd __attribute__((packed));
- };
+struct endnode_hello_message
+{
+ unsigned char msgflg __attribute__((packed));
+ unsigned char tiver[3] __attribute__((packed));
+ unsigned char id[6] __attribute__((packed));
+ unsigned char iinfo __attribute__((packed));
+ unsigned short blksize __attribute__((packed));
+ unsigned char area __attribute__((packed));
+ unsigned char seed[8] __attribute__((packed));
+ unsigned char neighbor[6] __attribute__((packed));
+ unsigned short timer __attribute__((packed));
+ unsigned char mpd __attribute__((packed));
+ unsigned char datalen __attribute__((packed));
+ unsigned char data[2] __attribute__((packed));
+};
+
+struct rtnode_hello_message
+{
+ unsigned char msgflg __attribute__((packed));
+ unsigned char tiver[3] __attribute__((packed));
+ unsigned char id[6] __attribute__((packed));
+ unsigned char iinfo __attribute__((packed));
+ unsigned short blksize __attribute__((packed));
+ unsigned char priority __attribute__((packed));
+ unsigned char area __attribute__((packed));
+ unsigned short timer __attribute__((packed));
+ unsigned char mpd __attribute__((packed));
+};
extern void dn_dev_init(void);
diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
index 360f2eba3..0bd6357cb 100644
--- a/include/net/dn_fib.h
+++ b/include/net/dn_fib.h
@@ -5,81 +5,203 @@
#ifdef CONFIG_DECNET_ROUTER
+#include <linux/rtnetlink.h>
+
+struct dn_kern_rta
+{
+ void *rta_dst;
+ void *rta_src;
+ int *rta_iif;
+ int *rta_oif;
+ void *rta_gw;
+ u32 *rta_priority;
+ void *rta_prefsrc;
+ struct rtattr *rta_mx;
+ struct rtattr *rta_mp;
+ unsigned char *rta_protoinfo;
+ unsigned char *rta_flow;
+ struct rta_cacheinfo *rta_ci;
+};
+
+struct dn_fib_key {
+ dn_address src;
+ dn_address dst;
+ int iif;
+ int oif;
+ u32 fwmark;
+ unsigned char scope;
+};
struct dn_fib_res {
- dn_address res_addr;
- dn_address res_mask;
- int res_ifindex;
- int res_proto;
- int res_cost;
- int res_type;
- struct dn_fib_node *res_fn;
- struct dn_fib_action *res_fa;
+ struct dn_fib_rule *r;
+ struct dn_fib_info *fi;
+ unsigned char prefixlen;
+ unsigned char nh_sel;
+ unsigned char type;
+ unsigned char scope;
};
-struct dn_fib_action {
- struct dn_fib_action *fa_next;
- dn_address fa_key;
- dn_address fa_mask;
- int fa_ifindex;
- int fa_proto;
- int fa_cost;
- int fa_type;
- union {
- struct neighbour *fau_neigh; /* Normal route */
- int fau_error; /* Reject */
- int fau_table; /* Throw */
- } fa_u;
-#define fa_neigh fa_u.fau_neigh
-#define fa_error fa_u.fau_error
-#define fa_table fa_u.fau_table
+struct dn_fib_nh {
+ struct net_device *nh_dev;
+ unsigned nh_flags;
+ unsigned char nh_scope;
+ int nh_weight;
+ int nh_power;
+ int nh_oif;
+ u32 nh_gw;
};
-struct dn_fib_node {
- struct dn_fib_node *fn_up;
- dn_address fn_cmpmask;
- dn_address fn_key;
- int fn_shift;
- struct dn_fib_action *fn_action;
- struct dn_fib_node *fn_children[2];
+struct dn_fib_info {
+ struct dn_fib_info *fib_next;
+ struct dn_fib_info *fib_prev;
+ int fib_treeref;
+ atomic_t fib_clntref;
+ int fib_dead;
+ unsigned fib_flags;
+ int fib_protocol;
+ dn_address fib_prefsrc;
+ u32 fib_priority;
+ int fib_nhs;
+ int fib_power;
+ struct dn_fib_nh fib_nh[0];
+#define fib_dev fib_nh[0].nh_dev
};
-#define DN_FIB_NEXT(fibnode, key) ((fibnode)->fn_children[((key) ^ (fibnode)->fn_cmpmask) >> (fibnode)->fn_shift])
-struct dn_fib_walker_t;
+#define DN_FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel])
+#define DN_FIB_RES_RESET(res) ((res).nh_sel = 0)
+#define DN_FIB_RES_GW(res) (DN_FIB_RES_NH(res).nh_gw)
+#define DN_FIB_RES_DEV(res) (DN_FIB_RES_NH(res).nh_dev)
+#define DN_FIB_RES_OIF(res) (DN_FIB_RES_NH(res).nh_oif)
+
+typedef struct {
+ u16 datum;
+} dn_fib_key_t;
+
+typedef struct {
+ u16 datum;
+} dn_fib_hash_t;
+
+typedef struct {
+ u16 datum;
+} dn_fib_idx_t;
+
+struct dn_fib_node {
+ struct dn_fib_node *fn_next;
+ struct dn_fib_info *fn_info;
+#define DN_FIB_INFO(f) ((f)->fn_info)
+ dn_fib_key_t fn_key;
+ u8 fn_type;
+ u8 fn_scope;
+ u8 fn_state;
+};
+
struct dn_fib_table {
int n;
- unsigned long count;
- struct dn_fib_node *root;
- int (*insert)(struct dn_fib_table *t, struct dn_fib_action *fa);
- int (*delete)(struct dn_fib_table *t, struct dn_fib_action *fa);
- int (*lookup)(struct dn_fib_table *t, struct dn_fib_res *res);
- int (*walk)(struct dn_fib_walker_t *fwt);
+ int (*insert)(struct dn_fib_table *t, struct rtmsg *r,
+ struct dn_kern_rta *rta, struct nlmsghdr *n,
+ struct netlink_skb_parms *req);
+ int (*delete)(struct dn_fib_table *t, struct rtmsg *r,
+ struct dn_kern_rta *rta, struct nlmsghdr *n,
+ struct netlink_skb_parms *req);
+ int (*lookup)(struct dn_fib_table *t, const struct dn_fib_key *key,
+ struct dn_fib_res *res);
+ int (*flush)(struct dn_fib_table *t);
+#ifdef CONFIG_PROC_FS
+ int (*get_info)(struct dn_fib_table *table, char *buf,
+ int first, int count);
+#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_RTNETLINK
int (*dump)(struct dn_fib_table *t, struct sk_buff *skb, struct netlink_callback *cb);
#endif /* CONFIG_RTNETLINK */
-};
-struct dn_fib_walker_t {
- struct dn_fib_table *table;
- void *arg;
- int (*fxn)(struct dn_fib_walker_t *fwt, struct dn_fib_node *n);
+ unsigned char data[0];
};
+
+/*
+ * dn_fib.c
+ */
extern void dn_fib_init(void);
extern void dn_fib_cleanup(void);
extern int dn_fib_rt_message(struct sk_buff *skb);
-extern int dn_fib_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
-extern int dn_fib_resolve(struct dn_fib_res *res);
+extern int dn_fib_ioctl(struct socket *sock, unsigned int cmd,
+ unsigned long arg);
+extern struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r,
+ struct dn_kern_rta *rta,
+ const struct nlmsghdr *nlh, int *errp);
+extern int dn_fib_semantic_match(int type, struct dn_fib_info *fi,
+ const struct dn_fib_key *key, struct dn_fib_res *res);
+extern void dn_fib_release_info(struct dn_fib_info *fi);
+extern u16 dn_fib_get_attr16(struct rtattr *attr, int attrlen, int type);
+extern void dn_fib_flush(void);
+extern void dn_fib_select_multipath(const struct dn_fib_key *key,
+ struct dn_fib_res *res);
+extern int dn_fib_sync_down(dn_address local, struct net_device *dev,
+ int force);
+extern int dn_fib_sync_up(struct net_device *dev);
+
+/*
+ * dn_tables.c
+ */
+extern struct dn_fib_table *dn_fib_get_table(int n, int creat);
+extern struct dn_fib_table *dn_fib_empty_table(void);
+extern void dn_fib_table_init(void);
+extern void dn_fib_table_cleanup(void);
+/*
+ * dn_rules.c
+ */
+extern void dn_fib_rules_init(void);
+extern void dn_fib_rules_cleanup(void);
+extern void dn_fib_rule_put(struct dn_fib_rule *);
+extern int dn_fib_lookup(struct dn_fib_key *key, struct dn_fib_res *res);
+
+/*
+ * rtnetlink interface
+ */
#ifdef CONFIG_RTNETLINK
extern int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
extern int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
extern int dn_fib_dump(struct sk_buff *skb, struct netlink_callback *cb);
+
+extern int dn_fib_rtm_delrule(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
+extern int dn_fib_rtm_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
+extern int dn_fib_dump_rules(struct sk_buff *skb, struct netlink_callback *cb);
#endif /* CONFIG_RTNETLINK */
+
+#define DN_NUM_TABLES 255
+#define DN_MIN_TABLE 1
+#define DN_DEFAULT_TABLE 1
+#define DN_L1_TABLE 1
+#define DN_L2_TABLE 2
+
+extern void dn_fib_free_info(struct dn_fib_info *fi);
+
+static __inline__ void dn_fib_info_put(struct dn_fib_info *fi)
+{
+ if (atomic_dec_and_test(&fi->fib_clntref))
+ dn_fib_free_info(fi);
+}
+
+static __inline__ void dn_fib_res_put(struct dn_fib_res *res)
+{
+ if (res->fi)
+ dn_fib_info_put(res->fi);
+ if (res->r)
+ dn_fib_rule_put(res->r);
+}
+
+static __inline__ u16 dnet_make_mask(int n)
+{
+ if (n)
+ return htons(~((1<<(16-n))-1));
+ return 0;
+}
+
#endif /* CONFIG_DECNET_ROUTER */
#endif /* _NET_DN_FIB_H */
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h
index d8cef8c06..498ea16fd 100644
--- a/include/net/dn_nsp.h
+++ b/include/net/dn_nsp.h
@@ -19,8 +19,11 @@ extern void dn_nsp_send_data_ack(struct sock *sk);
extern void dn_nsp_send_oth_ack(struct sock *sk);
extern void dn_nsp_delayed_ack(struct sock *sk);
extern void dn_send_conn_ack(struct sock *sk);
-extern void dn_send_conn_conf(struct sock *sk);
-extern void dn_send_disc(struct sock *sk, unsigned char type, unsigned short reason);
+extern void dn_send_conn_conf(struct sock *sk, int gfp);
+extern void dn_nsp_send_disc(struct sock *sk, unsigned char type,
+ unsigned short reason, int gfp);
+extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type,
+ unsigned short reason);
extern void dn_nsp_send_lnk(struct sock *sk, unsigned short flags);
extern void dn_nsp_send_conninit(struct sock *sk, unsigned char flags);
@@ -49,88 +52,79 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, int *size, int noblock
/* Data Messages (data segment/interrupt/link service) */
- struct nsp_data_seg_msg
- {
- unsigned char msgflg __attribute__((packed));
- unsigned short dstaddr __attribute__((packed));
- unsigned short srcaddr __attribute__((packed));
- };
-
- struct nsp_data_opt_msg
- {
- unsigned short acknum __attribute__((packed));
- unsigned short segnum __attribute__((packed));
- unsigned short lsflgs __attribute__((packed));
- };
-
- struct nsp_data_opt_msg1
- {
- unsigned short acknum __attribute__((packed));
- unsigned short segnum __attribute__((packed));
- };
-
-/* Acknowledgment Messages */
-/*-------------------------*/
-
-/* Acknowledgment Messages (data/other data) */
-
- struct nsp_data_ack_msg
- {
- unsigned char msgflg __attribute__((packed));
- unsigned short dstaddr __attribute__((packed));
- unsigned short srcaddr __attribute__((packed));
- unsigned short acknum __attribute__((packed));
- };
+struct nsp_data_seg_msg
+{
+ unsigned char msgflg __attribute__((packed));
+ unsigned short dstaddr __attribute__((packed));
+ unsigned short srcaddr __attribute__((packed));
+};
-/* Connect Acknowledgment Message */
+struct nsp_data_opt_msg
+{
+ unsigned short acknum __attribute__((packed));
+ unsigned short segnum __attribute__((packed));
+ unsigned short lsflgs __attribute__((packed));
+};
+
+struct nsp_data_opt_msg1
+{
+ unsigned short acknum __attribute__((packed));
+ unsigned short segnum __attribute__((packed));
+};
- struct nsp_conn_ack_msg
- {
- unsigned char msgflg __attribute__((packed));
- unsigned short dstaddr __attribute__((packed));
- };
-/* Control Messages */
-/*------------------*/
+/* Acknowledgment Message (data/other data) */
+struct nsp_data_ack_msg
+{
+ unsigned char msgflg __attribute__((packed));
+ unsigned short dstaddr __attribute__((packed));
+ unsigned short srcaddr __attribute__((packed));
+ unsigned short acknum __attribute__((packed));
+};
+
+/* Connect Acknowledgment Message */
+struct nsp_conn_ack_msg
+{
+ unsigned char msgflg __attribute__((packed));
+ unsigned short dstaddr __attribute__((packed));
+};
-/* Connect Initiate/Retransmit Initiate/Connect Confirm */
- struct nsp_conn_init_msg
- {
- unsigned char msgflg __attribute__((packed));
-#define NSP_CI 0x18 /* Connect Initiate */
-#define NSP_RCI 0x68 /* Retrans. Conn Init */
- unsigned short dstaddr __attribute__((packed));
- unsigned short srcaddr __attribute__((packed));
- unsigned char services __attribute__((packed));
-#define NSP_FC_NONE 0x00 /* Flow Control None */
-#define NSP_FC_SRC 0x04 /* Seg Req. Count */
-#define NSP_FC_SCMC 0x08 /* Sess. Control Mess */
- unsigned char info __attribute__((packed));
- unsigned short segsize __attribute__((packed));
- };
+/* Connect Initiate/Retransmit Initiate/Connect Confirm */
+struct nsp_conn_init_msg
+{
+ unsigned char msgflg __attribute__((packed));
+#define NSP_CI 0x18 /* Connect Initiate */
+#define NSP_RCI 0x68 /* Retrans. Conn Init */
+ unsigned short dstaddr __attribute__((packed));
+ unsigned short srcaddr __attribute__((packed));
+ unsigned char services __attribute__((packed));
+#define NSP_FC_NONE 0x00 /* Flow Control None */
+#define NSP_FC_SRC 0x04 /* Seg Req. Count */
+#define NSP_FC_SCMC 0x08 /* Sess. Control Mess */
+ unsigned char info __attribute__((packed));
+ unsigned short segsize __attribute__((packed));
+};
/* Disconnect Initiate/Disconnect Confirm */
+struct nsp_disconn_init_msg
+{
+ unsigned char msgflg __attribute__((packed));
+ unsigned short dstaddr __attribute__((packed));
+ unsigned short srcaddr __attribute__((packed));
+ unsigned short reason __attribute__((packed));
+};
+
- struct nsp_disconn_init_msg
- {
- unsigned char msgflg __attribute__((packed));
- unsigned short dstaddr __attribute__((packed));
- unsigned short srcaddr __attribute__((packed));
- unsigned short reason __attribute__((packed));
- };
-
-
-/*------------------------- SCP - messages ------------------------------*/
-
- struct srcobj_fmt
- {
- char format __attribute__((packed));
- unsigned char task __attribute__((packed));
- unsigned short grpcode __attribute__((packed));
- unsigned short usrcode __attribute__((packed));
- char dlen __attribute__((packed));
- };
+
+struct srcobj_fmt
+{
+ char format __attribute__((packed));
+ unsigned char task __attribute__((packed));
+ unsigned short grpcode __attribute__((packed));
+ unsigned short usrcode __attribute__((packed));
+ char dlen __attribute__((packed));
+};
/*
* A collection of functions for manipulating the sequence
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index 793d59072..7c7d3dd0e 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -19,6 +19,8 @@ extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri);
extern int dn_route_output(struct dst_entry **pprt, dn_address dst, dn_address src, int flags);
extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb);
extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
+extern void dn_rt_cache_flush(int delay);
+
/* Masks for flags field */
#define DN_RT_F_PID 0x07 /* Mask for packet type */
#define DN_RT_F_PF 0x80 /* Padding Follows */
@@ -56,16 +58,31 @@ extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *ar
#define DN_RT_INFO_NOML 0x20 /* No Multicast traffic accepted */
#define DN_RT_INFO_BLKR 0x40 /* Blocking Requested */
-
+/*
+ * The key structure is what we used to look up the route.
+ * The rt_saddr & rt_daddr entries are the same as key.saddr & key.daddr
+ * except for local input routes, where the rt_saddr = key.daddr and
+ * rt_daddr = key.saddr to allow the route to be used for returning
+ * packets to the originating host.
+ */
struct dn_route {
union {
struct dst_entry dst;
struct dn_route *rt_next;
} u;
+ struct {
+ unsigned short saddr;
+ unsigned short daddr;
+ int iif;
+ int oif;
+ u32 fwmark;
+ } key;
unsigned short rt_saddr;
unsigned short rt_daddr;
- int rt_iif;
- int rt_oif;
+ unsigned char rt_type;
+ unsigned char rt_scope;
+ unsigned char rt_protocol;
+ unsigned char rt_table;
};
extern void dn_route_init(void);
diff --git a/include/net/icmp.h b/include/net/icmp.h
index 2d5faa68d..e7ff46a05 100644
--- a/include/net/icmp.h
+++ b/include/net/icmp.h
@@ -25,7 +25,10 @@
#include <net/protocol.h>
extern struct icmp_err icmp_err_convert[];
-extern struct icmp_mib icmp_statistics;
+extern struct icmp_mib icmp_statistics[NR_CPUS*2];
+#define ICMP_INC_STATS(field) SNMP_INC_STATS(icmp_statistics, field)
+#define ICMP_INC_STATS_BH(field) SNMP_INC_STATS_BH(icmp_statistics, field)
+#define ICMP_INC_STATS_USER(field) SNMP_INC_STATS_USER(icmp_statistics, field)
extern void icmp_send(struct sk_buff *skb_in, int type, int code,
unsigned long info);
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index ae4134d76..d816d4fac 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -119,5 +119,59 @@ extern __inline__ void ipv6_eth_mc_map(struct in6_addr *addr, char *buf)
memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32));
}
+
+extern __inline__ void ipv6_tr_mc_map(struct in6_addr *addr, char *buf)
+{
+ /* All nodes FF01::1, FF02::1, FF02::1:FFxx:xxxx */
+
+ if (((addr->s6_addr[0] == 0xFF) &&
+ ((addr->s6_addr[1] == 0x01) || (addr->s6_addr[1] == 0x02)) &&
+ (addr->s6_addr16[1] == 0) &&
+ (addr->s6_addr32[1] == 0) &&
+ (addr->s6_addr32[2] == 0) &&
+ (addr->s6_addr16[6] == 0) &&
+ (addr->s6_addr[15] == 1)) ||
+ ((addr->s6_addr[0] == 0xFF) &&
+ (addr->s6_addr[1] == 0x02) &&
+ (addr->s6_addr16[1] == 0) &&
+ (addr->s6_addr32[1] == 0) &&
+ (addr->s6_addr16[4] == 0) &&
+ (addr->s6_addr[10] == 0) &&
+ (addr->s6_addr[11] == 1) &&
+ (addr->s6_addr[12] == 0xff)))
+ {
+ buf[0]=0xC0;
+ buf[1]=0x00;
+ buf[2]=0x01;
+ buf[3]=0x00;
+ buf[4]=0x00;
+ buf[5]=0x00;
+ /* All routers FF0x::2 */
+ } else if ((addr->s6_addr[0] ==0xff) &&
+ ((addr->s6_addr[1] & 0xF0) == 0) &&
+ (addr->s6_addr16[1] == 0) &&
+ (addr->s6_addr32[1] == 0) &&
+ (addr->s6_addr32[2] == 0) &&
+ (addr->s6_addr16[6] == 0) &&
+ (addr->s6_addr[15] == 2))
+ {
+ buf[0]=0xC0;
+ buf[1]=0x00;
+ buf[2]=0x02;
+ buf[3]=0x00;
+ buf[4]=0x00;
+ buf[5]=0x00;
+ } else {
+ unsigned char i ;
+
+ i = addr->s6_addr[15] & 7 ;
+ buf[0]=0xC0;
+ buf[1]=0x00;
+ buf[2]=0x00;
+ buf[3]=0x01 << i ;
+ buf[4]=0x00;
+ buf[5]=0x00;
+ }
+}
#endif
#endif
diff --git a/include/net/ip.h b/include/net/ip.h
index 078c958b2..eeb25ffea 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -147,10 +147,17 @@ struct ipv4_config
};
extern struct ipv4_config ipv4_config;
-extern struct ip_mib ip_statistics;
-extern struct linux_mib net_statistics;
+extern struct ip_mib ip_statistics[NR_CPUS*2];
+#define IP_INC_STATS(field) SNMP_INC_STATS(ip_statistics, field)
+#define IP_INC_STATS_BH(field) SNMP_INC_STATS_BH(ip_statistics, field)
+#define IP_INC_STATS_USER(field) SNMP_INC_STATS_USER(ip_statistics, field)
+extern struct linux_mib net_statistics[NR_CPUS*2];
+#define NET_INC_STATS(field) SNMP_INC_STATS(net_statistics, field)
+#define NET_INC_STATS_BH(field) SNMP_INC_STATS_BH(net_statistics, field)
+#define NET_INC_STATS_USER(field) SNMP_INC_STATS_USER(net_statistics, field)
extern int sysctl_local_port_range[2];
+extern int sysctl_ip_default_ttl;
#ifdef CONFIG_INET
extern __inline__ int ip_send(struct sk_buff *skb)
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index d66b14066..fe8865a3b 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -4,7 +4,7 @@
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
*
- * $Id: ipv6.h,v 1.18 1999/08/20 11:00:53 davem Exp $
+ * $Id: ipv6.h,v 1.19 2000/01/09 02:19:26 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -86,9 +86,18 @@ struct frag_hdr {
#include <net/sock.h>
-extern struct ipv6_mib ipv6_statistics;
-extern struct icmpv6_mib icmpv6_statistics;
-extern struct udp_mib udp_stats_in6;
+extern struct ipv6_mib ipv6_statistics[NR_CPUS*2];
+#define IP6_INC_STATS(field) SNMP_INC_STATS(ipv6_statistics, field)
+#define IP6_INC_STATS_BH(field) SNMP_INC_STATS_BH(ipv6_statistics, field)
+#define IP6_INC_STATS_USER(field) SNMP_INC_STATS_USER(ipv6_statistics, field)
+extern struct icmpv6_mib icmpv6_statistics[NR_CPUS*2];
+#define ICMP6_INC_STATS(field) SNMP_INC_STATS(icmpv6_statistics, field)
+#define ICMP6_INC_STATS_BH(field) SNMP_INC_STATS_BH(icmpv6_statistics, field)
+#define ICMP6_INC_STATS_USER(field) SNMP_INC_STATS_USER(icmpv6_statistics, field)
+extern struct udp_mib udp_stats_in6[NR_CPUS*2];
+#define UDP6_INC_STATS(field) SNMP_INC_STATS(udp_stats_in6, field)
+#define UDP6_INC_STATS_BH(field) SNMP_INC_STATS_BH(udp_stats_in6, field)
+#define UDP6_INC_STATS_USER(field) SNMP_INC_STATS_USER(udp_stats_in6, field)
extern atomic_t inet6_sock_nr;
struct ip6_ra_chain
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 7307cc76a..b866777a6 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -81,6 +81,7 @@ struct Qdisc
unsigned flags;
#define TCQ_F_BUILTIN 1
#define TCQ_F_THROTTLED 2
+#define TCQ_F_INGRES 4
struct Qdisc_ops *ops;
struct Qdisc *next;
u32 handle;
diff --git a/include/net/snmp.h b/include/net/snmp.h
index cc8354b6c..4469fdcd1 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -27,8 +27,6 @@
struct ip_mib
{
- unsigned long IpForwarding;
- unsigned long IpDefaultTTL;
unsigned long IpInReceives;
unsigned long IpInHdrErrors;
unsigned long IpInAddrErrors;
@@ -46,6 +44,7 @@ struct ip_mib
unsigned long IpFragOKs;
unsigned long IpFragFails;
unsigned long IpFragCreates;
+ unsigned long __pad[32-19];
};
struct ipv6_mib
@@ -72,6 +71,7 @@ struct ipv6_mib
unsigned long Ip6FragCreates;
unsigned long Ip6InMcastPkts;
unsigned long Ip6OutMcastPkts;
+ unsigned long __pad[32-22];
};
struct icmp_mib
@@ -102,6 +102,7 @@ struct icmp_mib
unsigned long IcmpOutTimestampReps;
unsigned long IcmpOutAddrMasks;
unsigned long IcmpOutAddrMaskReps;
+ unsigned long __pad[32-26];
};
struct icmpv6_mib
@@ -139,6 +140,7 @@ struct icmpv6_mib
unsigned long Icmp6OutRedirects;
unsigned long Icmp6OutGroupMembResponses;
unsigned long Icmp6OutGroupMembReductions;
+ unsigned long __pad[32-28];
};
struct tcp_mib
@@ -157,6 +159,7 @@ struct tcp_mib
unsigned long TcpRetransSegs;
unsigned long TcpInErrs;
unsigned long TcpOutRsts;
+ unsigned long __pad[16-14];
};
struct udp_mib
@@ -165,6 +168,7 @@ struct udp_mib
unsigned long UdpNoPorts;
unsigned long UdpInErrors;
unsigned long UdpOutDatagrams;
+ unsigned long __pad[0];
};
struct linux_mib
@@ -178,6 +182,11 @@ struct linux_mib
unsigned long OfoPruned;
unsigned long OutOfWindowIcmps;
unsigned long LockDroppedIcmps;
+ unsigned long __pad[32-9];
};
+
+#define SNMP_INC_STATS(mib, field) ((mib)[2*smp_processor_id()+!in_interrupt()].field++)
+#define SNMP_INC_STATS_BH(mib, field) ((mib)[2*smp_processor_id()].field++)
+#define SNMP_INC_STATS_USER(mib, field) ((mib)[2*smp_processor_id()+1].field++)
#endif
diff --git a/include/net/sock.h b/include/net/sock.h
index ead5fc0c3..5aa0172c2 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -635,9 +635,23 @@ struct proto {
unsigned short max_header;
unsigned long retransmits;
char name[32];
- int inuse, highestinuse;
+
+ struct {
+ int inuse;
+ u8 __pad[SMP_CACHE_BYTES - sizeof(int)];
+ } stats[NR_CPUS];
};
+/* Called with local bh disabled */
+static void __inline__ sock_prot_inc_use(struct proto *prot)
+{
+ prot->stats[smp_processor_id()].inuse++;
+}
+
+static void __inline__ sock_prot_dec_use(struct proto *prot)
+{
+ prot->stats[smp_processor_id()].inuse--;
+}
/* About 10 seconds */
#define SOCK_DESTROY_TIME (10*HZ)
@@ -731,6 +745,7 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk,
extern void *sock_kmalloc(struct sock *sk, int size, int priority);
extern void sock_kfree_s(struct sock *sk, void *mem, int size);
+extern int copy_and_csum_toiovec(struct iovec *iov, struct sk_buff *skb, int hlen);
/*
* Functions to fill in entries in struct proto_ops when a protocol
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 6c73eef3f..ef7da5368 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -488,7 +488,11 @@ extern __inline int between(__u32 seq1, __u32 seq2, __u32 seq3)
extern struct proto tcp_prot;
-extern struct tcp_mib tcp_statistics;
+
+extern struct tcp_mib tcp_statistics[NR_CPUS*2];
+#define TCP_INC_STATS(field) SNMP_INC_STATS(tcp_statistics, field)
+#define TCP_INC_STATS_BH(field) SNMP_INC_STATS_BH(tcp_statistics, field)
+#define TCP_INC_STATS_USER(field) SNMP_INC_STATS_USER(tcp_statistics, field)
extern void tcp_put_port(struct sock *sk);
extern void __tcp_put_port(struct sock *sk);
@@ -980,7 +984,7 @@ static __inline__ void tcp_set_state(struct sock *sk, int state)
switch (state) {
case TCP_ESTABLISHED:
if (oldstate != TCP_ESTABLISHED)
- tcp_statistics.TcpCurrEstab++;
+ TCP_INC_STATS(TcpCurrEstab);
break;
case TCP_CLOSE:
@@ -988,7 +992,7 @@ static __inline__ void tcp_set_state(struct sock *sk, int state)
/* fall through */
default:
if (oldstate==TCP_ESTABLISHED)
- tcp_statistics.TcpCurrEstab--;
+ tcp_statistics[smp_processor_id()*2+!in_interrupt()].TcpCurrEstab--;
}
/* Change state AFTER socket is unhashed to avoid closed
diff --git a/include/net/udp.h b/include/net/udp.h
index e082a4a9b..4f72cabac 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -69,4 +69,9 @@ extern int udp_rcv(struct sk_buff *skb, unsigned short len);
extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
extern int udp_disconnect(struct sock *sk, int flags);
+extern struct udp_mib udp_statistics[NR_CPUS*2];
+#define UDP_INC_STATS(field) SNMP_INC_STATS(udp_statistics, field)
+#define UDP_INC_STATS_BH(field) SNMP_INC_STATS_BH(udp_statistics, field)
+#define UDP_INC_STATS_USER(field) SNMP_INC_STATS_USER(udp_statistics, field)
+
#endif /* _UDP_H */
diff --git a/include/pcmcia/cisreg.h b/include/pcmcia/cisreg.h
index 20373545c..803660503 100644
--- a/include/pcmcia/cisreg.h
+++ b/include/pcmcia/cisreg.h
@@ -1,5 +1,5 @@
/*
- * cisreg.h 1.14 1999/10/25 20:23:17
+ * cisreg.h 1.16 2000/01/16 19:19:14
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -30,7 +30,9 @@
#ifndef _LINUX_CISREG_H
#define _LINUX_CISREG_H
-/* Offsets from ConfigBase for CIS registers */
+/*
+ * Offsets from ConfigBase for CIS registers
+ */
#define CISREG_COR 0x00
#define CISREG_CCSR 0x02
#define CISREG_PRR 0x04
@@ -113,4 +115,21 @@
#define FEMR_PWM_ENA 0x0040
#define FEMR_WKUP_MASK 0x4000
+/*
+ * Indirect Addressing Registers for Zoomed Video: these are addresses
+ * in common memory space
+ */
+#define CISREG_ICTRL0 0x02 /* control registers */
+#define CISREG_ICTRL1 0x03
+#define CISREG_IADDR0 0x04 /* address registers */
+#define CISREG_IADDR1 0x05
+#define CISREG_IADDR2 0x06
+#define CISREG_IADDR3 0x07
+#define CISREG_IDATA0 0x08 /* data registers */
+#define CISREG_IDATA1 0x09
+
+#define ICTRL0_COMMON 0x01
+#define ICTRL0_AUTOINC 0x02
+#define ICTRL0_BYTEGRAN 0x04
+
#endif /* _LINUX_CISREG_H */
diff --git a/include/pcmcia/cistpl.h b/include/pcmcia/cistpl.h
index 00412858e..d53e44646 100644
--- a/include/pcmcia/cistpl.h
+++ b/include/pcmcia/cistpl.h
@@ -1,5 +1,5 @@
/*
- * cistpl.h 1.31 1999/10/25 20:23:17
+ * cistpl.h 1.32 2000/01/11 19:06:50
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -33,10 +33,13 @@
#define CISTPL_NULL 0x00
#define CISTPL_DEVICE 0x01
#define CISTPL_LONGLINK_CB 0x02
+#define CISTPL_INDIRECT 0x03
#define CISTPL_CONFIG_CB 0x04
#define CISTPL_CFTABLE_ENTRY_CB 0x05
#define CISTPL_LONGLINK_MFC 0x06
#define CISTPL_BAR 0x07
+#define CISTPL_PWR_MGMNT 0x08
+#define CISTPL_EXTDEVICE 0x09
#define CISTPL_CHECKSUM 0x10
#define CISTPL_LONGLINK_A 0x11
#define CISTPL_LONGLINK_C 0x12
@@ -67,6 +70,7 @@
#define CISTPL_BATTERY 0x45
/* Layer 3 tuples */
#define CISTPL_ORG 0x46
+#define CISTPL_SPCL 0x90
typedef struct cistpl_longlink_t {
u_int addr;
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index 7a27cb2eb..669de1eac 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -441,7 +441,7 @@ int pcmcia_get_card_services_info(servinfo_t *info);
int pcmcia_get_first_client(client_handle_t *handle, client_req_t *req);
int pcmcia_get_next_client(client_handle_t *handle, client_req_t *req);
int pcmcia_get_window(window_handle_t *handle, int idx, win_req_t *req);
-int pcmcia_get_first_window(client_handle_t *handle, win_req_t *req);
+int pcmcia_get_first_window(window_handle_t *win, win_req_t *req);
int pcmcia_get_next_window(window_handle_t *win, win_req_t *req);
int pcmcia_get_status(client_handle_t handle, cs_status_t *status);
int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
@@ -464,6 +464,7 @@ int pcmcia_eject_card(client_handle_t handle, client_req_t *req);
int pcmcia_insert_card(client_handle_t handle, client_req_t *req);
int pcmcia_set_event_mask(client_handle_t handle, eventmask_t *mask);
int pcmcia_report_error(client_handle_t handle, error_info_t *err);
+struct pci_bus *pcmcia_lookup_bus(client_handle_t handle);
/* rsrc_mgr.c */
int pcmcia_adjust_resource_info(client_handle_t handle, adjust_t *adj);
diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h
index 63f56430e..92feb6322 100644
--- a/include/pcmcia/cs_types.h
+++ b/include/pcmcia/cs_types.h
@@ -1,5 +1,5 @@
/*
- * cs_types.h 1.16 1999/10/25 20:23:17
+ * cs_types.h 1.17 2000/01/18 01:14:36
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -30,7 +30,11 @@
#ifndef _LINUX_CS_TYPES_H
#define _LINUX_CS_TYPES_H
+#ifdef __KERNEL__
#include <linux/types.h>
+#else
+#include <sys/types.h>
+#endif
typedef u_short socket_t;
typedef u_short ioaddr_t;
diff --git a/include/pcmcia/version.h b/include/pcmcia/version.h
index 2a3cd2523..4606b40b3 100644
--- a/include/pcmcia/version.h
+++ b/include/pcmcia/version.h
@@ -1,4 +1,4 @@
-/* version.h 1.76 1999/10/26 18:55:56 (David Hinds) */
+/* version.h 1.81 1999/12/23 21:37:32 (David Hinds) */
-#define CS_RELEASE "3.1.4"
-#define CS_RELEASE_CODE 0x3104
+#define CS_RELEASE "3.1.9"
+#define CS_RELEASE_CODE 0x3109