diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-20 22:20:53 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-20 22:20:53 -0800 |
| commit | cf8d19a7d1db0e1656ed6cd1bd07456b836f0e28 (patch) | |
| tree | d7b76bc572d7cf89eda31b8eb55e5681a03cad99 /include | |
| parent | 24fbb9949b3a3e6008981532a49d0774619854a4 (diff) | |
| parent | 682d5feaa0e6404b14de961b15e53b20c41e02db (diff) | |
Merge bk://ldm.bkbits.net/linux-2.5-core
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/msr.h | 1 | ||||
| -rw-r--r-- | include/asm-sparc/system.h | 29 | ||||
| -rw-r--r-- | include/asm-sparc/unistd.h | 6 | ||||
| -rw-r--r-- | include/asm-sparc64/unistd.h | 6 | ||||
| -rw-r--r-- | include/linux/crypto.h | 10 | ||||
| -rw-r--r-- | include/linux/sched.h | 68 |
6 files changed, 27 insertions, 93 deletions
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index 8eefc078d95e..f8819948d629 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h @@ -107,6 +107,7 @@ #define MSR_K7_PERFCTR2 0xC0010006 #define MSR_K7_PERFCTR3 0xC0010007 #define MSR_K7_HWCR 0xC0010015 +#define MSR_K7_CLK_CTL 0xC001001b #define MSR_K7_FID_VID_CTL 0xC0010041 #define MSR_K7_VID_STATUS 0xC0010042 diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h index 7186d3416927..962c50d355b5 100644 --- a/include/asm-sparc/system.h +++ b/include/asm-sparc/system.h @@ -123,7 +123,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr, "save %sp, -0x40, %sp\n\t" \ "restore; restore; restore; restore; restore; restore; restore"); \ } while(0) -#define finish_arch_switch(rq, next) do{ }while(0) +#define finish_arch_switch(rq, next) spin_unlock_irq(&(rq)->lock) #define task_running(rq, p) ((rq)->curr == (p)) /* Much care has gone into this code, do not touch it. @@ -195,21 +195,6 @@ extern __inline__ void setipl(unsigned long __orig_psr) : "memory", "cc"); } -extern __inline__ void local_irq_disable(void) -{ - unsigned long tmp; - - __asm__ __volatile__( - "rd %%psr, %0\n\t" - "nop; nop; nop;\n\t" /* Sun4m + Cypress + SMP bug */ - "or %0, %1, %0\n\t" - "wr %0, 0x0, %%psr\n\t" - "nop; nop; nop\n" - : "=r" (tmp) - : "i" (PSR_PIL) - : "memory"); -} - extern __inline__ void local_irq_enable(void) { unsigned long tmp; @@ -233,6 +218,7 @@ extern __inline__ unsigned long getipl(void) return retval; } +#if 0 /* not used */ extern __inline__ unsigned long swap_pil(unsigned long __new_psr) { unsigned long retval; @@ -254,6 +240,7 @@ extern __inline__ unsigned long swap_pil(unsigned long __new_psr) return retval; } +#endif extern __inline__ unsigned long read_psr_and_cli(void) { @@ -275,15 +262,9 @@ extern __inline__ unsigned long read_psr_and_cli(void) #define local_save_flags(flags) ((flags) = getipl()) #define local_irq_save(flags) ((flags) = read_psr_and_cli()) #define local_irq_restore(flags) setipl((flags)) +#define local_irq_disable() ((void) read_psr_and_cli()) -/* On sparc32 IRQ flags are the PSR register in the PSR_PIL - * field. - */ -#define irqs_disabled() \ -({ unsigned long flags; \ - local_save_flags(flags);\ - (flags & PSR_PIL) != 0; \ -}) +#define irqs_disabled() ((getipl() & PSR_PIL) != 0) #ifdef CONFIG_SMP diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 82241756c07c..62006ff85d57 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h @@ -208,9 +208,9 @@ #define __NR_init_module 190 /* Linux Specific */ #define __NR_personality 191 /* Linux Specific */ #define __NR_remap_file_pages 192 /* Linux Specific */ -/* #define __NR_break 193 Linux Specific */ -/* #define __NR_lock 194 Linux Specific */ -/* #define __NR_mpx 195 Linux Specific */ +#define __NR_epoll_create 193 /* Linux Specific */ +#define __NR_epoll_ctl 194 /* Linux Specific */ +#define __NR_epoll_wait 195 /* Linux Specific */ /* #define __NR_ulimit 196 Linux Specific */ #define __NR_getppid 197 /* Linux Specific */ #define __NR_sigaction 198 /* Linux Specific */ diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index f2fe4a9a6adf..7de23077a285 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h @@ -208,9 +208,9 @@ #define __NR_init_module 190 /* Linux Specific */ #define __NR_personality 191 /* Linux Specific */ #define __NR_remap_file_pages 192 /* Linux Specific */ -/* #define __NR_break 193 Linux Specific */ -/* #define __NR_lock 194 Linux Specific */ -/* #define __NR_mpx 195 Linux Specific */ +#define __NR_epoll_create 193 /* Linux Specific */ +#define __NR_epoll_ctl 194 /* Linux Specific */ +#define __NR_epoll_wait 195 /* Linux Specific */ /* #define __NR_ulimit 196 Linux Specific */ #define __NR_getppid 197 /* Linux Specific */ #define __NR_sigaction 198 /* Linux Specific */ diff --git a/include/linux/crypto.h b/include/linux/crypto.h index b3448683d02d..960e54133e29 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -29,7 +29,7 @@ #define CRYPTO_ALG_TYPE_MASK 0x000000ff #define CRYPTO_ALG_TYPE_CIPHER 0x00000001 #define CRYPTO_ALG_TYPE_DIGEST 0x00000002 -#define CRYPTO_ALG_TYPE_COMP 0x00000004 +#define CRYPTO_ALG_TYPE_COMPRESS 0x00000004 /* @@ -209,16 +209,19 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) static inline unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_min_keysize; } static inline unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_max_keysize; } static inline unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_ivsize; } @@ -229,6 +232,7 @@ static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST); return tfm->__crt_alg->cra_digest.dia_digestsize; } @@ -302,13 +306,13 @@ static inline void crypto_cipher_get_iv(struct crypto_tfm *tfm, static inline void crypto_comp_compress(struct crypto_tfm *tfm) { - BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP); + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMPRESS); tfm->crt_compress.cot_compress(tfm); } static inline void crypto_comp_decompress(struct crypto_tfm *tfm) { - BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP); + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMPRESS); tfm->crt_compress.cot_decompress(tfm); } diff --git a/include/linux/sched.h b/include/linux/sched.h index 9c9717dd1cc1..7946bd8cb0ad 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -46,10 +46,11 @@ struct exec_domain; #define CLONE_NEWNS 0x00020000 /* New namespace group? */ #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ #define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ -#define CLONE_SETTID 0x00100000 /* write the TID back to userspace */ -#define CLONE_CLEARTID 0x00200000 /* clear the userspace TID */ -#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */ -#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ +#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ +#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */ +#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */ +#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ +#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ /* * List of flags we want to share for kernel threads, @@ -332,7 +333,8 @@ struct task_struct { wait_queue_head_t wait_chldexit; /* for wait4() */ struct completion *vfork_done; /* for vfork() */ - int *user_tid; /* for CLONE_CLEARTID */ + int *set_child_tid; /* CLONE_CHILD_SETTID */ + int *clear_child_tid; /* CLONE_CHILD_CLEARTID */ unsigned long rt_priority; unsigned long it_real_value, it_prof_value, it_virt_value; @@ -524,36 +526,6 @@ extern int kill_proc(pid_t, int, int); extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *); extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long); -/* - * Re-calculate pending state from the set of locally pending - * signals, globally pending signals, and blocked signals. - */ -static inline int has_pending_signals(sigset_t *signal, sigset_t *blocked) -{ - unsigned long ready; - long i; - - switch (_NSIG_WORDS) { - default: - for (i = _NSIG_WORDS, ready = 0; --i >= 0 ;) - ready |= signal->sig[i] &~ blocked->sig[i]; - break; - - case 4: ready = signal->sig[3] &~ blocked->sig[3]; - ready |= signal->sig[2] &~ blocked->sig[2]; - ready |= signal->sig[1] &~ blocked->sig[1]; - ready |= signal->sig[0] &~ blocked->sig[0]; - break; - - case 2: ready = signal->sig[1] &~ blocked->sig[1]; - ready |= signal->sig[0] &~ blocked->sig[0]; - break; - - case 1: ready = signal->sig[0] &~ blocked->sig[0]; - } - return ready != 0; -} - /* True if we are on the alternate signal stack. */ static inline int on_sig_stack(unsigned long sp) @@ -615,7 +587,7 @@ extern void daemonize(void); extern task_t *child_reaper; extern int do_execve(char *, char **, char **, struct pt_regs *); -extern struct task_struct *do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *); +extern struct task_struct *do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *); #ifdef CONFIG_SMP extern void wait_task_inactive(task_t * p); @@ -639,30 +611,6 @@ extern void kick_if_running(task_t * p); add_parent(p, (p)->parent); \ } while (0) -static inline struct task_struct *eldest_child(struct task_struct *p) -{ - if (list_empty(&p->children)) return NULL; - return list_entry(p->children.next,struct task_struct,sibling); -} - -static inline struct task_struct *youngest_child(struct task_struct *p) -{ - if (list_empty(&p->children)) return NULL; - return list_entry(p->children.prev,struct task_struct,sibling); -} - -static inline struct task_struct *older_sibling(struct task_struct *p) -{ - if (p->sibling.prev==&p->parent->children) return NULL; - return list_entry(p->sibling.prev,struct task_struct,sibling); -} - -static inline struct task_struct *younger_sibling(struct task_struct *p) -{ - if (p->sibling.next==&p->parent->children) return NULL; - return list_entry(p->sibling.next,struct task_struct,sibling); -} - #define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks) #define prev_task(p) list_entry((p)->tasks.prev, struct task_struct, tasks) |
