diff options
Diffstat (limited to 'include')
77 files changed, 846 insertions, 1204 deletions
diff --git a/include/asm-blackfin/page.h b/include/asm-blackfin/page.h index d5c9d1433781..c7db0220fbd6 100644 --- a/include/asm-blackfin/page.h +++ b/include/asm-blackfin/page.h | |||
@@ -39,6 +39,7 @@ typedef struct { | |||
39 | typedef struct { | 39 | typedef struct { |
40 | unsigned long pgprot; | 40 | unsigned long pgprot; |
41 | } pgprot_t; | 41 | } pgprot_t; |
42 | typedef struct page *pgtable_t; | ||
42 | 43 | ||
43 | #define pte_val(x) ((x).pte) | 44 | #define pte_val(x) ((x).pte) |
44 | #define pmd_val(x) ((&x)->pmd[0]) | 45 | #define pmd_val(x) ((&x)->pmd[0]) |
diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h index a83492449130..d6a3eaf3b27e 100644 --- a/include/asm-h8300/page.h +++ b/include/asm-h8300/page.h | |||
@@ -31,6 +31,7 @@ typedef struct { unsigned long pte; } pte_t; | |||
31 | typedef struct { unsigned long pmd[16]; } pmd_t; | 31 | typedef struct { unsigned long pmd[16]; } pmd_t; |
32 | typedef struct { unsigned long pgd; } pgd_t; | 32 | typedef struct { unsigned long pgd; } pgd_t; |
33 | typedef struct { unsigned long pgprot; } pgprot_t; | 33 | typedef struct { unsigned long pgprot; } pgprot_t; |
34 | typedef struct page *pgtable_t; | ||
34 | 35 | ||
35 | #define pte_val(x) ((x).pte) | 36 | #define pte_val(x) ((x).pte) |
36 | #define pmd_val(x) ((&x)->pmd[0]) | 37 | #define pmd_val(x) ((&x)->pmd[0]) |
diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index 6af480c7f291..1e82ebb7d644 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h | |||
@@ -31,6 +31,7 @@ typedef struct { unsigned long pte; } pte_t; | |||
31 | typedef struct { unsigned long pmd[16]; } pmd_t; | 31 | typedef struct { unsigned long pmd[16]; } pmd_t; |
32 | typedef struct { unsigned long pgd; } pgd_t; | 32 | typedef struct { unsigned long pgd; } pgd_t; |
33 | typedef struct { unsigned long pgprot; } pgprot_t; | 33 | typedef struct { unsigned long pgprot; } pgprot_t; |
34 | typedef struct page *pgtable_t; | ||
34 | 35 | ||
35 | #define pte_val(x) ((x).pte) | 36 | #define pte_val(x) ((x).pte) |
36 | #define pmd_val(x) ((&x)->pmd[0]) | 37 | #define pmd_val(x) ((&x)->pmd[0]) |
diff --git a/include/asm-s390/a.out.h b/include/asm-s390/a.out.h deleted file mode 100644 index 8d6bd9c2952e..000000000000 --- a/include/asm-s390/a.out.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-s390/a.out.h | ||
3 | * | ||
4 | * S390 version | ||
5 | * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
6 | * | ||
7 | * Derived from "include/asm-i386/a.out.h" | ||
8 | * Copyright (C) 1992, Linus Torvalds | ||
9 | * | ||
10 | * I don't think we'll ever need a.out ... | ||
11 | */ | ||
12 | |||
13 | #ifndef __S390_A_OUT_H__ | ||
14 | #define __S390_A_OUT_H__ | ||
15 | |||
16 | struct exec | ||
17 | { | ||
18 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ | ||
19 | unsigned a_text; /* length of text, in bytes */ | ||
20 | unsigned a_data; /* length of data, in bytes */ | ||
21 | unsigned a_bss; /* length of uninitialized data area for file, in bytes */ | ||
22 | unsigned a_syms; /* length of symbol table data in file, in bytes */ | ||
23 | unsigned a_entry; /* start address */ | ||
24 | unsigned a_trsize; /* length of relocation info for text, in bytes */ | ||
25 | unsigned a_drsize; /* length of relocation info for data, in bytes */ | ||
26 | }; | ||
27 | |||
28 | #define N_TRSIZE(a) ((a).a_trsize) | ||
29 | #define N_DRSIZE(a) ((a).a_drsize) | ||
30 | #define N_SYMSIZE(a) ((a).a_syms) | ||
31 | |||
32 | #endif /* __A_OUT_GNU_H__ */ | ||
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 882db054110c..ab83c844d04c 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h | |||
@@ -472,7 +472,7 @@ static inline unsigned long __ffz_word_loop(const unsigned long *addr, | |||
472 | " brct %1,0b\n" | 472 | " brct %1,0b\n" |
473 | "1:\n" | 473 | "1:\n" |
474 | #endif | 474 | #endif |
475 | : "+a" (bytes), "+d" (size) | 475 | : "+&a" (bytes), "+&d" (size) |
476 | : "d" (-1UL), "a" (addr), "m" (*(addrtype *) addr) | 476 | : "d" (-1UL), "a" (addr), "m" (*(addrtype *) addr) |
477 | : "cc" ); | 477 | : "cc" ); |
478 | return bytes; | 478 | return bytes; |
@@ -507,7 +507,7 @@ static inline unsigned long __ffs_word_loop(const unsigned long *addr, | |||
507 | " brct %1,0b\n" | 507 | " brct %1,0b\n" |
508 | "1:\n" | 508 | "1:\n" |
509 | #endif | 509 | #endif |
510 | : "+a" (bytes), "+a" (size) | 510 | : "+&a" (bytes), "+&a" (size) |
511 | : "d" (0UL), "a" (addr), "m" (*(addrtype *) addr) | 511 | : "d" (0UL), "a" (addr), "m" (*(addrtype *) addr) |
512 | : "cc" ); | 512 | : "cc" ); |
513 | return bytes; | 513 | return bytes; |
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h index b73a424d0f97..b3ac262c4582 100644 --- a/include/asm-s390/elf.h +++ b/include/asm-s390/elf.h | |||
@@ -115,6 +115,7 @@ typedef s390_regs elf_gregset_t; | |||
115 | 115 | ||
116 | #include <linux/sched.h> /* for task_struct */ | 116 | #include <linux/sched.h> /* for task_struct */ |
117 | #include <asm/system.h> /* for save_access_regs */ | 117 | #include <asm/system.h> /* for save_access_regs */ |
118 | #include <asm/mmu_context.h> | ||
118 | 119 | ||
119 | /* | 120 | /* |
120 | * This is used to ensure we don't load something for the wrong architecture. | 121 | * This is used to ensure we don't load something for the wrong architecture. |
@@ -137,14 +138,7 @@ typedef s390_regs elf_gregset_t; | |||
137 | use of this is to invoke "./ld.so someprog" to test out a new version of | 138 | use of this is to invoke "./ld.so someprog" to test out a new version of |
138 | the loader. We need to make sure that it is out of the way of the program | 139 | the loader. We need to make sure that it is out of the way of the program |
139 | that it will "exec", and that there is sufficient room for the brk. */ | 140 | that it will "exec", and that there is sufficient room for the brk. */ |
140 | 141 | #define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2) | |
141 | #ifndef __s390x__ | ||
142 | #define ELF_ET_DYN_BASE ((TASK_SIZE & 0x80000000) \ | ||
143 | ? TASK_SIZE / 3 * 2 \ | ||
144 | : 2 * TASK_SIZE / 3) | ||
145 | #else /* __s390x__ */ | ||
146 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) | ||
147 | #endif /* __s390x__ */ | ||
148 | 142 | ||
149 | /* Wow, the "main" arch needs arch dependent functions too.. :) */ | 143 | /* Wow, the "main" arch needs arch dependent functions too.. :) */ |
150 | 144 | ||
@@ -214,4 +208,16 @@ do { \ | |||
214 | } while (0) | 208 | } while (0) |
215 | #endif /* __s390x__ */ | 209 | #endif /* __s390x__ */ |
216 | 210 | ||
211 | /* | ||
212 | * An executable for which elf_read_implies_exec() returns TRUE will | ||
213 | * have the READ_IMPLIES_EXEC personality flag set automatically. | ||
214 | */ | ||
215 | #define elf_read_implies_exec(ex, executable_stack) \ | ||
216 | ({ \ | ||
217 | if (current->mm->context.noexec && \ | ||
218 | executable_stack != EXSTACK_DISABLE_X) \ | ||
219 | disable_noexec(current->mm, current); \ | ||
220 | current->mm->context.noexec == 0; \ | ||
221 | }) | ||
222 | |||
217 | #endif | 223 | #endif |
diff --git a/include/asm-s390/mmu.h b/include/asm-s390/mmu.h index ccd36d26615a..1698e29c5b20 100644 --- a/include/asm-s390/mmu.h +++ b/include/asm-s390/mmu.h | |||
@@ -1,7 +1,12 @@ | |||
1 | #ifndef __MMU_H | 1 | #ifndef __MMU_H |
2 | #define __MMU_H | 2 | #define __MMU_H |
3 | 3 | ||
4 | /* Default "unsigned long" context */ | 4 | typedef struct { |
5 | typedef unsigned long mm_context_t; | 5 | struct list_head crst_list; |
6 | struct list_head pgtable_list; | ||
7 | unsigned long asce_bits; | ||
8 | unsigned long asce_limit; | ||
9 | int noexec; | ||
10 | } mm_context_t; | ||
6 | 11 | ||
7 | #endif | 12 | #endif |
diff --git a/include/asm-s390/mmu_context.h b/include/asm-s390/mmu_context.h index a77d4ba3c8eb..b5a34c6f91a9 100644 --- a/include/asm-s390/mmu_context.h +++ b/include/asm-s390/mmu_context.h | |||
@@ -10,15 +10,19 @@ | |||
10 | #define __S390_MMU_CONTEXT_H | 10 | #define __S390_MMU_CONTEXT_H |
11 | 11 | ||
12 | #include <asm/pgalloc.h> | 12 | #include <asm/pgalloc.h> |
13 | #include <asm/uaccess.h> | ||
13 | #include <asm-generic/mm_hooks.h> | 14 | #include <asm-generic/mm_hooks.h> |
14 | 15 | ||
15 | static inline int init_new_context(struct task_struct *tsk, | 16 | static inline int init_new_context(struct task_struct *tsk, |
16 | struct mm_struct *mm) | 17 | struct mm_struct *mm) |
17 | { | 18 | { |
18 | mm->context = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS; | 19 | mm->context.asce_bits = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS; |
19 | #ifdef CONFIG_64BIT | 20 | #ifdef CONFIG_64BIT |
20 | mm->context |= _ASCE_TYPE_REGION3; | 21 | mm->context.asce_bits |= _ASCE_TYPE_REGION3; |
21 | #endif | 22 | #endif |
23 | mm->context.noexec = s390_noexec; | ||
24 | mm->context.asce_limit = STACK_TOP_MAX; | ||
25 | crst_table_init((unsigned long *) mm->pgd, pgd_entry_type(mm)); | ||
22 | return 0; | 26 | return 0; |
23 | } | 27 | } |
24 | 28 | ||
@@ -32,24 +36,25 @@ static inline int init_new_context(struct task_struct *tsk, | |||
32 | 36 | ||
33 | static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk) | 37 | static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk) |
34 | { | 38 | { |
35 | S390_lowcore.user_asce = mm->context | __pa(mm->pgd); | 39 | pgd_t *pgd = mm->pgd; |
40 | |||
41 | S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd); | ||
36 | if (switch_amode) { | 42 | if (switch_amode) { |
37 | /* Load primary space page table origin. */ | 43 | /* Load primary space page table origin. */ |
38 | pgd_t *shadow_pgd = get_shadow_table(mm->pgd) ? : mm->pgd; | 44 | pgd = mm->context.noexec ? get_shadow_table(pgd) : pgd; |
39 | S390_lowcore.user_exec_asce = mm->context | __pa(shadow_pgd); | 45 | S390_lowcore.user_exec_asce = mm->context.asce_bits | __pa(pgd); |
40 | asm volatile(LCTL_OPCODE" 1,1,%0\n" | 46 | asm volatile(LCTL_OPCODE" 1,1,%0\n" |
41 | : : "m" (S390_lowcore.user_exec_asce) ); | 47 | : : "m" (S390_lowcore.user_exec_asce) ); |
42 | } else | 48 | } else |
43 | /* Load home space page table origin. */ | 49 | /* Load home space page table origin. */ |
44 | asm volatile(LCTL_OPCODE" 13,13,%0" | 50 | asm volatile(LCTL_OPCODE" 13,13,%0" |
45 | : : "m" (S390_lowcore.user_asce) ); | 51 | : : "m" (S390_lowcore.user_asce) ); |
52 | set_fs(current->thread.mm_segment); | ||
46 | } | 53 | } |
47 | 54 | ||
48 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 55 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
49 | struct task_struct *tsk) | 56 | struct task_struct *tsk) |
50 | { | 57 | { |
51 | if (unlikely(prev == next)) | ||
52 | return; | ||
53 | cpu_set(smp_processor_id(), next->cpu_vm_mask); | 58 | cpu_set(smp_processor_id(), next->cpu_vm_mask); |
54 | update_mm(next, tsk); | 59 | update_mm(next, tsk); |
55 | } | 60 | } |
@@ -61,7 +66,6 @@ static inline void activate_mm(struct mm_struct *prev, | |||
61 | struct mm_struct *next) | 66 | struct mm_struct *next) |
62 | { | 67 | { |
63 | switch_mm(prev, next, current); | 68 | switch_mm(prev, next, current); |
64 | set_fs(current->thread.mm_segment); | ||
65 | } | 69 | } |
66 | 70 | ||
67 | #endif /* __S390_MMU_CONTEXT_H */ | 71 | #endif /* __S390_MMU_CONTEXT_H */ |
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index 7f29a981f48c..fe7f92b6ae6d 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -74,43 +74,17 @@ static inline void copy_page(void *to, void *from) | |||
74 | 74 | ||
75 | typedef struct { unsigned long pgprot; } pgprot_t; | 75 | typedef struct { unsigned long pgprot; } pgprot_t; |
76 | typedef struct { unsigned long pte; } pte_t; | 76 | typedef struct { unsigned long pte; } pte_t; |
77 | |||
78 | #define pte_val(x) ((x).pte) | ||
79 | #define pgprot_val(x) ((x).pgprot) | ||
80 | |||
81 | #ifndef __s390x__ | ||
82 | |||
83 | typedef struct { unsigned long pmd; } pmd_t; | 77 | typedef struct { unsigned long pmd; } pmd_t; |
84 | typedef struct { unsigned long pud; } pud_t; | 78 | typedef struct { unsigned long pud; } pud_t; |
85 | typedef struct { | ||
86 | unsigned long pgd0; | ||
87 | unsigned long pgd1; | ||
88 | unsigned long pgd2; | ||
89 | unsigned long pgd3; | ||
90 | } pgd_t; | ||
91 | |||
92 | #define pmd_val(x) ((x).pmd) | ||
93 | #define pud_val(x) ((x).pud) | ||
94 | #define pgd_val(x) ((x).pgd0) | ||
95 | |||
96 | #else /* __s390x__ */ | ||
97 | |||
98 | typedef struct { | ||
99 | unsigned long pmd0; | ||
100 | unsigned long pmd1; | ||
101 | } pmd_t; | ||
102 | typedef struct { unsigned long pud; } pud_t; | ||
103 | typedef struct { unsigned long pgd; } pgd_t; | 79 | typedef struct { unsigned long pgd; } pgd_t; |
80 | typedef pte_t *pgtable_t; | ||
104 | 81 | ||
105 | #define pmd_val(x) ((x).pmd0) | 82 | #define pgprot_val(x) ((x).pgprot) |
106 | #define pmd_val1(x) ((x).pmd1) | 83 | #define pte_val(x) ((x).pte) |
84 | #define pmd_val(x) ((x).pmd) | ||
107 | #define pud_val(x) ((x).pud) | 85 | #define pud_val(x) ((x).pud) |
108 | #define pgd_val(x) ((x).pgd) | 86 | #define pgd_val(x) ((x).pgd) |
109 | 87 | ||
110 | #endif /* __s390x__ */ | ||
111 | |||
112 | typedef struct page *pgtable_t; | ||
113 | |||
114 | #define __pte(x) ((pte_t) { (x) } ) | 88 | #define __pte(x) ((pte_t) { (x) } ) |
115 | #define __pmd(x) ((pmd_t) { (x) } ) | 89 | #define __pmd(x) ((pmd_t) { (x) } ) |
116 | #define __pgd(x) ((pgd_t) { (x) } ) | 90 | #define __pgd(x) ((pgd_t) { (x) } ) |
@@ -167,7 +141,7 @@ static inline int pfn_valid(unsigned long pfn) | |||
167 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 141 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
168 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 142 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
169 | 143 | ||
170 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 144 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ |
171 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 145 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
172 | 146 | ||
173 | #include <asm-generic/memory_model.h> | 147 | #include <asm-generic/memory_model.h> |
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 900d44807e10..f5b2bf3d7c1d 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h | |||
@@ -20,10 +20,11 @@ | |||
20 | #define check_pgt_cache() do {} while (0) | 20 | #define check_pgt_cache() do {} while (0) |
21 | 21 | ||
22 | unsigned long *crst_table_alloc(struct mm_struct *, int); | 22 | unsigned long *crst_table_alloc(struct mm_struct *, int); |
23 | void crst_table_free(unsigned long *); | 23 | void crst_table_free(struct mm_struct *, unsigned long *); |
24 | 24 | ||
25 | unsigned long *page_table_alloc(int); | 25 | unsigned long *page_table_alloc(struct mm_struct *); |
26 | void page_table_free(unsigned long *); | 26 | void page_table_free(struct mm_struct *, unsigned long *); |
27 | void disable_noexec(struct mm_struct *, struct task_struct *); | ||
27 | 28 | ||
28 | static inline void clear_table(unsigned long *s, unsigned long val, size_t n) | 29 | static inline void clear_table(unsigned long *s, unsigned long val, size_t n) |
29 | { | 30 | { |
@@ -72,23 +73,49 @@ static inline unsigned long pgd_entry_type(struct mm_struct *mm) | |||
72 | 73 | ||
73 | static inline unsigned long pgd_entry_type(struct mm_struct *mm) | 74 | static inline unsigned long pgd_entry_type(struct mm_struct *mm) |
74 | { | 75 | { |
75 | return _REGION3_ENTRY_EMPTY; | 76 | if (mm->context.asce_limit <= (1UL << 31)) |
77 | return _SEGMENT_ENTRY_EMPTY; | ||
78 | if (mm->context.asce_limit <= (1UL << 42)) | ||
79 | return _REGION3_ENTRY_EMPTY; | ||
80 | return _REGION2_ENTRY_EMPTY; | ||
76 | } | 81 | } |
77 | 82 | ||
78 | #define pud_alloc_one(mm,address) ({ BUG(); ((pud_t *)2); }) | 83 | int crst_table_upgrade(struct mm_struct *, unsigned long limit); |
79 | #define pud_free(mm, x) do { } while (0) | 84 | void crst_table_downgrade(struct mm_struct *, unsigned long limit); |
85 | |||
86 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address) | ||
87 | { | ||
88 | unsigned long *table = crst_table_alloc(mm, mm->context.noexec); | ||
89 | if (table) | ||
90 | crst_table_init(table, _REGION3_ENTRY_EMPTY); | ||
91 | return (pud_t *) table; | ||
92 | } | ||
93 | #define pud_free(mm, pud) crst_table_free(mm, (unsigned long *) pud) | ||
80 | 94 | ||
81 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) | 95 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) |
82 | { | 96 | { |
83 | unsigned long *crst = crst_table_alloc(mm, s390_noexec); | 97 | unsigned long *table = crst_table_alloc(mm, mm->context.noexec); |
84 | if (crst) | 98 | if (table) |
85 | crst_table_init(crst, _SEGMENT_ENTRY_EMPTY); | 99 | crst_table_init(table, _SEGMENT_ENTRY_EMPTY); |
86 | return (pmd_t *) crst; | 100 | return (pmd_t *) table; |
87 | } | 101 | } |
88 | #define pmd_free(mm, pmd) crst_table_free((unsigned long *)pmd) | 102 | #define pmd_free(mm, pmd) crst_table_free(mm, (unsigned long *) pmd) |
89 | 103 | ||
90 | #define pgd_populate(mm, pgd, pud) BUG() | 104 | static inline void pgd_populate_kernel(struct mm_struct *mm, |
91 | #define pgd_populate_kernel(mm, pgd, pud) BUG() | 105 | pgd_t *pgd, pud_t *pud) |
106 | { | ||
107 | pgd_val(*pgd) = _REGION2_ENTRY | __pa(pud); | ||
108 | } | ||
109 | |||
110 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) | ||
111 | { | ||
112 | pgd_populate_kernel(mm, pgd, pud); | ||
113 | if (mm->context.noexec) { | ||
114 | pgd = get_shadow_table(pgd); | ||
115 | pud = get_shadow_table(pud); | ||
116 | pgd_populate_kernel(mm, pgd, pud); | ||
117 | } | ||
118 | } | ||
92 | 119 | ||
93 | static inline void pud_populate_kernel(struct mm_struct *mm, | 120 | static inline void pud_populate_kernel(struct mm_struct *mm, |
94 | pud_t *pud, pmd_t *pmd) | 121 | pud_t *pud, pmd_t *pmd) |
@@ -98,63 +125,50 @@ static inline void pud_populate_kernel(struct mm_struct *mm, | |||
98 | 125 | ||
99 | static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) | 126 | static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) |
100 | { | 127 | { |
101 | pud_t *shadow_pud = get_shadow_table(pud); | ||
102 | pmd_t *shadow_pmd = get_shadow_table(pmd); | ||
103 | |||
104 | if (shadow_pud && shadow_pmd) | ||
105 | pud_populate_kernel(mm, shadow_pud, shadow_pmd); | ||
106 | pud_populate_kernel(mm, pud, pmd); | 128 | pud_populate_kernel(mm, pud, pmd); |
129 | if (mm->context.noexec) { | ||
130 | pud = get_shadow_table(pud); | ||
131 | pmd = get_shadow_table(pmd); | ||
132 | pud_populate_kernel(mm, pud, pmd); | ||
133 | } | ||
107 | } | 134 | } |
108 | 135 | ||
109 | #endif /* __s390x__ */ | 136 | #endif /* __s390x__ */ |
110 | 137 | ||
111 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | 138 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
112 | { | 139 | { |
113 | unsigned long *crst = crst_table_alloc(mm, s390_noexec); | 140 | INIT_LIST_HEAD(&mm->context.crst_list); |
114 | if (crst) | 141 | INIT_LIST_HEAD(&mm->context.pgtable_list); |
115 | crst_table_init(crst, pgd_entry_type(mm)); | 142 | return (pgd_t *) crst_table_alloc(mm, s390_noexec); |
116 | return (pgd_t *) crst; | ||
117 | } | 143 | } |
118 | #define pgd_free(mm, pgd) crst_table_free((unsigned long *) pgd) | 144 | #define pgd_free(mm, pgd) crst_table_free(mm, (unsigned long *) pgd) |
119 | 145 | ||
120 | static inline void | 146 | static inline void pmd_populate_kernel(struct mm_struct *mm, |
121 | pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) | 147 | pmd_t *pmd, pte_t *pte) |
122 | { | 148 | { |
123 | #ifndef __s390x__ | ||
124 | pmd_val(pmd[0]) = _SEGMENT_ENTRY + __pa(pte); | ||
125 | pmd_val(pmd[1]) = _SEGMENT_ENTRY + __pa(pte+256); | ||
126 | pmd_val(pmd[2]) = _SEGMENT_ENTRY + __pa(pte+512); | ||
127 | pmd_val(pmd[3]) = _SEGMENT_ENTRY + __pa(pte+768); | ||
128 | #else /* __s390x__ */ | ||
129 | pmd_val(*pmd) = _SEGMENT_ENTRY + __pa(pte); | 149 | pmd_val(*pmd) = _SEGMENT_ENTRY + __pa(pte); |
130 | pmd_val1(*pmd) = _SEGMENT_ENTRY + __pa(pte+256); | ||
131 | #endif /* __s390x__ */ | ||
132 | } | 150 | } |
133 | 151 | ||
134 | static inline void | 152 | static inline void pmd_populate(struct mm_struct *mm, |
135 | pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) | 153 | pmd_t *pmd, pgtable_t pte) |
136 | { | 154 | { |
137 | pte_t *pte = (pte_t *)page_to_phys(page); | ||
138 | pmd_t *shadow_pmd = get_shadow_table(pmd); | ||
139 | pte_t *shadow_pte = get_shadow_pte(pte); | ||
140 | |||
141 | pmd_populate_kernel(mm, pmd, pte); | 155 | pmd_populate_kernel(mm, pmd, pte); |
142 | if (shadow_pmd && shadow_pte) | 156 | if (mm->context.noexec) { |
143 | pmd_populate_kernel(mm, shadow_pmd, shadow_pte); | 157 | pmd = get_shadow_table(pmd); |
158 | pmd_populate_kernel(mm, pmd, pte + PTRS_PER_PTE); | ||
159 | } | ||
144 | } | 160 | } |
145 | #define pmd_pgtable(pmd) pmd_page(pmd) | 161 | |
162 | #define pmd_pgtable(pmd) \ | ||
163 | (pgtable_t)(pmd_val(pmd) & -sizeof(pte_t)*PTRS_PER_PTE) | ||
146 | 164 | ||
147 | /* | 165 | /* |
148 | * page table entry allocation/free routines. | 166 | * page table entry allocation/free routines. |
149 | */ | 167 | */ |
150 | #define pte_alloc_one_kernel(mm, vmaddr) \ | 168 | #define pte_alloc_one_kernel(mm, vmaddr) ((pte_t *) page_table_alloc(mm)) |
151 | ((pte_t *) page_table_alloc(s390_noexec)) | 169 | #define pte_alloc_one(mm, vmaddr) ((pte_t *) page_table_alloc(mm)) |
152 | #define pte_alloc_one(mm, vmaddr) \ | 170 | |
153 | virt_to_page(page_table_alloc(s390_noexec)) | 171 | #define pte_free_kernel(mm, pte) page_table_free(mm, (unsigned long *) pte) |
154 | 172 | #define pte_free(mm, pte) page_table_free(mm, (unsigned long *) pte) | |
155 | #define pte_free_kernel(mm, pte) \ | ||
156 | page_table_free((unsigned long *) pte) | ||
157 | #define pte_free(mm, pte) \ | ||
158 | page_table_free((unsigned long *) page_to_phys((struct page *) pte)) | ||
159 | 173 | ||
160 | #endif /* _S390_PGALLOC_H */ | 174 | #endif /* _S390_PGALLOC_H */ |
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 3f520754e71c..65154dc9a9e5 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -57,21 +57,21 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
57 | * PGDIR_SHIFT determines what a third-level page table entry can map | 57 | * PGDIR_SHIFT determines what a third-level page table entry can map |
58 | */ | 58 | */ |
59 | #ifndef __s390x__ | 59 | #ifndef __s390x__ |
60 | # define PMD_SHIFT 22 | 60 | # define PMD_SHIFT 20 |
61 | # define PUD_SHIFT 22 | 61 | # define PUD_SHIFT 20 |
62 | # define PGDIR_SHIFT 22 | 62 | # define PGDIR_SHIFT 20 |
63 | #else /* __s390x__ */ | 63 | #else /* __s390x__ */ |
64 | # define PMD_SHIFT 21 | 64 | # define PMD_SHIFT 20 |
65 | # define PUD_SHIFT 31 | 65 | # define PUD_SHIFT 31 |
66 | # define PGDIR_SHIFT 31 | 66 | # define PGDIR_SHIFT 42 |
67 | #endif /* __s390x__ */ | 67 | #endif /* __s390x__ */ |
68 | 68 | ||
69 | #define PMD_SIZE (1UL << PMD_SHIFT) | 69 | #define PMD_SIZE (1UL << PMD_SHIFT) |
70 | #define PMD_MASK (~(PMD_SIZE-1)) | 70 | #define PMD_MASK (~(PMD_SIZE-1)) |
71 | #define PUD_SIZE (1UL << PUD_SHIFT) | 71 | #define PUD_SIZE (1UL << PUD_SHIFT) |
72 | #define PUD_MASK (~(PUD_SIZE-1)) | 72 | #define PUD_MASK (~(PUD_SIZE-1)) |
73 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 73 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
74 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 74 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * entries per page directory level: the S390 is two-level, so | 77 | * entries per page directory level: the S390 is two-level, so |
@@ -79,17 +79,15 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
79 | * for S390 segment-table entries are combined to one PGD | 79 | * for S390 segment-table entries are combined to one PGD |
80 | * that leads to 1024 pte per pgd | 80 | * that leads to 1024 pte per pgd |
81 | */ | 81 | */ |
82 | #define PTRS_PER_PTE 256 | ||
82 | #ifndef __s390x__ | 83 | #ifndef __s390x__ |
83 | # define PTRS_PER_PTE 1024 | 84 | #define PTRS_PER_PMD 1 |
84 | # define PTRS_PER_PMD 1 | 85 | #define PTRS_PER_PUD 1 |
85 | # define PTRS_PER_PUD 1 | ||
86 | # define PTRS_PER_PGD 512 | ||
87 | #else /* __s390x__ */ | 86 | #else /* __s390x__ */ |
88 | # define PTRS_PER_PTE 512 | 87 | #define PTRS_PER_PMD 2048 |
89 | # define PTRS_PER_PMD 1024 | 88 | #define PTRS_PER_PUD 2048 |
90 | # define PTRS_PER_PUD 1 | ||
91 | # define PTRS_PER_PGD 2048 | ||
92 | #endif /* __s390x__ */ | 89 | #endif /* __s390x__ */ |
90 | #define PTRS_PER_PGD 2048 | ||
93 | 91 | ||
94 | #define FIRST_USER_ADDRESS 0 | 92 | #define FIRST_USER_ADDRESS 0 |
95 | 93 | ||
@@ -127,8 +125,9 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
127 | * mapping. This needs to be calculated at compile time since the size of the | 125 | * mapping. This needs to be calculated at compile time since the size of the |
128 | * VMEM_MAP is static but the size of struct page can change. | 126 | * VMEM_MAP is static but the size of struct page can change. |
129 | */ | 127 | */ |
130 | #define VMEM_MAX_PHYS min(VMALLOC_START, ((VMEM_MAP_END - VMALLOC_END) / \ | 128 | #define VMEM_MAX_PAGES ((VMEM_MAP_END - VMALLOC_END) / sizeof(struct page)) |
131 | sizeof(struct page) * PAGE_SIZE) & ~((16 << 20) - 1)) | 129 | #define VMEM_MAX_PFN min(VMALLOC_START >> PAGE_SHIFT, VMEM_MAX_PAGES) |
130 | #define VMEM_MAX_PHYS ((VMEM_MAX_PFN << PAGE_SHIFT) & ~((16 << 20) - 1)) | ||
132 | #define VMEM_MAP ((struct page *) VMALLOC_END) | 131 | #define VMEM_MAP ((struct page *) VMALLOC_END) |
133 | 132 | ||
134 | /* | 133 | /* |
@@ -375,24 +374,6 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
375 | # define PxD_SHADOW_SHIFT 2 | 374 | # define PxD_SHADOW_SHIFT 2 |
376 | #endif /* __s390x__ */ | 375 | #endif /* __s390x__ */ |
377 | 376 | ||
378 | static inline struct page *get_shadow_page(struct page *page) | ||
379 | { | ||
380 | if (s390_noexec && page->index) | ||
381 | return virt_to_page((void *)(addr_t) page->index); | ||
382 | return NULL; | ||
383 | } | ||
384 | |||
385 | static inline void *get_shadow_pte(void *table) | ||
386 | { | ||
387 | unsigned long addr, offset; | ||
388 | struct page *page; | ||
389 | |||
390 | addr = (unsigned long) table; | ||
391 | offset = addr & (PAGE_SIZE - 1); | ||
392 | page = virt_to_page((void *)(addr ^ offset)); | ||
393 | return (void *)(addr_t)(page->index ? (page->index | offset) : 0UL); | ||
394 | } | ||
395 | |||
396 | static inline void *get_shadow_table(void *table) | 377 | static inline void *get_shadow_table(void *table) |
397 | { | 378 | { |
398 | unsigned long addr, offset; | 379 | unsigned long addr, offset; |
@@ -410,17 +391,16 @@ static inline void *get_shadow_table(void *table) | |||
410 | * hook is made available. | 391 | * hook is made available. |
411 | */ | 392 | */ |
412 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | 393 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, |
413 | pte_t *pteptr, pte_t pteval) | 394 | pte_t *ptep, pte_t entry) |
414 | { | 395 | { |
415 | pte_t *shadow_pte = get_shadow_pte(pteptr); | 396 | *ptep = entry; |
416 | 397 | if (mm->context.noexec) { | |
417 | *pteptr = pteval; | 398 | if (!(pte_val(entry) & _PAGE_INVALID) && |
418 | if (shadow_pte) { | 399 | (pte_val(entry) & _PAGE_SWX)) |
419 | if (!(pte_val(pteval) & _PAGE_INVALID) && | 400 | pte_val(entry) |= _PAGE_RO; |
420 | (pte_val(pteval) & _PAGE_SWX)) | ||
421 | pte_val(*shadow_pte) = pte_val(pteval) | _PAGE_RO; | ||
422 | else | 401 | else |
423 | pte_val(*shadow_pte) = _PAGE_TYPE_EMPTY; | 402 | pte_val(entry) = _PAGE_TYPE_EMPTY; |
403 | ptep[PTRS_PER_PTE] = entry; | ||
424 | } | 404 | } |
425 | } | 405 | } |
426 | 406 | ||
@@ -439,24 +419,58 @@ static inline int pud_bad(pud_t pud) { return 0; } | |||
439 | 419 | ||
440 | #else /* __s390x__ */ | 420 | #else /* __s390x__ */ |
441 | 421 | ||
442 | static inline int pgd_present(pgd_t pgd) { return 1; } | 422 | static inline int pgd_present(pgd_t pgd) |
443 | static inline int pgd_none(pgd_t pgd) { return 0; } | 423 | { |
444 | static inline int pgd_bad(pgd_t pgd) { return 0; } | 424 | if ((pgd_val(pgd) & _REGION_ENTRY_TYPE_MASK) < _REGION_ENTRY_TYPE_R2) |
425 | return 1; | ||
426 | return (pgd_val(pgd) & _REGION_ENTRY_ORIGIN) != 0UL; | ||
427 | } | ||
428 | |||
429 | static inline int pgd_none(pgd_t pgd) | ||
430 | { | ||
431 | if ((pgd_val(pgd) & _REGION_ENTRY_TYPE_MASK) < _REGION_ENTRY_TYPE_R2) | ||
432 | return 0; | ||
433 | return (pgd_val(pgd) & _REGION_ENTRY_INV) != 0UL; | ||
434 | } | ||
435 | |||
436 | static inline int pgd_bad(pgd_t pgd) | ||
437 | { | ||
438 | /* | ||
439 | * With dynamic page table levels the pgd can be a region table | ||
440 | * entry or a segment table entry. Check for the bit that are | ||
441 | * invalid for either table entry. | ||
442 | */ | ||
443 | unsigned long mask = | ||
444 | ~_SEGMENT_ENTRY_ORIGIN & ~_REGION_ENTRY_INV & | ||
445 | ~_REGION_ENTRY_TYPE_MASK & ~_REGION_ENTRY_LENGTH; | ||
446 | return (pgd_val(pgd) & mask) != 0; | ||
447 | } | ||
445 | 448 | ||
446 | static inline int pud_present(pud_t pud) | 449 | static inline int pud_present(pud_t pud) |
447 | { | 450 | { |
451 | if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) < _REGION_ENTRY_TYPE_R3) | ||
452 | return 1; | ||
448 | return (pud_val(pud) & _REGION_ENTRY_ORIGIN) != 0UL; | 453 | return (pud_val(pud) & _REGION_ENTRY_ORIGIN) != 0UL; |
449 | } | 454 | } |
450 | 455 | ||
451 | static inline int pud_none(pud_t pud) | 456 | static inline int pud_none(pud_t pud) |
452 | { | 457 | { |
458 | if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) < _REGION_ENTRY_TYPE_R3) | ||
459 | return 0; | ||
453 | return (pud_val(pud) & _REGION_ENTRY_INV) != 0UL; | 460 | return (pud_val(pud) & _REGION_ENTRY_INV) != 0UL; |
454 | } | 461 | } |
455 | 462 | ||
456 | static inline int pud_bad(pud_t pud) | 463 | static inline int pud_bad(pud_t pud) |
457 | { | 464 | { |
458 | unsigned long mask = ~_REGION_ENTRY_ORIGIN & ~_REGION_ENTRY_INV; | 465 | /* |
459 | return (pud_val(pud) & mask) != _REGION3_ENTRY; | 466 | * With dynamic page table levels the pud can be a region table |
467 | * entry or a segment table entry. Check for the bit that are | ||
468 | * invalid for either table entry. | ||
469 | */ | ||
470 | unsigned long mask = | ||
471 | ~_SEGMENT_ENTRY_ORIGIN & ~_REGION_ENTRY_INV & | ||
472 | ~_REGION_ENTRY_TYPE_MASK & ~_REGION_ENTRY_LENGTH; | ||
473 | return (pud_val(pud) & mask) != 0; | ||
460 | } | 474 | } |
461 | 475 | ||
462 | #endif /* __s390x__ */ | 476 | #endif /* __s390x__ */ |
@@ -535,24 +549,30 @@ static inline int pte_young(pte_t pte) | |||
535 | #define pgd_clear(pgd) do { } while (0) | 549 | #define pgd_clear(pgd) do { } while (0) |
536 | #define pud_clear(pud) do { } while (0) | 550 | #define pud_clear(pud) do { } while (0) |
537 | 551 | ||
538 | static inline void pmd_clear_kernel(pmd_t * pmdp) | 552 | #else /* __s390x__ */ |
553 | |||
554 | static inline void pgd_clear_kernel(pgd_t * pgd) | ||
539 | { | 555 | { |
540 | pmd_val(pmdp[0]) = _SEGMENT_ENTRY_EMPTY; | 556 | if ((pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R2) |
541 | pmd_val(pmdp[1]) = _SEGMENT_ENTRY_EMPTY; | 557 | pgd_val(*pgd) = _REGION2_ENTRY_EMPTY; |
542 | pmd_val(pmdp[2]) = _SEGMENT_ENTRY_EMPTY; | ||
543 | pmd_val(pmdp[3]) = _SEGMENT_ENTRY_EMPTY; | ||
544 | } | 558 | } |
545 | 559 | ||
546 | #else /* __s390x__ */ | 560 | static inline void pgd_clear(pgd_t * pgd) |
561 | { | ||
562 | pgd_t *shadow = get_shadow_table(pgd); | ||
547 | 563 | ||
548 | #define pgd_clear(pgd) do { } while (0) | 564 | pgd_clear_kernel(pgd); |
565 | if (shadow) | ||
566 | pgd_clear_kernel(shadow); | ||
567 | } | ||
549 | 568 | ||
550 | static inline void pud_clear_kernel(pud_t *pud) | 569 | static inline void pud_clear_kernel(pud_t *pud) |
551 | { | 570 | { |
552 | pud_val(*pud) = _REGION3_ENTRY_EMPTY; | 571 | if ((pud_val(*pud) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R3) |
572 | pud_val(*pud) = _REGION3_ENTRY_EMPTY; | ||
553 | } | 573 | } |
554 | 574 | ||
555 | static inline void pud_clear(pud_t * pud) | 575 | static inline void pud_clear(pud_t *pud) |
556 | { | 576 | { |
557 | pud_t *shadow = get_shadow_table(pud); | 577 | pud_t *shadow = get_shadow_table(pud); |
558 | 578 | ||
@@ -561,30 +581,27 @@ static inline void pud_clear(pud_t * pud) | |||
561 | pud_clear_kernel(shadow); | 581 | pud_clear_kernel(shadow); |
562 | } | 582 | } |
563 | 583 | ||
584 | #endif /* __s390x__ */ | ||
585 | |||
564 | static inline void pmd_clear_kernel(pmd_t * pmdp) | 586 | static inline void pmd_clear_kernel(pmd_t * pmdp) |
565 | { | 587 | { |
566 | pmd_val(*pmdp) = _SEGMENT_ENTRY_EMPTY; | 588 | pmd_val(*pmdp) = _SEGMENT_ENTRY_EMPTY; |
567 | pmd_val1(*pmdp) = _SEGMENT_ENTRY_EMPTY; | ||
568 | } | 589 | } |
569 | 590 | ||
570 | #endif /* __s390x__ */ | 591 | static inline void pmd_clear(pmd_t *pmd) |
571 | |||
572 | static inline void pmd_clear(pmd_t * pmdp) | ||
573 | { | 592 | { |
574 | pmd_t *shadow_pmd = get_shadow_table(pmdp); | 593 | pmd_t *shadow = get_shadow_table(pmd); |
575 | 594 | ||
576 | pmd_clear_kernel(pmdp); | 595 | pmd_clear_kernel(pmd); |
577 | if (shadow_pmd) | 596 | if (shadow) |
578 | pmd_clear_kernel(shadow_pmd); | 597 | pmd_clear_kernel(shadow); |
579 | } | 598 | } |
580 | 599 | ||
581 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 600 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
582 | { | 601 | { |
583 | pte_t *shadow_pte = get_shadow_pte(ptep); | ||
584 | |||
585 | pte_val(*ptep) = _PAGE_TYPE_EMPTY; | 602 | pte_val(*ptep) = _PAGE_TYPE_EMPTY; |
586 | if (shadow_pte) | 603 | if (mm->context.noexec) |
587 | pte_val(*shadow_pte) = _PAGE_TYPE_EMPTY; | 604 | pte_val(ptep[PTRS_PER_PTE]) = _PAGE_TYPE_EMPTY; |
588 | } | 605 | } |
589 | 606 | ||
590 | /* | 607 | /* |
@@ -665,7 +682,7 @@ static inline void __ptep_ipte(unsigned long address, pte_t *ptep) | |||
665 | { | 682 | { |
666 | if (!(pte_val(*ptep) & _PAGE_INVALID)) { | 683 | if (!(pte_val(*ptep) & _PAGE_INVALID)) { |
667 | #ifndef __s390x__ | 684 | #ifndef __s390x__ |
668 | /* S390 has 1mb segments, we are emulating 4MB segments */ | 685 | /* pto must point to the start of the segment table */ |
669 | pte_t *pto = (pte_t *) (((unsigned long) ptep) & 0x7ffffc00); | 686 | pte_t *pto = (pte_t *) (((unsigned long) ptep) & 0x7ffffc00); |
670 | #else | 687 | #else |
671 | /* ipte in zarch mode can do the math */ | 688 | /* ipte in zarch mode can do the math */ |
@@ -679,12 +696,12 @@ static inline void __ptep_ipte(unsigned long address, pte_t *ptep) | |||
679 | pte_val(*ptep) = _PAGE_TYPE_EMPTY; | 696 | pte_val(*ptep) = _PAGE_TYPE_EMPTY; |
680 | } | 697 | } |
681 | 698 | ||
682 | static inline void ptep_invalidate(unsigned long address, pte_t *ptep) | 699 | static inline void ptep_invalidate(struct mm_struct *mm, |
700 | unsigned long address, pte_t *ptep) | ||
683 | { | 701 | { |
684 | __ptep_ipte(address, ptep); | 702 | __ptep_ipte(address, ptep); |
685 | ptep = get_shadow_pte(ptep); | 703 | if (mm->context.noexec) |
686 | if (ptep) | 704 | __ptep_ipte(address, ptep + PTRS_PER_PTE); |
687 | __ptep_ipte(address, ptep); | ||
688 | } | 705 | } |
689 | 706 | ||
690 | /* | 707 | /* |
@@ -706,7 +723,7 @@ static inline void ptep_invalidate(unsigned long address, pte_t *ptep) | |||
706 | pte_t __pte = *(__ptep); \ | 723 | pte_t __pte = *(__ptep); \ |
707 | if (atomic_read(&(__mm)->mm_users) > 1 || \ | 724 | if (atomic_read(&(__mm)->mm_users) > 1 || \ |
708 | (__mm) != current->active_mm) \ | 725 | (__mm) != current->active_mm) \ |
709 | ptep_invalidate(__address, __ptep); \ | 726 | ptep_invalidate(__mm, __address, __ptep); \ |
710 | else \ | 727 | else \ |
711 | pte_clear((__mm), (__address), (__ptep)); \ | 728 | pte_clear((__mm), (__address), (__ptep)); \ |
712 | __pte; \ | 729 | __pte; \ |
@@ -717,7 +734,7 @@ static inline pte_t ptep_clear_flush(struct vm_area_struct *vma, | |||
717 | unsigned long address, pte_t *ptep) | 734 | unsigned long address, pte_t *ptep) |
718 | { | 735 | { |
719 | pte_t pte = *ptep; | 736 | pte_t pte = *ptep; |
720 | ptep_invalidate(address, ptep); | 737 | ptep_invalidate(vma->vm_mm, address, ptep); |
721 | return pte; | 738 | return pte; |
722 | } | 739 | } |
723 | 740 | ||
@@ -738,7 +755,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, | |||
738 | if (full) | 755 | if (full) |
739 | pte_clear(mm, addr, ptep); | 756 | pte_clear(mm, addr, ptep); |
740 | else | 757 | else |
741 | ptep_invalidate(addr, ptep); | 758 | ptep_invalidate(mm, addr, ptep); |
742 | return pte; | 759 | return pte; |
743 | } | 760 | } |
744 | 761 | ||
@@ -749,7 +766,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, | |||
749 | if (pte_write(__pte)) { \ | 766 | if (pte_write(__pte)) { \ |
750 | if (atomic_read(&(__mm)->mm_users) > 1 || \ | 767 | if (atomic_read(&(__mm)->mm_users) > 1 || \ |
751 | (__mm) != current->active_mm) \ | 768 | (__mm) != current->active_mm) \ |
752 | ptep_invalidate(__addr, __ptep); \ | 769 | ptep_invalidate(__mm, __addr, __ptep); \ |
753 | set_pte_at(__mm, __addr, __ptep, pte_wrprotect(__pte)); \ | 770 | set_pte_at(__mm, __addr, __ptep, pte_wrprotect(__pte)); \ |
754 | } \ | 771 | } \ |
755 | }) | 772 | }) |
@@ -759,7 +776,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, | |||
759 | ({ \ | 776 | ({ \ |
760 | int __changed = !pte_same(*(__ptep), __entry); \ | 777 | int __changed = !pte_same(*(__ptep), __entry); \ |
761 | if (__changed) { \ | 778 | if (__changed) { \ |
762 | ptep_invalidate(__addr, __ptep); \ | 779 | ptep_invalidate((__vma)->vm_mm, __addr, __ptep); \ |
763 | set_pte_at((__vma)->vm_mm, __addr, __ptep, __entry); \ | 780 | set_pte_at((__vma)->vm_mm, __addr, __ptep, __entry); \ |
764 | } \ | 781 | } \ |
765 | __changed; \ | 782 | __changed; \ |
@@ -840,13 +857,21 @@ static inline pte_t mk_pte(struct page *page, pgprot_t pgprot) | |||
840 | 857 | ||
841 | #define pmd_deref(pmd) (pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN) | 858 | #define pmd_deref(pmd) (pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN) |
842 | #define pud_deref(pud) (pud_val(pud) & _REGION_ENTRY_ORIGIN) | 859 | #define pud_deref(pud) (pud_val(pud) & _REGION_ENTRY_ORIGIN) |
843 | #define pgd_deref(pgd) ({ BUG(); 0UL; }) | 860 | #define pgd_deref(pgd) (pgd_val(pgd) & _REGION_ENTRY_ORIGIN) |
844 | 861 | ||
845 | #define pud_offset(pgd, address) ((pud_t *) pgd) | 862 | static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) |
863 | { | ||
864 | pud_t *pud = (pud_t *) pgd; | ||
865 | if ((pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R2) | ||
866 | pud = (pud_t *) pgd_deref(*pgd); | ||
867 | return pud + pud_index(address); | ||
868 | } | ||
846 | 869 | ||
847 | static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) | 870 | static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) |
848 | { | 871 | { |
849 | pmd_t *pmd = (pmd_t *) pud_deref(*pud); | 872 | pmd_t *pmd = (pmd_t *) pud; |
873 | if ((pud_val(*pud) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R3) | ||
874 | pmd = (pmd_t *) pud_deref(*pud); | ||
850 | return pmd + pmd_index(address); | 875 | return pmd + pmd_index(address); |
851 | } | 876 | } |
852 | 877 | ||
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index e8785634cbdb..51d88912aa20 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -64,24 +64,29 @@ extern int get_cpu_capability(unsigned int *); | |||
64 | */ | 64 | */ |
65 | #ifndef __s390x__ | 65 | #ifndef __s390x__ |
66 | 66 | ||
67 | # define TASK_SIZE (0x80000000UL) | 67 | #define TASK_SIZE (1UL << 31) |
68 | # define TASK_UNMAPPED_BASE (TASK_SIZE / 2) | 68 | #define TASK_UNMAPPED_BASE (1UL << 30) |
69 | # define DEFAULT_TASK_SIZE (0x80000000UL) | ||
70 | 69 | ||
71 | #else /* __s390x__ */ | 70 | #else /* __s390x__ */ |
72 | 71 | ||
73 | # define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_31BIT) ? \ | 72 | #define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk,TIF_31BIT) ? \ |
74 | (0x80000000UL) : (0x40000000000UL)) | 73 | (1UL << 31) : (1UL << 53)) |
75 | # define TASK_SIZE TASK_SIZE_OF(current) | 74 | #define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \ |
76 | # define TASK_UNMAPPED_BASE (TASK_SIZE / 2) | 75 | (1UL << 30) : (1UL << 41)) |
77 | # define DEFAULT_TASK_SIZE (0x40000000000UL) | 76 | #define TASK_SIZE TASK_SIZE_OF(current) |
78 | 77 | ||
79 | #endif /* __s390x__ */ | 78 | #endif /* __s390x__ */ |
80 | 79 | ||
81 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
82 | 81 | ||
83 | #define STACK_TOP TASK_SIZE | 82 | #ifndef __s390x__ |
84 | #define STACK_TOP_MAX DEFAULT_TASK_SIZE | 83 | #define STACK_TOP (1UL << 31) |
84 | #define STACK_TOP_MAX (1UL << 31) | ||
85 | #else /* __s390x__ */ | ||
86 | #define STACK_TOP (1UL << (test_thread_flag(TIF_31BIT) ? 31:42)) | ||
87 | #define STACK_TOP_MAX (1UL << 42) | ||
88 | #endif /* __s390x__ */ | ||
89 | |||
85 | 90 | ||
86 | #endif | 91 | #endif |
87 | 92 | ||
@@ -138,8 +143,6 @@ struct stack_frame { | |||
138 | /* | 143 | /* |
139 | * Do necessary setup to start up a new thread. | 144 | * Do necessary setup to start up a new thread. |
140 | */ | 145 | */ |
141 | #ifndef __s390x__ | ||
142 | |||
143 | #define start_thread(regs, new_psw, new_stackp) do { \ | 146 | #define start_thread(regs, new_psw, new_stackp) do { \ |
144 | set_fs(USER_DS); \ | 147 | set_fs(USER_DS); \ |
145 | regs->psw.mask = psw_user_bits; \ | 148 | regs->psw.mask = psw_user_bits; \ |
@@ -147,24 +150,6 @@ struct stack_frame { | |||
147 | regs->gprs[15] = new_stackp ; \ | 150 | regs->gprs[15] = new_stackp ; \ |
148 | } while (0) | 151 | } while (0) |
149 | 152 | ||
150 | #else /* __s390x__ */ | ||
151 | |||
152 | #define start_thread(regs, new_psw, new_stackp) do { \ | ||
153 | set_fs(USER_DS); \ | ||
154 | regs->psw.mask = psw_user_bits; \ | ||
155 | regs->psw.addr = new_psw; \ | ||
156 | regs->gprs[15] = new_stackp; \ | ||
157 | } while (0) | ||
158 | |||
159 | #define start_thread31(regs, new_psw, new_stackp) do { \ | ||
160 | set_fs(USER_DS); \ | ||
161 | regs->psw.mask = psw_user32_bits; \ | ||
162 | regs->psw.addr = new_psw; \ | ||
163 | regs->gprs[15] = new_stackp; \ | ||
164 | } while (0) | ||
165 | |||
166 | #endif /* __s390x__ */ | ||
167 | |||
168 | /* Forward declaration, a strange C thing */ | 153 | /* Forward declaration, a strange C thing */ |
169 | struct task_struct; | 154 | struct task_struct; |
170 | struct mm_struct; | 155 | struct mm_struct; |
diff --git a/include/asm-s390/tlb.h b/include/asm-s390/tlb.h index 3c8177fa9e06..3d8a96d39d9d 100644 --- a/include/asm-s390/tlb.h +++ b/include/asm-s390/tlb.h | |||
@@ -38,7 +38,7 @@ struct mmu_gather { | |||
38 | struct mm_struct *mm; | 38 | struct mm_struct *mm; |
39 | unsigned int fullmm; | 39 | unsigned int fullmm; |
40 | unsigned int nr_ptes; | 40 | unsigned int nr_ptes; |
41 | unsigned int nr_pmds; | 41 | unsigned int nr_pxds; |
42 | void *array[TLB_NR_PTRS]; | 42 | void *array[TLB_NR_PTRS]; |
43 | }; | 43 | }; |
44 | 44 | ||
@@ -53,7 +53,7 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, | |||
53 | tlb->fullmm = full_mm_flush || (num_online_cpus() == 1) || | 53 | tlb->fullmm = full_mm_flush || (num_online_cpus() == 1) || |
54 | (atomic_read(&mm->mm_users) <= 1 && mm == current->active_mm); | 54 | (atomic_read(&mm->mm_users) <= 1 && mm == current->active_mm); |
55 | tlb->nr_ptes = 0; | 55 | tlb->nr_ptes = 0; |
56 | tlb->nr_pmds = TLB_NR_PTRS; | 56 | tlb->nr_pxds = TLB_NR_PTRS; |
57 | if (tlb->fullmm) | 57 | if (tlb->fullmm) |
58 | __tlb_flush_mm(mm); | 58 | __tlb_flush_mm(mm); |
59 | return tlb; | 59 | return tlb; |
@@ -62,12 +62,13 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, | |||
62 | static inline void tlb_flush_mmu(struct mmu_gather *tlb, | 62 | static inline void tlb_flush_mmu(struct mmu_gather *tlb, |
63 | unsigned long start, unsigned long end) | 63 | unsigned long start, unsigned long end) |
64 | { | 64 | { |
65 | if (!tlb->fullmm && (tlb->nr_ptes > 0 || tlb->nr_pmds < TLB_NR_PTRS)) | 65 | if (!tlb->fullmm && (tlb->nr_ptes > 0 || tlb->nr_pxds < TLB_NR_PTRS)) |
66 | __tlb_flush_mm(tlb->mm); | 66 | __tlb_flush_mm(tlb->mm); |
67 | while (tlb->nr_ptes > 0) | 67 | while (tlb->nr_ptes > 0) |
68 | pte_free(tlb->mm, tlb->array[--tlb->nr_ptes]); | 68 | pte_free(tlb->mm, tlb->array[--tlb->nr_ptes]); |
69 | while (tlb->nr_pmds < TLB_NR_PTRS) | 69 | while (tlb->nr_pxds < TLB_NR_PTRS) |
70 | pmd_free(tlb->mm, (pmd_t *) tlb->array[tlb->nr_pmds++]); | 70 | /* pgd_free frees the pointer as region or segment table */ |
71 | pgd_free(tlb->mm, tlb->array[tlb->nr_pxds++]); | ||
71 | } | 72 | } |
72 | 73 | ||
73 | static inline void tlb_finish_mmu(struct mmu_gather *tlb, | 74 | static inline void tlb_finish_mmu(struct mmu_gather *tlb, |
@@ -95,33 +96,57 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | |||
95 | * pte_free_tlb frees a pte table and clears the CRSTE for the | 96 | * pte_free_tlb frees a pte table and clears the CRSTE for the |
96 | * page table from the tlb. | 97 | * page table from the tlb. |
97 | */ | 98 | */ |
98 | static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t page) | 99 | static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte) |
99 | { | 100 | { |
100 | if (!tlb->fullmm) { | 101 | if (!tlb->fullmm) { |
101 | tlb->array[tlb->nr_ptes++] = page; | 102 | tlb->array[tlb->nr_ptes++] = pte; |
102 | if (tlb->nr_ptes >= tlb->nr_pmds) | 103 | if (tlb->nr_ptes >= tlb->nr_pxds) |
103 | tlb_flush_mmu(tlb, 0, 0); | 104 | tlb_flush_mmu(tlb, 0, 0); |
104 | } else | 105 | } else |
105 | pte_free(tlb->mm, page); | 106 | pte_free(tlb->mm, pte); |
106 | } | 107 | } |
107 | 108 | ||
108 | /* | 109 | /* |
109 | * pmd_free_tlb frees a pmd table and clears the CRSTE for the | 110 | * pmd_free_tlb frees a pmd table and clears the CRSTE for the |
110 | * segment table entry from the tlb. | 111 | * segment table entry from the tlb. |
112 | * If the mm uses a two level page table the single pmd is freed | ||
113 | * as the pgd. pmd_free_tlb checks the asce_limit against 2GB | ||
114 | * to avoid the double free of the pmd in this case. | ||
111 | */ | 115 | */ |
112 | static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | 116 | static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) |
113 | { | 117 | { |
114 | #ifdef __s390x__ | 118 | #ifdef __s390x__ |
119 | if (tlb->mm->context.asce_limit <= (1UL << 31)) | ||
120 | return; | ||
115 | if (!tlb->fullmm) { | 121 | if (!tlb->fullmm) { |
116 | tlb->array[--tlb->nr_pmds] = (struct page *) pmd; | 122 | tlb->array[--tlb->nr_pxds] = pmd; |
117 | if (tlb->nr_ptes >= tlb->nr_pmds) | 123 | if (tlb->nr_ptes >= tlb->nr_pxds) |
118 | tlb_flush_mmu(tlb, 0, 0); | 124 | tlb_flush_mmu(tlb, 0, 0); |
119 | } else | 125 | } else |
120 | pmd_free(tlb->mm, pmd); | 126 | pmd_free(tlb->mm, pmd); |
121 | #endif | 127 | #endif |
122 | } | 128 | } |
123 | 129 | ||
124 | #define pud_free_tlb(tlb, pud) do { } while (0) | 130 | /* |
131 | * pud_free_tlb frees a pud table and clears the CRSTE for the | ||
132 | * region third table entry from the tlb. | ||
133 | * If the mm uses a three level page table the single pud is freed | ||
134 | * as the pgd. pud_free_tlb checks the asce_limit against 4TB | ||
135 | * to avoid the double free of the pud in this case. | ||
136 | */ | ||
137 | static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud) | ||
138 | { | ||
139 | #ifdef __s390x__ | ||
140 | if (tlb->mm->context.asce_limit <= (1UL << 42)) | ||
141 | return; | ||
142 | if (!tlb->fullmm) { | ||
143 | tlb->array[--tlb->nr_pxds] = pud; | ||
144 | if (tlb->nr_ptes >= tlb->nr_pxds) | ||
145 | tlb_flush_mmu(tlb, 0, 0); | ||
146 | } else | ||
147 | pud_free(tlb->mm, pud); | ||
148 | #endif | ||
149 | } | ||
125 | 150 | ||
126 | #define tlb_start_vma(tlb, vma) do { } while (0) | 151 | #define tlb_start_vma(tlb, vma) do { } while (0) |
127 | #define tlb_end_vma(tlb, vma) do { } while (0) | 152 | #define tlb_end_vma(tlb, vma) do { } while (0) |
diff --git a/include/asm-s390/tlbflush.h b/include/asm-s390/tlbflush.h index 70fa5ae58180..35fb4f9127b2 100644 --- a/include/asm-s390/tlbflush.h +++ b/include/asm-s390/tlbflush.h | |||
@@ -61,11 +61,12 @@ static inline void __tlb_flush_mm(struct mm_struct * mm) | |||
61 | * only ran on the local cpu. | 61 | * only ran on the local cpu. |
62 | */ | 62 | */ |
63 | if (MACHINE_HAS_IDTE) { | 63 | if (MACHINE_HAS_IDTE) { |
64 | pgd_t *shadow = get_shadow_table(mm->pgd); | 64 | if (mm->context.noexec) |
65 | 65 | __tlb_flush_idte((unsigned long) | |
66 | if (shadow) | 66 | get_shadow_table(mm->pgd) | |
67 | __tlb_flush_idte((unsigned long) shadow | mm->context); | 67 | mm->context.asce_bits); |
68 | __tlb_flush_idte((unsigned long) mm->pgd | mm->context); | 68 | __tlb_flush_idte((unsigned long) mm->pgd | |
69 | mm->context.asce_bits); | ||
69 | return; | 70 | return; |
70 | } | 71 | } |
71 | preempt_disable(); | 72 | preempt_disable(); |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index f04acb2670a8..583da807ea97 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -256,7 +256,10 @@ | |||
256 | #define __NR_signalfd 316 | 256 | #define __NR_signalfd 316 |
257 | #define __NR_timerfd 317 | 257 | #define __NR_timerfd 317 |
258 | #define __NR_eventfd 318 | 258 | #define __NR_eventfd 318 |
259 | #define NR_syscalls 319 | 259 | #define __NR_timerfd_create 319 |
260 | #define __NR_timerfd_settime 320 | ||
261 | #define __NR_timerfd_gettime 321 | ||
262 | #define NR_syscalls 322 | ||
260 | 263 | ||
261 | /* | 264 | /* |
262 | * There are some system calls that are not present on 64 bit, some | 265 | * There are some system calls that are not present on 64 bit, some |
diff --git a/include/asm-sparc/a.out.h b/include/asm-sparc/a.out.h index 744cfe6c0de8..2f1c3748a068 100644 --- a/include/asm-sparc/a.out.h +++ b/include/asm-sparc/a.out.h | |||
@@ -1,24 +1,27 @@ | |||
1 | /* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton Exp $ */ | ||
2 | #ifndef __SPARC_A_OUT_H__ | 1 | #ifndef __SPARC_A_OUT_H__ |
3 | #define __SPARC_A_OUT_H__ | 2 | #define __SPARC_A_OUT_H__ |
4 | 3 | ||
5 | #define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ | 4 | #define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ |
6 | #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ | 5 | #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ |
7 | 6 | ||
7 | #ifndef __ASSEMBLY__ | ||
8 | |||
8 | struct exec { | 9 | struct exec { |
9 | unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ | 10 | unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ |
10 | unsigned char a_toolversion:7; | 11 | unsigned char a_toolversion:7; |
11 | unsigned char a_machtype; | 12 | unsigned char a_machtype; |
12 | unsigned short a_info; | 13 | unsigned short a_info; |
13 | unsigned long a_text; /* length of text, in bytes */ | 14 | unsigned int a_text; /* length of text, in bytes */ |
14 | unsigned long a_data; /* length of data, in bytes */ | 15 | unsigned int a_data; /* length of data, in bytes */ |
15 | unsigned long a_bss; /* length of bss, in bytes */ | 16 | unsigned int a_bss; /* length of bss, in bytes */ |
16 | unsigned long a_syms; /* length of symbol table, in bytes */ | 17 | unsigned int a_syms; /* length of symbol table, in bytes */ |
17 | unsigned long a_entry; /* where program begins */ | 18 | unsigned int a_entry; /* where program begins */ |
18 | unsigned long a_trsize; | 19 | unsigned int a_trsize; |
19 | unsigned long a_drsize; | 20 | unsigned int a_drsize; |
20 | }; | 21 | }; |
21 | 22 | ||
23 | #endif /* !__ASSEMBLY__ */ | ||
24 | |||
22 | /* Where in the file does the text information begin? */ | 25 | /* Where in the file does the text information begin? */ |
23 | #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) | 26 | #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) |
24 | 27 | ||
@@ -28,19 +31,21 @@ struct exec { | |||
28 | (x).a_drsize) | 31 | (x).a_drsize) |
29 | 32 | ||
30 | /* Where does text segment go in memory after being loaded? */ | 33 | /* Where does text segment go in memory after being loaded? */ |
31 | #define N_TXTADDR(x) (((N_MAGIC(x) == ZMAGIC) && \ | 34 | #define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \ |
32 | ((x).a_entry < SPARC_PGSIZE)) ? \ | 35 | ((x).a_entry < SPARC_PGSIZE)) ? \ |
33 | 0 : SPARC_PGSIZE) | 36 | 0 : SPARC_PGSIZE) |
34 | 37 | ||
35 | /* And same for the data segment.. */ | 38 | /* And same for the data segment.. */ |
36 | #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ | 39 | #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ |
37 | (N_TXTADDR(x) + (x).a_text) \ | 40 | (N_TXTADDR(x) + (x).a_text) \ |
38 | : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) | 41 | : (unsigned long) (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) |
39 | 42 | ||
40 | #define N_TRSIZE(a) ((a).a_trsize) | 43 | #define N_TRSIZE(a) ((a).a_trsize) |
41 | #define N_DRSIZE(a) ((a).a_drsize) | 44 | #define N_DRSIZE(a) ((a).a_drsize) |
42 | #define N_SYMSIZE(a) ((a).a_syms) | 45 | #define N_SYMSIZE(a) ((a).a_syms) |
43 | 46 | ||
47 | #ifndef __ASSEMBLY__ | ||
48 | |||
44 | /* | 49 | /* |
45 | * Sparc relocation types | 50 | * Sparc relocation types |
46 | */ | 51 | */ |
@@ -77,14 +82,16 @@ enum reloc_type | |||
77 | */ | 82 | */ |
78 | struct relocation_info /* used when header.a_machtype == M_SPARC */ | 83 | struct relocation_info /* used when header.a_machtype == M_SPARC */ |
79 | { | 84 | { |
80 | unsigned long r_address; /* relocation addr */ | 85 | unsigned int r_address; /* relocation addr */ |
81 | unsigned int r_index:24; /* segment index or symbol index */ | 86 | unsigned int r_index:24; /* segment index or symbol index */ |
82 | unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ | 87 | unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ |
83 | unsigned int r_pad:2; /* <unused> */ | 88 | unsigned int r_pad:2; /* <unused> */ |
84 | enum reloc_type r_type:5; /* type of relocation to perform */ | 89 | enum reloc_type r_type:5; /* type of relocation to perform */ |
85 | long r_addend; /* addend for relocation value */ | 90 | int r_addend; /* addend for relocation value */ |
86 | }; | 91 | }; |
87 | 92 | ||
88 | #define N_RELOCATION_INFO_DECLARED 1 | 93 | #define N_RELOCATION_INFO_DECLARED 1 |
89 | 94 | ||
95 | #endif /* !(__ASSEMBLY__) */ | ||
96 | |||
90 | #endif /* __SPARC_A_OUT_H__ */ | 97 | #endif /* __SPARC_A_OUT_H__ */ |
diff --git a/include/asm-sparc/bpp.h b/include/asm-sparc/bpp.h index 3578ac113cf0..31f515e499a7 100644 --- a/include/asm-sparc/bpp.h +++ b/include/asm-sparc/bpp.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * with compliant or compatible devices. It will use whatever features | 17 | * with compliant or compatible devices. It will use whatever features |
18 | * the device supports, prefering those that are typically faster. | 18 | * the device supports, prefering those that are typically faster. |
19 | * | 19 | * |
20 | * When the device is opened, it is left in COMPATABILITY mode, and | 20 | * When the device is opened, it is left in COMPATIBILITY mode, and |
21 | * writes work like any printer device. The driver only attempt to | 21 | * writes work like any printer device. The driver only attempt to |
22 | * negotiate 1284 modes when needed so that plugs can be pulled, | 22 | * negotiate 1284 modes when needed so that plugs can be pulled, |
23 | * switch boxes switched, etc., without disrupting things. It will | 23 | * switch boxes switched, etc., without disrupting things. It will |
diff --git a/include/asm-sparc/bsderrno.h b/include/asm-sparc/bsderrno.h deleted file mode 100644 index 54a75be43abb..000000000000 --- a/include/asm-sparc/bsderrno.h +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* $Id: bsderrno.h,v 1.3 1996/04/25 06:12:47 davem Exp $ | ||
2 | * bsderrno.h: Error numbers for NetBSD binary compatibility | ||
3 | * | ||
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | ||
5 | */ | ||
6 | |||
7 | #ifndef _SPARC_BSDERRNO_H | ||
8 | #define _SPARC_BSDERRNO_H | ||
9 | |||
10 | #define BSD_EPERM 1 /* Operation not permitted */ | ||
11 | #define BSD_ENOENT 2 /* No such file or directory */ | ||
12 | #define BSD_ESRCH 3 /* No such process */ | ||
13 | #define BSD_EINTR 4 /* Interrupted system call */ | ||
14 | #define BSD_EIO 5 /* Input/output error */ | ||
15 | #define BSD_ENXIO 6 /* Device not configured */ | ||
16 | #define BSD_E2BIG 7 /* Argument list too long */ | ||
17 | #define BSD_ENOEXEC 8 /* Exec format error */ | ||
18 | #define BSD_EBADF 9 /* Bad file descriptor */ | ||
19 | #define BSD_ECHILD 10 /* No child processes */ | ||
20 | #define BSD_EDEADLK 11 /* Resource deadlock avoided */ | ||
21 | #define BSD_ENOMEM 12 /* Cannot allocate memory */ | ||
22 | #define BSD_EACCES 13 /* Permission denied */ | ||
23 | #define BSD_EFAULT 14 /* Bad address */ | ||
24 | #define BSD_ENOTBLK 15 /* Block device required */ | ||
25 | #define BSD_EBUSY 16 /* Device busy */ | ||
26 | #define BSD_EEXIST 17 /* File exists */ | ||
27 | #define BSD_EXDEV 18 /* Cross-device link */ | ||
28 | #define BSD_ENODEV 19 /* Operation not supported by device */ | ||
29 | #define BSD_ENOTDIR 20 /* Not a directory */ | ||
30 | #define BSD_EISDIR 21 /* Is a directory */ | ||
31 | #define BSD_EINVAL 22 /* Invalid argument */ | ||
32 | #define BSD_ENFILE 23 /* Too many open files in system */ | ||
33 | #define BSD_EMFILE 24 /* Too many open files */ | ||
34 | #define BSD_ENOTTY 25 /* Inappropriate ioctl for device */ | ||
35 | #define BSD_ETXTBSY 26 /* Text file busy */ | ||
36 | #define BSD_EFBIG 27 /* File too large */ | ||
37 | #define BSD_ENOSPC 28 /* No space left on device */ | ||
38 | #define BSD_ESPIPE 29 /* Illegal seek */ | ||
39 | #define BSD_EROFS 30 /* Read-only file system */ | ||
40 | #define BSD_EMLINK 31 /* Too many links */ | ||
41 | #define BSD_EPIPE 32 /* Broken pipe */ | ||
42 | #define BSD_EDOM 33 /* Numerical argument out of domain */ | ||
43 | #define BSD_ERANGE 34 /* Result too large */ | ||
44 | #define BSD_EAGAIN 35 /* Resource temporarily unavailable */ | ||
45 | #define BSD_EWOULDBLOCK EAGAIN /* Operation would block */ | ||
46 | #define BSD_EINPROGRESS 36 /* Operation now in progress */ | ||
47 | #define BSD_EALREADY 37 /* Operation already in progress */ | ||
48 | #define BSD_ENOTSOCK 38 /* Socket operation on non-socket */ | ||
49 | #define BSD_EDESTADDRREQ 39 /* Destination address required */ | ||
50 | #define BSD_EMSGSIZE 40 /* Message too long */ | ||
51 | #define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */ | ||
52 | #define BSD_ENOPROTOOPT 42 /* Protocol not available */ | ||
53 | #define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */ | ||
54 | #define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */ | ||
55 | #define BSD_EOPNOTSUPP 45 /* Operation not supported */ | ||
56 | #define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */ | ||
57 | #define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ | ||
58 | #define BSD_EADDRINUSE 48 /* Address already in use */ | ||
59 | #define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */ | ||
60 | #define BSD_ENETDOWN 50 /* Network is down */ | ||
61 | #define BSD_ENETUNREACH 51 /* Network is unreachable */ | ||
62 | #define BSD_ENETRESET 52 /* Network dropped connection on reset */ | ||
63 | #define BSD_ECONNABORTED 53 /* Software caused connection abort */ | ||
64 | #define BSD_ECONNRESET 54 /* Connection reset by peer */ | ||
65 | #define BSD_ENOBUFS 55 /* No buffer space available */ | ||
66 | #define BSD_EISCONN 56 /* Socket is already connected */ | ||
67 | #define BSD_ENOTCONN 57 /* Socket is not connected */ | ||
68 | #define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */ | ||
69 | #define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */ | ||
70 | #define BSD_ETIMEDOUT 60 /* Operation timed out */ | ||
71 | #define BSD_ECONNREFUSED 61 /* Connection refused */ | ||
72 | #define BSD_ELOOP 62 /* Too many levels of symbolic links */ | ||
73 | #define BSD_ENAMETOOLONG 63 /* File name too long */ | ||
74 | #define BSD_EHOSTDOWN 64 /* Host is down */ | ||
75 | #define BSD_EHOSTUNREACH 65 /* No route to host */ | ||
76 | #define BSD_ENOTEMPTY 66 /* Directory not empty */ | ||
77 | #define BSD_EPROCLIM 67 /* Too many processes */ | ||
78 | #define BSD_EUSERS 68 /* Too many users */ | ||
79 | #define BSD_EDQUOT 69 /* Disc quota exceeded */ | ||
80 | #define BSD_ESTALE 70 /* Stale NFS file handle */ | ||
81 | #define BSD_EREMOTE 71 /* Too many levels of remote in path */ | ||
82 | #define BSD_EBADRPC 72 /* RPC struct is bad */ | ||
83 | #define BSD_ERPCMISMATCH 73 /* RPC version wrong */ | ||
84 | #define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */ | ||
85 | #define BSD_EPROGMISMATCH 75 /* Program version wrong */ | ||
86 | #define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */ | ||
87 | #define BSD_ENOLCK 77 /* No locks available */ | ||
88 | #define BSD_ENOSYS 78 /* Function not implemented */ | ||
89 | #define BSD_EFTYPE 79 /* Inappropriate file type or format */ | ||
90 | #define BSD_EAUTH 80 /* Authentication error */ | ||
91 | #define BSD_ENEEDAUTH 81 /* Need authenticator */ | ||
92 | #define BSD_ELAST 81 /* Must be equal largest errno */ | ||
93 | |||
94 | #endif /* !(_SPARC_BSDERRNO_H) */ | ||
diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h index 04151208189f..8a59e5a8c217 100644 --- a/include/asm-sparc/bug.h +++ b/include/asm-sparc/bug.h | |||
@@ -2,28 +2,16 @@ | |||
2 | #define _SPARC_BUG_H | 2 | #define _SPARC_BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | 4 | #ifdef CONFIG_BUG |
5 | /* Only use the inline asm until a gcc release that can handle __builtin_trap | 5 | #include <linux/compiler.h> |
6 | * -rob 2003-06-25 | ||
7 | * | ||
8 | * gcc-3.3.1 and later will be OK -DaveM | ||
9 | */ | ||
10 | #if (__GNUC__ > 3) || \ | ||
11 | (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \ | ||
12 | (__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 4) | ||
13 | #define __bug_trap() __builtin_trap() | ||
14 | #else | ||
15 | #define __bug_trap() \ | ||
16 | __asm__ __volatile__ ("t 0x5\n\t" : : ) | ||
17 | #endif | ||
18 | 6 | ||
19 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
20 | extern void do_BUG(const char *file, int line); | 8 | extern void do_BUG(const char *file, int line); |
21 | #define BUG() do { \ | 9 | #define BUG() do { \ |
22 | do_BUG(__FILE__, __LINE__); \ | 10 | do_BUG(__FILE__, __LINE__); \ |
23 | __bug_trap(); \ | 11 | __builtin_trap(); \ |
24 | } while (0) | 12 | } while (0) |
25 | #else | 13 | #else |
26 | #define BUG() __bug_trap() | 14 | #define BUG() __builtin_trap() |
27 | #endif | 15 | #endif |
28 | 16 | ||
29 | #define HAVE_ARCH_BUG | 17 | #define HAVE_ARCH_BUG |
diff --git a/include/asm-sparc/bugs.h b/include/asm-sparc/bugs.h index a0f939beeea1..2dfc07bc8e54 100644 --- a/include/asm-sparc/bugs.h +++ b/include/asm-sparc/bugs.h | |||
@@ -1,16 +1,24 @@ | |||
1 | /* $Id: bugs.h,v 1.1 1996/12/26 13:25:20 davem Exp $ | 1 | /* include/asm-sparc/bugs.h: Sparc probes for various bugs. |
2 | * include/asm-sparc/bugs.h: Sparc probes for various bugs. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
6 | #ifdef CONFIG_SPARC32 | ||
7 | #include <asm/cpudata.h> | 7 | #include <asm/cpudata.h> |
8 | #endif | ||
9 | |||
10 | #ifdef CONFIG_SPARC64 | ||
11 | #include <asm/sstate.h> | ||
12 | #endif | ||
8 | 13 | ||
9 | extern unsigned long loops_per_jiffy; | 14 | extern unsigned long loops_per_jiffy; |
10 | 15 | ||
11 | static void check_bugs(void) | 16 | static void __init check_bugs(void) |
12 | { | 17 | { |
13 | #ifndef CONFIG_SMP | 18 | #if defined(CONFIG_SPARC32) && !defined(CONFIG_SMP) |
14 | cpu_data(0).udelay_val = loops_per_jiffy; | 19 | cpu_data(0).udelay_val = loops_per_jiffy; |
15 | #endif | 20 | #endif |
21 | #ifdef CONFIG_SPARC64 | ||
22 | sstate_running(); | ||
23 | #endif | ||
16 | } | 24 | } |
diff --git a/include/asm-sparc/byteorder.h b/include/asm-sparc/byteorder.h index a2949aea48ef..bcd83aa351c5 100644 --- a/include/asm-sparc/byteorder.h +++ b/include/asm-sparc/byteorder.h | |||
@@ -1,12 +1,55 @@ | |||
1 | /* $Id: byteorder.h,v 1.15 1997/12/16 19:20:44 davem Exp $ */ | ||
2 | #ifndef _SPARC_BYTEORDER_H | 1 | #ifndef _SPARC_BYTEORDER_H |
3 | #define _SPARC_BYTEORDER_H | 2 | #define _SPARC_BYTEORDER_H |
4 | 3 | ||
5 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/asi.h> | ||
6 | |||
7 | #ifdef __GNUC__ | ||
8 | |||
9 | #ifdef CONFIG_SPARC32 | ||
10 | #define __SWAB_64_THRU_32__ | ||
11 | #endif | ||
12 | |||
13 | #ifdef CONFIG_SPARC64 | ||
14 | |||
15 | static inline __u16 ___arch__swab16p(const __u16 *addr) | ||
16 | { | ||
17 | __u16 ret; | ||
18 | |||
19 | __asm__ __volatile__ ("lduha [%1] %2, %0" | ||
20 | : "=r" (ret) | ||
21 | : "r" (addr), "i" (ASI_PL)); | ||
22 | return ret; | ||
23 | } | ||
24 | |||
25 | static inline __u32 ___arch__swab32p(const __u32 *addr) | ||
26 | { | ||
27 | __u32 ret; | ||
28 | |||
29 | __asm__ __volatile__ ("lduwa [%1] %2, %0" | ||
30 | : "=r" (ret) | ||
31 | : "r" (addr), "i" (ASI_PL)); | ||
32 | return ret; | ||
33 | } | ||
34 | |||
35 | static inline __u64 ___arch__swab64p(const __u64 *addr) | ||
36 | { | ||
37 | __u64 ret; | ||
38 | |||
39 | __asm__ __volatile__ ("ldxa [%1] %2, %0" | ||
40 | : "=r" (ret) | ||
41 | : "r" (addr), "i" (ASI_PL)); | ||
42 | return ret; | ||
43 | } | ||
44 | |||
45 | #define __arch__swab16p(x) ___arch__swab16p(x) | ||
46 | #define __arch__swab32p(x) ___arch__swab32p(x) | ||
47 | #define __arch__swab64p(x) ___arch__swab64p(x) | ||
48 | |||
49 | #endif /* CONFIG_SPARC64 */ | ||
50 | |||
51 | #define __BYTEORDER_HAS_U64__ | ||
6 | 52 | ||
7 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
8 | # define __BYTEORDER_HAS_U64__ | ||
9 | # define __SWAB_64_THRU_32__ | ||
10 | #endif | 53 | #endif |
11 | 54 | ||
12 | #include <linux/byteorder/big_endian.h> | 55 | #include <linux/byteorder/big_endian.h> |
diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h index cb971e88aea4..41f85ae4bd4a 100644 --- a/include/asm-sparc/cache.h +++ b/include/asm-sparc/cache.h | |||
@@ -1,20 +1,28 @@ | |||
1 | /* $Id: cache.h,v 1.9 1999/08/14 03:51:58 anton Exp $ | 1 | /* cache.h: Cache specific code for the Sparc. These include flushing |
2 | * cache.h: Cache specific code for the Sparc. These include flushing | ||
3 | * and direct tag/data line access. | 2 | * and direct tag/data line access. |
4 | * | 3 | * |
5 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) |
6 | */ | 5 | */ |
7 | 6 | ||
8 | #ifndef _SPARC_CACHE_H | 7 | #ifndef _SPARC_CACHE_H |
9 | #define _SPARC_CACHE_H | 8 | #define _SPARC_CACHE_H |
10 | 9 | ||
11 | #include <asm/asi.h> | ||
12 | |||
13 | #define L1_CACHE_SHIFT 5 | 10 | #define L1_CACHE_SHIFT 5 |
14 | #define L1_CACHE_BYTES 32 | 11 | #define L1_CACHE_BYTES 32 |
15 | #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) | 12 | #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) |
16 | 13 | ||
17 | #define SMP_CACHE_BYTES 32 | 14 | #ifdef CONFIG_SPARC32 |
15 | #define SMP_CACHE_BYTES_SHIFT 5 | ||
16 | #else | ||
17 | #define SMP_CACHE_BYTES_SHIFT 6 | ||
18 | #endif | ||
19 | |||
20 | #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) | ||
21 | |||
22 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | ||
23 | |||
24 | #ifdef CONFIG_SPARC32 | ||
25 | #include <asm/asi.h> | ||
18 | 26 | ||
19 | /* Direct access to the instruction cache is provided through and | 27 | /* Direct access to the instruction cache is provided through and |
20 | * alternate address space. The IDC bit must be off in the ICCR on | 28 | * alternate address space. The IDC bit must be off in the ICCR on |
@@ -125,5 +133,6 @@ static inline void flush_ei_user(unsigned int addr) | |||
125 | "r" (addr), "i" (ASI_M_FLUSH_USER) : | 133 | "r" (addr), "i" (ASI_M_FLUSH_USER) : |
126 | "memory"); | 134 | "memory"); |
127 | } | 135 | } |
136 | #endif /* CONFIG_SPARC32 */ | ||
128 | 137 | ||
129 | #endif /* !(_SPARC_CACHE_H) */ | 138 | #endif /* !(_SPARC_CACHE_H) */ |
diff --git a/include/asm-sparc/current.h b/include/asm-sparc/current.h index 8fe7c82a5e21..8a1d9d6643b0 100644 --- a/include/asm-sparc/current.h +++ b/include/asm-sparc/current.h | |||
@@ -1,31 +1,34 @@ | |||
1 | /* | 1 | /* include/asm-sparc/current.h |
2 | * include/asm-sparc/current.h | ||
3 | * | 2 | * |
4 | * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation | 3 | * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation |
5 | * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com) | 4 | * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com) |
5 | * Copyright (C) 2007 David S. Miller (davem@davemloft.net) | ||
6 | * | 6 | * |
7 | * Derived from "include/asm-s390/current.h" by | 7 | * Derived from "include/asm-s390/current.h" by |
8 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 8 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
9 | * Derived from "include/asm-i386/current.h" | 9 | * Derived from "include/asm-i386/current.h" |
10 | */ | 10 | */ |
11 | #ifndef _ASM_CURRENT_H | 11 | #ifndef _SPARC_CURRENT_H |
12 | #define _ASM_CURRENT_H | 12 | #define _SPARC_CURRENT_H |
13 | |||
14 | /* | ||
15 | * At the sparc64 DaveM keeps current_thread_info in %g4. | ||
16 | * We might want to consider doing the same to shave a few cycles. | ||
17 | */ | ||
18 | 13 | ||
19 | #include <linux/thread_info.h> | 14 | #include <linux/thread_info.h> |
20 | 15 | ||
21 | struct task_struct; | 16 | #ifdef CONFIG_SPARC64 |
17 | register struct task_struct *current asm("g4"); | ||
18 | #endif | ||
22 | 19 | ||
23 | /* Two stage process (inline + #define) for type-checking. */ | 20 | #ifdef CONFIG_SPARC32 |
24 | /* We also obfuscate get_current() to check if anyone used that by mistake. */ | 21 | /* We might want to consider using %g4 like sparc64 to shave a few cycles. |
22 | * | ||
23 | * Two stage process (inline + #define) for type-checking. | ||
24 | * We also obfuscate get_current() to check if anyone used that by mistake. | ||
25 | */ | ||
26 | struct task_struct; | ||
25 | static inline struct task_struct *__get_current(void) | 27 | static inline struct task_struct *__get_current(void) |
26 | { | 28 | { |
27 | return current_thread_info()->task; | 29 | return current_thread_info()->task; |
28 | } | 30 | } |
29 | #define current __get_current() | 31 | #define current __get_current() |
32 | #endif | ||
30 | 33 | ||
31 | #endif /* !(_ASM_CURRENT_H) */ | 34 | #endif /* !(_SPARC_CURRENT_H) */ |
diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h index c0a7786d65f7..680e51d87374 100644 --- a/include/asm-sparc/device.h +++ b/include/asm-sparc/device.h | |||
@@ -19,5 +19,3 @@ struct dev_archdata { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | #endif /* _ASM_SPARC_DEVICE_H */ | 21 | #endif /* _ASM_SPARC_DEVICE_H */ |
22 | |||
23 | |||
diff --git a/include/asm-sparc/errno.h b/include/asm-sparc/errno.h index ed41c8bac1fa..a9ef172977de 100644 --- a/include/asm-sparc/errno.h +++ b/include/asm-sparc/errno.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: errno.h,v 1.6 1997/04/15 09:03:38 davem Exp $ */ | ||
2 | #ifndef _SPARC_ERRNO_H | 1 | #ifndef _SPARC_ERRNO_H |
3 | #define _SPARC_ERRNO_H | 2 | #define _SPARC_ERRNO_H |
4 | 3 | ||
diff --git a/include/asm-sparc/fb.h b/include/asm-sparc/fb.h index c73ca081e1f5..b83e44729655 100644 --- a/include/asm-sparc/fb.h +++ b/include/asm-sparc/fb.h | |||
@@ -1,9 +1,17 @@ | |||
1 | #ifndef _ASM_FB_H_ | 1 | #ifndef _SPARC_FB_H_ |
2 | #define _ASM_FB_H_ | 2 | #define _SPARC_FB_H_ |
3 | #include <linux/fb.h> | 3 | #include <linux/fb.h> |
4 | #include <linux/fs.h> | ||
5 | #include <asm/page.h> | ||
4 | #include <asm/prom.h> | 6 | #include <asm/prom.h> |
5 | 7 | ||
6 | #define fb_pgprotect(...) do {} while (0) | 8 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
9 | unsigned long off) | ||
10 | { | ||
11 | #ifdef CONFIG_SPARC64 | ||
12 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
13 | #endif | ||
14 | } | ||
7 | 15 | ||
8 | static inline int fb_is_primary_device(struct fb_info *info) | 16 | static inline int fb_is_primary_device(struct fb_info *info) |
9 | { | 17 | { |
@@ -18,4 +26,4 @@ static inline int fb_is_primary_device(struct fb_info *info) | |||
18 | return 0; | 26 | return 0; |
19 | } | 27 | } |
20 | 28 | ||
21 | #endif /* _ASM_FB_H_ */ | 29 | #endif /* _SPARC_FB_H_ */ |
diff --git a/include/asm-sparc/of_platform.h b/include/asm-sparc/of_platform.h index d638737ff13c..38334351c36b 100644 --- a/include/asm-sparc/of_platform.h +++ b/include/asm-sparc/of_platform.h | |||
@@ -21,9 +21,4 @@ extern struct bus_type sbus_bus_type; | |||
21 | 21 | ||
22 | #define of_bus_type of_platform_bus_type /* for compatibility */ | 22 | #define of_bus_type of_platform_bus_type /* for compatibility */ |
23 | 23 | ||
24 | extern struct of_device *of_platform_device_create(struct device_node *np, | ||
25 | const char *bus_id, | ||
26 | struct device *parent, | ||
27 | struct bus_type *bus); | ||
28 | |||
29 | #endif /* _ASM_SPARC_OF_PLATFORM_H */ | 24 | #endif /* _ASM_SPARC_OF_PLATFORM_H */ |
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index 71f2a1998324..df5dc4422483 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * Copyright (C) 1996-2005 Paul Mackerras. | 9 | * Copyright (C) 1996-2005 Paul Mackerras. |
10 | * | 10 | * |
11 | * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. | 11 | * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. |
12 | * Updates for SPARC32 by David S. Miller | 12 | * Updates for SPARC by David S. Miller |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
15 | * modify it under the terms of the GNU General Public License | 15 | * modify it under the terms of the GNU General Public License |
@@ -39,6 +39,7 @@ struct property { | |||
39 | unsigned int unique_id; | 39 | unsigned int unique_id; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct of_irq_controller; | ||
42 | struct device_node { | 43 | struct device_node { |
43 | const char *name; | 44 | const char *name; |
44 | const char *type; | 45 | const char *type; |
@@ -58,11 +59,19 @@ struct device_node { | |||
58 | unsigned long _flags; | 59 | unsigned long _flags; |
59 | void *data; | 60 | void *data; |
60 | unsigned int unique_id; | 61 | unsigned int unique_id; |
62 | |||
63 | struct of_irq_controller *irq_trans; | ||
64 | }; | ||
65 | |||
66 | struct of_irq_controller { | ||
67 | unsigned int (*irq_build)(struct device_node *, unsigned int, void *); | ||
68 | void *data; | ||
61 | }; | 69 | }; |
62 | 70 | ||
63 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | 71 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) |
64 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | 72 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) |
65 | 73 | ||
74 | extern struct device_node *of_find_node_by_cpuid(int cpuid); | ||
66 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 75 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
67 | extern int of_getintprop_default(struct device_node *np, | 76 | extern int of_getintprop_default(struct device_node *np, |
68 | const char *name, | 77 | const char *name, |
diff --git a/include/asm-sparc64/a.out.h b/include/asm-sparc64/a.out.h index 53c95bdfc66e..44208c2a188e 100644 --- a/include/asm-sparc64/a.out.h +++ b/include/asm-sparc64/a.out.h | |||
@@ -1,98 +1 @@ | |||
1 | /* $Id: a.out.h,v 1.8 2002/02/09 19:49:31 davem Exp $ */ | #include <asm-sparc/a.out.h> | |
2 | #ifndef __SPARC64_A_OUT_H__ | ||
3 | #define __SPARC64_A_OUT_H__ | ||
4 | |||
5 | #define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ | ||
6 | #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ | ||
7 | |||
8 | #ifndef __ASSEMBLY__ | ||
9 | |||
10 | struct exec { | ||
11 | unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ | ||
12 | unsigned char a_toolversion:7; | ||
13 | unsigned char a_machtype; | ||
14 | unsigned short a_info; | ||
15 | unsigned int a_text; /* length of text, in bytes */ | ||
16 | unsigned int a_data; /* length of data, in bytes */ | ||
17 | unsigned int a_bss; /* length of bss, in bytes */ | ||
18 | unsigned int a_syms; /* length of symbol table, in bytes */ | ||
19 | unsigned int a_entry; /* where program begins */ | ||
20 | unsigned int a_trsize; | ||
21 | unsigned int a_drsize; | ||
22 | }; | ||
23 | |||
24 | #endif /* !__ASSEMBLY__ */ | ||
25 | |||
26 | /* Where in the file does the text information begin? */ | ||
27 | #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) | ||
28 | |||
29 | /* Where do the Symbols start? */ | ||
30 | #define N_SYMOFF(x) (N_TXTOFF(x) + (x).a_text + \ | ||
31 | (x).a_data + (x).a_trsize + \ | ||
32 | (x).a_drsize) | ||
33 | |||
34 | /* Where does text segment go in memory after being loaded? */ | ||
35 | #define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \ | ||
36 | ((x).a_entry < SPARC_PGSIZE)) ? \ | ||
37 | 0 : SPARC_PGSIZE) | ||
38 | |||
39 | /* And same for the data segment.. */ | ||
40 | #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ | ||
41 | (N_TXTADDR(x) + (x).a_text) \ | ||
42 | : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) | ||
43 | |||
44 | #define N_TRSIZE(a) ((a).a_trsize) | ||
45 | #define N_DRSIZE(a) ((a).a_drsize) | ||
46 | #define N_SYMSIZE(a) ((a).a_syms) | ||
47 | |||
48 | #ifndef __ASSEMBLY__ | ||
49 | |||
50 | /* | ||
51 | * Sparc relocation types | ||
52 | */ | ||
53 | enum reloc_type | ||
54 | { | ||
55 | RELOC_8, | ||
56 | RELOC_16, | ||
57 | RELOC_32, /* simplest relocs */ | ||
58 | RELOC_DISP8, | ||
59 | RELOC_DISP16, | ||
60 | RELOC_DISP32, /* Disp's (pc-rel) */ | ||
61 | RELOC_WDISP30, | ||
62 | RELOC_WDISP22, /* SR word disp's */ | ||
63 | RELOC_HI22, | ||
64 | RELOC_22, /* SR 22-bit relocs */ | ||
65 | RELOC_13, | ||
66 | RELOC_LO10, /* SR 13&10-bit relocs */ | ||
67 | RELOC_SFA_BASE, | ||
68 | RELOC_SFA_OFF13, /* SR S.F.A. relocs */ | ||
69 | RELOC_BASE10, | ||
70 | RELOC_BASE13, | ||
71 | RELOC_BASE22, /* base_relative pic */ | ||
72 | RELOC_PC10, | ||
73 | RELOC_PC22, /* special pc-rel pic */ | ||
74 | RELOC_JMP_TBL, /* jmp_tbl_rel in pic */ | ||
75 | RELOC_SEGOFF16, /* ShLib offset-in-seg */ | ||
76 | RELOC_GLOB_DAT, | ||
77 | RELOC_JMP_SLOT, | ||
78 | RELOC_RELATIVE /* rtld relocs */ | ||
79 | }; | ||
80 | |||
81 | /* | ||
82 | * Format of a relocation datum. | ||
83 | */ | ||
84 | struct relocation_info /* used when header.a_machtype == M_SPARC */ | ||
85 | { | ||
86 | unsigned int r_address; /* relocation addr */ | ||
87 | unsigned int r_index:24; /* segment index or symbol index */ | ||
88 | unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ | ||
89 | unsigned int r_pad:2; /* <unused> */ | ||
90 | enum reloc_type r_type:5; /* type of relocation to perform */ | ||
91 | int r_addend; /* addend for relocation value */ | ||
92 | }; | ||
93 | |||
94 | #define N_RELOCATION_INFO_DECLARED 1 | ||
95 | |||
96 | #endif /* !(__ASSEMBLY__) */ | ||
97 | |||
98 | #endif /* !(__SPARC64_A_OUT_H__) */ | ||
diff --git a/include/asm-sparc64/auxvec.h b/include/asm-sparc64/auxvec.h index 436a29129828..1f45c67d7316 100644 --- a/include/asm-sparc64/auxvec.h +++ b/include/asm-sparc64/auxvec.h | |||
@@ -1,4 +1 @@ | |||
1 | #ifndef __ASM_SPARC64_AUXVEC_H | #include <asm-sparc/auxvec.h> | |
2 | #define __ASM_SPARC64_AUXVEC_H | ||
3 | |||
4 | #endif /* !(__ASM_SPARC64_AUXVEC_H) */ | ||
diff --git a/include/asm-sparc64/bpp.h b/include/asm-sparc64/bpp.h index abe163a50382..514eee20272e 100644 --- a/include/asm-sparc64/bpp.h +++ b/include/asm-sparc64/bpp.h | |||
@@ -1,73 +1 @@ | |||
1 | #ifndef _SPARC64_BPP_H | #include <asm-sparc/bpp.h> | |
2 | #define _SPARC64_BPP_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (c) 1995 Picture Elements | ||
6 | * Stephen Williams | ||
7 | * Gus Baldauf | ||
8 | * | ||
9 | * Linux/SPARC port by Peter Zaitcev. | ||
10 | * Integration into SPARC tree by Tom Dyas. | ||
11 | */ | ||
12 | |||
13 | #include <linux/ioctl.h> | ||
14 | |||
15 | /* | ||
16 | * This is a driver that supports IEEE Std 1284-1994 communications | ||
17 | * with compliant or compatible devices. It will use whatever features | ||
18 | * the device supports, prefering those that are typically faster. | ||
19 | * | ||
20 | * When the device is opened, it is left in COMPATIBILITY mode, and | ||
21 | * writes work like any printer device. The driver only attempt to | ||
22 | * negotiate 1284 modes when needed so that plugs can be pulled, | ||
23 | * switch boxes switched, etc., without disrupting things. It will | ||
24 | * also leave the device in compatibility mode when closed. | ||
25 | */ | ||
26 | |||
27 | |||
28 | |||
29 | /* | ||
30 | * This driver also supplies ioctls to manually manipulate the | ||
31 | * pins. This is great for testing devices, or writing code to deal | ||
32 | * with bizzarro-mode of the ACME Special TurboThingy Plus. | ||
33 | * | ||
34 | * NOTE: These ioctl currently do not interact well with | ||
35 | * read/write. Caveat emptor. | ||
36 | * | ||
37 | * PUT_PINS allows us to assign the sense of all the pins, including | ||
38 | * the data pins if being driven by the host. The GET_PINS returns the | ||
39 | * pins that the peripheral drives, including data if appropriate. | ||
40 | */ | ||
41 | |||
42 | # define BPP_PUT_PINS _IOW('B', 1, int) | ||
43 | # define BPP_GET_PINS _IOR('B', 2, char) /* that's bogus - should've been _IO */ | ||
44 | # define BPP_PUT_DATA _IOW('B', 3, int) | ||
45 | # define BPP_GET_DATA _IOR('B', 4, char) /* ditto */ | ||
46 | |||
47 | /* | ||
48 | * Set the data bus to input mode. Disengage the data bin driver and | ||
49 | * be prepared to read values from the peripheral. If the arg is 0, | ||
50 | * then revert the bus to output mode. | ||
51 | */ | ||
52 | # define BPP_SET_INPUT _IOW('B', 5, int) | ||
53 | |||
54 | /* | ||
55 | * These bits apply to the PUT operation... | ||
56 | */ | ||
57 | # define BPP_PP_nStrobe 0x0001 | ||
58 | # define BPP_PP_nAutoFd 0x0002 | ||
59 | # define BPP_PP_nInit 0x0004 | ||
60 | # define BPP_PP_nSelectIn 0x0008 | ||
61 | |||
62 | /* | ||
63 | * These apply to the GET operation, which also reads the current value | ||
64 | * of the previously put values. A bit mask of these will be returned | ||
65 | * as a bit mask in the return code of the ioctl(). | ||
66 | */ | ||
67 | # define BPP_GP_nAck 0x0100 | ||
68 | # define BPP_GP_Busy 0x0200 | ||
69 | # define BPP_GP_PError 0x0400 | ||
70 | # define BPP_GP_Select 0x0800 | ||
71 | # define BPP_GP_nFault 0x1000 | ||
72 | |||
73 | #endif | ||
diff --git a/include/asm-sparc64/bsderrno.h b/include/asm-sparc64/bsderrno.h deleted file mode 100644 index 52fe880d2af8..000000000000 --- a/include/asm-sparc64/bsderrno.h +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* $Id: bsderrno.h,v 1.1 1996/12/26 13:25:21 davem Exp $ | ||
2 | * bsderrno.h: Error numbers for NetBSD binary compatibility | ||
3 | * | ||
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | ||
5 | */ | ||
6 | |||
7 | #ifndef _SPARC64_BSDERRNO_H | ||
8 | #define _SPARC64_BSDERRNO_H | ||
9 | |||
10 | #define BSD_EPERM 1 /* Operation not permitted */ | ||
11 | #define BSD_ENOENT 2 /* No such file or directory */ | ||
12 | #define BSD_ESRCH 3 /* No such process */ | ||
13 | #define BSD_EINTR 4 /* Interrupted system call */ | ||
14 | #define BSD_EIO 5 /* Input/output error */ | ||
15 | #define BSD_ENXIO 6 /* Device not configured */ | ||
16 | #define BSD_E2BIG 7 /* Argument list too long */ | ||
17 | #define BSD_ENOEXEC 8 /* Exec format error */ | ||
18 | #define BSD_EBADF 9 /* Bad file descriptor */ | ||
19 | #define BSD_ECHILD 10 /* No child processes */ | ||
20 | #define BSD_EDEADLK 11 /* Resource deadlock avoided */ | ||
21 | #define BSD_ENOMEM 12 /* Cannot allocate memory */ | ||
22 | #define BSD_EACCES 13 /* Permission denied */ | ||
23 | #define BSD_EFAULT 14 /* Bad address */ | ||
24 | #define BSD_ENOTBLK 15 /* Block device required */ | ||
25 | #define BSD_EBUSY 16 /* Device busy */ | ||
26 | #define BSD_EEXIST 17 /* File exists */ | ||
27 | #define BSD_EXDEV 18 /* Cross-device link */ | ||
28 | #define BSD_ENODEV 19 /* Operation not supported by device */ | ||
29 | #define BSD_ENOTDIR 20 /* Not a directory */ | ||
30 | #define BSD_EISDIR 21 /* Is a directory */ | ||
31 | #define BSD_EINVAL 22 /* Invalid argument */ | ||
32 | #define BSD_ENFILE 23 /* Too many open files in system */ | ||
33 | #define BSD_EMFILE 24 /* Too many open files */ | ||
34 | #define BSD_ENOTTY 25 /* Inappropriate ioctl for device */ | ||
35 | #define BSD_ETXTBSY 26 /* Text file busy */ | ||
36 | #define BSD_EFBIG 27 /* File too large */ | ||
37 | #define BSD_ENOSPC 28 /* No space left on device */ | ||
38 | #define BSD_ESPIPE 29 /* Illegal seek */ | ||
39 | #define BSD_EROFS 30 /* Read-only file system */ | ||
40 | #define BSD_EMLINK 31 /* Too many links */ | ||
41 | #define BSD_EPIPE 32 /* Broken pipe */ | ||
42 | #define BSD_EDOM 33 /* Numerical argument out of domain */ | ||
43 | #define BSD_ERANGE 34 /* Result too large */ | ||
44 | #define BSD_EAGAIN 35 /* Resource temporarily unavailable */ | ||
45 | #define BSD_EWOULDBLOCK EAGAIN /* Operation would block */ | ||
46 | #define BSD_EINPROGRESS 36 /* Operation now in progress */ | ||
47 | #define BSD_EALREADY 37 /* Operation already in progress */ | ||
48 | #define BSD_ENOTSOCK 38 /* Socket operation on non-socket */ | ||
49 | #define BSD_EDESTADDRREQ 39 /* Destination address required */ | ||
50 | #define BSD_EMSGSIZE 40 /* Message too long */ | ||
51 | #define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */ | ||
52 | #define BSD_ENOPROTOOPT 42 /* Protocol not available */ | ||
53 | #define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */ | ||
54 | #define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */ | ||
55 | #define BSD_EOPNOTSUPP 45 /* Operation not supported */ | ||
56 | #define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */ | ||
57 | #define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ | ||
58 | #define BSD_EADDRINUSE 48 /* Address already in use */ | ||
59 | #define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */ | ||
60 | #define BSD_ENETDOWN 50 /* Network is down */ | ||
61 | #define BSD_ENETUNREACH 51 /* Network is unreachable */ | ||
62 | #define BSD_ENETRESET 52 /* Network dropped connection on reset */ | ||
63 | #define BSD_ECONNABORTED 53 /* Software caused connection abort */ | ||
64 | #define BSD_ECONNRESET 54 /* Connection reset by peer */ | ||
65 | #define BSD_ENOBUFS 55 /* No buffer space available */ | ||
66 | #define BSD_EISCONN 56 /* Socket is already connected */ | ||
67 | #define BSD_ENOTCONN 57 /* Socket is not connected */ | ||
68 | #define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */ | ||
69 | #define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */ | ||
70 | #define BSD_ETIMEDOUT 60 /* Operation timed out */ | ||
71 | #define BSD_ECONNREFUSED 61 /* Connection refused */ | ||
72 | #define BSD_ELOOP 62 /* Too many levels of symbolic links */ | ||
73 | #define BSD_ENAMETOOLONG 63 /* File name too long */ | ||
74 | #define BSD_EHOSTDOWN 64 /* Host is down */ | ||
75 | #define BSD_EHOSTUNREACH 65 /* No route to host */ | ||
76 | #define BSD_ENOTEMPTY 66 /* Directory not empty */ | ||
77 | #define BSD_EPROCLIM 67 /* Too many processes */ | ||
78 | #define BSD_EUSERS 68 /* Too many users */ | ||
79 | #define BSD_EDQUOT 69 /* Disc quota exceeded */ | ||
80 | #define BSD_ESTALE 70 /* Stale NFS file handle */ | ||
81 | #define BSD_EREMOTE 71 /* Too many levels of remote in path */ | ||
82 | #define BSD_EBADRPC 72 /* RPC struct is bad */ | ||
83 | #define BSD_ERPCMISMATCH 73 /* RPC version wrong */ | ||
84 | #define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */ | ||
85 | #define BSD_EPROGMISMATCH 75 /* Program version wrong */ | ||
86 | #define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */ | ||
87 | #define BSD_ENOLCK 77 /* No locks available */ | ||
88 | #define BSD_ENOSYS 78 /* Function not implemented */ | ||
89 | #define BSD_EFTYPE 79 /* Inappropriate file type or format */ | ||
90 | #define BSD_EAUTH 80 /* Authentication error */ | ||
91 | #define BSD_ENEEDAUTH 81 /* Need authenticator */ | ||
92 | #define BSD_ELAST 81 /* Must be equal largest errno */ | ||
93 | |||
94 | #endif /* !(_SPARC64_BSDERRNO_H) */ | ||
diff --git a/include/asm-sparc64/bug.h b/include/asm-sparc64/bug.h index 516bb27f3fc4..3433737c7a67 100644 --- a/include/asm-sparc64/bug.h +++ b/include/asm-sparc64/bug.h | |||
@@ -1,22 +1 @@ | |||
1 | #ifndef _SPARC64_BUG_H | #include <asm-sparc/bug.h> | |
2 | #define _SPARC64_BUG_H | ||
3 | |||
4 | #ifdef CONFIG_BUG | ||
5 | #include <linux/compiler.h> | ||
6 | |||
7 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
8 | extern void do_BUG(const char *file, int line); | ||
9 | #define BUG() do { \ | ||
10 | do_BUG(__FILE__, __LINE__); \ | ||
11 | __builtin_trap(); \ | ||
12 | } while (0) | ||
13 | #else | ||
14 | #define BUG() __builtin_trap() | ||
15 | #endif | ||
16 | |||
17 | #define HAVE_ARCH_BUG | ||
18 | #endif | ||
19 | |||
20 | #include <asm-generic/bug.h> | ||
21 | |||
22 | #endif | ||
diff --git a/include/asm-sparc64/bugs.h b/include/asm-sparc64/bugs.h index 11ade6841971..04ae9e2818cf 100644 --- a/include/asm-sparc64/bugs.h +++ b/include/asm-sparc64/bugs.h | |||
@@ -1,10 +1 @@ | |||
1 | /* bugs.h: Sparc64 probes for various bugs. | #include <asm-sparc/bugs.h> | |
2 | * | ||
3 | * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) | ||
4 | */ | ||
5 | #include <asm/sstate.h> | ||
6 | |||
7 | static void __init check_bugs(void) | ||
8 | { | ||
9 | sstate_running(); | ||
10 | } | ||
diff --git a/include/asm-sparc64/byteorder.h b/include/asm-sparc64/byteorder.h index 3943022906fd..f672855bee17 100644 --- a/include/asm-sparc64/byteorder.h +++ b/include/asm-sparc64/byteorder.h | |||
@@ -1,49 +1 @@ | |||
1 | #ifndef _SPARC64_BYTEORDER_H | #include <asm-sparc/byteorder.h> | |
2 | #define _SPARC64_BYTEORDER_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | #include <asm/asi.h> | ||
6 | |||
7 | #ifdef __GNUC__ | ||
8 | |||
9 | static inline __u16 ___arch__swab16p(const __u16 *addr) | ||
10 | { | ||
11 | __u16 ret; | ||
12 | |||
13 | __asm__ __volatile__ ("lduha [%1] %2, %0" | ||
14 | : "=r" (ret) | ||
15 | : "r" (addr), "i" (ASI_PL)); | ||
16 | return ret; | ||
17 | } | ||
18 | |||
19 | static inline __u32 ___arch__swab32p(const __u32 *addr) | ||
20 | { | ||
21 | __u32 ret; | ||
22 | |||
23 | __asm__ __volatile__ ("lduwa [%1] %2, %0" | ||
24 | : "=r" (ret) | ||
25 | : "r" (addr), "i" (ASI_PL)); | ||
26 | return ret; | ||
27 | } | ||
28 | |||
29 | static inline __u64 ___arch__swab64p(const __u64 *addr) | ||
30 | { | ||
31 | __u64 ret; | ||
32 | |||
33 | __asm__ __volatile__ ("ldxa [%1] %2, %0" | ||
34 | : "=r" (ret) | ||
35 | : "r" (addr), "i" (ASI_PL)); | ||
36 | return ret; | ||
37 | } | ||
38 | |||
39 | #define __arch__swab16p(x) ___arch__swab16p(x) | ||
40 | #define __arch__swab32p(x) ___arch__swab32p(x) | ||
41 | #define __arch__swab64p(x) ___arch__swab64p(x) | ||
42 | |||
43 | #define __BYTEORDER_HAS_U64__ | ||
44 | |||
45 | #endif /* __GNUC__ */ | ||
46 | |||
47 | #include <linux/byteorder/big_endian.h> | ||
48 | |||
49 | #endif /* _SPARC64_BYTEORDER_H */ | ||
diff --git a/include/asm-sparc64/cache.h b/include/asm-sparc64/cache.h index e9df17acedde..fa9de5cadbf1 100644 --- a/include/asm-sparc64/cache.h +++ b/include/asm-sparc64/cache.h | |||
@@ -1,18 +1 @@ | |||
1 | /* | #include <asm-sparc/cache.h> | |
2 | * include/asm-sparc64/cache.h | ||
3 | */ | ||
4 | #ifndef __ARCH_SPARC64_CACHE_H | ||
5 | #define __ARCH_SPARC64_CACHE_H | ||
6 | |||
7 | /* bytes per L1 cache line */ | ||
8 | #define L1_CACHE_SHIFT 5 | ||
9 | #define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */ | ||
10 | |||
11 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | ||
12 | |||
13 | #define SMP_CACHE_BYTES_SHIFT 6 | ||
14 | #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */ | ||
15 | |||
16 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | ||
17 | |||
18 | #endif | ||
diff --git a/include/asm-sparc64/cputime.h b/include/asm-sparc64/cputime.h index dec2fc7a36f8..435f37a92f7c 100644 --- a/include/asm-sparc64/cputime.h +++ b/include/asm-sparc64/cputime.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef __SPARC64_CPUTIME_H | #include <asm-sparc/cputime.h> | |
2 | #define __SPARC64_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __SPARC64_CPUTIME_H */ | ||
diff --git a/include/asm-sparc64/current.h b/include/asm-sparc64/current.h index 6c21e4ee2475..a7904a7f53a8 100644 --- a/include/asm-sparc64/current.h +++ b/include/asm-sparc64/current.h | |||
@@ -1,8 +1 @@ | |||
1 | #ifndef _SPARC64_CURRENT_H | #include <asm-sparc/current.h> | |
2 | #define _SPARC64_CURRENT_H | ||
3 | |||
4 | #include <linux/thread_info.h> | ||
5 | |||
6 | register struct task_struct *current asm("g4"); | ||
7 | |||
8 | #endif /* !(_SPARC64_CURRENT_H) */ | ||
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h index 5111e8717be3..4145c47097e2 100644 --- a/include/asm-sparc64/device.h +++ b/include/asm-sparc64/device.h | |||
@@ -1,21 +1 @@ | |||
1 | /* | #include <asm-sparc/device.h> | |
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #ifndef _ASM_SPARC64_DEVICE_H | ||
7 | #define _ASM_SPARC64_DEVICE_H | ||
8 | |||
9 | struct device_node; | ||
10 | struct of_device; | ||
11 | |||
12 | struct dev_archdata { | ||
13 | void *iommu; | ||
14 | void *stc; | ||
15 | void *host_controller; | ||
16 | |||
17 | struct device_node *prom_node; | ||
18 | struct of_device *op; | ||
19 | }; | ||
20 | |||
21 | #endif /* _ASM_SPARC64_DEVICE_H */ | ||
diff --git a/include/asm-sparc64/div64.h b/include/asm-sparc64/div64.h index 6cd978cefb28..928c94f99ecf 100644 --- a/include/asm-sparc64/div64.h +++ b/include/asm-sparc64/div64.h | |||
@@ -1 +1 @@ | |||
#include <asm-generic/div64.h> | #include <asm-sparc/div64.h> | ||
diff --git a/include/asm-sparc64/emergency-restart.h b/include/asm-sparc64/emergency-restart.h index 108d8c48e42e..2cac7b644da8 100644 --- a/include/asm-sparc64/emergency-restart.h +++ b/include/asm-sparc64/emergency-restart.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | #include <asm-sparc/emergency-restart.h> | |
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/include/asm-sparc64/errno.h b/include/asm-sparc64/errno.h index ea3509ee1b0b..9701fe01cc53 100644 --- a/include/asm-sparc64/errno.h +++ b/include/asm-sparc64/errno.h | |||
@@ -1,114 +1 @@ | |||
1 | /* $Id: errno.h,v 1.2 1997/04/15 12:46:11 jj Exp $ */ | #include <asm-sparc/errno.h> | |
2 | #ifndef _SPARC64_ERRNO_H | ||
3 | #define _SPARC64_ERRNO_H | ||
4 | |||
5 | /* These match the SunOS error numbering scheme. */ | ||
6 | |||
7 | #include <asm-generic/errno-base.h> | ||
8 | |||
9 | #define EWOULDBLOCK EAGAIN /* Operation would block */ | ||
10 | #define EINPROGRESS 36 /* Operation now in progress */ | ||
11 | #define EALREADY 37 /* Operation already in progress */ | ||
12 | #define ENOTSOCK 38 /* Socket operation on non-socket */ | ||
13 | #define EDESTADDRREQ 39 /* Destination address required */ | ||
14 | #define EMSGSIZE 40 /* Message too long */ | ||
15 | #define EPROTOTYPE 41 /* Protocol wrong type for socket */ | ||
16 | #define ENOPROTOOPT 42 /* Protocol not available */ | ||
17 | #define EPROTONOSUPPORT 43 /* Protocol not supported */ | ||
18 | #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ | ||
19 | #define EOPNOTSUPP 45 /* Op not supported on transport endpoint */ | ||
20 | #define EPFNOSUPPORT 46 /* Protocol family not supported */ | ||
21 | #define EAFNOSUPPORT 47 /* Address family not supported by protocol */ | ||
22 | #define EADDRINUSE 48 /* Address already in use */ | ||
23 | #define EADDRNOTAVAIL 49 /* Cannot assign requested address */ | ||
24 | #define ENETDOWN 50 /* Network is down */ | ||
25 | #define ENETUNREACH 51 /* Network is unreachable */ | ||
26 | #define ENETRESET 52 /* Net dropped connection because of reset */ | ||
27 | #define ECONNABORTED 53 /* Software caused connection abort */ | ||
28 | #define ECONNRESET 54 /* Connection reset by peer */ | ||
29 | #define ENOBUFS 55 /* No buffer space available */ | ||
30 | #define EISCONN 56 /* Transport endpoint is already connected */ | ||
31 | #define ENOTCONN 57 /* Transport endpoint is not connected */ | ||
32 | #define ESHUTDOWN 58 /* No send after transport endpoint shutdown */ | ||
33 | #define ETOOMANYREFS 59 /* Too many references: cannot splice */ | ||
34 | #define ETIMEDOUT 60 /* Connection timed out */ | ||
35 | #define ECONNREFUSED 61 /* Connection refused */ | ||
36 | #define ELOOP 62 /* Too many symbolic links encountered */ | ||
37 | #define ENAMETOOLONG 63 /* File name too long */ | ||
38 | #define EHOSTDOWN 64 /* Host is down */ | ||
39 | #define EHOSTUNREACH 65 /* No route to host */ | ||
40 | #define ENOTEMPTY 66 /* Directory not empty */ | ||
41 | #define EPROCLIM 67 /* SUNOS: Too many processes */ | ||
42 | #define EUSERS 68 /* Too many users */ | ||
43 | #define EDQUOT 69 /* Quota exceeded */ | ||
44 | #define ESTALE 70 /* Stale NFS file handle */ | ||
45 | #define EREMOTE 71 /* Object is remote */ | ||
46 | #define ENOSTR 72 /* Device not a stream */ | ||
47 | #define ETIME 73 /* Timer expired */ | ||
48 | #define ENOSR 74 /* Out of streams resources */ | ||
49 | #define ENOMSG 75 /* No message of desired type */ | ||
50 | #define EBADMSG 76 /* Not a data message */ | ||
51 | #define EIDRM 77 /* Identifier removed */ | ||
52 | #define EDEADLK 78 /* Resource deadlock would occur */ | ||
53 | #define ENOLCK 79 /* No record locks available */ | ||
54 | #define ENONET 80 /* Machine is not on the network */ | ||
55 | #define ERREMOTE 81 /* SunOS: Too many lvls of remote in path */ | ||
56 | #define ENOLINK 82 /* Link has been severed */ | ||
57 | #define EADV 83 /* Advertise error */ | ||
58 | #define ESRMNT 84 /* Srmount error */ | ||
59 | #define ECOMM 85 /* Communication error on send */ | ||
60 | #define EPROTO 86 /* Protocol error */ | ||
61 | #define EMULTIHOP 87 /* Multihop attempted */ | ||
62 | #define EDOTDOT 88 /* RFS specific error */ | ||
63 | #define EREMCHG 89 /* Remote address changed */ | ||
64 | #define ENOSYS 90 /* Function not implemented */ | ||
65 | |||
66 | /* The rest have no SunOS equivalent. */ | ||
67 | #define ESTRPIPE 91 /* Streams pipe error */ | ||
68 | #define EOVERFLOW 92 /* Value too large for defined data type */ | ||
69 | #define EBADFD 93 /* File descriptor in bad state */ | ||
70 | #define ECHRNG 94 /* Channel number out of range */ | ||
71 | #define EL2NSYNC 95 /* Level 2 not synchronized */ | ||
72 | #define EL3HLT 96 /* Level 3 halted */ | ||
73 | #define EL3RST 97 /* Level 3 reset */ | ||
74 | #define ELNRNG 98 /* Link number out of range */ | ||
75 | #define EUNATCH 99 /* Protocol driver not attached */ | ||
76 | #define ENOCSI 100 /* No CSI structure available */ | ||
77 | #define EL2HLT 101 /* Level 2 halted */ | ||
78 | #define EBADE 102 /* Invalid exchange */ | ||
79 | #define EBADR 103 /* Invalid request descriptor */ | ||
80 | #define EXFULL 104 /* Exchange full */ | ||
81 | #define ENOANO 105 /* No anode */ | ||
82 | #define EBADRQC 106 /* Invalid request code */ | ||
83 | #define EBADSLT 107 /* Invalid slot */ | ||
84 | #define EDEADLOCK 108 /* File locking deadlock error */ | ||
85 | #define EBFONT 109 /* Bad font file format */ | ||
86 | #define ELIBEXEC 110 /* Cannot exec a shared library directly */ | ||
87 | #define ENODATA 111 /* No data available */ | ||
88 | #define ELIBBAD 112 /* Accessing a corrupted shared library */ | ||
89 | #define ENOPKG 113 /* Package not installed */ | ||
90 | #define ELIBACC 114 /* Can not access a needed shared library */ | ||
91 | #define ENOTUNIQ 115 /* Name not unique on network */ | ||
92 | #define ERESTART 116 /* Interrupted syscall should be restarted */ | ||
93 | #define EUCLEAN 117 /* Structure needs cleaning */ | ||
94 | #define ENOTNAM 118 /* Not a XENIX named type file */ | ||
95 | #define ENAVAIL 119 /* No XENIX semaphores available */ | ||
96 | #define EISNAM 120 /* Is a named type file */ | ||
97 | #define EREMOTEIO 121 /* Remote I/O error */ | ||
98 | #define EILSEQ 122 /* Illegal byte sequence */ | ||
99 | #define ELIBMAX 123 /* Atmpt to link in too many shared libs */ | ||
100 | #define ELIBSCN 124 /* .lib section in a.out corrupted */ | ||
101 | |||
102 | #define ENOMEDIUM 125 /* No medium found */ | ||
103 | #define EMEDIUMTYPE 126 /* Wrong medium type */ | ||
104 | #define ECANCELED 127 /* Operation Cancelled */ | ||
105 | #define ENOKEY 128 /* Required key not available */ | ||
106 | #define EKEYEXPIRED 129 /* Key has expired */ | ||
107 | #define EKEYREVOKED 130 /* Key has been revoked */ | ||
108 | #define EKEYREJECTED 131 /* Key was rejected by service */ | ||
109 | |||
110 | /* for robust mutexes */ | ||
111 | #define EOWNERDEAD 132 /* Owner died */ | ||
112 | #define ENOTRECOVERABLE 133 /* State not recoverable */ | ||
113 | |||
114 | #endif /* !(_SPARC64_ERRNO_H) */ | ||
diff --git a/include/asm-sparc64/fb.h b/include/asm-sparc64/fb.h index 389012e5fbad..1c2ac5832f39 100644 --- a/include/asm-sparc64/fb.h +++ b/include/asm-sparc64/fb.h | |||
@@ -1,27 +1 @@ | |||
1 | #ifndef _ASM_FB_H_ | #include <asm-sparc/fb.h> | |
2 | #define _ASM_FB_H_ | ||
3 | #include <linux/fb.h> | ||
4 | #include <linux/fs.h> | ||
5 | #include <asm/page.h> | ||
6 | #include <asm/prom.h> | ||
7 | |||
8 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | ||
9 | unsigned long off) | ||
10 | { | ||
11 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
12 | } | ||
13 | |||
14 | static inline int fb_is_primary_device(struct fb_info *info) | ||
15 | { | ||
16 | struct device *dev = info->device; | ||
17 | struct device_node *node; | ||
18 | |||
19 | node = dev->archdata.prom_node; | ||
20 | if (node && | ||
21 | node == of_console_device) | ||
22 | return 1; | ||
23 | |||
24 | return 0; | ||
25 | } | ||
26 | |||
27 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index b6ece223562d..c299b853b5ba 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -16,7 +16,7 @@ | |||
16 | /* BIO layer definitions. */ | 16 | /* BIO layer definitions. */ |
17 | extern unsigned long kern_base, kern_size; | 17 | extern unsigned long kern_base, kern_size; |
18 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 18 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
19 | #define BIO_VMERGE_BOUNDARY 0 | 19 | #define BIO_VMERGE_BOUNDARY 8192 |
20 | 20 | ||
21 | static inline u8 _inb(unsigned long addr) | 21 | static inline u8 _inb(unsigned long addr) |
22 | { | 22 | { |
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h index 9eac6676caf1..46325ddee23b 100644 --- a/include/asm-sparc64/iommu.h +++ b/include/asm-sparc64/iommu.h | |||
@@ -26,6 +26,7 @@ struct iommu_arena { | |||
26 | struct iommu { | 26 | struct iommu { |
27 | spinlock_t lock; | 27 | spinlock_t lock; |
28 | struct iommu_arena arena; | 28 | struct iommu_arena arena; |
29 | void (*flush_all)(struct iommu *); | ||
29 | iopte_t *page_table; | 30 | iopte_t *page_table; |
30 | u32 page_table_map_base; | 31 | u32 page_table_map_base; |
31 | unsigned long iommu_control; | 32 | unsigned long iommu_control; |
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index 5020eaf67c29..7237dd87663e 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h | |||
@@ -14,11 +14,15 @@ typedef u32 kprobe_opcode_t; | |||
14 | 14 | ||
15 | #define arch_remove_kprobe(p) do {} while (0) | 15 | #define arch_remove_kprobe(p) do {} while (0) |
16 | 16 | ||
17 | #define ARCH_SUPPORTS_KRETPROBES | ||
18 | |||
17 | #define flush_insn_slot(p) \ | 19 | #define flush_insn_slot(p) \ |
18 | do { flushi(&(p)->ainsn.insn[0]); \ | 20 | do { flushi(&(p)->ainsn.insn[0]); \ |
19 | flushi(&(p)->ainsn.insn[1]); \ | 21 | flushi(&(p)->ainsn.insn[1]); \ |
20 | } while (0) | 22 | } while (0) |
21 | 23 | ||
24 | void kretprobe_trampoline(void); | ||
25 | |||
22 | /* Architecture specific copy of original instruction*/ | 26 | /* Architecture specific copy of original instruction*/ |
23 | struct arch_specific_insn { | 27 | struct arch_specific_insn { |
24 | /* copy of the original instruction */ | 28 | /* copy of the original instruction */ |
diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h index 46d69b3223c5..a769fdbe164a 100644 --- a/include/asm-sparc64/of_device.h +++ b/include/asm-sparc64/of_device.h | |||
@@ -1,38 +1 @@ | |||
1 | #ifndef _ASM_SPARC64_OF_DEVICE_H | #include <asm-sparc/of_device.h> | |
2 | #define _ASM_SPARC64_OF_DEVICE_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #include <linux/device.h> | ||
6 | #include <linux/of.h> | ||
7 | #include <linux/mod_devicetable.h> | ||
8 | #include <asm/openprom.h> | ||
9 | |||
10 | /* | ||
11 | * The of_device is a kind of "base class" that is a superset of | ||
12 | * struct device for use by devices attached to an OF node and | ||
13 | * probed using OF properties. | ||
14 | */ | ||
15 | struct of_device | ||
16 | { | ||
17 | struct device_node *node; | ||
18 | struct device dev; | ||
19 | struct resource resource[PROMREG_MAX]; | ||
20 | unsigned int irqs[PROMINTR_MAX]; | ||
21 | int num_irqs; | ||
22 | |||
23 | void *sysdata; | ||
24 | |||
25 | int slot; | ||
26 | int portid; | ||
27 | int clock_freq; | ||
28 | }; | ||
29 | |||
30 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); | ||
31 | extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); | ||
32 | |||
33 | /* These are just here during the transition */ | ||
34 | #include <linux/of_device.h> | ||
35 | #include <linux/of_platform.h> | ||
36 | |||
37 | #endif /* __KERNEL__ */ | ||
38 | #endif /* _ASM_SPARC64_OF_DEVICE_H */ | ||
diff --git a/include/asm-sparc64/of_platform.h b/include/asm-sparc64/of_platform.h index f15cfa723916..78aa032b674c 100644 --- a/include/asm-sparc64/of_platform.h +++ b/include/asm-sparc64/of_platform.h | |||
@@ -22,9 +22,4 @@ extern struct bus_type sbus_bus_type; | |||
22 | 22 | ||
23 | #define of_bus_type of_platform_bus_type /* for compatibility */ | 23 | #define of_bus_type of_platform_bus_type /* for compatibility */ |
24 | 24 | ||
25 | extern struct of_device *of_platform_device_create(struct device_node *np, | ||
26 | const char *bus_id, | ||
27 | struct device *parent, | ||
28 | struct bus_type *bus); | ||
29 | |||
30 | #endif /* _ASM_SPARC64_OF_PLATFORM_H */ | 25 | #endif /* _ASM_SPARC64_OF_PLATFORM_H */ |
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h index 07843f9f05df..5fa166ee3ffa 100644 --- a/include/asm-sparc64/prom.h +++ b/include/asm-sparc64/prom.h | |||
@@ -1,103 +1 @@ | |||
1 | #ifndef _SPARC64_PROM_H | #include <asm-sparc/prom.h> | |
2 | #define _SPARC64_PROM_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | /* | ||
6 | * Definitions for talking to the Open Firmware PROM on | ||
7 | * Power Macintosh computers. | ||
8 | * | ||
9 | * Copyright (C) 1996-2005 Paul Mackerras. | ||
10 | * | ||
11 | * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. | ||
12 | * Updates for SPARC64 by David S. Miller | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or | ||
15 | * modify it under the terms of the GNU General Public License | ||
16 | * as published by the Free Software Foundation; either version | ||
17 | * 2 of the License, or (at your option) any later version. | ||
18 | */ | ||
19 | #include <linux/types.h> | ||
20 | #include <linux/proc_fs.h> | ||
21 | #include <asm/atomic.h> | ||
22 | |||
23 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2 | ||
24 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 | ||
25 | |||
26 | #define of_compat_cmp(s1, s2, l) strncmp((s1), (s2), (l)) | ||
27 | #define of_prop_cmp(s1, s2) strcasecmp((s1), (s2)) | ||
28 | #define of_node_cmp(s1, s2) strcmp((s1), (s2)) | ||
29 | |||
30 | typedef u32 phandle; | ||
31 | typedef u32 ihandle; | ||
32 | |||
33 | struct property { | ||
34 | char *name; | ||
35 | int length; | ||
36 | void *value; | ||
37 | struct property *next; | ||
38 | unsigned long _flags; | ||
39 | unsigned int unique_id; | ||
40 | }; | ||
41 | |||
42 | struct of_irq_controller; | ||
43 | struct device_node { | ||
44 | const char *name; | ||
45 | const char *type; | ||
46 | phandle node; | ||
47 | char *path_component_name; | ||
48 | char *full_name; | ||
49 | |||
50 | struct property *properties; | ||
51 | struct property *deadprops; /* removed properties */ | ||
52 | struct device_node *parent; | ||
53 | struct device_node *child; | ||
54 | struct device_node *sibling; | ||
55 | struct device_node *next; /* next device of same type */ | ||
56 | struct device_node *allnext; /* next in list of all nodes */ | ||
57 | struct proc_dir_entry *pde; /* this node's proc directory */ | ||
58 | struct kref kref; | ||
59 | unsigned long _flags; | ||
60 | void *data; | ||
61 | unsigned int unique_id; | ||
62 | |||
63 | struct of_irq_controller *irq_trans; | ||
64 | }; | ||
65 | |||
66 | struct of_irq_controller { | ||
67 | unsigned int (*irq_build)(struct device_node *, unsigned int, void *); | ||
68 | void *data; | ||
69 | }; | ||
70 | |||
71 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | ||
72 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | ||
73 | |||
74 | extern struct device_node *of_find_node_by_cpuid(int cpuid); | ||
75 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | ||
76 | extern int of_getintprop_default(struct device_node *np, | ||
77 | const char *name, | ||
78 | int def); | ||
79 | extern int of_find_in_proplist(const char *list, const char *match, int len); | ||
80 | |||
81 | extern void prom_build_devicetree(void); | ||
82 | |||
83 | /* Dummy ref counting routines - to be implemented later */ | ||
84 | static inline struct device_node *of_node_get(struct device_node *node) | ||
85 | { | ||
86 | return node; | ||
87 | } | ||
88 | static inline void of_node_put(struct device_node *node) | ||
89 | { | ||
90 | } | ||
91 | |||
92 | /* | ||
93 | * NB: This is here while we transition from using asm/prom.h | ||
94 | * to linux/of.h | ||
95 | */ | ||
96 | #include <linux/of.h> | ||
97 | |||
98 | extern struct device_node *of_console_device; | ||
99 | extern char *of_console_path; | ||
100 | extern char *of_console_options; | ||
101 | |||
102 | #endif /* __KERNEL__ */ | ||
103 | #endif /* _SPARC64_PROM_H */ | ||
diff --git a/include/asm-v850/page.h b/include/asm-v850/page.h index 661d8cd08839..74a539a9bd59 100644 --- a/include/asm-v850/page.h +++ b/include/asm-v850/page.h | |||
@@ -57,6 +57,7 @@ typedef struct { unsigned long pte; } pte_t; | |||
57 | typedef struct { unsigned long pmd; } pmd_t; | 57 | typedef struct { unsigned long pmd; } pmd_t; |
58 | typedef struct { unsigned long pgd; } pgd_t; | 58 | typedef struct { unsigned long pgd; } pgd_t; |
59 | typedef struct { unsigned long pgprot; } pgprot_t; | 59 | typedef struct { unsigned long pgprot; } pgprot_t; |
60 | typedef struct page *pgtable_t; | ||
60 | 61 | ||
61 | #define pte_val(x) ((x).pte) | 62 | #define pte_val(x) ((x).pte) |
62 | #define pmd_val(x) ((x).pmd) | 63 | #define pmd_val(x) ((x).pmd) |
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index 98a9ca266531..7a72d6aa50be 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h | |||
@@ -89,6 +89,10 @@ extern int acpi_pci_disabled; | |||
89 | extern int acpi_skip_timer_override; | 89 | extern int acpi_skip_timer_override; |
90 | extern int acpi_use_timer_override; | 90 | extern int acpi_use_timer_override; |
91 | 91 | ||
92 | extern u8 acpi_sci_flags; | ||
93 | extern int acpi_sci_override_gsi; | ||
94 | void acpi_pic_sci_set_trigger(unsigned int, u16); | ||
95 | |||
92 | static inline void disable_acpi(void) | 96 | static inline void disable_acpi(void) |
93 | { | 97 | { |
94 | acpi_disabled = 1; | 98 | acpi_disabled = 1; |
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h index 8dd8c5e3cc7f..6a22212b4b20 100644 --- a/include/asm-x86/cacheflush.h +++ b/include/asm-x86/cacheflush.h | |||
@@ -44,6 +44,8 @@ int set_memory_np(unsigned long addr, int numpages); | |||
44 | 44 | ||
45 | void clflush_cache_range(void *addr, unsigned int size); | 45 | void clflush_cache_range(void *addr, unsigned int size); |
46 | 46 | ||
47 | void cpa_init(void); | ||
48 | |||
47 | #ifdef CONFIG_DEBUG_RODATA | 49 | #ifdef CONFIG_DEBUG_RODATA |
48 | void mark_rodata_ro(void); | 50 | void mark_rodata_ro(void); |
49 | #endif | 51 | #endif |
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h index 811fe14f70b2..9e7280092a48 100644 --- a/include/asm-x86/geode.h +++ b/include/asm-x86/geode.h | |||
@@ -206,12 +206,17 @@ static inline u16 geode_mfgpt_read(int timer, u16 reg) | |||
206 | return inw(base + reg + (timer * 8)); | 206 | return inw(base + reg + (timer * 8)); |
207 | } | 207 | } |
208 | 208 | ||
209 | extern int __init geode_mfgpt_detect(void); | ||
210 | extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable); | 209 | extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable); |
211 | extern int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable); | 210 | extern int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable); |
212 | extern int geode_mfgpt_alloc_timer(int timer, int domain, struct module *owner); | 211 | extern int geode_mfgpt_alloc_timer(int timer, int domain); |
213 | 212 | ||
214 | #define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1) | 213 | #define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1) |
215 | #define geode_mfgpt_release_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 0) | 214 | #define geode_mfgpt_release_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 0) |
216 | 215 | ||
216 | #ifdef CONFIG_GEODE_MFGPT_TIMER | ||
217 | extern int __init mfgpt_timer_setup(void); | ||
218 | #else | ||
219 | static inline int mfgpt_timer_setup(void) { return 0; } | ||
220 | #endif | ||
221 | |||
217 | #endif | 222 | #endif |
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index 984998a30741..5f7257fd589b 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h | |||
@@ -48,7 +48,6 @@ typedef unsigned long pgprotval_t; | |||
48 | typedef unsigned long phys_addr_t; | 48 | typedef unsigned long phys_addr_t; |
49 | 49 | ||
50 | typedef union { pteval_t pte, pte_low; } pte_t; | 50 | typedef union { pteval_t pte, pte_low; } pte_t; |
51 | typedef pte_t boot_pte_t; | ||
52 | 51 | ||
53 | #endif /* __ASSEMBLY__ */ | 52 | #endif /* __ASSEMBLY__ */ |
54 | #endif /* CONFIG_X86_PAE */ | 53 | #endif /* CONFIG_X86_PAE */ |
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 44c0a4f1b1eb..174b87738714 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -255,7 +255,7 @@ enum { | |||
255 | * NOTE: the return type is pte_t but if the pmd is PSE then we return it | 255 | * NOTE: the return type is pte_t but if the pmd is PSE then we return it |
256 | * as a pte too. | 256 | * as a pte too. |
257 | */ | 257 | */ |
258 | extern pte_t *lookup_address(unsigned long address, int *level); | 258 | extern pte_t *lookup_address(unsigned long address, unsigned int *level); |
259 | 259 | ||
260 | /* local pte updates need not use xchg for locking */ | 260 | /* local pte updates need not use xchg for locking */ |
261 | static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) | 261 | static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 80dd438642f6..a842c7222b1e 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -52,10 +52,6 @@ void paging_init(void); | |||
52 | #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) | 52 | #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) |
53 | #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) | 53 | #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) |
54 | 54 | ||
55 | #define TWOLEVEL_PGDIR_SHIFT 22 | ||
56 | #define BOOT_USER_PGD_PTRS (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT) | ||
57 | #define BOOT_KERNEL_PGD_PTRS (1024-BOOT_USER_PGD_PTRS) | ||
58 | |||
59 | /* Just any arbitrary offset to the start of the vmalloc VM area: the | 55 | /* Just any arbitrary offset to the start of the vmalloc VM area: the |
60 | * current 8MB value just means that there will be a 8MB "hole" after the | 56 | * current 8MB value just means that there will be a 8MB "hole" after the |
61 | * physical memory until the kernel virtual memory starts. That means that | 57 | * physical memory until the kernel virtual memory starts. That means that |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 0ab3a3232330..974f5b7bb205 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -5,15 +5,6 @@ | |||
5 | /* These definitions are for GCC v4.x. */ | 5 | /* These definitions are for GCC v4.x. */ |
6 | #include <linux/compiler-gcc.h> | 6 | #include <linux/compiler-gcc.h> |
7 | 7 | ||
8 | #ifdef CONFIG_FORCED_INLINING | ||
9 | # undef inline | ||
10 | # undef __inline__ | ||
11 | # undef __inline | ||
12 | # define inline inline __attribute__((always_inline)) | ||
13 | # define __inline__ __inline__ __attribute__((always_inline)) | ||
14 | # define __inline __inline __attribute__((always_inline)) | ||
15 | #endif | ||
16 | |||
17 | #define __used __attribute__((__used__)) | 8 | #define __used __attribute__((__used__)) |
18 | #define __must_check __attribute__((warn_unused_result)) | 9 | #define __must_check __attribute__((warn_unused_result)) |
19 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 10 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index c4f635a4dd25..250032548597 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h | |||
@@ -490,6 +490,13 @@ do { \ | |||
490 | #define EXT4_ORPHAN_FS 0x0004 /* Orphans being recovered */ | 490 | #define EXT4_ORPHAN_FS 0x0004 /* Orphans being recovered */ |
491 | 491 | ||
492 | /* | 492 | /* |
493 | * Misc. filesystem flags | ||
494 | */ | ||
495 | #define EXT2_FLAGS_SIGNED_HASH 0x0001 /* Signed dirhash in use */ | ||
496 | #define EXT2_FLAGS_UNSIGNED_HASH 0x0002 /* Unsigned dirhash in use */ | ||
497 | #define EXT2_FLAGS_TEST_FILESYS 0x0004 /* to test development code */ | ||
498 | |||
499 | /* | ||
493 | * Mount flags | 500 | * Mount flags |
494 | */ | 501 | */ |
495 | #define EXT4_MOUNT_CHECK 0x00001 /* Do mount-time checks */ | 502 | #define EXT4_MOUNT_CHECK 0x00001 /* Do mount-time checks */ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 600fc3bcf63e..1ad56a7b2f74 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -316,7 +316,7 @@ static inline u64 hrtimer_forward_now(struct hrtimer *timer, | |||
316 | 316 | ||
317 | /* Precise sleep: */ | 317 | /* Precise sleep: */ |
318 | extern long hrtimer_nanosleep(struct timespec *rqtp, | 318 | extern long hrtimer_nanosleep(struct timespec *rqtp, |
319 | struct timespec *rmtp, | 319 | struct timespec __user *rmtp, |
320 | const enum hrtimer_mode mode, | 320 | const enum hrtimer_mode mode, |
321 | const clockid_t clockid); | 321 | const clockid_t clockid); |
322 | extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); | 322 | extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 9815951ec995..925d57b236aa 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -51,10 +51,8 @@ extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | |||
51 | gfp_t gfp_mask); | 51 | gfp_t gfp_mask); |
52 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); | 52 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); |
53 | 53 | ||
54 | static inline struct mem_cgroup *mm_cgroup(const struct mm_struct *mm) | 54 | #define vm_match_cgroup(mm, cgroup) \ |
55 | { | 55 | ((cgroup) == rcu_dereference((mm)->mem_cgroup)) |
56 | return rcu_dereference(mm->mem_cgroup); | ||
57 | } | ||
58 | 56 | ||
59 | extern int mem_cgroup_prepare_migration(struct page *page); | 57 | extern int mem_cgroup_prepare_migration(struct page *page); |
60 | extern void mem_cgroup_end_migration(struct page *page); | 58 | extern void mem_cgroup_end_migration(struct page *page); |
@@ -123,9 +121,9 @@ static inline int mem_cgroup_cache_charge(struct page *page, | |||
123 | return 0; | 121 | return 0; |
124 | } | 122 | } |
125 | 123 | ||
126 | static inline struct mem_cgroup *mm_cgroup(const struct mm_struct *mm) | 124 | static inline int vm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) |
127 | { | 125 | { |
128 | return NULL; | 126 | return 1; |
129 | } | 127 | } |
130 | 128 | ||
131 | static inline int task_in_mem_cgroup(struct task_struct *task, | 129 | static inline int task_in_mem_cgroup(struct task_struct *task, |
diff --git a/include/linux/memstick.h b/include/linux/memstick.h new file mode 100644 index 000000000000..334d059d6794 --- /dev/null +++ b/include/linux/memstick.h | |||
@@ -0,0 +1,299 @@ | |||
1 | /* | ||
2 | * Sony MemoryStick support | ||
3 | * | ||
4 | * Copyright (C) 2007 Alex Dubov <oakad@yahoo.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef _MEMSTICK_H | ||
13 | #define _MEMSTICK_H | ||
14 | |||
15 | #include <linux/workqueue.h> | ||
16 | #include <linux/scatterlist.h> | ||
17 | #include <linux/device.h> | ||
18 | |||
19 | /*** Hardware based structures ***/ | ||
20 | |||
21 | struct ms_status_register { | ||
22 | unsigned char reserved; | ||
23 | unsigned char interrupt; | ||
24 | #define MEMSTICK_INT_CMDNAK 0x0001 | ||
25 | #define MEMSTICK_INT_BREQ 0x0020 | ||
26 | #define MEMSTICK_INT_ERR 0x0040 | ||
27 | #define MEMSTICK_INT_CED 0x0080 | ||
28 | |||
29 | unsigned char status0; | ||
30 | #define MEMSTICK_STATUS0_WP 0x0001 | ||
31 | #define MEMSTICK_STATUS0_SL 0x0002 | ||
32 | #define MEMSTICK_STATUS0_BF 0x0010 | ||
33 | #define MEMSTICK_STATUS0_BE 0x0020 | ||
34 | #define MEMSTICK_STATUS0_FB0 0x0040 | ||
35 | #define MEMSTICK_STATUS0_MB 0x0080 | ||
36 | |||
37 | unsigned char status1; | ||
38 | #define MEMSTICK_STATUS1_UCFG 0x0001 | ||
39 | #define MEMSTICK_STATUS1_FGER 0x0002 | ||
40 | #define MEMSTICK_STATUS1_UCEX 0x0004 | ||
41 | #define MEMSTICK_STATUS1_EXER 0x0008 | ||
42 | #define MEMSTICK_STATUS1_UCDT 0x0010 | ||
43 | #define MEMSTICK_STATUS1_DTER 0x0020 | ||
44 | #define MEMSTICK_STATUS1_FBI 0x0040 | ||
45 | #define MEMSTICK_STATUS1_MB 0x0080 | ||
46 | } __attribute__((packed)); | ||
47 | |||
48 | struct ms_id_register { | ||
49 | unsigned char type; | ||
50 | unsigned char reserved; | ||
51 | unsigned char category; | ||
52 | unsigned char class; | ||
53 | } __attribute__((packed)); | ||
54 | |||
55 | struct ms_param_register { | ||
56 | unsigned char system; | ||
57 | unsigned char block_address_msb; | ||
58 | unsigned short block_address; | ||
59 | unsigned char cp; | ||
60 | #define MEMSTICK_CP_BLOCK 0x0000 | ||
61 | #define MEMSTICK_CP_PAGE 0x0020 | ||
62 | #define MEMSTICK_CP_EXTRA 0x0040 | ||
63 | #define MEMSTICK_CP_OVERWRITE 0x0080 | ||
64 | |||
65 | unsigned char page_address; | ||
66 | } __attribute__((packed)); | ||
67 | |||
68 | struct ms_extra_data_register { | ||
69 | unsigned char overwrite_flag; | ||
70 | #define MEMSTICK_OVERWRITE_UPDATA 0x0010 | ||
71 | #define MEMSTICK_OVERWRITE_PAGE 0x0060 | ||
72 | #define MEMSTICK_OVERWRITE_BLOCK 0x0080 | ||
73 | |||
74 | unsigned char management_flag; | ||
75 | #define MEMSTICK_MANAGEMENT_SYSTEM 0x0004 | ||
76 | #define MEMSTICK_MANAGEMENT_TRANS_TABLE 0x0008 | ||
77 | #define MEMSTICK_MANAGEMENT_COPY 0x0010 | ||
78 | #define MEMSTICK_MANAGEMENT_ACCESS 0x0020 | ||
79 | |||
80 | unsigned short logical_address; | ||
81 | } __attribute__((packed)); | ||
82 | |||
83 | struct ms_register { | ||
84 | struct ms_status_register status; | ||
85 | struct ms_id_register id; | ||
86 | unsigned char reserved[8]; | ||
87 | struct ms_param_register param; | ||
88 | struct ms_extra_data_register extra_data; | ||
89 | } __attribute__((packed)); | ||
90 | |||
91 | struct mspro_param_register { | ||
92 | unsigned char system; | ||
93 | unsigned short data_count; | ||
94 | unsigned int data_address; | ||
95 | unsigned char cmd_param; | ||
96 | } __attribute__((packed)); | ||
97 | |||
98 | struct mspro_register { | ||
99 | struct ms_status_register status; | ||
100 | struct ms_id_register id; | ||
101 | unsigned char reserved[8]; | ||
102 | struct mspro_param_register param; | ||
103 | } __attribute__((packed)); | ||
104 | |||
105 | struct ms_register_addr { | ||
106 | unsigned char r_offset; | ||
107 | unsigned char r_length; | ||
108 | unsigned char w_offset; | ||
109 | unsigned char w_length; | ||
110 | } __attribute__((packed)); | ||
111 | |||
112 | enum { | ||
113 | MS_TPC_READ_LONG_DATA = 0x02, | ||
114 | MS_TPC_READ_SHORT_DATA = 0x03, | ||
115 | MS_TPC_READ_REG = 0x04, | ||
116 | MS_TPC_READ_IO_DATA = 0x05, /* unverified */ | ||
117 | MS_TPC_GET_INT = 0x07, | ||
118 | MS_TPC_SET_RW_REG_ADRS = 0x08, | ||
119 | MS_TPC_EX_SET_CMD = 0x09, | ||
120 | MS_TPC_WRITE_IO_DATA = 0x0a, /* unverified */ | ||
121 | MS_TPC_WRITE_REG = 0x0b, | ||
122 | MS_TPC_WRITE_SHORT_DATA = 0x0c, | ||
123 | MS_TPC_WRITE_LONG_DATA = 0x0d, | ||
124 | MS_TPC_SET_CMD = 0x0e | ||
125 | }; | ||
126 | |||
127 | enum { | ||
128 | MS_CMD_BLOCK_END = 0x33, | ||
129 | MS_CMD_RESET = 0x3c, | ||
130 | MS_CMD_BLOCK_WRITE = 0x55, | ||
131 | MS_CMD_SLEEP = 0x5a, | ||
132 | MS_CMD_BLOCK_ERASE = 0x99, | ||
133 | MS_CMD_BLOCK_READ = 0xaa, | ||
134 | MS_CMD_CLEAR_BUF = 0xc3, | ||
135 | MS_CMD_FLASH_STOP = 0xcc, | ||
136 | MSPRO_CMD_FORMAT = 0x10, | ||
137 | MSPRO_CMD_SLEEP = 0x11, | ||
138 | MSPRO_CMD_READ_DATA = 0x20, | ||
139 | MSPRO_CMD_WRITE_DATA = 0x21, | ||
140 | MSPRO_CMD_READ_ATRB = 0x24, | ||
141 | MSPRO_CMD_STOP = 0x25, | ||
142 | MSPRO_CMD_ERASE = 0x26, | ||
143 | MSPRO_CMD_SET_IBA = 0x46, | ||
144 | MSPRO_CMD_SET_IBD = 0x47 | ||
145 | /* | ||
146 | MSPRO_CMD_RESET | ||
147 | MSPRO_CMD_WAKEUP | ||
148 | MSPRO_CMD_IN_IO_DATA | ||
149 | MSPRO_CMD_OUT_IO_DATA | ||
150 | MSPRO_CMD_READ_IO_ATRB | ||
151 | MSPRO_CMD_IN_IO_FIFO | ||
152 | MSPRO_CMD_OUT_IO_FIFO | ||
153 | MSPRO_CMD_IN_IOM | ||
154 | MSPRO_CMD_OUT_IOM | ||
155 | */ | ||
156 | }; | ||
157 | |||
158 | /*** Driver structures and functions ***/ | ||
159 | |||
160 | #define MEMSTICK_PART_SHIFT 3 | ||
161 | |||
162 | enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; | ||
163 | |||
164 | #define MEMSTICK_POWER_OFF 0 | ||
165 | #define MEMSTICK_POWER_ON 1 | ||
166 | |||
167 | #define MEMSTICK_SERIAL 0 | ||
168 | #define MEMSTICK_PARALLEL 1 | ||
169 | |||
170 | struct memstick_host; | ||
171 | struct memstick_driver; | ||
172 | |||
173 | #define MEMSTICK_MATCH_ALL 0x01 | ||
174 | |||
175 | #define MEMSTICK_TYPE_LEGACY 0xff | ||
176 | #define MEMSTICK_TYPE_DUO 0x00 | ||
177 | #define MEMSTICK_TYPE_PRO 0x01 | ||
178 | |||
179 | #define MEMSTICK_CATEGORY_STORAGE 0xff | ||
180 | #define MEMSTICK_CATEGORY_STORAGE_DUO 0x00 | ||
181 | |||
182 | #define MEMSTICK_CLASS_GENERIC 0xff | ||
183 | #define MEMSTICK_CLASS_GENERIC_DUO 0x00 | ||
184 | |||
185 | |||
186 | struct memstick_device_id { | ||
187 | unsigned char match_flags; | ||
188 | unsigned char type; | ||
189 | unsigned char category; | ||
190 | unsigned char class; | ||
191 | }; | ||
192 | |||
193 | struct memstick_request { | ||
194 | unsigned char tpc; | ||
195 | unsigned char data_dir:1, | ||
196 | need_card_int:1, | ||
197 | get_int_reg:1, | ||
198 | io_type:2; | ||
199 | #define MEMSTICK_IO_NONE 0 | ||
200 | #define MEMSTICK_IO_VAL 1 | ||
201 | #define MEMSTICK_IO_SG 2 | ||
202 | |||
203 | unsigned char int_reg; | ||
204 | int error; | ||
205 | union { | ||
206 | struct scatterlist sg; | ||
207 | struct { | ||
208 | unsigned char data_len; | ||
209 | unsigned char data[15]; | ||
210 | }; | ||
211 | }; | ||
212 | }; | ||
213 | |||
214 | struct memstick_dev { | ||
215 | struct memstick_device_id id; | ||
216 | struct memstick_host *host; | ||
217 | struct ms_register_addr reg_addr; | ||
218 | struct completion mrq_complete; | ||
219 | struct memstick_request current_mrq; | ||
220 | |||
221 | /* Check that media driver is still willing to operate the device. */ | ||
222 | int (*check)(struct memstick_dev *card); | ||
223 | /* Get next request from the media driver. */ | ||
224 | int (*next_request)(struct memstick_dev *card, | ||
225 | struct memstick_request **mrq); | ||
226 | |||
227 | struct device dev; | ||
228 | }; | ||
229 | |||
230 | struct memstick_host { | ||
231 | struct mutex lock; | ||
232 | unsigned int id; | ||
233 | unsigned int caps; | ||
234 | #define MEMSTICK_CAP_PARALLEL 1 | ||
235 | #define MEMSTICK_CAP_AUTO_GET_INT 2 | ||
236 | |||
237 | struct work_struct media_checker; | ||
238 | struct class_device cdev; | ||
239 | |||
240 | struct memstick_dev *card; | ||
241 | unsigned int retries; | ||
242 | |||
243 | /* Notify the host that some requests are pending. */ | ||
244 | void (*request)(struct memstick_host *host); | ||
245 | /* Set host IO parameters (power, clock, etc). */ | ||
246 | void (*set_param)(struct memstick_host *host, | ||
247 | enum memstick_param param, | ||
248 | int value); | ||
249 | unsigned long private[0] ____cacheline_aligned; | ||
250 | }; | ||
251 | |||
252 | struct memstick_driver { | ||
253 | struct memstick_device_id *id_table; | ||
254 | int (*probe)(struct memstick_dev *card); | ||
255 | void (*remove)(struct memstick_dev *card); | ||
256 | int (*suspend)(struct memstick_dev *card, | ||
257 | pm_message_t state); | ||
258 | int (*resume)(struct memstick_dev *card); | ||
259 | |||
260 | struct device_driver driver; | ||
261 | }; | ||
262 | |||
263 | int memstick_register_driver(struct memstick_driver *drv); | ||
264 | void memstick_unregister_driver(struct memstick_driver *drv); | ||
265 | |||
266 | struct memstick_host *memstick_alloc_host(unsigned int extra, | ||
267 | struct device *dev); | ||
268 | |||
269 | int memstick_add_host(struct memstick_host *host); | ||
270 | void memstick_remove_host(struct memstick_host *host); | ||
271 | void memstick_free_host(struct memstick_host *host); | ||
272 | void memstick_detect_change(struct memstick_host *host); | ||
273 | |||
274 | void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, | ||
275 | struct scatterlist *sg); | ||
276 | void memstick_init_req(struct memstick_request *mrq, unsigned char tpc, | ||
277 | void *buf, size_t length); | ||
278 | int memstick_next_req(struct memstick_host *host, | ||
279 | struct memstick_request **mrq); | ||
280 | void memstick_new_req(struct memstick_host *host); | ||
281 | |||
282 | int memstick_set_rw_addr(struct memstick_dev *card); | ||
283 | |||
284 | static inline void *memstick_priv(struct memstick_host *host) | ||
285 | { | ||
286 | return (void *)host->private; | ||
287 | } | ||
288 | |||
289 | static inline void *memstick_get_drvdata(struct memstick_dev *card) | ||
290 | { | ||
291 | return dev_get_drvdata(&card->dev); | ||
292 | } | ||
293 | |||
294 | static inline void memstick_set_drvdata(struct memstick_dev *card, void *data) | ||
295 | { | ||
296 | dev_set_drvdata(&card->dev, data); | ||
297 | } | ||
298 | |||
299 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7215d3b1f4af..87195b62de52 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -301,14 +301,14 @@ struct pci_ops { | |||
301 | int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); | 301 | int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); |
302 | }; | 302 | }; |
303 | 303 | ||
304 | struct pci_raw_ops { | 304 | /* |
305 | int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, | 305 | * ACPI needs to be able to access PCI config space before we've done a |
306 | int reg, int len, u32 *val); | 306 | * PCI bus scan and created pci_bus structures. |
307 | int (*write)(unsigned int domain, unsigned int bus, unsigned int devfn, | 307 | */ |
308 | int reg, int len, u32 val); | 308 | extern int raw_pci_read(unsigned int domain, unsigned int bus, |
309 | }; | 309 | unsigned int devfn, int reg, int len, u32 *val); |
310 | 310 | extern int raw_pci_write(unsigned int domain, unsigned int bus, | |
311 | extern struct pci_raw_ops *raw_pci_ops; | 311 | unsigned int devfn, int reg, int len, u32 val); |
312 | 312 | ||
313 | struct pci_bus_region { | 313 | struct pci_bus_region { |
314 | resource_size_t start; | 314 | resource_size_t start; |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 5eb38cc0e5a4..8ba1c320f975 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
@@ -10,13 +10,13 @@ | |||
10 | * | 10 | * |
11 | * Various protocol defined structures. | 11 | * Various protocol defined structures. |
12 | * | 12 | * |
13 | * The SCTP reference implementation is free software; | 13 | * This SCTP implementation is free software; |
14 | * you can redistribute it and/or modify it under the terms of | 14 | * you can redistribute it and/or modify it under the terms of |
15 | * the GNU General Public License as published by | 15 | * the GNU General Public License as published by |
16 | * the Free Software Foundation; either version 2, or (at your option) | 16 | * the Free Software Foundation; either version 2, or (at your option) |
17 | * any later version. | 17 | * any later version. |
18 | * | 18 | * |
19 | * The SCTP reference implementation is distributed in the hope that it | 19 | * This SCTP implementation is distributed in the hope that it |
20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
21 | * ************************ | 21 | * ************************ |
22 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 22 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 7bf2d149d209..6ec39ab27b4b 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -42,11 +42,13 @@ static inline pgoff_t swp_offset(swp_entry_t entry) | |||
42 | return entry.val & SWP_OFFSET_MASK(entry); | 42 | return entry.val & SWP_OFFSET_MASK(entry); |
43 | } | 43 | } |
44 | 44 | ||
45 | #ifdef CONFIG_MMU | ||
45 | /* check whether a pte points to a swap entry */ | 46 | /* check whether a pte points to a swap entry */ |
46 | static inline int is_swap_pte(pte_t pte) | 47 | static inline int is_swap_pte(pte_t pte) |
47 | { | 48 | { |
48 | return !pte_none(pte) && !pte_present(pte) && !pte_file(pte); | 49 | return !pte_none(pte) && !pte_present(pte) && !pte_file(pte); |
49 | } | 50 | } |
51 | #endif | ||
50 | 52 | ||
51 | /* | 53 | /* |
52 | * Convert the arch-dependent pte representation of a swp_entry_t into an | 54 | * Convert the arch-dependent pte representation of a swp_entry_t into an |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index bba7712cadc7..818ca1cf0b6d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -79,7 +79,9 @@ struct thermal_zone_device { | |||
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 81 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, |
82 | struct thermal_zone_device_ops *); | 82 | struct |
83 | thermal_zone_device_ops | ||
84 | *); | ||
83 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 85 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
84 | 86 | ||
85 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 87 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |
@@ -87,8 +89,23 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | |||
87 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | 89 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, |
88 | struct thermal_cooling_device *); | 90 | struct thermal_cooling_device *); |
89 | 91 | ||
92 | #ifdef CONFIG_THERMAL | ||
90 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | 93 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, |
91 | struct thermal_cooling_device_ops *); | 94 | struct |
95 | thermal_cooling_device_ops | ||
96 | *); | ||
92 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | 97 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); |
98 | #else | ||
99 | static inline struct thermal_cooling_device | ||
100 | *thermal_cooling_device_register(char *c, void *v, | ||
101 | struct thermal_cooling_device_ops *t) | ||
102 | { | ||
103 | return NULL; | ||
104 | } | ||
105 | static inline | ||
106 | void thermal_cooling_device_unregister(struct thermal_cooling_device *t) | ||
107 | { | ||
108 | }; | ||
109 | #endif | ||
93 | 110 | ||
94 | #endif /* __THERMAL_H__ */ | 111 | #endif /* __THERMAL_H__ */ |
diff --git a/include/linux/tifm.h b/include/linux/tifm.h index 2096b76d0cee..da76ed85f595 100644 --- a/include/linux/tifm.h +++ b/include/linux/tifm.h | |||
@@ -72,6 +72,7 @@ enum { | |||
72 | #define TIFM_FIFO_READY 0x00000001 | 72 | #define TIFM_FIFO_READY 0x00000001 |
73 | #define TIFM_FIFO_INT_SETALL 0x0000ffff | 73 | #define TIFM_FIFO_INT_SETALL 0x0000ffff |
74 | #define TIFM_FIFO_INTMASK 0x00000005 | 74 | #define TIFM_FIFO_INTMASK 0x00000005 |
75 | #define TIFM_FIFO_SIZE 0x00000200 | ||
75 | 76 | ||
76 | #define TIFM_DMA_RESET 0x00000002 | 77 | #define TIFM_DMA_RESET 0x00000002 |
77 | #define TIFM_DMA_TX 0x00008000 | 78 | #define TIFM_DMA_TX 0x00008000 |
@@ -124,6 +125,8 @@ struct tifm_adapter { | |||
124 | 125 | ||
125 | void (*eject)(struct tifm_adapter *fm, | 126 | void (*eject)(struct tifm_adapter *fm, |
126 | struct tifm_dev *sock); | 127 | struct tifm_dev *sock); |
128 | int (*has_ms_pif)(struct tifm_adapter *fm, | ||
129 | struct tifm_dev *sock); | ||
127 | 130 | ||
128 | struct tifm_dev *sockets[0]; | 131 | struct tifm_dev *sockets[0]; |
129 | }; | 132 | }; |
@@ -141,6 +144,7 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id, | |||
141 | int tifm_register_driver(struct tifm_driver *drv); | 144 | int tifm_register_driver(struct tifm_driver *drv); |
142 | void tifm_unregister_driver(struct tifm_driver *drv); | 145 | void tifm_unregister_driver(struct tifm_driver *drv); |
143 | void tifm_eject(struct tifm_dev *sock); | 146 | void tifm_eject(struct tifm_dev *sock); |
147 | int tifm_has_ms_pif(struct tifm_dev *sock); | ||
144 | int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, | 148 | int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, |
145 | int direction); | 149 | int direction); |
146 | void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, | 150 | void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 8ea3e71ba7fa..c3f374786a43 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -232,7 +232,14 @@ static inline int ntp_synced(void) | |||
232 | #else | 232 | #else |
233 | #define NTP_INTERVAL_FREQ (HZ) | 233 | #define NTP_INTERVAL_FREQ (HZ) |
234 | #endif | 234 | #endif |
235 | #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) | 235 | |
236 | #define CLOCK_TICK_OVERFLOW (LATCH * HZ - CLOCK_TICK_RATE) | ||
237 | #define CLOCK_TICK_ADJUST (((s64)CLOCK_TICK_OVERFLOW * NSEC_PER_SEC) / \ | ||
238 | (s64)CLOCK_TICK_RATE) | ||
239 | |||
240 | /* Because using NSEC_PER_SEC would be too easy */ | ||
241 | #define NTP_INTERVAL_LENGTH ((((s64)TICK_USEC * NSEC_PER_USEC * USER_HZ) + \ | ||
242 | CLOCK_TICK_ADJUST) / NTP_INTERVAL_FREQ) | ||
236 | 243 | ||
237 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | 244 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ |
238 | extern u64 current_tick_length(void); | 245 | extern u64 current_tick_length(void); |
diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h index 5db261a1e85e..49bc9577c61e 100644 --- a/include/net/sctp/auth.h +++ b/include/net/sctp/auth.h | |||
@@ -1,15 +1,15 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright 2007 Hewlett-Packard Development Company, L.P. | 2 | * (C) Copyright 2007 Hewlett-Packard Development Company, L.P. |
3 | * | 3 | * |
4 | * This file is part of the SCTP kernel reference Implementation | 4 | * This file is part of the SCTP kernel implementation |
5 | * | 5 | * |
6 | * The SCTP reference implementation is free software; | 6 | * This SCTP implementation is free software; |
7 | * you can redistribute it and/or modify it under the terms of | 7 | * you can redistribute it and/or modify it under the terms of |
8 | * the GNU General Public License as published by | 8 | * the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2, or (at your option) | 9 | * the Free Software Foundation; either version 2, or (at your option) |
10 | * any later version. | 10 | * any later version. |
11 | * | 11 | * |
12 | * The SCTP reference implementation is distributed in the hope that it | 12 | * This SCTP implementation is distributed in the hope that it |
13 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 13 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
14 | * ************************ | 14 | * ************************ |
15 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 15 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index c1f797673571..10ae2da6f93b 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel Implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (C) 1999-2001 Cisco, Motorola | 3 | * Copyright (C) 1999-2001 Cisco, Motorola |
4 | * | 4 | * |
5 | * This file is part of the SCTP kernel reference Implementation | 5 | * This file is part of the SCTP kernel implementation |
6 | * | 6 | * |
7 | * These are the definitions needed for the command object. | 7 | * These are the definitions needed for the command object. |
8 | * | 8 | * |
9 | * The SCTP reference implementation is free software; | 9 | * This SCTP implementation is free software; |
10 | * you can redistribute it and/or modify it under the terms of | 10 | * you can redistribute it and/or modify it under the terms of |
11 | * the GNU General Public License as published by | 11 | * the GNU General Public License as published by |
12 | * the Free Software Foundation; either version 2, or (at your option) | 12 | * the Free Software Foundation; either version 2, or (at your option) |
13 | * any later version. | 13 | * any later version. |
14 | * | 14 | * |
15 | * the SCTP reference implementation is distributed in the hope that it | 15 | * This SCTP implementation is distributed in the hope that it |
16 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
17 | * ************************ | 17 | * ************************ |
18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index fefcba67bd1e..c32ddf0279c8 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
5 | * Copyright (c) 2001 Intel Corp. | 5 | * Copyright (c) 2001 Intel Corp. |
6 | * | 6 | * |
7 | * This file is part of the SCTP kernel reference Implementation | 7 | * This file is part of the SCTP kernel implementation |
8 | * | 8 | * |
9 | * The SCTP reference implementation is free software; | 9 | * This SCTP implementation is free software; |
10 | * you can redistribute it and/or modify it under the terms of | 10 | * you can redistribute it and/or modify it under the terms of |
11 | * the GNU General Public License as published by | 11 | * the GNU General Public License as published by |
12 | * the Free Software Foundation; either version 2, or (at your option) | 12 | * the Free Software Foundation; either version 2, or (at your option) |
13 | * any later version. | 13 | * any later version. |
14 | * | 14 | * |
15 | * The SCTP reference implementation is distributed in the hope that it | 15 | * This SCTP implementation is distributed in the hope that it |
16 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
17 | * ************************ | 17 | * ************************ |
18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 4977b0a81535..57df27f19588 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -1,20 +1,20 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
5 | * Copyright (c) 2001-2003 Intel Corp. | 5 | * Copyright (c) 2001-2003 Intel Corp. |
6 | * | 6 | * |
7 | * This file is part of the SCTP kernel reference Implementation | 7 | * This file is part of the SCTP kernel implementation |
8 | * | 8 | * |
9 | * The base lksctp header. | 9 | * The base lksctp header. |
10 | * | 10 | * |
11 | * The SCTP reference implementation is free software; | 11 | * This SCTP implementation is free software; |
12 | * you can redistribute it and/or modify it under the terms of | 12 | * you can redistribute it and/or modify it under the terms of |
13 | * the GNU General Public License as published by | 13 | * the GNU General Public License as published by |
14 | * the Free Software Foundation; either version 2, or (at your option) | 14 | * the Free Software Foundation; either version 2, or (at your option) |
15 | * any later version. | 15 | * any later version. |
16 | * | 16 | * |
17 | * The SCTP reference implementation is distributed in the hope that it | 17 | * This SCTP implementation is distributed in the hope that it |
18 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 18 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
19 | * ************************ | 19 | * ************************ |
20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index bf2f5ed69c15..ef9e7ed2c82e 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -1,20 +1,20 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
5 | * Copyright (c) 2001 Intel Corp. | 5 | * Copyright (c) 2001 Intel Corp. |
6 | * | 6 | * |
7 | * This file is part of the SCTP kernel reference Implementation | 7 | * This file is part of the SCTP kernel implementation |
8 | * | 8 | * |
9 | * These are definitions needed by the state machine. | 9 | * These are definitions needed by the state machine. |
10 | * | 10 | * |
11 | * The SCTP reference implementation is free software; | 11 | * This SCTP implementation is free software; |
12 | * you can redistribute it and/or modify it under the terms of | 12 | * you can redistribute it and/or modify it under the terms of |
13 | * the GNU General Public License as published by | 13 | * the GNU General Public License as published by |
14 | * the Free Software Foundation; either version 2, or (at your option) | 14 | * the Free Software Foundation; either version 2, or (at your option) |
15 | * any later version. | 15 | * any later version. |
16 | * | 16 | * |
17 | * The SCTP reference implementation is distributed in the hope that it | 17 | * This SCTP implementation is distributed in the hope that it |
18 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 18 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
19 | * ************************ | 19 | * ************************ |
20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 4d591bfce452..9c827a749b6f 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
5 | * Copyright (c) 2001 Intel Corp. | 5 | * Copyright (c) 2001 Intel Corp. |
6 | * | 6 | * |
7 | * This file is part of the SCTP kernel reference Implementation | 7 | * This file is part of the SCTP kernel implementation |
8 | * | 8 | * |
9 | * The SCTP reference implementation is free software; | 9 | * This SCTP implementation is free software; |
10 | * you can redistribute it and/or modify it under the terms of | 10 | * you can redistribute it and/or modify it under the terms of |
11 | * the GNU General Public License as published by | 11 | * the GNU General Public License as published by |
12 | * the Free Software Foundation; either version 2, or (at your option) | 12 | * the Free Software Foundation; either version 2, or (at your option) |
13 | * any later version. | 13 | * any later version. |
14 | * | 14 | * |
15 | * The SCTP reference implementation is distributed in the hope that it | 15 | * This SCTP implementation is distributed in the hope that it |
16 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
17 | * ************************ | 17 | * ************************ |
18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h index 70a824df6f60..099211bf998d 100644 --- a/include/net/sctp/tsnmap.h +++ b/include/net/sctp/tsnmap.h | |||
@@ -1,21 +1,21 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
5 | * Copyright (c) 2001 Intel Corp. | 5 | * Copyright (c) 2001 Intel Corp. |
6 | * | 6 | * |
7 | * This file is part of the SCTP kernel reference Implementation | 7 | * This file is part of the SCTP kernel implementation |
8 | * | 8 | * |
9 | * These are the definitions needed for the tsnmap type. The tsnmap is used | 9 | * These are the definitions needed for the tsnmap type. The tsnmap is used |
10 | * to track out of order TSNs received. | 10 | * to track out of order TSNs received. |
11 | * | 11 | * |
12 | * The SCTP reference implementation is free software; | 12 | * This SCTP implementation is free software; |
13 | * you can redistribute it and/or modify it under the terms of | 13 | * you can redistribute it and/or modify it under the terms of |
14 | * the GNU General Public License as published by | 14 | * the GNU General Public License as published by |
15 | * the Free Software Foundation; either version 2, or (at your option) | 15 | * the Free Software Foundation; either version 2, or (at your option) |
16 | * any later version. | 16 | * any later version. |
17 | * | 17 | * |
18 | * The SCTP reference implementation is distributed in the hope that it | 18 | * This SCTP implementation is distributed in the hope that it |
19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | * ************************ | 20 | * ************************ |
21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index 922a151eb93c..9bcfc12275e8 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
@@ -10,15 +10,15 @@ | |||
10 | * sctp_ulpevent type is used to carry information from the state machine | 10 | * sctp_ulpevent type is used to carry information from the state machine |
11 | * upwards to the ULP. | 11 | * upwards to the ULP. |
12 | * | 12 | * |
13 | * This file is part of the SCTP kernel reference Implementation | 13 | * This file is part of the SCTP kernel implementation |
14 | * | 14 | * |
15 | * The SCTP reference implementation is free software; | 15 | * This SCTP implementation is free software; |
16 | * you can redistribute it and/or modify it under the terms of | 16 | * you can redistribute it and/or modify it under the terms of |
17 | * the GNU General Public License as published by | 17 | * the GNU General Public License as published by |
18 | * the Free Software Foundation; either version 2, or (at your option) | 18 | * the Free Software Foundation; either version 2, or (at your option) |
19 | * any later version. | 19 | * any later version. |
20 | * | 20 | * |
21 | * The SCTP reference implementation is distributed in the hope that it | 21 | * This SCTP implementation is distributed in the hope that it |
22 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 22 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
23 | * ************************ | 23 | * ************************ |
24 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 24 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h index cd33270e86dd..2e5ee0d8458d 100644 --- a/include/net/sctp/ulpqueue.h +++ b/include/net/sctp/ulpqueue.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
@@ -11,13 +11,13 @@ | |||
11 | * and the core SCTP state machine. This is the component which handles | 11 | * and the core SCTP state machine. This is the component which handles |
12 | * reassembly and ordering. | 12 | * reassembly and ordering. |
13 | * | 13 | * |
14 | * The SCTP reference implementation is free software; | 14 | * This SCTP implementation is free software; |
15 | * you can redistribute it and/or modify it under the terms of | 15 | * you can redistribute it and/or modify it under the terms of |
16 | * the GNU General Public License as published by | 16 | * the GNU General Public License as published by |
17 | * the Free Software Foundation; either version 2, or (at your option) | 17 | * the Free Software Foundation; either version 2, or (at your option) |
18 | * any later version. | 18 | * any later version. |
19 | * | 19 | * |
20 | * the SCTP reference implementation is distributed in the hope that it | 20 | * This SCTP implementation is distributed in the hope that it |
21 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 21 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
22 | * ************************ | 22 | * ************************ |
23 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 23 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 954090b1e354..9462d6ae2f37 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -1,21 +1,21 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
5 | * Copyright (c) 2002 Intel Corp. | 5 | * Copyright (c) 2002 Intel Corp. |
6 | * | 6 | * |
7 | * This file is part of the SCTP kernel reference Implementation | 7 | * This file is part of the SCTP kernel implementation |
8 | * | 8 | * |
9 | * This header represents the structures and constants needed to support | 9 | * This header represents the structures and constants needed to support |
10 | * the SCTP Extension to the Sockets API. | 10 | * the SCTP Extension to the Sockets API. |
11 | * | 11 | * |
12 | * The SCTP reference implementation is free software; | 12 | * This SCTP implementation is free software; |
13 | * you can redistribute it and/or modify it under the terms of | 13 | * you can redistribute it and/or modify it under the terms of |
14 | * the GNU General Public License as published by | 14 | * the GNU General Public License as published by |
15 | * the Free Software Foundation; either version 2, or (at your option) | 15 | * the Free Software Foundation; either version 2, or (at your option) |
16 | * any later version. | 16 | * any later version. |
17 | * | 17 | * |
18 | * The SCTP reference implementation is distributed in the hope that it | 18 | * This SCTP implementation is distributed in the hope that it |
19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | * ************************ | 20 | * ************************ |
21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |