diff options
Diffstat (limited to 'arch')
162 files changed, 4480 insertions, 3290 deletions
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 32c4b0e35b37..3de7f84b53c2 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
@@ -73,7 +73,12 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
73 | (!vma || addr + len <= vma->vm_start)) | 73 | (!vma || addr + len <= vma->vm_start)) |
74 | return addr; | 74 | return addr; |
75 | } | 75 | } |
76 | start_addr = addr = mm->free_area_cache; | 76 | if (len > mm->cached_hole_size) { |
77 | start_addr = addr = mm->free_area_cache; | ||
78 | } else { | ||
79 | start_addr = addr = TASK_UNMAPPED_BASE; | ||
80 | mm->cached_hole_size = 0; | ||
81 | } | ||
77 | 82 | ||
78 | full_search: | 83 | full_search: |
79 | if (do_align) | 84 | if (do_align) |
@@ -90,6 +95,7 @@ full_search: | |||
90 | */ | 95 | */ |
91 | if (start_addr != TASK_UNMAPPED_BASE) { | 96 | if (start_addr != TASK_UNMAPPED_BASE) { |
92 | start_addr = addr = TASK_UNMAPPED_BASE; | 97 | start_addr = addr = TASK_UNMAPPED_BASE; |
98 | mm->cached_hole_size = 0; | ||
93 | goto full_search; | 99 | goto full_search; |
94 | } | 100 | } |
95 | return -ENOMEM; | 101 | return -ENOMEM; |
@@ -101,6 +107,8 @@ full_search: | |||
101 | mm->free_area_cache = addr + len; | 107 | mm->free_area_cache = addr + len; |
102 | return addr; | 108 | return addr; |
103 | } | 109 | } |
110 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
111 | mm->cached_hole_size = vma->vm_start - addr; | ||
104 | addr = vma->vm_end; | 112 | addr = vma->vm_end; |
105 | if (do_align) | 113 | if (do_align) |
106 | addr = COLOUR_ALIGN(addr, pgoff); | 114 | addr = COLOUR_ALIGN(addr, pgoff); |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index 41958f57c838..79433159b5f0 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
@@ -169,7 +169,6 @@ void __init mem_init(void) | |||
169 | struct page *page = &mem_map[pfn]; | 169 | struct page *page = &mem_map[pfn]; |
170 | 170 | ||
171 | ClearPageReserved(page); | 171 | ClearPageReserved(page); |
172 | set_bit(PG_highmem, &page->flags); | ||
173 | set_page_count(page, 1); | 172 | set_page_count(page, 1); |
174 | __free_page(page); | 173 | __free_page(page); |
175 | totalram_pages++; | 174 | totalram_pages++; |
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile index aa7064a75ee6..43cd6220ee49 100644 --- a/arch/i386/boot/Makefile +++ b/arch/i386/boot/Makefile | |||
@@ -48,7 +48,7 @@ cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \ | |||
48 | $(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \ | 48 | $(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \ |
49 | $(obj)/vmlinux.bin $(obj)/tools/build FORCE | 49 | $(obj)/vmlinux.bin $(obj)/tools/build FORCE |
50 | $(call if_changed,image) | 50 | $(call if_changed,image) |
51 | @echo 'Kernel: $@ is ready' | 51 | @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' |
52 | 52 | ||
53 | $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE | 53 | $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE |
54 | $(call if_changed,objcopy) | 54 | $(call if_changed,objcopy) |
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index 6cd1ed311f02..d408afaf6495 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S | |||
@@ -251,7 +251,7 @@ ENTRY(sys_call_table) | |||
251 | .long sys_io_submit | 251 | .long sys_io_submit |
252 | .long sys_io_cancel | 252 | .long sys_io_cancel |
253 | .long sys_fadvise64 /* 250 */ | 253 | .long sys_fadvise64 /* 250 */ |
254 | .long sys_ni_syscall | 254 | .long sys_set_zone_reclaim |
255 | .long sys_exit_group | 255 | .long sys_exit_group |
256 | .long sys_lookup_dcookie | 256 | .long sys_lookup_dcookie |
257 | .long sys_epoll_create | 257 | .long sys_epoll_create |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 00c63419c06f..83c579e82a81 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -306,7 +306,7 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
306 | }; | 306 | }; |
307 | static int die_counter; | 307 | static int die_counter; |
308 | 308 | ||
309 | if (die.lock_owner != _smp_processor_id()) { | 309 | if (die.lock_owner != raw_smp_processor_id()) { |
310 | console_verbose(); | 310 | console_verbose(); |
311 | spin_lock_irq(&die.lock); | 311 | spin_lock_irq(&die.lock); |
312 | die.lock_owner = smp_processor_id(); | 312 | die.lock_owner = smp_processor_id(); |
diff --git a/arch/i386/lib/delay.c b/arch/i386/lib/delay.c index 080639f262b1..eb0cdfe9280f 100644 --- a/arch/i386/lib/delay.c +++ b/arch/i386/lib/delay.c | |||
@@ -34,7 +34,7 @@ inline void __const_udelay(unsigned long xloops) | |||
34 | xloops *= 4; | 34 | xloops *= 4; |
35 | __asm__("mull %0" | 35 | __asm__("mull %0" |
36 | :"=d" (xloops), "=&a" (d0) | 36 | :"=d" (xloops), "=&a" (d0) |
37 | :"1" (xloops),"0" (cpu_data[_smp_processor_id()].loops_per_jiffy * (HZ/4))); | 37 | :"1" (xloops),"0" (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (HZ/4))); |
38 | __delay(++xloops); | 38 | __delay(++xloops); |
39 | } | 39 | } |
40 | 40 | ||
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index 171fc925e1e4..3b099f32b948 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/tlb.h> | 18 | #include <asm/tlb.h> |
19 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
20 | 20 | ||
21 | static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 21 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) |
22 | { | 22 | { |
23 | pgd_t *pgd; | 23 | pgd_t *pgd; |
24 | pud_t *pud; | 24 | pud_t *pud; |
@@ -30,7 +30,7 @@ static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
30 | return (pte_t *) pmd; | 30 | return (pte_t *) pmd; |
31 | } | 31 | } |
32 | 32 | ||
33 | static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | 33 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) |
34 | { | 34 | { |
35 | pgd_t *pgd; | 35 | pgd_t *pgd; |
36 | pud_t *pud; | 36 | pud_t *pud; |
@@ -42,21 +42,6 @@ static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
42 | return (pte_t *) pmd; | 42 | return (pte_t *) pmd; |
43 | } | 43 | } |
44 | 44 | ||
45 | static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, struct page *page, pte_t * page_table, int write_access) | ||
46 | { | ||
47 | pte_t entry; | ||
48 | |||
49 | add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); | ||
50 | if (write_access) { | ||
51 | entry = | ||
52 | pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); | ||
53 | } else | ||
54 | entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot)); | ||
55 | entry = pte_mkyoung(entry); | ||
56 | mk_pte_huge(entry); | ||
57 | set_pte(page_table, entry); | ||
58 | } | ||
59 | |||
60 | /* | 45 | /* |
61 | * This function checks for proper alignment of input addr and len parameters. | 46 | * This function checks for proper alignment of input addr and len parameters. |
62 | */ | 47 | */ |
@@ -69,77 +54,6 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | |||
69 | return 0; | 54 | return 0; |
70 | } | 55 | } |
71 | 56 | ||
72 | int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, | ||
73 | struct vm_area_struct *vma) | ||
74 | { | ||
75 | pte_t *src_pte, *dst_pte, entry; | ||
76 | struct page *ptepage; | ||
77 | unsigned long addr = vma->vm_start; | ||
78 | unsigned long end = vma->vm_end; | ||
79 | |||
80 | while (addr < end) { | ||
81 | dst_pte = huge_pte_alloc(dst, addr); | ||
82 | if (!dst_pte) | ||
83 | goto nomem; | ||
84 | src_pte = huge_pte_offset(src, addr); | ||
85 | entry = *src_pte; | ||
86 | ptepage = pte_page(entry); | ||
87 | get_page(ptepage); | ||
88 | set_pte(dst_pte, entry); | ||
89 | add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); | ||
90 | addr += HPAGE_SIZE; | ||
91 | } | ||
92 | return 0; | ||
93 | |||
94 | nomem: | ||
95 | return -ENOMEM; | ||
96 | } | ||
97 | |||
98 | int | ||
99 | follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, | ||
100 | struct page **pages, struct vm_area_struct **vmas, | ||
101 | unsigned long *position, int *length, int i) | ||
102 | { | ||
103 | unsigned long vpfn, vaddr = *position; | ||
104 | int remainder = *length; | ||
105 | |||
106 | WARN_ON(!is_vm_hugetlb_page(vma)); | ||
107 | |||
108 | vpfn = vaddr/PAGE_SIZE; | ||
109 | while (vaddr < vma->vm_end && remainder) { | ||
110 | |||
111 | if (pages) { | ||
112 | pte_t *pte; | ||
113 | struct page *page; | ||
114 | |||
115 | pte = huge_pte_offset(mm, vaddr); | ||
116 | |||
117 | /* hugetlb should be locked, and hence, prefaulted */ | ||
118 | WARN_ON(!pte || pte_none(*pte)); | ||
119 | |||
120 | page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)]; | ||
121 | |||
122 | WARN_ON(!PageCompound(page)); | ||
123 | |||
124 | get_page(page); | ||
125 | pages[i] = page; | ||
126 | } | ||
127 | |||
128 | if (vmas) | ||
129 | vmas[i] = vma; | ||
130 | |||
131 | vaddr += PAGE_SIZE; | ||
132 | ++vpfn; | ||
133 | --remainder; | ||
134 | ++i; | ||
135 | } | ||
136 | |||
137 | *length = remainder; | ||
138 | *position = vaddr; | ||
139 | |||
140 | return i; | ||
141 | } | ||
142 | |||
143 | #if 0 /* This is just for testing */ | 57 | #if 0 /* This is just for testing */ |
144 | struct page * | 58 | struct page * |
145 | follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) | 59 | follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) |
@@ -204,83 +118,15 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address, | |||
204 | } | 118 | } |
205 | #endif | 119 | #endif |
206 | 120 | ||
207 | void unmap_hugepage_range(struct vm_area_struct *vma, | 121 | void hugetlb_clean_stale_pgtable(pte_t *pte) |
208 | unsigned long start, unsigned long end) | ||
209 | { | 122 | { |
210 | struct mm_struct *mm = vma->vm_mm; | 123 | pmd_t *pmd = (pmd_t *) pte; |
211 | unsigned long address; | ||
212 | pte_t pte, *ptep; | ||
213 | struct page *page; | 124 | struct page *page; |
214 | 125 | ||
215 | BUG_ON(start & (HPAGE_SIZE - 1)); | 126 | page = pmd_page(*pmd); |
216 | BUG_ON(end & (HPAGE_SIZE - 1)); | 127 | pmd_clear(pmd); |
217 | 128 | dec_page_state(nr_page_table_pages); | |
218 | for (address = start; address < end; address += HPAGE_SIZE) { | 129 | page_cache_release(page); |
219 | ptep = huge_pte_offset(mm, address); | ||
220 | if (!ptep) | ||
221 | continue; | ||
222 | pte = ptep_get_and_clear(mm, address, ptep); | ||
223 | if (pte_none(pte)) | ||
224 | continue; | ||
225 | page = pte_page(pte); | ||
226 | put_page(page); | ||
227 | } | ||
228 | add_mm_counter(mm ,rss, -((end - start) >> PAGE_SHIFT)); | ||
229 | flush_tlb_range(vma, start, end); | ||
230 | } | ||
231 | |||
232 | int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) | ||
233 | { | ||
234 | struct mm_struct *mm = current->mm; | ||
235 | unsigned long addr; | ||
236 | int ret = 0; | ||
237 | |||
238 | BUG_ON(vma->vm_start & ~HPAGE_MASK); | ||
239 | BUG_ON(vma->vm_end & ~HPAGE_MASK); | ||
240 | |||
241 | spin_lock(&mm->page_table_lock); | ||
242 | for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) { | ||
243 | unsigned long idx; | ||
244 | pte_t *pte = huge_pte_alloc(mm, addr); | ||
245 | struct page *page; | ||
246 | |||
247 | if (!pte) { | ||
248 | ret = -ENOMEM; | ||
249 | goto out; | ||
250 | } | ||
251 | |||
252 | if (!pte_none(*pte)) | ||
253 | continue; | ||
254 | |||
255 | idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) | ||
256 | + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); | ||
257 | page = find_get_page(mapping, idx); | ||
258 | if (!page) { | ||
259 | /* charge the fs quota first */ | ||
260 | if (hugetlb_get_quota(mapping)) { | ||
261 | ret = -ENOMEM; | ||
262 | goto out; | ||
263 | } | ||
264 | page = alloc_huge_page(); | ||
265 | if (!page) { | ||
266 | hugetlb_put_quota(mapping); | ||
267 | ret = -ENOMEM; | ||
268 | goto out; | ||
269 | } | ||
270 | ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC); | ||
271 | if (! ret) { | ||
272 | unlock_page(page); | ||
273 | } else { | ||
274 | hugetlb_put_quota(mapping); | ||
275 | free_huge_page(page); | ||
276 | goto out; | ||
277 | } | ||
278 | } | ||
279 | set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); | ||
280 | } | ||
281 | out: | ||
282 | spin_unlock(&mm->page_table_lock); | ||
283 | return ret; | ||
284 | } | 130 | } |
285 | 131 | ||
286 | /* x86_64 also uses this file */ | 132 | /* x86_64 also uses this file */ |
@@ -294,7 +140,12 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file, | |||
294 | struct vm_area_struct *vma; | 140 | struct vm_area_struct *vma; |
295 | unsigned long start_addr; | 141 | unsigned long start_addr; |
296 | 142 | ||
297 | start_addr = mm->free_area_cache; | 143 | if (len > mm->cached_hole_size) { |
144 | start_addr = mm->free_area_cache; | ||
145 | } else { | ||
146 | start_addr = TASK_UNMAPPED_BASE; | ||
147 | mm->cached_hole_size = 0; | ||
148 | } | ||
298 | 149 | ||
299 | full_search: | 150 | full_search: |
300 | addr = ALIGN(start_addr, HPAGE_SIZE); | 151 | addr = ALIGN(start_addr, HPAGE_SIZE); |
@@ -308,6 +159,7 @@ full_search: | |||
308 | */ | 159 | */ |
309 | if (start_addr != TASK_UNMAPPED_BASE) { | 160 | if (start_addr != TASK_UNMAPPED_BASE) { |
310 | start_addr = TASK_UNMAPPED_BASE; | 161 | start_addr = TASK_UNMAPPED_BASE; |
162 | mm->cached_hole_size = 0; | ||
311 | goto full_search; | 163 | goto full_search; |
312 | } | 164 | } |
313 | return -ENOMEM; | 165 | return -ENOMEM; |
@@ -316,6 +168,8 @@ full_search: | |||
316 | mm->free_area_cache = addr + len; | 168 | mm->free_area_cache = addr + len; |
317 | return addr; | 169 | return addr; |
318 | } | 170 | } |
171 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
172 | mm->cached_hole_size = vma->vm_start - addr; | ||
319 | addr = ALIGN(vma->vm_end, HPAGE_SIZE); | 173 | addr = ALIGN(vma->vm_end, HPAGE_SIZE); |
320 | } | 174 | } |
321 | } | 175 | } |
@@ -327,12 +181,17 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file, | |||
327 | struct mm_struct *mm = current->mm; | 181 | struct mm_struct *mm = current->mm; |
328 | struct vm_area_struct *vma, *prev_vma; | 182 | struct vm_area_struct *vma, *prev_vma; |
329 | unsigned long base = mm->mmap_base, addr = addr0; | 183 | unsigned long base = mm->mmap_base, addr = addr0; |
184 | unsigned long largest_hole = mm->cached_hole_size; | ||
330 | int first_time = 1; | 185 | int first_time = 1; |
331 | 186 | ||
332 | /* don't allow allocations above current base */ | 187 | /* don't allow allocations above current base */ |
333 | if (mm->free_area_cache > base) | 188 | if (mm->free_area_cache > base) |
334 | mm->free_area_cache = base; | 189 | mm->free_area_cache = base; |
335 | 190 | ||
191 | if (len <= largest_hole) { | ||
192 | largest_hole = 0; | ||
193 | mm->free_area_cache = base; | ||
194 | } | ||
336 | try_again: | 195 | try_again: |
337 | /* make sure it can fit in the remaining address space */ | 196 | /* make sure it can fit in the remaining address space */ |
338 | if (mm->free_area_cache < len) | 197 | if (mm->free_area_cache < len) |
@@ -353,13 +212,21 @@ try_again: | |||
353 | * vma->vm_start, use it: | 212 | * vma->vm_start, use it: |
354 | */ | 213 | */ |
355 | if (addr + len <= vma->vm_start && | 214 | if (addr + len <= vma->vm_start && |
356 | (!prev_vma || (addr >= prev_vma->vm_end))) | 215 | (!prev_vma || (addr >= prev_vma->vm_end))) { |
357 | /* remember the address as a hint for next time */ | 216 | /* remember the address as a hint for next time */ |
358 | return (mm->free_area_cache = addr); | 217 | mm->cached_hole_size = largest_hole; |
359 | else | 218 | return (mm->free_area_cache = addr); |
219 | } else { | ||
360 | /* pull free_area_cache down to the first hole */ | 220 | /* pull free_area_cache down to the first hole */ |
361 | if (mm->free_area_cache == vma->vm_end) | 221 | if (mm->free_area_cache == vma->vm_end) { |
362 | mm->free_area_cache = vma->vm_start; | 222 | mm->free_area_cache = vma->vm_start; |
223 | mm->cached_hole_size = largest_hole; | ||
224 | } | ||
225 | } | ||
226 | |||
227 | /* remember the largest hole we saw so far */ | ||
228 | if (addr + largest_hole < vma->vm_start) | ||
229 | largest_hole = vma->vm_start - addr; | ||
363 | 230 | ||
364 | /* try just below the current vma->vm_start */ | 231 | /* try just below the current vma->vm_start */ |
365 | addr = (vma->vm_start - len) & HPAGE_MASK; | 232 | addr = (vma->vm_start - len) & HPAGE_MASK; |
@@ -372,6 +239,7 @@ fail: | |||
372 | */ | 239 | */ |
373 | if (first_time) { | 240 | if (first_time) { |
374 | mm->free_area_cache = base; | 241 | mm->free_area_cache = base; |
242 | largest_hole = 0; | ||
375 | first_time = 0; | 243 | first_time = 0; |
376 | goto try_again; | 244 | goto try_again; |
377 | } | 245 | } |
@@ -382,6 +250,7 @@ fail: | |||
382 | * allocations. | 250 | * allocations. |
383 | */ | 251 | */ |
384 | mm->free_area_cache = TASK_UNMAPPED_BASE; | 252 | mm->free_area_cache = TASK_UNMAPPED_BASE; |
253 | mm->cached_hole_size = ~0UL; | ||
385 | addr = hugetlb_get_unmapped_area_bottomup(file, addr0, | 254 | addr = hugetlb_get_unmapped_area_bottomup(file, addr0, |
386 | len, pgoff, flags); | 255 | len, pgoff, flags); |
387 | 256 | ||
@@ -389,6 +258,7 @@ fail: | |||
389 | * Restore the topdown base: | 258 | * Restore the topdown base: |
390 | */ | 259 | */ |
391 | mm->free_area_cache = base; | 260 | mm->free_area_cache = base; |
261 | mm->cached_hole_size = ~0UL; | ||
392 | 262 | ||
393 | return addr; | 263 | return addr; |
394 | } | 264 | } |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 7a7ea3737265..8766c771bb45 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -269,7 +269,6 @@ void __init one_highpage_init(struct page *page, int pfn, int bad_ppro) | |||
269 | { | 269 | { |
270 | if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) { | 270 | if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) { |
271 | ClearPageReserved(page); | 271 | ClearPageReserved(page); |
272 | set_bit(PG_highmem, &page->flags); | ||
273 | set_page_count(page, 1); | 272 | set_page_count(page, 1); |
274 | __free_page(page); | 273 | __free_page(page); |
275 | totalhigh_pages++; | 274 | totalhigh_pages++; |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 992bcfff7913..ce4dfa8b834d 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -50,6 +50,10 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER | |||
50 | bool | 50 | bool |
51 | default y | 51 | default y |
52 | 52 | ||
53 | config IA64_UNCACHED_ALLOCATOR | ||
54 | bool | ||
55 | select GENERIC_ALLOCATOR | ||
56 | |||
53 | choice | 57 | choice |
54 | prompt "System type" | 58 | prompt "System type" |
55 | default IA64_GENERIC | 59 | default IA64_GENERIC |
@@ -223,7 +227,7 @@ config IA64_SGI_SN_SIM | |||
223 | 227 | ||
224 | config IA64_SGI_SN_XP | 228 | config IA64_SGI_SN_XP |
225 | tristate "Support communication between SGI SSIs" | 229 | tristate "Support communication between SGI SSIs" |
226 | depends on MSPEC | 230 | select IA64_UNCACHED_ALLOCATOR |
227 | help | 231 | help |
228 | An SGI machine can be divided into multiple Single System | 232 | An SGI machine can be divided into multiple Single System |
229 | Images which act independently of each other and have | 233 | Images which act independently of each other and have |
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig index 6ff7107fee4d..a01bb02d074d 100644 --- a/arch/ia64/configs/sn2_defconfig +++ b/arch/ia64/configs/sn2_defconfig | |||
@@ -588,6 +588,7 @@ CONFIG_SGI_MBCS=m | |||
588 | CONFIG_SERIAL_CORE=y | 588 | CONFIG_SERIAL_CORE=y |
589 | CONFIG_SERIAL_CORE_CONSOLE=y | 589 | CONFIG_SERIAL_CORE_CONSOLE=y |
590 | CONFIG_SERIAL_SGI_L1_CONSOLE=y | 590 | CONFIG_SERIAL_SGI_L1_CONSOLE=y |
591 | CONFIG_SERIAL_SGI_IOC4=y | ||
591 | CONFIG_UNIX98_PTYS=y | 592 | CONFIG_UNIX98_PTYS=y |
592 | CONFIG_LEGACY_PTYS=y | 593 | CONFIG_LEGACY_PTYS=y |
593 | CONFIG_LEGACY_PTY_COUNT=256 | 594 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -788,6 +789,11 @@ CONFIG_INFINIBAND_IPOIB=m | |||
788 | # CONFIG_INFINIBAND_IPOIB_DEBUG is not set | 789 | # CONFIG_INFINIBAND_IPOIB_DEBUG is not set |
789 | 790 | ||
790 | # | 791 | # |
792 | # SN Devices | ||
793 | # | ||
794 | CONFIG_SGI_IOC4=y | ||
795 | |||
796 | # | ||
791 | # File systems | 797 | # File systems |
792 | # | 798 | # |
793 | CONFIG_EXT2_FS=y | 799 | CONFIG_EXT2_FS=y |
diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig index 2aea0f9e6e1d..7be8096e0561 100644 --- a/arch/ia64/defconfig +++ b/arch/ia64/defconfig | |||
@@ -657,6 +657,7 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y | |||
657 | CONFIG_SERIAL_CORE=y | 657 | CONFIG_SERIAL_CORE=y |
658 | CONFIG_SERIAL_CORE_CONSOLE=y | 658 | CONFIG_SERIAL_CORE_CONSOLE=y |
659 | CONFIG_SERIAL_SGI_L1_CONSOLE=y | 659 | CONFIG_SERIAL_SGI_L1_CONSOLE=y |
660 | CONFIG_SERIAL_SGI_IOC4=y | ||
660 | # CONFIG_SERIAL_JSM is not set | 661 | # CONFIG_SERIAL_JSM is not set |
661 | CONFIG_UNIX98_PTYS=y | 662 | CONFIG_UNIX98_PTYS=y |
662 | CONFIG_LEGACY_PTYS=y | 663 | CONFIG_LEGACY_PTYS=y |
@@ -976,6 +977,11 @@ CONFIG_INFINIBAND_IPOIB=m | |||
976 | # CONFIG_INFINIBAND_IPOIB_DEBUG is not set | 977 | # CONFIG_INFINIBAND_IPOIB_DEBUG is not set |
977 | 978 | ||
978 | # | 979 | # |
980 | # SN Devices | ||
981 | # | ||
982 | CONFIG_SGI_IOC4=y | ||
983 | |||
984 | # | ||
979 | # File systems | 985 | # File systems |
980 | # | 986 | # |
981 | CONFIG_EXT2_FS=y | 987 | CONFIG_EXT2_FS=y |
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index c1a02bbc252c..4c73d8ba2e3d 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -20,6 +20,7 @@ obj-$(CONFIG_SMP) += smp.o smpboot.o domain.o | |||
20 | obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o | 20 | obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o |
21 | obj-$(CONFIG_IA64_CYCLONE) += cyclone.o | 21 | obj-$(CONFIG_IA64_CYCLONE) += cyclone.o |
22 | obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o | 22 | obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o |
23 | obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o | ||
23 | mca_recovery-y += mca_drv.o mca_drv_asm.o | 24 | mca_recovery-y += mca_drv.o mca_drv_asm.o |
24 | 25 | ||
25 | # The gate DSO image is built using a special linker script. | 26 | # The gate DSO image is built using a special linker script. |
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 4a3b1aac43e7..179f230816ed 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -410,6 +410,38 @@ efi_memmap_walk (efi_freemem_callback_t callback, void *arg) | |||
410 | } | 410 | } |
411 | 411 | ||
412 | /* | 412 | /* |
413 | * Walk the EFI memory map to pull out leftover pages in the lower | ||
414 | * memory regions which do not end up in the regular memory map and | ||
415 | * stick them into the uncached allocator | ||
416 | * | ||
417 | * The regular walk function is significantly more complex than the | ||
418 | * uncached walk which means it really doesn't make sense to try and | ||
419 | * marge the two. | ||
420 | */ | ||
421 | void __init | ||
422 | efi_memmap_walk_uc (efi_freemem_callback_t callback) | ||
423 | { | ||
424 | void *efi_map_start, *efi_map_end, *p; | ||
425 | efi_memory_desc_t *md; | ||
426 | u64 efi_desc_size, start, end; | ||
427 | |||
428 | efi_map_start = __va(ia64_boot_param->efi_memmap); | ||
429 | efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size; | ||
430 | efi_desc_size = ia64_boot_param->efi_memdesc_size; | ||
431 | |||
432 | for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { | ||
433 | md = p; | ||
434 | if (md->attribute == EFI_MEMORY_UC) { | ||
435 | start = PAGE_ALIGN(md->phys_addr); | ||
436 | end = PAGE_ALIGN((md->phys_addr+(md->num_pages << EFI_PAGE_SHIFT)) & PAGE_MASK); | ||
437 | if ((*callback)(start, end, NULL) < 0) | ||
438 | return; | ||
439 | } | ||
440 | } | ||
441 | } | ||
442 | |||
443 | |||
444 | /* | ||
413 | * Look for the PAL_CODE region reported by EFI and maps it using an | 445 | * Look for the PAL_CODE region reported by EFI and maps it using an |
414 | * ITR to enable safe PAL calls in virtual mode. See IA-64 Processor | 446 | * ITR to enable safe PAL calls in virtual mode. See IA-64 Processor |
415 | * Abstraction Layer chapter 11 in ADAG | 447 | * Abstraction Layer chapter 11 in ADAG |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index d99316c9be28..b1d5d3d5276c 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1579,7 +1579,7 @@ sys_call_table: | |||
1579 | data8 sys_keyctl | 1579 | data8 sys_keyctl |
1580 | data8 sys_ni_syscall | 1580 | data8 sys_ni_syscall |
1581 | data8 sys_ni_syscall // 1275 | 1581 | data8 sys_ni_syscall // 1275 |
1582 | data8 sys_ni_syscall | 1582 | data8 sys_set_zone_reclaim |
1583 | data8 sys_ni_syscall | 1583 | data8 sys_ni_syscall |
1584 | data8 sys_ni_syscall | 1584 | data8 sys_ni_syscall |
1585 | data8 sys_ni_syscall | 1585 | data8 sys_ni_syscall |
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c new file mode 100644 index 000000000000..490dfc9ab47f --- /dev/null +++ b/arch/ia64/kernel/uncached.c | |||
@@ -0,0 +1,246 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001-2005 Silicon Graphics, Inc. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of version 2 of the GNU General Public License | ||
6 | * as published by the Free Software Foundation. | ||
7 | * | ||
8 | * A simple uncached page allocator using the generic allocator. This | ||
9 | * allocator first utilizes the spare (spill) pages found in the EFI | ||
10 | * memmap and will then start converting cached pages to uncached ones | ||
11 | * at a granule at a time. Node awareness is implemented by having a | ||
12 | * pool of pages per node. | ||
13 | */ | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/errno.h> | ||
20 | #include <linux/string.h> | ||
21 | #include <linux/slab.h> | ||
22 | #include <linux/efi.h> | ||
23 | #include <linux/genalloc.h> | ||
24 | #include <asm/page.h> | ||
25 | #include <asm/pal.h> | ||
26 | #include <asm/system.h> | ||
27 | #include <asm/pgtable.h> | ||
28 | #include <asm/atomic.h> | ||
29 | #include <asm/tlbflush.h> | ||
30 | #include <asm/sn/arch.h> | ||
31 | |||
32 | #define DEBUG 0 | ||
33 | |||
34 | #if DEBUG | ||
35 | #define dprintk printk | ||
36 | #else | ||
37 | #define dprintk(x...) do { } while (0) | ||
38 | #endif | ||
39 | |||
40 | void __init efi_memmap_walk_uc (efi_freemem_callback_t callback); | ||
41 | |||
42 | #define MAX_UNCACHED_GRANULES 5 | ||
43 | static int allocated_granules; | ||
44 | |||
45 | struct gen_pool *uncached_pool[MAX_NUMNODES]; | ||
46 | |||
47 | |||
48 | static void uncached_ipi_visibility(void *data) | ||
49 | { | ||
50 | int status; | ||
51 | |||
52 | status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); | ||
53 | if ((status != PAL_VISIBILITY_OK) && | ||
54 | (status != PAL_VISIBILITY_OK_REMOTE_NEEDED)) | ||
55 | printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on " | ||
56 | "CPU %i\n", status, get_cpu()); | ||
57 | } | ||
58 | |||
59 | |||
60 | static void uncached_ipi_mc_drain(void *data) | ||
61 | { | ||
62 | int status; | ||
63 | status = ia64_pal_mc_drain(); | ||
64 | if (status) | ||
65 | printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on " | ||
66 | "CPU %i\n", status, get_cpu()); | ||
67 | } | ||
68 | |||
69 | |||
70 | static unsigned long | ||
71 | uncached_get_new_chunk(struct gen_pool *poolp) | ||
72 | { | ||
73 | struct page *page; | ||
74 | void *tmp; | ||
75 | int status, i; | ||
76 | unsigned long addr, node; | ||
77 | |||
78 | if (allocated_granules >= MAX_UNCACHED_GRANULES) | ||
79 | return 0; | ||
80 | |||
81 | node = poolp->private; | ||
82 | page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, | ||
83 | IA64_GRANULE_SHIFT-PAGE_SHIFT); | ||
84 | |||
85 | dprintk(KERN_INFO "get_new_chunk page %p, addr %lx\n", | ||
86 | page, (unsigned long)(page-vmem_map) << PAGE_SHIFT); | ||
87 | |||
88 | /* | ||
89 | * Do magic if no mem on local node! XXX | ||
90 | */ | ||
91 | if (!page) | ||
92 | return 0; | ||
93 | tmp = page_address(page); | ||
94 | |||
95 | /* | ||
96 | * There's a small race here where it's possible for someone to | ||
97 | * access the page through /dev/mem halfway through the conversion | ||
98 | * to uncached - not sure it's really worth bothering about | ||
99 | */ | ||
100 | for (i = 0; i < (IA64_GRANULE_SIZE / PAGE_SIZE); i++) | ||
101 | SetPageUncached(&page[i]); | ||
102 | |||
103 | flush_tlb_kernel_range(tmp, tmp + IA64_GRANULE_SIZE); | ||
104 | |||
105 | status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); | ||
106 | |||
107 | dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n", | ||
108 | status, get_cpu()); | ||
109 | |||
110 | if (!status) { | ||
111 | status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1); | ||
112 | if (status) | ||
113 | printk(KERN_WARNING "smp_call_function failed for " | ||
114 | "uncached_ipi_visibility! (%i)\n", status); | ||
115 | } | ||
116 | |||
117 | if (ia64_platform_is("sn2")) | ||
118 | sn_flush_all_caches((unsigned long)tmp, IA64_GRANULE_SIZE); | ||
119 | else | ||
120 | flush_icache_range((unsigned long)tmp, | ||
121 | (unsigned long)tmp+IA64_GRANULE_SIZE); | ||
122 | |||
123 | ia64_pal_mc_drain(); | ||
124 | status = smp_call_function(uncached_ipi_mc_drain, NULL, 0, 1); | ||
125 | if (status) | ||
126 | printk(KERN_WARNING "smp_call_function failed for " | ||
127 | "uncached_ipi_mc_drain! (%i)\n", status); | ||
128 | |||
129 | addr = (unsigned long)tmp - PAGE_OFFSET + __IA64_UNCACHED_OFFSET; | ||
130 | |||
131 | allocated_granules++; | ||
132 | return addr; | ||
133 | } | ||
134 | |||
135 | |||
136 | /* | ||
137 | * uncached_alloc_page | ||
138 | * | ||
139 | * Allocate 1 uncached page. Allocates on the requested node. If no | ||
140 | * uncached pages are available on the requested node, roundrobin starting | ||
141 | * with higher nodes. | ||
142 | */ | ||
143 | unsigned long | ||
144 | uncached_alloc_page(int nid) | ||
145 | { | ||
146 | unsigned long maddr; | ||
147 | |||
148 | maddr = gen_pool_alloc(uncached_pool[nid], PAGE_SIZE); | ||
149 | |||
150 | dprintk(KERN_DEBUG "uncached_alloc_page returns %lx on node %i\n", | ||
151 | maddr, nid); | ||
152 | |||
153 | /* | ||
154 | * If no memory is availble on our local node, try the | ||
155 | * remaining nodes in the system. | ||
156 | */ | ||
157 | if (!maddr) { | ||
158 | int i; | ||
159 | |||
160 | for (i = MAX_NUMNODES - 1; i >= 0; i--) { | ||
161 | if (i == nid || !node_online(i)) | ||
162 | continue; | ||
163 | maddr = gen_pool_alloc(uncached_pool[i], PAGE_SIZE); | ||
164 | dprintk(KERN_DEBUG "uncached_alloc_page alternate search " | ||
165 | "returns %lx on node %i\n", maddr, i); | ||
166 | if (maddr) { | ||
167 | break; | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | |||
172 | return maddr; | ||
173 | } | ||
174 | EXPORT_SYMBOL(uncached_alloc_page); | ||
175 | |||
176 | |||
177 | /* | ||
178 | * uncached_free_page | ||
179 | * | ||
180 | * Free a single uncached page. | ||
181 | */ | ||
182 | void | ||
183 | uncached_free_page(unsigned long maddr) | ||
184 | { | ||
185 | int node; | ||
186 | |||
187 | node = nasid_to_cnodeid(NASID_GET(maddr)); | ||
188 | |||
189 | dprintk(KERN_DEBUG "uncached_free_page(%lx) on node %i\n", maddr, node); | ||
190 | |||
191 | if ((maddr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET) | ||
192 | panic("uncached_free_page invalid address %lx\n", maddr); | ||
193 | |||
194 | gen_pool_free(uncached_pool[node], maddr, PAGE_SIZE); | ||
195 | } | ||
196 | EXPORT_SYMBOL(uncached_free_page); | ||
197 | |||
198 | |||
199 | /* | ||
200 | * uncached_build_memmap, | ||
201 | * | ||
202 | * Called at boot time to build a map of pages that can be used for | ||
203 | * memory special operations. | ||
204 | */ | ||
205 | static int __init | ||
206 | uncached_build_memmap(unsigned long start, unsigned long end, void *arg) | ||
207 | { | ||
208 | long length; | ||
209 | unsigned long vstart, vend; | ||
210 | int node; | ||
211 | |||
212 | length = end - start; | ||
213 | vstart = start + __IA64_UNCACHED_OFFSET; | ||
214 | vend = end + __IA64_UNCACHED_OFFSET; | ||
215 | |||
216 | dprintk(KERN_ERR "uncached_build_memmap(%lx %lx)\n", start, end); | ||
217 | |||
218 | memset((char *)vstart, 0, length); | ||
219 | |||
220 | node = nasid_to_cnodeid(NASID_GET(start)); | ||
221 | |||
222 | for (; vstart < vend ; vstart += PAGE_SIZE) { | ||
223 | dprintk(KERN_INFO "sticking %lx into the pool!\n", vstart); | ||
224 | gen_pool_free(uncached_pool[node], vstart, PAGE_SIZE); | ||
225 | } | ||
226 | |||
227 | return 0; | ||
228 | } | ||
229 | |||
230 | |||
231 | static int __init uncached_init(void) { | ||
232 | int i; | ||
233 | |||
234 | for (i = 0; i < MAX_NUMNODES; i++) { | ||
235 | if (!node_online(i)) | ||
236 | continue; | ||
237 | uncached_pool[i] = gen_pool_create(0, IA64_GRANULE_SHIFT, | ||
238 | &uncached_get_new_chunk, i); | ||
239 | } | ||
240 | |||
241 | efi_memmap_walk_uc(uncached_build_memmap); | ||
242 | |||
243 | return 0; | ||
244 | } | ||
245 | |||
246 | __initcall(uncached_init); | ||
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index df08ae7634b6..e0a776a3044c 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; | 25 | unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; |
26 | 26 | ||
27 | static pte_t * | 27 | pte_t * |
28 | huge_pte_alloc (struct mm_struct *mm, unsigned long addr) | 28 | huge_pte_alloc (struct mm_struct *mm, unsigned long addr) |
29 | { | 29 | { |
30 | unsigned long taddr = htlbpage_to_page(addr); | 30 | unsigned long taddr = htlbpage_to_page(addr); |
@@ -43,7 +43,7 @@ huge_pte_alloc (struct mm_struct *mm, unsigned long addr) | |||
43 | return pte; | 43 | return pte; |
44 | } | 44 | } |
45 | 45 | ||
46 | static pte_t * | 46 | pte_t * |
47 | huge_pte_offset (struct mm_struct *mm, unsigned long addr) | 47 | huge_pte_offset (struct mm_struct *mm, unsigned long addr) |
48 | { | 48 | { |
49 | unsigned long taddr = htlbpage_to_page(addr); | 49 | unsigned long taddr = htlbpage_to_page(addr); |
@@ -67,23 +67,6 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr) | |||
67 | 67 | ||
68 | #define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } | 68 | #define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } |
69 | 69 | ||
70 | static void | ||
71 | set_huge_pte (struct mm_struct *mm, struct vm_area_struct *vma, | ||
72 | struct page *page, pte_t * page_table, int write_access) | ||
73 | { | ||
74 | pte_t entry; | ||
75 | |||
76 | add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); | ||
77 | if (write_access) { | ||
78 | entry = | ||
79 | pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); | ||
80 | } else | ||
81 | entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot)); | ||
82 | entry = pte_mkyoung(entry); | ||
83 | mk_pte_huge(entry); | ||
84 | set_pte(page_table, entry); | ||
85 | return; | ||
86 | } | ||
87 | /* | 70 | /* |
88 | * This function checks for proper alignment of input addr and len parameters. | 71 | * This function checks for proper alignment of input addr and len parameters. |
89 | */ | 72 | */ |
@@ -99,68 +82,6 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | |||
99 | return 0; | 82 | return 0; |
100 | } | 83 | } |
101 | 84 | ||
102 | int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, | ||
103 | struct vm_area_struct *vma) | ||
104 | { | ||
105 | pte_t *src_pte, *dst_pte, entry; | ||
106 | struct page *ptepage; | ||
107 | unsigned long addr = vma->vm_start; | ||
108 | unsigned long end = vma->vm_end; | ||
109 | |||
110 | while (addr < end) { | ||
111 | dst_pte = huge_pte_alloc(dst, addr); | ||
112 | if (!dst_pte) | ||
113 | goto nomem; | ||
114 | src_pte = huge_pte_offset(src, addr); | ||
115 | entry = *src_pte; | ||
116 | ptepage = pte_page(entry); | ||
117 | get_page(ptepage); | ||
118 | set_pte(dst_pte, entry); | ||
119 | add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); | ||
120 | addr += HPAGE_SIZE; | ||
121 | } | ||
122 | return 0; | ||
123 | nomem: | ||
124 | return -ENOMEM; | ||
125 | } | ||
126 | |||
127 | int | ||
128 | follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, | ||
129 | struct page **pages, struct vm_area_struct **vmas, | ||
130 | unsigned long *st, int *length, int i) | ||
131 | { | ||
132 | pte_t *ptep, pte; | ||
133 | unsigned long start = *st; | ||
134 | unsigned long pstart; | ||
135 | int len = *length; | ||
136 | struct page *page; | ||
137 | |||
138 | do { | ||
139 | pstart = start & HPAGE_MASK; | ||
140 | ptep = huge_pte_offset(mm, start); | ||
141 | pte = *ptep; | ||
142 | |||
143 | back1: | ||
144 | page = pte_page(pte); | ||
145 | if (pages) { | ||
146 | page += ((start & ~HPAGE_MASK) >> PAGE_SHIFT); | ||
147 | get_page(page); | ||
148 | pages[i] = page; | ||
149 | } | ||
150 | if (vmas) | ||
151 | vmas[i] = vma; | ||
152 | i++; | ||
153 | len--; | ||
154 | start += PAGE_SIZE; | ||
155 | if (((start & HPAGE_MASK) == pstart) && len && | ||
156 | (start < vma->vm_end)) | ||
157 | goto back1; | ||
158 | } while (len && start < vma->vm_end); | ||
159 | *length = len; | ||
160 | *st = start; | ||
161 | return i; | ||
162 | } | ||
163 | |||
164 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long addr, int write) | 85 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long addr, int write) |
165 | { | 86 | { |
166 | struct page *page; | 87 | struct page *page; |
@@ -212,81 +133,6 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, | |||
212 | free_pgd_range(tlb, addr, end, floor, ceiling); | 133 | free_pgd_range(tlb, addr, end, floor, ceiling); |
213 | } | 134 | } |
214 | 135 | ||
215 | void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) | ||
216 | { | ||
217 | struct mm_struct *mm = vma->vm_mm; | ||
218 | unsigned long address; | ||
219 | pte_t *pte; | ||
220 | struct page *page; | ||
221 | |||
222 | BUG_ON(start & (HPAGE_SIZE - 1)); | ||
223 | BUG_ON(end & (HPAGE_SIZE - 1)); | ||
224 | |||
225 | for (address = start; address < end; address += HPAGE_SIZE) { | ||
226 | pte = huge_pte_offset(mm, address); | ||
227 | if (pte_none(*pte)) | ||
228 | continue; | ||
229 | page = pte_page(*pte); | ||
230 | put_page(page); | ||
231 | pte_clear(mm, address, pte); | ||
232 | } | ||
233 | add_mm_counter(mm, rss, - ((end - start) >> PAGE_SHIFT)); | ||
234 | flush_tlb_range(vma, start, end); | ||
235 | } | ||
236 | |||
237 | int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) | ||
238 | { | ||
239 | struct mm_struct *mm = current->mm; | ||
240 | unsigned long addr; | ||
241 | int ret = 0; | ||
242 | |||
243 | BUG_ON(vma->vm_start & ~HPAGE_MASK); | ||
244 | BUG_ON(vma->vm_end & ~HPAGE_MASK); | ||
245 | |||
246 | spin_lock(&mm->page_table_lock); | ||
247 | for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) { | ||
248 | unsigned long idx; | ||
249 | pte_t *pte = huge_pte_alloc(mm, addr); | ||
250 | struct page *page; | ||
251 | |||
252 | if (!pte) { | ||
253 | ret = -ENOMEM; | ||
254 | goto out; | ||
255 | } | ||
256 | if (!pte_none(*pte)) | ||
257 | continue; | ||
258 | |||
259 | idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) | ||
260 | + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); | ||
261 | page = find_get_page(mapping, idx); | ||
262 | if (!page) { | ||
263 | /* charge the fs quota first */ | ||
264 | if (hugetlb_get_quota(mapping)) { | ||
265 | ret = -ENOMEM; | ||
266 | goto out; | ||
267 | } | ||
268 | page = alloc_huge_page(); | ||
269 | if (!page) { | ||
270 | hugetlb_put_quota(mapping); | ||
271 | ret = -ENOMEM; | ||
272 | goto out; | ||
273 | } | ||
274 | ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC); | ||
275 | if (! ret) { | ||
276 | unlock_page(page); | ||
277 | } else { | ||
278 | hugetlb_put_quota(mapping); | ||
279 | page_cache_release(page); | ||
280 | goto out; | ||
281 | } | ||
282 | } | ||
283 | set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); | ||
284 | } | ||
285 | out: | ||
286 | spin_unlock(&mm->page_table_lock); | ||
287 | return ret; | ||
288 | } | ||
289 | |||
290 | unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, | 136 | unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, |
291 | unsigned long pgoff, unsigned long flags) | 137 | unsigned long pgoff, unsigned long flags) |
292 | { | 138 | { |
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c index 2c3c4a8af553..cd7ed73f0e7a 100644 --- a/arch/ia64/sn/kernel/xpc_partition.c +++ b/arch/ia64/sn/kernel/xpc_partition.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/cache.h> | 22 | #include <linux/cache.h> |
23 | #include <linux/mmzone.h> | 23 | #include <linux/mmzone.h> |
24 | #include <linux/nodemask.h> | 24 | #include <linux/nodemask.h> |
25 | #include <asm/uncached.h> | ||
25 | #include <asm/sn/bte.h> | 26 | #include <asm/sn/bte.h> |
26 | #include <asm/sn/intr.h> | 27 | #include <asm/sn/intr.h> |
27 | #include <asm/sn/sn_sal.h> | 28 | #include <asm/sn/sn_sal.h> |
@@ -183,7 +184,7 @@ xpc_rsvd_page_init(void) | |||
183 | * memory protections are never restricted. | 184 | * memory protections are never restricted. |
184 | */ | 185 | */ |
185 | if ((amos_page = xpc_vars->amos_page) == NULL) { | 186 | if ((amos_page = xpc_vars->amos_page) == NULL) { |
186 | amos_page = (AMO_t *) mspec_kalloc_page(0); | 187 | amos_page = (AMO_t *) TO_AMO(uncached_alloc_page(0)); |
187 | if (amos_page == NULL) { | 188 | if (amos_page == NULL) { |
188 | dev_err(xpc_part, "can't allocate page of AMOs\n"); | 189 | dev_err(xpc_part, "can't allocate page of AMOs\n"); |
189 | return NULL; | 190 | return NULL; |
@@ -200,7 +201,8 @@ xpc_rsvd_page_init(void) | |||
200 | if (ret != 0) { | 201 | if (ret != 0) { |
201 | dev_err(xpc_part, "can't change memory " | 202 | dev_err(xpc_part, "can't change memory " |
202 | "protections\n"); | 203 | "protections\n"); |
203 | mspec_kfree_page((unsigned long) amos_page); | 204 | uncached_free_page(__IA64_UNCACHED_OFFSET | |
205 | TO_PHYS((u64) amos_page)); | ||
204 | return NULL; | 206 | return NULL; |
205 | } | 207 | } |
206 | } | 208 | } |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 0d90ea58a0cb..64c133344afe 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -78,6 +78,9 @@ config PLAT_OAKS32R | |||
78 | config PLAT_MAPPI2 | 78 | config PLAT_MAPPI2 |
79 | bool "Mappi-II(M3A-ZA36/M3A-ZA52)" | 79 | bool "Mappi-II(M3A-ZA36/M3A-ZA52)" |
80 | 80 | ||
81 | config PLAT_MAPPI3 | ||
82 | bool "Mappi-III(M3A-2170)" | ||
83 | |||
81 | endchoice | 84 | endchoice |
82 | 85 | ||
83 | choice | 86 | choice |
@@ -134,6 +137,7 @@ config BUS_CLOCK | |||
134 | int "Bus Clock [Hz] (integer)" | 137 | int "Bus Clock [Hz] (integer)" |
135 | default "70000000" if PLAT_MAPPI | 138 | default "70000000" if PLAT_MAPPI |
136 | default "25000000" if PLAT_USRV | 139 | default "25000000" if PLAT_USRV |
140 | default "50000000" if PLAT_MAPPI3 | ||
137 | default "50000000" if PLAT_M32700UT | 141 | default "50000000" if PLAT_M32700UT |
138 | default "50000000" if PLAT_OPSPUT | 142 | default "50000000" if PLAT_OPSPUT |
139 | default "33333333" if PLAT_OAKS32R | 143 | default "33333333" if PLAT_OAKS32R |
@@ -149,7 +153,7 @@ config CPU_LITTLE_ENDIAN | |||
149 | 153 | ||
150 | config MEMORY_START | 154 | config MEMORY_START |
151 | hex "Physical memory start address (hex)" | 155 | hex "Physical memory start address (hex)" |
152 | default "08000000" if PLAT_MAPPI || PLAT_MAPPI2 | 156 | default "08000000" if PLAT_MAPPI || PLAT_MAPPI2 || PLAT_MAPPI3 |
153 | default "08000000" if PLAT_USRV | 157 | default "08000000" if PLAT_USRV |
154 | default "08000000" if PLAT_M32700UT | 158 | default "08000000" if PLAT_M32700UT |
155 | default "08000000" if PLAT_OPSPUT | 159 | default "08000000" if PLAT_OPSPUT |
@@ -157,6 +161,7 @@ config MEMORY_START | |||
157 | 161 | ||
158 | config MEMORY_SIZE | 162 | config MEMORY_SIZE |
159 | hex "Physical memory size (hex)" | 163 | hex "Physical memory size (hex)" |
164 | default "08000000" if PLAT_MAPPI3 | ||
160 | default "04000000" if PLAT_MAPPI || PLAT_MAPPI2 | 165 | default "04000000" if PLAT_MAPPI || PLAT_MAPPI2 |
161 | default "02000000" if PLAT_USRV | 166 | default "02000000" if PLAT_USRV |
162 | default "01000000" if PLAT_M32700UT | 167 | default "01000000" if PLAT_M32700UT |
diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c index bad5475eff90..8f9a57271f83 100644 --- a/arch/m32r/boot/compressed/m32r_sio.c +++ b/arch/m32r/boot/compressed/m32r_sio.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <asm/processor.h> | ||
9 | 10 | ||
10 | static void putc(char c); | 11 | static void putc(char c); |
11 | 12 | ||
@@ -38,16 +39,17 @@ static int puts(const char *s) | |||
38 | 39 | ||
39 | static void putc(char c) | 40 | static void putc(char c) |
40 | { | 41 | { |
41 | 42 | while ((*BOOT_SIO0STS & 0x3) != 0x3) | |
42 | while ((*BOOT_SIO0STS & 0x3) != 0x3) ; | 43 | cpu_relax(); |
43 | if (c == '\n') { | 44 | if (c == '\n') { |
44 | *BOOT_SIO0TXB = '\r'; | 45 | *BOOT_SIO0TXB = '\r'; |
45 | while ((*BOOT_SIO0STS & 0x3) != 0x3) ; | 46 | while ((*BOOT_SIO0STS & 0x3) != 0x3) |
47 | cpu_relax(); | ||
46 | } | 48 | } |
47 | *BOOT_SIO0TXB = c; | 49 | *BOOT_SIO0TXB = c; |
48 | } | 50 | } |
49 | #else /* defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) */ | 51 | #else /* !(CONFIG_PLAT_M32700UT_Alpha) && !(CONFIG_PLAT_M32700UT) */ |
50 | #ifdef CONFIG_MMU | 52 | #if defined(CONFIG_PLAT_MAPPI2) |
51 | #define SIO0STS (volatile unsigned short *)(0xa0efd000 + 14) | 53 | #define SIO0STS (volatile unsigned short *)(0xa0efd000 + 14) |
52 | #define SIO0TXB (volatile unsigned short *)(0xa0efd000 + 30) | 54 | #define SIO0TXB (volatile unsigned short *)(0xa0efd000 + 30) |
53 | #else | 55 | #else |
@@ -57,11 +59,12 @@ static void putc(char c) | |||
57 | 59 | ||
58 | static void putc(char c) | 60 | static void putc(char c) |
59 | { | 61 | { |
60 | 62 | while ((*SIO0STS & 0x1) == 0) | |
61 | while ((*SIO0STS & 0x1) == 0) ; | 63 | cpu_relax(); |
62 | if (c == '\n') { | 64 | if (c == '\n') { |
63 | *SIO0TXB = '\r'; | 65 | *SIO0TXB = '\r'; |
64 | while ((*SIO0STS & 0x1) == 0) ; | 66 | while ((*SIO0STS & 0x1) == 0) |
67 | cpu_relax(); | ||
65 | } | 68 | } |
66 | *SIO0TXB = c; | 69 | *SIO0TXB = c; |
67 | } | 70 | } |
diff --git a/arch/m32r/defconfig b/arch/m32r/defconfig index 417c95ba87e9..853093093168 100644 --- a/arch/m32r/defconfig +++ b/arch/m32r/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:10:44 2005 | 4 | # Fri Jun 3 16:20:11 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -16,6 +16,7 @@ CONFIG_EXPERIMENTAL=y | |||
16 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 18 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | 20 | ||
20 | # | 21 | # |
21 | # General setup | 22 | # General setup |
@@ -28,13 +29,15 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
29 | CONFIG_SYSCTL=y | 30 | CONFIG_SYSCTL=y |
30 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
31 | CONFIG_LOG_BUF_SHIFT=14 | ||
32 | CONFIG_HOTPLUG=y | 32 | CONFIG_HOTPLUG=y |
33 | CONFIG_KOBJECT_UEVENT=y | 33 | CONFIG_KOBJECT_UEVENT=y |
34 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
35 | # CONFIG_IKCONFIG_PROC is not set | 35 | # CONFIG_IKCONFIG_PROC is not set |
36 | CONFIG_EMBEDDED=y | 36 | CONFIG_EMBEDDED=y |
37 | # CONFIG_KALLSYMS is not set | 37 | # CONFIG_KALLSYMS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
40 | CONFIG_BASE_FULL=y | ||
38 | # CONFIG_FUTEX is not set | 41 | # CONFIG_FUTEX is not set |
39 | # CONFIG_EPOLL is not set | 42 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -44,6 +47,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
44 | CONFIG_CC_ALIGN_LOOPS=0 | 47 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 48 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 49 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | ||
47 | 51 | ||
48 | # | 52 | # |
49 | # Loadable module support | 53 | # Loadable module support |
@@ -65,6 +69,7 @@ CONFIG_PLAT_M32700UT=y | |||
65 | # CONFIG_PLAT_OPSPUT is not set | 69 | # CONFIG_PLAT_OPSPUT is not set |
66 | # CONFIG_PLAT_OAKS32R is not set | 70 | # CONFIG_PLAT_OAKS32R is not set |
67 | # CONFIG_PLAT_MAPPI2 is not set | 71 | # CONFIG_PLAT_MAPPI2 is not set |
72 | # CONFIG_PLAT_MAPPI3 is not set | ||
68 | CONFIG_CHIP_M32700=y | 73 | CONFIG_CHIP_M32700=y |
69 | # CONFIG_CHIP_M32102 is not set | 74 | # CONFIG_CHIP_M32102 is not set |
70 | # CONFIG_CHIP_VDEC2 is not set | 75 | # CONFIG_CHIP_VDEC2 is not set |
@@ -268,7 +273,6 @@ CONFIG_NET=y | |||
268 | # | 273 | # |
269 | CONFIG_PACKET=y | 274 | CONFIG_PACKET=y |
270 | # CONFIG_PACKET_MMAP is not set | 275 | # CONFIG_PACKET_MMAP is not set |
271 | # CONFIG_NETLINK_DEV is not set | ||
272 | CONFIG_UNIX=y | 276 | CONFIG_UNIX=y |
273 | # CONFIG_NET_KEY is not set | 277 | # CONFIG_NET_KEY is not set |
274 | CONFIG_INET=y | 278 | CONFIG_INET=y |
@@ -393,18 +397,6 @@ CONFIG_INPUT=y | |||
393 | # CONFIG_INPUT_EVBUG is not set | 397 | # CONFIG_INPUT_EVBUG is not set |
394 | 398 | ||
395 | # | 399 | # |
396 | # Input I/O drivers | ||
397 | # | ||
398 | # CONFIG_GAMEPORT is not set | ||
399 | CONFIG_SOUND_GAMEPORT=y | ||
400 | CONFIG_SERIO=y | ||
401 | # CONFIG_SERIO_I8042 is not set | ||
402 | CONFIG_SERIO_SERPORT=y | ||
403 | # CONFIG_SERIO_CT82C710 is not set | ||
404 | # CONFIG_SERIO_LIBPS2 is not set | ||
405 | # CONFIG_SERIO_RAW is not set | ||
406 | |||
407 | # | ||
408 | # Input Device Drivers | 400 | # Input Device Drivers |
409 | # | 401 | # |
410 | # CONFIG_INPUT_KEYBOARD is not set | 402 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -414,6 +406,17 @@ CONFIG_SERIO_SERPORT=y | |||
414 | # CONFIG_INPUT_MISC is not set | 406 | # CONFIG_INPUT_MISC is not set |
415 | 407 | ||
416 | # | 408 | # |
409 | # Hardware I/O ports | ||
410 | # | ||
411 | CONFIG_SERIO=y | ||
412 | # CONFIG_SERIO_I8042 is not set | ||
413 | CONFIG_SERIO_SERPORT=y | ||
414 | # CONFIG_SERIO_LIBPS2 is not set | ||
415 | # CONFIG_SERIO_RAW is not set | ||
416 | # CONFIG_GAMEPORT is not set | ||
417 | CONFIG_SOUND_GAMEPORT=y | ||
418 | |||
419 | # | ||
417 | # Character devices | 420 | # Character devices |
418 | # | 421 | # |
419 | CONFIG_VT=y | 422 | CONFIG_VT=y |
@@ -465,6 +468,10 @@ CONFIG_DS1302=y | |||
465 | # CONFIG_RAW_DRIVER is not set | 468 | # CONFIG_RAW_DRIVER is not set |
466 | 469 | ||
467 | # | 470 | # |
471 | # TPM devices | ||
472 | # | ||
473 | |||
474 | # | ||
468 | # I2C support | 475 | # I2C support |
469 | # | 476 | # |
470 | # CONFIG_I2C is not set | 477 | # CONFIG_I2C is not set |
@@ -508,8 +515,14 @@ CONFIG_VIDEO_M32R_AR_M64278=y | |||
508 | # Graphics support | 515 | # Graphics support |
509 | # | 516 | # |
510 | CONFIG_FB=y | 517 | CONFIG_FB=y |
518 | # CONFIG_FB_CFB_FILLRECT is not set | ||
519 | # CONFIG_FB_CFB_COPYAREA is not set | ||
520 | # CONFIG_FB_CFB_IMAGEBLIT is not set | ||
521 | # CONFIG_FB_SOFT_CURSOR is not set | ||
522 | # CONFIG_FB_MACMODES is not set | ||
511 | # CONFIG_FB_MODE_HELPERS is not set | 523 | # CONFIG_FB_MODE_HELPERS is not set |
512 | # CONFIG_FB_TILEBLITTING is not set | 524 | # CONFIG_FB_TILEBLITTING is not set |
525 | # CONFIG_FB_S1D13XXX is not set | ||
513 | # CONFIG_FB_VIRTUAL is not set | 526 | # CONFIG_FB_VIRTUAL is not set |
514 | 527 | ||
515 | # | 528 | # |
@@ -543,10 +556,6 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
543 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 556 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
544 | 557 | ||
545 | # | 558 | # |
546 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
547 | # | ||
548 | |||
549 | # | ||
550 | # USB Gadget Support | 559 | # USB Gadget Support |
551 | # | 560 | # |
552 | # CONFIG_USB_GADGET is not set | 561 | # CONFIG_USB_GADGET is not set |
@@ -719,8 +728,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
719 | # | 728 | # |
720 | # Kernel hacking | 729 | # Kernel hacking |
721 | # | 730 | # |
731 | # CONFIG_PRINTK_TIME is not set | ||
722 | # CONFIG_DEBUG_KERNEL is not set | 732 | # CONFIG_DEBUG_KERNEL is not set |
723 | CONFIG_DEBUG_PREEMPT=y | 733 | CONFIG_LOG_BUF_SHIFT=14 |
724 | # CONFIG_DEBUG_BUGVERBOSE is not set | 734 | # CONFIG_DEBUG_BUGVERBOSE is not set |
725 | # CONFIG_FRAME_POINTER is not set | 735 | # CONFIG_FRAME_POINTER is not set |
726 | 736 | ||
diff --git a/arch/m32r/kernel/Makefile b/arch/m32r/kernel/Makefile index cfd690bf6d8a..6c6b6c376638 100644 --- a/arch/m32r/kernel/Makefile +++ b/arch/m32r/kernel/Makefile | |||
@@ -10,6 +10,7 @@ obj-y := process.o entry.o traps.o align.o irq.o setup.o time.o \ | |||
10 | obj-$(CONFIG_SMP) += smp.o smpboot.o | 10 | obj-$(CONFIG_SMP) += smp.o smpboot.o |
11 | obj-$(CONFIG_PLAT_MAPPI) += setup_mappi.o io_mappi.o | 11 | obj-$(CONFIG_PLAT_MAPPI) += setup_mappi.o io_mappi.o |
12 | obj-$(CONFIG_PLAT_MAPPI2) += setup_mappi2.o io_mappi2.o | 12 | obj-$(CONFIG_PLAT_MAPPI2) += setup_mappi2.o io_mappi2.o |
13 | obj-$(CONFIG_PLAT_MAPPI3) += setup_mappi3.o io_mappi3.o | ||
13 | obj-$(CONFIG_PLAT_USRV) += setup_usrv.o io_usrv.o | 14 | obj-$(CONFIG_PLAT_USRV) += setup_usrv.o io_usrv.o |
14 | obj-$(CONFIG_PLAT_M32700UT) += setup_m32700ut.o io_m32700ut.o | 15 | obj-$(CONFIG_PLAT_M32700UT) += setup_m32700ut.o io_m32700ut.o |
15 | obj-$(CONFIG_PLAT_OPSPUT) += setup_opsput.o io_opsput.o | 16 | obj-$(CONFIG_PLAT_OPSPUT) += setup_opsput.o io_opsput.o |
@@ -17,4 +18,3 @@ obj-$(CONFIG_MODULES) += module.o | |||
17 | obj-$(CONFIG_PLAT_OAKS32R) += setup_oaks32r.o io_oaks32r.o | 18 | obj-$(CONFIG_PLAT_OAKS32R) += setup_oaks32r.o io_oaks32r.o |
18 | 19 | ||
19 | EXTRA_AFLAGS := -traditional | 20 | EXTRA_AFLAGS := -traditional |
20 | |||
diff --git a/arch/m32r/kernel/io_m32700ut.c b/arch/m32r/kernel/io_m32700ut.c index 371ba904e968..e545b065f7e9 100644 --- a/arch/m32r/kernel/io_m32700ut.c +++ b/arch/m32r/kernel/io_m32700ut.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Typical I/O routines for M32700UT board. | 4 | * Typical I/O routines for M32700UT board. |
5 | * | 5 | * |
6 | * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, | 6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
7 | * Hitoshi Yamamoto, Takeo Takahashi | 7 | * Hitoshi Yamamoto, Takeo Takahashi |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General | 9 | * This file is subject to the terms and conditions of the GNU General |
10 | * Public License. See the file "COPYING" in the main directory of this | 10 | * Public License. See the file "COPYING" in the main directory of this |
@@ -172,64 +172,21 @@ unsigned long _inl(unsigned long port) | |||
172 | 172 | ||
173 | unsigned char _inb_p(unsigned long port) | 173 | unsigned char _inb_p(unsigned long port) |
174 | { | 174 | { |
175 | unsigned char v; | 175 | unsigned char v = _inb(port); |
176 | |||
177 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
178 | v = _ne_inb(PORT2ADDR_NE(port)); | ||
179 | else | ||
180 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
181 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
182 | return *(volatile unsigned char *)__port2addr_ata(port); | ||
183 | } else | ||
184 | #endif | ||
185 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
186 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
187 | unsigned char b; | ||
188 | pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); | ||
189 | return b; | ||
190 | } else | ||
191 | #endif | ||
192 | v = *(volatile unsigned char *)PORT2ADDR(port); | ||
193 | |||
194 | delay(); | 176 | delay(); |
195 | return (v); | 177 | return (v); |
196 | } | 178 | } |
197 | 179 | ||
198 | unsigned short _inw_p(unsigned long port) | 180 | unsigned short _inw_p(unsigned long port) |
199 | { | 181 | { |
200 | unsigned short v; | 182 | unsigned short v = _inw(port); |
201 | |||
202 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
203 | v = _ne_inw(PORT2ADDR_NE(port)); | ||
204 | else | ||
205 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
206 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
207 | return *(volatile unsigned short *)__port2addr_ata(port); | ||
208 | } else | ||
209 | #endif | ||
210 | #if defined(CONFIG_USB) | ||
211 | if(port >= 0x340 && port < 0x3a0) | ||
212 | return *(volatile unsigned short *)PORT2ADDR_USB(port); | ||
213 | else | ||
214 | #endif | ||
215 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
216 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
217 | unsigned short w; | ||
218 | pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); | ||
219 | return w; | ||
220 | } else | ||
221 | #endif | ||
222 | v = *(volatile unsigned short *)PORT2ADDR(port); | ||
223 | |||
224 | delay(); | 183 | delay(); |
225 | return (v); | 184 | return (v); |
226 | } | 185 | } |
227 | 186 | ||
228 | unsigned long _inl_p(unsigned long port) | 187 | unsigned long _inl_p(unsigned long port) |
229 | { | 188 | { |
230 | unsigned long v; | 189 | unsigned long v = _inl(port); |
231 | |||
232 | v = *(volatile unsigned long *)PORT2ADDR(port); | ||
233 | delay(); | 190 | delay(); |
234 | return (v); | 191 | return (v); |
235 | } | 192 | } |
@@ -287,52 +244,19 @@ void _outl(unsigned long l, unsigned long port) | |||
287 | 244 | ||
288 | void _outb_p(unsigned char b, unsigned long port) | 245 | void _outb_p(unsigned char b, unsigned long port) |
289 | { | 246 | { |
290 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 247 | _outb(b, port); |
291 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
292 | else | ||
293 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
294 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
295 | *(volatile unsigned char *)__port2addr_ata(port) = b; | ||
296 | } else | ||
297 | #endif | ||
298 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
299 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
300 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); | ||
301 | } else | ||
302 | #endif | ||
303 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
304 | |||
305 | delay(); | 248 | delay(); |
306 | } | 249 | } |
307 | 250 | ||
308 | void _outw_p(unsigned short w, unsigned long port) | 251 | void _outw_p(unsigned short w, unsigned long port) |
309 | { | 252 | { |
310 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 253 | _outw(w, port); |
311 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
312 | else | ||
313 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
314 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
315 | *(volatile unsigned short *)__port2addr_ata(port) = w; | ||
316 | } else | ||
317 | #endif | ||
318 | #if defined(CONFIG_USB) | ||
319 | if(port >= 0x340 && port < 0x3a0) | ||
320 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; | ||
321 | else | ||
322 | #endif | ||
323 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
324 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
325 | pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); | ||
326 | } else | ||
327 | #endif | ||
328 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
329 | |||
330 | delay(); | 254 | delay(); |
331 | } | 255 | } |
332 | 256 | ||
333 | void _outl_p(unsigned long l, unsigned long port) | 257 | void _outl_p(unsigned long l, unsigned long port) |
334 | { | 258 | { |
335 | *(volatile unsigned long *)PORT2ADDR(port) = l; | 259 | _outl(l, port); |
336 | delay(); | 260 | delay(); |
337 | } | 261 | } |
338 | 262 | ||
diff --git a/arch/m32r/kernel/io_mappi.c b/arch/m32r/kernel/io_mappi.c index 85688ffb52f9..78033165fb5c 100644 --- a/arch/m32r/kernel/io_mappi.c +++ b/arch/m32r/kernel/io_mappi.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Typical I/O routines for Mappi board. | 4 | * Typical I/O routines for Mappi board. |
5 | * | 5 | * |
6 | * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, | 6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
7 | * Hitoshi Yamamoto | 7 | * Hitoshi Yamamoto |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
@@ -130,57 +130,21 @@ unsigned long _inl(unsigned long port) | |||
130 | 130 | ||
131 | unsigned char _inb_p(unsigned long port) | 131 | unsigned char _inb_p(unsigned long port) |
132 | { | 132 | { |
133 | unsigned char v; | 133 | unsigned char v = _inb(port); |
134 | |||
135 | if (port >= 0x300 && port < 0x320) | ||
136 | v = _ne_inb(PORT2ADDR_NE(port)); | ||
137 | else | ||
138 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) | ||
139 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
140 | unsigned char b; | ||
141 | pcc_ioread(0, port, &b, sizeof(b), 1, 0); | ||
142 | return b; | ||
143 | } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { | ||
144 | unsigned char b; | ||
145 | pcc_ioread(1, port, &b, sizeof(b), 1, 0); | ||
146 | return b; | ||
147 | } else | ||
148 | #endif | ||
149 | v = *(volatile unsigned char *)PORT2ADDR(port); | ||
150 | |||
151 | delay(); | 134 | delay(); |
152 | return (v); | 135 | return (v); |
153 | } | 136 | } |
154 | 137 | ||
155 | unsigned short _inw_p(unsigned long port) | 138 | unsigned short _inw_p(unsigned long port) |
156 | { | 139 | { |
157 | unsigned short v; | 140 | unsigned short v = _inw(port); |
158 | |||
159 | if (port >= 0x300 && port < 0x320) | ||
160 | v = _ne_inw(PORT2ADDR_NE(port)); | ||
161 | else | ||
162 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) | ||
163 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
164 | unsigned short w; | ||
165 | pcc_ioread(0, port, &w, sizeof(w), 1, 0); | ||
166 | return w; | ||
167 | } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { | ||
168 | unsigned short w; | ||
169 | pcc_ioread(1, port, &w, sizeof(w), 1, 0); | ||
170 | return w; | ||
171 | } else | ||
172 | #endif | ||
173 | v = *(volatile unsigned short *)PORT2ADDR(port); | ||
174 | |||
175 | delay(); | 141 | delay(); |
176 | return (v); | 142 | return (v); |
177 | } | 143 | } |
178 | 144 | ||
179 | unsigned long _inl_p(unsigned long port) | 145 | unsigned long _inl_p(unsigned long port) |
180 | { | 146 | { |
181 | unsigned long v; | 147 | unsigned long v = _inl(port); |
182 | |||
183 | v = *(volatile unsigned long *)PORT2ADDR(port); | ||
184 | delay(); | 148 | delay(); |
185 | return (v); | 149 | return (v); |
186 | } | 150 | } |
@@ -229,41 +193,19 @@ void _outl(unsigned long l, unsigned long port) | |||
229 | 193 | ||
230 | void _outb_p(unsigned char b, unsigned long port) | 194 | void _outb_p(unsigned char b, unsigned long port) |
231 | { | 195 | { |
232 | if (port >= 0x300 && port < 0x320) | 196 | _outb(b, port); |
233 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
234 | else | ||
235 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) | ||
236 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
237 | pcc_iowrite(0, port, &b, sizeof(b), 1, 0); | ||
238 | } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { | ||
239 | pcc_iowrite(1, port, &b, sizeof(b), 1, 0); | ||
240 | } else | ||
241 | #endif | ||
242 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
243 | |||
244 | delay(); | 197 | delay(); |
245 | } | 198 | } |
246 | 199 | ||
247 | void _outw_p(unsigned short w, unsigned long port) | 200 | void _outw_p(unsigned short w, unsigned long port) |
248 | { | 201 | { |
249 | if (port >= 0x300 && port < 0x320) | 202 | _outw(w, port); |
250 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
251 | else | ||
252 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) | ||
253 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
254 | pcc_iowrite(0, port, &w, sizeof(w), 1, 0); | ||
255 | } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { | ||
256 | pcc_iowrite(1, port, &w, sizeof(w), 1, 0); | ||
257 | } else | ||
258 | #endif | ||
259 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
260 | |||
261 | delay(); | 203 | delay(); |
262 | } | 204 | } |
263 | 205 | ||
264 | void _outl_p(unsigned long l, unsigned long port) | 206 | void _outl_p(unsigned long l, unsigned long port) |
265 | { | 207 | { |
266 | *(volatile unsigned long *)PORT2ADDR(port) = l; | 208 | _outl(l, port); |
267 | delay(); | 209 | delay(); |
268 | } | 210 | } |
269 | 211 | ||
diff --git a/arch/m32r/kernel/io_mappi2.c b/arch/m32r/kernel/io_mappi2.c index 4182cd4f97c8..5c03504bf653 100644 --- a/arch/m32r/kernel/io_mappi2.c +++ b/arch/m32r/kernel/io_mappi2.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Typical I/O routines for Mappi2 board. | 4 | * Typical I/O routines for Mappi2 board. |
5 | * | 5 | * |
6 | * Copyright (c) 2001-2003 Hiroyuki Kondo, Hirokazu Takata, | 6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
7 | * Hitoshi Yamamoto, Mamoru Sakugawa | 7 | * Hitoshi Yamamoto, Mamoru Sakugawa |
8 | */ | 8 | */ |
9 | 9 | ||
@@ -25,7 +25,7 @@ extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int); | |||
25 | extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int); | 25 | extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int); |
26 | extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); | 26 | extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); |
27 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | 27 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); |
28 | #endif /* CONFIG_PCMCIA && CONFIG_MAPPI2_CFC */ | 28 | #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ |
29 | 29 | ||
30 | #define PORT2ADDR(port) _port2addr(port) | 30 | #define PORT2ADDR(port) _port2addr(port) |
31 | #define PORT2ADDR_NE(port) _port2addr_ne(port) | 31 | #define PORT2ADDR_NE(port) _port2addr_ne(port) |
@@ -169,64 +169,21 @@ unsigned long _inl(unsigned long port) | |||
169 | 169 | ||
170 | unsigned char _inb_p(unsigned long port) | 170 | unsigned char _inb_p(unsigned long port) |
171 | { | 171 | { |
172 | unsigned char v; | 172 | unsigned char v = _inb(port); |
173 | |||
174 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
175 | v = _ne_inb(PORT2ADDR_NE(port)); | ||
176 | else | ||
177 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
178 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
179 | return *(volatile unsigned char *)__port2addr_ata(port); | ||
180 | } else | ||
181 | #endif | ||
182 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
183 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
184 | unsigned char b; | ||
185 | pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); | ||
186 | return b; | ||
187 | } else | ||
188 | #endif | ||
189 | v = *(volatile unsigned char *)PORT2ADDR(port); | ||
190 | |||
191 | delay(); | 173 | delay(); |
192 | return (v); | 174 | return (v); |
193 | } | 175 | } |
194 | 176 | ||
195 | unsigned short _inw_p(unsigned long port) | 177 | unsigned short _inw_p(unsigned long port) |
196 | { | 178 | { |
197 | unsigned short v; | 179 | unsigned short v = _inw(port); |
198 | |||
199 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
200 | v = _ne_inw(PORT2ADDR_NE(port)); | ||
201 | else | ||
202 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
203 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
204 | return *(volatile unsigned short *)__port2addr_ata(port); | ||
205 | } else | ||
206 | #endif | ||
207 | #if defined(CONFIG_USB) | ||
208 | if (port >= 0x340 && port < 0x3a0) | ||
209 | v = *(volatile unsigned short *)PORT2ADDR_USB(port); | ||
210 | else | ||
211 | #endif | ||
212 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
213 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
214 | unsigned short w; | ||
215 | pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); | ||
216 | return w; | ||
217 | } else | ||
218 | #endif | ||
219 | v = *(volatile unsigned short *)PORT2ADDR(port); | ||
220 | |||
221 | delay(); | 180 | delay(); |
222 | return (v); | 181 | return (v); |
223 | } | 182 | } |
224 | 183 | ||
225 | unsigned long _inl_p(unsigned long port) | 184 | unsigned long _inl_p(unsigned long port) |
226 | { | 185 | { |
227 | unsigned long v; | 186 | unsigned long v = _inl(port); |
228 | |||
229 | v = *(volatile unsigned long *)PORT2ADDR(port); | ||
230 | delay(); | 187 | delay(); |
231 | return (v); | 188 | return (v); |
232 | } | 189 | } |
@@ -284,52 +241,19 @@ void _outl(unsigned long l, unsigned long port) | |||
284 | 241 | ||
285 | void _outb_p(unsigned char b, unsigned long port) | 242 | void _outb_p(unsigned char b, unsigned long port) |
286 | { | 243 | { |
287 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 244 | _outb(b, port); |
288 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
289 | else | ||
290 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
291 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
292 | *(volatile unsigned char *)__port2addr_ata(port) = b; | ||
293 | } else | ||
294 | #endif | ||
295 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
296 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
297 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); | ||
298 | } else | ||
299 | #endif | ||
300 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
301 | |||
302 | delay(); | 245 | delay(); |
303 | } | 246 | } |
304 | 247 | ||
305 | void _outw_p(unsigned short w, unsigned long port) | 248 | void _outw_p(unsigned short w, unsigned long port) |
306 | { | 249 | { |
307 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 250 | _outw(w, port); |
308 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
309 | else | ||
310 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
311 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
312 | *(volatile unsigned short *)__port2addr_ata(port) = w; | ||
313 | } else | ||
314 | #endif | ||
315 | #if defined(CONFIG_USB) | ||
316 | if (port >= 0x340 && port < 0x3a0) | ||
317 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; | ||
318 | else | ||
319 | #endif | ||
320 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
321 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
322 | pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); | ||
323 | } else | ||
324 | #endif | ||
325 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
326 | |||
327 | delay(); | 251 | delay(); |
328 | } | 252 | } |
329 | 253 | ||
330 | void _outl_p(unsigned long l, unsigned long port) | 254 | void _outl_p(unsigned long l, unsigned long port) |
331 | { | 255 | { |
332 | *(volatile unsigned long *)PORT2ADDR(port) = l; | 256 | _outl(l, port); |
333 | delay(); | 257 | delay(); |
334 | } | 258 | } |
335 | 259 | ||
diff --git a/arch/m32r/kernel/io_mappi3.c b/arch/m32r/kernel/io_mappi3.c new file mode 100644 index 000000000000..c80bde657854 --- /dev/null +++ b/arch/m32r/kernel/io_mappi3.c | |||
@@ -0,0 +1,378 @@ | |||
1 | /* | ||
2 | * linux/arch/m32r/kernel/io_mappi3.c | ||
3 | * | ||
4 | * Typical I/O routines for Mappi3 board. | ||
5 | * | ||
6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, | ||
7 | * Hitoshi Yamamoto, Mamoru Sakugawa | ||
8 | */ | ||
9 | |||
10 | #include <linux/config.h> | ||
11 | #include <asm/m32r.h> | ||
12 | #include <asm/page.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <asm/byteorder.h> | ||
15 | |||
16 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
17 | #include <linux/types.h> | ||
18 | |||
19 | #define M32R_PCC_IOMAP_SIZE 0x1000 | ||
20 | |||
21 | #define M32R_PCC_IOSTART0 0x1000 | ||
22 | #define M32R_PCC_IOEND0 (M32R_PCC_IOSTART0 + M32R_PCC_IOMAP_SIZE - 1) | ||
23 | |||
24 | extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int); | ||
25 | extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int); | ||
26 | extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); | ||
27 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | ||
28 | #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ | ||
29 | |||
30 | #define PORT2ADDR(port) _port2addr(port) | ||
31 | #define PORT2ADDR_NE(port) _port2addr_ne(port) | ||
32 | #define PORT2ADDR_USB(port) _port2addr_usb(port) | ||
33 | |||
34 | static inline void *_port2addr(unsigned long port) | ||
35 | { | ||
36 | return (void *)(port + NONCACHE_OFFSET); | ||
37 | } | ||
38 | |||
39 | #define LAN_IOSTART 0x300 | ||
40 | #define LAN_IOEND 0x320 | ||
41 | |||
42 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
43 | static inline void *__port2addr_ata(unsigned long port) | ||
44 | { | ||
45 | static int dummy_reg; | ||
46 | |||
47 | switch (port) { | ||
48 | case 0x1f0: return (void *)0xb4002000; | ||
49 | case 0x1f1: return (void *)0xb4012800; | ||
50 | case 0x1f2: return (void *)0xb4012002; | ||
51 | case 0x1f3: return (void *)0xb4012802; | ||
52 | case 0x1f4: return (void *)0xb4012004; | ||
53 | case 0x1f5: return (void *)0xb4012804; | ||
54 | case 0x1f6: return (void *)0xb4012006; | ||
55 | case 0x1f7: return (void *)0xb4012806; | ||
56 | case 0x3f6: return (void *)0xb401200e; | ||
57 | default: return (void *)&dummy_reg; | ||
58 | } | ||
59 | } | ||
60 | #endif | ||
61 | |||
62 | static inline void *_port2addr_ne(unsigned long port) | ||
63 | { | ||
64 | return (void *)(port + NONCACHE_OFFSET + 0x10000000); | ||
65 | } | ||
66 | |||
67 | static inline void *_port2addr_usb(unsigned long port) | ||
68 | { | ||
69 | return (void *)(port + NONCACHE_OFFSET + 0x12000000); | ||
70 | } | ||
71 | static inline void delay(void) | ||
72 | { | ||
73 | __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); | ||
74 | } | ||
75 | |||
76 | /* | ||
77 | * NIC I/O function | ||
78 | */ | ||
79 | |||
80 | static inline unsigned char _ne_inb(void *portp) | ||
81 | { | ||
82 | return (unsigned char) *(volatile unsigned char *)portp; | ||
83 | } | ||
84 | |||
85 | static inline unsigned short _ne_inw(void *portp) | ||
86 | { | ||
87 | return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp); | ||
88 | } | ||
89 | |||
90 | static inline void _ne_insb(void *portp, void * addr, unsigned long count) | ||
91 | { | ||
92 | unsigned char *buf = addr; | ||
93 | |||
94 | while (count--) | ||
95 | *buf++ = *(volatile unsigned char *)portp; | ||
96 | } | ||
97 | |||
98 | static inline void _ne_outb(unsigned char b, void *portp) | ||
99 | { | ||
100 | *(volatile unsigned char *)portp = (unsigned char)b; | ||
101 | } | ||
102 | |||
103 | static inline void _ne_outw(unsigned short w, void *portp) | ||
104 | { | ||
105 | *(volatile unsigned short *)portp = cpu_to_le16(w); | ||
106 | } | ||
107 | |||
108 | unsigned char _inb(unsigned long port) | ||
109 | { | ||
110 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
111 | return _ne_inb(PORT2ADDR_NE(port)); | ||
112 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
113 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
114 | return *(volatile unsigned char *)__port2addr_ata(port); | ||
115 | } | ||
116 | #endif | ||
117 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
118 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
119 | unsigned char b; | ||
120 | pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); | ||
121 | return b; | ||
122 | } else | ||
123 | #endif | ||
124 | return *(volatile unsigned char *)PORT2ADDR(port); | ||
125 | } | ||
126 | |||
127 | unsigned short _inw(unsigned long port) | ||
128 | { | ||
129 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
130 | return _ne_inw(PORT2ADDR_NE(port)); | ||
131 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
132 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
133 | return *(volatile unsigned short *)__port2addr_ata(port); | ||
134 | } | ||
135 | #endif | ||
136 | #if defined(CONFIG_USB) | ||
137 | else if (port >= 0x340 && port < 0x3a0) | ||
138 | return *(volatile unsigned short *)PORT2ADDR_USB(port); | ||
139 | #endif | ||
140 | |||
141 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
142 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
143 | unsigned short w; | ||
144 | pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); | ||
145 | return w; | ||
146 | } else | ||
147 | #endif | ||
148 | return *(volatile unsigned short *)PORT2ADDR(port); | ||
149 | } | ||
150 | |||
151 | unsigned long _inl(unsigned long port) | ||
152 | { | ||
153 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
154 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
155 | unsigned long l; | ||
156 | pcc_ioread_word(0, port, &l, sizeof(l), 1, 0); | ||
157 | return l; | ||
158 | } else | ||
159 | #endif | ||
160 | return *(volatile unsigned long *)PORT2ADDR(port); | ||
161 | } | ||
162 | |||
163 | unsigned char _inb_p(unsigned long port) | ||
164 | { | ||
165 | unsigned char v = _inb(port); | ||
166 | delay(); | ||
167 | return (v); | ||
168 | } | ||
169 | |||
170 | unsigned short _inw_p(unsigned long port) | ||
171 | { | ||
172 | unsigned short v = _inw(port); | ||
173 | delay(); | ||
174 | return (v); | ||
175 | } | ||
176 | |||
177 | unsigned long _inl_p(unsigned long port) | ||
178 | { | ||
179 | unsigned long v = _inl(port); | ||
180 | delay(); | ||
181 | return (v); | ||
182 | } | ||
183 | |||
184 | void _outb(unsigned char b, unsigned long port) | ||
185 | { | ||
186 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
187 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
188 | else | ||
189 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
190 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
191 | *(volatile unsigned char *)__port2addr_ata(port) = b; | ||
192 | } else | ||
193 | #endif | ||
194 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
195 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
196 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); | ||
197 | } else | ||
198 | #endif | ||
199 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
200 | } | ||
201 | |||
202 | void _outw(unsigned short w, unsigned long port) | ||
203 | { | ||
204 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
205 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
206 | else | ||
207 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
208 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
209 | *(volatile unsigned short *)__port2addr_ata(port) = w; | ||
210 | } else | ||
211 | #endif | ||
212 | #if defined(CONFIG_USB) | ||
213 | if (port >= 0x340 && port < 0x3a0) | ||
214 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; | ||
215 | else | ||
216 | #endif | ||
217 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
218 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
219 | pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); | ||
220 | } else | ||
221 | #endif | ||
222 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
223 | } | ||
224 | |||
225 | void _outl(unsigned long l, unsigned long port) | ||
226 | { | ||
227 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
228 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
229 | pcc_iowrite_word(0, port, &l, sizeof(l), 1, 0); | ||
230 | } else | ||
231 | #endif | ||
232 | *(volatile unsigned long *)PORT2ADDR(port) = l; | ||
233 | } | ||
234 | |||
235 | void _outb_p(unsigned char b, unsigned long port) | ||
236 | { | ||
237 | _outb(b, port); | ||
238 | delay(); | ||
239 | } | ||
240 | |||
241 | void _outw_p(unsigned short w, unsigned long port) | ||
242 | { | ||
243 | _outw(w, port); | ||
244 | delay(); | ||
245 | } | ||
246 | |||
247 | void _outl_p(unsigned long l, unsigned long port) | ||
248 | { | ||
249 | _outl(l, port); | ||
250 | delay(); | ||
251 | } | ||
252 | |||
253 | void _insb(unsigned int port, void * addr, unsigned long count) | ||
254 | { | ||
255 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
256 | _ne_insb(PORT2ADDR_NE(port), addr, count); | ||
257 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
258 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
259 | unsigned char *buf = addr; | ||
260 | unsigned char *portp = __port2addr_ata(port); | ||
261 | while (count--) | ||
262 | *buf++ = *(volatile unsigned char *)portp; | ||
263 | } | ||
264 | #endif | ||
265 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
266 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
267 | pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), | ||
268 | count, 1); | ||
269 | } | ||
270 | #endif | ||
271 | else { | ||
272 | unsigned char *buf = addr; | ||
273 | unsigned char *portp = PORT2ADDR(port); | ||
274 | while (count--) | ||
275 | *buf++ = *(volatile unsigned char *)portp; | ||
276 | } | ||
277 | } | ||
278 | |||
279 | void _insw(unsigned int port, void * addr, unsigned long count) | ||
280 | { | ||
281 | unsigned short *buf = addr; | ||
282 | unsigned short *portp; | ||
283 | |||
284 | if (port >= LAN_IOSTART && port < LAN_IOEND) { | ||
285 | portp = PORT2ADDR_NE(port); | ||
286 | while (count--) | ||
287 | *buf++ = *(volatile unsigned short *)portp; | ||
288 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
289 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
290 | pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), | ||
291 | count, 1); | ||
292 | #endif | ||
293 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
294 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
295 | portp = __port2addr_ata(port); | ||
296 | while (count--) | ||
297 | *buf++ = *(volatile unsigned short *)portp; | ||
298 | #endif | ||
299 | } else { | ||
300 | portp = PORT2ADDR(port); | ||
301 | while (count--) | ||
302 | *buf++ = *(volatile unsigned short *)portp; | ||
303 | } | ||
304 | } | ||
305 | |||
306 | void _insl(unsigned int port, void * addr, unsigned long count) | ||
307 | { | ||
308 | unsigned long *buf = addr; | ||
309 | unsigned long *portp; | ||
310 | |||
311 | portp = PORT2ADDR(port); | ||
312 | while (count--) | ||
313 | *buf++ = *(volatile unsigned long *)portp; | ||
314 | } | ||
315 | |||
316 | void _outsb(unsigned int port, const void * addr, unsigned long count) | ||
317 | { | ||
318 | const unsigned char *buf = addr; | ||
319 | unsigned char *portp; | ||
320 | |||
321 | if (port >= LAN_IOSTART && port < LAN_IOEND) { | ||
322 | portp = PORT2ADDR_NE(port); | ||
323 | while (count--) | ||
324 | _ne_outb(*buf++, portp); | ||
325 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
326 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
327 | portp = __port2addr_ata(port); | ||
328 | while (count--) | ||
329 | *(volatile unsigned char *)portp = *buf++; | ||
330 | #endif | ||
331 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
332 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
333 | pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), | ||
334 | count, 1); | ||
335 | #endif | ||
336 | } else { | ||
337 | portp = PORT2ADDR(port); | ||
338 | while (count--) | ||
339 | *(volatile unsigned char *)portp = *buf++; | ||
340 | } | ||
341 | } | ||
342 | |||
343 | void _outsw(unsigned int port, const void * addr, unsigned long count) | ||
344 | { | ||
345 | const unsigned short *buf = addr; | ||
346 | unsigned short *portp; | ||
347 | |||
348 | if (port >= LAN_IOSTART && port < LAN_IOEND) { | ||
349 | portp = PORT2ADDR_NE(port); | ||
350 | while (count--) | ||
351 | *(volatile unsigned short *)portp = *buf++; | ||
352 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
353 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
354 | portp = __port2addr_ata(port); | ||
355 | while (count--) | ||
356 | *(volatile unsigned short *)portp = *buf++; | ||
357 | #endif | ||
358 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
359 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
360 | pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), | ||
361 | count, 1); | ||
362 | #endif | ||
363 | } else { | ||
364 | portp = PORT2ADDR(port); | ||
365 | while (count--) | ||
366 | *(volatile unsigned short *)portp = *buf++; | ||
367 | } | ||
368 | } | ||
369 | |||
370 | void _outsl(unsigned int port, const void * addr, unsigned long count) | ||
371 | { | ||
372 | const unsigned long *buf = addr; | ||
373 | unsigned char *portp; | ||
374 | |||
375 | portp = PORT2ADDR(port); | ||
376 | while (count--) | ||
377 | *(volatile unsigned long *)portp = *buf++; | ||
378 | } | ||
diff --git a/arch/m32r/kernel/io_oaks32r.c b/arch/m32r/kernel/io_oaks32r.c index 286964794d51..9997dddd24d7 100644 --- a/arch/m32r/kernel/io_oaks32r.c +++ b/arch/m32r/kernel/io_oaks32r.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Typical I/O routines for OAKS32R board. | 4 | * Typical I/O routines for OAKS32R board. |
5 | * | 5 | * |
6 | * Copyright (c) 2001-2004 Hiroyuki Kondo, Hirokazu Takata, | 6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
7 | * Hitoshi Yamamoto, Mamoru Sakugawa | 7 | * Hitoshi Yamamoto, Mamoru Sakugawa |
8 | */ | 8 | */ |
9 | 9 | ||
@@ -90,35 +90,21 @@ unsigned long _inl(unsigned long port) | |||
90 | 90 | ||
91 | unsigned char _inb_p(unsigned long port) | 91 | unsigned char _inb_p(unsigned long port) |
92 | { | 92 | { |
93 | unsigned char v; | 93 | unsigned char v = _inb(port); |
94 | |||
95 | if (port >= 0x300 && port < 0x320) | ||
96 | v = _ne_inb(PORT2ADDR_NE(port)); | ||
97 | else | ||
98 | v = *(volatile unsigned char *)PORT2ADDR(port); | ||
99 | |||
100 | delay(); | 94 | delay(); |
101 | return (v); | 95 | return (v); |
102 | } | 96 | } |
103 | 97 | ||
104 | unsigned short _inw_p(unsigned long port) | 98 | unsigned short _inw_p(unsigned long port) |
105 | { | 99 | { |
106 | unsigned short v; | 100 | unsigned short v = _inw(port); |
107 | |||
108 | if (port >= 0x300 && port < 0x320) | ||
109 | v = _ne_inw(PORT2ADDR_NE(port)); | ||
110 | else | ||
111 | v = *(volatile unsigned short *)PORT2ADDR(port); | ||
112 | |||
113 | delay(); | 101 | delay(); |
114 | return (v); | 102 | return (v); |
115 | } | 103 | } |
116 | 104 | ||
117 | unsigned long _inl_p(unsigned long port) | 105 | unsigned long _inl_p(unsigned long port) |
118 | { | 106 | { |
119 | unsigned long v; | 107 | unsigned long v = _inl(port); |
120 | |||
121 | v = *(volatile unsigned long *)PORT2ADDR(port); | ||
122 | delay(); | 108 | delay(); |
123 | return (v); | 109 | return (v); |
124 | } | 110 | } |
@@ -146,27 +132,19 @@ void _outl(unsigned long l, unsigned long port) | |||
146 | 132 | ||
147 | void _outb_p(unsigned char b, unsigned long port) | 133 | void _outb_p(unsigned char b, unsigned long port) |
148 | { | 134 | { |
149 | if (port >= 0x300 && port < 0x320) | 135 | _outb(b, port); |
150 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
151 | else | ||
152 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
153 | |||
154 | delay(); | 136 | delay(); |
155 | } | 137 | } |
156 | 138 | ||
157 | void _outw_p(unsigned short w, unsigned long port) | 139 | void _outw_p(unsigned short w, unsigned long port) |
158 | { | 140 | { |
159 | if (port >= 0x300 && port < 0x320) | 141 | _outw(w, port); |
160 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
161 | else | ||
162 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
163 | |||
164 | delay(); | 142 | delay(); |
165 | } | 143 | } |
166 | 144 | ||
167 | void _outl_p(unsigned long l, unsigned long port) | 145 | void _outl_p(unsigned long l, unsigned long port) |
168 | { | 146 | { |
169 | *(volatile unsigned long *)PORT2ADDR(port) = l; | 147 | _outl(l, port); |
170 | delay(); | 148 | delay(); |
171 | } | 149 | } |
172 | 150 | ||
diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c index aaf42f9f76da..e34951e8156f 100644 --- a/arch/m32r/kernel/io_opsput.c +++ b/arch/m32r/kernel/io_opsput.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/m32r/kernel/io_mappi.c | 2 | * linux/arch/m32r/kernel/io_opsput.c |
3 | * | 3 | * |
4 | * Typical I/O routines for OPSPUT board. | 4 | * Typical I/O routines for OPSPUT board. |
5 | * | 5 | * |
6 | * Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, | 6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
7 | * Hitoshi Yamamoto, Takeo Takahashi | 7 | * Hitoshi Yamamoto, Takeo Takahashi |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General | 9 | * This file is subject to the terms and conditions of the GNU General |
10 | * Public License. See the file "COPYING" in the main directory of this | 10 | * Public License. See the file "COPYING" in the main directory of this |
@@ -98,7 +98,6 @@ unsigned char _inb(unsigned long port) | |||
98 | { | 98 | { |
99 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 99 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
100 | return _ne_inb(PORT2ADDR_NE(port)); | 100 | return _ne_inb(PORT2ADDR_NE(port)); |
101 | |||
102 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 101 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
103 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 102 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
104 | unsigned char b; | 103 | unsigned char b; |
@@ -118,7 +117,6 @@ unsigned short _inw(unsigned long port) | |||
118 | else if(port >= 0x340 && port < 0x3a0) | 117 | else if(port >= 0x340 && port < 0x3a0) |
119 | return *(volatile unsigned short *)PORT2ADDR_USB(port); | 118 | return *(volatile unsigned short *)PORT2ADDR_USB(port); |
120 | #endif | 119 | #endif |
121 | |||
122 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 120 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
123 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 121 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
124 | unsigned short w; | 122 | unsigned short w; |
@@ -143,55 +141,21 @@ unsigned long _inl(unsigned long port) | |||
143 | 141 | ||
144 | unsigned char _inb_p(unsigned long port) | 142 | unsigned char _inb_p(unsigned long port) |
145 | { | 143 | { |
146 | unsigned char v; | 144 | unsigned char v = _inb(port); |
147 | |||
148 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
149 | v = _ne_inb(PORT2ADDR_NE(port)); | ||
150 | else | ||
151 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
152 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
153 | unsigned char b; | ||
154 | pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); | ||
155 | return b; | ||
156 | } else | ||
157 | #endif | ||
158 | v = *(volatile unsigned char *)PORT2ADDR(port); | ||
159 | |||
160 | delay(); | 145 | delay(); |
161 | return (v); | 146 | return (v); |
162 | } | 147 | } |
163 | 148 | ||
164 | unsigned short _inw_p(unsigned long port) | 149 | unsigned short _inw_p(unsigned long port) |
165 | { | 150 | { |
166 | unsigned short v; | 151 | unsigned short v = _inw(port); |
167 | |||
168 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
169 | v = _ne_inw(PORT2ADDR_NE(port)); | ||
170 | else | ||
171 | #if defined(CONFIG_USB) | ||
172 | if(port >= 0x340 && port < 0x3a0) | ||
173 | return *(volatile unsigned short *)PORT2ADDR_USB(port); | ||
174 | else | ||
175 | #endif | ||
176 | |||
177 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
178 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
179 | unsigned short w; | ||
180 | pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); | ||
181 | return w; | ||
182 | } else | ||
183 | #endif | ||
184 | v = *(volatile unsigned short *)PORT2ADDR(port); | ||
185 | |||
186 | delay(); | 152 | delay(); |
187 | return (v); | 153 | return (v); |
188 | } | 154 | } |
189 | 155 | ||
190 | unsigned long _inl_p(unsigned long port) | 156 | unsigned long _inl_p(unsigned long port) |
191 | { | 157 | { |
192 | unsigned long v; | 158 | unsigned long v = _inl(port); |
193 | |||
194 | v = *(volatile unsigned long *)PORT2ADDR(port); | ||
195 | delay(); | 159 | delay(); |
196 | return (v); | 160 | return (v); |
197 | } | 161 | } |
@@ -219,7 +183,6 @@ void _outw(unsigned short w, unsigned long port) | |||
219 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; | 183 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; |
220 | else | 184 | else |
221 | #endif | 185 | #endif |
222 | |||
223 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 186 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
224 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 187 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
225 | pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); | 188 | pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); |
@@ -240,43 +203,19 @@ void _outl(unsigned long l, unsigned long port) | |||
240 | 203 | ||
241 | void _outb_p(unsigned char b, unsigned long port) | 204 | void _outb_p(unsigned char b, unsigned long port) |
242 | { | 205 | { |
243 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 206 | _outb(b, port); |
244 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
245 | else | ||
246 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
247 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
248 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); | ||
249 | } else | ||
250 | #endif | ||
251 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
252 | |||
253 | delay(); | 207 | delay(); |
254 | } | 208 | } |
255 | 209 | ||
256 | void _outw_p(unsigned short w, unsigned long port) | 210 | void _outw_p(unsigned short w, unsigned long port) |
257 | { | 211 | { |
258 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 212 | _outw(w, port); |
259 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
260 | else | ||
261 | #if defined(CONFIG_USB) | ||
262 | if(port >= 0x340 && port < 0x3a0) | ||
263 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; | ||
264 | else | ||
265 | #endif | ||
266 | |||
267 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
268 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
269 | pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); | ||
270 | } else | ||
271 | #endif | ||
272 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
273 | |||
274 | delay(); | 213 | delay(); |
275 | } | 214 | } |
276 | 215 | ||
277 | void _outl_p(unsigned long l, unsigned long port) | 216 | void _outl_p(unsigned long l, unsigned long port) |
278 | { | 217 | { |
279 | *(volatile unsigned long *)PORT2ADDR(port) = l; | 218 | _outl(l, port); |
280 | delay(); | 219 | delay(); |
281 | } | 220 | } |
282 | 221 | ||
diff --git a/arch/m32r/kernel/io_usrv.c b/arch/m32r/kernel/io_usrv.c index 27928a0b99ed..9eb161dcc104 100644 --- a/arch/m32r/kernel/io_usrv.c +++ b/arch/m32r/kernel/io_usrv.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Typical I/O routines for uServer board. | 4 | * Typical I/O routines for uServer board. |
5 | * | 5 | * |
6 | * Copyright (c) 2001 - 2003 Hiroyuki Kondo, Hirokazu Takata, | 6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
7 | * Hitoshi Yamamoto, Takeo Takahashi | 7 | * Hitoshi Yamamoto, Takeo Takahashi |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General | 9 | * This file is subject to the terms and conditions of the GNU General |
10 | * Public License. See the file "COPYING" in the main directory of this | 10 | * Public License. See the file "COPYING" in the main directory of this |
@@ -39,7 +39,7 @@ extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | |||
39 | 39 | ||
40 | #define PORT2ADDR(port) _port2addr(port) | 40 | #define PORT2ADDR(port) _port2addr(port) |
41 | 41 | ||
42 | static __inline__ void *_port2addr(unsigned long port) | 42 | static inline void *_port2addr(unsigned long port) |
43 | { | 43 | { |
44 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 44 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
45 | if (port >= UART0_IOSTART && port <= UART0_IOEND) | 45 | if (port >= UART0_IOSTART && port <= UART0_IOEND) |
@@ -50,7 +50,7 @@ static __inline__ void *_port2addr(unsigned long port) | |||
50 | return (void *)(port + NONCACHE_OFFSET); | 50 | return (void *)(port + NONCACHE_OFFSET); |
51 | } | 51 | } |
52 | 52 | ||
53 | static __inline__ void delay(void) | 53 | static inline void delay(void) |
54 | { | 54 | { |
55 | __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); | 55 | __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); |
56 | } | 56 | } |
@@ -87,39 +87,22 @@ unsigned long _inl(unsigned long port) | |||
87 | 87 | ||
88 | unsigned char _inb_p(unsigned long port) | 88 | unsigned char _inb_p(unsigned long port) |
89 | { | 89 | { |
90 | unsigned char b; | 90 | unsigned char v = _inb(port); |
91 | 91 | delay(); | |
92 | if (port >= CFC_IOSTART && port <= CFC_IOEND) { | 92 | return v; |
93 | pcc_ioread_byte(0, port, &b, sizeof(b), 1, 0); | ||
94 | return b; | ||
95 | } else { | ||
96 | b = *(volatile unsigned char *)PORT2ADDR(port); | ||
97 | delay(); | ||
98 | return b; | ||
99 | } | ||
100 | } | 93 | } |
101 | 94 | ||
102 | unsigned short _inw_p(unsigned long port) | 95 | unsigned short _inw_p(unsigned long port) |
103 | { | 96 | { |
104 | unsigned short w; | 97 | unsigned short v = _inw(port); |
105 | 98 | delay(); | |
106 | if (port >= CFC_IOSTART && port <= CFC_IOEND) { | 99 | return v; |
107 | pcc_ioread_word(0, port, &w, sizeof(w), 1, 0); | ||
108 | return w; | ||
109 | } else { | ||
110 | w = *(volatile unsigned short *)PORT2ADDR(port); | ||
111 | delay(); | ||
112 | return w; | ||
113 | } | ||
114 | } | 100 | } |
115 | 101 | ||
116 | unsigned long _inl_p(unsigned long port) | 102 | unsigned long _inl_p(unsigned long port) |
117 | { | 103 | { |
118 | unsigned long v; | 104 | unsigned long v = _inl(port); |
119 | |||
120 | v = *(volatile unsigned long *)PORT2ADDR(port); | ||
121 | delay(); | 105 | delay(); |
122 | |||
123 | return v; | 106 | return v; |
124 | } | 107 | } |
125 | 108 | ||
@@ -149,25 +132,19 @@ void _outl(unsigned long l, unsigned long port) | |||
149 | 132 | ||
150 | void _outb_p(unsigned char b, unsigned long port) | 133 | void _outb_p(unsigned char b, unsigned long port) |
151 | { | 134 | { |
152 | if (port >= CFC_IOSTART && port <= CFC_IOEND) | 135 | _outb(b, port); |
153 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); | ||
154 | else | ||
155 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
156 | delay(); | 136 | delay(); |
157 | } | 137 | } |
158 | 138 | ||
159 | void _outw_p(unsigned short w, unsigned long port) | 139 | void _outw_p(unsigned short w, unsigned long port) |
160 | { | 140 | { |
161 | if (port >= CFC_IOSTART && port <= CFC_IOEND) | 141 | _outw(w, port); |
162 | pcc_iowrite_word(0, port, &w, sizeof(w), 1, 0); | ||
163 | else | ||
164 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
165 | delay(); | 142 | delay(); |
166 | } | 143 | } |
167 | 144 | ||
168 | void _outl_p(unsigned long l, unsigned long port) | 145 | void _outl_p(unsigned long l, unsigned long port) |
169 | { | 146 | { |
170 | *(volatile unsigned long *)PORT2ADDR(port) = l; | 147 | _outl(l, port); |
171 | delay(); | 148 | delay(); |
172 | } | 149 | } |
173 | 150 | ||
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index 4826cd6e40e8..ec5674727e7f 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c | |||
@@ -330,6 +330,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
330 | seq_printf(m, "Machine\t\t: Mappi Evaluation board\n"); | 330 | seq_printf(m, "Machine\t\t: Mappi Evaluation board\n"); |
331 | #elif CONFIG_PLAT_MAPPI2 | 331 | #elif CONFIG_PLAT_MAPPI2 |
332 | seq_printf(m, "Machine\t\t: Mappi-II Evaluation board\n"); | 332 | seq_printf(m, "Machine\t\t: Mappi-II Evaluation board\n"); |
333 | #elif CONFIG_PLAT_MAPPI3 | ||
334 | seq_printf(m, "Machine\t\t: Mappi-III Evaluation board\n"); | ||
333 | #elif CONFIG_PLAT_M32700UT | 335 | #elif CONFIG_PLAT_M32700UT |
334 | seq_printf(m, "Machine\t\t: M32700UT Evaluation board\n"); | 336 | seq_printf(m, "Machine\t\t: M32700UT Evaluation board\n"); |
335 | #elif CONFIG_PLAT_OPSPUT | 337 | #elif CONFIG_PLAT_OPSPUT |
diff --git a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/kernel/setup_m32700ut.c index 488aa87bab76..b014e2c1e524 100644 --- a/arch/m32r/kernel/setup_m32700ut.c +++ b/arch/m32r/kernel/setup_m32700ut.c | |||
@@ -78,13 +78,13 @@ static void shutdown_m32700ut_irq(unsigned int irq) | |||
78 | 78 | ||
79 | static struct hw_interrupt_type m32700ut_irq_type = | 79 | static struct hw_interrupt_type m32700ut_irq_type = |
80 | { | 80 | { |
81 | "M32700UT-IRQ", | 81 | .typename = "M32700UT-IRQ", |
82 | startup_m32700ut_irq, | 82 | .startup = startup_m32700ut_irq, |
83 | shutdown_m32700ut_irq, | 83 | .shutdown = shutdown_m32700ut_irq, |
84 | enable_m32700ut_irq, | 84 | .enable = enable_m32700ut_irq, |
85 | disable_m32700ut_irq, | 85 | .disable = disable_m32700ut_irq, |
86 | mask_and_ack_m32700ut, | 86 | .ack = mask_and_ack_m32700ut, |
87 | end_m32700ut_irq | 87 | .end = end_m32700ut_irq |
88 | }; | 88 | }; |
89 | 89 | ||
90 | /* | 90 | /* |
@@ -155,13 +155,13 @@ static void shutdown_m32700ut_pld_irq(unsigned int irq) | |||
155 | 155 | ||
156 | static struct hw_interrupt_type m32700ut_pld_irq_type = | 156 | static struct hw_interrupt_type m32700ut_pld_irq_type = |
157 | { | 157 | { |
158 | "M32700UT-PLD-IRQ", | 158 | .typename = "M32700UT-PLD-IRQ", |
159 | startup_m32700ut_pld_irq, | 159 | .startup = startup_m32700ut_pld_irq, |
160 | shutdown_m32700ut_pld_irq, | 160 | .shutdown = shutdown_m32700ut_pld_irq, |
161 | enable_m32700ut_pld_irq, | 161 | .enable = enable_m32700ut_pld_irq, |
162 | disable_m32700ut_pld_irq, | 162 | .disable = disable_m32700ut_pld_irq, |
163 | mask_and_ack_m32700ut_pld, | 163 | .ack = mask_and_ack_m32700ut_pld, |
164 | end_m32700ut_pld_irq | 164 | .end = end_m32700ut_pld_irq |
165 | }; | 165 | }; |
166 | 166 | ||
167 | /* | 167 | /* |
@@ -224,13 +224,13 @@ static void shutdown_m32700ut_lanpld_irq(unsigned int irq) | |||
224 | 224 | ||
225 | static struct hw_interrupt_type m32700ut_lanpld_irq_type = | 225 | static struct hw_interrupt_type m32700ut_lanpld_irq_type = |
226 | { | 226 | { |
227 | "M32700UT-PLD-LAN-IRQ", | 227 | .typename = "M32700UT-PLD-LAN-IRQ", |
228 | startup_m32700ut_lanpld_irq, | 228 | .startup = startup_m32700ut_lanpld_irq, |
229 | shutdown_m32700ut_lanpld_irq, | 229 | .shutdown = shutdown_m32700ut_lanpld_irq, |
230 | enable_m32700ut_lanpld_irq, | 230 | .enable = enable_m32700ut_lanpld_irq, |
231 | disable_m32700ut_lanpld_irq, | 231 | .disable = disable_m32700ut_lanpld_irq, |
232 | mask_and_ack_m32700ut_lanpld, | 232 | .ack = mask_and_ack_m32700ut_lanpld, |
233 | end_m32700ut_lanpld_irq | 233 | .end = end_m32700ut_lanpld_irq |
234 | }; | 234 | }; |
235 | 235 | ||
236 | /* | 236 | /* |
@@ -293,13 +293,13 @@ static void shutdown_m32700ut_lcdpld_irq(unsigned int irq) | |||
293 | 293 | ||
294 | static struct hw_interrupt_type m32700ut_lcdpld_irq_type = | 294 | static struct hw_interrupt_type m32700ut_lcdpld_irq_type = |
295 | { | 295 | { |
296 | "M32700UT-PLD-LCD-IRQ", | 296 | .typename = "M32700UT-PLD-LCD-IRQ", |
297 | startup_m32700ut_lcdpld_irq, | 297 | .startup = startup_m32700ut_lcdpld_irq, |
298 | shutdown_m32700ut_lcdpld_irq, | 298 | .shutdown = shutdown_m32700ut_lcdpld_irq, |
299 | enable_m32700ut_lcdpld_irq, | 299 | .enable = enable_m32700ut_lcdpld_irq, |
300 | disable_m32700ut_lcdpld_irq, | 300 | .disable = disable_m32700ut_lcdpld_irq, |
301 | mask_and_ack_m32700ut_lcdpld, | 301 | .ack = mask_and_ack_m32700ut_lcdpld, |
302 | end_m32700ut_lcdpld_irq | 302 | .end = end_m32700ut_lcdpld_irq |
303 | }; | 303 | }; |
304 | 304 | ||
305 | void __init init_IRQ(void) | 305 | void __init init_IRQ(void) |
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c index 1e74110f0670..aaf8e569b930 100644 --- a/arch/m32r/kernel/setup_mappi.c +++ b/arch/m32r/kernel/setup_mappi.c | |||
@@ -70,13 +70,13 @@ static void shutdown_mappi_irq(unsigned int irq) | |||
70 | 70 | ||
71 | static struct hw_interrupt_type mappi_irq_type = | 71 | static struct hw_interrupt_type mappi_irq_type = |
72 | { | 72 | { |
73 | "MAPPI-IRQ", | 73 | .typename = "MAPPI-IRQ", |
74 | startup_mappi_irq, | 74 | .startup = startup_mappi_irq, |
75 | shutdown_mappi_irq, | 75 | .shutdown = shutdown_mappi_irq, |
76 | enable_mappi_irq, | 76 | .enable = enable_mappi_irq, |
77 | disable_mappi_irq, | 77 | .disable = disable_mappi_irq, |
78 | mask_and_ack_mappi, | 78 | .ack = mask_and_ack_mappi, |
79 | end_mappi_irq | 79 | .end = end_mappi_irq |
80 | }; | 80 | }; |
81 | 81 | ||
82 | void __init init_IRQ(void) | 82 | void __init init_IRQ(void) |
diff --git a/arch/m32r/kernel/setup_mappi2.c b/arch/m32r/kernel/setup_mappi2.c index 1904d465a507..38d5e9a41427 100644 --- a/arch/m32r/kernel/setup_mappi2.c +++ b/arch/m32r/kernel/setup_mappi2.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/m32r/kernel/setup_mappi.c | 2 | * linux/arch/m32r/kernel/setup_mappi2.c |
3 | * | 3 | * |
4 | * Setup routines for Renesas MAPPI-II(M3A-ZA36) Board | 4 | * Setup routines for Renesas MAPPI-II(M3A-ZA36) Board |
5 | * | 5 | * |
@@ -79,13 +79,13 @@ static void shutdown_mappi2_irq(unsigned int irq) | |||
79 | 79 | ||
80 | static struct hw_interrupt_type mappi2_irq_type = | 80 | static struct hw_interrupt_type mappi2_irq_type = |
81 | { | 81 | { |
82 | "MAPPI2-IRQ", | 82 | .typename = "MAPPI2-IRQ", |
83 | startup_mappi2_irq, | 83 | .startup = startup_mappi2_irq, |
84 | shutdown_mappi2_irq, | 84 | .shutdown = shutdown_mappi2_irq, |
85 | enable_mappi2_irq, | 85 | .enable = enable_mappi2_irq, |
86 | disable_mappi2_irq, | 86 | .disable = disable_mappi2_irq, |
87 | mask_and_ack_mappi2, | 87 | .ack = mask_and_ack_mappi2, |
88 | end_mappi2_irq | 88 | .end = end_mappi2_irq |
89 | }; | 89 | }; |
90 | 90 | ||
91 | void __init init_IRQ(void) | 91 | void __init init_IRQ(void) |
@@ -156,7 +156,6 @@ void __init init_IRQ(void) | |||
156 | irq_desc[PLD_IRQ_CFIREQ].handler = &mappi2_irq_type; | 156 | irq_desc[PLD_IRQ_CFIREQ].handler = &mappi2_irq_type; |
157 | irq_desc[PLD_IRQ_CFIREQ].action = 0; | 157 | irq_desc[PLD_IRQ_CFIREQ].action = 0; |
158 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ | 158 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ |
159 | // icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | ||
160 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | 159 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; |
161 | disable_mappi2_irq(PLD_IRQ_CFIREQ); | 160 | disable_mappi2_irq(PLD_IRQ_CFIREQ); |
162 | 161 | ||
@@ -167,7 +166,6 @@ void __init init_IRQ(void) | |||
167 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; | 166 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; |
168 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ | 167 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ |
169 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | 168 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; |
170 | // icu_data[PLD_IRQ_CFC_INSERT].icucr = 0; | ||
171 | disable_mappi2_irq(PLD_IRQ_CFC_INSERT); | 169 | disable_mappi2_irq(PLD_IRQ_CFC_INSERT); |
172 | 170 | ||
173 | /* ICUCR42: CFC Eject */ | 171 | /* ICUCR42: CFC Eject */ |
@@ -176,9 +174,7 @@ void __init init_IRQ(void) | |||
176 | irq_desc[PLD_IRQ_CFC_EJECT].action = 0; | 174 | irq_desc[PLD_IRQ_CFC_EJECT].action = 0; |
177 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | 175 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ |
178 | icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 176 | icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
179 | // icu_data[PLD_IRQ_CFC_EJECT].icucr = 0; | ||
180 | disable_mappi2_irq(PLD_IRQ_CFC_EJECT); | 177 | disable_mappi2_irq(PLD_IRQ_CFC_EJECT); |
181 | |||
182 | #endif /* CONFIG_MAPPI2_CFC */ | 178 | #endif /* CONFIG_MAPPI2_CFC */ |
183 | } | 179 | } |
184 | 180 | ||
diff --git a/arch/m32r/kernel/setup_mappi3.c b/arch/m32r/kernel/setup_mappi3.c new file mode 100644 index 000000000000..3d60a85aaec5 --- /dev/null +++ b/arch/m32r/kernel/setup_mappi3.c | |||
@@ -0,0 +1,208 @@ | |||
1 | /* | ||
2 | * linux/arch/m32r/kernel/setup_mappi3.c | ||
3 | * | ||
4 | * Setup routines for Renesas MAPPI-III(M3A-2170) Board | ||
5 | * | ||
6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, | ||
7 | * Hitoshi Yamamoto, Mamoru Sakugawa | ||
8 | */ | ||
9 | |||
10 | #include <linux/config.h> | ||
11 | #include <linux/irq.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/device.h> | ||
15 | |||
16 | #include <asm/system.h> | ||
17 | #include <asm/m32r.h> | ||
18 | #include <asm/io.h> | ||
19 | |||
20 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | ||
21 | |||
22 | #ifndef CONFIG_SMP | ||
23 | typedef struct { | ||
24 | unsigned long icucr; /* ICU Control Register */ | ||
25 | } icu_data_t; | ||
26 | #endif /* CONFIG_SMP */ | ||
27 | |||
28 | icu_data_t icu_data[NR_IRQS]; | ||
29 | |||
30 | static void disable_mappi3_irq(unsigned int irq) | ||
31 | { | ||
32 | unsigned long port, data; | ||
33 | |||
34 | if ((irq == 0) ||(irq >= NR_IRQS)) { | ||
35 | printk("bad irq 0x%08x\n", irq); | ||
36 | return; | ||
37 | } | ||
38 | port = irq2port(irq); | ||
39 | data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7; | ||
40 | outl(data, port); | ||
41 | } | ||
42 | |||
43 | static void enable_mappi3_irq(unsigned int irq) | ||
44 | { | ||
45 | unsigned long port, data; | ||
46 | |||
47 | if ((irq == 0) ||(irq >= NR_IRQS)) { | ||
48 | printk("bad irq 0x%08x\n", irq); | ||
49 | return; | ||
50 | } | ||
51 | port = irq2port(irq); | ||
52 | data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6; | ||
53 | outl(data, port); | ||
54 | } | ||
55 | |||
56 | static void mask_and_ack_mappi3(unsigned int irq) | ||
57 | { | ||
58 | disable_mappi3_irq(irq); | ||
59 | } | ||
60 | |||
61 | static void end_mappi3_irq(unsigned int irq) | ||
62 | { | ||
63 | enable_mappi3_irq(irq); | ||
64 | } | ||
65 | |||
66 | static unsigned int startup_mappi3_irq(unsigned int irq) | ||
67 | { | ||
68 | enable_mappi3_irq(irq); | ||
69 | return (0); | ||
70 | } | ||
71 | |||
72 | static void shutdown_mappi3_irq(unsigned int irq) | ||
73 | { | ||
74 | unsigned long port; | ||
75 | |||
76 | port = irq2port(irq); | ||
77 | outl(M32R_ICUCR_ILEVEL7, port); | ||
78 | } | ||
79 | |||
80 | static struct hw_interrupt_type mappi3_irq_type = | ||
81 | { | ||
82 | .typename = "MAPPI3-IRQ", | ||
83 | .startup = startup_mappi3_irq, | ||
84 | .shutdown = shutdown_mappi3_irq, | ||
85 | .enable = enable_mappi3_irq, | ||
86 | .disable = disable_mappi3_irq, | ||
87 | .ack = mask_and_ack_mappi3, | ||
88 | .end = end_mappi3_irq | ||
89 | }; | ||
90 | |||
91 | void __init init_IRQ(void) | ||
92 | { | ||
93 | #if defined(CONFIG_SMC91X) | ||
94 | /* INT0 : LAN controller (SMC91111) */ | ||
95 | irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; | ||
96 | irq_desc[M32R_IRQ_INT0].handler = &mappi3_irq_type; | ||
97 | irq_desc[M32R_IRQ_INT0].action = 0; | ||
98 | irq_desc[M32R_IRQ_INT0].depth = 1; | ||
99 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||
100 | disable_mappi3_irq(M32R_IRQ_INT0); | ||
101 | #endif /* CONFIG_SMC91X */ | ||
102 | |||
103 | /* MFT2 : system timer */ | ||
104 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | ||
105 | irq_desc[M32R_IRQ_MFT2].handler = &mappi3_irq_type; | ||
106 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
107 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
108 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||
109 | disable_mappi3_irq(M32R_IRQ_MFT2); | ||
110 | |||
111 | #ifdef CONFIG_SERIAL_M32R_SIO | ||
112 | /* SIO0_R : uart receive data */ | ||
113 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | ||
114 | irq_desc[M32R_IRQ_SIO0_R].handler = &mappi3_irq_type; | ||
115 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
116 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
117 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | ||
118 | disable_mappi3_irq(M32R_IRQ_SIO0_R); | ||
119 | |||
120 | /* SIO0_S : uart send data */ | ||
121 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | ||
122 | irq_desc[M32R_IRQ_SIO0_S].handler = &mappi3_irq_type; | ||
123 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
124 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
125 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | ||
126 | disable_mappi3_irq(M32R_IRQ_SIO0_S); | ||
127 | /* SIO1_R : uart receive data */ | ||
128 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | ||
129 | irq_desc[M32R_IRQ_SIO1_R].handler = &mappi3_irq_type; | ||
130 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
131 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
132 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | ||
133 | disable_mappi3_irq(M32R_IRQ_SIO1_R); | ||
134 | |||
135 | /* SIO1_S : uart send data */ | ||
136 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | ||
137 | irq_desc[M32R_IRQ_SIO1_S].handler = &mappi3_irq_type; | ||
138 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
139 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
140 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | ||
141 | disable_mappi3_irq(M32R_IRQ_SIO1_S); | ||
142 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ | ||
143 | |||
144 | #if defined(CONFIG_USB) | ||
145 | /* INT1 : USB Host controller interrupt */ | ||
146 | irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; | ||
147 | irq_desc[M32R_IRQ_INT1].handler = &mappi3_irq_type; | ||
148 | irq_desc[M32R_IRQ_INT1].action = 0; | ||
149 | irq_desc[M32R_IRQ_INT1].depth = 1; | ||
150 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | ||
151 | disable_mappi3_irq(M32R_IRQ_INT1); | ||
152 | #endif /* CONFIG_USB */ | ||
153 | |||
154 | /* ICUCR40: CFC IREQ */ | ||
155 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | ||
156 | irq_desc[PLD_IRQ_CFIREQ].handler = &mappi3_irq_type; | ||
157 | irq_desc[PLD_IRQ_CFIREQ].action = 0; | ||
158 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ | ||
159 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | ||
160 | disable_mappi3_irq(PLD_IRQ_CFIREQ); | ||
161 | |||
162 | #if defined(CONFIG_M32R_CFC) | ||
163 | /* ICUCR41: CFC Insert */ | ||
164 | irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; | ||
165 | irq_desc[PLD_IRQ_CFC_INSERT].handler = &mappi3_irq_type; | ||
166 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; | ||
167 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ | ||
168 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | ||
169 | disable_mappi3_irq(PLD_IRQ_CFC_INSERT); | ||
170 | |||
171 | /* ICUCR42: CFC Eject */ | ||
172 | irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; | ||
173 | irq_desc[PLD_IRQ_CFC_EJECT].handler = &mappi3_irq_type; | ||
174 | irq_desc[PLD_IRQ_CFC_EJECT].action = 0; | ||
175 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | ||
176 | icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||
177 | disable_mappi3_irq(PLD_IRQ_CFC_EJECT); | ||
178 | #endif /* CONFIG_M32R_CFC */ | ||
179 | } | ||
180 | |||
181 | #define LAN_IOSTART 0x300 | ||
182 | #define LAN_IOEND 0x320 | ||
183 | static struct resource smc91x_resources[] = { | ||
184 | [0] = { | ||
185 | .start = (LAN_IOSTART), | ||
186 | .end = (LAN_IOEND), | ||
187 | .flags = IORESOURCE_MEM, | ||
188 | }, | ||
189 | [1] = { | ||
190 | .start = M32R_IRQ_INT0, | ||
191 | .end = M32R_IRQ_INT0, | ||
192 | .flags = IORESOURCE_IRQ, | ||
193 | } | ||
194 | }; | ||
195 | |||
196 | static struct platform_device smc91x_device = { | ||
197 | .name = "smc91x", | ||
198 | .id = 0, | ||
199 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
200 | .resource = smc91x_resources, | ||
201 | }; | ||
202 | |||
203 | static int __init platform_init(void) | ||
204 | { | ||
205 | platform_device_register(&smc91x_device); | ||
206 | return 0; | ||
207 | } | ||
208 | arch_initcall(platform_init); | ||
diff --git a/arch/m32r/kernel/setup_oaks32r.c b/arch/m32r/kernel/setup_oaks32r.c index b04834526c9a..d656640badc9 100644 --- a/arch/m32r/kernel/setup_oaks32r.c +++ b/arch/m32r/kernel/setup_oaks32r.c | |||
@@ -70,13 +70,13 @@ static void shutdown_oaks32r_irq(unsigned int irq) | |||
70 | 70 | ||
71 | static struct hw_interrupt_type oaks32r_irq_type = | 71 | static struct hw_interrupt_type oaks32r_irq_type = |
72 | { | 72 | { |
73 | "OAKS32R-IRQ", | 73 | .typename = "OAKS32R-IRQ", |
74 | startup_oaks32r_irq, | 74 | .startup = startup_oaks32r_irq, |
75 | shutdown_oaks32r_irq, | 75 | .shutdown = shutdown_oaks32r_irq, |
76 | enable_oaks32r_irq, | 76 | .enable = enable_oaks32r_irq, |
77 | disable_oaks32r_irq, | 77 | .disable = disable_oaks32r_irq, |
78 | mask_and_ack_mappi, | 78 | .ack = mask_and_ack_mappi, |
79 | end_oaks32r_irq | 79 | .end = end_oaks32r_irq |
80 | }; | 80 | }; |
81 | 81 | ||
82 | void __init init_IRQ(void) | 82 | void __init init_IRQ(void) |
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c index 84315e344c58..86f4cf2a86c3 100644 --- a/arch/m32r/kernel/setup_opsput.c +++ b/arch/m32r/kernel/setup_opsput.c | |||
@@ -79,13 +79,13 @@ static void shutdown_opsput_irq(unsigned int irq) | |||
79 | 79 | ||
80 | static struct hw_interrupt_type opsput_irq_type = | 80 | static struct hw_interrupt_type opsput_irq_type = |
81 | { | 81 | { |
82 | "OPSPUT-IRQ", | 82 | .typename = "OPSPUT-IRQ", |
83 | startup_opsput_irq, | 83 | .startup = startup_opsput_irq, |
84 | shutdown_opsput_irq, | 84 | .shutdown = shutdown_opsput_irq, |
85 | enable_opsput_irq, | 85 | .enable = enable_opsput_irq, |
86 | disable_opsput_irq, | 86 | .disable = disable_opsput_irq, |
87 | mask_and_ack_opsput, | 87 | .ack = mask_and_ack_opsput, |
88 | end_opsput_irq | 88 | .end = end_opsput_irq |
89 | }; | 89 | }; |
90 | 90 | ||
91 | /* | 91 | /* |
@@ -156,13 +156,13 @@ static void shutdown_opsput_pld_irq(unsigned int irq) | |||
156 | 156 | ||
157 | static struct hw_interrupt_type opsput_pld_irq_type = | 157 | static struct hw_interrupt_type opsput_pld_irq_type = |
158 | { | 158 | { |
159 | "OPSPUT-PLD-IRQ", | 159 | .typename = "OPSPUT-PLD-IRQ", |
160 | startup_opsput_pld_irq, | 160 | .startup = startup_opsput_pld_irq, |
161 | shutdown_opsput_pld_irq, | 161 | .shutdown = shutdown_opsput_pld_irq, |
162 | enable_opsput_pld_irq, | 162 | .enable = enable_opsput_pld_irq, |
163 | disable_opsput_pld_irq, | 163 | .disable = disable_opsput_pld_irq, |
164 | mask_and_ack_opsput_pld, | 164 | .ack = mask_and_ack_opsput_pld, |
165 | end_opsput_pld_irq | 165 | .end = end_opsput_pld_irq |
166 | }; | 166 | }; |
167 | 167 | ||
168 | /* | 168 | /* |
diff --git a/arch/m32r/kernel/setup_usrv.c b/arch/m32r/kernel/setup_usrv.c index fe417be5e3e9..634741bf9d35 100644 --- a/arch/m32r/kernel/setup_usrv.c +++ b/arch/m32r/kernel/setup_usrv.c | |||
@@ -70,13 +70,13 @@ static void shutdown_mappi_irq(unsigned int irq) | |||
70 | 70 | ||
71 | static struct hw_interrupt_type mappi_irq_type = | 71 | static struct hw_interrupt_type mappi_irq_type = |
72 | { | 72 | { |
73 | "M32700-IRQ", | 73 | .typename = "M32700-IRQ", |
74 | startup_mappi_irq, | 74 | .startup = startup_mappi_irq, |
75 | shutdown_mappi_irq, | 75 | .shutdown = shutdown_mappi_irq, |
76 | enable_mappi_irq, | 76 | .enable = enable_mappi_irq, |
77 | disable_mappi_irq, | 77 | .disable = disable_mappi_irq, |
78 | mask_and_ack_mappi, | 78 | .ack = mask_and_ack_mappi, |
79 | end_mappi_irq | 79 | .end = end_mappi_irq |
80 | }; | 80 | }; |
81 | 81 | ||
82 | /* | 82 | /* |
@@ -143,13 +143,13 @@ static void shutdown_m32700ut_pld_irq(unsigned int irq) | |||
143 | 143 | ||
144 | static struct hw_interrupt_type m32700ut_pld_irq_type = | 144 | static struct hw_interrupt_type m32700ut_pld_irq_type = |
145 | { | 145 | { |
146 | "USRV-PLD-IRQ", | 146 | .typename = "USRV-PLD-IRQ", |
147 | startup_m32700ut_pld_irq, | 147 | .startup = startup_m32700ut_pld_irq, |
148 | shutdown_m32700ut_pld_irq, | 148 | .shutdown = shutdown_m32700ut_pld_irq, |
149 | enable_m32700ut_pld_irq, | 149 | .enable = enable_m32700ut_pld_irq, |
150 | disable_m32700ut_pld_irq, | 150 | .disable = disable_m32700ut_pld_irq, |
151 | mask_and_ack_m32700ut_pld, | 151 | .ack = mask_and_ack_m32700ut_pld, |
152 | end_m32700ut_pld_irq | 152 | .end = end_m32700ut_pld_irq |
153 | }; | 153 | }; |
154 | 154 | ||
155 | void __init init_IRQ(void) | 155 | void __init init_IRQ(void) |
diff --git a/arch/m32r/m32700ut/defconfig.m32700ut.smp b/arch/m32r/m32700ut/defconfig.m32700ut.smp index 1c002181df7f..3e607d90b5f4 100644 --- a/arch/m32r/m32700ut/defconfig.m32700ut.smp +++ b/arch/m32r/m32700ut/defconfig.m32700ut.smp | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:10:50 2005 | 4 | # Fri Jun 3 16:20:58 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -15,6 +15,7 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_LOCK_KERNEL=y | 17 | CONFIG_LOCK_KERNEL=y |
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
18 | 19 | ||
19 | # | 20 | # |
20 | # General setup | 21 | # General setup |
@@ -27,13 +28,16 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
27 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
28 | CONFIG_SYSCTL=y | 29 | CONFIG_SYSCTL=y |
29 | # CONFIG_AUDIT is not set | 30 | # CONFIG_AUDIT is not set |
30 | CONFIG_LOG_BUF_SHIFT=15 | ||
31 | CONFIG_HOTPLUG=y | 31 | CONFIG_HOTPLUG=y |
32 | CONFIG_KOBJECT_UEVENT=y | 32 | CONFIG_KOBJECT_UEVENT=y |
33 | CONFIG_IKCONFIG=y | 33 | CONFIG_IKCONFIG=y |
34 | # CONFIG_IKCONFIG_PROC is not set | 34 | # CONFIG_IKCONFIG_PROC is not set |
35 | # CONFIG_CPUSETS is not set | ||
35 | CONFIG_EMBEDDED=y | 36 | CONFIG_EMBEDDED=y |
36 | # CONFIG_KALLSYMS is not set | 37 | # CONFIG_KALLSYMS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
40 | CONFIG_BASE_FULL=y | ||
37 | # CONFIG_FUTEX is not set | 41 | # CONFIG_FUTEX is not set |
38 | # CONFIG_EPOLL is not set | 42 | # CONFIG_EPOLL is not set |
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -43,6 +47,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
43 | CONFIG_CC_ALIGN_LOOPS=0 | 47 | CONFIG_CC_ALIGN_LOOPS=0 |
44 | CONFIG_CC_ALIGN_JUMPS=0 | 48 | CONFIG_CC_ALIGN_JUMPS=0 |
45 | # CONFIG_TINY_SHMEM is not set | 49 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | ||
46 | 51 | ||
47 | # | 52 | # |
48 | # Loadable module support | 53 | # Loadable module support |
@@ -65,6 +70,7 @@ CONFIG_PLAT_M32700UT=y | |||
65 | # CONFIG_PLAT_OPSPUT is not set | 70 | # CONFIG_PLAT_OPSPUT is not set |
66 | # CONFIG_PLAT_OAKS32R is not set | 71 | # CONFIG_PLAT_OAKS32R is not set |
67 | # CONFIG_PLAT_MAPPI2 is not set | 72 | # CONFIG_PLAT_MAPPI2 is not set |
73 | # CONFIG_PLAT_MAPPI3 is not set | ||
68 | CONFIG_CHIP_M32700=y | 74 | CONFIG_CHIP_M32700=y |
69 | # CONFIG_CHIP_M32102 is not set | 75 | # CONFIG_CHIP_M32102 is not set |
70 | # CONFIG_CHIP_VDEC2 is not set | 76 | # CONFIG_CHIP_VDEC2 is not set |
@@ -271,7 +277,6 @@ CONFIG_NET=y | |||
271 | # | 277 | # |
272 | CONFIG_PACKET=y | 278 | CONFIG_PACKET=y |
273 | # CONFIG_PACKET_MMAP is not set | 279 | # CONFIG_PACKET_MMAP is not set |
274 | # CONFIG_NETLINK_DEV is not set | ||
275 | CONFIG_UNIX=y | 280 | CONFIG_UNIX=y |
276 | # CONFIG_NET_KEY is not set | 281 | # CONFIG_NET_KEY is not set |
277 | CONFIG_INET=y | 282 | CONFIG_INET=y |
@@ -396,18 +401,6 @@ CONFIG_INPUT=y | |||
396 | # CONFIG_INPUT_EVBUG is not set | 401 | # CONFIG_INPUT_EVBUG is not set |
397 | 402 | ||
398 | # | 403 | # |
399 | # Input I/O drivers | ||
400 | # | ||
401 | # CONFIG_GAMEPORT is not set | ||
402 | CONFIG_SOUND_GAMEPORT=y | ||
403 | CONFIG_SERIO=y | ||
404 | # CONFIG_SERIO_I8042 is not set | ||
405 | CONFIG_SERIO_SERPORT=y | ||
406 | # CONFIG_SERIO_CT82C710 is not set | ||
407 | # CONFIG_SERIO_LIBPS2 is not set | ||
408 | # CONFIG_SERIO_RAW is not set | ||
409 | |||
410 | # | ||
411 | # Input Device Drivers | 404 | # Input Device Drivers |
412 | # | 405 | # |
413 | # CONFIG_INPUT_KEYBOARD is not set | 406 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -417,6 +410,17 @@ CONFIG_SERIO_SERPORT=y | |||
417 | # CONFIG_INPUT_MISC is not set | 410 | # CONFIG_INPUT_MISC is not set |
418 | 411 | ||
419 | # | 412 | # |
413 | # Hardware I/O ports | ||
414 | # | ||
415 | CONFIG_SERIO=y | ||
416 | # CONFIG_SERIO_I8042 is not set | ||
417 | CONFIG_SERIO_SERPORT=y | ||
418 | # CONFIG_SERIO_LIBPS2 is not set | ||
419 | # CONFIG_SERIO_RAW is not set | ||
420 | # CONFIG_GAMEPORT is not set | ||
421 | CONFIG_SOUND_GAMEPORT=y | ||
422 | |||
423 | # | ||
420 | # Character devices | 424 | # Character devices |
421 | # | 425 | # |
422 | CONFIG_VT=y | 426 | CONFIG_VT=y |
@@ -468,6 +472,10 @@ CONFIG_DS1302=y | |||
468 | # CONFIG_RAW_DRIVER is not set | 472 | # CONFIG_RAW_DRIVER is not set |
469 | 473 | ||
470 | # | 474 | # |
475 | # TPM devices | ||
476 | # | ||
477 | |||
478 | # | ||
471 | # I2C support | 479 | # I2C support |
472 | # | 480 | # |
473 | # CONFIG_I2C is not set | 481 | # CONFIG_I2C is not set |
@@ -511,8 +519,14 @@ CONFIG_VIDEO_M32R_AR_M64278=y | |||
511 | # Graphics support | 519 | # Graphics support |
512 | # | 520 | # |
513 | CONFIG_FB=y | 521 | CONFIG_FB=y |
522 | # CONFIG_FB_CFB_FILLRECT is not set | ||
523 | # CONFIG_FB_CFB_COPYAREA is not set | ||
524 | # CONFIG_FB_CFB_IMAGEBLIT is not set | ||
525 | # CONFIG_FB_SOFT_CURSOR is not set | ||
526 | # CONFIG_FB_MACMODES is not set | ||
514 | # CONFIG_FB_MODE_HELPERS is not set | 527 | # CONFIG_FB_MODE_HELPERS is not set |
515 | # CONFIG_FB_TILEBLITTING is not set | 528 | # CONFIG_FB_TILEBLITTING is not set |
529 | # CONFIG_FB_S1D13XXX is not set | ||
516 | # CONFIG_FB_VIRTUAL is not set | 530 | # CONFIG_FB_VIRTUAL is not set |
517 | 531 | ||
518 | # | 532 | # |
@@ -546,10 +560,6 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
546 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 560 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
547 | 561 | ||
548 | # | 562 | # |
549 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
550 | # | ||
551 | |||
552 | # | ||
553 | # USB Gadget Support | 563 | # USB Gadget Support |
554 | # | 564 | # |
555 | # CONFIG_USB_GADGET is not set | 565 | # CONFIG_USB_GADGET is not set |
@@ -722,8 +732,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
722 | # | 732 | # |
723 | # Kernel hacking | 733 | # Kernel hacking |
724 | # | 734 | # |
735 | # CONFIG_PRINTK_TIME is not set | ||
725 | # CONFIG_DEBUG_KERNEL is not set | 736 | # CONFIG_DEBUG_KERNEL is not set |
726 | CONFIG_DEBUG_PREEMPT=y | 737 | CONFIG_LOG_BUF_SHIFT=15 |
727 | # CONFIG_DEBUG_BUGVERBOSE is not set | 738 | # CONFIG_DEBUG_BUGVERBOSE is not set |
728 | # CONFIG_FRAME_POINTER is not set | 739 | # CONFIG_FRAME_POINTER is not set |
729 | 740 | ||
diff --git a/arch/m32r/m32700ut/defconfig.m32700ut.up b/arch/m32r/m32700ut/defconfig.m32700ut.up index 805357f7bda1..2d3e7cda8f46 100644 --- a/arch/m32r/m32700ut/defconfig.m32700ut.up +++ b/arch/m32r/m32700ut/defconfig.m32700ut.up | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:10:54 2005 | 4 | # Fri Jun 3 16:21:34 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -16,6 +16,7 @@ CONFIG_EXPERIMENTAL=y | |||
16 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 18 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | 20 | ||
20 | # | 21 | # |
21 | # General setup | 22 | # General setup |
@@ -28,13 +29,15 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
29 | CONFIG_SYSCTL=y | 30 | CONFIG_SYSCTL=y |
30 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
31 | CONFIG_LOG_BUF_SHIFT=14 | ||
32 | CONFIG_HOTPLUG=y | 32 | CONFIG_HOTPLUG=y |
33 | CONFIG_KOBJECT_UEVENT=y | 33 | CONFIG_KOBJECT_UEVENT=y |
34 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
35 | # CONFIG_IKCONFIG_PROC is not set | 35 | # CONFIG_IKCONFIG_PROC is not set |
36 | CONFIG_EMBEDDED=y | 36 | CONFIG_EMBEDDED=y |
37 | # CONFIG_KALLSYMS is not set | 37 | # CONFIG_KALLSYMS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
40 | CONFIG_BASE_FULL=y | ||
38 | # CONFIG_FUTEX is not set | 41 | # CONFIG_FUTEX is not set |
39 | # CONFIG_EPOLL is not set | 42 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -44,6 +47,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
44 | CONFIG_CC_ALIGN_LOOPS=0 | 47 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 48 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 49 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | ||
47 | 51 | ||
48 | # | 52 | # |
49 | # Loadable module support | 53 | # Loadable module support |
@@ -65,6 +69,7 @@ CONFIG_PLAT_M32700UT=y | |||
65 | # CONFIG_PLAT_OPSPUT is not set | 69 | # CONFIG_PLAT_OPSPUT is not set |
66 | # CONFIG_PLAT_OAKS32R is not set | 70 | # CONFIG_PLAT_OAKS32R is not set |
67 | # CONFIG_PLAT_MAPPI2 is not set | 71 | # CONFIG_PLAT_MAPPI2 is not set |
72 | # CONFIG_PLAT_MAPPI3 is not set | ||
68 | CONFIG_CHIP_M32700=y | 73 | CONFIG_CHIP_M32700=y |
69 | # CONFIG_CHIP_M32102 is not set | 74 | # CONFIG_CHIP_M32102 is not set |
70 | # CONFIG_CHIP_VDEC2 is not set | 75 | # CONFIG_CHIP_VDEC2 is not set |
@@ -268,7 +273,6 @@ CONFIG_NET=y | |||
268 | # | 273 | # |
269 | CONFIG_PACKET=y | 274 | CONFIG_PACKET=y |
270 | # CONFIG_PACKET_MMAP is not set | 275 | # CONFIG_PACKET_MMAP is not set |
271 | # CONFIG_NETLINK_DEV is not set | ||
272 | CONFIG_UNIX=y | 276 | CONFIG_UNIX=y |
273 | # CONFIG_NET_KEY is not set | 277 | # CONFIG_NET_KEY is not set |
274 | CONFIG_INET=y | 278 | CONFIG_INET=y |
@@ -393,18 +397,6 @@ CONFIG_INPUT=y | |||
393 | # CONFIG_INPUT_EVBUG is not set | 397 | # CONFIG_INPUT_EVBUG is not set |
394 | 398 | ||
395 | # | 399 | # |
396 | # Input I/O drivers | ||
397 | # | ||
398 | # CONFIG_GAMEPORT is not set | ||
399 | CONFIG_SOUND_GAMEPORT=y | ||
400 | CONFIG_SERIO=y | ||
401 | # CONFIG_SERIO_I8042 is not set | ||
402 | CONFIG_SERIO_SERPORT=y | ||
403 | # CONFIG_SERIO_CT82C710 is not set | ||
404 | # CONFIG_SERIO_LIBPS2 is not set | ||
405 | # CONFIG_SERIO_RAW is not set | ||
406 | |||
407 | # | ||
408 | # Input Device Drivers | 400 | # Input Device Drivers |
409 | # | 401 | # |
410 | # CONFIG_INPUT_KEYBOARD is not set | 402 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -414,6 +406,17 @@ CONFIG_SERIO_SERPORT=y | |||
414 | # CONFIG_INPUT_MISC is not set | 406 | # CONFIG_INPUT_MISC is not set |
415 | 407 | ||
416 | # | 408 | # |
409 | # Hardware I/O ports | ||
410 | # | ||
411 | CONFIG_SERIO=y | ||
412 | # CONFIG_SERIO_I8042 is not set | ||
413 | CONFIG_SERIO_SERPORT=y | ||
414 | # CONFIG_SERIO_LIBPS2 is not set | ||
415 | # CONFIG_SERIO_RAW is not set | ||
416 | # CONFIG_GAMEPORT is not set | ||
417 | CONFIG_SOUND_GAMEPORT=y | ||
418 | |||
419 | # | ||
417 | # Character devices | 420 | # Character devices |
418 | # | 421 | # |
419 | CONFIG_VT=y | 422 | CONFIG_VT=y |
@@ -465,6 +468,10 @@ CONFIG_DS1302=y | |||
465 | # CONFIG_RAW_DRIVER is not set | 468 | # CONFIG_RAW_DRIVER is not set |
466 | 469 | ||
467 | # | 470 | # |
471 | # TPM devices | ||
472 | # | ||
473 | |||
474 | # | ||
468 | # I2C support | 475 | # I2C support |
469 | # | 476 | # |
470 | # CONFIG_I2C is not set | 477 | # CONFIG_I2C is not set |
@@ -508,8 +515,14 @@ CONFIG_VIDEO_M32R_AR_M64278=y | |||
508 | # Graphics support | 515 | # Graphics support |
509 | # | 516 | # |
510 | CONFIG_FB=y | 517 | CONFIG_FB=y |
518 | # CONFIG_FB_CFB_FILLRECT is not set | ||
519 | # CONFIG_FB_CFB_COPYAREA is not set | ||
520 | # CONFIG_FB_CFB_IMAGEBLIT is not set | ||
521 | # CONFIG_FB_SOFT_CURSOR is not set | ||
522 | # CONFIG_FB_MACMODES is not set | ||
511 | # CONFIG_FB_MODE_HELPERS is not set | 523 | # CONFIG_FB_MODE_HELPERS is not set |
512 | # CONFIG_FB_TILEBLITTING is not set | 524 | # CONFIG_FB_TILEBLITTING is not set |
525 | # CONFIG_FB_S1D13XXX is not set | ||
513 | # CONFIG_FB_VIRTUAL is not set | 526 | # CONFIG_FB_VIRTUAL is not set |
514 | 527 | ||
515 | # | 528 | # |
@@ -543,10 +556,6 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
543 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 556 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
544 | 557 | ||
545 | # | 558 | # |
546 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
547 | # | ||
548 | |||
549 | # | ||
550 | # USB Gadget Support | 559 | # USB Gadget Support |
551 | # | 560 | # |
552 | # CONFIG_USB_GADGET is not set | 561 | # CONFIG_USB_GADGET is not set |
@@ -719,8 +728,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
719 | # | 728 | # |
720 | # Kernel hacking | 729 | # Kernel hacking |
721 | # | 730 | # |
731 | # CONFIG_PRINTK_TIME is not set | ||
722 | # CONFIG_DEBUG_KERNEL is not set | 732 | # CONFIG_DEBUG_KERNEL is not set |
723 | CONFIG_DEBUG_PREEMPT=y | 733 | CONFIG_LOG_BUF_SHIFT=14 |
724 | # CONFIG_DEBUG_BUGVERBOSE is not set | 734 | # CONFIG_DEBUG_BUGVERBOSE is not set |
725 | # CONFIG_FRAME_POINTER is not set | 735 | # CONFIG_FRAME_POINTER is not set |
726 | 736 | ||
diff --git a/arch/m32r/mappi/defconfig.nommu b/arch/m32r/mappi/defconfig.nommu index 714aa6e7034c..a8425fba340b 100644 --- a/arch/m32r/mappi/defconfig.nommu +++ b/arch/m32r/mappi/defconfig.nommu | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:10:57 2005 | 4 | # Fri Jun 3 16:21:46 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -16,6 +16,7 @@ CONFIG_EXPERIMENTAL=y | |||
16 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 18 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | 20 | ||
20 | # | 21 | # |
21 | # General setup | 22 | # General setup |
@@ -26,13 +27,15 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
26 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 27 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
27 | CONFIG_SYSCTL=y | 28 | CONFIG_SYSCTL=y |
28 | # CONFIG_AUDIT is not set | 29 | # CONFIG_AUDIT is not set |
29 | CONFIG_LOG_BUF_SHIFT=14 | ||
30 | CONFIG_HOTPLUG=y | 30 | CONFIG_HOTPLUG=y |
31 | CONFIG_KOBJECT_UEVENT=y | 31 | CONFIG_KOBJECT_UEVENT=y |
32 | CONFIG_IKCONFIG=y | 32 | CONFIG_IKCONFIG=y |
33 | # CONFIG_IKCONFIG_PROC is not set | 33 | # CONFIG_IKCONFIG_PROC is not set |
34 | CONFIG_EMBEDDED=y | 34 | CONFIG_EMBEDDED=y |
35 | # CONFIG_KALLSYMS is not set | 35 | # CONFIG_KALLSYMS is not set |
36 | CONFIG_PRINTK=y | ||
37 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | ||
36 | # CONFIG_FUTEX is not set | 39 | # CONFIG_FUTEX is not set |
37 | # CONFIG_EPOLL is not set | 40 | # CONFIG_EPOLL is not set |
38 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 41 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -41,6 +44,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
41 | CONFIG_CC_ALIGN_LOOPS=0 | 44 | CONFIG_CC_ALIGN_LOOPS=0 |
42 | CONFIG_CC_ALIGN_JUMPS=0 | 45 | CONFIG_CC_ALIGN_JUMPS=0 |
43 | CONFIG_TINY_SHMEM=y | 46 | CONFIG_TINY_SHMEM=y |
47 | CONFIG_BASE_SMALL=0 | ||
44 | 48 | ||
45 | # | 49 | # |
46 | # Loadable module support | 50 | # Loadable module support |
@@ -62,6 +66,7 @@ CONFIG_PLAT_MAPPI=y | |||
62 | # CONFIG_PLAT_OPSPUT is not set | 66 | # CONFIG_PLAT_OPSPUT is not set |
63 | # CONFIG_PLAT_OAKS32R is not set | 67 | # CONFIG_PLAT_OAKS32R is not set |
64 | # CONFIG_PLAT_MAPPI2 is not set | 68 | # CONFIG_PLAT_MAPPI2 is not set |
69 | # CONFIG_PLAT_MAPPI3 is not set | ||
65 | CONFIG_CHIP_M32700=y | 70 | CONFIG_CHIP_M32700=y |
66 | # CONFIG_CHIP_M32102 is not set | 71 | # CONFIG_CHIP_M32102 is not set |
67 | # CONFIG_CHIP_VDEC2 is not set | 72 | # CONFIG_CHIP_VDEC2 is not set |
@@ -202,7 +207,6 @@ CONFIG_NET=y | |||
202 | # | 207 | # |
203 | CONFIG_PACKET=y | 208 | CONFIG_PACKET=y |
204 | # CONFIG_PACKET_MMAP is not set | 209 | # CONFIG_PACKET_MMAP is not set |
205 | # CONFIG_NETLINK_DEV is not set | ||
206 | CONFIG_UNIX=y | 210 | CONFIG_UNIX=y |
207 | # CONFIG_NET_KEY is not set | 211 | # CONFIG_NET_KEY is not set |
208 | CONFIG_INET=y | 212 | CONFIG_INET=y |
@@ -325,18 +329,6 @@ CONFIG_INPUT=y | |||
325 | # CONFIG_INPUT_EVBUG is not set | 329 | # CONFIG_INPUT_EVBUG is not set |
326 | 330 | ||
327 | # | 331 | # |
328 | # Input I/O drivers | ||
329 | # | ||
330 | # CONFIG_GAMEPORT is not set | ||
331 | CONFIG_SOUND_GAMEPORT=y | ||
332 | CONFIG_SERIO=y | ||
333 | # CONFIG_SERIO_I8042 is not set | ||
334 | CONFIG_SERIO_SERPORT=y | ||
335 | # CONFIG_SERIO_CT82C710 is not set | ||
336 | # CONFIG_SERIO_LIBPS2 is not set | ||
337 | # CONFIG_SERIO_RAW is not set | ||
338 | |||
339 | # | ||
340 | # Input Device Drivers | 332 | # Input Device Drivers |
341 | # | 333 | # |
342 | # CONFIG_INPUT_KEYBOARD is not set | 334 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -346,6 +338,17 @@ CONFIG_SERIO_SERPORT=y | |||
346 | # CONFIG_INPUT_MISC is not set | 338 | # CONFIG_INPUT_MISC is not set |
347 | 339 | ||
348 | # | 340 | # |
341 | # Hardware I/O ports | ||
342 | # | ||
343 | CONFIG_SERIO=y | ||
344 | # CONFIG_SERIO_I8042 is not set | ||
345 | CONFIG_SERIO_SERPORT=y | ||
346 | # CONFIG_SERIO_LIBPS2 is not set | ||
347 | # CONFIG_SERIO_RAW is not set | ||
348 | # CONFIG_GAMEPORT is not set | ||
349 | CONFIG_SOUND_GAMEPORT=y | ||
350 | |||
351 | # | ||
349 | # Character devices | 352 | # Character devices |
350 | # | 353 | # |
351 | # CONFIG_VT is not set | 354 | # CONFIG_VT is not set |
@@ -394,6 +397,10 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
394 | # CONFIG_RAW_DRIVER is not set | 397 | # CONFIG_RAW_DRIVER is not set |
395 | 398 | ||
396 | # | 399 | # |
400 | # TPM devices | ||
401 | # | ||
402 | |||
403 | # | ||
397 | # I2C support | 404 | # I2C support |
398 | # | 405 | # |
399 | # CONFIG_I2C is not set | 406 | # CONFIG_I2C is not set |
@@ -434,10 +441,6 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
434 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 441 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
435 | 442 | ||
436 | # | 443 | # |
437 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
438 | # | ||
439 | |||
440 | # | ||
441 | # USB Gadget Support | 444 | # USB Gadget Support |
442 | # | 445 | # |
443 | # CONFIG_USB_GADGET is not set | 446 | # CONFIG_USB_GADGET is not set |
@@ -595,8 +598,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
595 | # | 598 | # |
596 | # Kernel hacking | 599 | # Kernel hacking |
597 | # | 600 | # |
601 | # CONFIG_PRINTK_TIME is not set | ||
598 | # CONFIG_DEBUG_KERNEL is not set | 602 | # CONFIG_DEBUG_KERNEL is not set |
599 | CONFIG_DEBUG_PREEMPT=y | 603 | CONFIG_LOG_BUF_SHIFT=14 |
600 | # CONFIG_DEBUG_BUGVERBOSE is not set | 604 | # CONFIG_DEBUG_BUGVERBOSE is not set |
601 | # CONFIG_FRAME_POINTER is not set | 605 | # CONFIG_FRAME_POINTER is not set |
602 | 606 | ||
diff --git a/arch/m32r/mappi/defconfig.smp b/arch/m32r/mappi/defconfig.smp index 956a8e2f98d6..1a7f3cd42246 100644 --- a/arch/m32r/mappi/defconfig.smp +++ b/arch/m32r/mappi/defconfig.smp | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:11:02 2005 | 4 | # Fri Jun 3 16:21:52 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -17,6 +17,7 @@ CONFIG_EXPERIMENTAL=y | |||
17 | CONFIG_BROKEN=y | 17 | CONFIG_BROKEN=y |
18 | CONFIG_BROKEN_ON_SMP=y | 18 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_LOCK_KERNEL=y | 19 | CONFIG_LOCK_KERNEL=y |
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
20 | 21 | ||
21 | # | 22 | # |
22 | # General setup | 23 | # General setup |
@@ -28,13 +29,16 @@ CONFIG_SYSVIPC=y | |||
28 | # CONFIG_BSD_PROCESS_ACCT is not set | 29 | # CONFIG_BSD_PROCESS_ACCT is not set |
29 | CONFIG_SYSCTL=y | 30 | CONFIG_SYSCTL=y |
30 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
31 | CONFIG_LOG_BUF_SHIFT=15 | ||
32 | CONFIG_HOTPLUG=y | 32 | CONFIG_HOTPLUG=y |
33 | CONFIG_KOBJECT_UEVENT=y | 33 | CONFIG_KOBJECT_UEVENT=y |
34 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
35 | CONFIG_IKCONFIG_PROC=y | 35 | CONFIG_IKCONFIG_PROC=y |
36 | # CONFIG_CPUSETS is not set | ||
36 | CONFIG_EMBEDDED=y | 37 | CONFIG_EMBEDDED=y |
37 | # CONFIG_KALLSYMS is not set | 38 | # CONFIG_KALLSYMS is not set |
39 | CONFIG_PRINTK=y | ||
40 | CONFIG_BUG=y | ||
41 | CONFIG_BASE_FULL=y | ||
38 | # CONFIG_FUTEX is not set | 42 | # CONFIG_FUTEX is not set |
39 | # CONFIG_EPOLL is not set | 43 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -44,6 +48,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
44 | CONFIG_CC_ALIGN_LOOPS=0 | 48 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 49 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 50 | # CONFIG_TINY_SHMEM is not set |
51 | CONFIG_BASE_SMALL=0 | ||
47 | 52 | ||
48 | # | 53 | # |
49 | # Loadable module support | 54 | # Loadable module support |
@@ -66,6 +71,7 @@ CONFIG_PLAT_MAPPI=y | |||
66 | # CONFIG_PLAT_OPSPUT is not set | 71 | # CONFIG_PLAT_OPSPUT is not set |
67 | # CONFIG_PLAT_OAKS32R is not set | 72 | # CONFIG_PLAT_OAKS32R is not set |
68 | # CONFIG_PLAT_MAPPI2 is not set | 73 | # CONFIG_PLAT_MAPPI2 is not set |
74 | # CONFIG_PLAT_MAPPI3 is not set | ||
69 | CONFIG_CHIP_M32700=y | 75 | CONFIG_CHIP_M32700=y |
70 | # CONFIG_CHIP_M32102 is not set | 76 | # CONFIG_CHIP_M32102 is not set |
71 | # CONFIG_CHIP_VDEC2 is not set | 77 | # CONFIG_CHIP_VDEC2 is not set |
@@ -139,8 +145,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
139 | # | 145 | # |
140 | CONFIG_MTD=y | 146 | CONFIG_MTD=y |
141 | # CONFIG_MTD_DEBUG is not set | 147 | # CONFIG_MTD_DEBUG is not set |
142 | CONFIG_MTD_PARTITIONS=y | ||
143 | # CONFIG_MTD_CONCAT is not set | 148 | # CONFIG_MTD_CONCAT is not set |
149 | CONFIG_MTD_PARTITIONS=y | ||
144 | CONFIG_MTD_REDBOOT_PARTS=y | 150 | CONFIG_MTD_REDBOOT_PARTS=y |
145 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | 151 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 |
146 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | 152 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set |
@@ -294,7 +300,6 @@ CONFIG_NET=y | |||
294 | # Networking options | 300 | # Networking options |
295 | # | 301 | # |
296 | # CONFIG_PACKET is not set | 302 | # CONFIG_PACKET is not set |
297 | # CONFIG_NETLINK_DEV is not set | ||
298 | CONFIG_UNIX=y | 303 | CONFIG_UNIX=y |
299 | # CONFIG_NET_KEY is not set | 304 | # CONFIG_NET_KEY is not set |
300 | CONFIG_INET=y | 305 | CONFIG_INET=y |
@@ -420,18 +425,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
420 | # CONFIG_INPUT_EVBUG is not set | 425 | # CONFIG_INPUT_EVBUG is not set |
421 | 426 | ||
422 | # | 427 | # |
423 | # Input I/O drivers | ||
424 | # | ||
425 | # CONFIG_GAMEPORT is not set | ||
426 | CONFIG_SOUND_GAMEPORT=y | ||
427 | CONFIG_SERIO=y | ||
428 | # CONFIG_SERIO_I8042 is not set | ||
429 | # CONFIG_SERIO_SERPORT is not set | ||
430 | # CONFIG_SERIO_CT82C710 is not set | ||
431 | # CONFIG_SERIO_LIBPS2 is not set | ||
432 | # CONFIG_SERIO_RAW is not set | ||
433 | |||
434 | # | ||
435 | # Input Device Drivers | 428 | # Input Device Drivers |
436 | # | 429 | # |
437 | # CONFIG_INPUT_KEYBOARD is not set | 430 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -441,6 +434,17 @@ CONFIG_SERIO=y | |||
441 | # CONFIG_INPUT_MISC is not set | 434 | # CONFIG_INPUT_MISC is not set |
442 | 435 | ||
443 | # | 436 | # |
437 | # Hardware I/O ports | ||
438 | # | ||
439 | CONFIG_SERIO=y | ||
440 | # CONFIG_SERIO_I8042 is not set | ||
441 | # CONFIG_SERIO_SERPORT is not set | ||
442 | # CONFIG_SERIO_LIBPS2 is not set | ||
443 | # CONFIG_SERIO_RAW is not set | ||
444 | # CONFIG_GAMEPORT is not set | ||
445 | CONFIG_SOUND_GAMEPORT=y | ||
446 | |||
447 | # | ||
444 | # Character devices | 448 | # Character devices |
445 | # | 449 | # |
446 | # CONFIG_VT is not set | 450 | # CONFIG_VT is not set |
@@ -489,6 +493,10 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
489 | # CONFIG_RAW_DRIVER is not set | 493 | # CONFIG_RAW_DRIVER is not set |
490 | 494 | ||
491 | # | 495 | # |
496 | # TPM devices | ||
497 | # | ||
498 | |||
499 | # | ||
492 | # I2C support | 500 | # I2C support |
493 | # | 501 | # |
494 | # CONFIG_I2C is not set | 502 | # CONFIG_I2C is not set |
@@ -529,10 +537,6 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
529 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 537 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
530 | 538 | ||
531 | # | 539 | # |
532 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
533 | # | ||
534 | |||
535 | # | ||
536 | # USB Gadget Support | 540 | # USB Gadget Support |
537 | # | 541 | # |
538 | # CONFIG_USB_GADGET is not set | 542 | # CONFIG_USB_GADGET is not set |
@@ -708,8 +712,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
708 | # | 712 | # |
709 | # Kernel hacking | 713 | # Kernel hacking |
710 | # | 714 | # |
715 | # CONFIG_PRINTK_TIME is not set | ||
711 | # CONFIG_DEBUG_KERNEL is not set | 716 | # CONFIG_DEBUG_KERNEL is not set |
712 | CONFIG_DEBUG_PREEMPT=y | 717 | CONFIG_LOG_BUF_SHIFT=15 |
713 | # CONFIG_DEBUG_BUGVERBOSE is not set | 718 | # CONFIG_DEBUG_BUGVERBOSE is not set |
714 | # CONFIG_FRAME_POINTER is not set | 719 | # CONFIG_FRAME_POINTER is not set |
715 | 720 | ||
diff --git a/arch/m32r/mappi/defconfig.up b/arch/m32r/mappi/defconfig.up index c9253e94efbd..38910fb76692 100644 --- a/arch/m32r/mappi/defconfig.up +++ b/arch/m32r/mappi/defconfig.up | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:11:07 2005 | 4 | # Fri Jun 3 16:21:59 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -17,6 +17,7 @@ CONFIG_EXPERIMENTAL=y | |||
17 | CONFIG_BROKEN=y | 17 | CONFIG_BROKEN=y |
18 | CONFIG_BROKEN_ON_SMP=y | 18 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_LOCK_KERNEL=y | 19 | CONFIG_LOCK_KERNEL=y |
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
20 | 21 | ||
21 | # | 22 | # |
22 | # General setup | 23 | # General setup |
@@ -28,13 +29,15 @@ CONFIG_SYSVIPC=y | |||
28 | # CONFIG_BSD_PROCESS_ACCT is not set | 29 | # CONFIG_BSD_PROCESS_ACCT is not set |
29 | CONFIG_SYSCTL=y | 30 | CONFIG_SYSCTL=y |
30 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
31 | CONFIG_LOG_BUF_SHIFT=14 | ||
32 | CONFIG_HOTPLUG=y | 32 | CONFIG_HOTPLUG=y |
33 | CONFIG_KOBJECT_UEVENT=y | 33 | CONFIG_KOBJECT_UEVENT=y |
34 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
35 | CONFIG_IKCONFIG_PROC=y | 35 | CONFIG_IKCONFIG_PROC=y |
36 | CONFIG_EMBEDDED=y | 36 | CONFIG_EMBEDDED=y |
37 | # CONFIG_KALLSYMS is not set | 37 | # CONFIG_KALLSYMS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
40 | CONFIG_BASE_FULL=y | ||
38 | # CONFIG_FUTEX is not set | 41 | # CONFIG_FUTEX is not set |
39 | # CONFIG_EPOLL is not set | 42 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -44,6 +47,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
44 | CONFIG_CC_ALIGN_LOOPS=0 | 47 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 48 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 49 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | ||
47 | 51 | ||
48 | # | 52 | # |
49 | # Loadable module support | 53 | # Loadable module support |
@@ -65,6 +69,7 @@ CONFIG_PLAT_MAPPI=y | |||
65 | # CONFIG_PLAT_OPSPUT is not set | 69 | # CONFIG_PLAT_OPSPUT is not set |
66 | # CONFIG_PLAT_OAKS32R is not set | 70 | # CONFIG_PLAT_OAKS32R is not set |
67 | # CONFIG_PLAT_MAPPI2 is not set | 71 | # CONFIG_PLAT_MAPPI2 is not set |
72 | # CONFIG_PLAT_MAPPI3 is not set | ||
68 | CONFIG_CHIP_M32700=y | 73 | CONFIG_CHIP_M32700=y |
69 | # CONFIG_CHIP_M32102 is not set | 74 | # CONFIG_CHIP_M32102 is not set |
70 | # CONFIG_CHIP_VDEC2 is not set | 75 | # CONFIG_CHIP_VDEC2 is not set |
@@ -135,8 +140,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
135 | # | 140 | # |
136 | CONFIG_MTD=y | 141 | CONFIG_MTD=y |
137 | # CONFIG_MTD_DEBUG is not set | 142 | # CONFIG_MTD_DEBUG is not set |
138 | CONFIG_MTD_PARTITIONS=y | ||
139 | # CONFIG_MTD_CONCAT is not set | 143 | # CONFIG_MTD_CONCAT is not set |
144 | CONFIG_MTD_PARTITIONS=y | ||
140 | CONFIG_MTD_REDBOOT_PARTS=y | 145 | CONFIG_MTD_REDBOOT_PARTS=y |
141 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | 146 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 |
142 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | 147 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set |
@@ -290,7 +295,6 @@ CONFIG_NET=y | |||
290 | # Networking options | 295 | # Networking options |
291 | # | 296 | # |
292 | # CONFIG_PACKET is not set | 297 | # CONFIG_PACKET is not set |
293 | # CONFIG_NETLINK_DEV is not set | ||
294 | CONFIG_UNIX=y | 298 | CONFIG_UNIX=y |
295 | # CONFIG_NET_KEY is not set | 299 | # CONFIG_NET_KEY is not set |
296 | CONFIG_INET=y | 300 | CONFIG_INET=y |
@@ -416,18 +420,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
416 | # CONFIG_INPUT_EVBUG is not set | 420 | # CONFIG_INPUT_EVBUG is not set |
417 | 421 | ||
418 | # | 422 | # |
419 | # Input I/O drivers | ||
420 | # | ||
421 | # CONFIG_GAMEPORT is not set | ||
422 | CONFIG_SOUND_GAMEPORT=y | ||
423 | CONFIG_SERIO=y | ||
424 | # CONFIG_SERIO_I8042 is not set | ||
425 | # CONFIG_SERIO_SERPORT is not set | ||
426 | # CONFIG_SERIO_CT82C710 is not set | ||
427 | # CONFIG_SERIO_LIBPS2 is not set | ||
428 | # CONFIG_SERIO_RAW is not set | ||
429 | |||
430 | # | ||
431 | # Input Device Drivers | 423 | # Input Device Drivers |
432 | # | 424 | # |
433 | # CONFIG_INPUT_KEYBOARD is not set | 425 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -437,6 +429,17 @@ CONFIG_SERIO=y | |||
437 | # CONFIG_INPUT_MISC is not set | 429 | # CONFIG_INPUT_MISC is not set |
438 | 430 | ||
439 | # | 431 | # |
432 | # Hardware I/O ports | ||
433 | # | ||
434 | CONFIG_SERIO=y | ||
435 | # CONFIG_SERIO_I8042 is not set | ||
436 | # CONFIG_SERIO_SERPORT is not set | ||
437 | # CONFIG_SERIO_LIBPS2 is not set | ||
438 | # CONFIG_SERIO_RAW is not set | ||
439 | # CONFIG_GAMEPORT is not set | ||
440 | CONFIG_SOUND_GAMEPORT=y | ||
441 | |||
442 | # | ||
440 | # Character devices | 443 | # Character devices |
441 | # | 444 | # |
442 | # CONFIG_VT is not set | 445 | # CONFIG_VT is not set |
@@ -485,6 +488,10 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
485 | # CONFIG_RAW_DRIVER is not set | 488 | # CONFIG_RAW_DRIVER is not set |
486 | 489 | ||
487 | # | 490 | # |
491 | # TPM devices | ||
492 | # | ||
493 | |||
494 | # | ||
488 | # I2C support | 495 | # I2C support |
489 | # | 496 | # |
490 | # CONFIG_I2C is not set | 497 | # CONFIG_I2C is not set |
@@ -525,10 +532,6 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
525 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 532 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
526 | 533 | ||
527 | # | 534 | # |
528 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
529 | # | ||
530 | |||
531 | # | ||
532 | # USB Gadget Support | 535 | # USB Gadget Support |
533 | # | 536 | # |
534 | # CONFIG_USB_GADGET is not set | 537 | # CONFIG_USB_GADGET is not set |
@@ -704,8 +707,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
704 | # | 707 | # |
705 | # Kernel hacking | 708 | # Kernel hacking |
706 | # | 709 | # |
710 | # CONFIG_PRINTK_TIME is not set | ||
707 | # CONFIG_DEBUG_KERNEL is not set | 711 | # CONFIG_DEBUG_KERNEL is not set |
708 | CONFIG_DEBUG_PREEMPT=y | 712 | CONFIG_LOG_BUF_SHIFT=14 |
709 | # CONFIG_DEBUG_BUGVERBOSE is not set | 713 | # CONFIG_DEBUG_BUGVERBOSE is not set |
710 | # CONFIG_FRAME_POINTER is not set | 714 | # CONFIG_FRAME_POINTER is not set |
711 | 715 | ||
diff --git a/arch/m32r/mappi2/defconfig.vdec2 b/arch/m32r/mappi2/defconfig.vdec2 index c14791d27300..56f287b65898 100644 --- a/arch/m32r/mappi2/defconfig.vdec2 +++ b/arch/m32r/mappi2/defconfig.vdec2 | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:11:10 2005 | 4 | # Fri Jun 3 16:22:02 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -16,6 +16,7 @@ CONFIG_EXPERIMENTAL=y | |||
16 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 18 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | 20 | ||
20 | # | 21 | # |
21 | # General setup | 22 | # General setup |
@@ -28,13 +29,15 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
29 | CONFIG_SYSCTL=y | 30 | CONFIG_SYSCTL=y |
30 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
31 | CONFIG_LOG_BUF_SHIFT=14 | ||
32 | CONFIG_HOTPLUG=y | 32 | CONFIG_HOTPLUG=y |
33 | CONFIG_KOBJECT_UEVENT=y | 33 | CONFIG_KOBJECT_UEVENT=y |
34 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
35 | # CONFIG_IKCONFIG_PROC is not set | 35 | # CONFIG_IKCONFIG_PROC is not set |
36 | CONFIG_EMBEDDED=y | 36 | CONFIG_EMBEDDED=y |
37 | # CONFIG_KALLSYMS is not set | 37 | # CONFIG_KALLSYMS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
40 | CONFIG_BASE_FULL=y | ||
38 | # CONFIG_FUTEX is not set | 41 | # CONFIG_FUTEX is not set |
39 | # CONFIG_EPOLL is not set | 42 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -44,6 +47,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
44 | CONFIG_CC_ALIGN_LOOPS=0 | 47 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 48 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 49 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | ||
47 | 51 | ||
48 | # | 52 | # |
49 | # Loadable module support | 53 | # Loadable module support |
@@ -65,6 +69,7 @@ CONFIG_KMOD=y | |||
65 | # CONFIG_PLAT_OPSPUT is not set | 69 | # CONFIG_PLAT_OPSPUT is not set |
66 | # CONFIG_PLAT_OAKS32R is not set | 70 | # CONFIG_PLAT_OAKS32R is not set |
67 | CONFIG_PLAT_MAPPI2=y | 71 | CONFIG_PLAT_MAPPI2=y |
72 | # CONFIG_PLAT_MAPPI3 is not set | ||
68 | # CONFIG_CHIP_M32700 is not set | 73 | # CONFIG_CHIP_M32700 is not set |
69 | # CONFIG_CHIP_M32102 is not set | 74 | # CONFIG_CHIP_M32102 is not set |
70 | CONFIG_CHIP_VDEC2=y | 75 | CONFIG_CHIP_VDEC2=y |
@@ -264,7 +269,6 @@ CONFIG_NET=y | |||
264 | # | 269 | # |
265 | CONFIG_PACKET=y | 270 | CONFIG_PACKET=y |
266 | # CONFIG_PACKET_MMAP is not set | 271 | # CONFIG_PACKET_MMAP is not set |
267 | # CONFIG_NETLINK_DEV is not set | ||
268 | CONFIG_UNIX=y | 272 | CONFIG_UNIX=y |
269 | # CONFIG_NET_KEY is not set | 273 | # CONFIG_NET_KEY is not set |
270 | CONFIG_INET=y | 274 | CONFIG_INET=y |
@@ -389,18 +393,6 @@ CONFIG_INPUT=y | |||
389 | # CONFIG_INPUT_EVBUG is not set | 393 | # CONFIG_INPUT_EVBUG is not set |
390 | 394 | ||
391 | # | 395 | # |
392 | # Input I/O drivers | ||
393 | # | ||
394 | # CONFIG_GAMEPORT is not set | ||
395 | CONFIG_SOUND_GAMEPORT=y | ||
396 | CONFIG_SERIO=y | ||
397 | # CONFIG_SERIO_I8042 is not set | ||
398 | CONFIG_SERIO_SERPORT=y | ||
399 | # CONFIG_SERIO_CT82C710 is not set | ||
400 | # CONFIG_SERIO_LIBPS2 is not set | ||
401 | # CONFIG_SERIO_RAW is not set | ||
402 | |||
403 | # | ||
404 | # Input Device Drivers | 396 | # Input Device Drivers |
405 | # | 397 | # |
406 | # CONFIG_INPUT_KEYBOARD is not set | 398 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -410,6 +402,17 @@ CONFIG_SERIO_SERPORT=y | |||
410 | # CONFIG_INPUT_MISC is not set | 402 | # CONFIG_INPUT_MISC is not set |
411 | 403 | ||
412 | # | 404 | # |
405 | # Hardware I/O ports | ||
406 | # | ||
407 | CONFIG_SERIO=y | ||
408 | # CONFIG_SERIO_I8042 is not set | ||
409 | CONFIG_SERIO_SERPORT=y | ||
410 | # CONFIG_SERIO_LIBPS2 is not set | ||
411 | # CONFIG_SERIO_RAW is not set | ||
412 | # CONFIG_GAMEPORT is not set | ||
413 | CONFIG_SOUND_GAMEPORT=y | ||
414 | |||
415 | # | ||
413 | # Character devices | 416 | # Character devices |
414 | # | 417 | # |
415 | CONFIG_VT=y | 418 | CONFIG_VT=y |
@@ -460,6 +463,10 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
460 | # CONFIG_RAW_DRIVER is not set | 463 | # CONFIG_RAW_DRIVER is not set |
461 | 464 | ||
462 | # | 465 | # |
466 | # TPM devices | ||
467 | # | ||
468 | |||
469 | # | ||
463 | # I2C support | 470 | # I2C support |
464 | # | 471 | # |
465 | # CONFIG_I2C is not set | 472 | # CONFIG_I2C is not set |
@@ -521,10 +528,6 @@ CONFIG_DUMMY_CONSOLE=y | |||
521 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 528 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
522 | 529 | ||
523 | # | 530 | # |
524 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
525 | # | ||
526 | |||
527 | # | ||
528 | # USB Gadget Support | 531 | # USB Gadget Support |
529 | # | 532 | # |
530 | # CONFIG_USB_GADGET is not set | 533 | # CONFIG_USB_GADGET is not set |
@@ -697,8 +700,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
697 | # | 700 | # |
698 | # Kernel hacking | 701 | # Kernel hacking |
699 | # | 702 | # |
703 | # CONFIG_PRINTK_TIME is not set | ||
700 | # CONFIG_DEBUG_KERNEL is not set | 704 | # CONFIG_DEBUG_KERNEL is not set |
701 | CONFIG_DEBUG_PREEMPT=y | 705 | CONFIG_LOG_BUF_SHIFT=14 |
702 | # CONFIG_DEBUG_BUGVERBOSE is not set | 706 | # CONFIG_DEBUG_BUGVERBOSE is not set |
703 | # CONFIG_FRAME_POINTER is not set | 707 | # CONFIG_FRAME_POINTER is not set |
704 | 708 | ||
diff --git a/arch/m32r/mappi3/defconfig.smp b/arch/m32r/mappi3/defconfig.smp new file mode 100644 index 000000000000..2eebe75fc071 --- /dev/null +++ b/arch/m32r/mappi3/defconfig.smp | |||
@@ -0,0 +1,751 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.12-rc5 | ||
4 | # Tue May 31 17:55:34 2005 | ||
5 | # | ||
6 | CONFIG_M32R=y | ||
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | ||
9 | CONFIG_GENERIC_HARDIRQS=y | ||
10 | CONFIG_GENERIC_IRQ_PROBE=y | ||
11 | |||
12 | # | ||
13 | # Code maturity level options | ||
14 | # | ||
15 | CONFIG_EXPERIMENTAL=y | ||
16 | # CONFIG_CLEAN_COMPILE is not set | ||
17 | CONFIG_BROKEN=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | ||
19 | CONFIG_LOCK_KERNEL=y | ||
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
21 | |||
22 | # | ||
23 | # General setup | ||
24 | # | ||
25 | CONFIG_LOCALVERSION="" | ||
26 | CONFIG_SWAP=y | ||
27 | CONFIG_SYSVIPC=y | ||
28 | # CONFIG_POSIX_MQUEUE is not set | ||
29 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
30 | CONFIG_SYSCTL=y | ||
31 | # CONFIG_AUDIT is not set | ||
32 | CONFIG_HOTPLUG=y | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | ||
35 | CONFIG_IKCONFIG_PROC=y | ||
36 | # CONFIG_CPUSETS is not set | ||
37 | CONFIG_EMBEDDED=y | ||
38 | # CONFIG_KALLSYMS is not set | ||
39 | CONFIG_PRINTK=y | ||
40 | CONFIG_BUG=y | ||
41 | CONFIG_BASE_FULL=y | ||
42 | # CONFIG_FUTEX is not set | ||
43 | # CONFIG_EPOLL is not set | ||
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SHMEM=y | ||
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
47 | CONFIG_CC_ALIGN_LABELS=0 | ||
48 | CONFIG_CC_ALIGN_LOOPS=0 | ||
49 | CONFIG_CC_ALIGN_JUMPS=0 | ||
50 | # CONFIG_TINY_SHMEM is not set | ||
51 | CONFIG_BASE_SMALL=0 | ||
52 | |||
53 | # | ||
54 | # Loadable module support | ||
55 | # | ||
56 | CONFIG_MODULES=y | ||
57 | CONFIG_MODULE_UNLOAD=y | ||
58 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
59 | CONFIG_OBSOLETE_MODPARM=y | ||
60 | # CONFIG_MODVERSIONS is not set | ||
61 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
62 | CONFIG_KMOD=y | ||
63 | CONFIG_STOP_MACHINE=y | ||
64 | |||
65 | # | ||
66 | # Processor type and features | ||
67 | # | ||
68 | # CONFIG_PLAT_MAPPI is not set | ||
69 | # CONFIG_PLAT_USRV is not set | ||
70 | # CONFIG_PLAT_M32700UT is not set | ||
71 | # CONFIG_PLAT_OPSPUT is not set | ||
72 | # CONFIG_PLAT_OAKS32R is not set | ||
73 | # CONFIG_PLAT_MAPPI2 is not set | ||
74 | CONFIG_PLAT_MAPPI3=y | ||
75 | CONFIG_CHIP_M32700=y | ||
76 | # CONFIG_CHIP_M32102 is not set | ||
77 | # CONFIG_CHIP_VDEC2 is not set | ||
78 | # CONFIG_CHIP_OPSP is not set | ||
79 | CONFIG_MMU=y | ||
80 | CONFIG_TLB_ENTRIES=32 | ||
81 | CONFIG_ISA_M32R2=y | ||
82 | CONFIG_ISA_DSP_LEVEL2=y | ||
83 | CONFIG_ISA_DUAL_ISSUE=y | ||
84 | CONFIG_BUS_CLOCK=10000000 | ||
85 | CONFIG_TIMER_DIVIDE=128 | ||
86 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
87 | CONFIG_MEMORY_START=0x08000000 | ||
88 | CONFIG_MEMORY_SIZE=0x08000000 | ||
89 | CONFIG_NOHIGHMEM=y | ||
90 | CONFIG_DISCONTIGMEM=y | ||
91 | CONFIG_IRAM_START=0x00f00000 | ||
92 | CONFIG_IRAM_SIZE=0x00080000 | ||
93 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
94 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
95 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
96 | CONFIG_PREEMPT=y | ||
97 | # CONFIG_HAVE_DEC_LOCK is not set | ||
98 | CONFIG_SMP=y | ||
99 | # CONFIG_CHIP_M32700_TS1 is not set | ||
100 | CONFIG_NR_CPUS=2 | ||
101 | # CONFIG_NUMA is not set | ||
102 | |||
103 | # | ||
104 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
105 | # | ||
106 | # CONFIG_PCI is not set | ||
107 | # CONFIG_ISA is not set | ||
108 | |||
109 | # | ||
110 | # PCCARD (PCMCIA/CardBus) support | ||
111 | # | ||
112 | CONFIG_PCCARD=y | ||
113 | # CONFIG_PCMCIA_DEBUG is not set | ||
114 | CONFIG_PCMCIA=y | ||
115 | |||
116 | # | ||
117 | # PC-card bridges | ||
118 | # | ||
119 | # CONFIG_TCIC is not set | ||
120 | # CONFIG_M32R_PCC is not set | ||
121 | # CONFIG_M32R_CFC is not set | ||
122 | |||
123 | # | ||
124 | # PCI Hotplug Support | ||
125 | # | ||
126 | |||
127 | # | ||
128 | # Executable file formats | ||
129 | # | ||
130 | CONFIG_BINFMT_ELF=y | ||
131 | # CONFIG_BINFMT_MISC is not set | ||
132 | |||
133 | # | ||
134 | # Device Drivers | ||
135 | # | ||
136 | |||
137 | # | ||
138 | # Generic Driver Options | ||
139 | # | ||
140 | CONFIG_STANDALONE=y | ||
141 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
142 | CONFIG_FW_LOADER=y | ||
143 | |||
144 | # | ||
145 | # Memory Technology Devices (MTD) | ||
146 | # | ||
147 | CONFIG_MTD=y | ||
148 | # CONFIG_MTD_DEBUG is not set | ||
149 | # CONFIG_MTD_CONCAT is not set | ||
150 | CONFIG_MTD_PARTITIONS=y | ||
151 | CONFIG_MTD_REDBOOT_PARTS=y | ||
152 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
153 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
154 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
155 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
156 | |||
157 | # | ||
158 | # User Modules And Translation Layers | ||
159 | # | ||
160 | CONFIG_MTD_CHAR=y | ||
161 | CONFIG_MTD_BLOCK=y | ||
162 | # CONFIG_FTL is not set | ||
163 | # CONFIG_NFTL is not set | ||
164 | # CONFIG_INFTL is not set | ||
165 | |||
166 | # | ||
167 | # RAM/ROM/Flash chip drivers | ||
168 | # | ||
169 | # CONFIG_MTD_CFI is not set | ||
170 | # CONFIG_MTD_JEDECPROBE is not set | ||
171 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
172 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
173 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
174 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
175 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
176 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
177 | CONFIG_MTD_CFI_I1=y | ||
178 | CONFIG_MTD_CFI_I2=y | ||
179 | # CONFIG_MTD_CFI_I4 is not set | ||
180 | # CONFIG_MTD_CFI_I8 is not set | ||
181 | # CONFIG_MTD_RAM is not set | ||
182 | # CONFIG_MTD_ROM is not set | ||
183 | # CONFIG_MTD_ABSENT is not set | ||
184 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
185 | |||
186 | # | ||
187 | # Mapping drivers for chip access | ||
188 | # | ||
189 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
190 | |||
191 | # | ||
192 | # Self-contained MTD device drivers | ||
193 | # | ||
194 | # CONFIG_MTD_SLRAM is not set | ||
195 | # CONFIG_MTD_PHRAM is not set | ||
196 | # CONFIG_MTD_MTDRAM is not set | ||
197 | # CONFIG_MTD_BLKMTD is not set | ||
198 | # CONFIG_MTD_BLOCK2MTD is not set | ||
199 | |||
200 | # | ||
201 | # Disk-On-Chip Device Drivers | ||
202 | # | ||
203 | # CONFIG_MTD_DOC2000 is not set | ||
204 | # CONFIG_MTD_DOC2001 is not set | ||
205 | # CONFIG_MTD_DOC2001PLUS is not set | ||
206 | |||
207 | # | ||
208 | # NAND Flash Device Drivers | ||
209 | # | ||
210 | # CONFIG_MTD_NAND is not set | ||
211 | |||
212 | # | ||
213 | # Parallel port support | ||
214 | # | ||
215 | # CONFIG_PARPORT is not set | ||
216 | |||
217 | # | ||
218 | # Plug and Play support | ||
219 | # | ||
220 | |||
221 | # | ||
222 | # Block devices | ||
223 | # | ||
224 | # CONFIG_BLK_DEV_FD is not set | ||
225 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
226 | CONFIG_BLK_DEV_LOOP=y | ||
227 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
228 | CONFIG_BLK_DEV_NBD=m | ||
229 | CONFIG_BLK_DEV_RAM=y | ||
230 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
231 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
232 | CONFIG_BLK_DEV_INITRD=y | ||
233 | CONFIG_INITRAMFS_SOURCE="" | ||
234 | # CONFIG_CDROM_PKTCDVD is not set | ||
235 | |||
236 | # | ||
237 | # IO Schedulers | ||
238 | # | ||
239 | CONFIG_IOSCHED_NOOP=y | ||
240 | # CONFIG_IOSCHED_AS is not set | ||
241 | CONFIG_IOSCHED_DEADLINE=y | ||
242 | CONFIG_IOSCHED_CFQ=y | ||
243 | # CONFIG_ATA_OVER_ETH is not set | ||
244 | |||
245 | # | ||
246 | # ATA/ATAPI/MFM/RLL support | ||
247 | # | ||
248 | CONFIG_IDE=y | ||
249 | CONFIG_BLK_DEV_IDE=y | ||
250 | |||
251 | # | ||
252 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
253 | # | ||
254 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
255 | CONFIG_BLK_DEV_IDEDISK=y | ||
256 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
257 | CONFIG_BLK_DEV_IDECS=y | ||
258 | CONFIG_BLK_DEV_IDECD=m | ||
259 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
260 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
261 | # CONFIG_IDE_TASK_IOCTL is not set | ||
262 | |||
263 | # | ||
264 | # IDE chipset support/bugfixes | ||
265 | # | ||
266 | CONFIG_IDE_GENERIC=y | ||
267 | # CONFIG_IDE_ARM is not set | ||
268 | # CONFIG_BLK_DEV_IDEDMA is not set | ||
269 | # CONFIG_IDEDMA_AUTO is not set | ||
270 | # CONFIG_BLK_DEV_HD is not set | ||
271 | |||
272 | # | ||
273 | # SCSI device support | ||
274 | # | ||
275 | # CONFIG_SCSI is not set | ||
276 | |||
277 | # | ||
278 | # Multi-device support (RAID and LVM) | ||
279 | # | ||
280 | # CONFIG_MD is not set | ||
281 | |||
282 | # | ||
283 | # Fusion MPT device support | ||
284 | # | ||
285 | |||
286 | # | ||
287 | # IEEE 1394 (FireWire) support | ||
288 | # | ||
289 | # CONFIG_IEEE1394 is not set | ||
290 | |||
291 | # | ||
292 | # I2O device support | ||
293 | # | ||
294 | |||
295 | # | ||
296 | # Networking support | ||
297 | # | ||
298 | CONFIG_NET=y | ||
299 | |||
300 | # | ||
301 | # Networking options | ||
302 | # | ||
303 | # CONFIG_PACKET is not set | ||
304 | CONFIG_UNIX=y | ||
305 | # CONFIG_NET_KEY is not set | ||
306 | CONFIG_INET=y | ||
307 | # CONFIG_IP_MULTICAST is not set | ||
308 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
309 | CONFIG_IP_PNP=y | ||
310 | CONFIG_IP_PNP_DHCP=y | ||
311 | # CONFIG_IP_PNP_BOOTP is not set | ||
312 | # CONFIG_IP_PNP_RARP is not set | ||
313 | # CONFIG_NET_IPIP is not set | ||
314 | # CONFIG_NET_IPGRE is not set | ||
315 | # CONFIG_ARPD is not set | ||
316 | # CONFIG_SYN_COOKIES is not set | ||
317 | # CONFIG_INET_AH is not set | ||
318 | # CONFIG_INET_ESP is not set | ||
319 | # CONFIG_INET_IPCOMP is not set | ||
320 | # CONFIG_INET_TUNNEL is not set | ||
321 | CONFIG_IP_TCPDIAG=y | ||
322 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
323 | # CONFIG_IPV6 is not set | ||
324 | # CONFIG_NETFILTER is not set | ||
325 | |||
326 | # | ||
327 | # SCTP Configuration (EXPERIMENTAL) | ||
328 | # | ||
329 | # CONFIG_IP_SCTP is not set | ||
330 | # CONFIG_ATM is not set | ||
331 | # CONFIG_BRIDGE is not set | ||
332 | # CONFIG_VLAN_8021Q is not set | ||
333 | # CONFIG_DECNET is not set | ||
334 | # CONFIG_LLC2 is not set | ||
335 | # CONFIG_IPX is not set | ||
336 | # CONFIG_ATALK is not set | ||
337 | # CONFIG_X25 is not set | ||
338 | # CONFIG_LAPB is not set | ||
339 | # CONFIG_NET_DIVERT is not set | ||
340 | # CONFIG_ECONET is not set | ||
341 | # CONFIG_WAN_ROUTER is not set | ||
342 | |||
343 | # | ||
344 | # QoS and/or fair queueing | ||
345 | # | ||
346 | # CONFIG_NET_SCHED is not set | ||
347 | # CONFIG_NET_CLS_ROUTE is not set | ||
348 | |||
349 | # | ||
350 | # Network testing | ||
351 | # | ||
352 | # CONFIG_NET_PKTGEN is not set | ||
353 | # CONFIG_NETPOLL is not set | ||
354 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
355 | # CONFIG_HAMRADIO is not set | ||
356 | # CONFIG_IRDA is not set | ||
357 | # CONFIG_BT is not set | ||
358 | CONFIG_NETDEVICES=y | ||
359 | # CONFIG_DUMMY is not set | ||
360 | # CONFIG_BONDING is not set | ||
361 | # CONFIG_EQUALIZER is not set | ||
362 | # CONFIG_TUN is not set | ||
363 | |||
364 | # | ||
365 | # Ethernet (10 or 100Mbit) | ||
366 | # | ||
367 | CONFIG_NET_ETHERNET=y | ||
368 | CONFIG_MII=y | ||
369 | CONFIG_SMC91X=y | ||
370 | # CONFIG_NE2000 is not set | ||
371 | |||
372 | # | ||
373 | # Ethernet (1000 Mbit) | ||
374 | # | ||
375 | |||
376 | # | ||
377 | # Ethernet (10000 Mbit) | ||
378 | # | ||
379 | |||
380 | # | ||
381 | # Token Ring devices | ||
382 | # | ||
383 | |||
384 | # | ||
385 | # Wireless LAN (non-hamradio) | ||
386 | # | ||
387 | # CONFIG_NET_RADIO is not set | ||
388 | |||
389 | # | ||
390 | # PCMCIA network device support | ||
391 | # | ||
392 | # CONFIG_NET_PCMCIA is not set | ||
393 | |||
394 | # | ||
395 | # Wan interfaces | ||
396 | # | ||
397 | # CONFIG_WAN is not set | ||
398 | # CONFIG_PPP is not set | ||
399 | # CONFIG_SLIP is not set | ||
400 | # CONFIG_SHAPER is not set | ||
401 | # CONFIG_NETCONSOLE is not set | ||
402 | |||
403 | # | ||
404 | # ISDN subsystem | ||
405 | # | ||
406 | # CONFIG_ISDN is not set | ||
407 | |||
408 | # | ||
409 | # Telephony Support | ||
410 | # | ||
411 | # CONFIG_PHONE is not set | ||
412 | |||
413 | # | ||
414 | # Input device support | ||
415 | # | ||
416 | CONFIG_INPUT=y | ||
417 | |||
418 | # | ||
419 | # Userland interfaces | ||
420 | # | ||
421 | CONFIG_INPUT_MOUSEDEV=y | ||
422 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
423 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
424 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
425 | # CONFIG_INPUT_JOYDEV is not set | ||
426 | # CONFIG_INPUT_TSDEV is not set | ||
427 | # CONFIG_INPUT_EVDEV is not set | ||
428 | # CONFIG_INPUT_EVBUG is not set | ||
429 | |||
430 | # | ||
431 | # Input Device Drivers | ||
432 | # | ||
433 | # CONFIG_INPUT_KEYBOARD is not set | ||
434 | # CONFIG_INPUT_MOUSE is not set | ||
435 | # CONFIG_INPUT_JOYSTICK is not set | ||
436 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
437 | # CONFIG_INPUT_MISC is not set | ||
438 | |||
439 | # | ||
440 | # Hardware I/O ports | ||
441 | # | ||
442 | CONFIG_SERIO=y | ||
443 | # CONFIG_SERIO_I8042 is not set | ||
444 | # CONFIG_SERIO_SERPORT is not set | ||
445 | # CONFIG_SERIO_LIBPS2 is not set | ||
446 | # CONFIG_SERIO_RAW is not set | ||
447 | # CONFIG_GAMEPORT is not set | ||
448 | CONFIG_SOUND_GAMEPORT=y | ||
449 | |||
450 | # | ||
451 | # Character devices | ||
452 | # | ||
453 | # CONFIG_VT is not set | ||
454 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
455 | |||
456 | # | ||
457 | # Serial drivers | ||
458 | # | ||
459 | # CONFIG_SERIAL_8250 is not set | ||
460 | |||
461 | # | ||
462 | # Non-8250 serial port support | ||
463 | # | ||
464 | CONFIG_SERIAL_CORE=y | ||
465 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
466 | CONFIG_SERIAL_M32R_SIO=y | ||
467 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | ||
468 | # CONFIG_SERIAL_M32R_PLDSIO is not set | ||
469 | CONFIG_UNIX98_PTYS=y | ||
470 | CONFIG_LEGACY_PTYS=y | ||
471 | CONFIG_LEGACY_PTY_COUNT=256 | ||
472 | |||
473 | # | ||
474 | # IPMI | ||
475 | # | ||
476 | # CONFIG_IPMI_HANDLER is not set | ||
477 | |||
478 | # | ||
479 | # Watchdog Cards | ||
480 | # | ||
481 | # CONFIG_WATCHDOG is not set | ||
482 | # CONFIG_RTC is not set | ||
483 | # CONFIG_GEN_RTC is not set | ||
484 | # CONFIG_DTLK is not set | ||
485 | # CONFIG_R3964 is not set | ||
486 | |||
487 | # | ||
488 | # Ftape, the floppy tape device driver | ||
489 | # | ||
490 | # CONFIG_DRM is not set | ||
491 | |||
492 | # | ||
493 | # PCMCIA character devices | ||
494 | # | ||
495 | # CONFIG_SYNCLINK_CS is not set | ||
496 | # CONFIG_RAW_DRIVER is not set | ||
497 | |||
498 | # | ||
499 | # TPM devices | ||
500 | # | ||
501 | |||
502 | # | ||
503 | # I2C support | ||
504 | # | ||
505 | # CONFIG_I2C is not set | ||
506 | |||
507 | # | ||
508 | # Dallas's 1-wire bus | ||
509 | # | ||
510 | # CONFIG_W1 is not set | ||
511 | |||
512 | # | ||
513 | # Misc devices | ||
514 | # | ||
515 | |||
516 | # | ||
517 | # Multimedia devices | ||
518 | # | ||
519 | # CONFIG_VIDEO_DEV is not set | ||
520 | |||
521 | # | ||
522 | # Digital Video Broadcasting Devices | ||
523 | # | ||
524 | # CONFIG_DVB is not set | ||
525 | |||
526 | # | ||
527 | # Graphics support | ||
528 | # | ||
529 | # CONFIG_FB is not set | ||
530 | |||
531 | # | ||
532 | # Sound | ||
533 | # | ||
534 | # CONFIG_SOUND is not set | ||
535 | |||
536 | # | ||
537 | # USB support | ||
538 | # | ||
539 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
540 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
541 | |||
542 | # | ||
543 | # USB Gadget Support | ||
544 | # | ||
545 | # CONFIG_USB_GADGET is not set | ||
546 | |||
547 | # | ||
548 | # MMC/SD Card support | ||
549 | # | ||
550 | # CONFIG_MMC is not set | ||
551 | |||
552 | # | ||
553 | # InfiniBand support | ||
554 | # | ||
555 | # CONFIG_INFINIBAND is not set | ||
556 | |||
557 | # | ||
558 | # File systems | ||
559 | # | ||
560 | CONFIG_EXT2_FS=y | ||
561 | # CONFIG_EXT2_FS_XATTR is not set | ||
562 | CONFIG_EXT3_FS=y | ||
563 | CONFIG_EXT3_FS_XATTR=y | ||
564 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
565 | # CONFIG_EXT3_FS_SECURITY is not set | ||
566 | CONFIG_JBD=y | ||
567 | # CONFIG_JBD_DEBUG is not set | ||
568 | CONFIG_FS_MBCACHE=y | ||
569 | # CONFIG_REISERFS_FS is not set | ||
570 | # CONFIG_JFS_FS is not set | ||
571 | |||
572 | # | ||
573 | # XFS support | ||
574 | # | ||
575 | # CONFIG_XFS_FS is not set | ||
576 | # CONFIG_MINIX_FS is not set | ||
577 | CONFIG_ROMFS_FS=y | ||
578 | # CONFIG_QUOTA is not set | ||
579 | CONFIG_DNOTIFY=y | ||
580 | # CONFIG_AUTOFS_FS is not set | ||
581 | # CONFIG_AUTOFS4_FS is not set | ||
582 | |||
583 | # | ||
584 | # CD-ROM/DVD Filesystems | ||
585 | # | ||
586 | CONFIG_ISO9660_FS=y | ||
587 | # CONFIG_JOLIET is not set | ||
588 | # CONFIG_ZISOFS is not set | ||
589 | # CONFIG_UDF_FS is not set | ||
590 | |||
591 | # | ||
592 | # DOS/FAT/NT Filesystems | ||
593 | # | ||
594 | CONFIG_FAT_FS=m | ||
595 | CONFIG_MSDOS_FS=m | ||
596 | CONFIG_VFAT_FS=m | ||
597 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
598 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
599 | # CONFIG_NTFS_FS is not set | ||
600 | |||
601 | # | ||
602 | # Pseudo filesystems | ||
603 | # | ||
604 | CONFIG_PROC_FS=y | ||
605 | CONFIG_PROC_KCORE=y | ||
606 | CONFIG_SYSFS=y | ||
607 | CONFIG_DEVFS_FS=y | ||
608 | CONFIG_DEVFS_MOUNT=y | ||
609 | # CONFIG_DEVFS_DEBUG is not set | ||
610 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
611 | CONFIG_TMPFS=y | ||
612 | # CONFIG_TMPFS_XATTR is not set | ||
613 | # CONFIG_HUGETLBFS is not set | ||
614 | # CONFIG_HUGETLB_PAGE is not set | ||
615 | CONFIG_RAMFS=y | ||
616 | |||
617 | # | ||
618 | # Miscellaneous filesystems | ||
619 | # | ||
620 | # CONFIG_ADFS_FS is not set | ||
621 | # CONFIG_AFFS_FS is not set | ||
622 | # CONFIG_HFS_FS is not set | ||
623 | # CONFIG_HFSPLUS_FS is not set | ||
624 | # CONFIG_BEFS_FS is not set | ||
625 | # CONFIG_BFS_FS is not set | ||
626 | # CONFIG_EFS_FS is not set | ||
627 | CONFIG_JFFS_FS=y | ||
628 | CONFIG_JFFS_FS_VERBOSE=0 | ||
629 | CONFIG_JFFS_PROC_FS=y | ||
630 | CONFIG_JFFS2_FS=y | ||
631 | CONFIG_JFFS2_FS_DEBUG=0 | ||
632 | # CONFIG_JFFS2_FS_NAND is not set | ||
633 | # CONFIG_JFFS2_FS_NOR_ECC is not set | ||
634 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
635 | CONFIG_JFFS2_ZLIB=y | ||
636 | CONFIG_JFFS2_RTIME=y | ||
637 | # CONFIG_JFFS2_RUBIN is not set | ||
638 | # CONFIG_CRAMFS is not set | ||
639 | # CONFIG_VXFS_FS is not set | ||
640 | # CONFIG_HPFS_FS is not set | ||
641 | # CONFIG_QNX4FS_FS is not set | ||
642 | # CONFIG_SYSV_FS is not set | ||
643 | # CONFIG_UFS_FS is not set | ||
644 | |||
645 | # | ||
646 | # Network File Systems | ||
647 | # | ||
648 | CONFIG_NFS_FS=y | ||
649 | CONFIG_NFS_V3=y | ||
650 | # CONFIG_NFS_V4 is not set | ||
651 | # CONFIG_NFS_DIRECTIO is not set | ||
652 | # CONFIG_NFSD is not set | ||
653 | CONFIG_ROOT_NFS=y | ||
654 | CONFIG_LOCKD=y | ||
655 | CONFIG_LOCKD_V4=y | ||
656 | CONFIG_SUNRPC=y | ||
657 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
658 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
659 | # CONFIG_SMB_FS is not set | ||
660 | # CONFIG_CIFS is not set | ||
661 | # CONFIG_NCP_FS is not set | ||
662 | # CONFIG_CODA_FS is not set | ||
663 | # CONFIG_AFS_FS is not set | ||
664 | |||
665 | # | ||
666 | # Partition Types | ||
667 | # | ||
668 | # CONFIG_PARTITION_ADVANCED is not set | ||
669 | CONFIG_MSDOS_PARTITION=y | ||
670 | |||
671 | # | ||
672 | # Native Language Support | ||
673 | # | ||
674 | CONFIG_NLS=y | ||
675 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
676 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
677 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
678 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
679 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
680 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
681 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
682 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
683 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
684 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
685 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
686 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
687 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
688 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
689 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
690 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
691 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
692 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
693 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
694 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
695 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
696 | # CONFIG_NLS_ISO8859_8 is not set | ||
697 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
698 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
699 | # CONFIG_NLS_ASCII is not set | ||
700 | # CONFIG_NLS_ISO8859_1 is not set | ||
701 | # CONFIG_NLS_ISO8859_2 is not set | ||
702 | # CONFIG_NLS_ISO8859_3 is not set | ||
703 | # CONFIG_NLS_ISO8859_4 is not set | ||
704 | # CONFIG_NLS_ISO8859_5 is not set | ||
705 | # CONFIG_NLS_ISO8859_6 is not set | ||
706 | # CONFIG_NLS_ISO8859_7 is not set | ||
707 | # CONFIG_NLS_ISO8859_9 is not set | ||
708 | # CONFIG_NLS_ISO8859_13 is not set | ||
709 | # CONFIG_NLS_ISO8859_14 is not set | ||
710 | # CONFIG_NLS_ISO8859_15 is not set | ||
711 | # CONFIG_NLS_KOI8_R is not set | ||
712 | # CONFIG_NLS_KOI8_U is not set | ||
713 | # CONFIG_NLS_UTF8 is not set | ||
714 | |||
715 | # | ||
716 | # Profiling support | ||
717 | # | ||
718 | # CONFIG_PROFILING is not set | ||
719 | |||
720 | # | ||
721 | # Kernel hacking | ||
722 | # | ||
723 | # CONFIG_PRINTK_TIME is not set | ||
724 | # CONFIG_DEBUG_KERNEL is not set | ||
725 | CONFIG_LOG_BUF_SHIFT=15 | ||
726 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
727 | # CONFIG_FRAME_POINTER is not set | ||
728 | |||
729 | # | ||
730 | # Security options | ||
731 | # | ||
732 | # CONFIG_KEYS is not set | ||
733 | # CONFIG_SECURITY is not set | ||
734 | |||
735 | # | ||
736 | # Cryptographic options | ||
737 | # | ||
738 | # CONFIG_CRYPTO is not set | ||
739 | |||
740 | # | ||
741 | # Hardware crypto devices | ||
742 | # | ||
743 | |||
744 | # | ||
745 | # Library routines | ||
746 | # | ||
747 | # CONFIG_CRC_CCITT is not set | ||
748 | CONFIG_CRC32=y | ||
749 | # CONFIG_LIBCRC32C is not set | ||
750 | CONFIG_ZLIB_INFLATE=y | ||
751 | CONFIG_ZLIB_DEFLATE=y | ||
diff --git a/arch/m32r/mappi3/dot.gdbinit b/arch/m32r/mappi3/dot.gdbinit new file mode 100644 index 000000000000..89c22184e139 --- /dev/null +++ b/arch/m32r/mappi3/dot.gdbinit | |||
@@ -0,0 +1,224 @@ | |||
1 | # .gdbinit file | ||
2 | # $Id: dot.gdbinit,v 1.1 2005/04/11 02:21:08 sakugawa Exp $ | ||
3 | |||
4 | # setting | ||
5 | set width 0d70 | ||
6 | set radix 0d16 | ||
7 | use_debug_dma | ||
8 | |||
9 | # Initialize SDRAM controller for Mappi | ||
10 | define sdram_init | ||
11 | # SDIR0 | ||
12 | set *(unsigned long *)0x00ef6008 = 0x00000182 | ||
13 | # SDIR1 | ||
14 | set *(unsigned long *)0x00ef600c = 0x00000001 | ||
15 | # Initialize wait | ||
16 | shell sleep 0.1 | ||
17 | # MOD | ||
18 | set *(unsigned long *)0x00ef602c = 0x00000020 | ||
19 | set *(unsigned long *)0x00ef604c = 0x00000020 | ||
20 | # TR | ||
21 | set *(unsigned long *)0x00ef6028 = 0x00051502 | ||
22 | set *(unsigned long *)0x00ef6048 = 0x00051502 | ||
23 | # ADR | ||
24 | set *(unsigned long *)0x00ef6020 = 0x08000004 | ||
25 | set *(unsigned long *)0x00ef6040 = 0x0c000004 | ||
26 | # AutoRef On | ||
27 | set *(unsigned long *)0x00ef6004 = 0x00010517 | ||
28 | # Access enable | ||
29 | set *(unsigned long *)0x00ef6024 = 0x00000001 | ||
30 | set *(unsigned long *)0x00ef6044 = 0x00000001 | ||
31 | end | ||
32 | |||
33 | # Initialize LAN controller for Mappi | ||
34 | define lanc_init | ||
35 | # Set BSEL4 | ||
36 | #set *(unsigned long *)0x00ef5004 = 0x0fff330f | ||
37 | #set *(unsigned long *)0x00ef5004 = 0x01113301 | ||
38 | |||
39 | # set *(unsigned long *)0x00ef5004 = 0x02011101 | ||
40 | # set *(unsigned long *)0x00ef5004 = 0x04441104 | ||
41 | end | ||
42 | |||
43 | define clock_init | ||
44 | set *(unsigned long *)0x00ef4010 = 2 | ||
45 | set *(unsigned long *)0x00ef4014 = 2 | ||
46 | set *(unsigned long *)0x00ef4020 = 3 | ||
47 | set *(unsigned long *)0x00ef4024 = 3 | ||
48 | set *(unsigned long *)0x00ef4004 = 0x7 | ||
49 | # shell sleep 0.1 | ||
50 | # set *(unsigned long *)0x00ef4004 = 0x5 | ||
51 | shell sleep 0.1 | ||
52 | set *(unsigned long *)0x00ef4008 = 0x0200 | ||
53 | end | ||
54 | |||
55 | define port_init | ||
56 | set $sfrbase = 0x00ef0000 | ||
57 | set *(unsigned short *)0x00ef1060 = 0x5555 | ||
58 | set *(unsigned short *)0x00ef1062 = 0x5555 | ||
59 | set *(unsigned short *)0x00ef1064 = 0x5555 | ||
60 | set *(unsigned short *)0x00ef1066 = 0x5555 | ||
61 | set *(unsigned short *)0x00ef1068 = 0x5555 | ||
62 | set *(unsigned short *)0x00ef106a = 0x0000 | ||
63 | set *(unsigned short *)0x00ef106e = 0x5555 | ||
64 | set *(unsigned short *)0x00ef1070 = 0x5555 | ||
65 | end | ||
66 | |||
67 | # MMU enable | ||
68 | define mmu_enable | ||
69 | set $evb=0x88000000 | ||
70 | set *(unsigned long *)0xffff0024=1 | ||
71 | end | ||
72 | |||
73 | # MMU disable | ||
74 | define mmu_disable | ||
75 | set $evb=0 | ||
76 | set *(unsigned long *)0xffff0024=0 | ||
77 | end | ||
78 | |||
79 | # Show TLB entries | ||
80 | define show_tlb_entries | ||
81 | set $i = 0 | ||
82 | set $addr = $arg0 | ||
83 | while ($i < 0d16 ) | ||
84 | set $tlb_tag = *(unsigned long*)$addr | ||
85 | set $tlb_data = *(unsigned long*)($addr + 4) | ||
86 | printf " [%2d] 0x%08lx : 0x%08lx - 0x%08lx\n", $i, $addr, $tlb_tag, $tlb_data | ||
87 | set $i = $i + 1 | ||
88 | set $addr = $addr + 8 | ||
89 | end | ||
90 | end | ||
91 | define itlb | ||
92 | set $itlb=0xfe000000 | ||
93 | show_tlb_entries $itlb | ||
94 | end | ||
95 | define dtlb | ||
96 | set $dtlb=0xfe000800 | ||
97 | show_tlb_entries $dtlb | ||
98 | end | ||
99 | |||
100 | # Cache ON | ||
101 | define set_cache_type | ||
102 | set $mctype = (void*)0xfffffff8 | ||
103 | # chaos | ||
104 | # set *(unsigned long *)($mctype) = 0x0000c000 | ||
105 | # m32102 i-cache only | ||
106 | set *(unsigned long *)($mctype) = 0x00008000 | ||
107 | # m32102 d-cache only | ||
108 | # set *(unsigned long *)($mctype) = 0x00004000 | ||
109 | end | ||
110 | define cache_on | ||
111 | set $param = (void*)0x08001000 | ||
112 | set *(unsigned long *)($param) = 0x60ff6102 | ||
113 | end | ||
114 | |||
115 | |||
116 | # Show current task structure | ||
117 | define show_current | ||
118 | set $current = $spi & 0xffffe000 | ||
119 | printf "$current=0x%08lX\n",$current | ||
120 | print *(struct task_struct *)$current | ||
121 | end | ||
122 | |||
123 | # Show user assigned task structure | ||
124 | define show_task | ||
125 | set $task = $arg0 & 0xffffe000 | ||
126 | printf "$task=0x%08lX\n",$task | ||
127 | print *(struct task_struct *)$task | ||
128 | end | ||
129 | document show_task | ||
130 | Show user assigned task structure | ||
131 | arg0 : task structure address | ||
132 | end | ||
133 | |||
134 | # Show M32R registers | ||
135 | define show_regs | ||
136 | printf " R0[0x%08lX] R1[0x%08lX] R2[0x%08lX] R3[0x%08lX]\n",$r0,$r1,$r2,$r3 | ||
137 | printf " R4[0x%08lX] R5[0x%08lX] R6[0x%08lX] R7[0x%08lX]\n",$r4,$r5,$r6,$r7 | ||
138 | printf " R8[0x%08lX] R9[0x%08lX] R10[0x%08lX] R11[0x%08lX]\n",$r8,$r9,$r10,$r11 | ||
139 | printf "R12[0x%08lX] FP[0x%08lX] LR[0x%08lX] SP[0x%08lX]\n",$r12,$fp,$lr,$sp | ||
140 | printf "PSW[0x%08lX] CBR[0x%08lX] SPI[0x%08lX] SPU[0x%08lX]\n",$psw,$cbr,$spi,$spu | ||
141 | printf "BPC[0x%08lX] PC[0x%08lX] ACCL[0x%08lX] ACCH[0x%08lX]\n",$bpc,$pc,$accl,$acch | ||
142 | printf "EVB[0x%08lX]\n",$evb | ||
143 | |||
144 | set $mests = *(unsigned long *)0xffff000c | ||
145 | set $mdeva = *(unsigned long *)0xffff0010 | ||
146 | printf "MESTS[0x%08lX] MDEVA[0x%08lX]\n",$mests,$mdeva | ||
147 | end | ||
148 | |||
149 | |||
150 | # Setup all | ||
151 | define setup | ||
152 | clock_init | ||
153 | shell sleep 0.1 | ||
154 | port_init | ||
155 | sdram_init | ||
156 | # lanc_init | ||
157 | # dispc_init | ||
158 | # set $evb=0x08000000 | ||
159 | end | ||
160 | |||
161 | # Load modules | ||
162 | define load_modules | ||
163 | use_debug_dma | ||
164 | load | ||
165 | # load busybox.mot | ||
166 | end | ||
167 | |||
168 | # Set kernel parameters | ||
169 | define set_kernel_parameters | ||
170 | set $param = (void*)0x08001000 | ||
171 | |||
172 | ## MOUNT_ROOT_RDONLY | ||
173 | set {long}($param+0x00)=0 | ||
174 | ## RAMDISK_FLAGS | ||
175 | #set {long}($param+0x04)=0 | ||
176 | ## ORIG_ROOT_DEV | ||
177 | #set {long}($param+0x08)=0x00000100 | ||
178 | ## LOADER_TYPE | ||
179 | #set {long}($param+0x0C)=0 | ||
180 | ## INITRD_START | ||
181 | set {long}($param+0x10)=0x082a0000 | ||
182 | ## INITRD_SIZE | ||
183 | set {long}($param+0x14)=0d6200000 | ||
184 | |||
185 | # M32R_CPUCLK | ||
186 | set *(unsigned long *)($param + 0x0018) = 0d100000000 | ||
187 | # M32R_BUSCLK | ||
188 | set *(unsigned long *)($param + 0x001c) = 0d50000000 | ||
189 | # M32R_TIMER_DIVIDE | ||
190 | set *(unsigned long *)($param + 0x0020) = 0d128 | ||
191 | |||
192 | |||
193 | set {char[0x200]}($param + 0x100) = "console=ttyS0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.2.6_04 nfsaddrs=192.168.0.102:192.168.0.1:192.168.0.1:255.255.255.0:mappi: \0" | ||
194 | |||
195 | |||
196 | end | ||
197 | |||
198 | # Boot | ||
199 | define boot | ||
200 | set_kernel_parameters | ||
201 | debug_chaos | ||
202 | set *(unsigned long *)0x00f00000=0x08002000 | ||
203 | set $pc=0x08002000 | ||
204 | set $fp=0 | ||
205 | del b | ||
206 | si | ||
207 | end | ||
208 | |||
209 | # Restart | ||
210 | define restart | ||
211 | sdireset | ||
212 | sdireset | ||
213 | setup | ||
214 | load_modules | ||
215 | boot | ||
216 | end | ||
217 | |||
218 | sdireset | ||
219 | sdireset | ||
220 | file vmlinux | ||
221 | target m32rsdi | ||
222 | |||
223 | restart | ||
224 | boot | ||
diff --git a/arch/m32r/mm/extable.c b/arch/m32r/mm/extable.c index 9a97363b6524..1743f23d49a3 100644 --- a/arch/m32r/mm/extable.c +++ b/arch/m32r/mm/extable.c | |||
@@ -1,10 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/i386/mm/extable.c | 2 | * linux/arch/m32r/mm/extable.c |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/module.h> | 5 | #include <linux/module.h> |
7 | #include <linux/spinlock.h> | ||
8 | #include <asm/uaccess.h> | 6 | #include <asm/uaccess.h> |
9 | 7 | ||
10 | int fixup_exception(struct pt_regs *regs) | 8 | int fixup_exception(struct pt_regs *regs) |
@@ -19,4 +17,3 @@ int fixup_exception(struct pt_regs *regs) | |||
19 | 17 | ||
20 | return 0; | 18 | return 0; |
21 | } | 19 | } |
22 | |||
diff --git a/arch/m32r/oaks32r/defconfig.nommu b/arch/m32r/oaks32r/defconfig.nommu index f2da9be726e5..3f9fe519acb2 100644 --- a/arch/m32r/oaks32r/defconfig.nommu +++ b/arch/m32r/oaks32r/defconfig.nommu | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:11:13 2005 | 4 | # Fri Jun 3 16:22:04 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -16,6 +16,7 @@ CONFIG_EXPERIMENTAL=y | |||
16 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 18 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | 20 | ||
20 | # | 21 | # |
21 | # General setup | 22 | # General setup |
@@ -26,12 +27,14 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
26 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 27 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
27 | CONFIG_SYSCTL=y | 28 | CONFIG_SYSCTL=y |
28 | # CONFIG_AUDIT is not set | 29 | # CONFIG_AUDIT is not set |
29 | CONFIG_LOG_BUF_SHIFT=14 | ||
30 | CONFIG_HOTPLUG=y | 30 | CONFIG_HOTPLUG=y |
31 | CONFIG_KOBJECT_UEVENT=y | 31 | CONFIG_KOBJECT_UEVENT=y |
32 | # CONFIG_IKCONFIG is not set | 32 | # CONFIG_IKCONFIG is not set |
33 | CONFIG_EMBEDDED=y | 33 | CONFIG_EMBEDDED=y |
34 | # CONFIG_KALLSYMS is not set | 34 | # CONFIG_KALLSYMS is not set |
35 | CONFIG_PRINTK=y | ||
36 | CONFIG_BUG=y | ||
37 | CONFIG_BASE_FULL=y | ||
35 | # CONFIG_FUTEX is not set | 38 | # CONFIG_FUTEX is not set |
36 | # CONFIG_EPOLL is not set | 39 | # CONFIG_EPOLL is not set |
37 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -40,6 +43,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
40 | CONFIG_CC_ALIGN_LOOPS=0 | 43 | CONFIG_CC_ALIGN_LOOPS=0 |
41 | CONFIG_CC_ALIGN_JUMPS=0 | 44 | CONFIG_CC_ALIGN_JUMPS=0 |
42 | CONFIG_TINY_SHMEM=y | 45 | CONFIG_TINY_SHMEM=y |
46 | CONFIG_BASE_SMALL=0 | ||
43 | 47 | ||
44 | # | 48 | # |
45 | # Loadable module support | 49 | # Loadable module support |
@@ -61,6 +65,7 @@ CONFIG_KMOD=y | |||
61 | # CONFIG_PLAT_OPSPUT is not set | 65 | # CONFIG_PLAT_OPSPUT is not set |
62 | CONFIG_PLAT_OAKS32R=y | 66 | CONFIG_PLAT_OAKS32R=y |
63 | # CONFIG_PLAT_MAPPI2 is not set | 67 | # CONFIG_PLAT_MAPPI2 is not set |
68 | # CONFIG_PLAT_MAPPI3 is not set | ||
64 | # CONFIG_CHIP_M32700 is not set | 69 | # CONFIG_CHIP_M32700 is not set |
65 | CONFIG_CHIP_M32102=y | 70 | CONFIG_CHIP_M32102=y |
66 | # CONFIG_CHIP_VDEC2 is not set | 71 | # CONFIG_CHIP_VDEC2 is not set |
@@ -92,10 +97,6 @@ CONFIG_PREEMPT=y | |||
92 | # CONFIG_PCCARD is not set | 97 | # CONFIG_PCCARD is not set |
93 | 98 | ||
94 | # | 99 | # |
95 | # PC-card bridges | ||
96 | # | ||
97 | |||
98 | # | ||
99 | # PCI Hotplug Support | 100 | # PCI Hotplug Support |
100 | # | 101 | # |
101 | 102 | ||
@@ -193,7 +194,6 @@ CONFIG_NET=y | |||
193 | # | 194 | # |
194 | CONFIG_PACKET=y | 195 | CONFIG_PACKET=y |
195 | # CONFIG_PACKET_MMAP is not set | 196 | # CONFIG_PACKET_MMAP is not set |
196 | # CONFIG_NETLINK_DEV is not set | ||
197 | CONFIG_UNIX=y | 197 | CONFIG_UNIX=y |
198 | # CONFIG_NET_KEY is not set | 198 | # CONFIG_NET_KEY is not set |
199 | CONFIG_INET=y | 199 | CONFIG_INET=y |
@@ -311,18 +311,6 @@ CONFIG_INPUT=y | |||
311 | # CONFIG_INPUT_EVBUG is not set | 311 | # CONFIG_INPUT_EVBUG is not set |
312 | 312 | ||
313 | # | 313 | # |
314 | # Input I/O drivers | ||
315 | # | ||
316 | # CONFIG_GAMEPORT is not set | ||
317 | CONFIG_SOUND_GAMEPORT=y | ||
318 | CONFIG_SERIO=y | ||
319 | # CONFIG_SERIO_I8042 is not set | ||
320 | CONFIG_SERIO_SERPORT=y | ||
321 | # CONFIG_SERIO_CT82C710 is not set | ||
322 | # CONFIG_SERIO_LIBPS2 is not set | ||
323 | # CONFIG_SERIO_RAW is not set | ||
324 | |||
325 | # | ||
326 | # Input Device Drivers | 314 | # Input Device Drivers |
327 | # | 315 | # |
328 | # CONFIG_INPUT_KEYBOARD is not set | 316 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -332,6 +320,17 @@ CONFIG_SERIO_SERPORT=y | |||
332 | # CONFIG_INPUT_MISC is not set | 320 | # CONFIG_INPUT_MISC is not set |
333 | 321 | ||
334 | # | 322 | # |
323 | # Hardware I/O ports | ||
324 | # | ||
325 | CONFIG_SERIO=y | ||
326 | # CONFIG_SERIO_I8042 is not set | ||
327 | CONFIG_SERIO_SERPORT=y | ||
328 | # CONFIG_SERIO_LIBPS2 is not set | ||
329 | # CONFIG_SERIO_RAW is not set | ||
330 | # CONFIG_GAMEPORT is not set | ||
331 | CONFIG_SOUND_GAMEPORT=y | ||
332 | |||
333 | # | ||
335 | # Character devices | 334 | # Character devices |
336 | # | 335 | # |
337 | # CONFIG_VT is not set | 336 | # CONFIG_VT is not set |
@@ -375,6 +374,10 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
375 | # CONFIG_RAW_DRIVER is not set | 374 | # CONFIG_RAW_DRIVER is not set |
376 | 375 | ||
377 | # | 376 | # |
377 | # TPM devices | ||
378 | # | ||
379 | |||
380 | # | ||
378 | # I2C support | 381 | # I2C support |
379 | # | 382 | # |
380 | # CONFIG_I2C is not set | 383 | # CONFIG_I2C is not set |
@@ -415,10 +418,6 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
415 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 418 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
416 | 419 | ||
417 | # | 420 | # |
418 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
419 | # | ||
420 | |||
421 | # | ||
422 | # USB Gadget Support | 421 | # USB Gadget Support |
423 | # | 422 | # |
424 | # CONFIG_USB_GADGET is not set | 423 | # CONFIG_USB_GADGET is not set |
@@ -574,8 +573,9 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
574 | # | 573 | # |
575 | # Kernel hacking | 574 | # Kernel hacking |
576 | # | 575 | # |
576 | # CONFIG_PRINTK_TIME is not set | ||
577 | # CONFIG_DEBUG_KERNEL is not set | 577 | # CONFIG_DEBUG_KERNEL is not set |
578 | CONFIG_DEBUG_PREEMPT=y | 578 | CONFIG_LOG_BUF_SHIFT=14 |
579 | # CONFIG_DEBUG_BUGVERBOSE is not set | 579 | # CONFIG_DEBUG_BUGVERBOSE is not set |
580 | # CONFIG_FRAME_POINTER is not set | 580 | # CONFIG_FRAME_POINTER is not set |
581 | 581 | ||
diff --git a/arch/m32r/opsput/defconfig.opsput b/arch/m32r/opsput/defconfig.opsput index a87e1ea4c301..66adec6a701a 100644 --- a/arch/m32r/opsput/defconfig.opsput +++ b/arch/m32r/opsput/defconfig.opsput | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.12-rc5 |
4 | # Wed Feb 16 21:11:41 2005 | 4 | # Fri Jun 3 16:22:06 2005 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | 7 | # CONFIG_UID16 is not set |
@@ -15,6 +15,7 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
18 | 19 | ||
19 | # | 20 | # |
20 | # General setup | 21 | # General setup |
@@ -27,13 +28,15 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
27 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
28 | CONFIG_SYSCTL=y | 29 | CONFIG_SYSCTL=y |
29 | # CONFIG_AUDIT is not set | 30 | # CONFIG_AUDIT is not set |
30 | CONFIG_LOG_BUF_SHIFT=14 | ||
31 | CONFIG_HOTPLUG=y | 31 | CONFIG_HOTPLUG=y |
32 | CONFIG_KOBJECT_UEVENT=y | 32 | CONFIG_KOBJECT_UEVENT=y |
33 | CONFIG_IKCONFIG=y | 33 | CONFIG_IKCONFIG=y |
34 | # CONFIG_IKCONFIG_PROC is not set | 34 | # CONFIG_IKCONFIG_PROC is not set |
35 | CONFIG_EMBEDDED=y | 35 | CONFIG_EMBEDDED=y |
36 | # CONFIG_KALLSYMS is not set | 36 | # CONFIG_KALLSYMS is not set |
37 | CONFIG_PRINTK=y | ||
38 | CONFIG_BUG=y | ||
39 | CONFIG_BASE_FULL=y | ||
37 | # CONFIG_FUTEX is not set | 40 | # CONFIG_FUTEX is not set |
38 | # CONFIG_EPOLL is not set | 41 | # CONFIG_EPOLL is not set |
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 42 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -43,6 +46,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
43 | CONFIG_CC_ALIGN_LOOPS=0 | 46 | CONFIG_CC_ALIGN_LOOPS=0 |
44 | CONFIG_CC_ALIGN_JUMPS=0 | 47 | CONFIG_CC_ALIGN_JUMPS=0 |
45 | # CONFIG_TINY_SHMEM is not set | 48 | # CONFIG_TINY_SHMEM is not set |
49 | CONFIG_BASE_SMALL=0 | ||
46 | 50 | ||
47 | # | 51 | # |
48 | # Loadable module support | 52 | # Loadable module support |
@@ -64,6 +68,7 @@ CONFIG_KMOD=y | |||
64 | CONFIG_PLAT_OPSPUT=y | 68 | CONFIG_PLAT_OPSPUT=y |
65 | # CONFIG_PLAT_OAKS32R is not set | 69 | # CONFIG_PLAT_OAKS32R is not set |
66 | # CONFIG_PLAT_MAPPI2 is not set | 70 | # CONFIG_PLAT_MAPPI2 is not set |
71 | # CONFIG_PLAT_MAPPI3 is not set | ||
67 | # CONFIG_CHIP_M32700 is not set | 72 | # CONFIG_CHIP_M32700 is not set |
68 | # CONFIG_CHIP_M32102 is not set | 73 | # CONFIG_CHIP_M32102 is not set |
69 | # CONFIG_CHIP_VDEC2 is not set | 74 | # CONFIG_CHIP_VDEC2 is not set |
@@ -243,7 +248,6 @@ CONFIG_NET=y | |||
243 | # | 248 | # |
244 | CONFIG_PACKET=y | 249 | CONFIG_PACKET=y |
245 | # CONFIG_PACKET_MMAP is not set | 250 | # CONFIG_PACKET_MMAP is not set |
246 | # CONFIG_NETLINK_DEV is not set | ||
247 | CONFIG_UNIX=y | 251 | CONFIG_UNIX=y |
248 | # CONFIG_NET_KEY is not set | 252 | # CONFIG_NET_KEY is not set |
249 | CONFIG_INET=y | 253 | CONFIG_INET=y |
@@ -368,18 +372,6 @@ CONFIG_INPUT=y | |||
368 | # CONFIG_INPUT_EVBUG is not set | 372 | # CONFIG_INPUT_EVBUG is not set |
369 | 373 | ||
370 | # | 374 | # |
371 | # Input I/O drivers | ||
372 | # | ||
373 | # CONFIG_GAMEPORT is not set | ||
374 | CONFIG_SOUND_GAMEPORT=y | ||
375 | CONFIG_SERIO=y | ||
376 | # CONFIG_SERIO_I8042 is not set | ||
377 | CONFIG_SERIO_SERPORT=y | ||
378 | # CONFIG_SERIO_CT82C710 is not set | ||
379 | # CONFIG_SERIO_LIBPS2 is not set | ||
380 | # CONFIG_SERIO_RAW is not set | ||
381 | |||
382 | # | ||
383 | # Input Device Drivers | 375 | # Input Device Drivers |
384 | # | 376 | # |
385 | # CONFIG_INPUT_KEYBOARD is not set | 377 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -389,6 +381,17 @@ CONFIG_SERIO_SERPORT=y | |||
389 | # CONFIG_INPUT_MISC is not set | 381 | # CONFIG_INPUT_MISC is not set |
390 | 382 | ||
391 | # | 383 | # |
384 | # Hardware I/O ports | ||
385 | # | ||
386 | CONFIG_SERIO=y | ||
387 | # CONFIG_SERIO_I8042 is not set | ||
388 | CONFIG_SERIO_SERPORT=y | ||
389 | # CONFIG_SERIO_LIBPS2 is not set | ||
390 | # CONFIG_SERIO_RAW is not set | ||
391 | # CONFIG_GAMEPORT is not set | ||
392 | CONFIG_SOUND_GAMEPORT=y | ||
393 | |||
394 | # | ||
392 | # Character devices | 395 | # Character devices |
393 | # | 396 | # |
394 | # CONFIG_VT is not set | 397 | # CONFIG_VT is not set |
@@ -438,6 +441,10 @@ CONFIG_DS1302=y | |||
438 | # CONFIG_RAW_DRIVER is not set | 441 | # CONFIG_RAW_DRIVER is not set |
439 | 442 | ||
440 | # | 443 | # |
444 | # TPM devices | ||
445 | # | ||
446 | |||
447 | # | ||
441 | # I2C support | 448 | # I2C support |
442 | # | 449 | # |
443 | # CONFIG_I2C is not set | 450 | # CONFIG_I2C is not set |
@@ -478,10 +485,6 @@ CONFIG_DS1302=y | |||
478 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 485 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
479 | 486 | ||
480 | # | 487 | # |
481 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
482 | # | ||
483 | |||
484 | # | ||
485 | # USB Gadget Support | 488 | # USB Gadget Support |
486 | # | 489 | # |
487 | # CONFIG_USB_GADGET is not set | 490 | # CONFIG_USB_GADGET is not set |
@@ -654,8 +657,10 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
654 | # | 657 | # |
655 | # Kernel hacking | 658 | # Kernel hacking |
656 | # | 659 | # |
660 | # CONFIG_PRINTK_TIME is not set | ||
657 | CONFIG_DEBUG_KERNEL=y | 661 | CONFIG_DEBUG_KERNEL=y |
658 | # CONFIG_MAGIC_SYSRQ is not set | 662 | # CONFIG_MAGIC_SYSRQ is not set |
663 | CONFIG_LOG_BUF_SHIFT=14 | ||
659 | # CONFIG_SCHEDSTATS is not set | 664 | # CONFIG_SCHEDSTATS is not set |
660 | # CONFIG_DEBUG_SLAB is not set | 665 | # CONFIG_DEBUG_SLAB is not set |
661 | # CONFIG_DEBUG_SPINLOCK is not set | 666 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index b027ce7efbc6..73843c528778 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -232,7 +232,6 @@ void __init mem_init(void) | |||
232 | #ifdef CONFIG_LIMITED_DMA | 232 | #ifdef CONFIG_LIMITED_DMA |
233 | set_page_address(page, lowmem_page_address(page)); | 233 | set_page_address(page, lowmem_page_address(page)); |
234 | #endif | 234 | #endif |
235 | set_bit(PG_highmem, &page->flags); | ||
236 | set_page_count(page, 1); | 235 | set_page_count(page, 1); |
237 | __free_page(page); | 236 | __free_page(page); |
238 | totalhigh_pages++; | 237 | totalhigh_pages++; |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 54ce6da22644..10162b187bcf 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -826,11 +826,6 @@ config MPC10X_BRIDGE | |||
826 | depends on PCORE || POWERPMC250 || LOPEC || SANDPOINT | 826 | depends on PCORE || POWERPMC250 || LOPEC || SANDPOINT |
827 | default y | 827 | default y |
828 | 828 | ||
829 | config FSL_OCP | ||
830 | bool | ||
831 | depends on MPC10X_BRIDGE | ||
832 | default y | ||
833 | |||
834 | config MPC10X_OPENPIC | 829 | config MPC10X_OPENPIC |
835 | bool | 830 | bool |
836 | depends on POWERPMC250 || LOPEC || SANDPOINT | 831 | depends on POWERPMC250 || LOPEC || SANDPOINT |
diff --git a/arch/ppc/boot/ld.script b/arch/ppc/boot/ld.script index 6ee602d8b6a0..9362193742ac 100644 --- a/arch/ppc/boot/ld.script +++ b/arch/ppc/boot/ld.script | |||
@@ -58,9 +58,6 @@ SECTIONS | |||
58 | *(.ramdisk) | 58 | *(.ramdisk) |
59 | __ramdisk_end = .; | 59 | __ramdisk_end = .; |
60 | . = ALIGN(4096); | 60 | . = ALIGN(4096); |
61 | __sysmap_begin = .; | ||
62 | *(.sysmap) | ||
63 | __sysmap_end = .; | ||
64 | CONSTRUCTORS | 61 | CONSTRUCTORS |
65 | } | 62 | } |
66 | _edata = .; | 63 | _edata = .; |
diff --git a/arch/ppc/boot/openfirmware/Makefile b/arch/ppc/boot/openfirmware/Makefile index 4eacbd8c772a..03415238fabf 100644 --- a/arch/ppc/boot/openfirmware/Makefile +++ b/arch/ppc/boot/openfirmware/Makefile | |||
@@ -54,13 +54,10 @@ $(images)/ramdisk.image.gz: | |||
54 | @echo ' RAM disk image must be provided separately' | 54 | @echo ' RAM disk image must be provided separately' |
55 | @/bin/false | 55 | @/bin/false |
56 | 56 | ||
57 | objcpxmon-$(CONFIG_XMON) := --add-section=.sysmap=System.map \ | ||
58 | --set-section-flags=.sysmap=contents,alloc,load,readonly,data | ||
59 | quiet_cmd_genimage = GEN $@ | 57 | quiet_cmd_genimage = GEN $@ |
60 | cmd_genimage = $(OBJCOPY) -R .comment \ | 58 | cmd_genimage = $(OBJCOPY) -R .comment \ |
61 | --add-section=.image=$(images)/vmlinux.gz \ | 59 | --add-section=.image=$(images)/vmlinux.gz \ |
62 | --set-section-flags=.image=contents,alloc,load,readonly,data \ | 60 | --set-section-flags=.image=contents,alloc,load,readonly,data $< $@ |
63 | $(objcpxmon-y) $< $@ | ||
64 | 61 | ||
65 | targets += image.o | 62 | targets += image.o |
66 | $(obj)/image.o: $(obj)/dummy.o $(images)/vmlinux.gz FORCE | 63 | $(obj)/image.o: $(obj)/dummy.o $(images)/vmlinux.gz FORCE |
diff --git a/arch/ppc/boot/openfirmware/common.c b/arch/ppc/boot/openfirmware/common.c index 9e6952781f1f..0f46756a903e 100644 --- a/arch/ppc/boot/openfirmware/common.c +++ b/arch/ppc/boot/openfirmware/common.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | 16 | ||
17 | /* Information from the linker */ | 17 | /* Information from the linker */ |
18 | extern char __sysmap_begin, __sysmap_end; | ||
19 | 18 | ||
20 | extern int strcmp(const char *s1, const char *s2); | 19 | extern int strcmp(const char *s1, const char *s2); |
21 | extern char *avail_ram, *avail_high; | 20 | extern char *avail_ram, *avail_high; |
@@ -116,14 +115,8 @@ void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp) | |||
116 | void make_bi_recs(unsigned long addr, char *name, unsigned int mach, | 115 | void make_bi_recs(unsigned long addr, char *name, unsigned int mach, |
117 | unsigned long progend) | 116 | unsigned long progend) |
118 | { | 117 | { |
119 | unsigned long sysmap_size; | ||
120 | struct bi_record *rec; | 118 | struct bi_record *rec; |
121 | 119 | ||
122 | /* Figure out the size of a possible System.map we're going to | ||
123 | * pass along. | ||
124 | * */ | ||
125 | sysmap_size = (unsigned long)(&__sysmap_end) - | ||
126 | (unsigned long)(&__sysmap_begin); | ||
127 | 120 | ||
128 | /* leave a 1MB gap then align to the next 1MB boundary */ | 121 | /* leave a 1MB gap then align to the next 1MB boundary */ |
129 | addr = _ALIGN(addr+ (1<<20) - 1, (1<<20)); | 122 | addr = _ALIGN(addr+ (1<<20) - 1, (1<<20)); |
@@ -147,15 +140,6 @@ void make_bi_recs(unsigned long addr, char *name, unsigned int mach, | |||
147 | rec->size = sizeof(struct bi_record) + 2 * sizeof(unsigned long); | 140 | rec->size = sizeof(struct bi_record) + 2 * sizeof(unsigned long); |
148 | rec = (struct bi_record *)((unsigned long)rec + rec->size); | 141 | rec = (struct bi_record *)((unsigned long)rec + rec->size); |
149 | 142 | ||
150 | if (sysmap_size) { | ||
151 | rec->tag = BI_SYSMAP; | ||
152 | rec->data[0] = (unsigned long)(&__sysmap_begin); | ||
153 | rec->data[1] = sysmap_size; | ||
154 | rec->size = sizeof(struct bi_record) + 2 * | ||
155 | sizeof(unsigned long); | ||
156 | rec = (struct bi_record *)((unsigned long)rec + rec->size); | ||
157 | } | ||
158 | |||
159 | rec->tag = BI_LAST; | 143 | rec->tag = BI_LAST; |
160 | rec->size = sizeof(struct bi_record); | 144 | rec->size = sizeof(struct bi_record); |
161 | rec = (struct bi_record *)((unsigned long)rec + rec->size); | 145 | rec = (struct bi_record *)((unsigned long)rec + rec->size); |
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile index c28061ad5982..991b4cbb83c8 100644 --- a/arch/ppc/boot/simple/Makefile +++ b/arch/ppc/boot/simple/Makefile | |||
@@ -203,7 +203,7 @@ $(obj)/zvmlinux: $(OBJS) $(LIBS) $(srctree)/$(boot)/ld.script \ | |||
203 | $(obj)/dummy.o $(obj)/image.o | 203 | $(obj)/dummy.o $(obj)/image.o |
204 | $(LD) $(LD_ARGS) -o $@ $(OBJS) $(obj)/image.o $(LIBS) | 204 | $(LD) $(LD_ARGS) -o $@ $(OBJS) $(obj)/image.o $(LIBS) |
205 | $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab \ | 205 | $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab \ |
206 | -R .stabstr -R .ramdisk -R .sysmap | 206 | -R .stabstr -R .ramdisk |
207 | 207 | ||
208 | $(obj)/zvmlinux.initrd: $(OBJS) $(LIBS) $(srctree)/$(boot)/ld.script \ | 208 | $(obj)/zvmlinux.initrd: $(OBJS) $(LIBS) $(srctree)/$(boot)/ld.script \ |
209 | $(images)/vmlinux.gz $(obj)/dummy.o | 209 | $(images)/vmlinux.gz $(obj)/dummy.o |
@@ -215,7 +215,7 @@ $(obj)/zvmlinux.initrd: $(OBJS) $(LIBS) $(srctree)/$(boot)/ld.script \ | |||
215 | $(obj)/dummy.o $(obj)/image.o | 215 | $(obj)/dummy.o $(obj)/image.o |
216 | $(LD) $(LD_ARGS) -o $@ $(OBJS) $(obj)/image.o $(LIBS) | 216 | $(LD) $(LD_ARGS) -o $@ $(OBJS) $(obj)/image.o $(LIBS) |
217 | $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab \ | 217 | $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab \ |
218 | -R .stabstr -R .sysmap | 218 | -R .stabstr |
219 | 219 | ||
220 | # Sort-of dummy rules, that let us format the image we want. | 220 | # Sort-of dummy rules, that let us format the image we want. |
221 | zImage: $(images)/$(zimage-y) $(obj)/zvmlinux | 221 | zImage: $(images)/$(zimage-y) $(obj)/zvmlinux |
diff --git a/arch/ppc/boot/utils/addSystemMap.c b/arch/ppc/boot/utils/addSystemMap.c deleted file mode 100644 index 4654f891b274..000000000000 --- a/arch/ppc/boot/utils/addSystemMap.c +++ /dev/null | |||
@@ -1,186 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <byteswap.h> | ||
4 | #include <sys/types.h> | ||
5 | #include <sys/stat.h> | ||
6 | |||
7 | void xlate( char * inb, char * trb, unsigned len ) | ||
8 | { | ||
9 | unsigned i; | ||
10 | for ( i=0; i<len; ++i ) { | ||
11 | char c = *inb++; | ||
12 | char c1 = c >> 4; | ||
13 | char c2 = c & 0xf; | ||
14 | if ( c1 > 9 ) | ||
15 | c1 = c1 + 'A' - 10; | ||
16 | else | ||
17 | c1 = c1 + '0'; | ||
18 | if ( c2 > 9 ) | ||
19 | c2 = c2 + 'A' - 10; | ||
20 | else | ||
21 | c2 = c2 + '0'; | ||
22 | *trb++ = c1; | ||
23 | *trb++ = c2; | ||
24 | } | ||
25 | *trb = 0; | ||
26 | } | ||
27 | |||
28 | #define ElfHeaderSize (64 * 1024) | ||
29 | #define ElfPages (ElfHeaderSize / 4096) | ||
30 | #define KERNELBASE (0xc0000000) | ||
31 | |||
32 | void get4k( /*istream *inf*/FILE *file, char *buf ) | ||
33 | { | ||
34 | unsigned j; | ||
35 | unsigned num = fread(buf, 1, 4096, file); | ||
36 | for ( j=num; j<4096; ++j ) | ||
37 | buf[j] = 0; | ||
38 | } | ||
39 | |||
40 | void put4k( /*ostream *outf*/FILE *file, char *buf ) | ||
41 | { | ||
42 | fwrite(buf, 1, 4096, file); | ||
43 | } | ||
44 | |||
45 | int main(int argc, char **argv) | ||
46 | { | ||
47 | char inbuf[4096]; | ||
48 | FILE *ramDisk = NULL; | ||
49 | FILE *inputVmlinux = NULL; | ||
50 | FILE *outputVmlinux = NULL; | ||
51 | unsigned i = 0; | ||
52 | unsigned long ramFileLen = 0; | ||
53 | unsigned long ramLen = 0; | ||
54 | unsigned long roundR = 0; | ||
55 | unsigned long kernelLen = 0; | ||
56 | unsigned long actualKernelLen = 0; | ||
57 | unsigned long round = 0; | ||
58 | unsigned long roundedKernelLen = 0; | ||
59 | unsigned long ramStartOffs = 0; | ||
60 | unsigned long ramPages = 0; | ||
61 | unsigned long roundedKernelPages = 0; | ||
62 | if ( argc < 2 ) { | ||
63 | printf("Name of System Map file missing.\n"); | ||
64 | exit(1); | ||
65 | } | ||
66 | |||
67 | if ( argc < 3 ) { | ||
68 | printf("Name of vmlinux file missing.\n"); | ||
69 | exit(1); | ||
70 | } | ||
71 | |||
72 | if ( argc < 4 ) { | ||
73 | printf("Name of vmlinux output file missing.\n"); | ||
74 | exit(1); | ||
75 | } | ||
76 | |||
77 | ramDisk = fopen(argv[1], "r"); | ||
78 | if ( ! ramDisk ) { | ||
79 | printf("System Map file \"%s\" failed to open.\n", argv[1]); | ||
80 | exit(1); | ||
81 | } | ||
82 | inputVmlinux = fopen(argv[2], "r"); | ||
83 | if ( ! inputVmlinux ) { | ||
84 | printf("vmlinux file \"%s\" failed to open.\n", argv[2]); | ||
85 | exit(1); | ||
86 | } | ||
87 | outputVmlinux = fopen(argv[3], "w"); | ||
88 | if ( ! outputVmlinux ) { | ||
89 | printf("output vmlinux file \"%s\" failed to open.\n", argv[3]); | ||
90 | exit(1); | ||
91 | } | ||
92 | fseek(ramDisk, 0, SEEK_END); | ||
93 | ramFileLen = ftell(ramDisk); | ||
94 | fseek(ramDisk, 0, SEEK_SET); | ||
95 | printf("%s file size = %ld\n", argv[1], ramFileLen); | ||
96 | |||
97 | ramLen = ramFileLen; | ||
98 | |||
99 | roundR = 4096 - (ramLen % 4096); | ||
100 | if ( roundR ) { | ||
101 | printf("Rounding System Map file up to a multiple of 4096, adding %ld\n", roundR); | ||
102 | ramLen += roundR; | ||
103 | } | ||
104 | |||
105 | printf("Rounded System Map size is %ld\n", ramLen); | ||
106 | fseek(inputVmlinux, 0, SEEK_END); | ||
107 | kernelLen = ftell(inputVmlinux); | ||
108 | fseek(inputVmlinux, 0, SEEK_SET); | ||
109 | printf("kernel file size = %ld\n", kernelLen); | ||
110 | if ( kernelLen == 0 ) { | ||
111 | printf("You must have a linux kernel specified as argv[2]\n"); | ||
112 | exit(1); | ||
113 | } | ||
114 | |||
115 | actualKernelLen = kernelLen - ElfHeaderSize; | ||
116 | |||
117 | printf("actual kernel length (minus ELF header) = %ld\n", actualKernelLen); | ||
118 | |||
119 | round = actualKernelLen % 4096; | ||
120 | roundedKernelLen = actualKernelLen; | ||
121 | if ( round ) | ||
122 | roundedKernelLen += (4096 - round); | ||
123 | |||
124 | printf("actual kernel length rounded up to a 4k multiple = %ld\n", roundedKernelLen); | ||
125 | |||
126 | ramStartOffs = roundedKernelLen; | ||
127 | ramPages = ramLen / 4096; | ||
128 | |||
129 | printf("System map pages to copy = %ld\n", ramPages); | ||
130 | |||
131 | // Copy 64K ELF header | ||
132 | for (i=0; i<(ElfPages); ++i) { | ||
133 | get4k( inputVmlinux, inbuf ); | ||
134 | put4k( outputVmlinux, inbuf ); | ||
135 | } | ||
136 | |||
137 | |||
138 | |||
139 | roundedKernelPages = roundedKernelLen / 4096; | ||
140 | |||
141 | fseek(inputVmlinux, ElfHeaderSize, SEEK_SET); | ||
142 | |||
143 | { | ||
144 | for ( i=0; i<roundedKernelPages; ++i ) { | ||
145 | get4k( inputVmlinux, inbuf ); | ||
146 | if ( i == 0 ) { | ||
147 | unsigned long * p; | ||
148 | printf("Storing embedded_sysmap_start at 0x3c\n"); | ||
149 | p = (unsigned long *)(inbuf + 0x3c); | ||
150 | |||
151 | #if (BYTE_ORDER == __BIG_ENDIAN) | ||
152 | *p = ramStartOffs; | ||
153 | #else | ||
154 | *p = bswap_32(ramStartOffs); | ||
155 | #endif | ||
156 | |||
157 | printf("Storing embedded_sysmap_end at 0x44\n"); | ||
158 | p = (unsigned long *)(inbuf + 0x44); | ||
159 | #if (BYTE_ORDER == __BIG_ENDIAN) | ||
160 | *p = ramStartOffs + ramFileLen; | ||
161 | #else | ||
162 | *p = bswap_32(ramStartOffs + ramFileLen); | ||
163 | #endif | ||
164 | } | ||
165 | put4k( outputVmlinux, inbuf ); | ||
166 | } | ||
167 | } | ||
168 | |||
169 | { | ||
170 | for ( i=0; i<ramPages; ++i ) { | ||
171 | get4k( ramDisk, inbuf ); | ||
172 | put4k( outputVmlinux, inbuf ); | ||
173 | } | ||
174 | } | ||
175 | |||
176 | |||
177 | fclose(ramDisk); | ||
178 | fclose(inputVmlinux); | ||
179 | fclose(outputVmlinux); | ||
180 | /* Set permission to executable */ | ||
181 | chmod(argv[3], S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); | ||
182 | |||
183 | return 0; | ||
184 | |||
185 | } | ||
186 | |||
diff --git a/arch/ppc/configs/mpc8548_cds_defconfig b/arch/ppc/configs/mpc8548_cds_defconfig new file mode 100644 index 000000000000..abe034f24b83 --- /dev/null +++ b/arch/ppc/configs/mpc8548_cds_defconfig | |||
@@ -0,0 +1,659 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.12-rc4 | ||
4 | # Tue May 24 22:36:27 2005 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_HAVE_DEC_LOCK=y | ||
11 | CONFIG_PPC=y | ||
12 | CONFIG_PPC32=y | ||
13 | CONFIG_GENERIC_NVRAM=y | ||
14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_SWAP=y | ||
29 | CONFIG_SYSVIPC=y | ||
30 | # CONFIG_POSIX_MQUEUE is not set | ||
31 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
32 | CONFIG_SYSCTL=y | ||
33 | # CONFIG_AUDIT is not set | ||
34 | # CONFIG_HOTPLUG is not set | ||
35 | CONFIG_KOBJECT_UEVENT=y | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_EMBEDDED=y | ||
38 | # CONFIG_KALLSYMS is not set | ||
39 | CONFIG_PRINTK=y | ||
40 | CONFIG_BUG=y | ||
41 | CONFIG_BASE_FULL=y | ||
42 | CONFIG_FUTEX=y | ||
43 | # CONFIG_EPOLL is not set | ||
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SHMEM=y | ||
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
47 | CONFIG_CC_ALIGN_LABELS=0 | ||
48 | CONFIG_CC_ALIGN_LOOPS=0 | ||
49 | CONFIG_CC_ALIGN_JUMPS=0 | ||
50 | # CONFIG_TINY_SHMEM is not set | ||
51 | CONFIG_BASE_SMALL=0 | ||
52 | |||
53 | # | ||
54 | # Loadable module support | ||
55 | # | ||
56 | # CONFIG_MODULES is not set | ||
57 | |||
58 | # | ||
59 | # Processor | ||
60 | # | ||
61 | # CONFIG_6xx is not set | ||
62 | # CONFIG_40x is not set | ||
63 | # CONFIG_44x is not set | ||
64 | # CONFIG_POWER3 is not set | ||
65 | # CONFIG_POWER4 is not set | ||
66 | # CONFIG_8xx is not set | ||
67 | CONFIG_E500=y | ||
68 | CONFIG_BOOKE=y | ||
69 | CONFIG_FSL_BOOKE=y | ||
70 | # CONFIG_PHYS_64BIT is not set | ||
71 | CONFIG_SPE=y | ||
72 | CONFIG_MATH_EMULATION=y | ||
73 | # CONFIG_CPU_FREQ is not set | ||
74 | # CONFIG_PM is not set | ||
75 | CONFIG_85xx=y | ||
76 | CONFIG_PPC_INDIRECT_PCI_BE=y | ||
77 | |||
78 | # | ||
79 | # Freescale 85xx options | ||
80 | # | ||
81 | # CONFIG_MPC8540_ADS is not set | ||
82 | CONFIG_MPC8548_CDS=y | ||
83 | # CONFIG_MPC8555_CDS is not set | ||
84 | # CONFIG_MPC8560_ADS is not set | ||
85 | # CONFIG_SBC8560 is not set | ||
86 | # CONFIG_STX_GP3 is not set | ||
87 | CONFIG_MPC8548=y | ||
88 | |||
89 | # | ||
90 | # Platform options | ||
91 | # | ||
92 | # CONFIG_SMP is not set | ||
93 | # CONFIG_PREEMPT is not set | ||
94 | # CONFIG_HIGHMEM is not set | ||
95 | CONFIG_BINFMT_ELF=y | ||
96 | # CONFIG_BINFMT_MISC is not set | ||
97 | # CONFIG_CMDLINE_BOOL is not set | ||
98 | CONFIG_ISA_DMA_API=y | ||
99 | |||
100 | # | ||
101 | # Bus options | ||
102 | # | ||
103 | # CONFIG_PCI is not set | ||
104 | # CONFIG_PCI_DOMAINS is not set | ||
105 | |||
106 | # | ||
107 | # PCCARD (PCMCIA/CardBus) support | ||
108 | # | ||
109 | # CONFIG_PCCARD is not set | ||
110 | |||
111 | # | ||
112 | # Advanced setup | ||
113 | # | ||
114 | # CONFIG_ADVANCED_OPTIONS is not set | ||
115 | |||
116 | # | ||
117 | # Default settings for advanced configuration options are used | ||
118 | # | ||
119 | CONFIG_HIGHMEM_START=0xfe000000 | ||
120 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
121 | CONFIG_KERNEL_START=0xc0000000 | ||
122 | CONFIG_TASK_SIZE=0x80000000 | ||
123 | CONFIG_BOOT_LOAD=0x00800000 | ||
124 | |||
125 | # | ||
126 | # Device Drivers | ||
127 | # | ||
128 | |||
129 | # | ||
130 | # Generic Driver Options | ||
131 | # | ||
132 | CONFIG_STANDALONE=y | ||
133 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
134 | # CONFIG_FW_LOADER is not set | ||
135 | |||
136 | # | ||
137 | # Memory Technology Devices (MTD) | ||
138 | # | ||
139 | # CONFIG_MTD is not set | ||
140 | |||
141 | # | ||
142 | # Parallel port support | ||
143 | # | ||
144 | # CONFIG_PARPORT is not set | ||
145 | |||
146 | # | ||
147 | # Plug and Play support | ||
148 | # | ||
149 | |||
150 | # | ||
151 | # Block devices | ||
152 | # | ||
153 | # CONFIG_BLK_DEV_FD is not set | ||
154 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
155 | CONFIG_BLK_DEV_LOOP=y | ||
156 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
157 | # CONFIG_BLK_DEV_NBD is not set | ||
158 | CONFIG_BLK_DEV_RAM=y | ||
159 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
160 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
161 | CONFIG_BLK_DEV_INITRD=y | ||
162 | CONFIG_INITRAMFS_SOURCE="" | ||
163 | # CONFIG_LBD is not set | ||
164 | # CONFIG_CDROM_PKTCDVD is not set | ||
165 | |||
166 | # | ||
167 | # IO Schedulers | ||
168 | # | ||
169 | CONFIG_IOSCHED_NOOP=y | ||
170 | CONFIG_IOSCHED_AS=y | ||
171 | CONFIG_IOSCHED_DEADLINE=y | ||
172 | CONFIG_IOSCHED_CFQ=y | ||
173 | # CONFIG_ATA_OVER_ETH is not set | ||
174 | |||
175 | # | ||
176 | # ATA/ATAPI/MFM/RLL support | ||
177 | # | ||
178 | # CONFIG_IDE is not set | ||
179 | |||
180 | # | ||
181 | # SCSI device support | ||
182 | # | ||
183 | # CONFIG_SCSI is not set | ||
184 | |||
185 | # | ||
186 | # Multi-device support (RAID and LVM) | ||
187 | # | ||
188 | # CONFIG_MD is not set | ||
189 | |||
190 | # | ||
191 | # Fusion MPT device support | ||
192 | # | ||
193 | |||
194 | # | ||
195 | # IEEE 1394 (FireWire) support | ||
196 | # | ||
197 | |||
198 | # | ||
199 | # I2O device support | ||
200 | # | ||
201 | |||
202 | # | ||
203 | # Macintosh device drivers | ||
204 | # | ||
205 | |||
206 | # | ||
207 | # Networking support | ||
208 | # | ||
209 | CONFIG_NET=y | ||
210 | |||
211 | # | ||
212 | # Networking options | ||
213 | # | ||
214 | CONFIG_PACKET=y | ||
215 | # CONFIG_PACKET_MMAP is not set | ||
216 | CONFIG_UNIX=y | ||
217 | # CONFIG_NET_KEY is not set | ||
218 | CONFIG_INET=y | ||
219 | CONFIG_IP_MULTICAST=y | ||
220 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
221 | CONFIG_IP_PNP=y | ||
222 | CONFIG_IP_PNP_DHCP=y | ||
223 | CONFIG_IP_PNP_BOOTP=y | ||
224 | # CONFIG_IP_PNP_RARP is not set | ||
225 | # CONFIG_NET_IPIP is not set | ||
226 | # CONFIG_NET_IPGRE is not set | ||
227 | # CONFIG_IP_MROUTE is not set | ||
228 | # CONFIG_ARPD is not set | ||
229 | CONFIG_SYN_COOKIES=y | ||
230 | # CONFIG_INET_AH is not set | ||
231 | # CONFIG_INET_ESP is not set | ||
232 | # CONFIG_INET_IPCOMP is not set | ||
233 | # CONFIG_INET_TUNNEL is not set | ||
234 | CONFIG_IP_TCPDIAG=y | ||
235 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
236 | # CONFIG_IPV6 is not set | ||
237 | # CONFIG_NETFILTER is not set | ||
238 | |||
239 | # | ||
240 | # SCTP Configuration (EXPERIMENTAL) | ||
241 | # | ||
242 | # CONFIG_IP_SCTP is not set | ||
243 | # CONFIG_ATM is not set | ||
244 | # CONFIG_BRIDGE is not set | ||
245 | # CONFIG_VLAN_8021Q is not set | ||
246 | # CONFIG_DECNET is not set | ||
247 | # CONFIG_LLC2 is not set | ||
248 | # CONFIG_IPX is not set | ||
249 | # CONFIG_ATALK is not set | ||
250 | # CONFIG_X25 is not set | ||
251 | # CONFIG_LAPB is not set | ||
252 | # CONFIG_NET_DIVERT is not set | ||
253 | # CONFIG_ECONET is not set | ||
254 | # CONFIG_WAN_ROUTER is not set | ||
255 | |||
256 | # | ||
257 | # QoS and/or fair queueing | ||
258 | # | ||
259 | # CONFIG_NET_SCHED is not set | ||
260 | # CONFIG_NET_CLS_ROUTE is not set | ||
261 | |||
262 | # | ||
263 | # Network testing | ||
264 | # | ||
265 | # CONFIG_NET_PKTGEN is not set | ||
266 | # CONFIG_NETPOLL is not set | ||
267 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
268 | # CONFIG_HAMRADIO is not set | ||
269 | # CONFIG_IRDA is not set | ||
270 | # CONFIG_BT is not set | ||
271 | CONFIG_NETDEVICES=y | ||
272 | # CONFIG_DUMMY is not set | ||
273 | # CONFIG_BONDING is not set | ||
274 | # CONFIG_EQUALIZER is not set | ||
275 | # CONFIG_TUN is not set | ||
276 | |||
277 | # | ||
278 | # Ethernet (10 or 100Mbit) | ||
279 | # | ||
280 | CONFIG_NET_ETHERNET=y | ||
281 | CONFIG_MII=y | ||
282 | |||
283 | # | ||
284 | # Ethernet (1000 Mbit) | ||
285 | # | ||
286 | CONFIG_GIANFAR=y | ||
287 | CONFIG_GFAR_NAPI=y | ||
288 | |||
289 | # | ||
290 | # Ethernet (10000 Mbit) | ||
291 | # | ||
292 | |||
293 | # | ||
294 | # Token Ring devices | ||
295 | # | ||
296 | |||
297 | # | ||
298 | # Wireless LAN (non-hamradio) | ||
299 | # | ||
300 | # CONFIG_NET_RADIO is not set | ||
301 | |||
302 | # | ||
303 | # Wan interfaces | ||
304 | # | ||
305 | # CONFIG_WAN is not set | ||
306 | # CONFIG_PPP is not set | ||
307 | # CONFIG_SLIP is not set | ||
308 | # CONFIG_SHAPER is not set | ||
309 | # CONFIG_NETCONSOLE is not set | ||
310 | |||
311 | # | ||
312 | # ISDN subsystem | ||
313 | # | ||
314 | # CONFIG_ISDN is not set | ||
315 | |||
316 | # | ||
317 | # Telephony Support | ||
318 | # | ||
319 | # CONFIG_PHONE is not set | ||
320 | |||
321 | # | ||
322 | # Input device support | ||
323 | # | ||
324 | CONFIG_INPUT=y | ||
325 | |||
326 | # | ||
327 | # Userland interfaces | ||
328 | # | ||
329 | # CONFIG_INPUT_MOUSEDEV is not set | ||
330 | # CONFIG_INPUT_JOYDEV is not set | ||
331 | # CONFIG_INPUT_TSDEV is not set | ||
332 | # CONFIG_INPUT_EVDEV is not set | ||
333 | # CONFIG_INPUT_EVBUG is not set | ||
334 | |||
335 | # | ||
336 | # Input Device Drivers | ||
337 | # | ||
338 | # CONFIG_INPUT_KEYBOARD is not set | ||
339 | # CONFIG_INPUT_MOUSE is not set | ||
340 | # CONFIG_INPUT_JOYSTICK is not set | ||
341 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
342 | # CONFIG_INPUT_MISC is not set | ||
343 | |||
344 | # | ||
345 | # Hardware I/O ports | ||
346 | # | ||
347 | # CONFIG_SERIO is not set | ||
348 | # CONFIG_GAMEPORT is not set | ||
349 | CONFIG_SOUND_GAMEPORT=y | ||
350 | |||
351 | # | ||
352 | # Character devices | ||
353 | # | ||
354 | # CONFIG_VT is not set | ||
355 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
356 | |||
357 | # | ||
358 | # Serial drivers | ||
359 | # | ||
360 | CONFIG_SERIAL_8250=y | ||
361 | CONFIG_SERIAL_8250_CONSOLE=y | ||
362 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
363 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
364 | |||
365 | # | ||
366 | # Non-8250 serial port support | ||
367 | # | ||
368 | CONFIG_SERIAL_CORE=y | ||
369 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
370 | CONFIG_UNIX98_PTYS=y | ||
371 | CONFIG_LEGACY_PTYS=y | ||
372 | CONFIG_LEGACY_PTY_COUNT=256 | ||
373 | |||
374 | # | ||
375 | # IPMI | ||
376 | # | ||
377 | # CONFIG_IPMI_HANDLER is not set | ||
378 | |||
379 | # | ||
380 | # Watchdog Cards | ||
381 | # | ||
382 | # CONFIG_WATCHDOG is not set | ||
383 | # CONFIG_NVRAM is not set | ||
384 | CONFIG_GEN_RTC=y | ||
385 | # CONFIG_GEN_RTC_X is not set | ||
386 | # CONFIG_DTLK is not set | ||
387 | # CONFIG_R3964 is not set | ||
388 | |||
389 | # | ||
390 | # Ftape, the floppy tape device driver | ||
391 | # | ||
392 | # CONFIG_AGP is not set | ||
393 | # CONFIG_DRM is not set | ||
394 | # CONFIG_RAW_DRIVER is not set | ||
395 | |||
396 | # | ||
397 | # TPM devices | ||
398 | # | ||
399 | |||
400 | # | ||
401 | # I2C support | ||
402 | # | ||
403 | CONFIG_I2C=y | ||
404 | CONFIG_I2C_CHARDEV=y | ||
405 | |||
406 | # | ||
407 | # I2C Algorithms | ||
408 | # | ||
409 | # CONFIG_I2C_ALGOBIT is not set | ||
410 | # CONFIG_I2C_ALGOPCF is not set | ||
411 | # CONFIG_I2C_ALGOPCA is not set | ||
412 | |||
413 | # | ||
414 | # I2C Hardware Bus support | ||
415 | # | ||
416 | # CONFIG_I2C_ISA is not set | ||
417 | CONFIG_I2C_MPC=y | ||
418 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
419 | # CONFIG_I2C_PCA_ISA is not set | ||
420 | |||
421 | # | ||
422 | # Hardware Sensors Chip support | ||
423 | # | ||
424 | # CONFIG_I2C_SENSOR is not set | ||
425 | # CONFIG_SENSORS_ADM1021 is not set | ||
426 | # CONFIG_SENSORS_ADM1025 is not set | ||
427 | # CONFIG_SENSORS_ADM1026 is not set | ||
428 | # CONFIG_SENSORS_ADM1031 is not set | ||
429 | # CONFIG_SENSORS_ASB100 is not set | ||
430 | # CONFIG_SENSORS_DS1621 is not set | ||
431 | # CONFIG_SENSORS_FSCHER is not set | ||
432 | # CONFIG_SENSORS_FSCPOS is not set | ||
433 | # CONFIG_SENSORS_GL518SM is not set | ||
434 | # CONFIG_SENSORS_GL520SM is not set | ||
435 | # CONFIG_SENSORS_IT87 is not set | ||
436 | # CONFIG_SENSORS_LM63 is not set | ||
437 | # CONFIG_SENSORS_LM75 is not set | ||
438 | # CONFIG_SENSORS_LM77 is not set | ||
439 | # CONFIG_SENSORS_LM78 is not set | ||
440 | # CONFIG_SENSORS_LM80 is not set | ||
441 | # CONFIG_SENSORS_LM83 is not set | ||
442 | # CONFIG_SENSORS_LM85 is not set | ||
443 | # CONFIG_SENSORS_LM87 is not set | ||
444 | # CONFIG_SENSORS_LM90 is not set | ||
445 | # CONFIG_SENSORS_LM92 is not set | ||
446 | # CONFIG_SENSORS_MAX1619 is not set | ||
447 | # CONFIG_SENSORS_PC87360 is not set | ||
448 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
449 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
450 | # CONFIG_SENSORS_W83781D is not set | ||
451 | # CONFIG_SENSORS_W83L785TS is not set | ||
452 | # CONFIG_SENSORS_W83627HF is not set | ||
453 | |||
454 | # | ||
455 | # Other I2C Chip support | ||
456 | # | ||
457 | # CONFIG_SENSORS_DS1337 is not set | ||
458 | # CONFIG_SENSORS_EEPROM is not set | ||
459 | # CONFIG_SENSORS_PCF8574 is not set | ||
460 | # CONFIG_SENSORS_PCF8591 is not set | ||
461 | # CONFIG_SENSORS_RTC8564 is not set | ||
462 | # CONFIG_SENSORS_M41T00 is not set | ||
463 | # CONFIG_I2C_DEBUG_CORE is not set | ||
464 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
465 | # CONFIG_I2C_DEBUG_BUS is not set | ||
466 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
467 | |||
468 | # | ||
469 | # Dallas's 1-wire bus | ||
470 | # | ||
471 | # CONFIG_W1 is not set | ||
472 | |||
473 | # | ||
474 | # Misc devices | ||
475 | # | ||
476 | |||
477 | # | ||
478 | # Multimedia devices | ||
479 | # | ||
480 | # CONFIG_VIDEO_DEV is not set | ||
481 | |||
482 | # | ||
483 | # Digital Video Broadcasting Devices | ||
484 | # | ||
485 | # CONFIG_DVB is not set | ||
486 | |||
487 | # | ||
488 | # Graphics support | ||
489 | # | ||
490 | # CONFIG_FB is not set | ||
491 | |||
492 | # | ||
493 | # Sound | ||
494 | # | ||
495 | # CONFIG_SOUND is not set | ||
496 | |||
497 | # | ||
498 | # USB support | ||
499 | # | ||
500 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
501 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
502 | |||
503 | # | ||
504 | # USB Gadget Support | ||
505 | # | ||
506 | # CONFIG_USB_GADGET is not set | ||
507 | |||
508 | # | ||
509 | # MMC/SD Card support | ||
510 | # | ||
511 | # CONFIG_MMC is not set | ||
512 | |||
513 | # | ||
514 | # InfiniBand support | ||
515 | # | ||
516 | # CONFIG_INFINIBAND is not set | ||
517 | |||
518 | # | ||
519 | # File systems | ||
520 | # | ||
521 | CONFIG_EXT2_FS=y | ||
522 | # CONFIG_EXT2_FS_XATTR is not set | ||
523 | CONFIG_EXT3_FS=y | ||
524 | CONFIG_EXT3_FS_XATTR=y | ||
525 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
526 | # CONFIG_EXT3_FS_SECURITY is not set | ||
527 | CONFIG_JBD=y | ||
528 | # CONFIG_JBD_DEBUG is not set | ||
529 | CONFIG_FS_MBCACHE=y | ||
530 | # CONFIG_REISERFS_FS is not set | ||
531 | # CONFIG_JFS_FS is not set | ||
532 | |||
533 | # | ||
534 | # XFS support | ||
535 | # | ||
536 | # CONFIG_XFS_FS is not set | ||
537 | # CONFIG_MINIX_FS is not set | ||
538 | # CONFIG_ROMFS_FS is not set | ||
539 | # CONFIG_QUOTA is not set | ||
540 | CONFIG_DNOTIFY=y | ||
541 | # CONFIG_AUTOFS_FS is not set | ||
542 | # CONFIG_AUTOFS4_FS is not set | ||
543 | |||
544 | # | ||
545 | # CD-ROM/DVD Filesystems | ||
546 | # | ||
547 | # CONFIG_ISO9660_FS is not set | ||
548 | # CONFIG_UDF_FS is not set | ||
549 | |||
550 | # | ||
551 | # DOS/FAT/NT Filesystems | ||
552 | # | ||
553 | # CONFIG_MSDOS_FS is not set | ||
554 | # CONFIG_VFAT_FS is not set | ||
555 | # CONFIG_NTFS_FS is not set | ||
556 | |||
557 | # | ||
558 | # Pseudo filesystems | ||
559 | # | ||
560 | CONFIG_PROC_FS=y | ||
561 | CONFIG_PROC_KCORE=y | ||
562 | CONFIG_SYSFS=y | ||
563 | # CONFIG_DEVFS_FS is not set | ||
564 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
565 | CONFIG_TMPFS=y | ||
566 | # CONFIG_TMPFS_XATTR is not set | ||
567 | # CONFIG_HUGETLB_PAGE is not set | ||
568 | CONFIG_RAMFS=y | ||
569 | |||
570 | # | ||
571 | # Miscellaneous filesystems | ||
572 | # | ||
573 | # CONFIG_ADFS_FS is not set | ||
574 | # CONFIG_AFFS_FS is not set | ||
575 | # CONFIG_HFS_FS is not set | ||
576 | # CONFIG_HFSPLUS_FS is not set | ||
577 | # CONFIG_BEFS_FS is not set | ||
578 | # CONFIG_BFS_FS is not set | ||
579 | # CONFIG_EFS_FS is not set | ||
580 | # CONFIG_CRAMFS is not set | ||
581 | # CONFIG_VXFS_FS is not set | ||
582 | # CONFIG_HPFS_FS is not set | ||
583 | # CONFIG_QNX4FS_FS is not set | ||
584 | # CONFIG_SYSV_FS is not set | ||
585 | # CONFIG_UFS_FS is not set | ||
586 | |||
587 | # | ||
588 | # Network File Systems | ||
589 | # | ||
590 | CONFIG_NFS_FS=y | ||
591 | # CONFIG_NFS_V3 is not set | ||
592 | # CONFIG_NFS_V4 is not set | ||
593 | # CONFIG_NFS_DIRECTIO is not set | ||
594 | # CONFIG_NFSD is not set | ||
595 | CONFIG_ROOT_NFS=y | ||
596 | CONFIG_LOCKD=y | ||
597 | CONFIG_SUNRPC=y | ||
598 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
599 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
600 | # CONFIG_SMB_FS is not set | ||
601 | # CONFIG_CIFS is not set | ||
602 | # CONFIG_NCP_FS is not set | ||
603 | # CONFIG_CODA_FS is not set | ||
604 | # CONFIG_AFS_FS is not set | ||
605 | |||
606 | # | ||
607 | # Partition Types | ||
608 | # | ||
609 | CONFIG_PARTITION_ADVANCED=y | ||
610 | # CONFIG_ACORN_PARTITION is not set | ||
611 | # CONFIG_OSF_PARTITION is not set | ||
612 | # CONFIG_AMIGA_PARTITION is not set | ||
613 | # CONFIG_ATARI_PARTITION is not set | ||
614 | # CONFIG_MAC_PARTITION is not set | ||
615 | # CONFIG_MSDOS_PARTITION is not set | ||
616 | # CONFIG_LDM_PARTITION is not set | ||
617 | # CONFIG_SGI_PARTITION is not set | ||
618 | # CONFIG_ULTRIX_PARTITION is not set | ||
619 | # CONFIG_SUN_PARTITION is not set | ||
620 | # CONFIG_EFI_PARTITION is not set | ||
621 | |||
622 | # | ||
623 | # Native Language Support | ||
624 | # | ||
625 | # CONFIG_NLS is not set | ||
626 | |||
627 | # | ||
628 | # Library routines | ||
629 | # | ||
630 | # CONFIG_CRC_CCITT is not set | ||
631 | CONFIG_CRC32=y | ||
632 | # CONFIG_LIBCRC32C is not set | ||
633 | |||
634 | # | ||
635 | # Profiling support | ||
636 | # | ||
637 | # CONFIG_PROFILING is not set | ||
638 | |||
639 | # | ||
640 | # Kernel hacking | ||
641 | # | ||
642 | # CONFIG_PRINTK_TIME is not set | ||
643 | # CONFIG_DEBUG_KERNEL is not set | ||
644 | CONFIG_LOG_BUF_SHIFT=14 | ||
645 | |||
646 | # | ||
647 | # Security options | ||
648 | # | ||
649 | # CONFIG_KEYS is not set | ||
650 | # CONFIG_SECURITY is not set | ||
651 | |||
652 | # | ||
653 | # Cryptographic options | ||
654 | # | ||
655 | # CONFIG_CRYPTO is not set | ||
656 | |||
657 | # | ||
658 | # Hardware crypto devices | ||
659 | # | ||
diff --git a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c index d44b7dc5390a..01c226008dbf 100644 --- a/arch/ppc/kernel/cputable.c +++ b/arch/ppc/kernel/cputable.c | |||
@@ -918,6 +918,20 @@ struct cpu_spec cpu_specs[] = { | |||
918 | .dcache_bsize = 32, | 918 | .dcache_bsize = 32, |
919 | .num_pmcs = 4, | 919 | .num_pmcs = 4, |
920 | }, | 920 | }, |
921 | { /* e500v2 */ | ||
922 | .pvr_mask = 0xffff0000, | ||
923 | .pvr_value = 0x80210000, | ||
924 | .cpu_name = "e500v2", | ||
925 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | ||
926 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | ||
927 | CPU_FTR_USE_TB | CPU_FTR_BIG_PHYS, | ||
928 | .cpu_user_features = PPC_FEATURE_32 | | ||
929 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_SPE_COMP | | ||
930 | PPC_FEATURE_HAS_EFP_SINGLE | PPC_FEATURE_HAS_EFP_DOUBLE, | ||
931 | .icache_bsize = 32, | ||
932 | .dcache_bsize = 32, | ||
933 | .num_pmcs = 4, | ||
934 | }, | ||
921 | #endif | 935 | #endif |
922 | #if !CLASSIC_PPC | 936 | #if !CLASSIC_PPC |
923 | { /* default match */ | 937 | { /* default match */ |
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index 661523707e8c..8377b6ca26da 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S | |||
@@ -46,26 +46,23 @@ | |||
46 | 46 | ||
47 | #ifdef CONFIG_BOOKE | 47 | #ifdef CONFIG_BOOKE |
48 | #include "head_booke.h" | 48 | #include "head_booke.h" |
49 | #define TRANSFER_TO_HANDLER_EXC_LEVEL(exc_level) \ | ||
50 | mtspr exc_level##_SPRG,r8; \ | ||
51 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level); \ | ||
52 | lwz r0,GPR10-INT_FRAME_SIZE(r8); \ | ||
53 | stw r0,GPR10(r11); \ | ||
54 | lwz r0,GPR11-INT_FRAME_SIZE(r8); \ | ||
55 | stw r0,GPR11(r11); \ | ||
56 | mfspr r8,exc_level##_SPRG | ||
57 | |||
49 | .globl mcheck_transfer_to_handler | 58 | .globl mcheck_transfer_to_handler |
50 | mcheck_transfer_to_handler: | 59 | mcheck_transfer_to_handler: |
51 | mtspr MCHECK_SPRG,r8 | 60 | TRANSFER_TO_HANDLER_EXC_LEVEL(MCHECK) |
52 | BOOKE_LOAD_MCHECK_STACK | ||
53 | lwz r0,GPR10-INT_FRAME_SIZE(r8) | ||
54 | stw r0,GPR10(r11) | ||
55 | lwz r0,GPR11-INT_FRAME_SIZE(r8) | ||
56 | stw r0,GPR11(r11) | ||
57 | mfspr r8,MCHECK_SPRG | ||
58 | b transfer_to_handler_full | 61 | b transfer_to_handler_full |
59 | 62 | ||
60 | .globl crit_transfer_to_handler | 63 | .globl crit_transfer_to_handler |
61 | crit_transfer_to_handler: | 64 | crit_transfer_to_handler: |
62 | mtspr CRIT_SPRG,r8 | 65 | TRANSFER_TO_HANDLER_EXC_LEVEL(CRIT) |
63 | BOOKE_LOAD_CRIT_STACK | ||
64 | lwz r0,GPR10-INT_FRAME_SIZE(r8) | ||
65 | stw r0,GPR10(r11) | ||
66 | lwz r0,GPR11-INT_FRAME_SIZE(r8) | ||
67 | stw r0,GPR11(r11) | ||
68 | mfspr r8,CRIT_SPRG | ||
69 | /* fall through */ | 66 | /* fall through */ |
70 | #endif | 67 | #endif |
71 | 68 | ||
@@ -783,99 +780,64 @@ exc_exit_restart_end: | |||
783 | * time of the critical interrupt. | 780 | * time of the critical interrupt. |
784 | * | 781 | * |
785 | */ | 782 | */ |
786 | .globl ret_from_crit_exc | ||
787 | ret_from_crit_exc: | ||
788 | REST_NVGPRS(r1) | ||
789 | lwz r3,_MSR(r1) | ||
790 | andi. r3,r3,MSR_PR | ||
791 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) | ||
792 | bne user_exc_return | ||
793 | |||
794 | lwz r0,GPR0(r1) | ||
795 | lwz r2,GPR2(r1) | ||
796 | REST_4GPRS(3, r1) | ||
797 | REST_2GPRS(7, r1) | ||
798 | |||
799 | lwz r10,_XER(r1) | ||
800 | lwz r11,_CTR(r1) | ||
801 | mtspr SPRN_XER,r10 | ||
802 | mtctr r11 | ||
803 | |||
804 | PPC405_ERR77(0,r1) | ||
805 | stwcx. r0,0,r1 /* to clear the reservation */ | ||
806 | |||
807 | lwz r11,_LINK(r1) | ||
808 | mtlr r11 | ||
809 | lwz r10,_CCR(r1) | ||
810 | mtcrf 0xff,r10 | ||
811 | #ifdef CONFIG_40x | 783 | #ifdef CONFIG_40x |
812 | /* avoid any possible TLB misses here by turning off MSR.DR, we | 784 | #define PPC_40x_TURN_OFF_MSR_DR \ |
813 | * assume the instructions here are mapped by a pinned TLB entry */ | 785 | /* avoid any possible TLB misses here by turning off MSR.DR, we \ |
814 | li r10,MSR_IR | 786 | * assume the instructions here are mapped by a pinned TLB entry */ \ |
815 | mtmsr r10 | 787 | li r10,MSR_IR; \ |
816 | isync | 788 | mtmsr r10; \ |
817 | tophys(r1, r1) | 789 | isync; \ |
790 | tophys(r1, r1); | ||
791 | #else | ||
792 | #define PPC_40x_TURN_OFF_MSR_DR | ||
818 | #endif | 793 | #endif |
819 | lwz r9,_DEAR(r1) | 794 | |
820 | lwz r10,_ESR(r1) | 795 | #define RET_FROM_EXC_LEVEL(exc_lvl_srr0, exc_lvl_srr1, exc_lvl_rfi) \ |
821 | mtspr SPRN_DEAR,r9 | 796 | REST_NVGPRS(r1); \ |
822 | mtspr SPRN_ESR,r10 | 797 | lwz r3,_MSR(r1); \ |
823 | lwz r11,_NIP(r1) | 798 | andi. r3,r3,MSR_PR; \ |
824 | lwz r12,_MSR(r1) | 799 | LOAD_MSR_KERNEL(r10,MSR_KERNEL); \ |
825 | mtspr SPRN_CSRR0,r11 | 800 | bne user_exc_return; \ |
826 | mtspr SPRN_CSRR1,r12 | 801 | lwz r0,GPR0(r1); \ |
827 | lwz r9,GPR9(r1) | 802 | lwz r2,GPR2(r1); \ |
828 | lwz r12,GPR12(r1) | 803 | REST_4GPRS(3, r1); \ |
829 | lwz r10,GPR10(r1) | 804 | REST_2GPRS(7, r1); \ |
830 | lwz r11,GPR11(r1) | 805 | lwz r10,_XER(r1); \ |
831 | lwz r1,GPR1(r1) | 806 | lwz r11,_CTR(r1); \ |
832 | PPC405_ERR77_SYNC | 807 | mtspr SPRN_XER,r10; \ |
833 | rfci | 808 | mtctr r11; \ |
834 | b . /* prevent prefetch past rfci */ | 809 | PPC405_ERR77(0,r1); \ |
810 | stwcx. r0,0,r1; /* to clear the reservation */ \ | ||
811 | lwz r11,_LINK(r1); \ | ||
812 | mtlr r11; \ | ||
813 | lwz r10,_CCR(r1); \ | ||
814 | mtcrf 0xff,r10; \ | ||
815 | PPC_40x_TURN_OFF_MSR_DR; \ | ||
816 | lwz r9,_DEAR(r1); \ | ||
817 | lwz r10,_ESR(r1); \ | ||
818 | mtspr SPRN_DEAR,r9; \ | ||
819 | mtspr SPRN_ESR,r10; \ | ||
820 | lwz r11,_NIP(r1); \ | ||
821 | lwz r12,_MSR(r1); \ | ||
822 | mtspr exc_lvl_srr0,r11; \ | ||
823 | mtspr exc_lvl_srr1,r12; \ | ||
824 | lwz r9,GPR9(r1); \ | ||
825 | lwz r12,GPR12(r1); \ | ||
826 | lwz r10,GPR10(r1); \ | ||
827 | lwz r11,GPR11(r1); \ | ||
828 | lwz r1,GPR1(r1); \ | ||
829 | PPC405_ERR77_SYNC; \ | ||
830 | exc_lvl_rfi; \ | ||
831 | b .; /* prevent prefetch past exc_lvl_rfi */ | ||
832 | |||
833 | .globl ret_from_crit_exc | ||
834 | ret_from_crit_exc: | ||
835 | RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, RFCI) | ||
835 | 836 | ||
836 | #ifdef CONFIG_BOOKE | 837 | #ifdef CONFIG_BOOKE |
837 | /* | ||
838 | * Return from a machine check interrupt, similar to a critical | ||
839 | * interrupt. | ||
840 | */ | ||
841 | .globl ret_from_mcheck_exc | 838 | .globl ret_from_mcheck_exc |
842 | ret_from_mcheck_exc: | 839 | ret_from_mcheck_exc: |
843 | REST_NVGPRS(r1) | 840 | RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, RFMCI) |
844 | lwz r3,_MSR(r1) | ||
845 | andi. r3,r3,MSR_PR | ||
846 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) | ||
847 | bne user_exc_return | ||
848 | |||
849 | lwz r0,GPR0(r1) | ||
850 | lwz r2,GPR2(r1) | ||
851 | REST_4GPRS(3, r1) | ||
852 | REST_2GPRS(7, r1) | ||
853 | |||
854 | lwz r10,_XER(r1) | ||
855 | lwz r11,_CTR(r1) | ||
856 | mtspr SPRN_XER,r10 | ||
857 | mtctr r11 | ||
858 | |||
859 | stwcx. r0,0,r1 /* to clear the reservation */ | ||
860 | |||
861 | lwz r11,_LINK(r1) | ||
862 | mtlr r11 | ||
863 | lwz r10,_CCR(r1) | ||
864 | mtcrf 0xff,r10 | ||
865 | lwz r9,_DEAR(r1) | ||
866 | lwz r10,_ESR(r1) | ||
867 | mtspr SPRN_DEAR,r9 | ||
868 | mtspr SPRN_ESR,r10 | ||
869 | lwz r11,_NIP(r1) | ||
870 | lwz r12,_MSR(r1) | ||
871 | mtspr SPRN_MCSRR0,r11 | ||
872 | mtspr SPRN_MCSRR1,r12 | ||
873 | lwz r9,GPR9(r1) | ||
874 | lwz r12,GPR12(r1) | ||
875 | lwz r10,GPR10(r1) | ||
876 | lwz r11,GPR11(r1) | ||
877 | lwz r1,GPR1(r1) | ||
878 | RFMCI | ||
879 | #endif /* CONFIG_BOOKE */ | 841 | #endif /* CONFIG_BOOKE */ |
880 | 842 | ||
881 | /* | 843 | /* |
diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 6f5d380e2345..23fb51819ba5 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S | |||
@@ -291,8 +291,9 @@ label: | |||
291 | /* If we are faulting a kernel address, we have to use the | 291 | /* If we are faulting a kernel address, we have to use the |
292 | * kernel page tables. | 292 | * kernel page tables. |
293 | */ | 293 | */ |
294 | andis. r11, r10, 0x8000 | 294 | lis r11, TASK_SIZE@h |
295 | beq 3f | 295 | cmplw r10, r11 |
296 | blt+ 3f | ||
296 | lis r11, swapper_pg_dir@h | 297 | lis r11, swapper_pg_dir@h |
297 | ori r11, r11, swapper_pg_dir@l | 298 | ori r11, r11, swapper_pg_dir@l |
298 | li r9, 0 | 299 | li r9, 0 |
@@ -479,8 +480,9 @@ label: | |||
479 | /* If we are faulting a kernel address, we have to use the | 480 | /* If we are faulting a kernel address, we have to use the |
480 | * kernel page tables. | 481 | * kernel page tables. |
481 | */ | 482 | */ |
482 | andis. r11, r10, 0x8000 | 483 | lis r11, TASK_SIZE@h |
483 | beq 3f | 484 | cmplw r10, r11 |
485 | blt+ 3f | ||
484 | lis r11, swapper_pg_dir@h | 486 | lis r11, swapper_pg_dir@h |
485 | ori r11, r11, swapper_pg_dir@l | 487 | ori r11, r11, swapper_pg_dir@l |
486 | li r9, 0 | 488 | li r9, 0 |
@@ -578,8 +580,9 @@ label: | |||
578 | /* If we are faulting a kernel address, we have to use the | 580 | /* If we are faulting a kernel address, we have to use the |
579 | * kernel page tables. | 581 | * kernel page tables. |
580 | */ | 582 | */ |
581 | andis. r11, r10, 0x8000 | 583 | lis r11, TASK_SIZE@h |
582 | beq 3f | 584 | cmplw r10, r11 |
585 | blt+ 3f | ||
583 | lis r11, swapper_pg_dir@h | 586 | lis r11, swapper_pg_dir@h |
584 | ori r11, r11, swapper_pg_dir@l | 587 | ori r11, r11, swapper_pg_dir@l |
585 | li r9, 0 | 588 | li r9, 0 |
diff --git a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h index f213d12eec08..9c50f9d2657c 100644 --- a/arch/ppc/kernel/head_booke.h +++ b/arch/ppc/kernel/head_booke.h | |||
@@ -67,46 +67,36 @@ | |||
67 | #define CRIT_STACK_TOP (exception_stack_top) | 67 | #define CRIT_STACK_TOP (exception_stack_top) |
68 | 68 | ||
69 | #ifdef CONFIG_SMP | 69 | #ifdef CONFIG_SMP |
70 | #define BOOKE_LOAD_CRIT_STACK \ | 70 | #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \ |
71 | mfspr r8,SPRN_PIR; \ | 71 | mfspr r8,SPRN_PIR; \ |
72 | mulli r8,r8,BOOKE_EXCEPTION_STACK_SIZE; \ | 72 | mulli r8,r8,BOOKE_EXCEPTION_STACK_SIZE; \ |
73 | neg r8,r8; \ | 73 | neg r8,r8; \ |
74 | addis r8,r8,CRIT_STACK_TOP@ha; \ | 74 | addis r8,r8,level##_STACK_TOP@ha; \ |
75 | addi r8,r8,CRIT_STACK_TOP@l | 75 | addi r8,r8,level##_STACK_TOP@l |
76 | #define BOOKE_LOAD_MCHECK_STACK \ | ||
77 | mfspr r8,SPRN_PIR; \ | ||
78 | mulli r8,r8,BOOKE_EXCEPTION_STACK_SIZE; \ | ||
79 | neg r8,r8; \ | ||
80 | addis r8,r8,MCHECK_STACK_TOP@ha; \ | ||
81 | addi r8,r8,MCHECK_STACK_TOP@l | ||
82 | #else | 76 | #else |
83 | #define BOOKE_LOAD_CRIT_STACK \ | 77 | #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \ |
84 | lis r8,CRIT_STACK_TOP@h; \ | 78 | lis r8,level##_STACK_TOP@h; \ |
85 | ori r8,r8,CRIT_STACK_TOP@l | 79 | ori r8,r8,level##_STACK_TOP@l |
86 | #define BOOKE_LOAD_MCHECK_STACK \ | ||
87 | lis r8,MCHECK_STACK_TOP@h; \ | ||
88 | ori r8,r8,MCHECK_STACK_TOP@l | ||
89 | #endif | 80 | #endif |
90 | 81 | ||
91 | /* | 82 | /* |
92 | * Exception prolog for critical exceptions. This is a little different | 83 | * Exception prolog for critical/machine check exceptions. This is a |
93 | * from the normal exception prolog above since a critical exception | 84 | * little different from the normal exception prolog above since a |
94 | * can potentially occur at any point during normal exception processing. | 85 | * critical/machine check exception can potentially occur at any point |
95 | * Thus we cannot use the same SPRG registers as the normal prolog above. | 86 | * during normal exception processing. Thus we cannot use the same SPRG |
96 | * Instead we use a portion of the critical exception stack at low physical | 87 | * registers as the normal prolog above. Instead we use a portion of the |
97 | * addresses. | 88 | * critical/machine check exception stack at low physical addresses. |
98 | */ | 89 | */ |
99 | 90 | #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \ | |
100 | #define CRITICAL_EXCEPTION_PROLOG \ | 91 | mtspr exc_level##_SPRG,r8; \ |
101 | mtspr CRIT_SPRG,r8; \ | 92 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ |
102 | BOOKE_LOAD_CRIT_STACK; /* r8 points to the crit stack */ \ | ||
103 | stw r10,GPR10-INT_FRAME_SIZE(r8); \ | 93 | stw r10,GPR10-INT_FRAME_SIZE(r8); \ |
104 | stw r11,GPR11-INT_FRAME_SIZE(r8); \ | 94 | stw r11,GPR11-INT_FRAME_SIZE(r8); \ |
105 | mfcr r10; /* save CR in r10 for now */\ | 95 | mfcr r10; /* save CR in r10 for now */\ |
106 | mfspr r11,SPRN_CSRR1; /* check whether user or kernel */\ | 96 | mfspr r11,exc_level_srr1; /* check whether user or kernel */\ |
107 | andi. r11,r11,MSR_PR; \ | 97 | andi. r11,r11,MSR_PR; \ |
108 | mr r11,r8; \ | 98 | mr r11,r8; \ |
109 | mfspr r8,CRIT_SPRG; \ | 99 | mfspr r8,exc_level##_SPRG; \ |
110 | beq 1f; \ | 100 | beq 1f; \ |
111 | /* COMING FROM USER MODE */ \ | 101 | /* COMING FROM USER MODE */ \ |
112 | mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ | 102 | mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ |
@@ -122,9 +112,9 @@ | |||
122 | stw r12,_DEAR(r11); /* since they may have had stuff */\ | 112 | stw r12,_DEAR(r11); /* since they may have had stuff */\ |
123 | mfspr r9,SPRN_ESR; /* in them at the point where the */\ | 113 | mfspr r9,SPRN_ESR; /* in them at the point where the */\ |
124 | stw r9,_ESR(r11); /* exception was taken */\ | 114 | stw r9,_ESR(r11); /* exception was taken */\ |
125 | mfspr r12,SPRN_CSRR0; \ | 115 | mfspr r12,exc_level_srr0; \ |
126 | stw r1,GPR1(r11); \ | 116 | stw r1,GPR1(r11); \ |
127 | mfspr r9,SPRN_CSRR1; \ | 117 | mfspr r9,exc_level_srr1; \ |
128 | stw r1,0(r11); \ | 118 | stw r1,0(r11); \ |
129 | mr r1,r11; \ | 119 | mr r1,r11; \ |
130 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ | 120 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ |
@@ -132,45 +122,10 @@ | |||
132 | SAVE_4GPRS(3, r11); \ | 122 | SAVE_4GPRS(3, r11); \ |
133 | SAVE_2GPRS(7, r11) | 123 | SAVE_2GPRS(7, r11) |
134 | 124 | ||
135 | /* | 125 | #define CRITICAL_EXCEPTION_PROLOG \ |
136 | * Exception prolog for machine check exceptions. This is similar to | 126 | EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1) |
137 | * the critical exception prolog, except that machine check exceptions | 127 | #define MCHECK_EXCEPTION_PROLOG \ |
138 | * have their stack. | 128 | EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1) |
139 | */ | ||
140 | #define MCHECK_EXCEPTION_PROLOG \ | ||
141 | mtspr MCHECK_SPRG,r8; \ | ||
142 | BOOKE_LOAD_MCHECK_STACK; /* r8 points to the mcheck stack */\ | ||
143 | stw r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
144 | stw r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
145 | mfcr r10; /* save CR in r10 for now */\ | ||
146 | mfspr r11,SPRN_MCSRR1; /* check whether user or kernel */\ | ||
147 | andi. r11,r11,MSR_PR; \ | ||
148 | mr r11,r8; \ | ||
149 | mfspr r8,MCHECK_SPRG; \ | ||
150 | beq 1f; \ | ||
151 | /* COMING FROM USER MODE */ \ | ||
152 | mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ | ||
153 | lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ | ||
154 | addi r11,r11,THREAD_SIZE; \ | ||
155 | 1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ | ||
156 | stw r10,_CCR(r11); /* save various registers */\ | ||
157 | stw r12,GPR12(r11); \ | ||
158 | stw r9,GPR9(r11); \ | ||
159 | mflr r10; \ | ||
160 | stw r10,_LINK(r11); \ | ||
161 | mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ | ||
162 | stw r12,_DEAR(r11); /* since they may have had stuff */\ | ||
163 | mfspr r9,SPRN_ESR; /* in them at the point where the */\ | ||
164 | stw r9,_ESR(r11); /* exception was taken */\ | ||
165 | mfspr r12,SPRN_MCSRR0; \ | ||
166 | stw r1,GPR1(r11); \ | ||
167 | mfspr r9,SPRN_MCSRR1; \ | ||
168 | stw r1,0(r11); \ | ||
169 | mr r1,r11; \ | ||
170 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ | ||
171 | stw r0,GPR0(r11); \ | ||
172 | SAVE_4GPRS(3, r11); \ | ||
173 | SAVE_2GPRS(7, r11) | ||
174 | 129 | ||
175 | /* | 130 | /* |
176 | * Exception vectors. | 131 | * Exception vectors. |
@@ -237,7 +192,6 @@ label: | |||
237 | EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ | 192 | EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ |
238 | ret_from_except) | 193 | ret_from_except) |
239 | 194 | ||
240 | |||
241 | /* Check for a single step debug exception while in an exception | 195 | /* Check for a single step debug exception while in an exception |
242 | * handler before state has been saved. This is to catch the case | 196 | * handler before state has been saved. This is to catch the case |
243 | * where an instruction that we are trying to single step causes | 197 | * where an instruction that we are trying to single step causes |
@@ -291,7 +245,7 @@ label: | |||
291 | lwz r9,GPR9(r11); \ | 245 | lwz r9,GPR9(r11); \ |
292 | lwz r12,GPR12(r11); \ | 246 | lwz r12,GPR12(r11); \ |
293 | mtspr CRIT_SPRG,r8; \ | 247 | mtspr CRIT_SPRG,r8; \ |
294 | BOOKE_LOAD_CRIT_STACK; /* r8 points to the crit stack */ \ | 248 | BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \ |
295 | lwz r10,GPR10-INT_FRAME_SIZE(r8); \ | 249 | lwz r10,GPR10-INT_FRAME_SIZE(r8); \ |
296 | lwz r11,GPR11-INT_FRAME_SIZE(r8); \ | 250 | lwz r11,GPR11-INT_FRAME_SIZE(r8); \ |
297 | mfspr r8,CRIT_SPRG; \ | 251 | mfspr r8,CRIT_SPRG; \ |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index 5c20266e3b1f..c42f75326939 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <asm/xmon.h> | 41 | #include <asm/xmon.h> |
42 | #include <asm/ocp.h> | 42 | #include <asm/ocp.h> |
43 | 43 | ||
44 | #if defined(CONFIG_85xx) || defined(CONFIG_83xx) | 44 | #if defined(CONFIG_85xx) || defined(CONFIG_83xx) || defined(CONFIG_MPC10X_BRIDGE) |
45 | #include <asm/ppc_sys.h> | 45 | #include <asm/ppc_sys.h> |
46 | #endif | 46 | #endif |
47 | 47 | ||
@@ -61,8 +61,6 @@ extern void power4_idle(void); | |||
61 | 61 | ||
62 | extern boot_infos_t *boot_infos; | 62 | extern boot_infos_t *boot_infos; |
63 | struct ide_machdep_calls ppc_ide_md; | 63 | struct ide_machdep_calls ppc_ide_md; |
64 | char *sysmap; | ||
65 | unsigned long sysmap_size; | ||
66 | 64 | ||
67 | /* Used with the BI_MEMSIZE bootinfo parameter to store the memory | 65 | /* Used with the BI_MEMSIZE bootinfo parameter to store the memory |
68 | size value reported by the boot loader. */ | 66 | size value reported by the boot loader. */ |
@@ -249,7 +247,7 @@ int show_cpuinfo(struct seq_file *m, void *v) | |||
249 | seq_printf(m, "bogomips\t: %lu.%02lu\n", | 247 | seq_printf(m, "bogomips\t: %lu.%02lu\n", |
250 | lpj / (500000/HZ), (lpj / (5000/HZ)) % 100); | 248 | lpj / (500000/HZ), (lpj / (5000/HZ)) % 100); |
251 | 249 | ||
252 | #if defined(CONFIG_85xx) || defined(CONFIG_83xx) | 250 | #if defined(CONFIG_85xx) || defined(CONFIG_83xx) || defined(CONFIG_MPC10X_BRIDGE) |
253 | if (cur_ppc_sys_spec->ppc_sys_name) | 251 | if (cur_ppc_sys_spec->ppc_sys_name) |
254 | seq_printf(m, "chipset\t\t: %s\n", | 252 | seq_printf(m, "chipset\t\t: %s\n", |
255 | cur_ppc_sys_spec->ppc_sys_name); | 253 | cur_ppc_sys_spec->ppc_sys_name); |
@@ -578,11 +576,6 @@ void parse_bootinfo(struct bi_record *rec) | |||
578 | case BI_CMD_LINE: | 576 | case BI_CMD_LINE: |
579 | strlcpy(cmd_line, (void *)data, sizeof(cmd_line)); | 577 | strlcpy(cmd_line, (void *)data, sizeof(cmd_line)); |
580 | break; | 578 | break; |
581 | case BI_SYSMAP: | ||
582 | sysmap = (char *)((data[0] >= (KERNELBASE)) ? data[0] : | ||
583 | (data[0]+KERNELBASE)); | ||
584 | sysmap_size = data[1]; | ||
585 | break; | ||
586 | #ifdef CONFIG_BLK_DEV_INITRD | 579 | #ifdef CONFIG_BLK_DEV_INITRD |
587 | case BI_INITRD: | 580 | case BI_INITRD: |
588 | initrd_start = data[0] + KERNELBASE; | 581 | initrd_start = data[0] + KERNELBASE; |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index c65731e8bc65..2ca8ecfeefd9 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -81,8 +81,10 @@ void die(const char * str, struct pt_regs * fp, long err) | |||
81 | console_verbose(); | 81 | console_verbose(); |
82 | spin_lock_irq(&die_lock); | 82 | spin_lock_irq(&die_lock); |
83 | #ifdef CONFIG_PMAC_BACKLIGHT | 83 | #ifdef CONFIG_PMAC_BACKLIGHT |
84 | set_backlight_enable(1); | 84 | if (_machine == _MACH_Pmac) { |
85 | set_backlight_level(BACKLIGHT_MAX); | 85 | set_backlight_enable(1); |
86 | set_backlight_level(BACKLIGHT_MAX); | ||
87 | } | ||
86 | #endif | 88 | #endif |
87 | printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); | 89 | printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); |
88 | #ifdef CONFIG_PREEMPT | 90 | #ifdef CONFIG_PREEMPT |
diff --git a/arch/ppc/lib/locks.c b/arch/ppc/lib/locks.c index 694163d696d8..c450dc4b766e 100644 --- a/arch/ppc/lib/locks.c +++ b/arch/ppc/lib/locks.c | |||
@@ -130,7 +130,7 @@ void _raw_read_lock(rwlock_t *rw) | |||
130 | while (!read_can_lock(rw)) { | 130 | while (!read_can_lock(rw)) { |
131 | if (--stuck == 0) { | 131 | if (--stuck == 0) { |
132 | printk("_read_lock(%p) CPU#%d lock %d\n", | 132 | printk("_read_lock(%p) CPU#%d lock %d\n", |
133 | rw, _smp_processor_id(), rw->lock); | 133 | rw, raw_smp_processor_id(), rw->lock); |
134 | stuck = INIT_STUCK; | 134 | stuck = INIT_STUCK; |
135 | } | 135 | } |
136 | } | 136 | } |
@@ -158,7 +158,7 @@ void _raw_write_lock(rwlock_t *rw) | |||
158 | while (!write_can_lock(rw)) { | 158 | while (!write_can_lock(rw)) { |
159 | if (--stuck == 0) { | 159 | if (--stuck == 0) { |
160 | printk("write_lock(%p) CPU#%d lock %d)\n", | 160 | printk("write_lock(%p) CPU#%d lock %d)\n", |
161 | rw, _smp_processor_id(), rw->lock); | 161 | rw, raw_smp_processor_id(), rw->lock); |
162 | stuck = INIT_STUCK; | 162 | stuck = INIT_STUCK; |
163 | } | 163 | } |
164 | } | 164 | } |
diff --git a/arch/ppc/mm/fsl_booke_mmu.c b/arch/ppc/mm/fsl_booke_mmu.c index 36233bdcdf8f..e07990efa046 100644 --- a/arch/ppc/mm/fsl_booke_mmu.c +++ b/arch/ppc/mm/fsl_booke_mmu.c | |||
@@ -64,6 +64,8 @@ extern unsigned long total_lowmem; | |||
64 | extern unsigned long __max_low_memory; | 64 | extern unsigned long __max_low_memory; |
65 | #define MAX_LOW_MEM CONFIG_LOWMEM_SIZE | 65 | #define MAX_LOW_MEM CONFIG_LOWMEM_SIZE |
66 | 66 | ||
67 | #define NUM_TLBCAMS (16) | ||
68 | |||
67 | struct tlbcam { | 69 | struct tlbcam { |
68 | u32 MAS0; | 70 | u32 MAS0; |
69 | u32 MAS1; | 71 | u32 MAS1; |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 363c157e3617..334ef4150d92 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -96,9 +96,6 @@ extern struct task_struct *current_set[NR_CPUS]; | |||
96 | char *klimit = _end; | 96 | char *klimit = _end; |
97 | struct mem_pieces phys_avail; | 97 | struct mem_pieces phys_avail; |
98 | 98 | ||
99 | extern char *sysmap; | ||
100 | extern unsigned long sysmap_size; | ||
101 | |||
102 | /* | 99 | /* |
103 | * this tells the system to map all of ram with the segregs | 100 | * this tells the system to map all of ram with the segregs |
104 | * (i.e. page tables) instead of the bats. | 101 | * (i.e. page tables) instead of the bats. |
@@ -442,12 +439,6 @@ void __init mem_init(void) | |||
442 | if (agp_special_page) | 439 | if (agp_special_page) |
443 | SetPageReserved(virt_to_page(agp_special_page)); | 440 | SetPageReserved(virt_to_page(agp_special_page)); |
444 | #endif | 441 | #endif |
445 | if ( sysmap ) | ||
446 | for (addr = (unsigned long)sysmap; | ||
447 | addr < PAGE_ALIGN((unsigned long)sysmap+sysmap_size) ; | ||
448 | addr += PAGE_SIZE) | ||
449 | SetPageReserved(virt_to_page(addr)); | ||
450 | |||
451 | for (addr = PAGE_OFFSET; addr < (unsigned long)high_memory; | 442 | for (addr = PAGE_OFFSET; addr < (unsigned long)high_memory; |
452 | addr += PAGE_SIZE) { | 443 | addr += PAGE_SIZE) { |
453 | if (!PageReserved(virt_to_page(addr))) | 444 | if (!PageReserved(virt_to_page(addr))) |
@@ -469,7 +460,6 @@ void __init mem_init(void) | |||
469 | struct page *page = mem_map + pfn; | 460 | struct page *page = mem_map + pfn; |
470 | 461 | ||
471 | ClearPageReserved(page); | 462 | ClearPageReserved(page); |
472 | set_bit(PG_highmem, &page->flags); | ||
473 | set_page_count(page, 1); | 463 | set_page_count(page, 1); |
474 | __free_page(page); | 464 | __free_page(page); |
475 | totalhigh_pages++; | 465 | totalhigh_pages++; |
@@ -483,9 +473,7 @@ void __init mem_init(void) | |||
483 | codepages<< (PAGE_SHIFT-10), datapages<< (PAGE_SHIFT-10), | 473 | codepages<< (PAGE_SHIFT-10), datapages<< (PAGE_SHIFT-10), |
484 | initpages<< (PAGE_SHIFT-10), | 474 | initpages<< (PAGE_SHIFT-10), |
485 | (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))); | 475 | (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))); |
486 | if (sysmap) | 476 | |
487 | printk("System.map loaded at 0x%08x for debugger, size: %ld bytes\n", | ||
488 | (unsigned int)sysmap, sysmap_size); | ||
489 | #ifdef CONFIG_PPC_PMAC | 477 | #ifdef CONFIG_PPC_PMAC |
490 | if (agp_special_page) | 478 | if (agp_special_page) |
491 | printk(KERN_INFO "AGP special page: 0x%08lx\n", agp_special_page); | 479 | printk(KERN_INFO "AGP special page: 0x%08lx\n", agp_special_page); |
@@ -535,9 +523,6 @@ set_phys_avail(unsigned long total_memory) | |||
535 | if (rtas_data) | 523 | if (rtas_data) |
536 | mem_pieces_remove(&phys_avail, rtas_data, rtas_size, 1); | 524 | mem_pieces_remove(&phys_avail, rtas_data, rtas_size, 1); |
537 | #endif | 525 | #endif |
538 | /* remove the sysmap pages from the available memory */ | ||
539 | if (sysmap) | ||
540 | mem_pieces_remove(&phys_avail, __pa(sysmap), sysmap_size, 1); | ||
541 | #ifdef CONFIG_PPC_PMAC | 526 | #ifdef CONFIG_PPC_PMAC |
542 | /* Because of some uninorth weirdness, we need a page of | 527 | /* Because of some uninorth weirdness, we need a page of |
543 | * memory as high as possible (it must be outside of the | 528 | * memory as high as possible (it must be outside of the |
diff --git a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h index ffcdb46997dc..540f3292b229 100644 --- a/arch/ppc/mm/mmu_decl.h +++ b/arch/ppc/mm/mmu_decl.h | |||
@@ -43,6 +43,8 @@ extern int mem_init_done; | |||
43 | extern PTE *Hash, *Hash_end; | 43 | extern PTE *Hash, *Hash_end; |
44 | extern unsigned long Hash_size, Hash_mask; | 44 | extern unsigned long Hash_size, Hash_mask; |
45 | 45 | ||
46 | extern unsigned int num_tlbcam_entries; | ||
47 | |||
46 | /* ...and now those things that may be slightly different between processor | 48 | /* ...and now those things that may be slightly different between processor |
47 | * architectures. -- Dan | 49 | * architectures. -- Dan |
48 | */ | 50 | */ |
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index 5d2f3f66aefa..81a3d7446d37 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c | |||
@@ -66,7 +66,6 @@ void setbat(int index, unsigned long virt, unsigned long phys, | |||
66 | 66 | ||
67 | #ifdef HAVE_TLBCAM | 67 | #ifdef HAVE_TLBCAM |
68 | extern unsigned int tlbcam_index; | 68 | extern unsigned int tlbcam_index; |
69 | extern unsigned int num_tlbcam_entries; | ||
70 | extern unsigned long v_mapped_by_tlbcam(unsigned long va); | 69 | extern unsigned long v_mapped_by_tlbcam(unsigned long va); |
71 | extern unsigned long p_mapped_by_tlbcam(unsigned long pa); | 70 | extern unsigned long p_mapped_by_tlbcam(unsigned long pa); |
72 | #else /* !HAVE_TLBCAM */ | 71 | #else /* !HAVE_TLBCAM */ |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index e6348b5a1ddc..37ece1542799 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/time.h> | 41 | #include <asm/time.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
44 | #include <asm/prom.h> | ||
45 | #include <asm/ipic.h> | 44 | #include <asm/ipic.h> |
46 | #include <asm/bootinfo.h> | 45 | #include <asm/bootinfo.h> |
47 | #include <asm/pci-bridge.h> | 46 | #include <asm/pci-bridge.h> |
@@ -186,6 +185,26 @@ mpc834x_sys_init_IRQ(void) | |||
186 | ipic_set_default_priority(); | 185 | ipic_set_default_priority(); |
187 | } | 186 | } |
188 | 187 | ||
188 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | ||
189 | extern ulong ds1374_get_rtc_time(void); | ||
190 | extern int ds1374_set_rtc_time(ulong); | ||
191 | |||
192 | static int __init | ||
193 | mpc834x_rtc_hookup(void) | ||
194 | { | ||
195 | struct timespec tv; | ||
196 | |||
197 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | ||
198 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | ||
199 | |||
200 | tv.tv_nsec = 0; | ||
201 | tv.tv_sec = (ppc_md.get_rtc_time)(); | ||
202 | do_settimeofday(&tv); | ||
203 | |||
204 | return 0; | ||
205 | } | ||
206 | late_initcall(mpc834x_rtc_hookup); | ||
207 | #endif | ||
189 | static __inline__ void | 208 | static __inline__ void |
190 | mpc834x_sys_set_bat(void) | 209 | mpc834x_sys_set_bat(void) |
191 | { | 210 | { |
diff --git a/arch/ppc/platforms/85xx/Kconfig b/arch/ppc/platforms/85xx/Kconfig index ff92e38e7da1..c5bc2821d991 100644 --- a/arch/ppc/platforms/85xx/Kconfig +++ b/arch/ppc/platforms/85xx/Kconfig | |||
@@ -21,6 +21,11 @@ config MPC8540_ADS | |||
21 | help | 21 | help |
22 | This option enables support for the MPC 8540 ADS evaluation board. | 22 | This option enables support for the MPC 8540 ADS evaluation board. |
23 | 23 | ||
24 | config MPC8548_CDS | ||
25 | bool "Freescale MPC8548 CDS" | ||
26 | help | ||
27 | This option enablese support for the MPC8548 CDS evaluation board. | ||
28 | |||
24 | config MPC8555_CDS | 29 | config MPC8555_CDS |
25 | bool "Freescale MPC8555 CDS" | 30 | bool "Freescale MPC8555 CDS" |
26 | help | 31 | help |
@@ -53,6 +58,11 @@ config MPC8540 | |||
53 | depends on MPC8540_ADS | 58 | depends on MPC8540_ADS |
54 | default y | 59 | default y |
55 | 60 | ||
61 | config MPC8548 | ||
62 | bool | ||
63 | depends on MPC8548_CDS | ||
64 | default y | ||
65 | |||
56 | config MPC8555 | 66 | config MPC8555 |
57 | bool | 67 | bool |
58 | depends on MPC8555_CDS | 68 | depends on MPC8555_CDS |
diff --git a/arch/ppc/platforms/85xx/Makefile b/arch/ppc/platforms/85xx/Makefile index 854fbd298ba2..efdf813108f2 100644 --- a/arch/ppc/platforms/85xx/Makefile +++ b/arch/ppc/platforms/85xx/Makefile | |||
@@ -2,6 +2,7 @@ | |||
2 | # Makefile for the PowerPC 85xx linux kernel. | 2 | # Makefile for the PowerPC 85xx linux kernel. |
3 | # | 3 | # |
4 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads_common.o mpc8540_ads.o | 4 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads_common.o mpc8540_ads.o |
5 | obj-$(CONFIG_MPC8548_CDS) += mpc85xx_cds_common.o | ||
5 | obj-$(CONFIG_MPC8555_CDS) += mpc85xx_cds_common.o | 6 | obj-$(CONFIG_MPC8555_CDS) += mpc85xx_cds_common.o |
6 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads_common.o mpc8560_ads.o | 7 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads_common.o mpc8560_ads.o |
7 | obj-$(CONFIG_SBC8560) += sbc85xx.o sbc8560.o | 8 | obj-$(CONFIG_SBC8560) += sbc85xx.o sbc8560.o |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 583838ab02d8..a2ed611cd936 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/time.h> | 41 | #include <asm/time.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
44 | #include <asm/prom.h> | ||
45 | #include <asm/open_pic.h> | 44 | #include <asm/open_pic.h> |
46 | #include <asm/bootinfo.h> | 45 | #include <asm/bootinfo.h> |
47 | #include <asm/pci-bridge.h> | 46 | #include <asm/pci-bridge.h> |
@@ -88,7 +87,7 @@ mpc8540ads_setup_arch(void) | |||
88 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | 87 | #ifdef CONFIG_SERIAL_TEXT_DEBUG |
89 | /* Invalidate the entry we stole earlier the serial ports | 88 | /* Invalidate the entry we stole earlier the serial ports |
90 | * should be properly mapped */ | 89 | * should be properly mapped */ |
91 | invalidate_tlbcam_entry(NUM_TLBCAMS - 1); | 90 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); |
92 | #endif | 91 | #endif |
93 | 92 | ||
94 | /* setup the board related information for the enet controllers */ | 93 | /* setup the board related information for the enet controllers */ |
@@ -150,7 +149,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
150 | struct uart_port p; | 149 | struct uart_port p; |
151 | 150 | ||
152 | /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */ | 151 | /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */ |
153 | settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base, | 152 | settlbcam(num_tlbcam_entries - 1, binfo->bi_immr_base, |
154 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); | 153 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); |
155 | 154 | ||
156 | memset(&p, 0, sizeof (p)); | 155 | memset(&p, 0, sizeof (p)); |
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c index 761b8c7b25d2..d87dfd5ce0a2 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.c +++ b/arch/ppc/platforms/85xx/mpc8560_ads.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/time.h> | 41 | #include <asm/time.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
44 | #include <asm/prom.h> | ||
45 | #include <asm/open_pic.h> | 44 | #include <asm/open_pic.h> |
46 | #include <asm/bootinfo.h> | 45 | #include <asm/bootinfo.h> |
47 | #include <asm/pci-bridge.h> | 46 | #include <asm/pci-bridge.h> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c index ba9f9f562c45..18e952d1767c 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/time.h> | 36 | #include <asm/time.h> |
37 | #include <asm/io.h> | 37 | #include <asm/io.h> |
38 | #include <asm/machdep.h> | 38 | #include <asm/machdep.h> |
39 | #include <asm/prom.h> | ||
40 | #include <asm/open_pic.h> | 39 | #include <asm/open_pic.h> |
41 | #include <asm/bootinfo.h> | 40 | #include <asm/bootinfo.h> |
42 | #include <asm/pci-bridge.h> | 41 | #include <asm/pci-bridge.h> |
@@ -59,40 +58,8 @@ extern unsigned long total_memory; /* in mm/init */ | |||
59 | unsigned char __res[sizeof (bd_t)]; | 58 | unsigned char __res[sizeof (bd_t)]; |
60 | 59 | ||
61 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ | 60 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ |
62 | |||
63 | static u_char mpc85xx_ads_openpic_initsenses[] __initdata = { | 61 | static u_char mpc85xx_ads_openpic_initsenses[] __initdata = { |
64 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0: L2 Cache */ | 62 | MPC85XX_INTERNAL_IRQ_SENSES, |
65 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1: ECM */ | ||
66 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2: DDR DRAM */ | ||
67 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3: LBIU */ | ||
68 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4: DMA 0 */ | ||
69 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5: DMA 1 */ | ||
70 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6: DMA 2 */ | ||
71 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7: DMA 3 */ | ||
72 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8: PCI/PCI-X */ | ||
73 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9: RIO Inbound Port Write Error */ | ||
74 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10: RIO Doorbell Inbound */ | ||
75 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11: RIO Outbound Message */ | ||
76 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12: RIO Inbound Message */ | ||
77 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13: TSEC 0 Transmit */ | ||
78 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14: TSEC 0 Receive */ | ||
79 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15: Unused */ | ||
80 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16: Unused */ | ||
81 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17: Unused */ | ||
82 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18: TSEC 0 Receive/Transmit Error */ | ||
83 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19: TSEC 1 Transmit */ | ||
84 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20: TSEC 1 Receive */ | ||
85 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21: Unused */ | ||
86 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22: Unused */ | ||
87 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23: Unused */ | ||
88 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24: TSEC 1 Receive/Transmit Error */ | ||
89 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25: Fast Ethernet */ | ||
90 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26: DUART */ | ||
91 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27: I2C */ | ||
92 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28: Performance Monitor */ | ||
93 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29: Unused */ | ||
94 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30: CPM */ | ||
95 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31: Unused */ | ||
96 | 0x0, /* External 0: */ | 63 | 0x0, /* External 0: */ |
97 | #if defined(CONFIG_PCI) | 64 | #if defined(CONFIG_PCI) |
98 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI slot 0 */ | 65 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI slot 0 */ |
@@ -159,7 +126,7 @@ mpc85xx_ads_init_IRQ(void) | |||
159 | /* Skip reserved space and internal sources */ | 126 | /* Skip reserved space and internal sources */ |
160 | openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); | 127 | openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); |
161 | /* Map PIC IRQs 0-11 */ | 128 | /* Map PIC IRQs 0-11 */ |
162 | openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000); | 129 | openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000); |
163 | 130 | ||
164 | /* we let openpic interrupts starting from an offset, to | 131 | /* we let openpic interrupts starting from an offset, to |
165 | * leave space for cascading interrupts underneath. | 132 | * leave space for cascading interrupts underneath. |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index e7cfa498568c..203b2ca61df8 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <asm/todc.h> | 42 | #include <asm/todc.h> |
43 | #include <asm/io.h> | 43 | #include <asm/io.h> |
44 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
45 | #include <asm/prom.h> | ||
46 | #include <asm/open_pic.h> | 45 | #include <asm/open_pic.h> |
47 | #include <asm/i8259.h> | 46 | #include <asm/i8259.h> |
48 | #include <asm/bootinfo.h> | 47 | #include <asm/bootinfo.h> |
@@ -73,40 +72,8 @@ static int cds_pci_slot = 2; | |||
73 | static volatile u8 * cadmus; | 72 | static volatile u8 * cadmus; |
74 | 73 | ||
75 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ | 74 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ |
76 | |||
77 | static u_char mpc85xx_cds_openpic_initsenses[] __initdata = { | 75 | static u_char mpc85xx_cds_openpic_initsenses[] __initdata = { |
78 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0: L2 Cache */ | 76 | MPC85XX_INTERNAL_IRQ_SENSES, |
79 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1: ECM */ | ||
80 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2: DDR DRAM */ | ||
81 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3: LBIU */ | ||
82 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4: DMA 0 */ | ||
83 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5: DMA 1 */ | ||
84 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6: DMA 2 */ | ||
85 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7: DMA 3 */ | ||
86 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8: PCI/PCI-X */ | ||
87 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9: RIO Inbound Port Write Error */ | ||
88 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10: RIO Doorbell Inbound */ | ||
89 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11: RIO Outbound Message */ | ||
90 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12: RIO Inbound Message */ | ||
91 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13: TSEC 0 Transmit */ | ||
92 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14: TSEC 0 Receive */ | ||
93 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15: Unused */ | ||
94 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16: Unused */ | ||
95 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17: Unused */ | ||
96 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18: TSEC 0 Receive/Transmit Error */ | ||
97 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19: TSEC 1 Transmit */ | ||
98 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20: TSEC 1 Receive */ | ||
99 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21: Unused */ | ||
100 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22: Unused */ | ||
101 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23: Unused */ | ||
102 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24: TSEC 1 Receive/Transmit Error */ | ||
103 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25: Fast Ethernet */ | ||
104 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26: DUART */ | ||
105 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27: I2C */ | ||
106 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28: Performance Monitor */ | ||
107 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29: Unused */ | ||
108 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30: CPM */ | ||
109 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31: Unused */ | ||
110 | #if defined(CONFIG_PCI) | 77 | #if defined(CONFIG_PCI) |
111 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 0: PCI1 slot */ | 78 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 0: PCI1 slot */ |
112 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI1 slot */ | 79 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI1 slot */ |
@@ -182,7 +149,6 @@ void __init | |||
182 | mpc85xx_cds_init_IRQ(void) | 149 | mpc85xx_cds_init_IRQ(void) |
183 | { | 150 | { |
184 | bd_t *binfo = (bd_t *) __res; | 151 | bd_t *binfo = (bd_t *) __res; |
185 | int i; | ||
186 | 152 | ||
187 | /* Determine the Physical Address of the OpenPIC regs */ | 153 | /* Determine the Physical Address of the OpenPIC regs */ |
188 | phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; | 154 | phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; |
@@ -191,9 +157,13 @@ mpc85xx_cds_init_IRQ(void) | |||
191 | OpenPIC_NumInitSenses = sizeof (mpc85xx_cds_openpic_initsenses); | 157 | OpenPIC_NumInitSenses = sizeof (mpc85xx_cds_openpic_initsenses); |
192 | 158 | ||
193 | /* Skip reserved space and internal sources */ | 159 | /* Skip reserved space and internal sources */ |
160 | #ifdef CONFIG_MPC8548 | ||
161 | openpic_set_sources(0, 48, OpenPIC_Addr + 0x10200); | ||
162 | #else | ||
194 | openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); | 163 | openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); |
164 | #endif | ||
195 | /* Map PIC IRQs 0-11 */ | 165 | /* Map PIC IRQs 0-11 */ |
196 | openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000); | 166 | openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000); |
197 | 167 | ||
198 | /* we let openpic interrupts starting from an offset, to | 168 | /* we let openpic interrupts starting from an offset, to |
199 | * leave space for cascading interrupts underneath. | 169 | * leave space for cascading interrupts underneath. |
@@ -475,26 +445,52 @@ mpc85xx_cds_setup_arch(void) | |||
475 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | 445 | #ifdef CONFIG_SERIAL_TEXT_DEBUG |
476 | /* Invalidate the entry we stole earlier the serial ports | 446 | /* Invalidate the entry we stole earlier the serial ports |
477 | * should be properly mapped */ | 447 | * should be properly mapped */ |
478 | invalidate_tlbcam_entry(NUM_TLBCAMS - 1); | 448 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); |
479 | #endif | 449 | #endif |
480 | 450 | ||
481 | /* setup the board related information for the enet controllers */ | 451 | /* setup the board related information for the enet controllers */ |
482 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); | 452 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); |
483 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 453 | if (pdata) { |
484 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 454 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
485 | pdata->phyid = 0; | 455 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; |
486 | /* fixup phy address */ | 456 | pdata->phyid = 0; |
487 | pdata->phy_reg_addr += binfo->bi_immr_base; | 457 | /* fixup phy address */ |
488 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 458 | pdata->phy_reg_addr += binfo->bi_immr_base; |
459 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | ||
460 | } | ||
489 | 461 | ||
490 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); | 462 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); |
491 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 463 | if (pdata) { |
492 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 464 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
493 | pdata->phyid = 1; | 465 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; |
494 | /* fixup phy address */ | 466 | pdata->phyid = 1; |
495 | pdata->phy_reg_addr += binfo->bi_immr_base; | 467 | /* fixup phy address */ |
496 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 468 | pdata->phy_reg_addr += binfo->bi_immr_base; |
469 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | ||
470 | } | ||
471 | |||
472 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC1); | ||
473 | if (pdata) { | ||
474 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | ||
475 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | ||
476 | pdata->phyid = 0; | ||
477 | /* fixup phy address */ | ||
478 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
479 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | ||
480 | } | ||
481 | |||
482 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC2); | ||
483 | if (pdata) { | ||
484 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | ||
485 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | ||
486 | pdata->phyid = 1; | ||
487 | /* fixup phy address */ | ||
488 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
489 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | ||
490 | } | ||
497 | 491 | ||
492 | ppc_sys_device_remove(MPC85xx_eTSEC3); | ||
493 | ppc_sys_device_remove(MPC85xx_eTSEC4); | ||
498 | 494 | ||
499 | #ifdef CONFIG_BLK_DEV_INITRD | 495 | #ifdef CONFIG_BLK_DEV_INITRD |
500 | if (initrd_start) | 496 | if (initrd_start) |
@@ -531,7 +527,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
531 | struct uart_port p; | 527 | struct uart_port p; |
532 | 528 | ||
533 | /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */ | 529 | /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */ |
534 | settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base, | 530 | settlbcam(num_tlbcam_entries - 1, binfo->bi_immr_base, |
535 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); | 531 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); |
536 | 532 | ||
537 | memset(&p, 0, sizeof (p)); | 533 | memset(&p, 0, sizeof (p)); |
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index 7b9e1543e175..3dbdd73618eb 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/time.h> | 41 | #include <asm/time.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
44 | #include <asm/prom.h> | ||
45 | #include <asm/open_pic.h> | 44 | #include <asm/open_pic.h> |
46 | #include <asm/bootinfo.h> | 45 | #include <asm/bootinfo.h> |
47 | #include <asm/pci-bridge.h> | 46 | #include <asm/pci-bridge.h> |
@@ -125,7 +124,7 @@ sbc8560_setup_arch(void) | |||
125 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | 124 | #ifdef CONFIG_SERIAL_TEXT_DEBUG |
126 | /* Invalidate the entry we stole earlier the serial ports | 125 | /* Invalidate the entry we stole earlier the serial ports |
127 | * should be properly mapped */ | 126 | * should be properly mapped */ |
128 | invalidate_tlbcam_entry(NUM_TLBCAMS - 1); | 127 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); |
129 | #endif | 128 | #endif |
130 | 129 | ||
131 | /* setup the board related information for the enet controllers */ | 130 | /* setup the board related information for the enet controllers */ |
@@ -176,7 +175,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
176 | 175 | ||
177 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | 176 | #ifdef CONFIG_SERIAL_TEXT_DEBUG |
178 | /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */ | 177 | /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */ |
179 | settlbcam(NUM_TLBCAMS - 1, UARTA_ADDR, | 178 | settlbcam(num_tlbcam_entries - 1, UARTA_ADDR, |
180 | UARTA_ADDR, 0x1000, _PAGE_IO, 0); | 179 | UARTA_ADDR, 0x1000, _PAGE_IO, 0); |
181 | #endif | 180 | #endif |
182 | 181 | ||
diff --git a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c index 2d638c1c1bd6..4f6d1ddd6fb8 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.c +++ b/arch/ppc/platforms/85xx/sbc85xx.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/time.h> | 35 | #include <asm/time.h> |
36 | #include <asm/io.h> | 36 | #include <asm/io.h> |
37 | #include <asm/machdep.h> | 37 | #include <asm/machdep.h> |
38 | #include <asm/prom.h> | ||
39 | #include <asm/open_pic.h> | 38 | #include <asm/open_pic.h> |
40 | #include <asm/bootinfo.h> | 39 | #include <asm/bootinfo.h> |
41 | #include <asm/pci-bridge.h> | 40 | #include <asm/pci-bridge.h> |
@@ -59,40 +58,8 @@ unsigned long pci_dram_offset = 0; | |||
59 | extern unsigned long total_memory; /* in mm/init */ | 58 | extern unsigned long total_memory; /* in mm/init */ |
60 | 59 | ||
61 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ | 60 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ |
62 | |||
63 | static u_char sbc8560_openpic_initsenses[] __initdata = { | 61 | static u_char sbc8560_openpic_initsenses[] __initdata = { |
64 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0: L2 Cache */ | 62 | MPC85XX_INTERNAL_IRQ_SENSES, |
65 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1: ECM */ | ||
66 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2: DDR DRAM */ | ||
67 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3: LBIU */ | ||
68 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4: DMA 0 */ | ||
69 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5: DMA 1 */ | ||
70 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6: DMA 2 */ | ||
71 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7: DMA 3 */ | ||
72 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8: PCI/PCI-X */ | ||
73 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9: RIO Inbound Port Write Error */ | ||
74 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10: RIO Doorbell Inbound */ | ||
75 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11: RIO Outbound Message */ | ||
76 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12: RIO Inbound Message */ | ||
77 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13: TSEC 0 Transmit */ | ||
78 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14: TSEC 0 Receive */ | ||
79 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15: Unused */ | ||
80 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16: Unused */ | ||
81 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17: Unused */ | ||
82 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18: TSEC 0 Receive/Transmit Error */ | ||
83 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19: TSEC 1 Transmit */ | ||
84 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20: TSEC 1 Receive */ | ||
85 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21: Unused */ | ||
86 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22: Unused */ | ||
87 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23: Unused */ | ||
88 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24: TSEC 1 Receive/Transmit Error */ | ||
89 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25: Fast Ethernet */ | ||
90 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26: DUART */ | ||
91 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27: I2C */ | ||
92 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28: Performance Monitor */ | ||
93 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29: Unused */ | ||
94 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30: CPM */ | ||
95 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31: Unused */ | ||
96 | 0x0, /* External 0: */ | 63 | 0x0, /* External 0: */ |
97 | 0x0, /* External 1: */ | 64 | 0x0, /* External 1: */ |
98 | #if defined(CONFIG_PCI) | 65 | #if defined(CONFIG_PCI) |
@@ -159,7 +126,7 @@ sbc8560_init_IRQ(void) | |||
159 | /* Skip reserved space and internal sources */ | 126 | /* Skip reserved space and internal sources */ |
160 | openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); | 127 | openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); |
161 | /* Map PIC IRQs 0-11 */ | 128 | /* Map PIC IRQs 0-11 */ |
162 | openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000); | 129 | openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000); |
163 | 130 | ||
164 | /* we let openpic interrupts starting from an offset, to | 131 | /* we let openpic interrupts starting from an offset, to |
165 | * leave space for cascading interrupts underneath. | 132 | * leave space for cascading interrupts underneath. |
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c index bc95836e417c..9455bb6b45e9 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.c +++ b/arch/ppc/platforms/85xx/stx_gp3.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <asm/time.h> | 46 | #include <asm/time.h> |
47 | #include <asm/io.h> | 47 | #include <asm/io.h> |
48 | #include <asm/machdep.h> | 48 | #include <asm/machdep.h> |
49 | #include <asm/prom.h> | ||
50 | #include <asm/open_pic.h> | 49 | #include <asm/open_pic.h> |
51 | #include <asm/bootinfo.h> | 50 | #include <asm/bootinfo.h> |
52 | #include <asm/pci-bridge.h> | 51 | #include <asm/pci-bridge.h> |
@@ -72,38 +71,7 @@ unsigned long pci_dram_offset = 0; | |||
72 | 71 | ||
73 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ | 72 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ |
74 | static u8 gp3_openpic_initsenses[] __initdata = { | 73 | static u8 gp3_openpic_initsenses[] __initdata = { |
75 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0: L2 Cache */ | 74 | MPC85XX_INTERNAL_IRQ_SENSES, |
76 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1: ECM */ | ||
77 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2: DDR DRAM */ | ||
78 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3: LBIU */ | ||
79 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4: DMA 0 */ | ||
80 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5: DMA 1 */ | ||
81 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6: DMA 2 */ | ||
82 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7: DMA 3 */ | ||
83 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8: PCI/PCI-X */ | ||
84 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9: RIO Inbound Port Write Error */ | ||
85 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10: RIO Doorbell Inbound */ | ||
86 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11: RIO Outbound Message */ | ||
87 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12: RIO Inbound Message */ | ||
88 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13: TSEC 0 Transmit */ | ||
89 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14: TSEC 0 Receive */ | ||
90 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15: Unused */ | ||
91 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16: Unused */ | ||
92 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17: Unused */ | ||
93 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18: TSEC 0 Receive/Transmit Error */ | ||
94 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19: TSEC 1 Transmit */ | ||
95 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20: TSEC 1 Receive */ | ||
96 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21: Unused */ | ||
97 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22: Unused */ | ||
98 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23: Unused */ | ||
99 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24: TSEC 1 Receive/Transmit Error */ | ||
100 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25: Fast Ethernet */ | ||
101 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26: DUART */ | ||
102 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27: I2C */ | ||
103 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28: Performance Monitor */ | ||
104 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29: Unused */ | ||
105 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30: CPM */ | ||
106 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31: Unused */ | ||
107 | 0x0, /* External 0: */ | 75 | 0x0, /* External 0: */ |
108 | #if defined(CONFIG_PCI) | 76 | #if defined(CONFIG_PCI) |
109 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI slot 0 */ | 77 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI slot 0 */ |
@@ -200,7 +168,6 @@ static struct irqaction cpm2_irqaction = { | |||
200 | static void __init | 168 | static void __init |
201 | gp3_init_IRQ(void) | 169 | gp3_init_IRQ(void) |
202 | { | 170 | { |
203 | int i; | ||
204 | bd_t *binfo = (bd_t *) __res; | 171 | bd_t *binfo = (bd_t *) __res; |
205 | 172 | ||
206 | /* | 173 | /* |
@@ -218,7 +185,7 @@ gp3_init_IRQ(void) | |||
218 | openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); | 185 | openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); |
219 | 186 | ||
220 | /* Map PIC IRQs 0-11 */ | 187 | /* Map PIC IRQs 0-11 */ |
221 | openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000); | 188 | openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000); |
222 | 189 | ||
223 | /* | 190 | /* |
224 | * Let openpic interrupts starting from an offset, to | 191 | * Let openpic interrupts starting from an offset, to |
diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index 531bfa0e4512..70e58f43f2b8 100644 --- a/arch/ppc/platforms/sandpoint.c +++ b/arch/ppc/platforms/sandpoint.c | |||
@@ -81,6 +81,7 @@ | |||
81 | #include <linux/serial.h> | 81 | #include <linux/serial.h> |
82 | #include <linux/tty.h> /* for linux/serial_core.h */ | 82 | #include <linux/tty.h> /* for linux/serial_core.h */ |
83 | #include <linux/serial_core.h> | 83 | #include <linux/serial_core.h> |
84 | #include <linux/serial_8250.h> | ||
84 | 85 | ||
85 | #include <asm/system.h> | 86 | #include <asm/system.h> |
86 | #include <asm/pgtable.h> | 87 | #include <asm/pgtable.h> |
@@ -99,6 +100,7 @@ | |||
99 | #include <asm/mpc10x.h> | 100 | #include <asm/mpc10x.h> |
100 | #include <asm/pci-bridge.h> | 101 | #include <asm/pci-bridge.h> |
101 | #include <asm/kgdb.h> | 102 | #include <asm/kgdb.h> |
103 | #include <asm/ppc_sys.h> | ||
102 | 104 | ||
103 | #include "sandpoint.h" | 105 | #include "sandpoint.h" |
104 | 106 | ||
@@ -305,6 +307,24 @@ sandpoint_setup_arch(void) | |||
305 | /* Lookup PCI host bridges */ | 307 | /* Lookup PCI host bridges */ |
306 | sandpoint_find_bridges(); | 308 | sandpoint_find_bridges(); |
307 | 309 | ||
310 | if (strncmp (cur_ppc_sys_spec->ppc_sys_name, "8245", 4) == 0) | ||
311 | { | ||
312 | bd_t *bp = (bd_t *)__res; | ||
313 | struct plat_serial8250_port *pdata; | ||
314 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC10X_DUART); | ||
315 | |||
316 | if (pdata) | ||
317 | { | ||
318 | pdata[0].uartclk = bp->bi_busfreq; | ||
319 | pdata[0].membase = ioremap(pdata[0].mapbase, 0x100); | ||
320 | |||
321 | /* this disables the 2nd serial port on the DUART | ||
322 | * since the sandpoint does not have it connected */ | ||
323 | pdata[1].uartclk = 0; | ||
324 | pdata[1].irq = 0; | ||
325 | pdata[1].mapbase = 0; | ||
326 | } | ||
327 | |||
308 | printk(KERN_INFO "Motorola SPS Sandpoint Test Platform\n"); | 328 | printk(KERN_INFO "Motorola SPS Sandpoint Test Platform\n"); |
309 | printk(KERN_INFO "Port by MontaVista Software, Inc. (source@mvista.com)\n"); | 329 | printk(KERN_INFO "Port by MontaVista Software, Inc. (source@mvista.com)\n"); |
310 | 330 | ||
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 96acf85800d4..dec5bf4f6879 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -92,7 +92,7 @@ ifeq ($(CONFIG_SERIAL_MPSC_CONSOLE),y) | |||
92 | obj-$(CONFIG_SERIAL_TEXT_DEBUG) += mv64x60_dbg.o | 92 | obj-$(CONFIG_SERIAL_TEXT_DEBUG) += mv64x60_dbg.o |
93 | endif | 93 | endif |
94 | obj-$(CONFIG_BOOTX_TEXT) += btext.o | 94 | obj-$(CONFIG_BOOTX_TEXT) += btext.o |
95 | obj-$(CONFIG_MPC10X_BRIDGE) += mpc10x_common.o indirect_pci.o | 95 | obj-$(CONFIG_MPC10X_BRIDGE) += mpc10x_common.o indirect_pci.o ppc_sys.o |
96 | obj-$(CONFIG_MPC10X_OPENPIC) += open_pic.o | 96 | obj-$(CONFIG_MPC10X_OPENPIC) += open_pic.o |
97 | obj-$(CONFIG_40x) += dcr.o | 97 | obj-$(CONFIG_40x) += dcr.o |
98 | obj-$(CONFIG_BOOKE) += dcr.o | 98 | obj-$(CONFIG_BOOKE) += dcr.o |
@@ -107,6 +107,7 @@ obj-$(CONFIG_83xx) += ipic.o ppc83xx_setup.o ppc_sys.o \ | |||
107 | ifeq ($(CONFIG_83xx),y) | 107 | ifeq ($(CONFIG_83xx),y) |
108 | obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o | 108 | obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o |
109 | endif | 109 | endif |
110 | obj-$(CONFIG_MPC8548_CDS) += todc_time.o | ||
110 | obj-$(CONFIG_MPC8555_CDS) += todc_time.o | 111 | obj-$(CONFIG_MPC8555_CDS) += todc_time.o |
111 | obj-$(CONFIG_PPC_MPC52xx) += mpc52xx_setup.o mpc52xx_pic.o \ | 112 | obj-$(CONFIG_PPC_MPC52xx) += mpc52xx_setup.o mpc52xx_pic.o \ |
112 | mpc52xx_sys.o mpc52xx_devices.o ppc_sys.o | 113 | mpc52xx_sys.o mpc52xx_devices.o ppc_sys.o |
diff --git a/arch/ppc/syslib/mpc10x_common.c b/arch/ppc/syslib/mpc10x_common.c index fd93adfd464c..8fc5f4154521 100644 --- a/arch/ppc/syslib/mpc10x_common.c +++ b/arch/ppc/syslib/mpc10x_common.c | |||
@@ -21,6 +21,9 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/serial_8250.h> | ||
25 | #include <linux/fsl_devices.h> | ||
26 | #include <linux/device.h> | ||
24 | 27 | ||
25 | #include <asm/byteorder.h> | 28 | #include <asm/byteorder.h> |
26 | #include <asm/io.h> | 29 | #include <asm/io.h> |
@@ -30,16 +33,7 @@ | |||
30 | #include <asm/pci-bridge.h> | 33 | #include <asm/pci-bridge.h> |
31 | #include <asm/open_pic.h> | 34 | #include <asm/open_pic.h> |
32 | #include <asm/mpc10x.h> | 35 | #include <asm/mpc10x.h> |
33 | #include <asm/ocp.h> | 36 | #include <asm/ppc_sys.h> |
34 | |||
35 | /* The OCP structure is fixed by code below, before OCP initialises. | ||
36 | paddr depends on where the board places the EUMB. | ||
37 | - fixed in mpc10x_bridge_init(). | ||
38 | irq depends on two things: | ||
39 | > does the board use the EPIC at all? (PCORE does not). | ||
40 | > is the EPIC in serial or parallel mode? | ||
41 | - fixed in mpc10x_set_openpic(). | ||
42 | */ | ||
43 | 37 | ||
44 | #ifdef CONFIG_MPC10X_OPENPIC | 38 | #ifdef CONFIG_MPC10X_OPENPIC |
45 | #ifdef CONFIG_EPIC_SERIAL_MODE | 39 | #ifdef CONFIG_EPIC_SERIAL_MODE |
@@ -50,35 +44,140 @@ | |||
50 | #define MPC10X_I2C_IRQ (EPIC_IRQ_BASE + NUM_8259_INTERRUPTS) | 44 | #define MPC10X_I2C_IRQ (EPIC_IRQ_BASE + NUM_8259_INTERRUPTS) |
51 | #define MPC10X_DMA0_IRQ (EPIC_IRQ_BASE + 1 + NUM_8259_INTERRUPTS) | 45 | #define MPC10X_DMA0_IRQ (EPIC_IRQ_BASE + 1 + NUM_8259_INTERRUPTS) |
52 | #define MPC10X_DMA1_IRQ (EPIC_IRQ_BASE + 2 + NUM_8259_INTERRUPTS) | 46 | #define MPC10X_DMA1_IRQ (EPIC_IRQ_BASE + 2 + NUM_8259_INTERRUPTS) |
47 | #define MPC10X_UART0_IRQ (EPIC_IRQ_BASE + 4 + NUM_8259_INTERRUPTS) | ||
53 | #else | 48 | #else |
54 | #define MPC10X_I2C_IRQ OCP_IRQ_NA | 49 | #define MPC10X_I2C_IRQ -1 |
55 | #define MPC10X_DMA0_IRQ OCP_IRQ_NA | 50 | #define MPC10X_DMA0_IRQ -1 |
56 | #define MPC10X_DMA1_IRQ OCP_IRQ_NA | 51 | #define MPC10X_DMA1_IRQ -1 |
52 | #define MPC10X_UART0_IRQ -1 | ||
57 | #endif | 53 | #endif |
58 | 54 | ||
59 | 55 | static struct fsl_i2c_platform_data mpc10x_i2c_pdata = { | |
60 | struct ocp_def core_ocp[] = { | 56 | .device_flags = 0, |
61 | { .vendor = OCP_VENDOR_INVALID | ||
62 | } | ||
63 | }; | 57 | }; |
64 | 58 | ||
65 | static struct ocp_fs_i2c_data mpc10x_i2c_data = { | 59 | static struct plat_serial8250_port serial_platform_data[] = { |
66 | .flags = 0 | 60 | [0] = { |
61 | .mapbase = 0x4500, | ||
62 | .iotype = UPIO_MEM, | ||
63 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
64 | }, | ||
65 | [1] = { | ||
66 | .mapbase = 0x4600, | ||
67 | .iotype = UPIO_MEM, | ||
68 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
69 | }, | ||
70 | { }, | ||
67 | }; | 71 | }; |
68 | static struct ocp_def mpc10x_i2c_ocp = { | 72 | |
69 | .vendor = OCP_VENDOR_MOTOROLA, | 73 | struct platform_device ppc_sys_platform_devices[] = { |
70 | .function = OCP_FUNC_IIC, | 74 | [MPC10X_IIC1] = { |
71 | .index = 0, | 75 | .name = "fsl-i2c", |
72 | .additions = &mpc10x_i2c_data | 76 | .id = 1, |
77 | .dev.platform_data = &mpc10x_i2c_pdata, | ||
78 | .num_resources = 2, | ||
79 | .resource = (struct resource[]) { | ||
80 | { | ||
81 | .start = MPC10X_EUMB_I2C_OFFSET, | ||
82 | .end = MPC10X_EUMB_I2C_OFFSET + | ||
83 | MPC10X_EUMB_I2C_SIZE - 1, | ||
84 | .flags = IORESOURCE_MEM, | ||
85 | }, | ||
86 | { | ||
87 | .flags = IORESOURCE_IRQ | ||
88 | }, | ||
89 | }, | ||
90 | }, | ||
91 | [MPC10X_DMA0] = { | ||
92 | .name = "fsl-dma", | ||
93 | .id = 0, | ||
94 | .num_resources = 2, | ||
95 | .resource = (struct resource[]) { | ||
96 | { | ||
97 | .start = MPC10X_EUMB_DMA_OFFSET + 0x10, | ||
98 | .end = MPC10X_EUMB_DMA_OFFSET + 0x1f, | ||
99 | .flags = IORESOURCE_MEM, | ||
100 | }, | ||
101 | { | ||
102 | .flags = IORESOURCE_IRQ, | ||
103 | }, | ||
104 | }, | ||
105 | }, | ||
106 | [MPC10X_DMA1] = { | ||
107 | .name = "fsl-dma", | ||
108 | .id = 1, | ||
109 | .num_resources = 2, | ||
110 | .resource = (struct resource[]) { | ||
111 | { | ||
112 | .start = MPC10X_EUMB_DMA_OFFSET + 0x20, | ||
113 | .end = MPC10X_EUMB_DMA_OFFSET + 0x2f, | ||
114 | .flags = IORESOURCE_MEM, | ||
115 | }, | ||
116 | { | ||
117 | .flags = IORESOURCE_IRQ, | ||
118 | }, | ||
119 | }, | ||
120 | }, | ||
121 | [MPC10X_DMA1] = { | ||
122 | .name = "fsl-dma", | ||
123 | .id = 1, | ||
124 | .num_resources = 2, | ||
125 | .resource = (struct resource[]) { | ||
126 | { | ||
127 | .start = MPC10X_EUMB_DMA_OFFSET + 0x20, | ||
128 | .end = MPC10X_EUMB_DMA_OFFSET + 0x2f, | ||
129 | .flags = IORESOURCE_MEM, | ||
130 | }, | ||
131 | { | ||
132 | .flags = IORESOURCE_IRQ, | ||
133 | }, | ||
134 | }, | ||
135 | }, | ||
136 | [MPC10X_DUART] = { | ||
137 | .name = "serial8250", | ||
138 | .id = 0, | ||
139 | .dev.platform_data = serial_platform_data, | ||
140 | }, | ||
73 | }; | 141 | }; |
74 | 142 | ||
75 | static struct ocp_def mpc10x_dma_ocp[2] = { | 143 | /* We use the PCI ID to match on */ |
76 | { .vendor = OCP_VENDOR_MOTOROLA, | 144 | struct ppc_sys_spec *cur_ppc_sys_spec; |
77 | .function = OCP_FUNC_DMA, | 145 | struct ppc_sys_spec ppc_sys_specs[] = { |
78 | .index = 0 }, | 146 | { |
79 | { .vendor = OCP_VENDOR_MOTOROLA, | 147 | .ppc_sys_name = "8245", |
80 | .function = OCP_FUNC_DMA, | 148 | .mask = 0xFFFFFFFF, |
81 | .index = 1 } | 149 | .value = MPC10X_BRIDGE_8245, |
150 | .num_devices = 4, | ||
151 | .device_list = (enum ppc_sys_devices[]) | ||
152 | { | ||
153 | MPC10X_IIC1, MPC10X_DMA0, MPC10X_DMA1, MPC10X_DUART, | ||
154 | }, | ||
155 | }, | ||
156 | { | ||
157 | .ppc_sys_name = "8240", | ||
158 | .mask = 0xFFFFFFFF, | ||
159 | .value = MPC10X_BRIDGE_8240, | ||
160 | .num_devices = 3, | ||
161 | .device_list = (enum ppc_sys_devices[]) | ||
162 | { | ||
163 | MPC10X_IIC1, MPC10X_DMA0, MPC10X_DMA1, | ||
164 | }, | ||
165 | }, | ||
166 | { | ||
167 | .ppc_sys_name = "107", | ||
168 | .mask = 0xFFFFFFFF, | ||
169 | .value = MPC10X_BRIDGE_107, | ||
170 | .num_devices = 3, | ||
171 | .device_list = (enum ppc_sys_devices[]) | ||
172 | { | ||
173 | MPC10X_IIC1, MPC10X_DMA0, MPC10X_DMA1, | ||
174 | }, | ||
175 | }, | ||
176 | { /* default match */ | ||
177 | .ppc_sys_name = "", | ||
178 | .mask = 0x00000000, | ||
179 | .value = 0x00000000, | ||
180 | }, | ||
82 | }; | 181 | }; |
83 | 182 | ||
84 | /* Set resources to match bridge memory map */ | 183 | /* Set resources to match bridge memory map */ |
@@ -132,7 +231,7 @@ mpc10x_bridge_init(struct pci_controller *hose, | |||
132 | uint new_map, | 231 | uint new_map, |
133 | uint phys_eumb_base) | 232 | uint phys_eumb_base) |
134 | { | 233 | { |
135 | int host_bridge, picr1, picr1_bit; | 234 | int host_bridge, picr1, picr1_bit, i; |
136 | ulong pci_config_addr, pci_config_data; | 235 | ulong pci_config_addr, pci_config_data; |
137 | u_char pir, byte; | 236 | u_char pir, byte; |
138 | 237 | ||
@@ -273,7 +372,7 @@ mpc10x_bridge_init(struct pci_controller *hose, | |||
273 | printk("Host bridge in Agent mode\n"); | 372 | printk("Host bridge in Agent mode\n"); |
274 | /* Read or Set LMBAR & PCSRBAR? */ | 373 | /* Read or Set LMBAR & PCSRBAR? */ |
275 | } | 374 | } |
276 | 375 | ||
277 | /* Set base addr of the 8240/107 EUMB. */ | 376 | /* Set base addr of the 8240/107 EUMB. */ |
278 | early_write_config_dword(hose, | 377 | early_write_config_dword(hose, |
279 | 0, | 378 | 0, |
@@ -287,17 +386,6 @@ mpc10x_bridge_init(struct pci_controller *hose, | |||
287 | ioremap(phys_eumb_base + MPC10X_EUMB_EPIC_OFFSET, | 386 | ioremap(phys_eumb_base + MPC10X_EUMB_EPIC_OFFSET, |
288 | MPC10X_EUMB_EPIC_SIZE); | 387 | MPC10X_EUMB_EPIC_SIZE); |
289 | #endif | 388 | #endif |
290 | mpc10x_i2c_ocp.paddr = phys_eumb_base + MPC10X_EUMB_I2C_OFFSET; | ||
291 | mpc10x_i2c_ocp.irq = MPC10X_I2C_IRQ; | ||
292 | ocp_add_one_device(&mpc10x_i2c_ocp); | ||
293 | mpc10x_dma_ocp[0].paddr = phys_eumb_base + | ||
294 | MPC10X_EUMB_DMA_OFFSET + 0x100; | ||
295 | mpc10x_dma_ocp[0].irq = MPC10X_DMA0_IRQ; | ||
296 | ocp_add_one_device(&mpc10x_dma_ocp[0]); | ||
297 | mpc10x_dma_ocp[1].paddr = phys_eumb_base + | ||
298 | MPC10X_EUMB_DMA_OFFSET + 0x200; | ||
299 | mpc10x_dma_ocp[1].irq = MPC10X_DMA1_IRQ; | ||
300 | ocp_add_one_device(&mpc10x_dma_ocp[1]); | ||
301 | } | 389 | } |
302 | 390 | ||
303 | #ifdef CONFIG_MPC10X_STORE_GATHERING | 391 | #ifdef CONFIG_MPC10X_STORE_GATHERING |
@@ -306,6 +394,29 @@ mpc10x_bridge_init(struct pci_controller *hose, | |||
306 | mpc10x_disable_store_gathering(hose); | 394 | mpc10x_disable_store_gathering(hose); |
307 | #endif | 395 | #endif |
308 | 396 | ||
397 | /* setup platform devices for MPC10x bridges */ | ||
398 | identify_ppc_sys_by_id (host_bridge); | ||
399 | |||
400 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
401 | unsigned int dev_id = cur_ppc_sys_spec->device_list[i]; | ||
402 | ppc_sys_fixup_mem_resource(&ppc_sys_platform_devices[dev_id], | ||
403 | phys_eumb_base); | ||
404 | } | ||
405 | |||
406 | /* IRQ's are determined at runtime */ | ||
407 | ppc_sys_platform_devices[MPC10X_IIC1].resource[1].start = MPC10X_I2C_IRQ; | ||
408 | ppc_sys_platform_devices[MPC10X_IIC1].resource[1].end = MPC10X_I2C_IRQ; | ||
409 | ppc_sys_platform_devices[MPC10X_DMA0].resource[1].start = MPC10X_DMA0_IRQ; | ||
410 | ppc_sys_platform_devices[MPC10X_DMA0].resource[1].end = MPC10X_DMA0_IRQ; | ||
411 | ppc_sys_platform_devices[MPC10X_DMA1].resource[1].start = MPC10X_DMA1_IRQ; | ||
412 | ppc_sys_platform_devices[MPC10X_DMA1].resource[1].end = MPC10X_DMA1_IRQ; | ||
413 | |||
414 | serial_platform_data[0].mapbase += phys_eumb_base; | ||
415 | serial_platform_data[0].irq = MPC10X_UART0_IRQ; | ||
416 | |||
417 | serial_platform_data[1].mapbase += phys_eumb_base; | ||
418 | serial_platform_data[1].irq = MPC10X_UART0_IRQ + 1; | ||
419 | |||
309 | /* | 420 | /* |
310 | * 8240 erratum 26, 8241/8245 erratum 29, 107 erratum 23: speculative | 421 | * 8240 erratum 26, 8241/8245 erratum 29, 107 erratum 23: speculative |
311 | * PCI reads may return stale data so turn off. | 422 | * PCI reads may return stale data so turn off. |
@@ -330,7 +441,7 @@ mpc10x_bridge_init(struct pci_controller *hose, | |||
330 | * 8245 (Rev 2., dated 10/2003) says PICR2[0] is reserverd. | 441 | * 8245 (Rev 2., dated 10/2003) says PICR2[0] is reserverd. |
331 | */ | 442 | */ |
332 | if (host_bridge == MPC10X_BRIDGE_8245) { | 443 | if (host_bridge == MPC10X_BRIDGE_8245) { |
333 | ulong picr2; | 444 | u32 picr2; |
334 | 445 | ||
335 | early_read_config_dword(hose, 0, PCI_DEVFN(0,0), | 446 | early_read_config_dword(hose, 0, PCI_DEVFN(0,0), |
336 | MPC10X_CFG_PICR2_REG, &picr2); | 447 | MPC10X_CFG_PICR2_REG, &picr2); |
@@ -504,6 +615,8 @@ void __init mpc10x_set_openpic(void) | |||
504 | openpic_set_sources(EPIC_IRQ_BASE, 3, OpenPIC_Addr + 0x11020); | 615 | openpic_set_sources(EPIC_IRQ_BASE, 3, OpenPIC_Addr + 0x11020); |
505 | /* Skip reserved space and map Message Unit Interrupt (I2O) */ | 616 | /* Skip reserved space and map Message Unit Interrupt (I2O) */ |
506 | openpic_set_sources(EPIC_IRQ_BASE + 3, 1, OpenPIC_Addr + 0x110C0); | 617 | openpic_set_sources(EPIC_IRQ_BASE + 3, 1, OpenPIC_Addr + 0x110C0); |
618 | /* Skip reserved space and map Serial Interupts */ | ||
619 | openpic_set_sources(EPIC_IRQ_BASE + 4, 2, OpenPIC_Addr + 0x11120); | ||
507 | 620 | ||
508 | openpic_init(NUM_8259_INTERRUPTS); | 621 | openpic_init(NUM_8259_INTERRUPTS); |
509 | } | 622 | } |
diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c index 1e658ef57e75..8af322dd476a 100644 --- a/arch/ppc/syslib/mpc85xx_devices.c +++ b/arch/ppc/syslib/mpc85xx_devices.c | |||
@@ -40,6 +40,42 @@ static struct gianfar_platform_data mpc85xx_tsec2_pdata = { | |||
40 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | 40 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct gianfar_platform_data mpc85xx_etsec1_pdata = { | ||
44 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | ||
45 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | ||
46 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | ||
47 | FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN | | ||
48 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH, | ||
49 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | ||
50 | }; | ||
51 | |||
52 | static struct gianfar_platform_data mpc85xx_etsec2_pdata = { | ||
53 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | ||
54 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | ||
55 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | ||
56 | FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN | | ||
57 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH, | ||
58 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | ||
59 | }; | ||
60 | |||
61 | static struct gianfar_platform_data mpc85xx_etsec3_pdata = { | ||
62 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | ||
63 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | ||
64 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | ||
65 | FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN | | ||
66 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH, | ||
67 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | ||
68 | }; | ||
69 | |||
70 | static struct gianfar_platform_data mpc85xx_etsec4_pdata = { | ||
71 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | ||
72 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | ||
73 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | ||
74 | FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN | | ||
75 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH, | ||
76 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | ||
77 | }; | ||
78 | |||
43 | static struct gianfar_platform_data mpc85xx_fec_pdata = { | 79 | static struct gianfar_platform_data mpc85xx_fec_pdata = { |
44 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | 80 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, |
45 | }; | 81 | }; |
@@ -48,6 +84,10 @@ static struct fsl_i2c_platform_data mpc85xx_fsl_i2c_pdata = { | |||
48 | .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, | 84 | .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, |
49 | }; | 85 | }; |
50 | 86 | ||
87 | static struct fsl_i2c_platform_data mpc85xx_fsl_i2c2_pdata = { | ||
88 | .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, | ||
89 | }; | ||
90 | |||
51 | static struct plat_serial8250_port serial_platform_data[] = { | 91 | static struct plat_serial8250_port serial_platform_data[] = { |
52 | [0] = { | 92 | [0] = { |
53 | .mapbase = 0x4500, | 93 | .mapbase = 0x4500, |
@@ -281,7 +321,6 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
281 | }, | 321 | }, |
282 | }, | 322 | }, |
283 | }, | 323 | }, |
284 | #ifdef CONFIG_CPM2 | ||
285 | [MPC85xx_CPM_FCC1] = { | 324 | [MPC85xx_CPM_FCC1] = { |
286 | .name = "fsl-cpm-fcc", | 325 | .name = "fsl-cpm-fcc", |
287 | .id = 1, | 326 | .id = 1, |
@@ -535,7 +574,151 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
535 | }, | 574 | }, |
536 | }, | 575 | }, |
537 | }, | 576 | }, |
538 | #endif /* CONFIG_CPM2 */ | 577 | [MPC85xx_eTSEC1] = { |
578 | .name = "fsl-gianfar", | ||
579 | .id = 1, | ||
580 | .dev.platform_data = &mpc85xx_etsec1_pdata, | ||
581 | .num_resources = 4, | ||
582 | .resource = (struct resource[]) { | ||
583 | { | ||
584 | .start = MPC85xx_ENET1_OFFSET, | ||
585 | .end = MPC85xx_ENET1_OFFSET + | ||
586 | MPC85xx_ENET1_SIZE - 1, | ||
587 | .flags = IORESOURCE_MEM, | ||
588 | }, | ||
589 | { | ||
590 | .name = "tx", | ||
591 | .start = MPC85xx_IRQ_TSEC1_TX, | ||
592 | .end = MPC85xx_IRQ_TSEC1_TX, | ||
593 | .flags = IORESOURCE_IRQ, | ||
594 | }, | ||
595 | { | ||
596 | .name = "rx", | ||
597 | .start = MPC85xx_IRQ_TSEC1_RX, | ||
598 | .end = MPC85xx_IRQ_TSEC1_RX, | ||
599 | .flags = IORESOURCE_IRQ, | ||
600 | }, | ||
601 | { | ||
602 | .name = "error", | ||
603 | .start = MPC85xx_IRQ_TSEC1_ERROR, | ||
604 | .end = MPC85xx_IRQ_TSEC1_ERROR, | ||
605 | .flags = IORESOURCE_IRQ, | ||
606 | }, | ||
607 | }, | ||
608 | }, | ||
609 | [MPC85xx_eTSEC2] = { | ||
610 | .name = "fsl-gianfar", | ||
611 | .id = 2, | ||
612 | .dev.platform_data = &mpc85xx_etsec2_pdata, | ||
613 | .num_resources = 4, | ||
614 | .resource = (struct resource[]) { | ||
615 | { | ||
616 | .start = MPC85xx_ENET2_OFFSET, | ||
617 | .end = MPC85xx_ENET2_OFFSET + | ||
618 | MPC85xx_ENET2_SIZE - 1, | ||
619 | .flags = IORESOURCE_MEM, | ||
620 | }, | ||
621 | { | ||
622 | .name = "tx", | ||
623 | .start = MPC85xx_IRQ_TSEC2_TX, | ||
624 | .end = MPC85xx_IRQ_TSEC2_TX, | ||
625 | .flags = IORESOURCE_IRQ, | ||
626 | }, | ||
627 | { | ||
628 | .name = "rx", | ||
629 | .start = MPC85xx_IRQ_TSEC2_RX, | ||
630 | .end = MPC85xx_IRQ_TSEC2_RX, | ||
631 | .flags = IORESOURCE_IRQ, | ||
632 | }, | ||
633 | { | ||
634 | .name = "error", | ||
635 | .start = MPC85xx_IRQ_TSEC2_ERROR, | ||
636 | .end = MPC85xx_IRQ_TSEC2_ERROR, | ||
637 | .flags = IORESOURCE_IRQ, | ||
638 | }, | ||
639 | }, | ||
640 | }, | ||
641 | [MPC85xx_eTSEC3] = { | ||
642 | .name = "fsl-gianfar", | ||
643 | .id = 3, | ||
644 | .dev.platform_data = &mpc85xx_etsec3_pdata, | ||
645 | .num_resources = 4, | ||
646 | .resource = (struct resource[]) { | ||
647 | { | ||
648 | .start = MPC85xx_ENET3_OFFSET, | ||
649 | .end = MPC85xx_ENET3_OFFSET + | ||
650 | MPC85xx_ENET3_SIZE - 1, | ||
651 | .flags = IORESOURCE_MEM, | ||
652 | }, | ||
653 | { | ||
654 | .name = "tx", | ||
655 | .start = MPC85xx_IRQ_TSEC3_TX, | ||
656 | .end = MPC85xx_IRQ_TSEC3_TX, | ||
657 | .flags = IORESOURCE_IRQ, | ||
658 | }, | ||
659 | { | ||
660 | .name = "rx", | ||
661 | .start = MPC85xx_IRQ_TSEC3_RX, | ||
662 | .end = MPC85xx_IRQ_TSEC3_RX, | ||
663 | .flags = IORESOURCE_IRQ, | ||
664 | }, | ||
665 | { | ||
666 | .name = "error", | ||
667 | .start = MPC85xx_IRQ_TSEC3_ERROR, | ||
668 | .end = MPC85xx_IRQ_TSEC3_ERROR, | ||
669 | .flags = IORESOURCE_IRQ, | ||
670 | }, | ||
671 | }, | ||
672 | }, | ||
673 | [MPC85xx_eTSEC4] = { | ||
674 | .name = "fsl-gianfar", | ||
675 | .id = 4, | ||
676 | .dev.platform_data = &mpc85xx_etsec4_pdata, | ||
677 | .num_resources = 4, | ||
678 | .resource = (struct resource[]) { | ||
679 | { | ||
680 | .start = 0x27000, | ||
681 | .end = 0x27fff, | ||
682 | .flags = IORESOURCE_MEM, | ||
683 | }, | ||
684 | { | ||
685 | .name = "tx", | ||
686 | .start = MPC85xx_IRQ_TSEC4_TX, | ||
687 | .end = MPC85xx_IRQ_TSEC4_TX, | ||
688 | .flags = IORESOURCE_IRQ, | ||
689 | }, | ||
690 | { | ||
691 | .name = "rx", | ||
692 | .start = MPC85xx_IRQ_TSEC4_RX, | ||
693 | .end = MPC85xx_IRQ_TSEC4_RX, | ||
694 | .flags = IORESOURCE_IRQ, | ||
695 | }, | ||
696 | { | ||
697 | .name = "error", | ||
698 | .start = MPC85xx_IRQ_TSEC4_ERROR, | ||
699 | .end = MPC85xx_IRQ_TSEC4_ERROR, | ||
700 | .flags = IORESOURCE_IRQ, | ||
701 | }, | ||
702 | }, | ||
703 | }, | ||
704 | [MPC85xx_IIC2] = { | ||
705 | .name = "fsl-i2c", | ||
706 | .id = 2, | ||
707 | .dev.platform_data = &mpc85xx_fsl_i2c2_pdata, | ||
708 | .num_resources = 2, | ||
709 | .resource = (struct resource[]) { | ||
710 | { | ||
711 | .start = 0x03100, | ||
712 | .end = 0x031ff, | ||
713 | .flags = IORESOURCE_MEM, | ||
714 | }, | ||
715 | { | ||
716 | .start = MPC85xx_IRQ_IIC1, | ||
717 | .end = MPC85xx_IRQ_IIC1, | ||
718 | .flags = IORESOURCE_IRQ, | ||
719 | }, | ||
720 | }, | ||
721 | }, | ||
539 | }; | 722 | }; |
540 | 723 | ||
541 | static int __init mach_mpc85xx_fixup(struct platform_device *pdev) | 724 | static int __init mach_mpc85xx_fixup(struct platform_device *pdev) |
diff --git a/arch/ppc/syslib/mpc85xx_sys.c b/arch/ppc/syslib/mpc85xx_sys.c index d806a92a9401..6e3184ab354f 100644 --- a/arch/ppc/syslib/mpc85xx_sys.c +++ b/arch/ppc/syslib/mpc85xx_sys.c | |||
@@ -110,6 +110,111 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
110 | MPC85xx_CPM_USB, | 110 | MPC85xx_CPM_USB, |
111 | }, | 111 | }, |
112 | }, | 112 | }, |
113 | /* SVRs on 8548 rev1.0 matches for 8548/8547/8545 */ | ||
114 | { | ||
115 | .ppc_sys_name = "8548E", | ||
116 | .mask = 0xFFFF00F0, | ||
117 | .value = 0x80390010, | ||
118 | .num_devices = 13, | ||
119 | .device_list = (enum ppc_sys_devices[]) | ||
120 | { | ||
121 | MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3, | ||
122 | MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2, | ||
123 | MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, | ||
124 | MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2, | ||
125 | }, | ||
126 | }, | ||
127 | { | ||
128 | .ppc_sys_name = "8548", | ||
129 | .mask = 0xFFFF00F0, | ||
130 | .value = 0x80310010, | ||
131 | .num_devices = 12, | ||
132 | .device_list = (enum ppc_sys_devices[]) | ||
133 | { | ||
134 | MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3, | ||
135 | MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2, | ||
136 | MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, | ||
137 | MPC85xx_PERFMON, MPC85xx_DUART, | ||
138 | }, | ||
139 | }, | ||
140 | { | ||
141 | .ppc_sys_name = "8547E", | ||
142 | .mask = 0xFFFF00F0, | ||
143 | .value = 0x80390010, | ||
144 | .num_devices = 13, | ||
145 | .device_list = (enum ppc_sys_devices[]) | ||
146 | { | ||
147 | MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3, | ||
148 | MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2, | ||
149 | MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, | ||
150 | MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2, | ||
151 | }, | ||
152 | }, | ||
153 | { | ||
154 | .ppc_sys_name = "8547", | ||
155 | .mask = 0xFFFF00F0, | ||
156 | .value = 0x80310010, | ||
157 | .num_devices = 12, | ||
158 | .device_list = (enum ppc_sys_devices[]) | ||
159 | { | ||
160 | MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3, | ||
161 | MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2, | ||
162 | MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, | ||
163 | MPC85xx_PERFMON, MPC85xx_DUART, | ||
164 | }, | ||
165 | }, | ||
166 | { | ||
167 | .ppc_sys_name = "8545E", | ||
168 | .mask = 0xFFFF00F0, | ||
169 | .value = 0x80390010, | ||
170 | .num_devices = 11, | ||
171 | .device_list = (enum ppc_sys_devices[]) | ||
172 | { | ||
173 | MPC85xx_eTSEC1, MPC85xx_eTSEC2, | ||
174 | MPC85xx_IIC1, MPC85xx_IIC2, | ||
175 | MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, | ||
176 | MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2, | ||
177 | }, | ||
178 | }, | ||
179 | { | ||
180 | .ppc_sys_name = "8545", | ||
181 | .mask = 0xFFFF00F0, | ||
182 | .value = 0x80310010, | ||
183 | .num_devices = 10, | ||
184 | .device_list = (enum ppc_sys_devices[]) | ||
185 | { | ||
186 | MPC85xx_eTSEC1, MPC85xx_eTSEC2, | ||
187 | MPC85xx_IIC1, MPC85xx_IIC2, | ||
188 | MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, | ||
189 | MPC85xx_PERFMON, MPC85xx_DUART, | ||
190 | }, | ||
191 | }, | ||
192 | { | ||
193 | .ppc_sys_name = "8543E", | ||
194 | .mask = 0xFFFF00F0, | ||
195 | .value = 0x803A0010, | ||
196 | .num_devices = 11, | ||
197 | .device_list = (enum ppc_sys_devices[]) | ||
198 | { | ||
199 | MPC85xx_eTSEC1, MPC85xx_eTSEC2, | ||
200 | MPC85xx_IIC1, MPC85xx_IIC2, | ||
201 | MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, | ||
202 | MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2, | ||
203 | }, | ||
204 | }, | ||
205 | { | ||
206 | .ppc_sys_name = "8543", | ||
207 | .mask = 0xFFFF00F0, | ||
208 | .value = 0x80320010, | ||
209 | .num_devices = 10, | ||
210 | .device_list = (enum ppc_sys_devices[]) | ||
211 | { | ||
212 | MPC85xx_eTSEC1, MPC85xx_eTSEC2, | ||
213 | MPC85xx_IIC1, MPC85xx_IIC2, | ||
214 | MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, | ||
215 | MPC85xx_PERFMON, MPC85xx_DUART, | ||
216 | }, | ||
217 | }, | ||
113 | { /* default match */ | 218 | { /* default match */ |
114 | .ppc_sys_name = "", | 219 | .ppc_sys_name = "", |
115 | .mask = 0x00000000, | 220 | .mask = 0x00000000, |
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 000ba47c67cb..b45d8268bf93 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <asm/signal.h> | 21 | #include <asm/signal.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
24 | #include <asm/prom.h> | ||
25 | #include <asm/sections.h> | 24 | #include <asm/sections.h> |
26 | #include <asm/open_pic.h> | 25 | #include <asm/open_pic.h> |
27 | #include <asm/i8259.h> | 26 | #include <asm/i8259.h> |
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c index ea26da0d8b6b..7e272c51a497 100644 --- a/arch/ppc/syslib/open_pic2.c +++ b/arch/ppc/syslib/open_pic2.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <asm/signal.h> | 25 | #include <asm/signal.h> |
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
28 | #include <asm/prom.h> | ||
29 | #include <asm/sections.h> | 28 | #include <asm/sections.h> |
30 | #include <asm/open_pic.h> | 29 | #include <asm/open_pic.h> |
31 | #include <asm/i8259.h> | 30 | #include <asm/i8259.h> |
diff --git a/arch/ppc/syslib/ppc4xx_kgdb.c b/arch/ppc/syslib/ppc4xx_kgdb.c deleted file mode 100644 index fe8668bf8137..000000000000 --- a/arch/ppc/syslib/ppc4xx_kgdb.c +++ /dev/null | |||
@@ -1,124 +0,0 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <asm/ibm4xx.h> | ||
4 | #include <linux/kernel.h> | ||
5 | |||
6 | |||
7 | |||
8 | #define LSR_DR 0x01 /* Data ready */ | ||
9 | #define LSR_OE 0x02 /* Overrun */ | ||
10 | #define LSR_PE 0x04 /* Parity error */ | ||
11 | #define LSR_FE 0x08 /* Framing error */ | ||
12 | #define LSR_BI 0x10 /* Break */ | ||
13 | #define LSR_THRE 0x20 /* Xmit holding register empty */ | ||
14 | #define LSR_TEMT 0x40 /* Xmitter empty */ | ||
15 | #define LSR_ERR 0x80 /* Error */ | ||
16 | |||
17 | #include <platforms/4xx/ibm_ocp.h> | ||
18 | |||
19 | extern struct NS16550* COM_PORTS[]; | ||
20 | #ifndef NULL | ||
21 | #define NULL 0x00 | ||
22 | #endif | ||
23 | |||
24 | static volatile struct NS16550 *kgdb_debugport = NULL; | ||
25 | |||
26 | volatile struct NS16550 * | ||
27 | NS16550_init(int chan) | ||
28 | { | ||
29 | volatile struct NS16550 *com_port; | ||
30 | int quot; | ||
31 | #ifdef BASE_BAUD | ||
32 | quot = BASE_BAUD / 9600; | ||
33 | #else | ||
34 | quot = 0x000c; /* 0xc = 9600 baud (on a pc) */ | ||
35 | #endif | ||
36 | |||
37 | com_port = (struct NS16550 *) COM_PORTS[chan]; | ||
38 | |||
39 | com_port->lcr = 0x00; | ||
40 | com_port->ier = 0xFF; | ||
41 | com_port->ier = 0x00; | ||
42 | com_port->lcr = com_port->lcr | 0x80; /* Access baud rate */ | ||
43 | com_port->dll = ( quot & 0x00ff ); /* 0xc = 9600 baud */ | ||
44 | com_port->dlm = ( quot & 0xff00 ) >> 8; | ||
45 | com_port->lcr = 0x03; /* 8 data, 1 stop, no parity */ | ||
46 | com_port->mcr = 0x00; /* RTS/DTR */ | ||
47 | com_port->fcr = 0x07; /* Clear & enable FIFOs */ | ||
48 | |||
49 | return( com_port ); | ||
50 | } | ||
51 | |||
52 | |||
53 | void | ||
54 | NS16550_putc(volatile struct NS16550 *com_port, unsigned char c) | ||
55 | { | ||
56 | while ((com_port->lsr & LSR_THRE) == 0) | ||
57 | ; | ||
58 | com_port->thr = c; | ||
59 | return; | ||
60 | } | ||
61 | |||
62 | unsigned char | ||
63 | NS16550_getc(volatile struct NS16550 *com_port) | ||
64 | { | ||
65 | while ((com_port->lsr & LSR_DR) == 0) | ||
66 | ; | ||
67 | return (com_port->rbr); | ||
68 | } | ||
69 | |||
70 | unsigned char | ||
71 | NS16550_tstc(volatile struct NS16550 *com_port) | ||
72 | { | ||
73 | return ((com_port->lsr & LSR_DR) != 0); | ||
74 | } | ||
75 | |||
76 | |||
77 | #if defined(CONFIG_KGDB_TTYS0) | ||
78 | #define KGDB_PORT 0 | ||
79 | #elif defined(CONFIG_KGDB_TTYS1) | ||
80 | #define KGDB_PORT 1 | ||
81 | #elif defined(CONFIG_KGDB_TTYS2) | ||
82 | #define KGDB_PORT 2 | ||
83 | #elif defined(CONFIG_KGDB_TTYS3) | ||
84 | #define KGDB_PORT 3 | ||
85 | #else | ||
86 | #error "invalid kgdb_tty port" | ||
87 | #endif | ||
88 | |||
89 | void putDebugChar( unsigned char c ) | ||
90 | { | ||
91 | if ( kgdb_debugport == NULL ) | ||
92 | kgdb_debugport = NS16550_init(KGDB_PORT); | ||
93 | NS16550_putc( kgdb_debugport, c ); | ||
94 | } | ||
95 | |||
96 | int getDebugChar( void ) | ||
97 | { | ||
98 | if (kgdb_debugport == NULL) | ||
99 | kgdb_debugport = NS16550_init(KGDB_PORT); | ||
100 | |||
101 | return(NS16550_getc(kgdb_debugport)); | ||
102 | } | ||
103 | |||
104 | void kgdb_interruptible(int enable) | ||
105 | { | ||
106 | return; | ||
107 | } | ||
108 | |||
109 | void putDebugString(char* str) | ||
110 | { | ||
111 | while (*str != '\0') { | ||
112 | putDebugChar(*str); | ||
113 | str++; | ||
114 | } | ||
115 | putDebugChar('\r'); | ||
116 | return; | ||
117 | } | ||
118 | |||
119 | void | ||
120 | kgdb_map_scc(void) | ||
121 | { | ||
122 | printk("kgdb init \n"); | ||
123 | kgdb_debugport = NS16550_init(KGDB_PORT); | ||
124 | } | ||
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index 843cf8873e60..602a86891f7f 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
24 | #include <linux/serial_8250.h> | 24 | #include <linux/serial_8250.h> |
25 | 25 | ||
26 | #include <asm/prom.h> | ||
27 | #include <asm/time.h> | 26 | #include <asm/time.h> |
28 | #include <asm/mpc83xx.h> | 27 | #include <asm/mpc83xx.h> |
29 | #include <asm/mmu.h> | 28 | #include <asm/mmu.h> |
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index f3277f469e78..ca95d79a704e 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
24 | #include <linux/serial_8250.h> | 24 | #include <linux/serial_8250.h> |
25 | 25 | ||
26 | #include <asm/prom.h> | ||
27 | #include <asm/time.h> | 26 | #include <asm/time.h> |
28 | #include <asm/mpc85xx.h> | 27 | #include <asm/mpc85xx.h> |
29 | #include <asm/immap_85xx.h> | 28 | #include <asm/immap_85xx.h> |
@@ -33,6 +32,8 @@ | |||
33 | 32 | ||
34 | #include <syslib/ppc85xx_setup.h> | 33 | #include <syslib/ppc85xx_setup.h> |
35 | 34 | ||
35 | extern void abort(void); | ||
36 | |||
36 | /* Return the amount of memory */ | 37 | /* Return the amount of memory */ |
37 | unsigned long __init | 38 | unsigned long __init |
38 | mpc85xx_find_end_of_memory(void) | 39 | mpc85xx_find_end_of_memory(void) |
@@ -133,7 +134,7 @@ mpc85xx_halt(void) | |||
133 | 134 | ||
134 | #ifdef CONFIG_PCI | 135 | #ifdef CONFIG_PCI |
135 | 136 | ||
136 | #if defined(CONFIG_MPC8555_CDS) | 137 | #if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS) |
137 | extern void mpc85xx_cds_enable_via(struct pci_controller *hose); | 138 | extern void mpc85xx_cds_enable_via(struct pci_controller *hose); |
138 | extern void mpc85xx_cds_fixup_via(struct pci_controller *hose); | 139 | extern void mpc85xx_cds_fixup_via(struct pci_controller *hose); |
139 | #endif | 140 | #endif |
@@ -308,14 +309,14 @@ mpc85xx_setup_hose(void) | |||
308 | 309 | ||
309 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 310 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
310 | 311 | ||
311 | #if defined(CONFIG_MPC8555_CDS) | 312 | #if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS) |
312 | /* Pre pciauto_bus_scan VIA init */ | 313 | /* Pre pciauto_bus_scan VIA init */ |
313 | mpc85xx_cds_enable_via(hose_a); | 314 | mpc85xx_cds_enable_via(hose_a); |
314 | #endif | 315 | #endif |
315 | 316 | ||
316 | hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); | 317 | hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); |
317 | 318 | ||
318 | #if defined(CONFIG_MPC8555_CDS) | 319 | #if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS) |
319 | /* Post pciauto_bus_scan VIA fixup */ | 320 | /* Post pciauto_bus_scan VIA fixup */ |
320 | mpc85xx_cds_fixup_via(hose_a); | 321 | mpc85xx_cds_fixup_via(hose_a); |
321 | #endif | 322 | #endif |
diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c index 8565f49b8b0b..be7869e39465 100644 --- a/arch/ppc/xmon/xmon.c +++ b/arch/ppc/xmon/xmon.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/smp.h> | 9 | #include <linux/smp.h> |
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/bitops.h> | 11 | #include <linux/bitops.h> |
12 | #include <linux/kallsyms.h> | ||
12 | #include <asm/ptrace.h> | 13 | #include <asm/ptrace.h> |
13 | #include <asm/string.h> | 14 | #include <asm/string.h> |
14 | #include <asm/prom.h> | 15 | #include <asm/prom.h> |
@@ -93,8 +94,7 @@ static void take_input(char *); | |||
93 | static unsigned read_spr(int); | 94 | static unsigned read_spr(int); |
94 | static void write_spr(int, unsigned); | 95 | static void write_spr(int, unsigned); |
95 | static void super_regs(void); | 96 | static void super_regs(void); |
96 | static void print_sysmap(void); | 97 | static void symbol_lookup(void); |
97 | static void sysmap_lookup(void); | ||
98 | static void remove_bpts(void); | 98 | static void remove_bpts(void); |
99 | static void insert_bpts(void); | 99 | static void insert_bpts(void); |
100 | static struct bpt *at_breakpoint(unsigned pc); | 100 | static struct bpt *at_breakpoint(unsigned pc); |
@@ -103,7 +103,6 @@ static void cacheflush(void); | |||
103 | #ifdef CONFIG_SMP | 103 | #ifdef CONFIG_SMP |
104 | static void cpu_cmd(void); | 104 | static void cpu_cmd(void); |
105 | #endif /* CONFIG_SMP */ | 105 | #endif /* CONFIG_SMP */ |
106 | static int pretty_print_addr(unsigned long addr); | ||
107 | static void csum(void); | 106 | static void csum(void); |
108 | #ifdef CONFIG_BOOTX_TEXT | 107 | #ifdef CONFIG_BOOTX_TEXT |
109 | static void vidcmds(void); | 108 | static void vidcmds(void); |
@@ -120,8 +119,6 @@ extern void longjmp(u_int *, int); | |||
120 | 119 | ||
121 | extern void xmon_enter(void); | 120 | extern void xmon_enter(void); |
122 | extern void xmon_leave(void); | 121 | extern void xmon_leave(void); |
123 | extern char* xmon_find_symbol(unsigned long addr, unsigned long* saddr); | ||
124 | extern unsigned long xmon_symbol_to_addr(char* symbol); | ||
125 | 122 | ||
126 | static unsigned start_tb[NR_CPUS][2]; | 123 | static unsigned start_tb[NR_CPUS][2]; |
127 | static unsigned stop_tb[NR_CPUS][2]; | 124 | static unsigned stop_tb[NR_CPUS][2]; |
@@ -148,7 +145,6 @@ Commands:\n\ | |||
148 | mm move a block of memory\n\ | 145 | mm move a block of memory\n\ |
149 | ms set a block of memory\n\ | 146 | ms set a block of memory\n\ |
150 | md compare two blocks of memory\n\ | 147 | md compare two blocks of memory\n\ |
151 | M print System.map\n\ | ||
152 | r print registers\n\ | 148 | r print registers\n\ |
153 | S print special registers\n\ | 149 | S print special registers\n\ |
154 | t print backtrace\n\ | 150 | t print backtrace\n\ |
@@ -175,6 +171,35 @@ extern inline void __delay(unsigned int loops) | |||
175 | "r" (loops) : "ctr"); | 171 | "r" (loops) : "ctr"); |
176 | } | 172 | } |
177 | 173 | ||
174 | /* Print an address in numeric and symbolic form (if possible) */ | ||
175 | static void xmon_print_symbol(unsigned long address, const char *mid, | ||
176 | const char *after) | ||
177 | { | ||
178 | char *modname; | ||
179 | const char *name = NULL; | ||
180 | unsigned long offset, size; | ||
181 | static char tmpstr[128]; | ||
182 | |||
183 | printf("%.8lx", address); | ||
184 | if (setjmp(bus_error_jmp) == 0) { | ||
185 | debugger_fault_handler = handle_fault; | ||
186 | sync(); | ||
187 | name = kallsyms_lookup(address, &size, &offset, &modname, | ||
188 | tmpstr); | ||
189 | sync(); | ||
190 | /* wait a little while to see if we get a machine check */ | ||
191 | __delay(200); | ||
192 | } | ||
193 | debugger_fault_handler = NULL; | ||
194 | |||
195 | if (name) { | ||
196 | printf("%s%s+%#lx/%#lx", mid, name, offset, size); | ||
197 | if (modname) | ||
198 | printf(" [%s]", modname); | ||
199 | } | ||
200 | printf("%s", after); | ||
201 | } | ||
202 | |||
178 | static void get_tb(unsigned *p) | 203 | static void get_tb(unsigned *p) |
179 | { | 204 | { |
180 | unsigned hi, lo, hiagain; | 205 | unsigned hi, lo, hiagain; |
@@ -454,7 +479,7 @@ cmds(struct pt_regs *excp) | |||
454 | dump(); | 479 | dump(); |
455 | break; | 480 | break; |
456 | case 'l': | 481 | case 'l': |
457 | sysmap_lookup(); | 482 | symbol_lookup(); |
458 | break; | 483 | break; |
459 | case 'r': | 484 | case 'r': |
460 | if (excp != NULL) | 485 | if (excp != NULL) |
@@ -466,9 +491,6 @@ cmds(struct pt_regs *excp) | |||
466 | else | 491 | else |
467 | excprint(excp); | 492 | excprint(excp); |
468 | break; | 493 | break; |
469 | case 'M': | ||
470 | print_sysmap(); | ||
471 | break; | ||
472 | case 'S': | 494 | case 'S': |
473 | super_regs(); | 495 | super_regs(); |
474 | break; | 496 | break; |
@@ -825,20 +847,19 @@ backtrace(struct pt_regs *excp) | |||
825 | for (; sp != 0; sp = stack[0]) { | 847 | for (; sp != 0; sp = stack[0]) { |
826 | if (mread(sp, stack, sizeof(stack)) != sizeof(stack)) | 848 | if (mread(sp, stack, sizeof(stack)) != sizeof(stack)) |
827 | break; | 849 | break; |
828 | pretty_print_addr(stack[1]); | 850 | printf("[%.8lx] ", stack); |
829 | printf(" "); | 851 | xmon_print_symbol(stack[1], " ", "\n"); |
830 | if (stack[1] == (unsigned) &ret_from_except | 852 | if (stack[1] == (unsigned) &ret_from_except |
831 | || stack[1] == (unsigned) &ret_from_except_full | 853 | || stack[1] == (unsigned) &ret_from_except_full |
832 | || stack[1] == (unsigned) &ret_from_syscall) { | 854 | || stack[1] == (unsigned) &ret_from_syscall) { |
833 | if (mread(sp+16, ®s, sizeof(regs)) != sizeof(regs)) | 855 | if (mread(sp+16, ®s, sizeof(regs)) != sizeof(regs)) |
834 | break; | 856 | break; |
835 | printf("\nexception:%x [%x] %x ", regs.trap, sp+16, | 857 | printf("exception:%x [%x] %x\n", regs.trap, sp+16, |
836 | regs.nip); | 858 | regs.nip); |
837 | sp = regs.gpr[1]; | 859 | sp = regs.gpr[1]; |
838 | if (mread(sp, stack, sizeof(stack)) != sizeof(stack)) | 860 | if (mread(sp, stack, sizeof(stack)) != sizeof(stack)) |
839 | break; | 861 | break; |
840 | } | 862 | } |
841 | printf("\n"); | ||
842 | } | 863 | } |
843 | } | 864 | } |
844 | 865 | ||
@@ -859,11 +880,10 @@ excprint(struct pt_regs *fp) | |||
859 | #ifdef CONFIG_SMP | 880 | #ifdef CONFIG_SMP |
860 | printf("cpu %d: ", smp_processor_id()); | 881 | printf("cpu %d: ", smp_processor_id()); |
861 | #endif /* CONFIG_SMP */ | 882 | #endif /* CONFIG_SMP */ |
862 | printf("vector: %x at pc = ", fp->trap); | 883 | printf("vector: %x at pc=", fp->trap); |
863 | pretty_print_addr(fp->nip); | 884 | xmon_print_symbol(fp->nip, ": ", ", lr="); |
864 | printf(", lr = "); | 885 | xmon_print_symbol(fp->link, ": ", "\n"); |
865 | pretty_print_addr(fp->link); | 886 | printf("msr = %x, sp = %x [%x]\n", fp->msr, fp->gpr[1], fp); |
866 | printf("\nmsr = %x, sp = %x [%x]\n", fp->msr, fp->gpr[1], fp); | ||
867 | trap = TRAP(fp); | 887 | trap = TRAP(fp); |
868 | if (trap == 0x300 || trap == 0x600) | 888 | if (trap == 0x300 || trap == 0x600) |
869 | printf("dar = %x, dsisr = %x\n", fp->dar, fp->dsisr); | 889 | printf("dar = %x, dsisr = %x\n", fp->dar, fp->dsisr); |
@@ -951,24 +971,6 @@ extern char exc_prolog; | |||
951 | extern char dec_exc; | 971 | extern char dec_exc; |
952 | 972 | ||
953 | void | 973 | void |
954 | print_sysmap(void) | ||
955 | { | ||
956 | extern char *sysmap; | ||
957 | if ( sysmap ) { | ||
958 | printf("System.map: \n"); | ||
959 | if( setjmp(bus_error_jmp) == 0 ) { | ||
960 | debugger_fault_handler = handle_fault; | ||
961 | sync(); | ||
962 | xmon_puts(sysmap); | ||
963 | sync(); | ||
964 | } | ||
965 | debugger_fault_handler = NULL; | ||
966 | } | ||
967 | else | ||
968 | printf("No System.map\n"); | ||
969 | } | ||
970 | |||
971 | void | ||
972 | super_regs(void) | 974 | super_regs(void) |
973 | { | 975 | { |
974 | int i, cmd; | 976 | int i, cmd; |
@@ -1738,7 +1740,7 @@ scanhex(unsigned *vp) | |||
1738 | printf("invalid register name '%%%s'\n", regname); | 1740 | printf("invalid register name '%%%s'\n", regname); |
1739 | return 0; | 1741 | return 0; |
1740 | } else if (c == '$') { | 1742 | } else if (c == '$') { |
1741 | static char symname[64]; | 1743 | static char symname[128]; |
1742 | int i; | 1744 | int i; |
1743 | for (i=0; i<63; i++) { | 1745 | for (i=0; i<63; i++) { |
1744 | c = inchar(); | 1746 | c = inchar(); |
@@ -1749,7 +1751,14 @@ scanhex(unsigned *vp) | |||
1749 | symname[i] = c; | 1751 | symname[i] = c; |
1750 | } | 1752 | } |
1751 | symname[i++] = 0; | 1753 | symname[i++] = 0; |
1752 | *vp = xmon_symbol_to_addr(symname); | 1754 | *vp = 0; |
1755 | if (setjmp(bus_error_jmp) == 0) { | ||
1756 | debugger_fault_handler = handle_fault; | ||
1757 | sync(); | ||
1758 | *vp = kallsyms_lookup_name(symname); | ||
1759 | sync(); | ||
1760 | } | ||
1761 | debugger_fault_handler = NULL; | ||
1753 | if (!(*vp)) { | 1762 | if (!(*vp)) { |
1754 | printf("unknown symbol\n"); | 1763 | printf("unknown symbol\n"); |
1755 | return 0; | 1764 | return 0; |
@@ -1840,169 +1849,34 @@ take_input(char *str) | |||
1840 | lineptr = str; | 1849 | lineptr = str; |
1841 | } | 1850 | } |
1842 | 1851 | ||
1843 | void | 1852 | static void |
1844 | sysmap_lookup(void) | 1853 | symbol_lookup(void) |
1845 | { | 1854 | { |
1846 | int type = inchar(); | 1855 | int type = inchar(); |
1847 | unsigned addr; | 1856 | unsigned addr; |
1848 | static char tmp[64]; | 1857 | static char tmp[128]; |
1849 | char* cur; | ||
1850 | |||
1851 | extern char *sysmap; | ||
1852 | extern unsigned long sysmap_size; | ||
1853 | if ( !sysmap || !sysmap_size ) | ||
1854 | return; | ||
1855 | |||
1856 | switch(type) { | ||
1857 | case 'a': | ||
1858 | if (scanhex(&addr)) { | ||
1859 | pretty_print_addr(addr); | ||
1860 | printf("\n"); | ||
1861 | } | ||
1862 | termch = 0; | ||
1863 | break; | ||
1864 | case 's': | ||
1865 | getstring(tmp, 64); | ||
1866 | if( setjmp(bus_error_jmp) == 0 ) { | ||
1867 | debugger_fault_handler = handle_fault; | ||
1868 | sync(); | ||
1869 | cur = sysmap; | ||
1870 | do { | ||
1871 | cur = strstr(cur, tmp); | ||
1872 | if (cur) { | ||
1873 | static char res[64]; | ||
1874 | char *p, *d; | ||
1875 | p = cur; | ||
1876 | while(p > sysmap && *p != 10) | ||
1877 | p--; | ||
1878 | if (*p == 10) p++; | ||
1879 | d = res; | ||
1880 | while(*p && p < (sysmap + sysmap_size) && *p != 10) | ||
1881 | *(d++) = *(p++); | ||
1882 | *(d++) = 0; | ||
1883 | printf("%s\n", res); | ||
1884 | cur++; | ||
1885 | } | ||
1886 | } while (cur); | ||
1887 | sync(); | ||
1888 | } | ||
1889 | debugger_fault_handler = NULL; | ||
1890 | termch = 0; | ||
1891 | break; | ||
1892 | } | ||
1893 | } | ||
1894 | 1858 | ||
1895 | static int | 1859 | switch (type) { |
1896 | pretty_print_addr(unsigned long addr) | 1860 | case 'a': |
1897 | { | 1861 | if (scanhex(&addr)) |
1898 | char *sym; | 1862 | xmon_print_symbol(addr, ": ", "\n"); |
1899 | unsigned long saddr; | 1863 | termch = 0; |
1900 | 1864 | break; | |
1901 | printf("%08x", addr); | 1865 | case 's': |
1902 | sym = xmon_find_symbol(addr, &saddr); | 1866 | getstring(tmp, 64); |
1903 | if (sym) | 1867 | if (setjmp(bus_error_jmp) == 0) { |
1904 | printf(" (%s+0x%x)", sym, addr-saddr); | 1868 | debugger_fault_handler = handle_fault; |
1905 | return (sym != 0); | 1869 | sync(); |
1906 | } | 1870 | addr = kallsyms_lookup_name(tmp); |
1907 | 1871 | if (addr) | |
1908 | char* | 1872 | printf("%s: %lx\n", tmp, addr); |
1909 | xmon_find_symbol(unsigned long addr, unsigned long* saddr) | 1873 | else |
1910 | { | 1874 | printf("Symbol '%s' not found.\n", tmp); |
1911 | static char rbuffer[64]; | 1875 | sync(); |
1912 | char *p, *ep, *limit; | 1876 | } |
1913 | unsigned long prev, next; | 1877 | debugger_fault_handler = NULL; |
1914 | char* psym; | 1878 | termch = 0; |
1915 | 1879 | break; | |
1916 | extern char *sysmap; | ||
1917 | extern unsigned long sysmap_size; | ||
1918 | if ( !sysmap || !sysmap_size ) | ||
1919 | return NULL; | ||
1920 | |||
1921 | prev = 0; | ||
1922 | psym = NULL; | ||
1923 | p = sysmap; | ||
1924 | limit = p + sysmap_size; | ||
1925 | if( setjmp(bus_error_jmp) == 0 ) { | ||
1926 | debugger_fault_handler = handle_fault; | ||
1927 | sync(); | ||
1928 | do { | ||
1929 | next = simple_strtoul(p, &p, 16); | ||
1930 | if (next > addr && prev <= addr) { | ||
1931 | if (!psym) | ||
1932 | goto bail; | ||
1933 | ep = rbuffer; | ||
1934 | p = psym; | ||
1935 | while(*p && p < limit && *p == 32) | ||
1936 | p++; | ||
1937 | while(*p && p < limit && *p != 10 && (ep - rbuffer) < 63) | ||
1938 | *(ep++) = *(p++); | ||
1939 | *(ep++) = 0; | ||
1940 | if (saddr) | ||
1941 | *saddr = prev; | ||
1942 | debugger_fault_handler = NULL; | ||
1943 | return rbuffer; | ||
1944 | } | ||
1945 | prev = next; | ||
1946 | psym = p; | ||
1947 | while(*p && p < limit && *p != 10) | ||
1948 | p++; | ||
1949 | if (*p) p++; | ||
1950 | } while(*p && p < limit && next); | ||
1951 | bail: | ||
1952 | sync(); | ||
1953 | } | 1880 | } |
1954 | debugger_fault_handler = NULL; | ||
1955 | return NULL; | ||
1956 | } | 1881 | } |
1957 | 1882 | ||
1958 | unsigned long | ||
1959 | xmon_symbol_to_addr(char* symbol) | ||
1960 | { | ||
1961 | char *p, *cur; | ||
1962 | char *match = NULL; | ||
1963 | int goodness = 0; | ||
1964 | int result = 0; | ||
1965 | |||
1966 | extern char *sysmap; | ||
1967 | extern unsigned long sysmap_size; | ||
1968 | if ( !sysmap || !sysmap_size ) | ||
1969 | return 0; | ||
1970 | |||
1971 | if( setjmp(bus_error_jmp) == 0 ) { | ||
1972 | debugger_fault_handler = handle_fault; | ||
1973 | sync(); | ||
1974 | cur = sysmap; | ||
1975 | while(cur) { | ||
1976 | cur = strstr(cur, symbol); | ||
1977 | if (cur) { | ||
1978 | int gd = 1; | ||
1979 | |||
1980 | /* best match if equal, better match if | ||
1981 | * begins with | ||
1982 | */ | ||
1983 | if (cur == sysmap || *(cur-1) == ' ') { | ||
1984 | gd++; | ||
1985 | if (cur[strlen(symbol)] == 10) | ||
1986 | gd++; | ||
1987 | } | ||
1988 | if (gd > goodness) { | ||
1989 | match = cur; | ||
1990 | goodness = gd; | ||
1991 | if (gd == 3) | ||
1992 | break; | ||
1993 | } | ||
1994 | cur++; | ||
1995 | } | ||
1996 | } | ||
1997 | if (goodness) { | ||
1998 | p = match; | ||
1999 | while(p > sysmap && *p != 10) | ||
2000 | p--; | ||
2001 | if (*p == 10) p++; | ||
2002 | result = simple_strtoul(p, &p, 16); | ||
2003 | } | ||
2004 | sync(); | ||
2005 | } | ||
2006 | debugger_fault_handler = NULL; | ||
2007 | return result; | ||
2008 | } | ||
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig index 5cb343883e4d..0f1fa289744e 100644 --- a/arch/ppc64/Kconfig +++ b/arch/ppc64/Kconfig | |||
@@ -323,7 +323,7 @@ config EISA | |||
323 | bool | 323 | bool |
324 | 324 | ||
325 | config PCI | 325 | config PCI |
326 | bool | 326 | bool "support for PCI devices" if (EMBEDDED && PPC_ISERIES) |
327 | default y | 327 | default y |
328 | help | 328 | help |
329 | Find out whether your system includes a PCI bus. PCI is the name of | 329 | Find out whether your system includes a PCI bus. PCI is the name of |
diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile index 691f3008e698..33c752ceca4b 100644 --- a/arch/ppc64/Makefile +++ b/arch/ppc64/Makefile | |||
@@ -35,9 +35,9 @@ CROSS32AS := $(AS) -a32 | |||
35 | CROSS32LD := $(LD) -m elf32ppc | 35 | CROSS32LD := $(LD) -m elf32ppc |
36 | CROSS32OBJCOPY := $(OBJCOPY) | 36 | CROSS32OBJCOPY := $(OBJCOPY) |
37 | endif | 37 | endif |
38 | AS := $(AS) -a64 | 38 | override AS += -a64 |
39 | LD := $(LD) -m elf64ppc | 39 | override LD += -m elf64ppc |
40 | CC := $(CC) -m64 | 40 | override CC += -m64 |
41 | endif | 41 | endif |
42 | 42 | ||
43 | export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY | 43 | export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY |
diff --git a/arch/ppc64/kernel/HvLpEvent.c b/arch/ppc64/kernel/HvLpEvent.c index f8f19637f73f..90032b138902 100644 --- a/arch/ppc64/kernel/HvLpEvent.c +++ b/arch/ppc64/kernel/HvLpEvent.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <asm/system.h> | 12 | #include <asm/system.h> |
13 | #include <asm/iSeries/HvLpEvent.h> | 13 | #include <asm/iSeries/HvLpEvent.h> |
14 | #include <asm/iSeries/HvCallEvent.h> | 14 | #include <asm/iSeries/HvCallEvent.h> |
15 | #include <asm/iSeries/LparData.h> | 15 | #include <asm/iSeries/ItLpNaca.h> |
16 | 16 | ||
17 | /* Array of LpEvent handler functions */ | 17 | /* Array of LpEvent handler functions */ |
18 | LpEventHandler lpEventHandler[HvLpEvent_Type_NumTypes]; | 18 | LpEventHandler lpEventHandler[HvLpEvent_Type_NumTypes]; |
diff --git a/arch/ppc64/kernel/ItLpQueue.c b/arch/ppc64/kernel/ItLpQueue.c index c923a815760e..cdea00d7707f 100644 --- a/arch/ppc64/kernel/ItLpQueue.c +++ b/arch/ppc64/kernel/ItLpQueue.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <asm/iSeries/ItLpQueue.h> | 16 | #include <asm/iSeries/ItLpQueue.h> |
17 | #include <asm/iSeries/HvLpEvent.h> | 17 | #include <asm/iSeries/HvLpEvent.h> |
18 | #include <asm/iSeries/HvCallEvent.h> | 18 | #include <asm/iSeries/HvCallEvent.h> |
19 | #include <asm/iSeries/LparData.h> | ||
20 | 19 | ||
21 | static __inline__ int set_inUse( struct ItLpQueue * lpQueue ) | 20 | static __inline__ int set_inUse( struct ItLpQueue * lpQueue ) |
22 | { | 21 | { |
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile index 96d90b0c5119..b5e167cf1a05 100644 --- a/arch/ppc64/kernel/Makefile +++ b/arch/ppc64/kernel/Makefile | |||
@@ -16,14 +16,13 @@ obj-y += vdso32/ vdso64/ | |||
16 | 16 | ||
17 | obj-$(CONFIG_PPC_OF) += of_device.o | 17 | obj-$(CONFIG_PPC_OF) += of_device.o |
18 | 18 | ||
19 | pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_pci_reset.o | 19 | pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_irq.o \ |
20 | iSeries_VpdInfo.o | ||
20 | pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o | 21 | pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o |
21 | 22 | ||
22 | obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y) | 23 | obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y) |
23 | 24 | ||
24 | obj-$(CONFIG_PPC_ISERIES) += iSeries_irq.o \ | 25 | obj-$(CONFIG_PPC_ISERIES) += HvCall.o HvLpConfig.o LparData.o \ |
25 | iSeries_VpdInfo.o XmPciLpEvent.o \ | ||
26 | HvCall.o HvLpConfig.o LparData.o \ | ||
27 | iSeries_setup.o ItLpQueue.o hvCall.o \ | 26 | iSeries_setup.o ItLpQueue.o hvCall.o \ |
28 | mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ | 27 | mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ |
29 | iSeries_iommu.o | 28 | iSeries_iommu.o |
diff --git a/arch/ppc64/kernel/XmPciLpEvent.c b/arch/ppc64/kernel/XmPciLpEvent.c deleted file mode 100644 index 809c9bc6678b..000000000000 --- a/arch/ppc64/kernel/XmPciLpEvent.c +++ /dev/null | |||
@@ -1,190 +0,0 @@ | |||
1 | /* | ||
2 | * File XmPciLpEvent.h created by Wayne Holm on Mon Jan 15 2001. | ||
3 | * | ||
4 | * This module handles PCI interrupt events sent by the iSeries Hypervisor. | ||
5 | */ | ||
6 | |||
7 | #include <linux/config.h> | ||
8 | #include <linux/pci.h> | ||
9 | #include <linux/init.h> | ||
10 | #include <linux/threads.h> | ||
11 | #include <linux/smp.h> | ||
12 | #include <linux/param.h> | ||
13 | #include <linux/string.h> | ||
14 | #include <linux/bootmem.h> | ||
15 | #include <linux/ide.h> | ||
16 | |||
17 | #include <asm/iSeries/HvTypes.h> | ||
18 | #include <asm/iSeries/HvLpEvent.h> | ||
19 | #include <asm/iSeries/HvCallPci.h> | ||
20 | #include <asm/iSeries/XmPciLpEvent.h> | ||
21 | #include <asm/ppcdebug.h> | ||
22 | |||
23 | static long Pci_Interrupt_Count; | ||
24 | static long Pci_Event_Count; | ||
25 | |||
26 | enum XmPciLpEvent_Subtype { | ||
27 | XmPciLpEvent_BusCreated = 0, // PHB has been created | ||
28 | XmPciLpEvent_BusError = 1, // PHB has failed | ||
29 | XmPciLpEvent_BusFailed = 2, // Msg to Secondary, Primary failed bus | ||
30 | XmPciLpEvent_NodeFailed = 4, // Multi-adapter bridge has failed | ||
31 | XmPciLpEvent_NodeRecovered = 5, // Multi-adapter bridge has recovered | ||
32 | XmPciLpEvent_BusRecovered = 12, // PHB has been recovered | ||
33 | XmPciLpEvent_UnQuiesceBus = 18, // Secondary bus unqiescing | ||
34 | XmPciLpEvent_BridgeError = 21, // Bridge Error | ||
35 | XmPciLpEvent_SlotInterrupt = 22 // Slot interrupt | ||
36 | }; | ||
37 | |||
38 | struct XmPciLpEvent_BusInterrupt { | ||
39 | HvBusNumber busNumber; | ||
40 | HvSubBusNumber subBusNumber; | ||
41 | }; | ||
42 | |||
43 | struct XmPciLpEvent_NodeInterrupt { | ||
44 | HvBusNumber busNumber; | ||
45 | HvSubBusNumber subBusNumber; | ||
46 | HvAgentId deviceId; | ||
47 | }; | ||
48 | |||
49 | struct XmPciLpEvent { | ||
50 | struct HvLpEvent hvLpEvent; | ||
51 | |||
52 | union { | ||
53 | u64 alignData; // Align on an 8-byte boundary | ||
54 | |||
55 | struct { | ||
56 | u32 fisr; | ||
57 | HvBusNumber busNumber; | ||
58 | HvSubBusNumber subBusNumber; | ||
59 | HvAgentId deviceId; | ||
60 | } slotInterrupt; | ||
61 | |||
62 | struct XmPciLpEvent_BusInterrupt busFailed; | ||
63 | struct XmPciLpEvent_BusInterrupt busRecovered; | ||
64 | struct XmPciLpEvent_BusInterrupt busCreated; | ||
65 | |||
66 | struct XmPciLpEvent_NodeInterrupt nodeFailed; | ||
67 | struct XmPciLpEvent_NodeInterrupt nodeRecovered; | ||
68 | |||
69 | } eventData; | ||
70 | |||
71 | }; | ||
72 | |||
73 | static void intReceived(struct XmPciLpEvent *eventParm, | ||
74 | struct pt_regs *regsParm); | ||
75 | |||
76 | static void XmPciLpEvent_handler(struct HvLpEvent *eventParm, | ||
77 | struct pt_regs *regsParm) | ||
78 | { | ||
79 | #ifdef CONFIG_PCI | ||
80 | #if 0 | ||
81 | PPCDBG(PPCDBG_BUSWALK, "XmPciLpEvent_handler, type 0x%x\n", | ||
82 | eventParm->xType); | ||
83 | #endif | ||
84 | ++Pci_Event_Count; | ||
85 | |||
86 | if (eventParm && (eventParm->xType == HvLpEvent_Type_PciIo)) { | ||
87 | switch (eventParm->xFlags.xFunction) { | ||
88 | case HvLpEvent_Function_Int: | ||
89 | intReceived((struct XmPciLpEvent *)eventParm, regsParm); | ||
90 | break; | ||
91 | case HvLpEvent_Function_Ack: | ||
92 | printk(KERN_ERR | ||
93 | "XmPciLpEvent.c: unexpected ack received\n"); | ||
94 | break; | ||
95 | default: | ||
96 | printk(KERN_ERR | ||
97 | "XmPciLpEvent.c: unexpected event function %d\n", | ||
98 | (int)eventParm->xFlags.xFunction); | ||
99 | break; | ||
100 | } | ||
101 | } else if (eventParm) | ||
102 | printk(KERN_ERR | ||
103 | "XmPciLpEvent.c: Unrecognized PCI event type 0x%x\n", | ||
104 | (int)eventParm->xType); | ||
105 | else | ||
106 | printk(KERN_ERR "XmPciLpEvent.c: NULL event received\n"); | ||
107 | #endif | ||
108 | } | ||
109 | |||
110 | static void intReceived(struct XmPciLpEvent *eventParm, | ||
111 | struct pt_regs *regsParm) | ||
112 | { | ||
113 | int irq; | ||
114 | |||
115 | ++Pci_Interrupt_Count; | ||
116 | #if 0 | ||
117 | PPCDBG(PPCDBG_BUSWALK, "PCI: XmPciLpEvent.c: intReceived\n"); | ||
118 | #endif | ||
119 | |||
120 | switch (eventParm->hvLpEvent.xSubtype) { | ||
121 | case XmPciLpEvent_SlotInterrupt: | ||
122 | irq = eventParm->hvLpEvent.xCorrelationToken; | ||
123 | /* Dispatch the interrupt handlers for this irq */ | ||
124 | ppc_irq_dispatch_handler(regsParm, irq); | ||
125 | HvCallPci_eoi(eventParm->eventData.slotInterrupt.busNumber, | ||
126 | eventParm->eventData.slotInterrupt.subBusNumber, | ||
127 | eventParm->eventData.slotInterrupt.deviceId); | ||
128 | break; | ||
129 | /* Ignore error recovery events for now */ | ||
130 | case XmPciLpEvent_BusCreated: | ||
131 | printk(KERN_INFO "XmPciLpEvent.c: system bus %d created\n", | ||
132 | eventParm->eventData.busCreated.busNumber); | ||
133 | break; | ||
134 | case XmPciLpEvent_BusError: | ||
135 | case XmPciLpEvent_BusFailed: | ||
136 | printk(KERN_INFO "XmPciLpEvent.c: system bus %d failed\n", | ||
137 | eventParm->eventData.busFailed.busNumber); | ||
138 | break; | ||
139 | case XmPciLpEvent_BusRecovered: | ||
140 | case XmPciLpEvent_UnQuiesceBus: | ||
141 | printk(KERN_INFO "XmPciLpEvent.c: system bus %d recovered\n", | ||
142 | eventParm->eventData.busRecovered.busNumber); | ||
143 | break; | ||
144 | case XmPciLpEvent_NodeFailed: | ||
145 | case XmPciLpEvent_BridgeError: | ||
146 | printk(KERN_INFO | ||
147 | "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d failed\n", | ||
148 | eventParm->eventData.nodeFailed.busNumber, | ||
149 | eventParm->eventData.nodeFailed.subBusNumber, | ||
150 | eventParm->eventData.nodeFailed.deviceId); | ||
151 | break; | ||
152 | case XmPciLpEvent_NodeRecovered: | ||
153 | printk(KERN_INFO | ||
154 | "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d recovered\n", | ||
155 | eventParm->eventData.nodeRecovered.busNumber, | ||
156 | eventParm->eventData.nodeRecovered.subBusNumber, | ||
157 | eventParm->eventData.nodeRecovered.deviceId); | ||
158 | break; | ||
159 | default: | ||
160 | printk(KERN_ERR | ||
161 | "XmPciLpEvent.c: unrecognized event subtype 0x%x\n", | ||
162 | eventParm->hvLpEvent.xSubtype); | ||
163 | break; | ||
164 | } | ||
165 | } | ||
166 | |||
167 | |||
168 | /* This should be called sometime prior to buswalk (init_IRQ would be good) */ | ||
169 | int XmPciLpEvent_init() | ||
170 | { | ||
171 | int xRc; | ||
172 | |||
173 | PPCDBG(PPCDBG_BUSWALK, | ||
174 | "XmPciLpEvent_init, Register Event type 0x%04X\n", | ||
175 | HvLpEvent_Type_PciIo); | ||
176 | |||
177 | xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, | ||
178 | &XmPciLpEvent_handler); | ||
179 | if (xRc == 0) { | ||
180 | xRc = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0); | ||
181 | if (xRc != 0) | ||
182 | printk(KERN_ERR | ||
183 | "XmPciLpEvent.c: open event path failed with rc 0x%x\n", | ||
184 | xRc); | ||
185 | } else | ||
186 | printk(KERN_ERR | ||
187 | "XmPciLpEvent.c: register handler failed with rc 0x%x\n", | ||
188 | xRc); | ||
189 | return xRc; | ||
190 | } | ||
diff --git a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c index 0094ac79a18c..abb9e5b5da03 100644 --- a/arch/ppc64/kernel/asm-offsets.c +++ b/arch/ppc64/kernel/asm-offsets.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | #include <asm/paca.h> | 32 | #include <asm/paca.h> |
33 | #include <asm/lppaca.h> | 33 | #include <asm/lppaca.h> |
34 | #include <asm/iSeries/ItLpQueue.h> | ||
35 | #include <asm/iSeries/HvLpEvent.h> | 34 | #include <asm/iSeries/HvLpEvent.h> |
36 | #include <asm/rtas.h> | 35 | #include <asm/rtas.h> |
37 | #include <asm/cputable.h> | 36 | #include <asm/cputable.h> |
diff --git a/arch/ppc64/kernel/dma.c b/arch/ppc64/kernel/dma.c index ce714c927134..4da8e31b2b61 100644 --- a/arch/ppc64/kernel/dma.c +++ b/arch/ppc64/kernel/dma.c | |||
@@ -15,8 +15,10 @@ | |||
15 | 15 | ||
16 | static struct dma_mapping_ops *get_dma_ops(struct device *dev) | 16 | static struct dma_mapping_ops *get_dma_ops(struct device *dev) |
17 | { | 17 | { |
18 | #ifdef CONFIG_PCI | ||
18 | if (dev->bus == &pci_bus_type) | 19 | if (dev->bus == &pci_bus_type) |
19 | return &pci_dma_ops; | 20 | return &pci_dma_ops; |
21 | #endif | ||
20 | #ifdef CONFIG_IBMVIO | 22 | #ifdef CONFIG_IBMVIO |
21 | if (dev->bus == &vio_bus_type) | 23 | if (dev->bus == &vio_bus_type) |
22 | return &vio_dma_ops; | 24 | return &vio_dma_ops; |
@@ -37,8 +39,10 @@ EXPORT_SYMBOL(dma_supported); | |||
37 | 39 | ||
38 | int dma_set_mask(struct device *dev, u64 dma_mask) | 40 | int dma_set_mask(struct device *dev, u64 dma_mask) |
39 | { | 41 | { |
42 | #ifdef CONFIG_PCI | ||
40 | if (dev->bus == &pci_bus_type) | 43 | if (dev->bus == &pci_bus_type) |
41 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | 44 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); |
45 | #endif | ||
42 | #ifdef CONFIG_IBMVIO | 46 | #ifdef CONFIG_IBMVIO |
43 | if (dev->bus == &vio_bus_type) | 47 | if (dev->bus == &vio_bus_type) |
44 | return -EIO; | 48 | return -EIO; |
diff --git a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c index d63d41f3eecf..af5272fedadf 100644 --- a/arch/ppc64/kernel/eeh.c +++ b/arch/ppc64/kernel/eeh.c | |||
@@ -505,7 +505,7 @@ static inline unsigned long eeh_token_to_phys(unsigned long token) | |||
505 | pte_t *ptep; | 505 | pte_t *ptep; |
506 | unsigned long pa; | 506 | unsigned long pa; |
507 | 507 | ||
508 | ptep = find_linux_pte(ioremap_mm.pgd, token); | 508 | ptep = find_linux_pte(init_mm.pgd, token); |
509 | if (!ptep) | 509 | if (!ptep) |
510 | return token; | 510 | return token; |
511 | pa = pte_pfn(*ptep) << PAGE_SHIFT; | 511 | pa = pte_pfn(*ptep) << PAGE_SHIFT; |
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index 346dbf606b5d..02c8f4e3e4bc 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S | |||
@@ -2121,10 +2121,6 @@ empty_zero_page: | |||
2121 | swapper_pg_dir: | 2121 | swapper_pg_dir: |
2122 | .space 4096 | 2122 | .space 4096 |
2123 | 2123 | ||
2124 | .globl ioremap_dir | ||
2125 | ioremap_dir: | ||
2126 | .space 4096 | ||
2127 | |||
2128 | #ifdef CONFIG_SMP | 2124 | #ifdef CONFIG_SMP |
2129 | /* 1 page segment table per cpu (max 48, cpu0 allocated at STAB0_PHYS_ADDR) */ | 2125 | /* 1 page segment table per cpu (max 48, cpu0 allocated at STAB0_PHYS_ADDR) */ |
2130 | .globl stab_array | 2126 | .globl stab_array |
diff --git a/arch/ppc64/kernel/iSeries_VpdInfo.c b/arch/ppc64/kernel/iSeries_VpdInfo.c index a6f0ff2d0239..d11c732daf81 100644 --- a/arch/ppc64/kernel/iSeries_VpdInfo.c +++ b/arch/ppc64/kernel/iSeries_VpdInfo.c | |||
@@ -1,31 +1,31 @@ | |||
1 | /************************************************************************/ | 1 | /* |
2 | /* File iSeries_vpdInfo.c created by Allan Trautman on Fri Feb 2 2001. */ | 2 | * File iSeries_vpdInfo.c created by Allan Trautman on Fri Feb 2 2001. |
3 | /************************************************************************/ | 3 | * |
4 | /* This code gets the card location of the hardware */ | 4 | * This code gets the card location of the hardware |
5 | /* Copyright (C) 20yy <Allan H Trautman> <IBM Corp> */ | 5 | * Copyright (C) 2001 <Allan H Trautman> <IBM Corp> |
6 | /* */ | 6 | * Copyright (C) 2005 Stephen Rothwel, IBM Corp |
7 | /* This program is free software; you can redistribute it and/or modify */ | 7 | * |
8 | /* it under the terms of the GNU General Public License as published by */ | 8 | * This program is free software; you can redistribute it and/or modify |
9 | /* the Free Software Foundation; either version 2 of the License, or */ | 9 | * it under the terms of the GNU General Public License as published by |
10 | /* (at your option) any later version. */ | 10 | * the Free Software Foundation; either version 2 of the License, or |
11 | /* */ | 11 | * (at your option) any later version. |
12 | /* This program is distributed in the hope that it will be useful, */ | 12 | * |
13 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ | 13 | * This program is distributed in the hope that it will be useful, |
14 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | /* GNU General Public License for more details. */ | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | /* */ | 16 | * GNU General Public License for more details. |
17 | /* You should have received a copy of the GNU General Public License */ | 17 | * |
18 | /* along with this program; if not, write to the: */ | 18 | * You should have received a copy of the GNU General Public License |
19 | /* Free Software Foundation, Inc., */ | 19 | * along with this program; if not, write to the: |
20 | /* 59 Temple Place, Suite 330, */ | 20 | * Free Software Foundation, Inc., |
21 | /* Boston, MA 02111-1307 USA */ | 21 | * 59 Temple Place, Suite 330, |
22 | /************************************************************************/ | 22 | * Boston, MA 02111-1307 USA |
23 | /* Change Activity: */ | 23 | * |
24 | /* Created, Feb 2, 2001 */ | 24 | * Change Activity: |
25 | /* Ported to ppc64, August 20, 2001 */ | 25 | * Created, Feb 2, 2001 |
26 | /* End Change Activity */ | 26 | * Ported to ppc64, August 20, 2001 |
27 | /************************************************************************/ | 27 | * End Change Activity |
28 | #include <linux/config.h> | 28 | */ |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
@@ -34,30 +34,25 @@ | |||
34 | 34 | ||
35 | #include <asm/iSeries/HvCallPci.h> | 35 | #include <asm/iSeries/HvCallPci.h> |
36 | #include <asm/iSeries/HvTypes.h> | 36 | #include <asm/iSeries/HvTypes.h> |
37 | #include <asm/iSeries/mf.h> | ||
38 | #include <asm/iSeries/LparData.h> | ||
39 | #include <asm/iSeries/iSeries_pci.h> | 37 | #include <asm/iSeries/iSeries_pci.h> |
40 | #include "pci.h" | ||
41 | 38 | ||
42 | /* | 39 | /* |
43 | * Size of Bus VPD data | 40 | * Size of Bus VPD data |
44 | */ | 41 | */ |
45 | #define BUS_VPDSIZE 1024 | 42 | #define BUS_VPDSIZE 1024 |
43 | |||
46 | /* | 44 | /* |
47 | * Bus Vpd Tags | 45 | * Bus Vpd Tags |
48 | */ | 46 | */ |
49 | #define VpdEndOfDataTag 0x78 | ||
50 | #define VpdEndOfAreaTag 0x79 | 47 | #define VpdEndOfAreaTag 0x79 |
51 | #define VpdIdStringTag 0x82 | 48 | #define VpdIdStringTag 0x82 |
52 | #define VpdVendorAreaTag 0x84 | 49 | #define VpdVendorAreaTag 0x84 |
50 | |||
53 | /* | 51 | /* |
54 | * Mfg Area Tags | 52 | * Mfg Area Tags |
55 | */ | 53 | */ |
56 | #define VpdFruFlag 0x4647 // "FG" | ||
57 | #define VpdFruFrameId 0x4649 // "FI" | 54 | #define VpdFruFrameId 0x4649 // "FI" |
58 | #define VpdSlotMapFormat 0x4D46 // "MF" | 55 | #define VpdSlotMapFormat 0x4D46 // "MF" |
59 | #define VpdAsmPartNumber 0x504E // "PN" | ||
60 | #define VpdFruSerial 0x534E // "SN" | ||
61 | #define VpdSlotMap 0x534D // "SM" | 56 | #define VpdSlotMap 0x534D // "SM" |
62 | 57 | ||
63 | /* | 58 | /* |
@@ -79,74 +74,33 @@ struct SlotMapStruct { | |||
79 | char CardLocation[3]; | 74 | char CardLocation[3]; |
80 | char Parms[8]; | 75 | char Parms[8]; |
81 | char Reserved[2]; | 76 | char Reserved[2]; |
82 | }; | 77 | }; |
83 | typedef struct SlotMapStruct SlotMap; | 78 | typedef struct SlotMapStruct SlotMap; |
84 | #define SLOT_ENTRY_SIZE 16 | 79 | #define SLOT_ENTRY_SIZE 16 |
85 | 80 | ||
86 | /* | 81 | /* |
87 | * Formats the device information. | ||
88 | * - Pass in pci_dev* pointer to the device. | ||
89 | * - Pass in buffer to place the data. Danger here is the buffer must | ||
90 | * be as big as the client says it is. Should be at least 128 bytes. | ||
91 | * Return will the length of the string data put in the buffer. | ||
92 | * Format: | ||
93 | * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet | ||
94 | * controller | ||
95 | */ | ||
96 | int iSeries_Device_Information(struct pci_dev *PciDev, char *buffer, | ||
97 | int BufferSize) | ||
98 | { | ||
99 | struct iSeries_Device_Node *DevNode = | ||
100 | (struct iSeries_Device_Node *)PciDev->sysdata; | ||
101 | int len; | ||
102 | |||
103 | if (DevNode == NULL) | ||
104 | return sprintf(buffer, | ||
105 | "PCI: iSeries_Device_Information DevNode is NULL"); | ||
106 | |||
107 | if (BufferSize < 128) | ||
108 | return 0; | ||
109 | |||
110 | len = sprintf(buffer, "PCI: Bus%3d, Device%3d, Vendor %04X ", | ||
111 | ISERIES_BUS(DevNode), PCI_SLOT(PciDev->devfn), | ||
112 | PciDev->vendor); | ||
113 | len += sprintf(buffer + len, "Frame%3d, Card %4s ", | ||
114 | DevNode->FrameId, DevNode->CardLocation); | ||
115 | #ifdef CONFIG_PCI | ||
116 | if (pci_class_name(PciDev->class >> 8) == 0) | ||
117 | len += sprintf(buffer + len, "0x%04X ", | ||
118 | (int)(PciDev->class >> 8)); | ||
119 | else | ||
120 | len += sprintf(buffer + len, "%s", | ||
121 | pci_class_name(PciDev->class >> 8)); | ||
122 | #endif | ||
123 | return len; | ||
124 | } | ||
125 | |||
126 | /* | ||
127 | * Parse the Slot Area | 82 | * Parse the Slot Area |
128 | */ | 83 | */ |
129 | void iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen, | 84 | static void __init iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen, |
130 | struct iSeries_Device_Node *DevNode) | 85 | HvAgentId agent, u8 *PhbId, char card[4]) |
131 | { | 86 | { |
132 | int SlotMapLen = MapLen; | 87 | int SlotMapLen = MapLen; |
133 | SlotMap *SlotMapPtr = MapPtr; | 88 | SlotMap *SlotMapPtr = MapPtr; |
134 | 89 | ||
135 | /* | 90 | /* |
136 | * Parse Slot label until we find the one requrested | 91 | * Parse Slot label until we find the one requested |
137 | */ | 92 | */ |
138 | while (SlotMapLen > 0) { | 93 | while (SlotMapLen > 0) { |
139 | if (SlotMapPtr->AgentId == DevNode->AgentId ) { | 94 | if (SlotMapPtr->AgentId == agent) { |
140 | /* | 95 | /* |
141 | * If Phb wasn't found, grab the entry first one found. | 96 | * If Phb wasn't found, grab the entry first one found. |
142 | */ | 97 | */ |
143 | if (DevNode->PhbId == 0xff) | 98 | if (*PhbId == 0xff) |
144 | DevNode->PhbId = SlotMapPtr->PhbId; | 99 | *PhbId = SlotMapPtr->PhbId; |
145 | /* Found it, extract the data. */ | 100 | /* Found it, extract the data. */ |
146 | if (SlotMapPtr->PhbId == DevNode->PhbId ) { | 101 | if (SlotMapPtr->PhbId == *PhbId) { |
147 | memcpy(&DevNode->CardLocation, | 102 | memcpy(card, &SlotMapPtr->CardLocation, 3); |
148 | &SlotMapPtr->CardLocation, 3); | 103 | card[3] = 0; |
149 | DevNode->CardLocation[3] = 0; | ||
150 | break; | 104 | break; |
151 | } | 105 | } |
152 | } | 106 | } |
@@ -159,8 +113,9 @@ void iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen, | |||
159 | /* | 113 | /* |
160 | * Parse the Mfg Area | 114 | * Parse the Mfg Area |
161 | */ | 115 | */ |
162 | static void iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen, | 116 | static void __init iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen, |
163 | struct iSeries_Device_Node *DevNode) | 117 | HvAgentId agent, u8 *PhbId, |
118 | u8 *frame, char card[4]) | ||
164 | { | 119 | { |
165 | MfgArea *MfgAreaPtr = (MfgArea *)AreaData; | 120 | MfgArea *MfgAreaPtr = (MfgArea *)AreaData; |
166 | int MfgAreaLen = AreaLen; | 121 | int MfgAreaLen = AreaLen; |
@@ -171,7 +126,7 @@ static void iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen, | |||
171 | int MfgTagLen = MfgAreaPtr->TagLength; | 126 | int MfgTagLen = MfgAreaPtr->TagLength; |
172 | /* Frame ID (FI 4649020310 ) */ | 127 | /* Frame ID (FI 4649020310 ) */ |
173 | if (MfgAreaPtr->Tag == VpdFruFrameId) /* FI */ | 128 | if (MfgAreaPtr->Tag == VpdFruFrameId) /* FI */ |
174 | DevNode->FrameId = MfgAreaPtr->AreaData1; | 129 | *frame = MfgAreaPtr->AreaData1; |
175 | /* Slot Map Format (MF 4D46020004 ) */ | 130 | /* Slot Map Format (MF 4D46020004 ) */ |
176 | else if (MfgAreaPtr->Tag == VpdSlotMapFormat) /* MF */ | 131 | else if (MfgAreaPtr->Tag == VpdSlotMapFormat) /* MF */ |
177 | SlotMapFmt = (MfgAreaPtr->AreaData1 * 256) | 132 | SlotMapFmt = (MfgAreaPtr->AreaData1 * 256) |
@@ -183,10 +138,11 @@ static void iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen, | |||
183 | if (SlotMapFmt == 0x1004) | 138 | if (SlotMapFmt == 0x1004) |
184 | SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr | 139 | SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr |
185 | + MFG_ENTRY_SIZE + 1); | 140 | + MFG_ENTRY_SIZE + 1); |
186 | else | 141 | else |
187 | SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr | 142 | SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr |
188 | + MFG_ENTRY_SIZE); | 143 | + MFG_ENTRY_SIZE); |
189 | iSeries_Parse_SlotArea(SlotMapPtr, MfgTagLen, DevNode); | 144 | iSeries_Parse_SlotArea(SlotMapPtr, MfgTagLen, |
145 | agent, PhbId, card); | ||
190 | } | 146 | } |
191 | /* | 147 | /* |
192 | * Point to the next Mfg Area | 148 | * Point to the next Mfg Area |
@@ -194,19 +150,19 @@ static void iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen, | |||
194 | */ | 150 | */ |
195 | MfgAreaPtr = (MfgArea *)((char *)MfgAreaPtr + MfgTagLen | 151 | MfgAreaPtr = (MfgArea *)((char *)MfgAreaPtr + MfgTagLen |
196 | + MFG_ENTRY_SIZE); | 152 | + MFG_ENTRY_SIZE); |
197 | MfgAreaLen -= (MfgTagLen + MFG_ENTRY_SIZE); | 153 | MfgAreaLen -= (MfgTagLen + MFG_ENTRY_SIZE); |
198 | } | 154 | } |
199 | } | 155 | } |
200 | 156 | ||
201 | /* | 157 | /* |
202 | * Look for "BUS".. Data is not Null terminated. | 158 | * Look for "BUS".. Data is not Null terminated. |
203 | * PHBID of 0xFF indicates PHB was not found in VPD Data. | 159 | * PHBID of 0xFF indicates PHB was not found in VPD Data. |
204 | */ | 160 | */ |
205 | static int iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength) | 161 | static int __init iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength) |
206 | { | 162 | { |
207 | u8 *PhbPtr = AreaPtr; | 163 | u8 *PhbPtr = AreaPtr; |
208 | int DataLen = AreaLength; | 164 | int DataLen = AreaLength; |
209 | char PhbId = 0xFF; | 165 | char PhbId = 0xFF; |
210 | 166 | ||
211 | while (DataLen > 0) { | 167 | while (DataLen > 0) { |
212 | if ((*PhbPtr == 'B') && (*(PhbPtr + 1) == 'U') | 168 | if ((*PhbPtr == 'B') && (*(PhbPtr + 1) == 'U') |
@@ -216,7 +172,7 @@ static int iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength) | |||
216 | ++PhbPtr; | 172 | ++PhbPtr; |
217 | PhbId = (*PhbPtr & 0x0F); | 173 | PhbId = (*PhbPtr & 0x0F); |
218 | break; | 174 | break; |
219 | } | 175 | } |
220 | ++PhbPtr; | 176 | ++PhbPtr; |
221 | --DataLen; | 177 | --DataLen; |
222 | } | 178 | } |
@@ -226,52 +182,90 @@ static int iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength) | |||
226 | /* | 182 | /* |
227 | * Parse out the VPD Areas | 183 | * Parse out the VPD Areas |
228 | */ | 184 | */ |
229 | static void iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen, | 185 | static void __init iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen, |
230 | struct iSeries_Device_Node *DevNode) | 186 | HvAgentId agent, u8 *frame, char card[4]) |
231 | { | 187 | { |
232 | u8 *TagPtr = VpdData; | 188 | u8 *TagPtr = VpdData; |
233 | int DataLen = VpdDataLen - 3; | 189 | int DataLen = VpdDataLen - 3; |
190 | u8 PhbId; | ||
234 | 191 | ||
235 | while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) { | 192 | while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) { |
236 | int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256); | 193 | int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256); |
237 | u8 *AreaData = TagPtr + 3; | 194 | u8 *AreaData = TagPtr + 3; |
238 | 195 | ||
239 | if (*TagPtr == VpdIdStringTag) | 196 | if (*TagPtr == VpdIdStringTag) |
240 | DevNode->PhbId = iSeries_Parse_PhbId(AreaData, AreaLen); | 197 | PhbId = iSeries_Parse_PhbId(AreaData, AreaLen); |
241 | else if (*TagPtr == VpdVendorAreaTag) | 198 | else if (*TagPtr == VpdVendorAreaTag) |
242 | iSeries_Parse_MfgArea(AreaData, AreaLen, DevNode); | 199 | iSeries_Parse_MfgArea(AreaData, AreaLen, |
200 | agent, &PhbId, frame, card); | ||
243 | /* Point to next Area. */ | 201 | /* Point to next Area. */ |
244 | TagPtr = AreaData + AreaLen; | 202 | TagPtr = AreaData + AreaLen; |
245 | DataLen -= AreaLen; | 203 | DataLen -= AreaLen; |
246 | } | 204 | } |
247 | } | 205 | } |
248 | 206 | ||
249 | void iSeries_Get_Location_Code(struct iSeries_Device_Node *DevNode) | 207 | static void __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent, |
208 | u8 *frame, char card[4]) | ||
250 | { | 209 | { |
251 | int BusVpdLen = 0; | 210 | int BusVpdLen = 0; |
252 | u8 *BusVpdPtr = (u8 *)kmalloc(BUS_VPDSIZE, GFP_KERNEL); | 211 | u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL); |
253 | 212 | ||
254 | if (BusVpdPtr == NULL) { | 213 | if (BusVpdPtr == NULL) { |
255 | printk("PCI: Bus VPD Buffer allocation failure.\n"); | 214 | printk("PCI: Bus VPD Buffer allocation failure.\n"); |
256 | return; | 215 | return; |
257 | } | 216 | } |
258 | BusVpdLen = HvCallPci_getBusVpd(ISERIES_BUS(DevNode), | 217 | BusVpdLen = HvCallPci_getBusVpd(bus, ISERIES_HV_ADDR(BusVpdPtr), |
259 | ISERIES_HV_ADDR(BusVpdPtr), | ||
260 | BUS_VPDSIZE); | 218 | BUS_VPDSIZE); |
261 | if (BusVpdLen == 0) { | 219 | if (BusVpdLen == 0) { |
262 | kfree(BusVpdPtr); | ||
263 | printk("PCI: Bus VPD Buffer zero length.\n"); | 220 | printk("PCI: Bus VPD Buffer zero length.\n"); |
264 | return; | 221 | goto out_free; |
265 | } | 222 | } |
266 | /* printk("PCI: BusVpdPtr: %p, %d\n",BusVpdPtr, BusVpdLen); */ | 223 | /* printk("PCI: BusVpdPtr: %p, %d\n",BusVpdPtr, BusVpdLen); */ |
267 | /* Make sure this is what I think it is */ | 224 | /* Make sure this is what I think it is */ |
268 | if (*BusVpdPtr != VpdIdStringTag) { /* 0x82 */ | 225 | if (*BusVpdPtr != VpdIdStringTag) { /* 0x82 */ |
269 | printk("PCI: Bus VPD Buffer missing starting tag.\n"); | 226 | printk("PCI: Bus VPD Buffer missing starting tag.\n"); |
270 | kfree(BusVpdPtr); | 227 | goto out_free; |
271 | return; | ||
272 | } | 228 | } |
273 | iSeries_Parse_Vpd(BusVpdPtr,BusVpdLen, DevNode); | 229 | iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card); |
274 | sprintf(DevNode->Location, "Frame%3d, Card %-4s", DevNode->FrameId, | 230 | out_free: |
275 | DevNode->CardLocation); | ||
276 | kfree(BusVpdPtr); | 231 | kfree(BusVpdPtr); |
277 | } | 232 | } |
233 | |||
234 | /* | ||
235 | * Prints the device information. | ||
236 | * - Pass in pci_dev* pointer to the device. | ||
237 | * - Pass in the device count | ||
238 | * | ||
239 | * Format: | ||
240 | * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet | ||
241 | * controller | ||
242 | */ | ||
243 | void __init iSeries_Device_Information(struct pci_dev *PciDev, int count) | ||
244 | { | ||
245 | struct iSeries_Device_Node *DevNode = PciDev->sysdata; | ||
246 | u16 bus; | ||
247 | u8 frame; | ||
248 | char card[4]; | ||
249 | HvSubBusNumber subbus; | ||
250 | HvAgentId agent; | ||
251 | |||
252 | if (DevNode == NULL) { | ||
253 | printk("%d. PCI: iSeries_Device_Information DevNode is NULL\n", | ||
254 | count); | ||
255 | return; | ||
256 | } | ||
257 | |||
258 | bus = ISERIES_BUS(DevNode); | ||
259 | subbus = ISERIES_SUBBUS(DevNode); | ||
260 | agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus), | ||
261 | ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus)); | ||
262 | iSeries_Get_Location_Code(bus, agent, &frame, card); | ||
263 | |||
264 | printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, Card %4s ", | ||
265 | count, bus, PCI_SLOT(PciDev->devfn), PciDev->vendor, | ||
266 | frame, card); | ||
267 | if (pci_class_name(PciDev->class >> 8) == 0) | ||
268 | printk("0x%04X\n", (int)(PciDev->class >> 8)); | ||
269 | else | ||
270 | printk("%s\n", pci_class_name(PciDev->class >> 8)); | ||
271 | } | ||
diff --git a/arch/ppc64/kernel/iSeries_iommu.c b/arch/ppc64/kernel/iSeries_iommu.c index 4e1a47c8a802..f8ff1bb054dc 100644 --- a/arch/ppc64/kernel/iSeries_iommu.c +++ b/arch/ppc64/kernel/iSeries_iommu.c | |||
@@ -83,7 +83,7 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) | |||
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | 86 | #ifdef CONFIG_PCI | |
87 | /* | 87 | /* |
88 | * This function compares the known tables to find an iommu_table | 88 | * This function compares the known tables to find an iommu_table |
89 | * that has already been built for hardware TCEs. | 89 | * that has already been built for hardware TCEs. |
@@ -159,6 +159,7 @@ void iommu_devnode_init_iSeries(struct iSeries_Device_Node *dn) | |||
159 | else | 159 | else |
160 | kfree(tbl); | 160 | kfree(tbl); |
161 | } | 161 | } |
162 | #endif | ||
162 | 163 | ||
163 | static void iommu_dev_setup_iSeries(struct pci_dev *dev) { } | 164 | static void iommu_dev_setup_iSeries(struct pci_dev *dev) { } |
164 | static void iommu_bus_setup_iSeries(struct pci_bus *bus) { } | 165 | static void iommu_bus_setup_iSeries(struct pci_bus *bus) { } |
diff --git a/arch/ppc64/kernel/iSeries_irq.c b/arch/ppc64/kernel/iSeries_irq.c index f831d259dbb7..77376c1bd611 100644 --- a/arch/ppc64/kernel/iSeries_irq.c +++ b/arch/ppc64/kernel/iSeries_irq.c | |||
@@ -1,27 +1,29 @@ | |||
1 | /************************************************************************/ | 1 | /* |
2 | /* This module supports the iSeries PCI bus interrupt handling */ | 2 | * This module supports the iSeries PCI bus interrupt handling |
3 | /* Copyright (C) 20yy <Robert L Holtorf> <IBM Corp> */ | 3 | * Copyright (C) 20yy <Robert L Holtorf> <IBM Corp> |
4 | /* */ | 4 | * Copyright (C) 2004-2005 IBM Corporation |
5 | /* This program is free software; you can redistribute it and/or modify */ | 5 | * |
6 | /* it under the terms of the GNU General Public License as published by */ | 6 | * This program is free software; you can redistribute it and/or modify |
7 | /* the Free Software Foundation; either version 2 of the License, or */ | 7 | * it under the terms of the GNU General Public License as published by |
8 | /* (at your option) any later version. */ | 8 | * the Free Software Foundation; either version 2 of the License, or |
9 | /* */ | 9 | * (at your option) any later version. |
10 | /* This program is distributed in the hope that it will be useful, */ | 10 | * |
11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ | 11 | * This program is distributed in the hope that it will be useful, |
12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | /* GNU General Public License for more details. */ | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | /* */ | 14 | * GNU General Public License for more details. |
15 | /* You should have received a copy of the GNU General Public License */ | 15 | * |
16 | /* along with this program; if not, write to the: */ | 16 | * You should have received a copy of the GNU General Public License |
17 | /* Free Software Foundation, Inc., */ | 17 | * along with this program; if not, write to the: |
18 | /* 59 Temple Place, Suite 330, */ | 18 | * Free Software Foundation, Inc., |
19 | /* Boston, MA 02111-1307 USA */ | 19 | * 59 Temple Place, Suite 330, |
20 | /************************************************************************/ | 20 | * Boston, MA 02111-1307 USA |
21 | /* Change Activity: */ | 21 | * |
22 | /* Created, December 13, 2000 by Wayne Holm */ | 22 | * Change Activity: |
23 | /* End Change Activity */ | 23 | * Created, December 13, 2000 by Wayne Holm |
24 | /************************************************************************/ | 24 | * End Change Activity |
25 | */ | ||
26 | #include <linux/config.h> | ||
25 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
26 | #include <linux/init.h> | 28 | #include <linux/init.h> |
27 | #include <linux/threads.h> | 29 | #include <linux/threads.h> |
@@ -30,30 +32,15 @@ | |||
30 | #include <linux/string.h> | 32 | #include <linux/string.h> |
31 | #include <linux/bootmem.h> | 33 | #include <linux/bootmem.h> |
32 | #include <linux/ide.h> | 34 | #include <linux/ide.h> |
33 | |||
34 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
35 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
36 | #include <asm/ppcdebug.h> | ||
37 | 37 | ||
38 | #include <asm/ppcdebug.h> | ||
39 | #include <asm/iSeries/HvTypes.h> | ||
40 | #include <asm/iSeries/HvLpEvent.h> | ||
38 | #include <asm/iSeries/HvCallPci.h> | 41 | #include <asm/iSeries/HvCallPci.h> |
39 | #include <asm/iSeries/HvCallXm.h> | 42 | #include <asm/iSeries/HvCallXm.h> |
40 | #include <asm/iSeries/iSeries_irq.h> | 43 | #include <asm/iSeries/iSeries_irq.h> |
41 | #include <asm/iSeries/XmPciLpEvent.h> | ||
42 | |||
43 | static unsigned int iSeries_startup_IRQ(unsigned int irq); | ||
44 | static void iSeries_shutdown_IRQ(unsigned int irq); | ||
45 | static void iSeries_enable_IRQ(unsigned int irq); | ||
46 | static void iSeries_disable_IRQ(unsigned int irq); | ||
47 | static void iSeries_end_IRQ(unsigned int irq); | ||
48 | |||
49 | static hw_irq_controller iSeries_IRQ_handler = { | ||
50 | .typename = "iSeries irq controller", | ||
51 | .startup = iSeries_startup_IRQ, | ||
52 | .shutdown = iSeries_shutdown_IRQ, | ||
53 | .enable = iSeries_enable_IRQ, | ||
54 | .disable = iSeries_disable_IRQ, | ||
55 | .end = iSeries_end_IRQ | ||
56 | }; | ||
57 | 44 | ||
58 | /* This maps virtual irq numbers to real irqs */ | 45 | /* This maps virtual irq numbers to real irqs */ |
59 | unsigned int virt_irq_to_real_map[NR_IRQS]; | 46 | unsigned int virt_irq_to_real_map[NR_IRQS]; |
@@ -62,37 +49,187 @@ unsigned int virt_irq_to_real_map[NR_IRQS]; | |||
62 | /* Note: the pcnet32 driver assumes irq numbers < 2 aren't valid. :( */ | 49 | /* Note: the pcnet32 driver assumes irq numbers < 2 aren't valid. :( */ |
63 | static int next_virtual_irq = 2; | 50 | static int next_virtual_irq = 2; |
64 | 51 | ||
65 | /* This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c */ | 52 | static long Pci_Interrupt_Count; |
66 | void __init iSeries_init_IRQ(void) | 53 | static long Pci_Event_Count; |
54 | |||
55 | enum XmPciLpEvent_Subtype { | ||
56 | XmPciLpEvent_BusCreated = 0, // PHB has been created | ||
57 | XmPciLpEvent_BusError = 1, // PHB has failed | ||
58 | XmPciLpEvent_BusFailed = 2, // Msg to Secondary, Primary failed bus | ||
59 | XmPciLpEvent_NodeFailed = 4, // Multi-adapter bridge has failed | ||
60 | XmPciLpEvent_NodeRecovered = 5, // Multi-adapter bridge has recovered | ||
61 | XmPciLpEvent_BusRecovered = 12, // PHB has been recovered | ||
62 | XmPciLpEvent_UnQuiesceBus = 18, // Secondary bus unqiescing | ||
63 | XmPciLpEvent_BridgeError = 21, // Bridge Error | ||
64 | XmPciLpEvent_SlotInterrupt = 22 // Slot interrupt | ||
65 | }; | ||
66 | |||
67 | struct XmPciLpEvent_BusInterrupt { | ||
68 | HvBusNumber busNumber; | ||
69 | HvSubBusNumber subBusNumber; | ||
70 | }; | ||
71 | |||
72 | struct XmPciLpEvent_NodeInterrupt { | ||
73 | HvBusNumber busNumber; | ||
74 | HvSubBusNumber subBusNumber; | ||
75 | HvAgentId deviceId; | ||
76 | }; | ||
77 | |||
78 | struct XmPciLpEvent { | ||
79 | struct HvLpEvent hvLpEvent; | ||
80 | |||
81 | union { | ||
82 | u64 alignData; // Align on an 8-byte boundary | ||
83 | |||
84 | struct { | ||
85 | u32 fisr; | ||
86 | HvBusNumber busNumber; | ||
87 | HvSubBusNumber subBusNumber; | ||
88 | HvAgentId deviceId; | ||
89 | } slotInterrupt; | ||
90 | |||
91 | struct XmPciLpEvent_BusInterrupt busFailed; | ||
92 | struct XmPciLpEvent_BusInterrupt busRecovered; | ||
93 | struct XmPciLpEvent_BusInterrupt busCreated; | ||
94 | |||
95 | struct XmPciLpEvent_NodeInterrupt nodeFailed; | ||
96 | struct XmPciLpEvent_NodeInterrupt nodeRecovered; | ||
97 | |||
98 | } eventData; | ||
99 | |||
100 | }; | ||
101 | |||
102 | static void intReceived(struct XmPciLpEvent *eventParm, | ||
103 | struct pt_regs *regsParm) | ||
67 | { | 104 | { |
68 | /* Register PCI event handler and open an event path */ | 105 | int irq; |
69 | XmPciLpEvent_init(); | 106 | |
107 | ++Pci_Interrupt_Count; | ||
108 | |||
109 | switch (eventParm->hvLpEvent.xSubtype) { | ||
110 | case XmPciLpEvent_SlotInterrupt: | ||
111 | irq = eventParm->hvLpEvent.xCorrelationToken; | ||
112 | /* Dispatch the interrupt handlers for this irq */ | ||
113 | ppc_irq_dispatch_handler(regsParm, irq); | ||
114 | HvCallPci_eoi(eventParm->eventData.slotInterrupt.busNumber, | ||
115 | eventParm->eventData.slotInterrupt.subBusNumber, | ||
116 | eventParm->eventData.slotInterrupt.deviceId); | ||
117 | break; | ||
118 | /* Ignore error recovery events for now */ | ||
119 | case XmPciLpEvent_BusCreated: | ||
120 | printk(KERN_INFO "intReceived: system bus %d created\n", | ||
121 | eventParm->eventData.busCreated.busNumber); | ||
122 | break; | ||
123 | case XmPciLpEvent_BusError: | ||
124 | case XmPciLpEvent_BusFailed: | ||
125 | printk(KERN_INFO "intReceived: system bus %d failed\n", | ||
126 | eventParm->eventData.busFailed.busNumber); | ||
127 | break; | ||
128 | case XmPciLpEvent_BusRecovered: | ||
129 | case XmPciLpEvent_UnQuiesceBus: | ||
130 | printk(KERN_INFO "intReceived: system bus %d recovered\n", | ||
131 | eventParm->eventData.busRecovered.busNumber); | ||
132 | break; | ||
133 | case XmPciLpEvent_NodeFailed: | ||
134 | case XmPciLpEvent_BridgeError: | ||
135 | printk(KERN_INFO | ||
136 | "intReceived: multi-adapter bridge %d/%d/%d failed\n", | ||
137 | eventParm->eventData.nodeFailed.busNumber, | ||
138 | eventParm->eventData.nodeFailed.subBusNumber, | ||
139 | eventParm->eventData.nodeFailed.deviceId); | ||
140 | break; | ||
141 | case XmPciLpEvent_NodeRecovered: | ||
142 | printk(KERN_INFO | ||
143 | "intReceived: multi-adapter bridge %d/%d/%d recovered\n", | ||
144 | eventParm->eventData.nodeRecovered.busNumber, | ||
145 | eventParm->eventData.nodeRecovered.subBusNumber, | ||
146 | eventParm->eventData.nodeRecovered.deviceId); | ||
147 | break; | ||
148 | default: | ||
149 | printk(KERN_ERR | ||
150 | "intReceived: unrecognized event subtype 0x%x\n", | ||
151 | eventParm->hvLpEvent.xSubtype); | ||
152 | break; | ||
153 | } | ||
154 | } | ||
155 | |||
156 | static void XmPciLpEvent_handler(struct HvLpEvent *eventParm, | ||
157 | struct pt_regs *regsParm) | ||
158 | { | ||
159 | #ifdef CONFIG_PCI | ||
160 | ++Pci_Event_Count; | ||
161 | |||
162 | if (eventParm && (eventParm->xType == HvLpEvent_Type_PciIo)) { | ||
163 | switch (eventParm->xFlags.xFunction) { | ||
164 | case HvLpEvent_Function_Int: | ||
165 | intReceived((struct XmPciLpEvent *)eventParm, regsParm); | ||
166 | break; | ||
167 | case HvLpEvent_Function_Ack: | ||
168 | printk(KERN_ERR | ||
169 | "XmPciLpEvent_handler: unexpected ack received\n"); | ||
170 | break; | ||
171 | default: | ||
172 | printk(KERN_ERR | ||
173 | "XmPciLpEvent_handler: unexpected event function %d\n", | ||
174 | (int)eventParm->xFlags.xFunction); | ||
175 | break; | ||
176 | } | ||
177 | } else if (eventParm) | ||
178 | printk(KERN_ERR | ||
179 | "XmPciLpEvent_handler: Unrecognized PCI event type 0x%x\n", | ||
180 | (int)eventParm->xType); | ||
181 | else | ||
182 | printk(KERN_ERR "XmPciLpEvent_handler: NULL event received\n"); | ||
183 | #endif | ||
70 | } | 184 | } |
71 | 185 | ||
72 | /* | 186 | /* |
73 | * This is called out of iSeries_scan_slot to allocate an IRQ for an EADS slot | 187 | * This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c |
74 | * It calculates the irq value for the slot. | 188 | * It must be called before the bus walk. |
75 | * Note that subBusNumber is always 0 (at the moment at least). | ||
76 | */ | 189 | */ |
77 | int __init iSeries_allocate_IRQ(HvBusNumber busNumber, | 190 | void __init iSeries_init_IRQ(void) |
78 | HvSubBusNumber subBusNumber, HvAgentId deviceId) | ||
79 | { | 191 | { |
80 | unsigned int realirq, virtirq; | 192 | /* Register PCI event handler and open an event path */ |
81 | u8 idsel = (deviceId >> 4); | 193 | int xRc; |
82 | u8 function = deviceId & 7; | ||
83 | |||
84 | virtirq = next_virtual_irq++; | ||
85 | realirq = ((busNumber - 1) << 6) + ((idsel - 1) << 3) + function; | ||
86 | virt_irq_to_real_map[virtirq] = realirq; | ||
87 | 194 | ||
88 | irq_desc[virtirq].handler = &iSeries_IRQ_handler; | 195 | xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, |
89 | return virtirq; | 196 | &XmPciLpEvent_handler); |
197 | if (xRc == 0) { | ||
198 | xRc = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0); | ||
199 | if (xRc != 0) | ||
200 | printk(KERN_ERR "iSeries_init_IRQ: open event path " | ||
201 | "failed with rc 0x%x\n", xRc); | ||
202 | } else | ||
203 | printk(KERN_ERR "iSeries_init_IRQ: register handler " | ||
204 | "failed with rc 0x%x\n", xRc); | ||
90 | } | 205 | } |
91 | 206 | ||
92 | #define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1) | 207 | #define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1) |
93 | #define REAL_IRQ_TO_IDSEL(irq) ((((irq) >> 3) & 7) + 1) | 208 | #define REAL_IRQ_TO_IDSEL(irq) ((((irq) >> 3) & 7) + 1) |
94 | #define REAL_IRQ_TO_FUNC(irq) ((irq) & 7) | 209 | #define REAL_IRQ_TO_FUNC(irq) ((irq) & 7) |
95 | 210 | ||
211 | /* | ||
212 | * This will be called by device drivers (via enable_IRQ) | ||
213 | * to enable INTA in the bridge interrupt status register. | ||
214 | */ | ||
215 | static void iSeries_enable_IRQ(unsigned int irq) | ||
216 | { | ||
217 | u32 bus, deviceId, function, mask; | ||
218 | const u32 subBus = 0; | ||
219 | unsigned int rirq = virt_irq_to_real_map[irq]; | ||
220 | |||
221 | /* The IRQ has already been locked by the caller */ | ||
222 | bus = REAL_IRQ_TO_BUS(rirq); | ||
223 | function = REAL_IRQ_TO_FUNC(rirq); | ||
224 | deviceId = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function; | ||
225 | |||
226 | /* Unmask secondary INTA */ | ||
227 | mask = 0x80000000; | ||
228 | HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask); | ||
229 | PPCDBG(PPCDBG_BUSWALK, "iSeries_enable_IRQ 0x%02X.%02X.%02X 0x%04X\n", | ||
230 | bus, subBus, deviceId, irq); | ||
231 | } | ||
232 | |||
96 | /* This is called by iSeries_activate_IRQs */ | 233 | /* This is called by iSeries_activate_IRQs */ |
97 | static unsigned int iSeries_startup_IRQ(unsigned int irq) | 234 | static unsigned int iSeries_startup_IRQ(unsigned int irq) |
98 | { | 235 | { |
@@ -131,7 +268,7 @@ void __init iSeries_activate_IRQs() | |||
131 | desc->handler->startup(irq); | 268 | desc->handler->startup(irq); |
132 | spin_unlock_irqrestore(&desc->lock, flags); | 269 | spin_unlock_irqrestore(&desc->lock, flags); |
133 | } | 270 | } |
134 | } | 271 | } |
135 | } | 272 | } |
136 | 273 | ||
137 | /* this is not called anywhere currently */ | 274 | /* this is not called anywhere currently */ |
@@ -173,29 +310,7 @@ static void iSeries_disable_IRQ(unsigned int irq) | |||
173 | mask = 0x80000000; | 310 | mask = 0x80000000; |
174 | HvCallPci_maskInterrupts(bus, subBus, deviceId, mask); | 311 | HvCallPci_maskInterrupts(bus, subBus, deviceId, mask); |
175 | PPCDBG(PPCDBG_BUSWALK, "iSeries_disable_IRQ 0x%02X.%02X.%02X 0x%04X\n", | 312 | PPCDBG(PPCDBG_BUSWALK, "iSeries_disable_IRQ 0x%02X.%02X.%02X 0x%04X\n", |
176 | bus, subBus, deviceId, irq); | 313 | bus, subBus, deviceId, irq); |
177 | } | ||
178 | |||
179 | /* | ||
180 | * This will be called by device drivers (via enable_IRQ) | ||
181 | * to enable INTA in the bridge interrupt status register. | ||
182 | */ | ||
183 | static void iSeries_enable_IRQ(unsigned int irq) | ||
184 | { | ||
185 | u32 bus, deviceId, function, mask; | ||
186 | const u32 subBus = 0; | ||
187 | unsigned int rirq = virt_irq_to_real_map[irq]; | ||
188 | |||
189 | /* The IRQ has already been locked by the caller */ | ||
190 | bus = REAL_IRQ_TO_BUS(rirq); | ||
191 | function = REAL_IRQ_TO_FUNC(rirq); | ||
192 | deviceId = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function; | ||
193 | |||
194 | /* Unmask secondary INTA */ | ||
195 | mask = 0x80000000; | ||
196 | HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask); | ||
197 | PPCDBG(PPCDBG_BUSWALK, "iSeries_enable_IRQ 0x%02X.%02X.%02X 0x%04X\n", | ||
198 | bus, subBus, deviceId, irq); | ||
199 | } | 314 | } |
200 | 315 | ||
201 | /* | 316 | /* |
@@ -207,3 +322,32 @@ static void iSeries_enable_IRQ(unsigned int irq) | |||
207 | static void iSeries_end_IRQ(unsigned int irq) | 322 | static void iSeries_end_IRQ(unsigned int irq) |
208 | { | 323 | { |
209 | } | 324 | } |
325 | |||
326 | static hw_irq_controller iSeries_IRQ_handler = { | ||
327 | .typename = "iSeries irq controller", | ||
328 | .startup = iSeries_startup_IRQ, | ||
329 | .shutdown = iSeries_shutdown_IRQ, | ||
330 | .enable = iSeries_enable_IRQ, | ||
331 | .disable = iSeries_disable_IRQ, | ||
332 | .end = iSeries_end_IRQ | ||
333 | }; | ||
334 | |||
335 | /* | ||
336 | * This is called out of iSeries_scan_slot to allocate an IRQ for an EADS slot | ||
337 | * It calculates the irq value for the slot. | ||
338 | * Note that subBusNumber is always 0 (at the moment at least). | ||
339 | */ | ||
340 | int __init iSeries_allocate_IRQ(HvBusNumber busNumber, | ||
341 | HvSubBusNumber subBusNumber, HvAgentId deviceId) | ||
342 | { | ||
343 | unsigned int realirq, virtirq; | ||
344 | u8 idsel = (deviceId >> 4); | ||
345 | u8 function = deviceId & 7; | ||
346 | |||
347 | virtirq = next_virtual_irq++; | ||
348 | realirq = ((busNumber - 1) << 6) + ((idsel - 1) << 3) + function; | ||
349 | virt_irq_to_real_map[virtirq] = realirq; | ||
350 | |||
351 | irq_desc[virtirq].handler = &iSeries_IRQ_handler; | ||
352 | return virtirq; | ||
353 | } | ||
diff --git a/arch/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c index bd4c2554f1a0..356e4fd9a94f 100644 --- a/arch/ppc64/kernel/iSeries_pci.c +++ b/arch/ppc64/kernel/iSeries_pci.c | |||
@@ -38,9 +38,7 @@ | |||
38 | #include <asm/iommu.h> | 38 | #include <asm/iommu.h> |
39 | 39 | ||
40 | #include <asm/iSeries/HvCallPci.h> | 40 | #include <asm/iSeries/HvCallPci.h> |
41 | #include <asm/iSeries/HvCallSm.h> | ||
42 | #include <asm/iSeries/HvCallXm.h> | 41 | #include <asm/iSeries/HvCallXm.h> |
43 | #include <asm/iSeries/LparData.h> | ||
44 | #include <asm/iSeries/iSeries_irq.h> | 42 | #include <asm/iSeries/iSeries_irq.h> |
45 | #include <asm/iSeries/iSeries_pci.h> | 43 | #include <asm/iSeries/iSeries_pci.h> |
46 | #include <asm/iSeries/mf.h> | 44 | #include <asm/iSeries/mf.h> |
@@ -225,10 +223,7 @@ static struct iSeries_Device_Node *build_device_node(HvBusNumber Bus, | |||
225 | node->DsaAddr.Dsa.busNumber = Bus; | 223 | node->DsaAddr.Dsa.busNumber = Bus; |
226 | node->DsaAddr.Dsa.subBusNumber = SubBus; | 224 | node->DsaAddr.Dsa.subBusNumber = SubBus; |
227 | node->DsaAddr.Dsa.deviceId = 0x10; | 225 | node->DsaAddr.Dsa.deviceId = 0x10; |
228 | node->AgentId = AgentId; | ||
229 | node->DevFn = PCI_DEVFN(ISERIES_ENCODE_DEVICE(AgentId), Function); | 226 | node->DevFn = PCI_DEVFN(ISERIES_ENCODE_DEVICE(AgentId), Function); |
230 | node->IoRetry = 0; | ||
231 | iSeries_Get_Location_Code(node); | ||
232 | return node; | 227 | return node; |
233 | } | 228 | } |
234 | 229 | ||
@@ -302,7 +297,6 @@ void __init iSeries_pci_final_fixup(void) | |||
302 | { | 297 | { |
303 | struct pci_dev *pdev = NULL; | 298 | struct pci_dev *pdev = NULL; |
304 | struct iSeries_Device_Node *node; | 299 | struct iSeries_Device_Node *node; |
305 | char Buffer[256]; | ||
306 | int DeviceCount = 0; | 300 | int DeviceCount = 0; |
307 | 301 | ||
308 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n"); | 302 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n"); |
@@ -324,9 +318,7 @@ void __init iSeries_pci_final_fixup(void) | |||
324 | "pdev 0x%p <==> DevNode 0x%p\n", | 318 | "pdev 0x%p <==> DevNode 0x%p\n", |
325 | pdev, node); | 319 | pdev, node); |
326 | allocate_device_bars(pdev); | 320 | allocate_device_bars(pdev); |
327 | iSeries_Device_Information(pdev, Buffer, | 321 | iSeries_Device_Information(pdev, DeviceCount); |
328 | sizeof(Buffer)); | ||
329 | printk("%d. %s\n", DeviceCount, Buffer); | ||
330 | iommu_devnode_init_iSeries(node); | 322 | iommu_devnode_init_iSeries(node); |
331 | } else | 323 | } else |
332 | printk("PCI: Device Tree not found for 0x%016lX\n", | 324 | printk("PCI: Device Tree not found for 0x%016lX\n", |
@@ -499,7 +491,6 @@ static int scan_bridge_slot(HvBusNumber Bus, | |||
499 | 491 | ||
500 | ++DeviceCount; | 492 | ++DeviceCount; |
501 | node = build_device_node(Bus, SubBus, EADsIdSel, Function); | 493 | node = build_device_node(Bus, SubBus, EADsIdSel, Function); |
502 | node->Vendor = VendorId; | ||
503 | node->Irq = Irq; | 494 | node->Irq = Irq; |
504 | node->LogicalSlot = BridgeInfo->logicalSlotNumber; | 495 | node->LogicalSlot = BridgeInfo->logicalSlotNumber; |
505 | 496 | ||
@@ -661,38 +652,34 @@ static struct pci_ops iSeries_pci_ops = { | |||
661 | * Check Return Code | 652 | * Check Return Code |
662 | * -> On Failure, print and log information. | 653 | * -> On Failure, print and log information. |
663 | * Increment Retry Count, if exceeds max, panic partition. | 654 | * Increment Retry Count, if exceeds max, panic partition. |
664 | * -> If in retry, print and log success | ||
665 | * | 655 | * |
666 | * PCI: Device 23.90 ReadL I/O Error( 0): 0x1234 | 656 | * PCI: Device 23.90 ReadL I/O Error( 0): 0x1234 |
667 | * PCI: Device 23.90 ReadL Retry( 1) | 657 | * PCI: Device 23.90 ReadL Retry( 1) |
668 | * PCI: Device 23.90 ReadL Retry Successful(1) | 658 | * PCI: Device 23.90 ReadL Retry Successful(1) |
669 | */ | 659 | */ |
670 | static int CheckReturnCode(char *TextHdr, struct iSeries_Device_Node *DevNode, | 660 | static int CheckReturnCode(char *TextHdr, struct iSeries_Device_Node *DevNode, |
671 | u64 ret) | 661 | int *retry, u64 ret) |
672 | { | 662 | { |
673 | if (ret != 0) { | 663 | if (ret != 0) { |
674 | ++Pci_Error_Count; | 664 | ++Pci_Error_Count; |
675 | ++DevNode->IoRetry; | 665 | (*retry)++; |
676 | printk("PCI: %s: Device 0x%04X:%02X I/O Error(%2d): 0x%04X\n", | 666 | printk("PCI: %s: Device 0x%04X:%02X I/O Error(%2d): 0x%04X\n", |
677 | TextHdr, DevNode->DsaAddr.Dsa.busNumber, DevNode->DevFn, | 667 | TextHdr, DevNode->DsaAddr.Dsa.busNumber, DevNode->DevFn, |
678 | DevNode->IoRetry, (int)ret); | 668 | *retry, (int)ret); |
679 | /* | 669 | /* |
680 | * Bump the retry and check for retry count exceeded. | 670 | * Bump the retry and check for retry count exceeded. |
681 | * If, Exceeded, panic the system. | 671 | * If, Exceeded, panic the system. |
682 | */ | 672 | */ |
683 | if ((DevNode->IoRetry > Pci_Retry_Max) && | 673 | if (((*retry) > Pci_Retry_Max) && |
684 | (Pci_Error_Flag > 0)) { | 674 | (Pci_Error_Flag > 0)) { |
685 | mf_display_src(0xB6000103); | 675 | mf_display_src(0xB6000103); |
686 | panic_timeout = 0; | 676 | panic_timeout = 0; |
687 | panic("PCI: Hardware I/O Error, SRC B6000103, " | 677 | panic("PCI: Hardware I/O Error, SRC B6000103, " |
688 | "Automatic Reboot Disabled.\n"); | 678 | "Automatic Reboot Disabled.\n"); |
689 | } | 679 | } |
690 | return -1; /* Retry Try */ | 680 | return -1; /* Retry Try */ |
691 | } | 681 | } |
692 | /* If retry was in progress, log success and rest retry count */ | 682 | return 0; |
693 | if (DevNode->IoRetry > 0) | ||
694 | DevNode->IoRetry = 0; | ||
695 | return 0; | ||
696 | } | 683 | } |
697 | 684 | ||
698 | /* | 685 | /* |
@@ -738,6 +725,7 @@ u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress) | |||
738 | { | 725 | { |
739 | u64 BarOffset; | 726 | u64 BarOffset; |
740 | u64 dsa; | 727 | u64 dsa; |
728 | int retry = 0; | ||
741 | struct HvCallPci_LoadReturn ret; | 729 | struct HvCallPci_LoadReturn ret; |
742 | struct iSeries_Device_Node *DevNode = | 730 | struct iSeries_Device_Node *DevNode = |
743 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); | 731 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); |
@@ -757,7 +745,7 @@ u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress) | |||
757 | do { | 745 | do { |
758 | ++Pci_Io_Read_Count; | 746 | ++Pci_Io_Read_Count; |
759 | HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, BarOffset, 0); | 747 | HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, BarOffset, 0); |
760 | } while (CheckReturnCode("RDB", DevNode, ret.rc) != 0); | 748 | } while (CheckReturnCode("RDB", DevNode, &retry, ret.rc) != 0); |
761 | 749 | ||
762 | return (u8)ret.value; | 750 | return (u8)ret.value; |
763 | } | 751 | } |
@@ -767,6 +755,7 @@ u16 iSeries_Read_Word(const volatile void __iomem *IoAddress) | |||
767 | { | 755 | { |
768 | u64 BarOffset; | 756 | u64 BarOffset; |
769 | u64 dsa; | 757 | u64 dsa; |
758 | int retry = 0; | ||
770 | struct HvCallPci_LoadReturn ret; | 759 | struct HvCallPci_LoadReturn ret; |
771 | struct iSeries_Device_Node *DevNode = | 760 | struct iSeries_Device_Node *DevNode = |
772 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); | 761 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); |
@@ -787,7 +776,7 @@ u16 iSeries_Read_Word(const volatile void __iomem *IoAddress) | |||
787 | ++Pci_Io_Read_Count; | 776 | ++Pci_Io_Read_Count; |
788 | HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa, | 777 | HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa, |
789 | BarOffset, 0); | 778 | BarOffset, 0); |
790 | } while (CheckReturnCode("RDW", DevNode, ret.rc) != 0); | 779 | } while (CheckReturnCode("RDW", DevNode, &retry, ret.rc) != 0); |
791 | 780 | ||
792 | return swab16((u16)ret.value); | 781 | return swab16((u16)ret.value); |
793 | } | 782 | } |
@@ -797,6 +786,7 @@ u32 iSeries_Read_Long(const volatile void __iomem *IoAddress) | |||
797 | { | 786 | { |
798 | u64 BarOffset; | 787 | u64 BarOffset; |
799 | u64 dsa; | 788 | u64 dsa; |
789 | int retry = 0; | ||
800 | struct HvCallPci_LoadReturn ret; | 790 | struct HvCallPci_LoadReturn ret; |
801 | struct iSeries_Device_Node *DevNode = | 791 | struct iSeries_Device_Node *DevNode = |
802 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); | 792 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); |
@@ -817,7 +807,7 @@ u32 iSeries_Read_Long(const volatile void __iomem *IoAddress) | |||
817 | ++Pci_Io_Read_Count; | 807 | ++Pci_Io_Read_Count; |
818 | HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa, | 808 | HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa, |
819 | BarOffset, 0); | 809 | BarOffset, 0); |
820 | } while (CheckReturnCode("RDL", DevNode, ret.rc) != 0); | 810 | } while (CheckReturnCode("RDL", DevNode, &retry, ret.rc) != 0); |
821 | 811 | ||
822 | return swab32((u32)ret.value); | 812 | return swab32((u32)ret.value); |
823 | } | 813 | } |
@@ -834,6 +824,7 @@ void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress) | |||
834 | { | 824 | { |
835 | u64 BarOffset; | 825 | u64 BarOffset; |
836 | u64 dsa; | 826 | u64 dsa; |
827 | int retry = 0; | ||
837 | u64 rc; | 828 | u64 rc; |
838 | struct iSeries_Device_Node *DevNode = | 829 | struct iSeries_Device_Node *DevNode = |
839 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); | 830 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); |
@@ -853,7 +844,7 @@ void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress) | |||
853 | do { | 844 | do { |
854 | ++Pci_Io_Write_Count; | 845 | ++Pci_Io_Write_Count; |
855 | rc = HvCall4(HvCallPciBarStore8, dsa, BarOffset, data, 0); | 846 | rc = HvCall4(HvCallPciBarStore8, dsa, BarOffset, data, 0); |
856 | } while (CheckReturnCode("WWB", DevNode, rc) != 0); | 847 | } while (CheckReturnCode("WWB", DevNode, &retry, rc) != 0); |
857 | } | 848 | } |
858 | EXPORT_SYMBOL(iSeries_Write_Byte); | 849 | EXPORT_SYMBOL(iSeries_Write_Byte); |
859 | 850 | ||
@@ -861,6 +852,7 @@ void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress) | |||
861 | { | 852 | { |
862 | u64 BarOffset; | 853 | u64 BarOffset; |
863 | u64 dsa; | 854 | u64 dsa; |
855 | int retry = 0; | ||
864 | u64 rc; | 856 | u64 rc; |
865 | struct iSeries_Device_Node *DevNode = | 857 | struct iSeries_Device_Node *DevNode = |
866 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); | 858 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); |
@@ -880,7 +872,7 @@ void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress) | |||
880 | do { | 872 | do { |
881 | ++Pci_Io_Write_Count; | 873 | ++Pci_Io_Write_Count; |
882 | rc = HvCall4(HvCallPciBarStore16, dsa, BarOffset, swab16(data), 0); | 874 | rc = HvCall4(HvCallPciBarStore16, dsa, BarOffset, swab16(data), 0); |
883 | } while (CheckReturnCode("WWW", DevNode, rc) != 0); | 875 | } while (CheckReturnCode("WWW", DevNode, &retry, rc) != 0); |
884 | } | 876 | } |
885 | EXPORT_SYMBOL(iSeries_Write_Word); | 877 | EXPORT_SYMBOL(iSeries_Write_Word); |
886 | 878 | ||
@@ -888,6 +880,7 @@ void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress) | |||
888 | { | 880 | { |
889 | u64 BarOffset; | 881 | u64 BarOffset; |
890 | u64 dsa; | 882 | u64 dsa; |
883 | int retry = 0; | ||
891 | u64 rc; | 884 | u64 rc; |
892 | struct iSeries_Device_Node *DevNode = | 885 | struct iSeries_Device_Node *DevNode = |
893 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); | 886 | xlate_iomm_address(IoAddress, &dsa, &BarOffset); |
@@ -907,6 +900,6 @@ void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress) | |||
907 | do { | 900 | do { |
908 | ++Pci_Io_Write_Count; | 901 | ++Pci_Io_Write_Count; |
909 | rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, swab32(data), 0); | 902 | rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, swab32(data), 0); |
910 | } while (CheckReturnCode("WWL", DevNode, rc) != 0); | 903 | } while (CheckReturnCode("WWL", DevNode, &retry, rc) != 0); |
911 | } | 904 | } |
912 | EXPORT_SYMBOL(iSeries_Write_Long); | 905 | EXPORT_SYMBOL(iSeries_Write_Long); |
diff --git a/arch/ppc64/kernel/iSeries_pci_reset.c b/arch/ppc64/kernel/iSeries_pci_reset.c deleted file mode 100644 index 0f785e4584f7..000000000000 --- a/arch/ppc64/kernel/iSeries_pci_reset.c +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | #define PCIFR(...) | ||
2 | /************************************************************************/ | ||
3 | /* File iSeries_pci_reset.c created by Allan Trautman on Mar 21 2001. */ | ||
4 | /************************************************************************/ | ||
5 | /* This code supports the pci interface on the IBM iSeries systems. */ | ||
6 | /* Copyright (C) 20yy <Allan H Trautman> <IBM Corp> */ | ||
7 | /* */ | ||
8 | /* This program is free software; you can redistribute it and/or modify */ | ||
9 | /* it under the terms of the GNU General Public License as published by */ | ||
10 | /* the Free Software Foundation; either version 2 of the License, or */ | ||
11 | /* (at your option) any later version. */ | ||
12 | /* */ | ||
13 | /* This program is distributed in the hope that it will be useful, */ | ||
14 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ | ||
15 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ | ||
16 | /* GNU General Public License for more details. */ | ||
17 | /* */ | ||
18 | /* You should have received a copy of the GNU General Public License */ | ||
19 | /* along with this program; if not, write to the: */ | ||
20 | /* Free Software Foundation, Inc., */ | ||
21 | /* 59 Temple Place, Suite 330, */ | ||
22 | /* Boston, MA 02111-1307 USA */ | ||
23 | /************************************************************************/ | ||
24 | /* Change Activity: */ | ||
25 | /* Created, March 20, 2001 */ | ||
26 | /* April 30, 2001, Added return codes on functions. */ | ||
27 | /* September 10, 2001, Ported to ppc64. */ | ||
28 | /* End Change Activity */ | ||
29 | /************************************************************************/ | ||
30 | #include <linux/kernel.h> | ||
31 | #include <linux/init.h> | ||
32 | #include <linux/module.h> | ||
33 | #include <linux/pci.h> | ||
34 | #include <linux/irq.h> | ||
35 | #include <linux/delay.h> | ||
36 | |||
37 | #include <asm/io.h> | ||
38 | #include <asm/iSeries/HvCallPci.h> | ||
39 | #include <asm/iSeries/HvTypes.h> | ||
40 | #include <asm/iSeries/mf.h> | ||
41 | #include <asm/pci.h> | ||
42 | |||
43 | #include <asm/iSeries/iSeries_pci.h> | ||
44 | #include "pci.h" | ||
45 | |||
46 | /* | ||
47 | * Interface to toggle the reset line | ||
48 | * Time is in .1 seconds, need for seconds. | ||
49 | */ | ||
50 | int iSeries_Device_ToggleReset(struct pci_dev *PciDev, int AssertTime, | ||
51 | int DelayTime) | ||
52 | { | ||
53 | unsigned int AssertDelay, WaitDelay; | ||
54 | struct iSeries_Device_Node *DeviceNode = | ||
55 | (struct iSeries_Device_Node *)PciDev->sysdata; | ||
56 | |||
57 | if (DeviceNode == NULL) { | ||
58 | printk("PCI: Pci Reset Failed, Device Node not found for pci_dev %p\n", | ||
59 | PciDev); | ||
60 | return -1; | ||
61 | } | ||
62 | /* | ||
63 | * Set defaults, Assert is .5 second, Wait is 3 seconds. | ||
64 | */ | ||
65 | if (AssertTime == 0) | ||
66 | AssertDelay = 500; | ||
67 | else | ||
68 | AssertDelay = AssertTime * 100; | ||
69 | |||
70 | if (DelayTime == 0) | ||
71 | WaitDelay = 3000; | ||
72 | else | ||
73 | WaitDelay = DelayTime * 100; | ||
74 | |||
75 | /* | ||
76 | * Assert reset | ||
77 | */ | ||
78 | DeviceNode->ReturnCode = HvCallPci_setSlotReset(ISERIES_BUS(DeviceNode), | ||
79 | 0x00, DeviceNode->AgentId, 1); | ||
80 | if (DeviceNode->ReturnCode == 0) { | ||
81 | msleep(AssertDelay); /* Sleep for the time */ | ||
82 | DeviceNode->ReturnCode = | ||
83 | HvCallPci_setSlotReset(ISERIES_BUS(DeviceNode), | ||
84 | 0x00, DeviceNode->AgentId, 0); | ||
85 | |||
86 | /* | ||
87 | * Wait for device to reset | ||
88 | */ | ||
89 | msleep(WaitDelay); | ||
90 | } | ||
91 | if (DeviceNode->ReturnCode == 0) | ||
92 | PCIFR("Slot 0x%04X.%02 Reset\n", ISERIES_BUS(DeviceNode), | ||
93 | DeviceNode->AgentId); | ||
94 | else { | ||
95 | printk("PCI: Slot 0x%04X.%02X Reset Failed, RCode: %04X\n", | ||
96 | ISERIES_BUS(DeviceNode), DeviceNode->AgentId, | ||
97 | DeviceNode->ReturnCode); | ||
98 | PCIFR("Slot 0x%04X.%02X Reset Failed, RCode: %04X\n", | ||
99 | ISERIES_BUS(DeviceNode), DeviceNode->AgentId, | ||
100 | DeviceNode->ReturnCode); | ||
101 | } | ||
102 | return DeviceNode->ReturnCode; | ||
103 | } | ||
104 | EXPORT_SYMBOL(iSeries_Device_ToggleReset); | ||
diff --git a/arch/ppc64/kernel/iSeries_proc.c b/arch/ppc64/kernel/iSeries_proc.c index 0cc58ddf48de..356bd9931fcc 100644 --- a/arch/ppc64/kernel/iSeries_proc.c +++ b/arch/ppc64/kernel/iSeries_proc.c | |||
@@ -28,8 +28,7 @@ | |||
28 | #include <asm/iSeries/ItLpQueue.h> | 28 | #include <asm/iSeries/ItLpQueue.h> |
29 | #include <asm/iSeries/HvCallXm.h> | 29 | #include <asm/iSeries/HvCallXm.h> |
30 | #include <asm/iSeries/IoHriMainStore.h> | 30 | #include <asm/iSeries/IoHriMainStore.h> |
31 | #include <asm/iSeries/LparData.h> | 31 | #include <asm/iSeries/IoHriProcessorVpd.h> |
32 | #include <asm/iSeries/iSeries_proc.h> | ||
33 | 32 | ||
34 | static int __init iseries_proc_create(void) | 33 | static int __init iseries_proc_create(void) |
35 | { | 34 | { |
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c index 6d06eb550a3f..b31962436fe3 100644 --- a/arch/ppc64/kernel/iSeries_setup.c +++ b/arch/ppc64/kernel/iSeries_setup.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <asm/paca.h> | 47 | #include <asm/paca.h> |
48 | #include <asm/cache.h> | 48 | #include <asm/cache.h> |
49 | #include <asm/sections.h> | 49 | #include <asm/sections.h> |
50 | #include <asm/iSeries/LparData.h> | 50 | #include <asm/abs_addr.h> |
51 | #include <asm/iSeries/HvCallHpt.h> | 51 | #include <asm/iSeries/HvCallHpt.h> |
52 | #include <asm/iSeries/HvLpConfig.h> | 52 | #include <asm/iSeries/HvLpConfig.h> |
53 | #include <asm/iSeries/HvCallEvent.h> | 53 | #include <asm/iSeries/HvCallEvent.h> |
@@ -55,10 +55,12 @@ | |||
55 | #include <asm/iSeries/HvCallXm.h> | 55 | #include <asm/iSeries/HvCallXm.h> |
56 | #include <asm/iSeries/ItLpQueue.h> | 56 | #include <asm/iSeries/ItLpQueue.h> |
57 | #include <asm/iSeries/IoHriMainStore.h> | 57 | #include <asm/iSeries/IoHriMainStore.h> |
58 | #include <asm/iSeries/iSeries_proc.h> | ||
59 | #include <asm/iSeries/mf.h> | 58 | #include <asm/iSeries/mf.h> |
60 | #include <asm/iSeries/HvLpEvent.h> | 59 | #include <asm/iSeries/HvLpEvent.h> |
61 | #include <asm/iSeries/iSeries_irq.h> | 60 | #include <asm/iSeries/iSeries_irq.h> |
61 | #include <asm/iSeries/IoHriProcessorVpd.h> | ||
62 | #include <asm/iSeries/ItVpdAreas.h> | ||
63 | #include <asm/iSeries/LparMap.h> | ||
62 | 64 | ||
63 | extern void hvlog(char *fmt, ...); | 65 | extern void hvlog(char *fmt, ...); |
64 | 66 | ||
@@ -74,7 +76,11 @@ extern void ppcdbg_initialize(void); | |||
74 | static void build_iSeries_Memory_Map(void); | 76 | static void build_iSeries_Memory_Map(void); |
75 | static void setup_iSeries_cache_sizes(void); | 77 | static void setup_iSeries_cache_sizes(void); |
76 | static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr); | 78 | static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr); |
79 | #ifdef CONFIG_PCI | ||
77 | extern void iSeries_pci_final_fixup(void); | 80 | extern void iSeries_pci_final_fixup(void); |
81 | #else | ||
82 | static void iSeries_pci_final_fixup(void) { } | ||
83 | #endif | ||
78 | 84 | ||
79 | /* Global Variables */ | 85 | /* Global Variables */ |
80 | static unsigned long procFreqHz; | 86 | static unsigned long procFreqHz; |
@@ -874,6 +880,10 @@ static int set_spread_lpevents(char *str) | |||
874 | } | 880 | } |
875 | __setup("spread_lpevents=", set_spread_lpevents); | 881 | __setup("spread_lpevents=", set_spread_lpevents); |
876 | 882 | ||
883 | #ifndef CONFIG_PCI | ||
884 | void __init iSeries_init_IRQ(void) { } | ||
885 | #endif | ||
886 | |||
877 | void __init iSeries_early_setup(void) | 887 | void __init iSeries_early_setup(void) |
878 | { | 888 | { |
879 | iSeries_fixup_klimit(); | 889 | iSeries_fixup_klimit(); |
diff --git a/arch/ppc64/kernel/iSeries_smp.c b/arch/ppc64/kernel/iSeries_smp.c index ba1f084d5462..f74386e31638 100644 --- a/arch/ppc64/kernel/iSeries_smp.c +++ b/arch/ppc64/kernel/iSeries_smp.c | |||
@@ -38,9 +38,7 @@ | |||
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/smp.h> | 39 | #include <asm/smp.h> |
40 | #include <asm/paca.h> | 40 | #include <asm/paca.h> |
41 | #include <asm/iSeries/LparData.h> | ||
42 | #include <asm/iSeries/HvCall.h> | 41 | #include <asm/iSeries/HvCall.h> |
43 | #include <asm/iSeries/HvCallCfg.h> | ||
44 | #include <asm/time.h> | 42 | #include <asm/time.h> |
45 | #include <asm/ppcdebug.h> | 43 | #include <asm/ppcdebug.h> |
46 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
diff --git a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c index f24ce2b87200..bdf13b4dc1c8 100644 --- a/arch/ppc64/kernel/idle.c +++ b/arch/ppc64/kernel/idle.c | |||
@@ -42,6 +42,11 @@ static int (*idle_loop)(void); | |||
42 | static unsigned long maxYieldTime = 0; | 42 | static unsigned long maxYieldTime = 0; |
43 | static unsigned long minYieldTime = 0xffffffffffffffffUL; | 43 | static unsigned long minYieldTime = 0xffffffffffffffffUL; |
44 | 44 | ||
45 | static inline void process_iSeries_events(void) | ||
46 | { | ||
47 | asm volatile ("li 0,0x5555; sc" : : : "r0", "r3"); | ||
48 | } | ||
49 | |||
45 | static void yield_shared_processor(void) | 50 | static void yield_shared_processor(void) |
46 | { | 51 | { |
47 | unsigned long tb; | 52 | unsigned long tb; |
@@ -292,7 +297,7 @@ static int native_idle(void) | |||
292 | if (need_resched()) | 297 | if (need_resched()) |
293 | schedule(); | 298 | schedule(); |
294 | 299 | ||
295 | if (cpu_is_offline(_smp_processor_id()) && | 300 | if (cpu_is_offline(raw_smp_processor_id()) && |
296 | system_state == SYSTEM_RUNNING) | 301 | system_state == SYSTEM_RUNNING) |
297 | cpu_die(); | 302 | cpu_die(); |
298 | } | 303 | } |
diff --git a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c index 4fd7f203c1e3..d860467b8f09 100644 --- a/arch/ppc64/kernel/irq.c +++ b/arch/ppc64/kernel/irq.c | |||
@@ -52,7 +52,7 @@ | |||
52 | #include <asm/cache.h> | 52 | #include <asm/cache.h> |
53 | #include <asm/prom.h> | 53 | #include <asm/prom.h> |
54 | #include <asm/ptrace.h> | 54 | #include <asm/ptrace.h> |
55 | #include <asm/iSeries/LparData.h> | 55 | #include <asm/iSeries/ItLpQueue.h> |
56 | #include <asm/machdep.h> | 56 | #include <asm/machdep.h> |
57 | #include <asm/paca.h> | 57 | #include <asm/paca.h> |
58 | 58 | ||
diff --git a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c index a8fd32df848b..387923fcf9b0 100644 --- a/arch/ppc64/kernel/lparcfg.c +++ b/arch/ppc64/kernel/lparcfg.c | |||
@@ -28,12 +28,12 @@ | |||
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/iSeries/HvLpConfig.h> | 29 | #include <asm/iSeries/HvLpConfig.h> |
30 | #include <asm/lppaca.h> | 30 | #include <asm/lppaca.h> |
31 | #include <asm/iSeries/LparData.h> | ||
32 | #include <asm/hvcall.h> | 31 | #include <asm/hvcall.h> |
33 | #include <asm/cputable.h> | 32 | #include <asm/cputable.h> |
34 | #include <asm/rtas.h> | 33 | #include <asm/rtas.h> |
35 | #include <asm/system.h> | 34 | #include <asm/system.h> |
36 | #include <asm/time.h> | 35 | #include <asm/time.h> |
36 | #include <asm/iSeries/ItExtVpdPanel.h> | ||
37 | 37 | ||
38 | #define MODULE_VERS "1.6" | 38 | #define MODULE_VERS "1.6" |
39 | #define MODULE_NAME "lparcfg" | 39 | #define MODULE_NAME "lparcfg" |
diff --git a/arch/ppc64/kernel/mf.c b/arch/ppc64/kernel/mf.c index 5aca7e8005a8..d98bebf7042f 100644 --- a/arch/ppc64/kernel/mf.c +++ b/arch/ppc64/kernel/mf.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <asm/iSeries/vio.h> | 40 | #include <asm/iSeries/vio.h> |
41 | #include <asm/iSeries/mf.h> | 41 | #include <asm/iSeries/mf.h> |
42 | #include <asm/iSeries/HvLpConfig.h> | 42 | #include <asm/iSeries/HvLpConfig.h> |
43 | #include <asm/iSeries/ItSpCommArea.h> | ||
44 | #include <asm/iSeries/ItLpQueue.h> | 43 | #include <asm/iSeries/ItLpQueue.h> |
45 | 44 | ||
46 | /* | 45 | /* |
diff --git a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c index cdfecbeb331f..aba89554d89d 100644 --- a/arch/ppc64/kernel/process.c +++ b/arch/ppc64/kernel/process.c | |||
@@ -58,14 +58,6 @@ struct task_struct *last_task_used_math = NULL; | |||
58 | struct task_struct *last_task_used_altivec = NULL; | 58 | struct task_struct *last_task_used_altivec = NULL; |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | struct mm_struct ioremap_mm = { | ||
62 | .pgd = ioremap_dir, | ||
63 | .mm_users = ATOMIC_INIT(2), | ||
64 | .mm_count = ATOMIC_INIT(1), | ||
65 | .cpu_vm_mask = CPU_MASK_ALL, | ||
66 | .page_table_lock = SPIN_LOCK_UNLOCKED, | ||
67 | }; | ||
68 | |||
69 | /* | 61 | /* |
70 | * Make sure the floating-point register state in the | 62 | * Make sure the floating-point register state in the |
71 | * the thread_struct is up to date for task tsk. | 63 | * the thread_struct is up to date for task tsk. |
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index eb6538b58008..47727a6f7346 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c | |||
@@ -884,6 +884,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
884 | { | 884 | { |
885 | char *type = get_flat_dt_prop(node, "device_type", NULL); | 885 | char *type = get_flat_dt_prop(node, "device_type", NULL); |
886 | u32 *prop; | 886 | u32 *prop; |
887 | unsigned long size; | ||
887 | 888 | ||
888 | /* We are scanning "cpu" nodes only */ | 889 | /* We are scanning "cpu" nodes only */ |
889 | if (type == NULL || strcmp(type, "cpu") != 0) | 890 | if (type == NULL || strcmp(type, "cpu") != 0) |
@@ -929,6 +930,17 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
929 | cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; | 930 | cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; |
930 | } | 931 | } |
931 | 932 | ||
933 | /* | ||
934 | * Check for an SMT capable CPU and set the CPU feature. We do | ||
935 | * this by looking at the size of the ibm,ppc-interrupt-server#s | ||
936 | * property | ||
937 | */ | ||
938 | prop = (u32 *)get_flat_dt_prop(node, "ibm,ppc-interrupt-server#s", | ||
939 | &size); | ||
940 | cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT; | ||
941 | if (prop && ((size / sizeof(u32)) > 1)) | ||
942 | cur_cpu_spec->cpu_features |= CPU_FTR_SMT; | ||
943 | |||
932 | return 0; | 944 | return 0; |
933 | } | 945 | } |
934 | 946 | ||
diff --git a/arch/ppc64/kernel/ras.c b/arch/ppc64/kernel/ras.c index 1c4c796b212b..3c00f7bfc1b5 100644 --- a/arch/ppc64/kernel/ras.c +++ b/arch/ppc64/kernel/ras.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <asm/cache.h> | 47 | #include <asm/cache.h> |
48 | #include <asm/prom.h> | 48 | #include <asm/prom.h> |
49 | #include <asm/ptrace.h> | 49 | #include <asm/ptrace.h> |
50 | #include <asm/iSeries/LparData.h> | ||
51 | #include <asm/machdep.h> | 50 | #include <asm/machdep.h> |
52 | #include <asm/rtas.h> | 51 | #include <asm/rtas.h> |
53 | #include <asm/ppcdebug.h> | 52 | #include <asm/ppcdebug.h> |
diff --git a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c index 67989055a9fe..de02aedbe080 100644 --- a/arch/ppc64/kernel/rtc.c +++ b/arch/ppc64/kernel/rtc.c | |||
@@ -42,10 +42,8 @@ | |||
42 | #include <asm/time.h> | 42 | #include <asm/time.h> |
43 | #include <asm/rtas.h> | 43 | #include <asm/rtas.h> |
44 | 44 | ||
45 | #include <asm/iSeries/LparData.h> | ||
46 | #include <asm/iSeries/mf.h> | 45 | #include <asm/iSeries/mf.h> |
47 | #include <asm/machdep.h> | 46 | #include <asm/machdep.h> |
48 | #include <asm/iSeries/ItSpCommArea.h> | ||
49 | 47 | ||
50 | extern int piranha_simulator; | 48 | extern int piranha_simulator; |
51 | 49 | ||
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index dce198d39328..8e439a817642 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/smp.h> | 41 | #include <asm/smp.h> |
42 | #include <asm/elf.h> | 42 | #include <asm/elf.h> |
43 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
44 | #include <asm/iSeries/LparData.h> | ||
45 | #include <asm/paca.h> | 44 | #include <asm/paca.h> |
46 | #include <asm/ppcdebug.h> | 45 | #include <asm/ppcdebug.h> |
47 | #include <asm/time.h> | 46 | #include <asm/time.h> |
@@ -57,6 +56,8 @@ | |||
57 | #include <asm/cache.h> | 56 | #include <asm/cache.h> |
58 | #include <asm/page.h> | 57 | #include <asm/page.h> |
59 | #include <asm/mmu.h> | 58 | #include <asm/mmu.h> |
59 | #include <asm/lmb.h> | ||
60 | #include <asm/iSeries/ItLpNaca.h> | ||
60 | 61 | ||
61 | #ifdef DEBUG | 62 | #ifdef DEBUG |
62 | #define DBG(fmt...) udbg_printf(fmt) | 63 | #define DBG(fmt...) udbg_printf(fmt) |
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c index 9c8e317c598d..118436e8085a 100644 --- a/arch/ppc64/kernel/sys_ppc32.c +++ b/arch/ppc64/kernel/sys_ppc32.c | |||
@@ -741,6 +741,7 @@ asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubu | |||
741 | 741 | ||
742 | asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) | 742 | asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) |
743 | { | 743 | { |
744 | #ifdef CONFIG_PCI | ||
744 | struct pci_controller* hose; | 745 | struct pci_controller* hose; |
745 | struct list_head *ln; | 746 | struct list_head *ln; |
746 | struct pci_bus *bus = NULL; | 747 | struct pci_bus *bus = NULL; |
@@ -786,7 +787,7 @@ asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) | |||
786 | case IOBASE_ISA_MEM: | 787 | case IOBASE_ISA_MEM: |
787 | return -EINVAL; | 788 | return -EINVAL; |
788 | } | 789 | } |
789 | 790 | #endif /* CONFIG_PCI */ | |
790 | return -EOPNOTSUPP; | 791 | return -EOPNOTSUPP; |
791 | } | 792 | } |
792 | 793 | ||
diff --git a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c index 79f2dc7a9833..0c0ba71ac0e8 100644 --- a/arch/ppc64/kernel/vio.c +++ b/arch/ppc64/kernel/vio.c | |||
@@ -41,20 +41,25 @@ static const struct vio_device_id *vio_match_device( | |||
41 | static struct iommu_table *vio_build_iommu_table(struct vio_dev *); | 41 | static struct iommu_table *vio_build_iommu_table(struct vio_dev *); |
42 | static int vio_num_address_cells; | 42 | static int vio_num_address_cells; |
43 | #endif | 43 | #endif |
44 | static struct vio_dev *vio_bus_device; /* fake "parent" device */ | ||
45 | |||
46 | #ifdef CONFIG_PPC_ISERIES | 44 | #ifdef CONFIG_PPC_ISERIES |
47 | static struct vio_dev *__init vio_register_device_iseries(char *type, | ||
48 | uint32_t unit_num); | ||
49 | |||
50 | static struct iommu_table veth_iommu_table; | 45 | static struct iommu_table veth_iommu_table; |
51 | static struct iommu_table vio_iommu_table; | 46 | static struct iommu_table vio_iommu_table; |
52 | 47 | #endif | |
53 | static struct vio_dev _vio_dev = { | 48 | static struct vio_dev vio_bus_device = { /* fake "parent" device */ |
49 | .name = vio_bus_device.dev.bus_id, | ||
50 | .type = "", | ||
51 | #ifdef CONFIG_PPC_ISERIES | ||
54 | .iommu_table = &vio_iommu_table, | 52 | .iommu_table = &vio_iommu_table, |
55 | .dev.bus = &vio_bus_type | 53 | #endif |
54 | .dev.bus_id = "vio", | ||
55 | .dev.bus = &vio_bus_type, | ||
56 | }; | 56 | }; |
57 | struct device *iSeries_vio_dev = &_vio_dev.dev; | 57 | |
58 | #ifdef CONFIG_PPC_ISERIES | ||
59 | static struct vio_dev *__init vio_register_device_iseries(char *type, | ||
60 | uint32_t unit_num); | ||
61 | |||
62 | struct device *iSeries_vio_dev = &vio_bus_device.dev; | ||
58 | EXPORT_SYMBOL(iSeries_vio_dev); | 63 | EXPORT_SYMBOL(iSeries_vio_dev); |
59 | 64 | ||
60 | #define device_is_compatible(a, b) 1 | 65 | #define device_is_compatible(a, b) 1 |
@@ -260,18 +265,10 @@ static int __init vio_bus_init(void) | |||
260 | } | 265 | } |
261 | 266 | ||
262 | /* the fake parent of all vio devices, just to give us a nice directory */ | 267 | /* the fake parent of all vio devices, just to give us a nice directory */ |
263 | vio_bus_device = kmalloc(sizeof(struct vio_dev), GFP_KERNEL); | 268 | err = device_register(&vio_bus_device.dev); |
264 | if (!vio_bus_device) { | ||
265 | return 1; | ||
266 | } | ||
267 | memset(vio_bus_device, 0, sizeof(struct vio_dev)); | ||
268 | strcpy(vio_bus_device->dev.bus_id, "vio"); | ||
269 | |||
270 | err = device_register(&vio_bus_device->dev); | ||
271 | if (err) { | 269 | if (err) { |
272 | printk(KERN_WARNING "%s: device_register returned %i\n", __FUNCTION__, | 270 | printk(KERN_WARNING "%s: device_register returned %i\n", __FUNCTION__, |
273 | err); | 271 | err); |
274 | kfree(vio_bus_device); | ||
275 | return err; | 272 | return err; |
276 | } | 273 | } |
277 | 274 | ||
@@ -326,7 +323,7 @@ static struct vio_dev * __devinit vio_register_device_common( | |||
326 | viodev->unit_address = unit_address; | 323 | viodev->unit_address = unit_address; |
327 | viodev->iommu_table = iommu_table; | 324 | viodev->iommu_table = iommu_table; |
328 | /* init generic 'struct device' fields: */ | 325 | /* init generic 'struct device' fields: */ |
329 | viodev->dev.parent = &vio_bus_device->dev; | 326 | viodev->dev.parent = &vio_bus_device.dev; |
330 | viodev->dev.bus = &vio_bus_type; | 327 | viodev->dev.bus = &vio_bus_type; |
331 | viodev->dev.release = vio_dev_release; | 328 | viodev->dev.release = vio_dev_release; |
332 | 329 | ||
@@ -636,5 +633,3 @@ struct bus_type vio_bus_type = { | |||
636 | .name = "vio", | 633 | .name = "vio", |
637 | .match = vio_bus_match, | 634 | .match = vio_bus_match, |
638 | }; | 635 | }; |
639 | |||
640 | EXPORT_SYMBOL(vio_bus_type); | ||
diff --git a/arch/ppc64/kernel/viopath.c b/arch/ppc64/kernel/viopath.c index 2ed8ee075680..2a6c4f01c45e 100644 --- a/arch/ppc64/kernel/viopath.c +++ b/arch/ppc64/kernel/viopath.c | |||
@@ -43,12 +43,10 @@ | |||
43 | #include <asm/system.h> | 43 | #include <asm/system.h> |
44 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
45 | #include <asm/iSeries/HvTypes.h> | 45 | #include <asm/iSeries/HvTypes.h> |
46 | #include <asm/iSeries/LparData.h> | 46 | #include <asm/iSeries/ItExtVpdPanel.h> |
47 | #include <asm/iSeries/HvLpEvent.h> | 47 | #include <asm/iSeries/HvLpEvent.h> |
48 | #include <asm/iSeries/HvLpConfig.h> | 48 | #include <asm/iSeries/HvLpConfig.h> |
49 | #include <asm/iSeries/HvCallCfg.h> | ||
50 | #include <asm/iSeries/mf.h> | 49 | #include <asm/iSeries/mf.h> |
51 | #include <asm/iSeries/iSeries_proc.h> | ||
52 | #include <asm/iSeries/vio.h> | 50 | #include <asm/iSeries/vio.h> |
53 | 51 | ||
54 | /* Status of the path to each other partition in the system. | 52 | /* Status of the path to each other partition in the system. |
@@ -365,7 +363,7 @@ void vio_set_hostlp(void) | |||
365 | * while we're active | 363 | * while we're active |
366 | */ | 364 | */ |
367 | viopath_ourLp = HvLpConfig_getLpIndex(); | 365 | viopath_ourLp = HvLpConfig_getLpIndex(); |
368 | viopath_hostLp = HvCallCfg_getHostingLpIndex(viopath_ourLp); | 366 | viopath_hostLp = HvLpConfig_getHostingLpIndex(viopath_ourLp); |
369 | 367 | ||
370 | if (viopath_hostLp != HvLpIndexInvalid) | 368 | if (viopath_hostLp != HvLpIndexInvalid) |
371 | vio_setHandler(viomajorsubtype_config, handleConfig); | 369 | vio_setHandler(viomajorsubtype_config, handleConfig); |
@@ -487,7 +485,7 @@ int viopath_open(HvLpIndex remoteLp, int subtype, int numReq) | |||
487 | unsigned long flags; | 485 | unsigned long flags; |
488 | int tempNumAllocated; | 486 | int tempNumAllocated; |
489 | 487 | ||
490 | if ((remoteLp >= HvMaxArchitectedLps) || (remoteLp == HvLpIndexInvalid)) | 488 | if ((remoteLp >= HVMAXARCHITECTEDLPS) || (remoteLp == HvLpIndexInvalid)) |
491 | return -EINVAL; | 489 | return -EINVAL; |
492 | 490 | ||
493 | subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT; | 491 | subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT; |
@@ -558,7 +556,7 @@ int viopath_close(HvLpIndex remoteLp, int subtype, int numReq) | |||
558 | int numOpen; | 556 | int numOpen; |
559 | struct alloc_parms parms; | 557 | struct alloc_parms parms; |
560 | 558 | ||
561 | if ((remoteLp >= HvMaxArchitectedLps) || (remoteLp == HvLpIndexInvalid)) | 559 | if ((remoteLp >= HVMAXARCHITECTEDLPS) || (remoteLp == HvLpIndexInvalid)) |
562 | return -EINVAL; | 560 | return -EINVAL; |
563 | 561 | ||
564 | subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT; | 562 | subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT; |
diff --git a/arch/ppc64/lib/Makefile b/arch/ppc64/lib/Makefile index bf7b5bbfc04e..76fbfa9f706f 100644 --- a/arch/ppc64/lib/Makefile +++ b/arch/ppc64/lib/Makefile | |||
@@ -12,7 +12,7 @@ lib-$(CONFIG_SMP) += locks.o | |||
12 | 12 | ||
13 | # e2a provides EBCDIC to ASCII conversions. | 13 | # e2a provides EBCDIC to ASCII conversions. |
14 | ifdef CONFIG_PPC_ISERIES | 14 | ifdef CONFIG_PPC_ISERIES |
15 | obj-$(CONFIG_PCI) += e2a.o | 15 | obj-y += e2a.o |
16 | endif | 16 | endif |
17 | 17 | ||
18 | lib-$(CONFIG_DEBUG_KERNEL) += sstep.o | 18 | lib-$(CONFIG_DEBUG_KERNEL) += sstep.o |
diff --git a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c index 0a0f97008d02..1647b1c6f28e 100644 --- a/arch/ppc64/mm/hash_utils.c +++ b/arch/ppc64/mm/hash_utils.c | |||
@@ -195,7 +195,7 @@ void __init htab_initialize(void) | |||
195 | memset((void *)table, 0, htab_size_bytes); | 195 | memset((void *)table, 0, htab_size_bytes); |
196 | } | 196 | } |
197 | 197 | ||
198 | mode_rw = _PAGE_ACCESSED | _PAGE_COHERENT | PP_RWXX; | 198 | mode_rw = _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX; |
199 | 199 | ||
200 | /* On U3 based machines, we need to reserve the DART area and | 200 | /* On U3 based machines, we need to reserve the DART area and |
201 | * _NOT_ map it to avoid cache paradoxes as it's remapped non | 201 | * _NOT_ map it to avoid cache paradoxes as it's remapped non |
@@ -310,10 +310,6 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
310 | 310 | ||
311 | vsid = get_vsid(mm->context.id, ea); | 311 | vsid = get_vsid(mm->context.id, ea); |
312 | break; | 312 | break; |
313 | case IO_REGION_ID: | ||
314 | mm = &ioremap_mm; | ||
315 | vsid = get_kernel_vsid(ea); | ||
316 | break; | ||
317 | case VMALLOC_REGION_ID: | 313 | case VMALLOC_REGION_ID: |
318 | mm = &init_mm; | 314 | mm = &init_mm; |
319 | vsid = get_kernel_vsid(ea); | 315 | vsid = get_kernel_vsid(ea); |
diff --git a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c index d3bf86a5c1ad..fdcfe97c75c1 100644 --- a/arch/ppc64/mm/hugetlbpage.c +++ b/arch/ppc64/mm/hugetlbpage.c | |||
@@ -121,7 +121,7 @@ static pte_t *hugepte_alloc(struct mm_struct *mm, pud_t *dir, unsigned long addr | |||
121 | return hugepte_offset(dir, addr); | 121 | return hugepte_offset(dir, addr); |
122 | } | 122 | } |
123 | 123 | ||
124 | static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | 124 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) |
125 | { | 125 | { |
126 | pud_t *pud; | 126 | pud_t *pud; |
127 | 127 | ||
@@ -134,7 +134,7 @@ static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
134 | return hugepte_offset(pud, addr); | 134 | return hugepte_offset(pud, addr); |
135 | } | 135 | } |
136 | 136 | ||
137 | static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 137 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) |
138 | { | 138 | { |
139 | pud_t *pud; | 139 | pud_t *pud; |
140 | 140 | ||
@@ -147,25 +147,6 @@ static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
147 | return hugepte_alloc(mm, pud, addr); | 147 | return hugepte_alloc(mm, pud, addr); |
148 | } | 148 | } |
149 | 149 | ||
150 | static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, | ||
151 | unsigned long addr, struct page *page, | ||
152 | pte_t *ptep, int write_access) | ||
153 | { | ||
154 | pte_t entry; | ||
155 | |||
156 | add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); | ||
157 | if (write_access) { | ||
158 | entry = | ||
159 | pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); | ||
160 | } else { | ||
161 | entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot)); | ||
162 | } | ||
163 | entry = pte_mkyoung(entry); | ||
164 | entry = pte_mkhuge(entry); | ||
165 | |||
166 | set_pte_at(mm, addr, ptep, entry); | ||
167 | } | ||
168 | |||
169 | /* | 150 | /* |
170 | * This function checks for proper alignment of input addr and len parameters. | 151 | * This function checks for proper alignment of input addr and len parameters. |
171 | */ | 152 | */ |
@@ -259,80 +240,6 @@ int prepare_hugepage_range(unsigned long addr, unsigned long len) | |||
259 | return -EINVAL; | 240 | return -EINVAL; |
260 | } | 241 | } |
261 | 242 | ||
262 | int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, | ||
263 | struct vm_area_struct *vma) | ||
264 | { | ||
265 | pte_t *src_pte, *dst_pte, entry; | ||
266 | struct page *ptepage; | ||
267 | unsigned long addr = vma->vm_start; | ||
268 | unsigned long end = vma->vm_end; | ||
269 | int err = -ENOMEM; | ||
270 | |||
271 | while (addr < end) { | ||
272 | dst_pte = huge_pte_alloc(dst, addr); | ||
273 | if (!dst_pte) | ||
274 | goto out; | ||
275 | |||
276 | src_pte = huge_pte_offset(src, addr); | ||
277 | entry = *src_pte; | ||
278 | |||
279 | ptepage = pte_page(entry); | ||
280 | get_page(ptepage); | ||
281 | add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); | ||
282 | set_pte_at(dst, addr, dst_pte, entry); | ||
283 | |||
284 | addr += HPAGE_SIZE; | ||
285 | } | ||
286 | |||
287 | err = 0; | ||
288 | out: | ||
289 | return err; | ||
290 | } | ||
291 | |||
292 | int | ||
293 | follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, | ||
294 | struct page **pages, struct vm_area_struct **vmas, | ||
295 | unsigned long *position, int *length, int i) | ||
296 | { | ||
297 | unsigned long vpfn, vaddr = *position; | ||
298 | int remainder = *length; | ||
299 | |||
300 | WARN_ON(!is_vm_hugetlb_page(vma)); | ||
301 | |||
302 | vpfn = vaddr/PAGE_SIZE; | ||
303 | while (vaddr < vma->vm_end && remainder) { | ||
304 | if (pages) { | ||
305 | pte_t *pte; | ||
306 | struct page *page; | ||
307 | |||
308 | pte = huge_pte_offset(mm, vaddr); | ||
309 | |||
310 | /* hugetlb should be locked, and hence, prefaulted */ | ||
311 | WARN_ON(!pte || pte_none(*pte)); | ||
312 | |||
313 | page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)]; | ||
314 | |||
315 | WARN_ON(!PageCompound(page)); | ||
316 | |||
317 | get_page(page); | ||
318 | pages[i] = page; | ||
319 | } | ||
320 | |||
321 | if (vmas) | ||
322 | vmas[i] = vma; | ||
323 | |||
324 | vaddr += PAGE_SIZE; | ||
325 | ++vpfn; | ||
326 | --remainder; | ||
327 | ++i; | ||
328 | } | ||
329 | |||
330 | *length = remainder; | ||
331 | *position = vaddr; | ||
332 | |||
333 | return i; | ||
334 | } | ||
335 | |||
336 | struct page * | 243 | struct page * |
337 | follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) | 244 | follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) |
338 | { | 245 | { |
@@ -363,89 +270,6 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address, | |||
363 | return NULL; | 270 | return NULL; |
364 | } | 271 | } |
365 | 272 | ||
366 | void unmap_hugepage_range(struct vm_area_struct *vma, | ||
367 | unsigned long start, unsigned long end) | ||
368 | { | ||
369 | struct mm_struct *mm = vma->vm_mm; | ||
370 | unsigned long addr; | ||
371 | pte_t *ptep; | ||
372 | struct page *page; | ||
373 | |||
374 | WARN_ON(!is_vm_hugetlb_page(vma)); | ||
375 | BUG_ON((start % HPAGE_SIZE) != 0); | ||
376 | BUG_ON((end % HPAGE_SIZE) != 0); | ||
377 | |||
378 | for (addr = start; addr < end; addr += HPAGE_SIZE) { | ||
379 | pte_t pte; | ||
380 | |||
381 | ptep = huge_pte_offset(mm, addr); | ||
382 | if (!ptep || pte_none(*ptep)) | ||
383 | continue; | ||
384 | |||
385 | pte = *ptep; | ||
386 | page = pte_page(pte); | ||
387 | pte_clear(mm, addr, ptep); | ||
388 | |||
389 | put_page(page); | ||
390 | } | ||
391 | add_mm_counter(mm, rss, -((end - start) >> PAGE_SHIFT)); | ||
392 | flush_tlb_pending(); | ||
393 | } | ||
394 | |||
395 | int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) | ||
396 | { | ||
397 | struct mm_struct *mm = current->mm; | ||
398 | unsigned long addr; | ||
399 | int ret = 0; | ||
400 | |||
401 | WARN_ON(!is_vm_hugetlb_page(vma)); | ||
402 | BUG_ON((vma->vm_start % HPAGE_SIZE) != 0); | ||
403 | BUG_ON((vma->vm_end % HPAGE_SIZE) != 0); | ||
404 | |||
405 | spin_lock(&mm->page_table_lock); | ||
406 | for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) { | ||
407 | unsigned long idx; | ||
408 | pte_t *pte = huge_pte_alloc(mm, addr); | ||
409 | struct page *page; | ||
410 | |||
411 | if (!pte) { | ||
412 | ret = -ENOMEM; | ||
413 | goto out; | ||
414 | } | ||
415 | if (! pte_none(*pte)) | ||
416 | continue; | ||
417 | |||
418 | idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) | ||
419 | + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); | ||
420 | page = find_get_page(mapping, idx); | ||
421 | if (!page) { | ||
422 | /* charge the fs quota first */ | ||
423 | if (hugetlb_get_quota(mapping)) { | ||
424 | ret = -ENOMEM; | ||
425 | goto out; | ||
426 | } | ||
427 | page = alloc_huge_page(); | ||
428 | if (!page) { | ||
429 | hugetlb_put_quota(mapping); | ||
430 | ret = -ENOMEM; | ||
431 | goto out; | ||
432 | } | ||
433 | ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC); | ||
434 | if (! ret) { | ||
435 | unlock_page(page); | ||
436 | } else { | ||
437 | hugetlb_put_quota(mapping); | ||
438 | free_huge_page(page); | ||
439 | goto out; | ||
440 | } | ||
441 | } | ||
442 | set_huge_pte(mm, vma, addr, page, pte, vma->vm_flags & VM_WRITE); | ||
443 | } | ||
444 | out: | ||
445 | spin_unlock(&mm->page_table_lock); | ||
446 | return ret; | ||
447 | } | ||
448 | |||
449 | /* Because we have an exclusive hugepage region which lies within the | 273 | /* Because we have an exclusive hugepage region which lies within the |
450 | * normal user address space, we have to take special measures to make | 274 | * normal user address space, we have to take special measures to make |
451 | * non-huge mmap()s evade the hugepage reserved regions. */ | 275 | * non-huge mmap()s evade the hugepage reserved regions. */ |
@@ -468,7 +292,12 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
468 | && !is_hugepage_only_range(mm, addr,len)) | 292 | && !is_hugepage_only_range(mm, addr,len)) |
469 | return addr; | 293 | return addr; |
470 | } | 294 | } |
471 | start_addr = addr = mm->free_area_cache; | 295 | if (len > mm->cached_hole_size) { |
296 | start_addr = addr = mm->free_area_cache; | ||
297 | } else { | ||
298 | start_addr = addr = TASK_UNMAPPED_BASE; | ||
299 | mm->cached_hole_size = 0; | ||
300 | } | ||
472 | 301 | ||
473 | full_search: | 302 | full_search: |
474 | vma = find_vma(mm, addr); | 303 | vma = find_vma(mm, addr); |
@@ -492,6 +321,8 @@ full_search: | |||
492 | mm->free_area_cache = addr + len; | 321 | mm->free_area_cache = addr + len; |
493 | return addr; | 322 | return addr; |
494 | } | 323 | } |
324 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
325 | mm->cached_hole_size = vma->vm_start - addr; | ||
495 | addr = vma->vm_end; | 326 | addr = vma->vm_end; |
496 | vma = vma->vm_next; | 327 | vma = vma->vm_next; |
497 | } | 328 | } |
@@ -499,6 +330,7 @@ full_search: | |||
499 | /* Make sure we didn't miss any holes */ | 330 | /* Make sure we didn't miss any holes */ |
500 | if (start_addr != TASK_UNMAPPED_BASE) { | 331 | if (start_addr != TASK_UNMAPPED_BASE) { |
501 | start_addr = addr = TASK_UNMAPPED_BASE; | 332 | start_addr = addr = TASK_UNMAPPED_BASE; |
333 | mm->cached_hole_size = 0; | ||
502 | goto full_search; | 334 | goto full_search; |
503 | } | 335 | } |
504 | return -ENOMEM; | 336 | return -ENOMEM; |
@@ -520,6 +352,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | |||
520 | struct vm_area_struct *vma, *prev_vma; | 352 | struct vm_area_struct *vma, *prev_vma; |
521 | struct mm_struct *mm = current->mm; | 353 | struct mm_struct *mm = current->mm; |
522 | unsigned long base = mm->mmap_base, addr = addr0; | 354 | unsigned long base = mm->mmap_base, addr = addr0; |
355 | unsigned long largest_hole = mm->cached_hole_size; | ||
523 | int first_time = 1; | 356 | int first_time = 1; |
524 | 357 | ||
525 | /* requested length too big for entire address space */ | 358 | /* requested length too big for entire address space */ |
@@ -540,6 +373,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | |||
540 | return addr; | 373 | return addr; |
541 | } | 374 | } |
542 | 375 | ||
376 | if (len <= largest_hole) { | ||
377 | largest_hole = 0; | ||
378 | mm->free_area_cache = base; | ||
379 | } | ||
543 | try_again: | 380 | try_again: |
544 | /* make sure it can fit in the remaining address space */ | 381 | /* make sure it can fit in the remaining address space */ |
545 | if (mm->free_area_cache < len) | 382 | if (mm->free_area_cache < len) |
@@ -568,13 +405,21 @@ hugepage_recheck: | |||
568 | * vma->vm_start, use it: | 405 | * vma->vm_start, use it: |
569 | */ | 406 | */ |
570 | if (addr+len <= vma->vm_start && | 407 | if (addr+len <= vma->vm_start && |
571 | (!prev_vma || (addr >= prev_vma->vm_end))) | 408 | (!prev_vma || (addr >= prev_vma->vm_end))) { |
572 | /* remember the address as a hint for next time */ | 409 | /* remember the address as a hint for next time */ |
573 | return (mm->free_area_cache = addr); | 410 | mm->cached_hole_size = largest_hole; |
574 | else | 411 | return (mm->free_area_cache = addr); |
412 | } else { | ||
575 | /* pull free_area_cache down to the first hole */ | 413 | /* pull free_area_cache down to the first hole */ |
576 | if (mm->free_area_cache == vma->vm_end) | 414 | if (mm->free_area_cache == vma->vm_end) { |
577 | mm->free_area_cache = vma->vm_start; | 415 | mm->free_area_cache = vma->vm_start; |
416 | mm->cached_hole_size = largest_hole; | ||
417 | } | ||
418 | } | ||
419 | |||
420 | /* remember the largest hole we saw so far */ | ||
421 | if (addr + largest_hole < vma->vm_start) | ||
422 | largest_hole = vma->vm_start - addr; | ||
578 | 423 | ||
579 | /* try just below the current vma->vm_start */ | 424 | /* try just below the current vma->vm_start */ |
580 | addr = vma->vm_start-len; | 425 | addr = vma->vm_start-len; |
@@ -587,6 +432,7 @@ fail: | |||
587 | */ | 432 | */ |
588 | if (first_time) { | 433 | if (first_time) { |
589 | mm->free_area_cache = base; | 434 | mm->free_area_cache = base; |
435 | largest_hole = 0; | ||
590 | first_time = 0; | 436 | first_time = 0; |
591 | goto try_again; | 437 | goto try_again; |
592 | } | 438 | } |
@@ -597,11 +443,13 @@ fail: | |||
597 | * allocations. | 443 | * allocations. |
598 | */ | 444 | */ |
599 | mm->free_area_cache = TASK_UNMAPPED_BASE; | 445 | mm->free_area_cache = TASK_UNMAPPED_BASE; |
446 | mm->cached_hole_size = ~0UL; | ||
600 | addr = arch_get_unmapped_area(filp, addr0, len, pgoff, flags); | 447 | addr = arch_get_unmapped_area(filp, addr0, len, pgoff, flags); |
601 | /* | 448 | /* |
602 | * Restore the topdown base: | 449 | * Restore the topdown base: |
603 | */ | 450 | */ |
604 | mm->free_area_cache = base; | 451 | mm->free_area_cache = base; |
452 | mm->cached_hole_size = ~0UL; | ||
605 | 453 | ||
606 | return addr; | 454 | return addr; |
607 | } | 455 | } |
diff --git a/arch/ppc64/mm/imalloc.c b/arch/ppc64/mm/imalloc.c index cb8727f3267a..b6e75b891ac0 100644 --- a/arch/ppc64/mm/imalloc.c +++ b/arch/ppc64/mm/imalloc.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/pgtable.h> | 15 | #include <asm/pgtable.h> |
16 | #include <asm/semaphore.h> | 16 | #include <asm/semaphore.h> |
17 | #include <asm/imalloc.h> | 17 | #include <asm/imalloc.h> |
18 | #include <asm/cacheflush.h> | ||
18 | 19 | ||
19 | static DECLARE_MUTEX(imlist_sem); | 20 | static DECLARE_MUTEX(imlist_sem); |
20 | struct vm_struct * imlist = NULL; | 21 | struct vm_struct * imlist = NULL; |
@@ -285,29 +286,32 @@ struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size, | |||
285 | return area; | 286 | return area; |
286 | } | 287 | } |
287 | 288 | ||
288 | unsigned long im_free(void * addr) | 289 | void im_free(void * addr) |
289 | { | 290 | { |
290 | struct vm_struct **p, *tmp; | 291 | struct vm_struct **p, *tmp; |
291 | unsigned long ret_size = 0; | ||
292 | 292 | ||
293 | if (!addr) | 293 | if (!addr) |
294 | return ret_size; | 294 | return; |
295 | if ((PAGE_SIZE-1) & (unsigned long) addr) { | 295 | if ((unsigned long) addr & ~PAGE_MASK) { |
296 | printk(KERN_ERR "Trying to %s bad address (%p)\n", __FUNCTION__, addr); | 296 | printk(KERN_ERR "Trying to %s bad address (%p)\n", __FUNCTION__, addr); |
297 | return ret_size; | 297 | return; |
298 | } | 298 | } |
299 | down(&imlist_sem); | 299 | down(&imlist_sem); |
300 | for (p = &imlist ; (tmp = *p) ; p = &tmp->next) { | 300 | for (p = &imlist ; (tmp = *p) ; p = &tmp->next) { |
301 | if (tmp->addr == addr) { | 301 | if (tmp->addr == addr) { |
302 | ret_size = tmp->size; | ||
303 | *p = tmp->next; | 302 | *p = tmp->next; |
303 | |||
304 | /* XXX: do we need the lock? */ | ||
305 | spin_lock(&init_mm.page_table_lock); | ||
306 | unmap_vm_area(tmp); | ||
307 | spin_unlock(&init_mm.page_table_lock); | ||
308 | |||
304 | kfree(tmp); | 309 | kfree(tmp); |
305 | up(&imlist_sem); | 310 | up(&imlist_sem); |
306 | return ret_size; | 311 | return; |
307 | } | 312 | } |
308 | } | 313 | } |
309 | up(&imlist_sem); | 314 | up(&imlist_sem); |
310 | printk(KERN_ERR "Trying to %s nonexistent area (%p)\n", __FUNCTION__, | 315 | printk(KERN_ERR "Trying to %s nonexistent area (%p)\n", __FUNCTION__, |
311 | addr); | 316 | addr); |
312 | return ret_size; | ||
313 | } | 317 | } |
diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c index 4b42aff74d73..6fa1e6490b57 100644 --- a/arch/ppc64/mm/init.c +++ b/arch/ppc64/mm/init.c | |||
@@ -73,9 +73,6 @@ static unsigned long phbs_io_bot = PHBS_IO_BASE; | |||
73 | extern pgd_t swapper_pg_dir[]; | 73 | extern pgd_t swapper_pg_dir[]; |
74 | extern struct task_struct *current_set[NR_CPUS]; | 74 | extern struct task_struct *current_set[NR_CPUS]; |
75 | 75 | ||
76 | extern pgd_t ioremap_dir[]; | ||
77 | pgd_t * ioremap_pgd = (pgd_t *)&ioremap_dir; | ||
78 | |||
79 | unsigned long klimit = (unsigned long)_end; | 76 | unsigned long klimit = (unsigned long)_end; |
80 | 77 | ||
81 | unsigned long _SDR1=0; | 78 | unsigned long _SDR1=0; |
@@ -137,69 +134,6 @@ void iounmap(volatile void __iomem *addr) | |||
137 | 134 | ||
138 | #else | 135 | #else |
139 | 136 | ||
140 | static void unmap_im_area_pte(pmd_t *pmd, unsigned long addr, | ||
141 | unsigned long end) | ||
142 | { | ||
143 | pte_t *pte; | ||
144 | |||
145 | pte = pte_offset_kernel(pmd, addr); | ||
146 | do { | ||
147 | pte_t ptent = ptep_get_and_clear(&ioremap_mm, addr, pte); | ||
148 | WARN_ON(!pte_none(ptent) && !pte_present(ptent)); | ||
149 | } while (pte++, addr += PAGE_SIZE, addr != end); | ||
150 | } | ||
151 | |||
152 | static inline void unmap_im_area_pmd(pud_t *pud, unsigned long addr, | ||
153 | unsigned long end) | ||
154 | { | ||
155 | pmd_t *pmd; | ||
156 | unsigned long next; | ||
157 | |||
158 | pmd = pmd_offset(pud, addr); | ||
159 | do { | ||
160 | next = pmd_addr_end(addr, end); | ||
161 | if (pmd_none_or_clear_bad(pmd)) | ||
162 | continue; | ||
163 | unmap_im_area_pte(pmd, addr, next); | ||
164 | } while (pmd++, addr = next, addr != end); | ||
165 | } | ||
166 | |||
167 | static inline void unmap_im_area_pud(pgd_t *pgd, unsigned long addr, | ||
168 | unsigned long end) | ||
169 | { | ||
170 | pud_t *pud; | ||
171 | unsigned long next; | ||
172 | |||
173 | pud = pud_offset(pgd, addr); | ||
174 | do { | ||
175 | next = pud_addr_end(addr, end); | ||
176 | if (pud_none_or_clear_bad(pud)) | ||
177 | continue; | ||
178 | unmap_im_area_pmd(pud, addr, next); | ||
179 | } while (pud++, addr = next, addr != end); | ||
180 | } | ||
181 | |||
182 | static void unmap_im_area(unsigned long addr, unsigned long end) | ||
183 | { | ||
184 | struct mm_struct *mm = &ioremap_mm; | ||
185 | unsigned long next; | ||
186 | pgd_t *pgd; | ||
187 | |||
188 | spin_lock(&mm->page_table_lock); | ||
189 | |||
190 | pgd = pgd_offset_i(addr); | ||
191 | flush_cache_vunmap(addr, end); | ||
192 | do { | ||
193 | next = pgd_addr_end(addr, end); | ||
194 | if (pgd_none_or_clear_bad(pgd)) | ||
195 | continue; | ||
196 | unmap_im_area_pud(pgd, addr, next); | ||
197 | } while (pgd++, addr = next, addr != end); | ||
198 | flush_tlb_kernel_range(start, end); | ||
199 | |||
200 | spin_unlock(&mm->page_table_lock); | ||
201 | } | ||
202 | |||
203 | /* | 137 | /* |
204 | * map_io_page currently only called by __ioremap | 138 | * map_io_page currently only called by __ioremap |
205 | * map_io_page adds an entry to the ioremap page table | 139 | * map_io_page adds an entry to the ioremap page table |
@@ -214,21 +148,21 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags) | |||
214 | unsigned long vsid; | 148 | unsigned long vsid; |
215 | 149 | ||
216 | if (mem_init_done) { | 150 | if (mem_init_done) { |
217 | spin_lock(&ioremap_mm.page_table_lock); | 151 | spin_lock(&init_mm.page_table_lock); |
218 | pgdp = pgd_offset_i(ea); | 152 | pgdp = pgd_offset_k(ea); |
219 | pudp = pud_alloc(&ioremap_mm, pgdp, ea); | 153 | pudp = pud_alloc(&init_mm, pgdp, ea); |
220 | if (!pudp) | 154 | if (!pudp) |
221 | return -ENOMEM; | 155 | return -ENOMEM; |
222 | pmdp = pmd_alloc(&ioremap_mm, pudp, ea); | 156 | pmdp = pmd_alloc(&init_mm, pudp, ea); |
223 | if (!pmdp) | 157 | if (!pmdp) |
224 | return -ENOMEM; | 158 | return -ENOMEM; |
225 | ptep = pte_alloc_kernel(&ioremap_mm, pmdp, ea); | 159 | ptep = pte_alloc_kernel(&init_mm, pmdp, ea); |
226 | if (!ptep) | 160 | if (!ptep) |
227 | return -ENOMEM; | 161 | return -ENOMEM; |
228 | pa = abs_to_phys(pa); | 162 | pa = abs_to_phys(pa); |
229 | set_pte_at(&ioremap_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, | 163 | set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, |
230 | __pgprot(flags))); | 164 | __pgprot(flags))); |
231 | spin_unlock(&ioremap_mm.page_table_lock); | 165 | spin_unlock(&init_mm.page_table_lock); |
232 | } else { | 166 | } else { |
233 | unsigned long va, vpn, hash, hpteg; | 167 | unsigned long va, vpn, hash, hpteg; |
234 | 168 | ||
@@ -267,13 +201,9 @@ static void __iomem * __ioremap_com(unsigned long addr, unsigned long pa, | |||
267 | 201 | ||
268 | for (i = 0; i < size; i += PAGE_SIZE) | 202 | for (i = 0; i < size; i += PAGE_SIZE) |
269 | if (map_io_page(ea+i, pa+i, flags)) | 203 | if (map_io_page(ea+i, pa+i, flags)) |
270 | goto failure; | 204 | return NULL; |
271 | 205 | ||
272 | return (void __iomem *) (ea + (addr & ~PAGE_MASK)); | 206 | return (void __iomem *) (ea + (addr & ~PAGE_MASK)); |
273 | failure: | ||
274 | if (mem_init_done) | ||
275 | unmap_im_area(ea, ea + size); | ||
276 | return NULL; | ||
277 | } | 207 | } |
278 | 208 | ||
279 | 209 | ||
@@ -381,19 +311,14 @@ int __ioremap_explicit(unsigned long pa, unsigned long ea, | |||
381 | */ | 311 | */ |
382 | void iounmap(volatile void __iomem *token) | 312 | void iounmap(volatile void __iomem *token) |
383 | { | 313 | { |
384 | unsigned long address, size; | ||
385 | void *addr; | 314 | void *addr; |
386 | 315 | ||
387 | if (!mem_init_done) | 316 | if (!mem_init_done) |
388 | return; | 317 | return; |
389 | 318 | ||
390 | addr = (void *) ((unsigned long __force) token & PAGE_MASK); | 319 | addr = (void *) ((unsigned long __force) token & PAGE_MASK); |
391 | |||
392 | if ((size = im_free(addr)) == 0) | ||
393 | return; | ||
394 | 320 | ||
395 | address = (unsigned long)addr; | 321 | im_free(addr); |
396 | unmap_im_area(address, address + size); | ||
397 | } | 322 | } |
398 | 323 | ||
399 | static int iounmap_subset_regions(unsigned long addr, unsigned long size) | 324 | static int iounmap_subset_regions(unsigned long addr, unsigned long size) |
diff --git a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c index 3c0ccb2623ae..7f6e13a4b71e 100644 --- a/arch/ppc64/xmon/xmon.c +++ b/arch/ppc64/xmon/xmon.c | |||
@@ -2247,7 +2247,14 @@ scanhex(unsigned long *vp) | |||
2247 | tmpstr[i] = c; | 2247 | tmpstr[i] = c; |
2248 | } | 2248 | } |
2249 | tmpstr[i++] = 0; | 2249 | tmpstr[i++] = 0; |
2250 | *vp = kallsyms_lookup_name(tmpstr); | 2250 | *vp = 0; |
2251 | if (setjmp(bus_error_jmp) == 0) { | ||
2252 | catch_memory_errors = 1; | ||
2253 | sync(); | ||
2254 | *vp = kallsyms_lookup_name(tmpstr); | ||
2255 | sync(); | ||
2256 | } | ||
2257 | catch_memory_errors = 0; | ||
2251 | if (!(*vp)) { | 2258 | if (!(*vp)) { |
2252 | printf("unknown symbol '%s'\n", tmpstr); | 2259 | printf("unknown symbol '%s'\n", tmpstr); |
2253 | return 0; | 2260 | return 0; |
diff --git a/arch/s390/kernel/compat_ioctl.c b/arch/s390/kernel/compat_ioctl.c index 03d03c6d3cbb..24a1e9f069a7 100644 --- a/arch/s390/kernel/compat_ioctl.c +++ b/arch/s390/kernel/compat_ioctl.c | |||
@@ -42,7 +42,6 @@ struct ioctl_trans ioctl_start[] = { | |||
42 | #include "../../../fs/compat_ioctl.c" | 42 | #include "../../../fs/compat_ioctl.c" |
43 | 43 | ||
44 | /* s390 only ioctls */ | 44 | /* s390 only ioctls */ |
45 | #if defined(CONFIG_DASD) || defined(CONFIG_DASD_MODULE) | ||
46 | COMPATIBLE_IOCTL(DASDAPIVER) | 45 | COMPATIBLE_IOCTL(DASDAPIVER) |
47 | COMPATIBLE_IOCTL(BIODASDDISABLE) | 46 | COMPATIBLE_IOCTL(BIODASDDISABLE) |
48 | COMPATIBLE_IOCTL(BIODASDENABLE) | 47 | COMPATIBLE_IOCTL(BIODASDENABLE) |
@@ -59,16 +58,11 @@ COMPATIBLE_IOCTL(BIODASDPRRD) | |||
59 | COMPATIBLE_IOCTL(BIODASDPSRD) | 58 | COMPATIBLE_IOCTL(BIODASDPSRD) |
60 | COMPATIBLE_IOCTL(BIODASDGATTR) | 59 | COMPATIBLE_IOCTL(BIODASDGATTR) |
61 | COMPATIBLE_IOCTL(BIODASDSATTR) | 60 | COMPATIBLE_IOCTL(BIODASDSATTR) |
62 | #if defined(CONFIG_DASD_CMB) || defined(CONFIG_DASD_CMB_MODULE) | ||
63 | COMPATIBLE_IOCTL(BIODASDCMFENABLE) | 61 | COMPATIBLE_IOCTL(BIODASDCMFENABLE) |
64 | COMPATIBLE_IOCTL(BIODASDCMFDISABLE) | 62 | COMPATIBLE_IOCTL(BIODASDCMFDISABLE) |
65 | COMPATIBLE_IOCTL(BIODASDREADALLCMB) | 63 | COMPATIBLE_IOCTL(BIODASDREADALLCMB) |
66 | #endif | ||
67 | #endif | ||
68 | 64 | ||
69 | #if defined(CONFIG_S390_TAPE) || defined(CONFIG_S390_TAPE_MODULE) | ||
70 | COMPATIBLE_IOCTL(TAPE390_DISPLAY) | 65 | COMPATIBLE_IOCTL(TAPE390_DISPLAY) |
71 | #endif | ||
72 | 66 | ||
73 | /* s390 doesn't need handlers here */ | 67 | /* s390 doesn't need handlers here */ |
74 | COMPATIBLE_IOCTL(TIOCGSERIAL) | 68 | COMPATIBLE_IOCTL(TIOCGSERIAL) |
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index b804c55bd919..fc8bf5e285f6 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -345,10 +345,25 @@ iplstart: | |||
345 | bno .Lnoreset | 345 | bno .Lnoreset |
346 | la %r2,.Lreset | 346 | la %r2,.Lreset |
347 | lhi %r3,26 | 347 | lhi %r3,26 |
348 | .long 0x83230008 | 348 | diag %r2,%r3,8 |
349 | mvc 0x78(8),.Lrdrnewpsw # set up IO interrupt psw | ||
350 | .Lwaitrdrirq: | ||
351 | lpsw .Lrdrwaitpsw | ||
352 | .Lrdrint: | ||
353 | c %r1,0xb8 # compare subchannel number | ||
354 | bne .Lwaitrdrirq | ||
355 | la %r5,.Lirb | ||
356 | tsch 0(%r5) | ||
349 | .Lnoreset: | 357 | .Lnoreset: |
358 | b .Lnoload | ||
359 | |||
360 | .align 8 | ||
361 | .Lrdrnewpsw: | ||
362 | .long 0x00080000,0x80000000+.Lrdrint | ||
363 | .Lrdrwaitpsw: | ||
364 | .long 0x020a0000,0x80000000+.Lrdrint | ||
350 | #endif | 365 | #endif |
351 | 366 | ||
352 | # | 367 | # |
353 | # everything loaded, go for it | 368 | # everything loaded, go for it |
354 | # | 369 | # |
@@ -517,10 +532,10 @@ startup:basr %r13,0 # get base | |||
517 | l %r2, .Lrcp2-.LPG1(%r13) # try with Read SCP | 532 | l %r2, .Lrcp2-.LPG1(%r13) # try with Read SCP |
518 | b .Lservicecall-.LPG1(%r13) | 533 | b .Lservicecall-.LPG1(%r13) |
519 | .Lprocsccb: | 534 | .Lprocsccb: |
520 | lh %r1,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 | 535 | lhi %r1,0 |
521 | chi %r1,0x00 | 536 | icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 |
522 | jne .Lscnd | 537 | jnz .Lscnd |
523 | l %r1,.Lscpincr2-PARMAREA(%r4) # otherwise use this one | 538 | l %r1,.Lscpincr2-PARMAREA+4(%r4) # otherwise use this one |
524 | .Lscnd: | 539 | .Lscnd: |
525 | xr %r3,%r3 # same logic | 540 | xr %r3,%r3 # same logic |
526 | ic %r3,.Lscpa1-PARMAREA(%r4) | 541 | ic %r3,.Lscpa1-PARMAREA(%r4) |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 8366793bc371..f525c0c21250 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -344,10 +344,25 @@ iplstart: | |||
344 | bno .Lnoreset | 344 | bno .Lnoreset |
345 | la %r2,.Lreset | 345 | la %r2,.Lreset |
346 | lhi %r3,26 | 346 | lhi %r3,26 |
347 | .long 0x83230008 | 347 | diag %r2,%r3,8 |
348 | mvc 0x78(8),.Lrdrnewpsw # set up IO interrupt psw | ||
349 | .Lwaitrdrirq: | ||
350 | lpsw .Lrdrwaitpsw | ||
351 | .Lrdrint: | ||
352 | c %r1,0xb8 # compare subchannel number | ||
353 | bne .Lwaitrdrirq | ||
354 | la %r5,.Lirb | ||
355 | tsch 0(%r5) | ||
348 | .Lnoreset: | 356 | .Lnoreset: |
357 | b .Lnoload | ||
358 | |||
359 | .align 8 | ||
360 | .Lrdrnewpsw: | ||
361 | .long 0x00080000,0x80000000+.Lrdrint | ||
362 | .Lrdrwaitpsw: | ||
363 | .long 0x020a0000,0x80000000+.Lrdrint | ||
349 | #endif | 364 | #endif |
350 | 365 | ||
351 | # | 366 | # |
352 | # everything loaded, go for it | 367 | # everything loaded, go for it |
353 | # | 368 | # |
@@ -518,9 +533,9 @@ startup:basr %r13,0 # get base | |||
518 | l %r2,.Lrcp2-.LPG1(%r13) # try with Read SCP | 533 | l %r2,.Lrcp2-.LPG1(%r13) # try with Read SCP |
519 | b .Lservicecall-.LPG1(%r13) | 534 | b .Lservicecall-.LPG1(%r13) |
520 | .Lprocsccb: | 535 | .Lprocsccb: |
521 | lh %r1,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 | 536 | lghi %r1,0 |
522 | chi %r1,0x00 | 537 | icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 |
523 | jne .Lscnd | 538 | jnz .Lscnd |
524 | lg %r1,.Lscpincr2-PARMAREA(%r4) # otherwise use this one | 539 | lg %r1,.Lscpincr2-PARMAREA(%r4) # otherwise use this one |
525 | .Lscnd: | 540 | .Lscnd: |
526 | xr %r3,%r3 # same logic | 541 | xr %r3,%r3 # same logic |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 8b90e9528b91..ca34b6f34b38 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -668,7 +668,10 @@ asmlinkage void space_switch_exception(struct pt_regs * regs, long int_code) | |||
668 | 668 | ||
669 | asmlinkage void kernel_stack_overflow(struct pt_regs * regs) | 669 | asmlinkage void kernel_stack_overflow(struct pt_regs * regs) |
670 | { | 670 | { |
671 | die("Kernel stack overflow", regs, 0); | 671 | bust_spinlocks(1); |
672 | printk("Kernel stack overflow.\n"); | ||
673 | show_regs(regs); | ||
674 | bust_spinlocks(0); | ||
672 | panic("Corrupt kernel stack, can't continue."); | 675 | panic("Corrupt kernel stack, can't continue."); |
673 | } | 676 | } |
674 | 677 | ||
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index f5a5bc09b8fa..2d5cb1385753 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
22 | 22 | ||
23 | static char *sender = "VMRMSVM"; | 23 | static char *sender = "VMRMSVM"; |
24 | module_param(sender, charp, 0); | 24 | module_param(sender, charp, 0400); |
25 | MODULE_PARM_DESC(sender, | 25 | MODULE_PARM_DESC(sender, |
26 | "Guest name that may send SMSG messages (default VMRMSVM)"); | 26 | "Guest name that may send SMSG messages (default VMRMSVM)"); |
27 | 27 | ||
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index df5ac294c379..917b2f32f260 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -79,6 +79,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
79 | (!vma || addr + len <= vma->vm_start)) | 79 | (!vma || addr + len <= vma->vm_start)) |
80 | return addr; | 80 | return addr; |
81 | } | 81 | } |
82 | if (len <= mm->cached_hole_size) { | ||
83 | mm->cached_hole_size = 0; | ||
84 | mm->free_area_cache = TASK_UNMAPPED_BASE; | ||
85 | } | ||
82 | if (flags & MAP_PRIVATE) | 86 | if (flags & MAP_PRIVATE) |
83 | addr = PAGE_ALIGN(mm->free_area_cache); | 87 | addr = PAGE_ALIGN(mm->free_area_cache); |
84 | else | 88 | else |
@@ -95,6 +99,7 @@ full_search: | |||
95 | */ | 99 | */ |
96 | if (start_addr != TASK_UNMAPPED_BASE) { | 100 | if (start_addr != TASK_UNMAPPED_BASE) { |
97 | start_addr = addr = TASK_UNMAPPED_BASE; | 101 | start_addr = addr = TASK_UNMAPPED_BASE; |
102 | mm->cached_hole_size = 0; | ||
98 | goto full_search; | 103 | goto full_search; |
99 | } | 104 | } |
100 | return -ENOMEM; | 105 | return -ENOMEM; |
@@ -106,6 +111,9 @@ full_search: | |||
106 | mm->free_area_cache = addr + len; | 111 | mm->free_area_cache = addr + len; |
107 | return addr; | 112 | return addr; |
108 | } | 113 | } |
114 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
115 | mm->cached_hole_size = vma->vm_start - addr; | ||
116 | |||
109 | addr = vma->vm_end; | 117 | addr = vma->vm_end; |
110 | if (!(flags & MAP_PRIVATE)) | 118 | if (!(flags & MAP_PRIVATE)) |
111 | addr = COLOUR_ALIGN(addr); | 119 | addr = COLOUR_ALIGN(addr); |
diff --git a/arch/sh/lib/delay.c b/arch/sh/lib/delay.c index 50b36037d86b..351714694d6d 100644 --- a/arch/sh/lib/delay.c +++ b/arch/sh/lib/delay.c | |||
@@ -24,7 +24,7 @@ inline void __const_udelay(unsigned long xloops) | |||
24 | __asm__("dmulu.l %0, %2\n\t" | 24 | __asm__("dmulu.l %0, %2\n\t" |
25 | "sts mach, %0" | 25 | "sts mach, %0" |
26 | : "=r" (xloops) | 26 | : "=r" (xloops) |
27 | : "0" (xloops), "r" (cpu_data[_smp_processor_id()].loops_per_jiffy) | 27 | : "0" (xloops), "r" (cpu_data[raw_smp_processor_id()].loops_per_jiffy) |
28 | : "macl", "mach"); | 28 | : "macl", "mach"); |
29 | __delay(xloops * HZ); | 29 | __delay(xloops * HZ); |
30 | } | 30 | } |
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 1f897bab2318..95bb1a6c6060 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
26 | 26 | ||
27 | static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 27 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) |
28 | { | 28 | { |
29 | pgd_t *pgd; | 29 | pgd_t *pgd; |
30 | pmd_t *pmd; | 30 | pmd_t *pmd; |
@@ -39,7 +39,7 @@ static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
39 | return pte; | 39 | return pte; |
40 | } | 40 | } |
41 | 41 | ||
42 | static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | 42 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) |
43 | { | 43 | { |
44 | pgd_t *pgd; | 44 | pgd_t *pgd; |
45 | pmd_t *pmd; | 45 | pmd_t *pmd; |
@@ -56,28 +56,34 @@ static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
56 | 56 | ||
57 | #define mk_pte_huge(entry) do { pte_val(entry) |= _PAGE_SZHUGE; } while (0) | 57 | #define mk_pte_huge(entry) do { pte_val(entry) |= _PAGE_SZHUGE; } while (0) |
58 | 58 | ||
59 | static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, | 59 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, |
60 | struct page *page, pte_t * page_table, int write_access) | 60 | pte_t *ptep, pte_t entry) |
61 | { | 61 | { |
62 | unsigned long i; | 62 | int i; |
63 | pte_t entry; | ||
64 | 63 | ||
65 | add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); | 64 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { |
65 | set_pte_at(mm, addr, ptep, entry); | ||
66 | ptep++; | ||
67 | addr += PAGE_SIZE; | ||
68 | pte_val(entry) += PAGE_SIZE; | ||
69 | } | ||
70 | } | ||
66 | 71 | ||
67 | if (write_access) | 72 | pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, |
68 | entry = pte_mkwrite(pte_mkdirty(mk_pte(page, | 73 | pte_t *ptep) |
69 | vma->vm_page_prot))); | 74 | { |
70 | else | 75 | pte_t entry; |
71 | entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot)); | 76 | int i; |
72 | entry = pte_mkyoung(entry); | ||
73 | mk_pte_huge(entry); | ||
74 | 77 | ||
75 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | 78 | entry = *ptep; |
76 | set_pte(page_table, entry); | ||
77 | page_table++; | ||
78 | 79 | ||
79 | pte_val(entry) += PAGE_SIZE; | 80 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { |
81 | pte_clear(mm, addr, ptep); | ||
82 | addr += PAGE_SIZE; | ||
83 | ptep++; | ||
80 | } | 84 | } |
85 | |||
86 | return entry; | ||
81 | } | 87 | } |
82 | 88 | ||
83 | /* | 89 | /* |
@@ -92,79 +98,6 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | |||
92 | return 0; | 98 | return 0; |
93 | } | 99 | } |
94 | 100 | ||
95 | int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, | ||
96 | struct vm_area_struct *vma) | ||
97 | { | ||
98 | pte_t *src_pte, *dst_pte, entry; | ||
99 | struct page *ptepage; | ||
100 | unsigned long addr = vma->vm_start; | ||
101 | unsigned long end = vma->vm_end; | ||
102 | int i; | ||
103 | |||
104 | while (addr < end) { | ||
105 | dst_pte = huge_pte_alloc(dst, addr); | ||
106 | if (!dst_pte) | ||
107 | goto nomem; | ||
108 | src_pte = huge_pte_offset(src, addr); | ||
109 | BUG_ON(!src_pte || pte_none(*src_pte)); | ||
110 | entry = *src_pte; | ||
111 | ptepage = pte_page(entry); | ||
112 | get_page(ptepage); | ||
113 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | ||
114 | set_pte(dst_pte, entry); | ||
115 | pte_val(entry) += PAGE_SIZE; | ||
116 | dst_pte++; | ||
117 | } | ||
118 | add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); | ||
119 | addr += HPAGE_SIZE; | ||
120 | } | ||
121 | return 0; | ||
122 | |||
123 | nomem: | ||
124 | return -ENOMEM; | ||
125 | } | ||
126 | |||
127 | int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, | ||
128 | struct page **pages, struct vm_area_struct **vmas, | ||
129 | unsigned long *position, int *length, int i) | ||
130 | { | ||
131 | unsigned long vaddr = *position; | ||
132 | int remainder = *length; | ||
133 | |||
134 | WARN_ON(!is_vm_hugetlb_page(vma)); | ||
135 | |||
136 | while (vaddr < vma->vm_end && remainder) { | ||
137 | if (pages) { | ||
138 | pte_t *pte; | ||
139 | struct page *page; | ||
140 | |||
141 | pte = huge_pte_offset(mm, vaddr); | ||
142 | |||
143 | /* hugetlb should be locked, and hence, prefaulted */ | ||
144 | BUG_ON(!pte || pte_none(*pte)); | ||
145 | |||
146 | page = pte_page(*pte); | ||
147 | |||
148 | WARN_ON(!PageCompound(page)); | ||
149 | |||
150 | get_page(page); | ||
151 | pages[i] = page; | ||
152 | } | ||
153 | |||
154 | if (vmas) | ||
155 | vmas[i] = vma; | ||
156 | |||
157 | vaddr += PAGE_SIZE; | ||
158 | --remainder; | ||
159 | ++i; | ||
160 | } | ||
161 | |||
162 | *length = remainder; | ||
163 | *position = vaddr; | ||
164 | |||
165 | return i; | ||
166 | } | ||
167 | |||
168 | struct page *follow_huge_addr(struct mm_struct *mm, | 101 | struct page *follow_huge_addr(struct mm_struct *mm, |
169 | unsigned long address, int write) | 102 | unsigned long address, int write) |
170 | { | 103 | { |
@@ -181,84 +114,3 @@ struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | |||
181 | { | 114 | { |
182 | return NULL; | 115 | return NULL; |
183 | } | 116 | } |
184 | |||
185 | void unmap_hugepage_range(struct vm_area_struct *vma, | ||
186 | unsigned long start, unsigned long end) | ||
187 | { | ||
188 | struct mm_struct *mm = vma->vm_mm; | ||
189 | unsigned long address; | ||
190 | pte_t *pte; | ||
191 | struct page *page; | ||
192 | int i; | ||
193 | |||
194 | BUG_ON(start & (HPAGE_SIZE - 1)); | ||
195 | BUG_ON(end & (HPAGE_SIZE - 1)); | ||
196 | |||
197 | for (address = start; address < end; address += HPAGE_SIZE) { | ||
198 | pte = huge_pte_offset(mm, address); | ||
199 | BUG_ON(!pte); | ||
200 | if (pte_none(*pte)) | ||
201 | continue; | ||
202 | page = pte_page(*pte); | ||
203 | put_page(page); | ||
204 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | ||
205 | pte_clear(mm, address+(i*PAGE_SIZE), pte); | ||
206 | pte++; | ||
207 | } | ||
208 | } | ||
209 | add_mm_counter(mm, rss, -((end - start) >> PAGE_SHIFT)); | ||
210 | flush_tlb_range(vma, start, end); | ||
211 | } | ||
212 | |||
213 | int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) | ||
214 | { | ||
215 | struct mm_struct *mm = current->mm; | ||
216 | unsigned long addr; | ||
217 | int ret = 0; | ||
218 | |||
219 | BUG_ON(vma->vm_start & ~HPAGE_MASK); | ||
220 | BUG_ON(vma->vm_end & ~HPAGE_MASK); | ||
221 | |||
222 | spin_lock(&mm->page_table_lock); | ||
223 | for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) { | ||
224 | unsigned long idx; | ||
225 | pte_t *pte = huge_pte_alloc(mm, addr); | ||
226 | struct page *page; | ||
227 | |||
228 | if (!pte) { | ||
229 | ret = -ENOMEM; | ||
230 | goto out; | ||
231 | } | ||
232 | if (!pte_none(*pte)) | ||
233 | continue; | ||
234 | |||
235 | idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) | ||
236 | + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); | ||
237 | page = find_get_page(mapping, idx); | ||
238 | if (!page) { | ||
239 | /* charge the fs quota first */ | ||
240 | if (hugetlb_get_quota(mapping)) { | ||
241 | ret = -ENOMEM; | ||
242 | goto out; | ||
243 | } | ||
244 | page = alloc_huge_page(); | ||
245 | if (!page) { | ||
246 | hugetlb_put_quota(mapping); | ||
247 | ret = -ENOMEM; | ||
248 | goto out; | ||
249 | } | ||
250 | ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC); | ||
251 | if (! ret) { | ||
252 | unlock_page(page); | ||
253 | } else { | ||
254 | hugetlb_put_quota(mapping); | ||
255 | free_huge_page(page); | ||
256 | goto out; | ||
257 | } | ||
258 | } | ||
259 | set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); | ||
260 | } | ||
261 | out: | ||
262 | spin_unlock(&mm->page_table_lock); | ||
263 | return ret; | ||
264 | } | ||
diff --git a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c index bcad2aefa4ee..dcd9c8a8baf8 100644 --- a/arch/sh64/mm/hugetlbpage.c +++ b/arch/sh64/mm/hugetlbpage.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
26 | 26 | ||
27 | static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 27 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) |
28 | { | 28 | { |
29 | pgd_t *pgd; | 29 | pgd_t *pgd; |
30 | pmd_t *pmd; | 30 | pmd_t *pmd; |
@@ -39,7 +39,7 @@ static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
39 | return pte; | 39 | return pte; |
40 | } | 40 | } |
41 | 41 | ||
42 | static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | 42 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) |
43 | { | 43 | { |
44 | pgd_t *pgd; | 44 | pgd_t *pgd; |
45 | pmd_t *pmd; | 45 | pmd_t *pmd; |
@@ -80,6 +80,20 @@ static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, | |||
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | pte_t huge_ptep_get_and_clear(pte_t *ptep) | ||
84 | { | ||
85 | pte_t entry; | ||
86 | |||
87 | entry = *ptep; | ||
88 | |||
89 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | ||
90 | pte_clear(pte); | ||
91 | pte++; | ||
92 | } | ||
93 | |||
94 | return entry; | ||
95 | } | ||
96 | |||
83 | /* | 97 | /* |
84 | * This function checks for proper alignment of input addr and len parameters. | 98 | * This function checks for proper alignment of input addr and len parameters. |
85 | */ | 99 | */ |
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index a2dea69b2f07..ec2e05028a10 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c | |||
@@ -384,7 +384,6 @@ void map_high_region(unsigned long start_pfn, unsigned long end_pfn) | |||
384 | struct page *page = pfn_to_page(tmp); | 384 | struct page *page = pfn_to_page(tmp); |
385 | 385 | ||
386 | ClearPageReserved(page); | 386 | ClearPageReserved(page); |
387 | set_bit(PG_highmem, &page->flags); | ||
388 | set_page_count(page, 1); | 387 | set_page_count(page, 1); |
389 | __free_page(page); | 388 | __free_page(page); |
390 | totalhigh_pages++; | 389 | totalhigh_pages++; |
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 0077f02f4b37..5f8c822a2b4a 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c | |||
@@ -84,6 +84,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi | |||
84 | return addr; | 84 | return addr; |
85 | } | 85 | } |
86 | 86 | ||
87 | if (len <= mm->cached_hole_size) { | ||
88 | mm->cached_hole_size = 0; | ||
89 | mm->free_area_cache = TASK_UNMAPPED_BASE; | ||
90 | } | ||
87 | start_addr = addr = mm->free_area_cache; | 91 | start_addr = addr = mm->free_area_cache; |
88 | 92 | ||
89 | task_size -= len; | 93 | task_size -= len; |
@@ -103,6 +107,7 @@ full_search: | |||
103 | if (task_size < addr) { | 107 | if (task_size < addr) { |
104 | if (start_addr != TASK_UNMAPPED_BASE) { | 108 | if (start_addr != TASK_UNMAPPED_BASE) { |
105 | start_addr = addr = TASK_UNMAPPED_BASE; | 109 | start_addr = addr = TASK_UNMAPPED_BASE; |
110 | mm->cached_hole_size = 0; | ||
106 | goto full_search; | 111 | goto full_search; |
107 | } | 112 | } |
108 | return -ENOMEM; | 113 | return -ENOMEM; |
@@ -114,6 +119,9 @@ full_search: | |||
114 | mm->free_area_cache = addr + len; | 119 | mm->free_area_cache = addr + len; |
115 | return addr; | 120 | return addr; |
116 | } | 121 | } |
122 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
123 | mm->cached_hole_size = vma->vm_start - addr; | ||
124 | |||
117 | addr = vma->vm_end; | 125 | addr = vma->vm_end; |
118 | if (do_color_align) | 126 | if (do_color_align) |
119 | addr = COLOUR_ALIGN(addr, pgoff); | 127 | addr = COLOUR_ALIGN(addr, pgoff); |
diff --git a/arch/sparc64/lib/delay.c b/arch/sparc64/lib/delay.c index f6b4c784d53e..e8808727617a 100644 --- a/arch/sparc64/lib/delay.c +++ b/arch/sparc64/lib/delay.c | |||
@@ -31,7 +31,7 @@ void __const_udelay(unsigned long n) | |||
31 | { | 31 | { |
32 | n *= 4; | 32 | n *= 4; |
33 | 33 | ||
34 | n *= (cpu_data(_smp_processor_id()).udelay_val * (HZ/4)); | 34 | n *= (cpu_data(raw_smp_processor_id()).udelay_val * (HZ/4)); |
35 | n >>= 32; | 35 | n >>= 32; |
36 | 36 | ||
37 | __delay(n + 1); | 37 | __delay(n + 1); |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index 5a1f831b2de1..625cbb336a23 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
23 | #include <asm/mmu_context.h> | 23 | #include <asm/mmu_context.h> |
24 | 24 | ||
25 | static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 25 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) |
26 | { | 26 | { |
27 | pgd_t *pgd; | 27 | pgd_t *pgd; |
28 | pud_t *pud; | 28 | pud_t *pud; |
@@ -41,7 +41,7 @@ static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
41 | return pte; | 41 | return pte; |
42 | } | 42 | } |
43 | 43 | ||
44 | static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | 44 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) |
45 | { | 45 | { |
46 | pgd_t *pgd; | 46 | pgd_t *pgd; |
47 | pud_t *pud; | 47 | pud_t *pud; |
@@ -62,30 +62,34 @@ static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
62 | 62 | ||
63 | #define mk_pte_huge(entry) do { pte_val(entry) |= _PAGE_SZHUGE; } while (0) | 63 | #define mk_pte_huge(entry) do { pte_val(entry) |= _PAGE_SZHUGE; } while (0) |
64 | 64 | ||
65 | static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, | 65 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, |
66 | unsigned long addr, | 66 | pte_t *ptep, pte_t entry) |
67 | struct page *page, pte_t * page_table, int write_access) | ||
68 | { | 67 | { |
69 | unsigned long i; | 68 | int i; |
70 | pte_t entry; | 69 | |
70 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | ||
71 | set_pte_at(mm, addr, ptep, entry); | ||
72 | ptep++; | ||
73 | addr += PAGE_SIZE; | ||
74 | pte_val(entry) += PAGE_SIZE; | ||
75 | } | ||
76 | } | ||
71 | 77 | ||
72 | add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); | 78 | pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, |
79 | pte_t *ptep) | ||
80 | { | ||
81 | pte_t entry; | ||
82 | int i; | ||
73 | 83 | ||
74 | if (write_access) | 84 | entry = *ptep; |
75 | entry = pte_mkwrite(pte_mkdirty(mk_pte(page, | ||
76 | vma->vm_page_prot))); | ||
77 | else | ||
78 | entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot)); | ||
79 | entry = pte_mkyoung(entry); | ||
80 | mk_pte_huge(entry); | ||
81 | 85 | ||
82 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | 86 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { |
83 | set_pte_at(mm, addr, page_table, entry); | 87 | pte_clear(mm, addr, ptep); |
84 | page_table++; | ||
85 | addr += PAGE_SIZE; | 88 | addr += PAGE_SIZE; |
86 | 89 | ptep++; | |
87 | pte_val(entry) += PAGE_SIZE; | ||
88 | } | 90 | } |
91 | |||
92 | return entry; | ||
89 | } | 93 | } |
90 | 94 | ||
91 | /* | 95 | /* |
@@ -100,79 +104,6 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | |||
100 | return 0; | 104 | return 0; |
101 | } | 105 | } |
102 | 106 | ||
103 | int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, | ||
104 | struct vm_area_struct *vma) | ||
105 | { | ||
106 | pte_t *src_pte, *dst_pte, entry; | ||
107 | struct page *ptepage; | ||
108 | unsigned long addr = vma->vm_start; | ||
109 | unsigned long end = vma->vm_end; | ||
110 | int i; | ||
111 | |||
112 | while (addr < end) { | ||
113 | dst_pte = huge_pte_alloc(dst, addr); | ||
114 | if (!dst_pte) | ||
115 | goto nomem; | ||
116 | src_pte = huge_pte_offset(src, addr); | ||
117 | BUG_ON(!src_pte || pte_none(*src_pte)); | ||
118 | entry = *src_pte; | ||
119 | ptepage = pte_page(entry); | ||
120 | get_page(ptepage); | ||
121 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | ||
122 | set_pte_at(dst, addr, dst_pte, entry); | ||
123 | pte_val(entry) += PAGE_SIZE; | ||
124 | dst_pte++; | ||
125 | addr += PAGE_SIZE; | ||
126 | } | ||
127 | add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); | ||
128 | } | ||
129 | return 0; | ||
130 | |||
131 | nomem: | ||
132 | return -ENOMEM; | ||
133 | } | ||
134 | |||
135 | int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, | ||
136 | struct page **pages, struct vm_area_struct **vmas, | ||
137 | unsigned long *position, int *length, int i) | ||
138 | { | ||
139 | unsigned long vaddr = *position; | ||
140 | int remainder = *length; | ||
141 | |||
142 | WARN_ON(!is_vm_hugetlb_page(vma)); | ||
143 | |||
144 | while (vaddr < vma->vm_end && remainder) { | ||
145 | if (pages) { | ||
146 | pte_t *pte; | ||
147 | struct page *page; | ||
148 | |||
149 | pte = huge_pte_offset(mm, vaddr); | ||
150 | |||
151 | /* hugetlb should be locked, and hence, prefaulted */ | ||
152 | BUG_ON(!pte || pte_none(*pte)); | ||
153 | |||
154 | page = pte_page(*pte); | ||
155 | |||
156 | WARN_ON(!PageCompound(page)); | ||
157 | |||
158 | get_page(page); | ||
159 | pages[i] = page; | ||
160 | } | ||
161 | |||
162 | if (vmas) | ||
163 | vmas[i] = vma; | ||
164 | |||
165 | vaddr += PAGE_SIZE; | ||
166 | --remainder; | ||
167 | ++i; | ||
168 | } | ||
169 | |||
170 | *length = remainder; | ||
171 | *position = vaddr; | ||
172 | |||
173 | return i; | ||
174 | } | ||
175 | |||
176 | struct page *follow_huge_addr(struct mm_struct *mm, | 107 | struct page *follow_huge_addr(struct mm_struct *mm, |
177 | unsigned long address, int write) | 108 | unsigned long address, int write) |
178 | { | 109 | { |
@@ -190,34 +121,6 @@ struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | |||
190 | return NULL; | 121 | return NULL; |
191 | } | 122 | } |
192 | 123 | ||
193 | void unmap_hugepage_range(struct vm_area_struct *vma, | ||
194 | unsigned long start, unsigned long end) | ||
195 | { | ||
196 | struct mm_struct *mm = vma->vm_mm; | ||
197 | unsigned long address; | ||
198 | pte_t *pte; | ||
199 | struct page *page; | ||
200 | int i; | ||
201 | |||
202 | BUG_ON(start & (HPAGE_SIZE - 1)); | ||
203 | BUG_ON(end & (HPAGE_SIZE - 1)); | ||
204 | |||
205 | for (address = start; address < end; address += HPAGE_SIZE) { | ||
206 | pte = huge_pte_offset(mm, address); | ||
207 | BUG_ON(!pte); | ||
208 | if (pte_none(*pte)) | ||
209 | continue; | ||
210 | page = pte_page(*pte); | ||
211 | put_page(page); | ||
212 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | ||
213 | pte_clear(mm, address+(i*PAGE_SIZE), pte); | ||
214 | pte++; | ||
215 | } | ||
216 | } | ||
217 | add_mm_counter(mm, rss, -((end - start) >> PAGE_SHIFT)); | ||
218 | flush_tlb_range(vma, start, end); | ||
219 | } | ||
220 | |||
221 | static void context_reload(void *__data) | 124 | static void context_reload(void *__data) |
222 | { | 125 | { |
223 | struct mm_struct *mm = __data; | 126 | struct mm_struct *mm = __data; |
@@ -226,12 +129,8 @@ static void context_reload(void *__data) | |||
226 | load_secondary_context(mm); | 129 | load_secondary_context(mm); |
227 | } | 130 | } |
228 | 131 | ||
229 | int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) | 132 | void hugetlb_prefault_arch_hook(struct mm_struct *mm) |
230 | { | 133 | { |
231 | struct mm_struct *mm = current->mm; | ||
232 | unsigned long addr; | ||
233 | int ret = 0; | ||
234 | |||
235 | /* On UltraSPARC-III+ and later, configure the second half of | 134 | /* On UltraSPARC-III+ and later, configure the second half of |
236 | * the Data-TLB for huge pages. | 135 | * the Data-TLB for huge pages. |
237 | */ | 136 | */ |
@@ -261,50 +160,4 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) | |||
261 | } | 160 | } |
262 | spin_unlock(&ctx_alloc_lock); | 161 | spin_unlock(&ctx_alloc_lock); |
263 | } | 162 | } |
264 | |||
265 | BUG_ON(vma->vm_start & ~HPAGE_MASK); | ||
266 | BUG_ON(vma->vm_end & ~HPAGE_MASK); | ||
267 | |||
268 | spin_lock(&mm->page_table_lock); | ||
269 | for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) { | ||
270 | unsigned long idx; | ||
271 | pte_t *pte = huge_pte_alloc(mm, addr); | ||
272 | struct page *page; | ||
273 | |||
274 | if (!pte) { | ||
275 | ret = -ENOMEM; | ||
276 | goto out; | ||
277 | } | ||
278 | if (!pte_none(*pte)) | ||
279 | continue; | ||
280 | |||
281 | idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) | ||
282 | + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); | ||
283 | page = find_get_page(mapping, idx); | ||
284 | if (!page) { | ||
285 | /* charge the fs quota first */ | ||
286 | if (hugetlb_get_quota(mapping)) { | ||
287 | ret = -ENOMEM; | ||
288 | goto out; | ||
289 | } | ||
290 | page = alloc_huge_page(); | ||
291 | if (!page) { | ||
292 | hugetlb_put_quota(mapping); | ||
293 | ret = -ENOMEM; | ||
294 | goto out; | ||
295 | } | ||
296 | ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC); | ||
297 | if (! ret) { | ||
298 | unlock_page(page); | ||
299 | } else { | ||
300 | hugetlb_put_quota(mapping); | ||
301 | free_huge_page(page); | ||
302 | goto out; | ||
303 | } | ||
304 | } | ||
305 | set_huge_pte(mm, vma, addr, page, pte, vma->vm_flags & VM_WRITE); | ||
306 | } | ||
307 | out: | ||
308 | spin_unlock(&mm->page_table_lock); | ||
309 | return ret; | ||
310 | } | 163 | } |
diff --git a/arch/sparc64/solaris/socket.c b/arch/sparc64/solaris/socket.c index ec8e074c4eac..06740582717e 100644 --- a/arch/sparc64/solaris/socket.c +++ b/arch/sparc64/solaris/socket.c | |||
@@ -317,8 +317,10 @@ asmlinkage int solaris_sendmsg(int fd, struct sol_nmsghdr __user *user_msg, unsi | |||
317 | unsigned long *kcmsg; | 317 | unsigned long *kcmsg; |
318 | compat_size_t cmlen; | 318 | compat_size_t cmlen; |
319 | 319 | ||
320 | if(kern_msg.msg_controllen > sizeof(ctl) && | 320 | if (kern_msg.msg_controllen <= sizeof(compat_size_t)) |
321 | kern_msg.msg_controllen <= 256) { | 321 | return -EINVAL; |
322 | |||
323 | if(kern_msg.msg_controllen > sizeof(ctl)) { | ||
322 | err = -ENOBUFS; | 324 | err = -ENOBUFS; |
323 | ctl_buf = kmalloc(kern_msg.msg_controllen, GFP_KERNEL); | 325 | ctl_buf = kmalloc(kern_msg.msg_controllen, GFP_KERNEL); |
324 | if(!ctl_buf) | 326 | if(!ctl_buf) |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index c5292181a664..b8e952c88fd1 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -35,6 +35,11 @@ config GENERIC_CALIBRATE_DELAY | |||
35 | bool | 35 | bool |
36 | default y | 36 | default y |
37 | 37 | ||
38 | # Used in kernel/irq/manage.c and include/linux/irq.h | ||
39 | config IRQ_RELEASE_METHOD | ||
40 | bool | ||
41 | default y | ||
42 | |||
38 | menu "UML-specific options" | 43 | menu "UML-specific options" |
39 | 44 | ||
40 | config MODE_TT | 45 | config MODE_TT |
diff --git a/arch/um/Makefile b/arch/um/Makefile index f2a0c40a9204..3f073902351f 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -122,7 +122,7 @@ endif | |||
122 | CPPFLAGS_vmlinux.lds = $(shell echo -U$(SUBARCH) \ | 122 | CPPFLAGS_vmlinux.lds = $(shell echo -U$(SUBARCH) \ |
123 | -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ | 123 | -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ |
124 | -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE-y) \ | 124 | -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE-y) \ |
125 | -DKERNEL_STACK_SIZE=$(STACK_SIZE)) | 125 | -DKERNEL_STACK_SIZE=$(STACK_SIZE) -DSUBARCH=$(SUBARCH)) |
126 | 126 | ||
127 | #The wrappers will select whether using "malloc" or the kernel allocator. | 127 | #The wrappers will select whether using "malloc" or the kernel allocator. |
128 | LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc | 128 | LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 025d3be8aca4..0f59736db329 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -406,14 +406,12 @@ void line_disable(struct tty_struct *tty, int current_irq) | |||
406 | if(line->driver->read_irq == current_irq) | 406 | if(line->driver->read_irq == current_irq) |
407 | free_irq_later(line->driver->read_irq, tty); | 407 | free_irq_later(line->driver->read_irq, tty); |
408 | else { | 408 | else { |
409 | free_irq_by_irq_and_dev(line->driver->read_irq, tty); | ||
410 | free_irq(line->driver->read_irq, tty); | 409 | free_irq(line->driver->read_irq, tty); |
411 | } | 410 | } |
412 | 411 | ||
413 | if(line->driver->write_irq == current_irq) | 412 | if(line->driver->write_irq == current_irq) |
414 | free_irq_later(line->driver->write_irq, tty); | 413 | free_irq_later(line->driver->write_irq, tty); |
415 | else { | 414 | else { |
416 | free_irq_by_irq_and_dev(line->driver->write_irq, tty); | ||
417 | free_irq(line->driver->write_irq, tty); | 415 | free_irq(line->driver->write_irq, tty); |
418 | } | 416 | } |
419 | 417 | ||
@@ -758,7 +756,6 @@ static void unregister_winch(struct tty_struct *tty) | |||
758 | if(winch->pid != -1) | 756 | if(winch->pid != -1) |
759 | os_kill_process(winch->pid, 1); | 757 | os_kill_process(winch->pid, 1); |
760 | 758 | ||
761 | free_irq_by_irq_and_dev(WINCH_IRQ, winch); | ||
762 | free_irq(WINCH_IRQ, winch); | 759 | free_irq(WINCH_IRQ, winch); |
763 | list_del(&winch->list); | 760 | list_del(&winch->list); |
764 | kfree(winch); | 761 | kfree(winch); |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 4eeaf88c1e97..5388a7428691 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -146,7 +146,6 @@ static int uml_net_close(struct net_device *dev) | |||
146 | netif_stop_queue(dev); | 146 | netif_stop_queue(dev); |
147 | spin_lock(&lp->lock); | 147 | spin_lock(&lp->lock); |
148 | 148 | ||
149 | free_irq_by_irq_and_dev(dev->irq, dev); | ||
150 | free_irq(dev->irq, dev); | 149 | free_irq(dev->irq, dev); |
151 | if(lp->close != NULL) | 150 | if(lp->close != NULL) |
152 | (*lp->close)(lp->fd, &lp->user); | 151 | (*lp->close)(lp->fd, &lp->user); |
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c index b5ee07472f79..c41efd207fcc 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c | |||
@@ -257,7 +257,6 @@ int port_wait(void *data) | |||
257 | * connection. Then we loop here throwing out failed | 257 | * connection. Then we loop here throwing out failed |
258 | * connections until a good one is found. | 258 | * connections until a good one is found. |
259 | */ | 259 | */ |
260 | free_irq_by_irq_and_dev(TELNETD_IRQ, conn); | ||
261 | free_irq(TELNETD_IRQ, conn); | 260 | free_irq(TELNETD_IRQ, conn); |
262 | 261 | ||
263 | if(conn->fd >= 0) break; | 262 | if(conn->fd >= 0) break; |
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c index a4fdf3584ad2..d269a80f4b0c 100644 --- a/arch/um/drivers/xterm_kern.c +++ b/arch/um/drivers/xterm_kern.c | |||
@@ -69,7 +69,6 @@ int xterm_fd(int socket, int *pid_out) | |||
69 | * isn't set) this will hang... */ | 69 | * isn't set) this will hang... */ |
70 | wait_for_completion(&data->ready); | 70 | wait_for_completion(&data->ready); |
71 | 71 | ||
72 | free_irq_by_irq_and_dev(XTERM_IRQ, data); | ||
73 | free_irq(XTERM_IRQ, data); | 72 | free_irq(XTERM_IRQ, data); |
74 | 73 | ||
75 | ret = data->new_fd; | 74 | ret = data->new_fd; |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index d44fb5282547..9f18061ef4c9 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -124,14 +124,16 @@ void irq_unlock(unsigned long flags) | |||
124 | spin_unlock_irqrestore(&irq_spinlock, flags); | 124 | spin_unlock_irqrestore(&irq_spinlock, flags); |
125 | } | 125 | } |
126 | 126 | ||
127 | /* presently hw_interrupt_type must define (startup || enable) && | 127 | /* hw_interrupt_type must define (startup || enable) && |
128 | * disable && end */ | 128 | * (shutdown || disable) && end */ |
129 | static void dummy(unsigned int irq) | 129 | static void dummy(unsigned int irq) |
130 | { | 130 | { |
131 | } | 131 | } |
132 | 132 | ||
133 | static struct hw_interrupt_type SIGIO_irq_type = { | 133 | /* This is used for everything else than the timer. */ |
134 | static struct hw_interrupt_type normal_irq_type = { | ||
134 | .typename = "SIGIO", | 135 | .typename = "SIGIO", |
136 | .release = free_irq_by_irq_and_dev, | ||
135 | .disable = dummy, | 137 | .disable = dummy, |
136 | .enable = dummy, | 138 | .enable = dummy, |
137 | .ack = dummy, | 139 | .ack = dummy, |
@@ -140,6 +142,7 @@ static struct hw_interrupt_type SIGIO_irq_type = { | |||
140 | 142 | ||
141 | static struct hw_interrupt_type SIGVTALRM_irq_type = { | 143 | static struct hw_interrupt_type SIGVTALRM_irq_type = { |
142 | .typename = "SIGVTALRM", | 144 | .typename = "SIGVTALRM", |
145 | .release = free_irq_by_irq_and_dev, | ||
143 | .shutdown = dummy, /* never called */ | 146 | .shutdown = dummy, /* never called */ |
144 | .disable = dummy, | 147 | .disable = dummy, |
145 | .enable = dummy, | 148 | .enable = dummy, |
@@ -160,7 +163,7 @@ void __init init_IRQ(void) | |||
160 | irq_desc[i].status = IRQ_DISABLED; | 163 | irq_desc[i].status = IRQ_DISABLED; |
161 | irq_desc[i].action = NULL; | 164 | irq_desc[i].action = NULL; |
162 | irq_desc[i].depth = 1; | 165 | irq_desc[i].depth = 1; |
163 | irq_desc[i].handler = &SIGIO_irq_type; | 166 | irq_desc[i].handler = &normal_irq_type; |
164 | enable_irq(i); | 167 | enable_irq(i); |
165 | } | 168 | } |
166 | } | 169 | } |
diff --git a/arch/um/kernel/irq_user.c b/arch/um/kernel/irq_user.c index b3074cbaa479..c3ccaf24f3e0 100644 --- a/arch/um/kernel/irq_user.c +++ b/arch/um/kernel/irq_user.c | |||
@@ -85,8 +85,6 @@ void sigio_handler(int sig, union uml_pt_regs *regs) | |||
85 | next = irq_fd->next; | 85 | next = irq_fd->next; |
86 | if(irq_fd->freed){ | 86 | if(irq_fd->freed){ |
87 | free_irq(irq_fd->irq, irq_fd->id); | 87 | free_irq(irq_fd->irq, irq_fd->id); |
88 | free_irq_by_irq_and_dev(irq_fd->irq, | ||
89 | irq_fd->id); | ||
90 | } | 88 | } |
91 | } | 89 | } |
92 | } | 90 | } |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index c22825f13e40..5597bd39e6b5 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -53,7 +53,6 @@ static void setup_highmem(unsigned long highmem_start, | |||
53 | for(i = 0; i < highmem_len >> PAGE_SHIFT; i++){ | 53 | for(i = 0; i < highmem_len >> PAGE_SHIFT; i++){ |
54 | page = &mem_map[highmem_pfn + i]; | 54 | page = &mem_map[highmem_pfn + i]; |
55 | ClearPageReserved(page); | 55 | ClearPageReserved(page); |
56 | set_bit(PG_highmem, &page->flags); | ||
57 | set_page_count(page, 1); | 56 | set_page_count(page, 1); |
58 | __free_page(page); | 57 | __free_page(page); |
59 | } | 58 | } |
diff --git a/arch/um/kernel/tt/Makefile b/arch/um/kernel/tt/Makefile index c3faea21a996..3fd2554e60b6 100644 --- a/arch/um/kernel/tt/Makefile +++ b/arch/um/kernel/tt/Makefile | |||
@@ -3,10 +3,6 @@ | |||
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
5 | 5 | ||
6 | extra-y := unmap_fin.o | ||
7 | targets := unmap.o | ||
8 | clean-files := unmap_tmp.o | ||
9 | |||
10 | obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ | 6 | obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ |
11 | syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ | 7 | syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ |
12 | uaccess.o uaccess_user.o | 8 | uaccess.o uaccess_user.o |
@@ -16,14 +12,3 @@ obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/ | |||
16 | USER_OBJS := gdb.o time.o tracer.o | 12 | USER_OBJS := gdb.o time.o tracer.o |
17 | 13 | ||
18 | include arch/um/scripts/Makefile.rules | 14 | include arch/um/scripts/Makefile.rules |
19 | |||
20 | UNMAP_CFLAGS := $(patsubst -pg -DPROFILING,,$(USER_CFLAGS)) | ||
21 | UNMAP_CFLAGS := $(patsubst -fprofile-arcs -ftest-coverage,,$(UNMAP_CFLAGS)) | ||
22 | |||
23 | #XXX: partially copied from arch/um/scripts/Makefile.rules | ||
24 | $(obj)/unmap.o: c_flags = -Wp,-MD,$(depfile) $(UNMAP_CFLAGS) | ||
25 | |||
26 | $(obj)/unmap_fin.o : $(obj)/unmap.o | ||
27 | $(LD) -r -o $(obj)/unmap_tmp.o $< $(shell $(CC) -print-file-name=libc.a) | ||
28 | $(OBJCOPY) $(obj)/unmap_tmp.o $@ -G switcheroo | ||
29 | |||
diff --git a/arch/um/kernel/tt/unmap.c b/arch/um/kernel/tt/unmap.c deleted file mode 100644 index 3f7aecdbe532..000000000000 --- a/arch/um/kernel/tt/unmap.c +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <sys/mman.h> | ||
7 | |||
8 | int switcheroo(int fd, int prot, void *from, void *to, int size) | ||
9 | { | ||
10 | if(munmap(to, size) < 0){ | ||
11 | return(-1); | ||
12 | } | ||
13 | if(mmap(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) != to){ | ||
14 | return(-1); | ||
15 | } | ||
16 | if(munmap(from, size) < 0){ | ||
17 | return(-1); | ||
18 | } | ||
19 | return(0); | ||
20 | } | ||
21 | |||
22 | /* | ||
23 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
24 | * Emacs will notice this stuff at the end of the file and automatically | ||
25 | * adjust the settings for this buffer only. This must remain at the end | ||
26 | * of the file. | ||
27 | * --------------------------------------------------------------------------- | ||
28 | * Local variables: | ||
29 | * c-file-style: "linux" | ||
30 | * End: | ||
31 | */ | ||
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index dd5355500bdc..61dfd4fef752 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S | |||
@@ -14,19 +14,10 @@ SECTIONS | |||
14 | /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start | 14 | /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start |
15 | * is remapped.*/ | 15 | * is remapped.*/ |
16 | __binary_start = .; | 16 | __binary_start = .; |
17 | #ifdef MODE_TT | ||
18 | .thread_private : { | ||
19 | __start_thread_private = .; | ||
20 | errno = .; | ||
21 | . += 4; | ||
22 | arch/um/kernel/tt/unmap_fin.o (.data) | ||
23 | __end_thread_private = .; | ||
24 | } | ||
25 | . = ALIGN(4096); | ||
26 | .remap : { arch/um/kernel/tt/unmap_fin.o (.text) } | ||
27 | 17 | ||
28 | /* We want it only if we are in MODE_TT. In both cases, however, when MODE_TT | 18 | #ifdef MODE_TT |
29 | * is off the resulting binary segfaults.*/ | 19 | .remap_data : { arch/um/sys-SUBARCH/unmap_fin.o (.data .bss) } |
20 | .remap : { arch/um/sys-SUBARCH/unmap_fin.o (.text) } | ||
30 | 21 | ||
31 | . = ALIGN(4096); /* Init code and data */ | 22 | . = ALIGN(4096); /* Init code and data */ |
32 | #endif | 23 | #endif |
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 98346c711493..7459d09c233e 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -10,6 +10,12 @@ USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) | |||
10 | $(USER_OBJS) : c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \ | 10 | $(USER_OBJS) : c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \ |
11 | $(CFLAGS_$(notdir $@)) | 11 | $(CFLAGS_$(notdir $@)) |
12 | 12 | ||
13 | # The stubs and unmap.o can't try to call mcount or update basic block data | ||
14 | define unprofile | ||
15 | $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1))) | ||
16 | endef | ||
17 | |||
18 | |||
13 | quiet_cmd_make_link = SYMLINK $@ | 19 | quiet_cmd_make_link = SYMLINK $@ |
14 | cmd_make_link = ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@ | 20 | cmd_make_link = ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@ |
15 | 21 | ||
diff --git a/arch/um/scripts/Makefile.unmap b/arch/um/scripts/Makefile.unmap new file mode 100644 index 000000000000..37a8f9765295 --- /dev/null +++ b/arch/um/scripts/Makefile.unmap | |||
@@ -0,0 +1,22 @@ | |||
1 | clean-files += unmap_tmp.o unmap_fin.o unmap.o | ||
2 | |||
3 | ifdef CONFIG_MODE_TT | ||
4 | |||
5 | #Always build unmap_fin.o | ||
6 | extra-y += unmap_fin.o | ||
7 | #Do dependency tracking for unmap.o (it will be always built, but won't get the tracking unless we use this). | ||
8 | targets += unmap.o | ||
9 | |||
10 | #XXX: partially copied from arch/um/scripts/Makefile.rules | ||
11 | $(obj)/unmap.o: _c_flags = $(call unprofile,$(CFLAGS)) | ||
12 | |||
13 | quiet_cmd_wrapld = LD $@ | ||
14 | define cmd_wrapld | ||
15 | $(LD) -r -o $(obj)/unmap_tmp.o $< $(shell $(CC) -print-file-name=libc.a); \ | ||
16 | $(OBJCOPY) $(obj)/unmap_tmp.o $@ -G switcheroo | ||
17 | endef | ||
18 | |||
19 | $(obj)/unmap_fin.o : $(obj)/unmap.o FORCE | ||
20 | $(call if_changed,wrapld) | ||
21 | |||
22 | endif | ||
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 4351e5605506..095bcdb0b9cc 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -17,3 +17,5 @@ highmem.c-dir = mm | |||
17 | module.c-dir = kernel | 17 | module.c-dir = kernel |
18 | 18 | ||
19 | subdir- := util | 19 | subdir- := util |
20 | |||
21 | include arch/um/scripts/Makefile.unmap | ||
diff --git a/arch/um/sys-i386/unmap.c b/arch/um/sys-i386/unmap.c new file mode 100644 index 000000000000..136875263d27 --- /dev/null +++ b/arch/um/sys-i386/unmap.c | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <linux/mman.h> | ||
7 | #include <asm/unistd.h> | ||
8 | |||
9 | static int errno; | ||
10 | |||
11 | static inline _syscall2(int,munmap,void *,start,size_t,len) | ||
12 | static inline _syscall6(void *,mmap2,void *,addr,size_t,len,int,prot,int,flags,int,fd,off_t,offset) | ||
13 | int switcheroo(int fd, int prot, void *from, void *to, int size) | ||
14 | { | ||
15 | if(munmap(to, size) < 0){ | ||
16 | return(-1); | ||
17 | } | ||
18 | if(mmap2(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) != to){ | ||
19 | return(-1); | ||
20 | } | ||
21 | if(munmap(from, size) < 0){ | ||
22 | return(-1); | ||
23 | } | ||
24 | return(0); | ||
25 | } | ||
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index 608466ad6b22..2bc6f6849010 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -29,3 +29,5 @@ thunk.S-dir = lib | |||
29 | module.c-dir = kernel | 29 | module.c-dir = kernel |
30 | 30 | ||
31 | subdir- := util | 31 | subdir- := util |
32 | |||
33 | include arch/um/scripts/Makefile.unmap | ||
diff --git a/arch/um/sys-x86_64/unmap.c b/arch/um/sys-x86_64/unmap.c new file mode 100644 index 000000000000..bc7094cce47e --- /dev/null +++ b/arch/um/sys-x86_64/unmap.c | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <linux/mman.h> | ||
7 | #include <asm/unistd.h> | ||
8 | |||
9 | static int errno; | ||
10 | |||
11 | static inline _syscall2(int,munmap,void *,start,size_t,len) | ||
12 | static inline _syscall6(void *,mmap,void *,addr,size_t,len,int,prot,int,flags,int,fd,off_t,offset) | ||
13 | int switcheroo(int fd, int prot, void *from, void *to, int size) | ||
14 | { | ||
15 | if(munmap(to, size) < 0){ | ||
16 | return(-1); | ||
17 | } | ||
18 | if(mmap(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) != to){ | ||
19 | return(-1); | ||
20 | } | ||
21 | if(munmap(from, size) < 0){ | ||
22 | return(-1); | ||
23 | } | ||
24 | return(0); | ||
25 | } | ||
diff --git a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c index 1965efc974dc..c12edf5d97f0 100644 --- a/arch/x86_64/ia32/ia32_aout.c +++ b/arch/x86_64/ia32/ia32_aout.c | |||
@@ -312,6 +312,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
312 | current->mm->brk = ex.a_bss + | 312 | current->mm->brk = ex.a_bss + |
313 | (current->mm->start_brk = N_BSSADDR(ex)); | 313 | (current->mm->start_brk = N_BSSADDR(ex)); |
314 | current->mm->free_area_cache = TASK_UNMAPPED_BASE; | 314 | current->mm->free_area_cache = TASK_UNMAPPED_BASE; |
315 | current->mm->cached_hole_size = 0; | ||
315 | 316 | ||
316 | set_mm_counter(current->mm, rss, 0); | 317 | set_mm_counter(current->mm, rss, 0); |
317 | current->mm->mmap = NULL; | 318 | current->mm->mmap = NULL; |
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 99b522052d16..c8131f342cfc 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c | |||
@@ -46,7 +46,7 @@ struct elf_phdr; | |||
46 | 46 | ||
47 | #define IA32_EMULATOR 1 | 47 | #define IA32_EMULATOR 1 |
48 | 48 | ||
49 | #define ELF_ET_DYN_BASE (TASK_UNMAPPED_32 + 0x1000000) | 49 | #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000) |
50 | 50 | ||
51 | #undef ELF_ARCH | 51 | #undef ELF_ARCH |
52 | #define ELF_ARCH EM_386 | 52 | #define ELF_ARCH EM_386 |
@@ -307,9 +307,6 @@ MODULE_AUTHOR("Eric Youngdale, Andi Kleen"); | |||
307 | 307 | ||
308 | #define elf_addr_t __u32 | 308 | #define elf_addr_t __u32 |
309 | 309 | ||
310 | #undef TASK_SIZE | ||
311 | #define TASK_SIZE 0xffffffff | ||
312 | |||
313 | static void elf32_init(struct pt_regs *); | 310 | static void elf32_init(struct pt_regs *); |
314 | 311 | ||
315 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | 312 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 |
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 761b6d35e338..dce8bab4306c 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -656,7 +656,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) | |||
656 | 656 | ||
657 | switch (code) { | 657 | switch (code) { |
658 | case ARCH_SET_GS: | 658 | case ARCH_SET_GS: |
659 | if (addr >= TASK_SIZE) | 659 | if (addr >= TASK_SIZE_OF(task)) |
660 | return -EPERM; | 660 | return -EPERM; |
661 | cpu = get_cpu(); | 661 | cpu = get_cpu(); |
662 | /* handle small bases via the GDT because that's faster to | 662 | /* handle small bases via the GDT because that's faster to |
@@ -682,7 +682,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) | |||
682 | case ARCH_SET_FS: | 682 | case ARCH_SET_FS: |
683 | /* Not strictly needed for fs, but do it for symmetry | 683 | /* Not strictly needed for fs, but do it for symmetry |
684 | with gs */ | 684 | with gs */ |
685 | if (addr >= TASK_SIZE) | 685 | if (addr >= TASK_SIZE_OF(task)) |
686 | return -EPERM; | 686 | return -EPERM; |
687 | cpu = get_cpu(); | 687 | cpu = get_cpu(); |
688 | /* handle small bases via the GDT because that's faster to | 688 | /* handle small bases via the GDT because that's faster to |
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c index 525f6a128a27..bbf64b59a21e 100644 --- a/arch/x86_64/kernel/ptrace.c +++ b/arch/x86_64/kernel/ptrace.c | |||
@@ -257,12 +257,12 @@ static int putreg(struct task_struct *child, | |||
257 | value &= 0xffff; | 257 | value &= 0xffff; |
258 | return 0; | 258 | return 0; |
259 | case offsetof(struct user_regs_struct,fs_base): | 259 | case offsetof(struct user_regs_struct,fs_base): |
260 | if (value >= TASK_SIZE) | 260 | if (value >= TASK_SIZE_OF(child)) |
261 | return -EIO; | 261 | return -EIO; |
262 | child->thread.fs = value; | 262 | child->thread.fs = value; |
263 | return 0; | 263 | return 0; |
264 | case offsetof(struct user_regs_struct,gs_base): | 264 | case offsetof(struct user_regs_struct,gs_base): |
265 | if (value >= TASK_SIZE) | 265 | if (value >= TASK_SIZE_OF(child)) |
266 | return -EIO; | 266 | return -EIO; |
267 | child->thread.gs = value; | 267 | child->thread.gs = value; |
268 | return 0; | 268 | return 0; |
@@ -279,7 +279,7 @@ static int putreg(struct task_struct *child, | |||
279 | break; | 279 | break; |
280 | case offsetof(struct user_regs_struct, rip): | 280 | case offsetof(struct user_regs_struct, rip): |
281 | /* Check if the new RIP address is canonical */ | 281 | /* Check if the new RIP address is canonical */ |
282 | if (value >= TASK_SIZE) | 282 | if (value >= TASK_SIZE_OF(child)) |
283 | return -EIO; | 283 | return -EIO; |
284 | break; | 284 | break; |
285 | } | 285 | } |
@@ -419,6 +419,8 @@ asmlinkage long sys_ptrace(long request, long pid, unsigned long addr, long data | |||
419 | break; | 419 | break; |
420 | 420 | ||
421 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | 421 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ |
422 | { | ||
423 | int dsize = test_tsk_thread_flag(child, TIF_IA32) ? 3 : 7; | ||
422 | ret = -EIO; | 424 | ret = -EIO; |
423 | if ((addr & 7) || | 425 | if ((addr & 7) || |
424 | addr > sizeof(struct user) - 7) | 426 | addr > sizeof(struct user) - 7) |
@@ -430,22 +432,22 @@ asmlinkage long sys_ptrace(long request, long pid, unsigned long addr, long data | |||
430 | break; | 432 | break; |
431 | /* Disallows to set a breakpoint into the vsyscall */ | 433 | /* Disallows to set a breakpoint into the vsyscall */ |
432 | case offsetof(struct user, u_debugreg[0]): | 434 | case offsetof(struct user, u_debugreg[0]): |
433 | if (data >= TASK_SIZE-7) break; | 435 | if (data >= TASK_SIZE_OF(child) - dsize) break; |
434 | child->thread.debugreg0 = data; | 436 | child->thread.debugreg0 = data; |
435 | ret = 0; | 437 | ret = 0; |
436 | break; | 438 | break; |
437 | case offsetof(struct user, u_debugreg[1]): | 439 | case offsetof(struct user, u_debugreg[1]): |
438 | if (data >= TASK_SIZE-7) break; | 440 | if (data >= TASK_SIZE_OF(child) - dsize) break; |
439 | child->thread.debugreg1 = data; | 441 | child->thread.debugreg1 = data; |
440 | ret = 0; | 442 | ret = 0; |
441 | break; | 443 | break; |
442 | case offsetof(struct user, u_debugreg[2]): | 444 | case offsetof(struct user, u_debugreg[2]): |
443 | if (data >= TASK_SIZE-7) break; | 445 | if (data >= TASK_SIZE_OF(child) - dsize) break; |
444 | child->thread.debugreg2 = data; | 446 | child->thread.debugreg2 = data; |
445 | ret = 0; | 447 | ret = 0; |
446 | break; | 448 | break; |
447 | case offsetof(struct user, u_debugreg[3]): | 449 | case offsetof(struct user, u_debugreg[3]): |
448 | if (data >= TASK_SIZE-7) break; | 450 | if (data >= TASK_SIZE_OF(child) - dsize) break; |
449 | child->thread.debugreg3 = data; | 451 | child->thread.debugreg3 = data; |
450 | ret = 0; | 452 | ret = 0; |
451 | break; | 453 | break; |
@@ -469,6 +471,7 @@ asmlinkage long sys_ptrace(long request, long pid, unsigned long addr, long data | |||
469 | break; | 471 | break; |
470 | } | 472 | } |
471 | break; | 473 | break; |
474 | } | ||
472 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | 475 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ |
473 | case PTRACE_CONT: /* restart after signal. */ | 476 | case PTRACE_CONT: /* restart after signal. */ |
474 | 477 | ||
diff --git a/arch/x86_64/kernel/sys_x86_64.c b/arch/x86_64/kernel/sys_x86_64.c index dbebd5ccba6b..cc7821c68851 100644 --- a/arch/x86_64/kernel/sys_x86_64.c +++ b/arch/x86_64/kernel/sys_x86_64.c | |||
@@ -68,13 +68,7 @@ out: | |||
68 | static void find_start_end(unsigned long flags, unsigned long *begin, | 68 | static void find_start_end(unsigned long flags, unsigned long *begin, |
69 | unsigned long *end) | 69 | unsigned long *end) |
70 | { | 70 | { |
71 | #ifdef CONFIG_IA32_EMULATION | 71 | if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT)) { |
72 | if (test_thread_flag(TIF_IA32)) { | ||
73 | *begin = TASK_UNMAPPED_32; | ||
74 | *end = IA32_PAGE_OFFSET; | ||
75 | } else | ||
76 | #endif | ||
77 | if (flags & MAP_32BIT) { | ||
78 | /* This is usually used needed to map code in small | 72 | /* This is usually used needed to map code in small |
79 | model, so it needs to be in the first 31bit. Limit | 73 | model, so it needs to be in the first 31bit. Limit |
80 | it to that. This means we need to move the | 74 | it to that. This means we need to move the |
@@ -84,10 +78,10 @@ static void find_start_end(unsigned long flags, unsigned long *begin, | |||
84 | of playground for now. -AK */ | 78 | of playground for now. -AK */ |
85 | *begin = 0x40000000; | 79 | *begin = 0x40000000; |
86 | *end = 0x80000000; | 80 | *end = 0x80000000; |
87 | } else { | 81 | } else { |
88 | *begin = TASK_UNMAPPED_64; | 82 | *begin = TASK_UNMAPPED_BASE; |
89 | *end = TASK_SIZE; | 83 | *end = TASK_SIZE; |
90 | } | 84 | } |
91 | } | 85 | } |
92 | 86 | ||
93 | unsigned long | 87 | unsigned long |
@@ -111,6 +105,11 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
111 | (!vma || addr + len <= vma->vm_start)) | 105 | (!vma || addr + len <= vma->vm_start)) |
112 | return addr; | 106 | return addr; |
113 | } | 107 | } |
108 | if (((flags & MAP_32BIT) || test_thread_flag(TIF_IA32)) | ||
109 | && len <= mm->cached_hole_size) { | ||
110 | mm->cached_hole_size = 0; | ||
111 | mm->free_area_cache = begin; | ||
112 | } | ||
114 | addr = mm->free_area_cache; | 113 | addr = mm->free_area_cache; |
115 | if (addr < begin) | 114 | if (addr < begin) |
116 | addr = begin; | 115 | addr = begin; |
@@ -126,6 +125,7 @@ full_search: | |||
126 | */ | 125 | */ |
127 | if (start_addr != begin) { | 126 | if (start_addr != begin) { |
128 | start_addr = addr = begin; | 127 | start_addr = addr = begin; |
128 | mm->cached_hole_size = 0; | ||
129 | goto full_search; | 129 | goto full_search; |
130 | } | 130 | } |
131 | return -ENOMEM; | 131 | return -ENOMEM; |
@@ -137,6 +137,9 @@ full_search: | |||
137 | mm->free_area_cache = addr + len; | 137 | mm->free_area_cache = addr + len; |
138 | return addr; | 138 | return addr; |
139 | } | 139 | } |
140 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
141 | mm->cached_hole_size = vma->vm_start - addr; | ||
142 | |||
140 | addr = vma->vm_end; | 143 | addr = vma->vm_end; |
141 | } | 144 | } |
142 | } | 145 | } |
diff --git a/arch/x86_64/lib/delay.c b/arch/x86_64/lib/delay.c index 6e2d66472eb1..aed61a668a1b 100644 --- a/arch/x86_64/lib/delay.c +++ b/arch/x86_64/lib/delay.c | |||
@@ -34,7 +34,7 @@ void __delay(unsigned long loops) | |||
34 | 34 | ||
35 | inline void __const_udelay(unsigned long xloops) | 35 | inline void __const_udelay(unsigned long xloops) |
36 | { | 36 | { |
37 | __delay(((xloops * cpu_data[_smp_processor_id()].loops_per_jiffy) >> 32) * HZ); | 37 | __delay(((xloops * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32) * HZ); |
38 | } | 38 | } |
39 | 39 | ||
40 | void __udelay(unsigned long usecs) | 40 | void __udelay(unsigned long usecs) |
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index 5d6b2114cc9a..57d3ab15a5c7 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c | |||
@@ -350,7 +350,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
350 | * (error_code & 4) == 0, and that the fault was not a | 350 | * (error_code & 4) == 0, and that the fault was not a |
351 | * protection error (error_code & 1) == 0. | 351 | * protection error (error_code & 1) == 0. |
352 | */ | 352 | */ |
353 | if (unlikely(address >= TASK_SIZE)) { | 353 | if (unlikely(address >= TASK_SIZE64)) { |
354 | if (!(error_code & 5) && | 354 | if (!(error_code & 5) && |
355 | ((address >= VMALLOC_START && address < VMALLOC_END) || | 355 | ((address >= VMALLOC_START && address < VMALLOC_END) || |
356 | (address >= MODULES_VADDR && address < MODULES_END))) { | 356 | (address >= MODULES_VADDR && address < MODULES_END))) { |