diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 12:52:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 12:52:04 -0400 |
commit | 3ba113d14cedcd88105a3b9c90f8ecce829e1095 (patch) | |
tree | 357f50c6a45bf57a16d46b3157dfcd4e28233079 /arch/parisc/include/asm | |
parent | bad6a5c08c119572c888d5df2bd7691a4da6b9e8 (diff) | |
parent | b609308e1415efebdf79ebd553f4dd47b0ff2722 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: (23 commits)
parisc: move dereference_function_descriptor to process.c
parisc: Move kernel Elf_Fdesc define to <asm/elf.h>
parisc: fix build when ARCH_HAS_KMAP
parisc: fix "make tar-pkg"
parisc: drivers: fix warnings
parisc: select BUG always
parisc: asm/pdc.h should include asm/page.h
parisc: led: remove proc_dir_entry::owner
parisc: fix macro expansion in atomic.h
parisc: iosapic: fix build breakage
parisc: oops_enter()/oops_exit() in die()
parisc: document light weight syscall ABI
parisc: blink all or loadavg LEDs on oops
parisc: add ftrace (function and graph tracer) functionality
parisc: simplify sys_clone()
parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT
parisc: allow to build with 16k default kernel page size
parisc: expose 32/64-bit capabilities in cpuinfo
parisc: use constants instead of numbers in assembly
parisc: fix usage of 32bit PTE page table entries on 32bit kernels
...
Diffstat (limited to 'arch/parisc/include/asm')
-rw-r--r-- | arch/parisc/include/asm/atomic.h | 18 | ||||
-rw-r--r-- | arch/parisc/include/asm/cacheflush.h | 3 | ||||
-rw-r--r-- | arch/parisc/include/asm/elf.h | 10 | ||||
-rw-r--r-- | arch/parisc/include/asm/ftrace.h | 25 | ||||
-rw-r--r-- | arch/parisc/include/asm/page.h | 13 | ||||
-rw-r--r-- | arch/parisc/include/asm/pdc.h | 4 | ||||
-rw-r--r-- | arch/parisc/include/asm/pgtable.h | 15 | ||||
-rw-r--r-- | arch/parisc/include/asm/smp.h | 3 |
8 files changed, 65 insertions, 26 deletions
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h index edbfe25c5fc1..ada3e5364d82 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h | |||
@@ -25,7 +25,7 @@ | |||
25 | * Since "a" is usually an address, use one spinlock per cacheline. | 25 | * Since "a" is usually an address, use one spinlock per cacheline. |
26 | */ | 26 | */ |
27 | # define ATOMIC_HASH_SIZE 4 | 27 | # define ATOMIC_HASH_SIZE 4 |
28 | # define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ])) | 28 | # define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) (a))/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ])) |
29 | 29 | ||
30 | extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned; | 30 | extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned; |
31 | 31 | ||
@@ -222,13 +222,13 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
222 | 222 | ||
223 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 223 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
224 | 224 | ||
225 | #define atomic_add(i,v) ((void)(__atomic_add_return( ((int)i),(v)))) | 225 | #define atomic_add(i,v) ((void)(__atomic_add_return( ((int)(i)),(v)))) |
226 | #define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)i),(v)))) | 226 | #define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)(i)),(v)))) |
227 | #define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) | 227 | #define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) |
228 | #define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) | 228 | #define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) |
229 | 229 | ||
230 | #define atomic_add_return(i,v) (__atomic_add_return( ((int)i),(v))) | 230 | #define atomic_add_return(i,v) (__atomic_add_return( ((int)(i)),(v))) |
231 | #define atomic_sub_return(i,v) (__atomic_add_return(-((int)i),(v))) | 231 | #define atomic_sub_return(i,v) (__atomic_add_return(-((int)(i)),(v))) |
232 | #define atomic_inc_return(v) (__atomic_add_return( 1,(v))) | 232 | #define atomic_inc_return(v) (__atomic_add_return( 1,(v))) |
233 | #define atomic_dec_return(v) (__atomic_add_return( -1,(v))) | 233 | #define atomic_dec_return(v) (__atomic_add_return( -1,(v))) |
234 | 234 | ||
@@ -289,13 +289,13 @@ atomic64_read(const atomic64_t *v) | |||
289 | return v->counter; | 289 | return v->counter; |
290 | } | 290 | } |
291 | 291 | ||
292 | #define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)i),(v)))) | 292 | #define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)(i)),(v)))) |
293 | #define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)i),(v)))) | 293 | #define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)(i)),(v)))) |
294 | #define atomic64_inc(v) ((void)(__atomic64_add_return( 1,(v)))) | 294 | #define atomic64_inc(v) ((void)(__atomic64_add_return( 1,(v)))) |
295 | #define atomic64_dec(v) ((void)(__atomic64_add_return( -1,(v)))) | 295 | #define atomic64_dec(v) ((void)(__atomic64_add_return( -1,(v)))) |
296 | 296 | ||
297 | #define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)i),(v))) | 297 | #define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)(i)),(v))) |
298 | #define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)i),(v))) | 298 | #define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)(i)),(v))) |
299 | #define atomic64_inc_return(v) (__atomic64_add_return( 1,(v))) | 299 | #define atomic64_inc_return(v) (__atomic64_add_return( 1,(v))) |
300 | #define atomic64_dec_return(v) (__atomic64_add_return( -1,(v))) | 300 | #define atomic64_dec_return(v) (__atomic64_add_return( -1,(v))) |
301 | 301 | ||
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h index b7ca6dc7fddc..724395143f26 100644 --- a/arch/parisc/include/asm/cacheflush.h +++ b/arch/parisc/include/asm/cacheflush.h | |||
@@ -97,6 +97,9 @@ void mark_rodata_ro(void); | |||
97 | 97 | ||
98 | #ifdef CONFIG_PA8X00 | 98 | #ifdef CONFIG_PA8X00 |
99 | /* Only pa8800, pa8900 needs this */ | 99 | /* Only pa8800, pa8900 needs this */ |
100 | |||
101 | #include <asm/kmap_types.h> | ||
102 | |||
100 | #define ARCH_HAS_KMAP | 103 | #define ARCH_HAS_KMAP |
101 | 104 | ||
102 | void kunmap_parisc(void *addr); | 105 | void kunmap_parisc(void *addr); |
diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h index 7fa675799e6d..9c802eb4be84 100644 --- a/arch/parisc/include/asm/elf.h +++ b/arch/parisc/include/asm/elf.h | |||
@@ -168,6 +168,16 @@ typedef struct elf64_fdesc { | |||
168 | __u64 gp; | 168 | __u64 gp; |
169 | } Elf64_Fdesc; | 169 | } Elf64_Fdesc; |
170 | 170 | ||
171 | #ifdef __KERNEL__ | ||
172 | |||
173 | #ifdef CONFIG_64BIT | ||
174 | #define Elf_Fdesc Elf64_Fdesc | ||
175 | #else | ||
176 | #define Elf_Fdesc Elf32_Fdesc | ||
177 | #endif /*CONFIG_64BIT*/ | ||
178 | |||
179 | #endif /*__KERNEL__*/ | ||
180 | |||
171 | /* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */ | 181 | /* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */ |
172 | 182 | ||
173 | #define PT_HP_TLS (PT_LOOS + 0x0) | 183 | #define PT_HP_TLS (PT_LOOS + 0x0) |
diff --git a/arch/parisc/include/asm/ftrace.h b/arch/parisc/include/asm/ftrace.h new file mode 100644 index 000000000000..2fa05dd6aeee --- /dev/null +++ b/arch/parisc/include/asm/ftrace.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _ASM_PARISC_FTRACE_H | ||
2 | #define _ASM_PARISC_FTRACE_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | extern void mcount(void); | ||
6 | |||
7 | /* | ||
8 | * Stack of return addresses for functions of a thread. | ||
9 | * Used in struct thread_info | ||
10 | */ | ||
11 | struct ftrace_ret_stack { | ||
12 | unsigned long ret; | ||
13 | unsigned long func; | ||
14 | unsigned long long calltime; | ||
15 | }; | ||
16 | |||
17 | /* | ||
18 | * Primary handler of a function return. | ||
19 | * It relays on ftrace_return_to_handler. | ||
20 | * Defined in entry.S | ||
21 | */ | ||
22 | extern void return_to_handler(void); | ||
23 | #endif /* __ASSEMBLY__ */ | ||
24 | |||
25 | #endif /* _ASM_PARISC_FTRACE_H */ | ||
diff --git a/arch/parisc/include/asm/page.h b/arch/parisc/include/asm/page.h index c3941f09a878..7bc5125d7d4c 100644 --- a/arch/parisc/include/asm/page.h +++ b/arch/parisc/include/asm/page.h | |||
@@ -36,16 +36,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg); | |||
36 | */ | 36 | */ |
37 | #define STRICT_MM_TYPECHECKS | 37 | #define STRICT_MM_TYPECHECKS |
38 | #ifdef STRICT_MM_TYPECHECKS | 38 | #ifdef STRICT_MM_TYPECHECKS |
39 | typedef struct { unsigned long pte; | 39 | typedef struct { unsigned long pte; } pte_t; /* either 32 or 64bit */ |
40 | #if !defined(CONFIG_64BIT) | ||
41 | unsigned long future_flags; | ||
42 | /* XXX: it's possible to remove future_flags and change BITS_PER_PTE_ENTRY | ||
43 | to 2, but then strangely the identical 32bit kernel boots on a | ||
44 | c3000(pa20), but not any longer on a 715(pa11). | ||
45 | Still investigating... HelgeD. | ||
46 | */ | ||
47 | #endif | ||
48 | } pte_t; /* either 32 or 64bit */ | ||
49 | 40 | ||
50 | /* NOTE: even on 64 bits, these entries are __u32 because we allocate | 41 | /* NOTE: even on 64 bits, these entries are __u32 because we allocate |
51 | * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */ | 42 | * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */ |
@@ -111,7 +102,7 @@ extern int npmem_ranges; | |||
111 | #define BITS_PER_PMD_ENTRY 2 | 102 | #define BITS_PER_PMD_ENTRY 2 |
112 | #define BITS_PER_PGD_ENTRY 2 | 103 | #define BITS_PER_PGD_ENTRY 2 |
113 | #else | 104 | #else |
114 | #define BITS_PER_PTE_ENTRY 3 | 105 | #define BITS_PER_PTE_ENTRY 2 |
115 | #define BITS_PER_PMD_ENTRY 2 | 106 | #define BITS_PER_PMD_ENTRY 2 |
116 | #define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY | 107 | #define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY |
117 | #endif | 108 | #endif |
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h index 430f1aeea0b8..4ca510b3c6f8 100644 --- a/arch/parisc/include/asm/pdc.h +++ b/arch/parisc/include/asm/pdc.h | |||
@@ -49,6 +49,8 @@ | |||
49 | #define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */ | 49 | #define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */ |
50 | #define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */ | 50 | #define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */ |
51 | /* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */ | 51 | /* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */ |
52 | #define PDC_MODEL_OS64 (1 << 0) | ||
53 | #define PDC_MODEL_OS32 (1 << 1) | ||
52 | #define PDC_MODEL_IOPDIR_FDC (1 << 2) | 54 | #define PDC_MODEL_IOPDIR_FDC (1 << 2) |
53 | #define PDC_MODEL_NVA_MASK (3 << 4) | 55 | #define PDC_MODEL_NVA_MASK (3 << 4) |
54 | #define PDC_MODEL_NVA_SUPPORTED (0 << 4) | 56 | #define PDC_MODEL_NVA_SUPPORTED (0 << 4) |
@@ -341,6 +343,8 @@ | |||
341 | 343 | ||
342 | #ifdef __KERNEL__ | 344 | #ifdef __KERNEL__ |
343 | 345 | ||
346 | #include <asm/page.h> /* for __PAGE_OFFSET */ | ||
347 | |||
344 | extern int pdc_type; | 348 | extern int pdc_type; |
345 | 349 | ||
346 | /* Values for pdc_type */ | 350 | /* Values for pdc_type */ |
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 470a4b88124d..a27d2e200fb2 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h | |||
@@ -50,11 +50,7 @@ | |||
50 | printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) | 50 | printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) |
51 | 51 | ||
52 | /* This is the size of the initially mapped kernel memory */ | 52 | /* This is the size of the initially mapped kernel memory */ |
53 | #ifdef CONFIG_64BIT | ||
54 | #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ | 53 | #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ |
55 | #else | ||
56 | #define KERNEL_INITIAL_ORDER 23 /* 0 to 1<<23 = 8MB */ | ||
57 | #endif | ||
58 | #define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) | 54 | #define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) |
59 | 55 | ||
60 | #if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB) | 56 | #if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB) |
@@ -91,16 +87,25 @@ | |||
91 | 87 | ||
92 | /* Definitions for 1st level */ | 88 | /* Definitions for 1st level */ |
93 | #define PGDIR_SHIFT (PMD_SHIFT + BITS_PER_PMD) | 89 | #define PGDIR_SHIFT (PMD_SHIFT + BITS_PER_PMD) |
90 | #if (PGDIR_SHIFT + PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) > BITS_PER_LONG | ||
91 | #define BITS_PER_PGD (BITS_PER_LONG - PGDIR_SHIFT) | ||
92 | #else | ||
94 | #define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) | 93 | #define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) |
94 | #endif | ||
95 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 95 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
96 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 96 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
97 | #define PTRS_PER_PGD (1UL << BITS_PER_PGD) | 97 | #define PTRS_PER_PGD (1UL << BITS_PER_PGD) |
98 | #define USER_PTRS_PER_PGD PTRS_PER_PGD | 98 | #define USER_PTRS_PER_PGD PTRS_PER_PGD |
99 | 99 | ||
100 | #ifdef CONFIG_64BIT | ||
100 | #define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD) | 101 | #define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD) |
101 | #define MAX_ADDRESS (1UL << MAX_ADDRBITS) | 102 | #define MAX_ADDRESS (1UL << MAX_ADDRBITS) |
102 | |||
103 | #define SPACEID_SHIFT (MAX_ADDRBITS - 32) | 103 | #define SPACEID_SHIFT (MAX_ADDRBITS - 32) |
104 | #else | ||
105 | #define MAX_ADDRBITS (BITS_PER_LONG) | ||
106 | #define MAX_ADDRESS (1UL << MAX_ADDRBITS) | ||
107 | #define SPACEID_SHIFT 0 | ||
108 | #endif | ||
104 | 109 | ||
105 | /* This calculates the number of initial pages we need for the initial | 110 | /* This calculates the number of initial pages we need for the initial |
106 | * page tables */ | 111 | * page tables */ |
diff --git a/arch/parisc/include/asm/smp.h b/arch/parisc/include/asm/smp.h index 6ef4b7867b1b..21eb45a52629 100644 --- a/arch/parisc/include/asm/smp.h +++ b/arch/parisc/include/asm/smp.h | |||
@@ -29,7 +29,8 @@ extern void smp_send_reschedule(int cpu); | |||
29 | extern void smp_send_all_nop(void); | 29 | extern void smp_send_all_nop(void); |
30 | 30 | ||
31 | extern void arch_send_call_function_single_ipi(int cpu); | 31 | extern void arch_send_call_function_single_ipi(int cpu); |
32 | extern void arch_send_call_function_ipi(cpumask_t mask); | 32 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
33 | #define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask | ||
33 | 34 | ||
34 | #endif /* !ASSEMBLY */ | 35 | #endif /* !ASSEMBLY */ |
35 | 36 | ||