diff options
Diffstat (limited to 'include/asm-sparc')
-rw-r--r-- | include/asm-sparc/a.out-core.h | 52 | ||||
-rw-r--r-- | include/asm-sparc/a.out.h | 9 | ||||
-rw-r--r-- | include/asm-sparc/page.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/param.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/pgalloc.h | 5 | ||||
-rw-r--r-- | include/asm-sparc/posix_types.h | 8 | ||||
-rw-r--r-- | include/asm-sparc/processor.h | 4 | ||||
-rw-r--r-- | include/asm-sparc/uaccess.h | 1 |
8 files changed, 64 insertions, 19 deletions
diff --git a/include/asm-sparc/a.out-core.h b/include/asm-sparc/a.out-core.h new file mode 100644 index 000000000000..e8fd338ed0b2 --- /dev/null +++ b/include/asm-sparc/a.out-core.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* a.out coredump register dumper | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_A_OUT_CORE_H | ||
13 | #define _ASM_A_OUT_CORE_H | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | #include <linux/user.h> | ||
18 | |||
19 | /* | ||
20 | * fill in the user structure for an a.out core dump | ||
21 | */ | ||
22 | static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) | ||
23 | { | ||
24 | unsigned long first_stack_page; | ||
25 | |||
26 | dump->magic = SUNOS_CORE_MAGIC; | ||
27 | dump->len = sizeof(struct user); | ||
28 | dump->regs.psr = regs->psr; | ||
29 | dump->regs.pc = regs->pc; | ||
30 | dump->regs.npc = regs->npc; | ||
31 | dump->regs.y = regs->y; | ||
32 | /* fuck me plenty */ | ||
33 | memcpy(&dump->regs.regs[0], ®s->u_regs[1], (sizeof(unsigned long) * 15)); | ||
34 | dump->uexec = current->thread.core_exec; | ||
35 | dump->u_tsize = (((unsigned long) current->mm->end_code) - | ||
36 | ((unsigned long) current->mm->start_code)) & ~(PAGE_SIZE - 1); | ||
37 | dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))); | ||
38 | dump->u_dsize -= dump->u_tsize; | ||
39 | dump->u_dsize &= ~(PAGE_SIZE - 1); | ||
40 | first_stack_page = (regs->u_regs[UREG_FP] & ~(PAGE_SIZE - 1)); | ||
41 | dump->u_ssize = (TASK_SIZE - first_stack_page) & ~(PAGE_SIZE - 1); | ||
42 | memcpy(&dump->fpu.fpstatus.fregs.regs[0], ¤t->thread.float_regs[0], (sizeof(unsigned long) * 32)); | ||
43 | dump->fpu.fpstatus.fsr = current->thread.fsr; | ||
44 | dump->fpu.fpstatus.flags = dump->fpu.fpstatus.extra = 0; | ||
45 | dump->fpu.fpstatus.fpq_count = current->thread.fpqdepth; | ||
46 | memcpy(&dump->fpu.fpstatus.fpq[0], ¤t->thread.fpqueue[0], | ||
47 | ((sizeof(unsigned long) * 2) * 16)); | ||
48 | dump->sigcode = 0; | ||
49 | } | ||
50 | |||
51 | #endif /* __KERNEL__ */ | ||
52 | #endif /* _ASM_A_OUT_CORE_H */ | ||
diff --git a/include/asm-sparc/a.out.h b/include/asm-sparc/a.out.h index 917e04250696..744cfe6c0de8 100644 --- a/include/asm-sparc/a.out.h +++ b/include/asm-sparc/a.out.h | |||
@@ -87,13 +87,4 @@ struct relocation_info /* used when header.a_machtype == M_SPARC */ | |||
87 | 87 | ||
88 | #define N_RELOCATION_INFO_DECLARED 1 | 88 | #define N_RELOCATION_INFO_DECLARED 1 |
89 | 89 | ||
90 | #ifdef __KERNEL__ | ||
91 | |||
92 | #include <asm/page.h> | ||
93 | |||
94 | #define STACK_TOP (PAGE_OFFSET - PAGE_SIZE) | ||
95 | #define STACK_TOP_MAX STACK_TOP | ||
96 | |||
97 | #endif /* __KERNEL__ */ | ||
98 | |||
99 | #endif /* __SPARC_A_OUT_H__ */ | 90 | #endif /* __SPARC_A_OUT_H__ */ |
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index cbc48c0c4e15..39ccf2da297c 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h | |||
@@ -123,6 +123,8 @@ typedef unsigned long iopgprot_t; | |||
123 | 123 | ||
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | typedef struct page *pgtable_t; | ||
127 | |||
126 | extern unsigned long sparc_unmapped_base; | 128 | extern unsigned long sparc_unmapped_base; |
127 | 129 | ||
128 | BTFIXUPDEF_SETHI(sparc_unmapped_base) | 130 | BTFIXUPDEF_SETHI(sparc_unmapped_base) |
diff --git a/include/asm-sparc/param.h b/include/asm-sparc/param.h index beaf02d364f2..86ba59af9d2c 100644 --- a/include/asm-sparc/param.h +++ b/include/asm-sparc/param.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #define _ASMSPARC_PARAM_H | 3 | #define _ASMSPARC_PARAM_H |
4 | 4 | ||
5 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
6 | # define HZ 100 /* Internal kernel timer frequency */ | 6 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ |
7 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | 7 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ |
8 | # define CLOCKS_PER_SEC (USER_HZ) | 8 | # define CLOCKS_PER_SEC (USER_HZ) |
9 | #endif | 9 | #endif |
diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h index b5fbdd36447f..6292cd00e5af 100644 --- a/include/asm-sparc/pgalloc.h +++ b/include/asm-sparc/pgalloc.h | |||
@@ -50,10 +50,11 @@ BTFIXUPDEF_CALL(void, free_pmd_fast, pmd_t *) | |||
50 | 50 | ||
51 | BTFIXUPDEF_CALL(void, pmd_populate, pmd_t *, struct page *) | 51 | BTFIXUPDEF_CALL(void, pmd_populate, pmd_t *, struct page *) |
52 | #define pmd_populate(MM, PMD, PTE) BTFIXUP_CALL(pmd_populate)(PMD, PTE) | 52 | #define pmd_populate(MM, PMD, PTE) BTFIXUP_CALL(pmd_populate)(PMD, PTE) |
53 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
53 | BTFIXUPDEF_CALL(void, pmd_set, pmd_t *, pte_t *) | 54 | BTFIXUPDEF_CALL(void, pmd_set, pmd_t *, pte_t *) |
54 | #define pmd_populate_kernel(MM, PMD, PTE) BTFIXUP_CALL(pmd_set)(PMD, PTE) | 55 | #define pmd_populate_kernel(MM, PMD, PTE) BTFIXUP_CALL(pmd_set)(PMD, PTE) |
55 | 56 | ||
56 | BTFIXUPDEF_CALL(struct page *, pte_alloc_one, struct mm_struct *, unsigned long) | 57 | BTFIXUPDEF_CALL(pgtable_t , pte_alloc_one, struct mm_struct *, unsigned long) |
57 | #define pte_alloc_one(mm, address) BTFIXUP_CALL(pte_alloc_one)(mm, address) | 58 | #define pte_alloc_one(mm, address) BTFIXUP_CALL(pte_alloc_one)(mm, address) |
58 | BTFIXUPDEF_CALL(pte_t *, pte_alloc_one_kernel, struct mm_struct *, unsigned long) | 59 | BTFIXUPDEF_CALL(pte_t *, pte_alloc_one_kernel, struct mm_struct *, unsigned long) |
59 | #define pte_alloc_one_kernel(mm, addr) BTFIXUP_CALL(pte_alloc_one_kernel)(mm, addr) | 60 | #define pte_alloc_one_kernel(mm, addr) BTFIXUP_CALL(pte_alloc_one_kernel)(mm, addr) |
@@ -61,7 +62,7 @@ BTFIXUPDEF_CALL(pte_t *, pte_alloc_one_kernel, struct mm_struct *, unsigned long | |||
61 | BTFIXUPDEF_CALL(void, free_pte_fast, pte_t *) | 62 | BTFIXUPDEF_CALL(void, free_pte_fast, pte_t *) |
62 | #define pte_free_kernel(mm, pte) BTFIXUP_CALL(free_pte_fast)(pte) | 63 | #define pte_free_kernel(mm, pte) BTFIXUP_CALL(free_pte_fast)(pte) |
63 | 64 | ||
64 | BTFIXUPDEF_CALL(void, pte_free, struct page *) | 65 | BTFIXUPDEF_CALL(void, pte_free, pgtable_t ) |
65 | #define pte_free(mm, pte) BTFIXUP_CALL(pte_free)(pte) | 66 | #define pte_free(mm, pte) BTFIXUP_CALL(pte_free)(pte) |
66 | #define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) | 67 | #define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) |
67 | 68 | ||
diff --git a/include/asm-sparc/posix_types.h b/include/asm-sparc/posix_types.h index 62c8fa7b36d4..dcc07eb5e181 100644 --- a/include/asm-sparc/posix_types.h +++ b/include/asm-sparc/posix_types.h | |||
@@ -39,14 +39,10 @@ typedef long long __kernel_loff_t; | |||
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | typedef struct { | 41 | typedef struct { |
42 | #if defined(__KERNEL__) || defined(__USE_ALL) | ||
43 | int val[2]; | 42 | int val[2]; |
44 | #else /* !defined(__KERNEL__) && !defined(__USE_ALL) */ | ||
45 | int __val[2]; | ||
46 | #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ | ||
47 | } __kernel_fsid_t; | 43 | } __kernel_fsid_t; |
48 | 44 | ||
49 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 45 | #if defined(__KERNEL__) |
50 | 46 | ||
51 | #undef __FD_SET | 47 | #undef __FD_SET |
52 | static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) | 48 | static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) |
@@ -117,6 +113,6 @@ static inline void __FD_ZERO(__kernel_fd_set *p) | |||
117 | } | 113 | } |
118 | } | 114 | } |
119 | 115 | ||
120 | #endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */ | 116 | #endif /* defined(__KERNEL__) */ |
121 | 117 | ||
122 | #endif /* !(__ARCH_SPARC_POSIX_TYPES_H) */ | 118 | #endif /* !(__ARCH_SPARC_POSIX_TYPES_H) */ |
diff --git a/include/asm-sparc/processor.h b/include/asm-sparc/processor.h index 6fbb3f0af8d8..40b1e41fdea7 100644 --- a/include/asm-sparc/processor.h +++ b/include/asm-sparc/processor.h | |||
@@ -33,6 +33,10 @@ | |||
33 | * we can make our access_ok test faster | 33 | * we can make our access_ok test faster |
34 | */ | 34 | */ |
35 | #define TASK_SIZE PAGE_OFFSET | 35 | #define TASK_SIZE PAGE_OFFSET |
36 | #ifdef __KERNEL__ | ||
37 | #define STACK_TOP (PAGE_OFFSET - PAGE_SIZE) | ||
38 | #define STACK_TOP_MAX STACK_TOP | ||
39 | #endif /* __KERNEL__ */ | ||
36 | 40 | ||
37 | struct task_struct; | 41 | struct task_struct; |
38 | 42 | ||
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h index 3cf132e1aa25..366b11696ee3 100644 --- a/include/asm-sparc/uaccess.h +++ b/include/asm-sparc/uaccess.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <asm/vac-ops.h> | 15 | #include <asm/vac-ops.h> |
16 | #include <asm/a.out.h> | ||
17 | #endif | 16 | #endif |
18 | 17 | ||
19 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |