diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 14:30:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 14:30:45 -0400 |
commit | 4d3ce21fa9d2eaeda113aa2f9c2da80d972bef64 (patch) | |
tree | 9ffa5af467d6e9f6f6c8eb496489bf882613a459 /include/asm-parisc | |
parent | b026188e8214ce87790730a56f3017d0bd222751 (diff) | |
parent | c1a7a755be26f68d7f21ee769584149a96185ea8 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (23 commits)
[PARISC] Move os_id_to_string() inside #ifndef __ASSEMBLY__
[PARISC] Fix do_gettimeofday() hang
[PARISC] Fix PCREL22F relocation problem for most modules
[PARISC] Refactor show_regs in traps.c
[PARISC] Add os_id_to_string helper
[PARISC] OS_ID_LINUX == 0x0006
[PARISC] Ensure Space ID hashing is turned off
[PARISC] Match show_cache_info with reality
[PARISC] Remove unused macro fixup_branch in syscall.S
[PARISC] Add is_compat_task() helper
[PARISC] Update Thibaut Varene's CREDITS entry
[PARISC] Reduce data footprint in pdc_stable.c
[PARISC] pdc_stable version 0.30
[PARISC] Work around machines which do not support chassis warnings
[PARISC] PDC_CHASSIS is implemented on all machines
[PARISC] Remove unconditional #define PIC in syscall macros
[PARISC] Use MFIA in current_text_addr on pa2.0 processors
[PARISC] Remove dead function pc_in_user_space
[PARISC] Test ioc_needs_fdc variable instead of open coding
[PARISC] Fix gcc 4.1 warnings in sba_iommu.c
...
Diffstat (limited to 'include/asm-parisc')
-rw-r--r-- | include/asm-parisc/assembly.h | 2 | ||||
-rw-r--r-- | include/asm-parisc/compat.h | 11 | ||||
-rw-r--r-- | include/asm-parisc/pdc.h | 21 | ||||
-rw-r--r-- | include/asm-parisc/pgtable.h | 8 | ||||
-rw-r--r-- | include/asm-parisc/processor.h | 14 | ||||
-rw-r--r-- | include/asm-parisc/system.h | 26 | ||||
-rw-r--r-- | include/asm-parisc/uaccess.h | 9 | ||||
-rw-r--r-- | include/asm-parisc/unistd.h | 5 |
8 files changed, 61 insertions, 35 deletions
diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h index 3ce3440d1b0c..1a7bfe699e0c 100644 --- a/include/asm-parisc/assembly.h +++ b/include/asm-parisc/assembly.h | |||
@@ -48,6 +48,7 @@ | |||
48 | #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE) | 48 | #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE) |
49 | 49 | ||
50 | #ifdef CONFIG_PA20 | 50 | #ifdef CONFIG_PA20 |
51 | #define LDCW ldcw,co | ||
51 | #define BL b,l | 52 | #define BL b,l |
52 | # ifdef CONFIG_64BIT | 53 | # ifdef CONFIG_64BIT |
53 | # define LEVEL 2.0w | 54 | # define LEVEL 2.0w |
@@ -55,6 +56,7 @@ | |||
55 | # define LEVEL 2.0 | 56 | # define LEVEL 2.0 |
56 | # endif | 57 | # endif |
57 | #else | 58 | #else |
59 | #define LDCW ldcw | ||
58 | #define BL bl | 60 | #define BL bl |
59 | #define LEVEL 1.1 | 61 | #define LEVEL 1.1 |
60 | #endif | 62 | #endif |
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h index 289624d8b2d4..71b4eeea205a 100644 --- a/include/asm-parisc/compat.h +++ b/include/asm-parisc/compat.h | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/personality.h> | ||
8 | 9 | ||
9 | #define COMPAT_USER_HZ 100 | 10 | #define COMPAT_USER_HZ 100 |
10 | 11 | ||
@@ -149,4 +150,14 @@ static __inline__ void __user *compat_alloc_user_space(long len) | |||
149 | return (void __user *)regs->gr[30]; | 150 | return (void __user *)regs->gr[30]; |
150 | } | 151 | } |
151 | 152 | ||
153 | static inline int __is_compat_task(struct task_struct *t) | ||
154 | { | ||
155 | return personality(t->personality) == PER_LINUX32; | ||
156 | } | ||
157 | |||
158 | static inline int is_compat_task(void) | ||
159 | { | ||
160 | return __is_compat_task(current); | ||
161 | } | ||
162 | |||
152 | #endif /* _ASM_PARISC_COMPAT_H */ | 163 | #endif /* _ASM_PARISC_COMPAT_H */ |
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h index 08364f957e7a..c9b2e35326ee 100644 --- a/include/asm-parisc/pdc.h +++ b/include/asm-parisc/pdc.h | |||
@@ -278,12 +278,11 @@ typedef struct { | |||
278 | /* constants for OS (NVM...) */ | 278 | /* constants for OS (NVM...) */ |
279 | #define OS_ID_NONE 0 /* Undefined OS ID */ | 279 | #define OS_ID_NONE 0 /* Undefined OS ID */ |
280 | #define OS_ID_HPUX 1 /* HP-UX OS */ | 280 | #define OS_ID_HPUX 1 /* HP-UX OS */ |
281 | #define OS_ID_LINUX OS_ID_HPUX /* just use the same value as hpux */ | ||
282 | #define OS_ID_MPEXL 2 /* MPE XL OS */ | 281 | #define OS_ID_MPEXL 2 /* MPE XL OS */ |
283 | #define OS_ID_OSF 3 /* OSF OS */ | 282 | #define OS_ID_OSF 3 /* OSF OS */ |
284 | #define OS_ID_HPRT 4 /* HP-RT OS */ | 283 | #define OS_ID_HPRT 4 /* HP-RT OS */ |
285 | #define OS_ID_NOVEL 5 /* NOVELL OS */ | 284 | #define OS_ID_NOVEL 5 /* NOVELL OS */ |
286 | #define OS_ID_NT 6 /* NT OS */ | 285 | #define OS_ID_LINUX 6 /* Linux */ |
287 | 286 | ||
288 | 287 | ||
289 | /* constants for PDC_CHASSIS */ | 288 | /* constants for PDC_CHASSIS */ |
@@ -352,8 +351,8 @@ struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ | |||
352 | cc_wt : 1, /* 0 = WT-Dcache, 1 = WB-Dcache */ | 351 | cc_wt : 1, /* 0 = WT-Dcache, 1 = WB-Dcache */ |
353 | cc_sh : 2, /* 0 = separate I/D-cache, else shared I/D-cache */ | 352 | cc_sh : 2, /* 0 = separate I/D-cache, else shared I/D-cache */ |
354 | cc_cst : 3, /* 0 = incoherent D-cache, 1=coherent D-cache */ | 353 | cc_cst : 3, /* 0 = incoherent D-cache, 1=coherent D-cache */ |
355 | cc_pad1 : 5, /* reserved */ | 354 | cc_pad1 : 10, /* reserved */ |
356 | cc_assoc: 8; /* associativity of I/D-cache */ | 355 | cc_hv : 3; /* hversion dependent */ |
357 | }; | 356 | }; |
358 | 357 | ||
359 | struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ | 358 | struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ |
@@ -719,6 +718,7 @@ void setup_pdc(void); /* in inventory.c */ | |||
719 | int pdc_add_valid(unsigned long address); | 718 | int pdc_add_valid(unsigned long address); |
720 | int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len); | 719 | int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len); |
721 | int pdc_chassis_disp(unsigned long disp); | 720 | int pdc_chassis_disp(unsigned long disp); |
721 | int pdc_chassis_warn(unsigned long *warn); | ||
722 | int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info); | 722 | int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info); |
723 | int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index, | 723 | int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index, |
724 | void *iodc_data, unsigned int iodc_data_size); | 724 | void *iodc_data, unsigned int iodc_data_size); |
@@ -732,6 +732,7 @@ int pdc_model_cpuid(unsigned long *cpu_id); | |||
732 | int pdc_model_versions(unsigned long *versions, int id); | 732 | int pdc_model_versions(unsigned long *versions, int id); |
733 | int pdc_model_capabilities(unsigned long *capabilities); | 733 | int pdc_model_capabilities(unsigned long *capabilities); |
734 | int pdc_cache_info(struct pdc_cache_info *cache); | 734 | int pdc_cache_info(struct pdc_cache_info *cache); |
735 | int pdc_spaceid_bits(unsigned long *space_bits); | ||
735 | #ifndef CONFIG_PA20 | 736 | #ifndef CONFIG_PA20 |
736 | int pdc_btlb_info(struct pdc_btlb_info *btlb); | 737 | int pdc_btlb_info(struct pdc_btlb_info *btlb); |
737 | int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path); | 738 | int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path); |
@@ -775,6 +776,18 @@ int pdc_sti_call(unsigned long func, unsigned long flags, | |||
775 | 776 | ||
776 | extern void pdc_init(void); | 777 | extern void pdc_init(void); |
777 | 778 | ||
779 | static inline char * os_id_to_string(u16 os_id) { | ||
780 | switch(os_id) { | ||
781 | case OS_ID_NONE: return "No OS"; | ||
782 | case OS_ID_HPUX: return "HP-UX"; | ||
783 | case OS_ID_MPEXL: return "MPE-iX"; | ||
784 | case OS_ID_OSF: return "OSF"; | ||
785 | case OS_ID_HPRT: return "HP-RT"; | ||
786 | case OS_ID_NOVEL: return "Novell Netware"; | ||
787 | case OS_ID_LINUX: return "Linux"; | ||
788 | default: return "Unknown"; | ||
789 | } | ||
790 | } | ||
778 | #endif /* __ASSEMBLY__ */ | 791 | #endif /* __ASSEMBLY__ */ |
779 | 792 | ||
780 | #endif /* _PARISC_PDC_H */ | 793 | #endif /* _PARISC_PDC_H */ |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index b6bcc672ba80..5066c54dae0a 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -506,13 +506,13 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
506 | 506 | ||
507 | /* TLB page size encoding - see table 3-1 in parisc20.pdf */ | 507 | /* TLB page size encoding - see table 3-1 in parisc20.pdf */ |
508 | #define _PAGE_SIZE_ENCODING_4K 0 | 508 | #define _PAGE_SIZE_ENCODING_4K 0 |
509 | #define _PAGE_SIZE_ENCODING_16K 1 | 509 | #define _PAGE_SIZE_ENCODING_16K 1 |
510 | #define _PAGE_SIZE_ENCODING_64K 2 | 510 | #define _PAGE_SIZE_ENCODING_64K 2 |
511 | #define _PAGE_SIZE_ENCODING_256K 3 | 511 | #define _PAGE_SIZE_ENCODING_256K 3 |
512 | #define _PAGE_SIZE_ENCODING_1M 4 | 512 | #define _PAGE_SIZE_ENCODING_1M 4 |
513 | #define _PAGE_SIZE_ENCODING_4M 5 | 513 | #define _PAGE_SIZE_ENCODING_4M 5 |
514 | #define _PAGE_SIZE_ENCODING_16M 6 | 514 | #define _PAGE_SIZE_ENCODING_16M 6 |
515 | #define _PAGE_SIZE_ENCODING_64M 7 | 515 | #define _PAGE_SIZE_ENCODING_64M 7 |
516 | 516 | ||
517 | #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) | 517 | #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) |
518 | # define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_4K | 518 | # define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_4K |
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index ca49dc91f4fc..b73626f040da 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h | |||
@@ -26,14 +26,12 @@ | |||
26 | * Default implementation of macro that returns current | 26 | * Default implementation of macro that returns current |
27 | * instruction pointer ("program counter"). | 27 | * instruction pointer ("program counter"). |
28 | */ | 28 | */ |
29 | 29 | #ifdef CONFIG_PA20 | |
30 | /* We cannot use MFIA as it was added for PA2.0 - prumpf | 30 | #define current_ia(x) __asm__("mfia %0" : "=r"(x)) |
31 | 31 | #else /* mfia added in pa2.0 */ | |
32 | At one point there were no "0f/0b" type local symbols in gas for | 32 | #define current_ia(x) __asm__("blr 0,%0\n\tnop" : "=r"(x)) |
33 | PA-RISC. This is no longer true, but this still seems like the | 33 | #endif |
34 | nicest way to implement this. */ | 34 | #define current_text_addr() ({ void *pc; current_ia(pc); pc; }) |
35 | |||
36 | #define current_text_addr() ({ void *pc; __asm__("\n\tblr 0,%0\n\tnop":"=r" (pc)); pc; }) | ||
37 | 35 | ||
38 | #define TASK_SIZE (current->thread.task_size) | 36 | #define TASK_SIZE (current->thread.task_size) |
39 | #define TASK_UNMAPPED_BASE (current->thread.map_base) | 37 | #define TASK_UNMAPPED_BASE (current->thread.map_base) |
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 863876134b2c..5fe2d2329ab5 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h | |||
@@ -155,13 +155,14 @@ static inline void set_eiem(unsigned long val) | |||
155 | type and dynamically select the 16-byte aligned int from the array | 155 | type and dynamically select the 16-byte aligned int from the array |
156 | for the semaphore. */ | 156 | for the semaphore. */ |
157 | 157 | ||
158 | #define __PA_LDCW_ALIGNMENT 16 | 158 | #define __PA_LDCW_ALIGNMENT 16 |
159 | #define __ldcw_align(a) ({ \ | 159 | #define __ldcw_align(a) ({ \ |
160 | unsigned long __ret = (unsigned long) &(a)->lock[0]; \ | 160 | unsigned long __ret = (unsigned long) &(a)->lock[0]; \ |
161 | __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) & ~(__PA_LDCW_ALIGNMENT - 1); \ | 161 | __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) \ |
162 | (volatile unsigned int *) __ret; \ | 162 | & ~(__PA_LDCW_ALIGNMENT - 1); \ |
163 | (volatile unsigned int *) __ret; \ | ||
163 | }) | 164 | }) |
164 | #define LDCW "ldcw" | 165 | #define __LDCW "ldcw" |
165 | 166 | ||
166 | #else /*CONFIG_PA20*/ | 167 | #else /*CONFIG_PA20*/ |
167 | /* From: "Jim Hull" <jim.hull of hp.com> | 168 | /* From: "Jim Hull" <jim.hull of hp.com> |
@@ -171,17 +172,18 @@ static inline void set_eiem(unsigned long val) | |||
171 | they only require "natural" alignment (4-byte for ldcw, 8-byte for | 172 | they only require "natural" alignment (4-byte for ldcw, 8-byte for |
172 | ldcd). */ | 173 | ldcd). */ |
173 | 174 | ||
174 | #define __PA_LDCW_ALIGNMENT 4 | 175 | #define __PA_LDCW_ALIGNMENT 4 |
175 | #define __ldcw_align(a) ((volatile unsigned int *)a) | 176 | #define __ldcw_align(a) ((volatile unsigned int *)a) |
176 | #define LDCW "ldcw,co" | 177 | #define __LDCW "ldcw,co" |
177 | 178 | ||
178 | #endif /*!CONFIG_PA20*/ | 179 | #endif /*!CONFIG_PA20*/ |
179 | 180 | ||
180 | /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ | 181 | /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ |
181 | #define __ldcw(a) ({ \ | 182 | #define __ldcw(a) ({ \ |
182 | unsigned __ret; \ | 183 | unsigned __ret; \ |
183 | __asm__ __volatile__(LDCW " 0(%1),%0" : "=r" (__ret) : "r" (a)); \ | 184 | __asm__ __volatile__(__LDCW " 0(%1),%0" \ |
184 | __ret; \ | 185 | : "=r" (__ret) : "r" (a)); \ |
186 | __ret; \ | ||
185 | }) | 187 | }) |
186 | 188 | ||
187 | #ifdef CONFIG_SMP | 189 | #ifdef CONFIG_SMP |
diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h index f6c417c8c484..d973e8b3466c 100644 --- a/include/asm-parisc/uaccess.h +++ b/include/asm-parisc/uaccess.h | |||
@@ -172,7 +172,11 @@ struct exception_data { | |||
172 | /* | 172 | /* |
173 | * The "__put_user/kernel_asm()" macros tell gcc they read from memory | 173 | * The "__put_user/kernel_asm()" macros tell gcc they read from memory |
174 | * instead of writing. This is because they do not write to any memory | 174 | * instead of writing. This is because they do not write to any memory |
175 | * gcc knows about, so there are no aliasing issues. | 175 | * gcc knows about, so there are no aliasing issues. These macros must |
176 | * also be aware that "fixup_put_user_skip_[12]" are executed in the | ||
177 | * context of the fault, and any registers used there must be listed | ||
178 | * as clobbers. In this case only "r1" is used by the current routines. | ||
179 | * r8/r9 are already listed as err/val. | ||
176 | */ | 180 | */ |
177 | 181 | ||
178 | #ifdef __LP64__ | 182 | #ifdef __LP64__ |
@@ -183,7 +187,8 @@ struct exception_data { | |||
183 | "\t.dword\t1b,fixup_put_user_skip_1\n" \ | 187 | "\t.dword\t1b,fixup_put_user_skip_1\n" \ |
184 | "\t.previous" \ | 188 | "\t.previous" \ |
185 | : "=r"(__pu_err) \ | 189 | : "=r"(__pu_err) \ |
186 | : "r"(ptr), "r"(x), "0"(__pu_err)) | 190 | : "r"(ptr), "r"(x), "0"(__pu_err) \ |
191 | : "r1") | ||
187 | 192 | ||
188 | #define __put_user_asm(stx,x,ptr) \ | 193 | #define __put_user_asm(stx,x,ptr) \ |
189 | __asm__ __volatile__ ( \ | 194 | __asm__ __volatile__ ( \ |
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index 12b867238a47..27bcfad1c3e3 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -797,11 +797,6 @@ | |||
797 | 797 | ||
798 | #define SYS_ify(syscall_name) __NR_##syscall_name | 798 | #define SYS_ify(syscall_name) __NR_##syscall_name |
799 | 799 | ||
800 | /* Assume all syscalls are done from PIC code just to be | ||
801 | * safe. The worst case scenario is that you lose a register | ||
802 | * and save/restore r19 across the syscall. */ | ||
803 | #define PIC | ||
804 | |||
805 | #ifndef ASM_LINE_SEP | 800 | #ifndef ASM_LINE_SEP |
806 | # define ASM_LINE_SEP ; | 801 | # define ASM_LINE_SEP ; |
807 | #endif | 802 | #endif |