diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-01-29 01:41:54 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-01-29 01:41:54 +0000 |
commit | f969d69ba9f952e5bdd38278e25e26a3e4a61a70 (patch) | |
tree | b3530d803df59d726afaabebc6626987dee1ca05 /include/asm-ppc | |
parent | a10ce7ef2066b455d69187643ddf2073bfc4db24 (diff) |
Merge with 2.3.27.
Diffstat (limited to 'include/asm-ppc')
-rw-r--r-- | include/asm-ppc/amigaints.h | 136 | ||||
-rw-r--r-- | include/asm-ppc/div64.h | 10 | ||||
-rw-r--r-- | include/asm-ppc/fcntl.h | 30 | ||||
-rw-r--r-- | include/asm-ppc/pgtable.h | 9 | ||||
-rw-r--r-- | include/asm-ppc/processor.h | 10 | ||||
-rw-r--r-- | include/asm-ppc/shmparam.h | 40 | ||||
-rw-r--r-- | include/asm-ppc/system.h | 2 | ||||
-rw-r--r-- | include/asm-ppc/termios.h | 1 |
8 files changed, 181 insertions, 57 deletions
diff --git a/include/asm-ppc/amigaints.h b/include/asm-ppc/amigaints.h index 2de0f46e7..c7a50189e 100644 --- a/include/asm-ppc/amigaints.h +++ b/include/asm-ppc/amigaints.h @@ -1 +1,135 @@ -#include <asm-m68k/amigaints.h> +/* +** amigaints.h -- Amiga Linux interrupt handling structs and prototypes +** +** Copyright 1992 by Greg Harp +** +** This file is subject to the terms and conditions of the GNU General Public +** License. See the file COPYING in the main directory of this archive +** for more details. +** +** Created 10/2/92 by Greg Harp +*/ + +#ifndef _ASMm68k_AMIGAINTS_H_ +#define _ASMm68k_AMIGAINTS_H_ + +/* +** Amiga Interrupt sources. +** +*/ + +#define AUTO_IRQS (8) +#define AMI_STD_IRQS (14) +#define CIA_IRQS (5) +#define AMI_IRQS (32) /* AUTO_IRQS+AMI_STD_IRQS+2*CIA_IRQS */ + +/* vertical blanking interrupt */ +#define IRQ_AMIGA_VERTB 0 + +/* copper interrupt */ +#define IRQ_AMIGA_COPPER 1 + +/* Audio interrupts */ +#define IRQ_AMIGA_AUD0 2 +#define IRQ_AMIGA_AUD1 3 +#define IRQ_AMIGA_AUD2 4 +#define IRQ_AMIGA_AUD3 5 + +/* Blitter done interrupt */ +#define IRQ_AMIGA_BLIT 6 + +/* floppy disk interrupts */ +#define IRQ_AMIGA_DSKSYN 7 +#define IRQ_AMIGA_DSKBLK 8 + +/* builtin serial port interrupts */ +#define IRQ_AMIGA_RBF 9 +#define IRQ_AMIGA_TBE 10 + +/* software interrupts */ +#define IRQ_AMIGA_SOFT 11 + +/* interrupts from external hardware */ +#define IRQ_AMIGA_PORTS 12 +#define IRQ_AMIGA_EXTER 13 + +/* CIA interrupt sources */ +#define IRQ_AMIGA_CIAA 14 +#define IRQ_AMIGA_CIAA_TA 14 +#define IRQ_AMIGA_CIAA_TB 15 +#define IRQ_AMIGA_CIAA_ALRM 16 +#define IRQ_AMIGA_CIAA_SP 17 +#define IRQ_AMIGA_CIAA_FLG 18 +#define IRQ_AMIGA_CIAB 19 +#define IRQ_AMIGA_CIAB_TA 19 +#define IRQ_AMIGA_CIAB_TB 20 +#define IRQ_AMIGA_CIAB_ALRM 21 +#define IRQ_AMIGA_CIAB_SP 22 +#define IRQ_AMIGA_CIAB_FLG 23 + +/* auto-vector interrupts */ +#define IRQ_AMIGA_AUTO 24 +#define IRQ_AMIGA_AUTO_0 24 /* This is just a dummy */ +#define IRQ_AMIGA_AUTO_1 25 +#define IRQ_AMIGA_AUTO_2 26 +#define IRQ_AMIGA_AUTO_3 27 +#define IRQ_AMIGA_AUTO_4 28 +#define IRQ_AMIGA_AUTO_5 29 +#define IRQ_AMIGA_AUTO_6 30 +#define IRQ_AMIGA_AUTO_7 31 + +#define IRQ_FLOPPY IRQ_AMIGA_DSKBLK + +/* INTREQR masks */ +#define IRQ1_MASK 0x0007 /* INTREQR mask for IRQ 1 */ +#define IRQ2_MASK 0x0008 /* INTREQR mask for IRQ 2 */ +#define IRQ3_MASK 0x0070 /* INTREQR mask for IRQ 3 */ +#define IRQ4_MASK 0x0780 /* INTREQR mask for IRQ 4 */ +#define IRQ5_MASK 0x1800 /* INTREQR mask for IRQ 5 */ +#define IRQ6_MASK 0x2000 /* INTREQR mask for IRQ 6 */ +#define IRQ7_MASK 0x4000 /* INTREQR mask for IRQ 7 */ + +#define IF_SETCLR 0x8000 /* set/clr bit */ +#define IF_INTEN 0x4000 /* master interrupt bit in INT* registers */ +#define IF_EXTER 0x2000 /* external level 6 and CIA B interrupt */ +#define IF_DSKSYN 0x1000 /* disk sync interrupt */ +#define IF_RBF 0x0800 /* serial receive buffer full interrupt */ +#define IF_AUD3 0x0400 /* audio channel 3 done interrupt */ +#define IF_AUD2 0x0200 /* audio channel 2 done interrupt */ +#define IF_AUD1 0x0100 /* audio channel 1 done interrupt */ +#define IF_AUD0 0x0080 /* audio channel 0 done interrupt */ +#define IF_BLIT 0x0040 /* blitter done interrupt */ +#define IF_VERTB 0x0020 /* vertical blanking interrupt */ +#define IF_COPER 0x0010 /* copper interrupt */ +#define IF_PORTS 0x0008 /* external level 2 and CIA A interrupt */ +#define IF_SOFT 0x0004 /* software initiated interrupt */ +#define IF_DSKBLK 0x0002 /* diskblock DMA finished */ +#define IF_TBE 0x0001 /* serial transmit buffer empty interrupt */ + +struct irq_server { + unsigned short count, reentrance; +}; + +extern void amiga_do_irq(int irq, struct pt_regs *fp); +extern void amiga_do_irq_list(int irq, struct pt_regs *fp, struct irq_server *server); + +/* CIA interrupt control register bits */ + +#define CIA_ICR_TA 0x01 +#define CIA_ICR_TB 0x02 +#define CIA_ICR_ALRM 0x04 +#define CIA_ICR_SP 0x08 +#define CIA_ICR_FLG 0x10 +#define CIA_ICR_ALL 0x1f +#define CIA_ICR_SETCLR 0x80 + +/* to access the interrupt control registers of CIA's use only +** these functions, they behave exactly like the amiga os routines +*/ + +extern struct ciabase ciaa_base, ciab_base; + +extern unsigned char cia_set_irq(unsigned int irq, int set); +extern unsigned char cia_able_irq(unsigned int irq, int enable); + +#endif /* asm-m68k/amigaints.h */ diff --git a/include/asm-ppc/div64.h b/include/asm-ppc/div64.h new file mode 100644 index 000000000..114e6ab34 --- /dev/null +++ b/include/asm-ppc/div64.h @@ -0,0 +1,10 @@ +#ifndef __PPC_DIV64 +#define __PPC_DIV64 + +#define do_div(n,base) ({ \ +int __res; \ +__res = ((unsigned long) n) % (unsigned) base; \ +n = ((unsigned long) n) / (unsigned) base; \ +__res; }) + +#endif diff --git a/include/asm-ppc/fcntl.h b/include/asm-ppc/fcntl.h index a1f3aa7f7..c1b149d47 100644 --- a/include/asm-ppc/fcntl.h +++ b/include/asm-ppc/fcntl.h @@ -3,21 +3,23 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ -#define O_DIRECTORY 040000 /* must be a directory */ -#define O_NOFOLLOW 0100000 /* don't follow links */ +#define O_SYNC 010000 +#define FASYNC 020000 /* fcntl, for BSD compatibility */ +#define O_DIRECTORY 040000 /* must be a directory */ +#define O_NOFOLLOW 0100000 /* don't follow links */ +#define O_LARGEFILE 0200000 +#define O_DIRECT 0400000 /* direct disk access hint - currently ignored */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get f_flags */ diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 673d74397..c62d78c79 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h @@ -629,9 +629,12 @@ extern void flush_hash_segments(unsigned low_vsid, unsigned high_vsid); extern void flush_hash_page(unsigned context, unsigned long va); -#define SWP_TYPE(entry) (((pte_val(entry)) >> 1) & 0x7f) -#define SWP_OFFSET(entry) ((pte_val(entry)) >> 8) -#define SWP_ENTRY(type,offset) __pte(((type) << 1) | ((offset) << 8)) +/* Encode and de-code a swap entry */ +#define SWP_TYPE(entry) (((entry).val >> 1) & 0x3f) +#define SWP_OFFSET(entry) ((entry).val >> 8) +#define SWP_ENTRY(type,offset) ((swp_entry_t) { (((type) << 1) | ((offset) << 8)) }) +#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) +#define swp_entry_to_pte(x) ((pte_t) { (x).val }) #define module_map vmalloc #define module_unmap vfree diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h index 974f78a47..a78c75b4e 100644 --- a/include/asm-ppc/processor.h +++ b/include/asm-ppc/processor.h @@ -17,6 +17,7 @@ #define MSR_SF (1<<63) #define MSR_ISF (1<<61) #endif /* CONFIG_PPC64 */ +#define MSR_VEC (1<<25) /* Enable AltiVec */ #define MSR_POW (1<<18) /* Enable Power Management */ #define MSR_TGPR (1<<17) /* TLB Update registers in use */ #define MSR_ILE (1<<16) /* Interrupt Little-Endian enable */ @@ -249,6 +250,7 @@ extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); /* Lazy FPU handling on uni-processor */ extern struct task_struct *last_task_used_math; +extern struct task_struct *last_task_used_altivec; /* * this is the minimum allowable io space due to the location @@ -277,6 +279,9 @@ struct thread_struct { double fpr[32]; /* Complete floating point set */ unsigned long fpscr_pad; /* fpr ... fpscr must be contiguous */ unsigned long fpscr; /* Floating point status */ + unsigned long vrf[128]; + unsigned long vscr; + unsigned long vrsave; }; #define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack) @@ -311,6 +316,11 @@ static inline unsigned long thread_saved_pc(struct thread_struct *t) #define release_segments(mm) do { } while (0) #define forget_segments() do { } while (0) +unsigned long get_wchan(struct task_struct *p); + +#define KSTK_EIP(tsk) ((tsk)->thread.regs->nip) +#define KSTK_ESP(tsk) ((tsk)->thread.regs->gpr[1]) + /* * NOTE! The task struct and the stack go together */ diff --git a/include/asm-ppc/shmparam.h b/include/asm-ppc/shmparam.h index 3ece6775b..d6250602a 100644 --- a/include/asm-ppc/shmparam.h +++ b/include/asm-ppc/shmparam.h @@ -1,44 +1,6 @@ #ifndef _PPC_SHMPARAM_H #define _PPC_SHMPARAM_H -/* address range for shared memory attaches if no address passed to shmat() */ -#define SHM_RANGE_START 0x50000000 -#define SHM_RANGE_END 0x60000000 - -/* - * Format of a swap-entry for shared memory pages currently out in - * swap space (see also mm/swap.c). - * - * SWP_TYPE = SHM_SWP_TYPE - * SWP_OFFSET is used as follows: - * - * bits 0..6 : id of shared memory segment page belongs to (SHM_ID) - * bits 7..21: index of page within shared memory segment (SHM_IDX) - * (actually fewer bits get used since SHMMAX is so low) - */ - -/* - * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and - * there is a static array of size SHMMNI. - */ -#define _SHM_ID_BITS 7 -#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1) - -#define SHM_IDX_SHIFT (_SHM_ID_BITS) -#define _SHM_IDX_BITS 15 -#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1) - -/* - * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and - * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS). - */ - -#define SHMMAX 0x2000000 /* max shared seg size (bytes) */ -#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */ -#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */ -#define SHMALL /* max shm system wide (pages) */ \ - (1<<(_SHM_IDX_BITS+_SHM_ID_BITS)) -#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ -#define SHMSEG SHMMNI /* max shared segs per process */ +#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ #endif /* _PPC_SHMPARAM_H */ diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index 2bf822e33..f6b2013ad 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h @@ -61,6 +61,8 @@ extern void read_rtc_time(void); extern void pmac_find_display(void); extern void giveup_fpu(struct task_struct *); extern void enable_kernel_fp(void); +extern void giveup_altivec(struct task_struct *); +extern void load_up_altivec(struct task_struct *); extern void cvt_fd(float *from, double *to, unsigned long *fpscr); extern void cvt_df(double *from, float *to, unsigned long *fpscr); extern int call_rtas(const char *, int, int, unsigned long *, ...); diff --git a/include/asm-ppc/termios.h b/include/asm-ppc/termios.h index a234aff15..e74609c13 100644 --- a/include/asm-ppc/termios.h +++ b/include/asm-ppc/termios.h @@ -185,6 +185,7 @@ struct termio { #define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */ #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ #define N_HDLC 13 /* synchronous HDLC */ +#define N_SYNC_PPP 14 #ifdef __KERNEL__ |