diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-28 08:48:26 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-28 08:48:26 -0700 |
| commit | bc2b7e977da422e84c02cca04ff8ea0f958287e2 (patch) | |
| tree | bd36a40acaedc9365eb1a0864c198fed4928de6e /include/asm-ppc | |
| parent | d77b3c84297c4356beb4a5f6a4153c03577a2bc9 (diff) | |
| parent | e792534a0363f8008ad96328a8bee0ebd17566fa (diff) | |
Merge bk://ppc.bkbits.net/for-linus-ppc
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include/asm-ppc')
| -rw-r--r-- | include/asm-ppc/highmem.h | 4 | ||||
| -rw-r--r-- | include/asm-ppc/io.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc/open_pic.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc/reg.h | 8 | ||||
| -rw-r--r-- | include/asm-ppc/signal.h | 12 | ||||
| -rw-r--r-- | include/asm-ppc/uaccess.h | 12 | ||||
| -rw-r--r-- | include/asm-ppc/ucontext.h | 4 |
7 files changed, 27 insertions, 17 deletions
diff --git a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h index aa3e74516808..928f8447ae7f 100644 --- a/include/asm-ppc/highmem.h +++ b/include/asm-ppc/highmem.h @@ -91,7 +91,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type) BUG_ON(!pte_none(*(kmap_pte+idx))); #endif set_pte(kmap_pte+idx, mk_pte(page, kmap_prot)); - flush_tlb_page(0, vaddr); + flush_tlb_page(NULL, vaddr); return (void*) vaddr; } @@ -115,7 +115,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type) * this pte without first remap it */ pte_clear(kmap_pte+idx); - flush_tlb_page(0, vaddr); + flush_tlb_page(NULL, vaddr); #endif dec_preempt_count(); preempt_check_resched(); diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 2717a607de27..a893418be84c 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h @@ -237,7 +237,7 @@ extern inline void * bus_to_virt(unsigned long address) { #ifndef CONFIG_APUS if (address == 0) - return 0; + return NULL; return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE); #else return (void*) mm_ptov (address); diff --git a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h index df14f8650ab0..38d8edb1ba70 100644 --- a/include/asm-ppc/open_pic.h +++ b/include/asm-ppc/open_pic.h @@ -50,7 +50,7 @@ extern void do_openpic_setup_cpu(void); extern int openpic_get_irq(struct pt_regs *regs); extern void openpic_reset_processor_phys(u_int cpumask); extern void openpic_setup_ISU(int isu_num, unsigned long addr); -extern void openpic_cause_IPI(u_int ipi, u_int cpumask); +extern void openpic_cause_IPI(u_int ipi, cpumask_t cpumask); extern void smp_openpic_message_pass(int target, int msg, unsigned long data, int wait); extern void openpic_set_k2_cascade(int irq); diff --git a/include/asm-ppc/reg.h b/include/asm-ppc/reg.h index 15c93af4079a..73eab4528eb9 100644 --- a/include/asm-ppc/reg.h +++ b/include/asm-ppc/reg.h @@ -350,7 +350,7 @@ #define DBAT6U SPRN_DBAT6U /* Data BAT 6 Upper Register */ #define DBAT7L SPRN_DBAT7L /* Data BAT 7 Lower Register */ #define DBAT7U SPRN_DBAT7U /* Data BAT 7 Upper Register */ -#define DEC SPRN_DEC /* Decrement 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 */ @@ -380,9 +380,9 @@ #define IMMR SPRN_IMMR /* PPC 860/821 Internal Memory Map Register */ #define L2CR SPRN_L2CR /* Classic PPC L2 cache control register */ #define L3CR SPRN_L3CR /* PPC 745x L3 cache control register */ -#define LR SPRN_LR +//#define LR SPRN_LR #define PVR SPRN_PVR /* Processor Version */ -#define RPA SPRN_RPA /* Required Physical Address Register */ +//#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 @@ -489,6 +489,7 @@ #define SVR_8555E 0x80790000 #define SVR_8560 0x80700000 +#if 0 /* Segment Registers */ #define SR0 0 #define SR1 1 @@ -506,6 +507,7 @@ #define SR13 13 #define SR14 14 #define SR15 15 +#endif /* Macros for setting and retrieving special purpose registers */ #ifndef __ASSEMBLY__ diff --git a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h index 108bec27db9b..580fcc148259 100644 --- a/include/asm-ppc/signal.h +++ b/include/asm-ppc/signal.h @@ -118,7 +118,11 @@ typedef struct { #define SIG_SETMASK 2 /* for setting the signal mask */ /* Type of a signal handler. */ -typedef void (*__sighandler_t)(int); +typedef void __signalfn_t(int); +typedef __signalfn_t __user *__sighandler_t; + +typedef void __restorefn_t(void); +typedef __restorefn_t __user *__sigrestore_t; #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ @@ -128,13 +132,13 @@ struct old_sigaction { __sighandler_t sa_handler; old_sigset_t sa_mask; unsigned long sa_flags; - void (*sa_restorer)(void); + __sigrestore_t sa_restorer; }; struct sigaction { __sighandler_t sa_handler; unsigned long sa_flags; - void (*sa_restorer)(void); + __sigrestore_t sa_restorer; sigset_t sa_mask; /* mask last for extensibility */ }; @@ -143,7 +147,7 @@ struct k_sigaction { }; typedef struct sigaltstack { - void *ss_sp; + void __user *ss_sp; int ss_flags; size_t ss_size; } stack_t; diff --git a/include/asm-ppc/uaccess.h b/include/asm-ppc/uaccess.h index 0a1a1a86a1de..b9d763e0d886 100644 --- a/include/asm-ppc/uaccess.h +++ b/include/asm-ppc/uaccess.h @@ -34,7 +34,8 @@ ((addr) <= current->thread.fs.seg \ && ((size) == 0 || (size) - 1 <= current->thread.fs.seg - (addr))) -#define access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size)) +#define access_ok(type, addr, size) \ + (__chk_user_ptr(addr),__access_ok((unsigned long)(addr),(size))) extern inline int verify_area(int type, const void __user * addr, unsigned long size) { @@ -105,6 +106,7 @@ extern long __put_user_bad(void); #define __put_user_nocheck(x,ptr,size) \ ({ \ long __pu_err; \ + __chk_user_ptr(ptr); \ __put_user_size((x),(ptr),(size),__pu_err); \ __pu_err; \ }) @@ -112,7 +114,7 @@ extern long __put_user_bad(void); #define __put_user_check(x,ptr,size) \ ({ \ long __pu_err = -EFAULT; \ - __typeof__(*(ptr)) *__pu_addr = (ptr); \ + __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ __put_user_size((x),__pu_addr,(size),__pu_err); \ __pu_err; \ @@ -179,6 +181,7 @@ do { \ #define __get_user_nocheck(x, ptr, size) \ ({ \ long __gu_err, __gu_val; \ + __chk_user_ptr(ptr); \ __get_user_size(__gu_val, (ptr), (size), __gu_err); \ (x) = (__typeof__(*(ptr)))__gu_val; \ __gu_err; \ @@ -188,6 +191,7 @@ do { \ ({ \ long __gu_err; \ long long __gu_val; \ + __chk_user_ptr(ptr); \ __get_user_size64(__gu_val, (ptr), (size), __gu_err); \ (x) = (__typeof__(*(ptr)))__gu_val; \ __gu_err; \ @@ -196,7 +200,7 @@ do { \ #define __get_user_check(x, ptr, size) \ ({ \ long __gu_err = -EFAULT, __gu_val = 0; \ - const __typeof__(*(ptr)) *__gu_addr = (ptr); \ + const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ if (access_ok(VERIFY_READ, __gu_addr, (size))) \ __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \ (x) = (__typeof__(*(ptr)))__gu_val; \ @@ -207,7 +211,7 @@ do { \ ({ \ long __gu_err = -EFAULT; \ long long __gu_val = 0; \ - const __typeof__(*(ptr)) *__gu_addr = (ptr); \ + const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ if (access_ok(VERIFY_READ, __gu_addr, (size))) \ __get_user_size64(__gu_val, __gu_addr, (size), __gu_err); \ (x) = (__typeof__(*(ptr)))__gu_val; \ diff --git a/include/asm-ppc/ucontext.h b/include/asm-ppc/ucontext.h index 53da26040a0e..664bc984d51f 100644 --- a/include/asm-ppc/ucontext.h +++ b/include/asm-ppc/ucontext.h @@ -13,10 +13,10 @@ struct mcontext { struct ucontext { unsigned long uc_flags; - struct ucontext *uc_link; + struct ucontext __user *uc_link; stack_t uc_stack; int uc_pad[7]; - struct mcontext *uc_regs; /* points to uc_mcontext field */ + struct mcontext __user *uc_regs;/* points to uc_mcontext field */ sigset_t uc_sigmask; /* glibc has 1024-bit signal masks, ours are 64-bit */ int uc_maskext[30]; |
