diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-04 13:35:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-04 13:35:12 -0400 |
commit | de481ba925e880764e38b8756c93c05006892507 (patch) | |
tree | 8ed982c9440f75e3899ea0d4e62bb83f2947fdf9 | |
parent | dd0888c264c0d5feb5d86eb69c1fdbcdb42566af (diff) | |
parent | 64daa4435a40aa1b7d0ece598ae783b89dda13ee (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: (27 commits)
parisc: use generic atomic64 on 32-bit
parisc: superio: fix build breakage
parisc: Fix PCI resource allocation on non-PAT SBA machines
parisc: perf: wire up sys_perf_counter_open
parisc: add task_pt_regs macro
parisc: wire sys_perf_counter_open to sys_ni_syscall
parisc: inventory.c, fix bloated stack frame
parisc: processor.c, fix bloated stack frame
parisc: fix compile warning in mm/init.c
parisc: remove dead code from sys_parisc32.c
parisc: wire up rt_tgsigqueueinfo
parisc: ensure broadcast tlb purge runs single threaded
parisc: fix "delay!" timer handling
parisc: fix mismatched parenthesis in memcpy.c
parisc: Fix gcc 4.4 warning in lba_pci.c
parisc: add parameter to read_cr16()
parisc: decode_exc.c should include kernel.h
parisc: remove obsolete hw_interrupt_type
parisc: fix irq compile bugs in arch/parisc/kernel/irq.c
parisc: advertise PCI devs after "assign_resources"
...
Manually fixed up trivial conflicts in tools/perf/perf.h due to addition
of SH vs HPPA perf-counter support.
34 files changed, 228 insertions, 219 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 9038f39d9d73..06f8d5b5b0f9 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -16,6 +16,8 @@ config PARISC | |||
16 | select RTC_DRV_GENERIC | 16 | select RTC_DRV_GENERIC |
17 | select INIT_ALL_POSSIBLE | 17 | select INIT_ALL_POSSIBLE |
18 | select BUG | 18 | select BUG |
19 | select HAVE_PERF_COUNTERS | ||
20 | select GENERIC_ATOMIC64 if !64BIT | ||
19 | help | 21 | help |
20 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 22 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
21 | in many of their workstations & servers (HP9000 700 and 800 series, | 23 | in many of their workstations & servers (HP9000 700 and 800 series, |
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h index 7eeaff944360..8bc9e96699b2 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h | |||
@@ -222,13 +222,13 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
222 | 222 | ||
223 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 223 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
224 | 224 | ||
225 | #define atomic_add(i,v) ((void)(__atomic_add_return( ((int)(i)),(v)))) | 225 | #define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v)))) |
226 | #define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)(i)),(v)))) | 226 | #define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v)))) |
227 | #define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) | 227 | #define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) |
228 | #define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) | 228 | #define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) |
229 | 229 | ||
230 | #define atomic_add_return(i,v) (__atomic_add_return( ((int)(i)),(v))) | 230 | #define atomic_add_return(i,v) (__atomic_add_return( (i),(v))) |
231 | #define atomic_sub_return(i,v) (__atomic_add_return(-((int)(i)),(v))) | 231 | #define atomic_sub_return(i,v) (__atomic_add_return(-(i),(v))) |
232 | #define atomic_inc_return(v) (__atomic_add_return( 1,(v))) | 232 | #define atomic_inc_return(v) (__atomic_add_return( 1,(v))) |
233 | #define atomic_dec_return(v) (__atomic_add_return( -1,(v))) | 233 | #define atomic_dec_return(v) (__atomic_add_return( -1,(v))) |
234 | 234 | ||
@@ -336,7 +336,11 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
336 | 336 | ||
337 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) | 337 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) |
338 | 338 | ||
339 | #endif /* CONFIG_64BIT */ | 339 | #else /* CONFIG_64BIT */ |
340 | |||
341 | #include <asm-generic/atomic64.h> | ||
342 | |||
343 | #endif /* !CONFIG_64BIT */ | ||
340 | 344 | ||
341 | #include <asm-generic/atomic-long.h> | 345 | #include <asm-generic/atomic-long.h> |
342 | 346 | ||
diff --git a/arch/parisc/include/asm/dma.h b/arch/parisc/include/asm/dma.h index 31ad0f05af3d..f7a18f968703 100644 --- a/arch/parisc/include/asm/dma.h +++ b/arch/parisc/include/asm/dma.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: dma.h,v 1.2 1999/04/27 00:46:18 deller Exp $ | 1 | /* asm/dma.h: Defines for using and allocating dma channels. |
2 | * linux/include/asm/dma.h: Defines for using and allocating dma channels. | ||
3 | * Written by Hennus Bergman, 1992. | 2 | * Written by Hennus Bergman, 1992. |
4 | * High DMA channel support & info by Hannu Savolainen | 3 | * High DMA channel support & info by Hannu Savolainen |
5 | * and John Boyd, Nov. 1992. | 4 | * and John Boyd, Nov. 1992. |
diff --git a/arch/parisc/include/asm/perf_counter.h b/arch/parisc/include/asm/perf_counter.h new file mode 100644 index 000000000000..dc9e829f7013 --- /dev/null +++ b/arch/parisc/include/asm/perf_counter.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_PARISC_PERF_COUNTER_H | ||
2 | #define __ASM_PARISC_PERF_COUNTER_H | ||
3 | |||
4 | /* parisc only supports software counters through this interface. */ | ||
5 | static inline void set_perf_counter_pending(void) { } | ||
6 | |||
7 | #endif /* __ASM_PARISC_PERF_COUNTER_H */ | ||
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index 9d64df8754ba..9ce66e9d1c2b 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/types.h> | 18 | #include <asm/types.h> |
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | #include <asm/percpu.h> | 20 | #include <asm/percpu.h> |
21 | |||
21 | #endif /* __ASSEMBLY__ */ | 22 | #endif /* __ASSEMBLY__ */ |
22 | 23 | ||
23 | #define KERNEL_STACK_SIZE (4*PAGE_SIZE) | 24 | #define KERNEL_STACK_SIZE (4*PAGE_SIZE) |
@@ -127,6 +128,8 @@ struct thread_struct { | |||
127 | unsigned long flags; | 128 | unsigned long flags; |
128 | }; | 129 | }; |
129 | 130 | ||
131 | #define task_pt_regs(tsk) ((struct pt_regs *)&((tsk)->thread.regs)) | ||
132 | |||
130 | /* Thread struct flags. */ | 133 | /* Thread struct flags. */ |
131 | #define PARISC_UAC_NOPRINT (1UL << 0) /* see prctl and unaligned.c */ | 134 | #define PARISC_UAC_NOPRINT (1UL << 0) /* see prctl and unaligned.c */ |
132 | #define PARISC_UAC_SIGBUS (1UL << 1) | 135 | #define PARISC_UAC_SIGBUS (1UL << 1) |
diff --git a/arch/parisc/include/asm/system.h b/arch/parisc/include/asm/system.h index ee80c920b464..d91357bca5b4 100644 --- a/arch/parisc/include/asm/system.h +++ b/arch/parisc/include/asm/system.h | |||
@@ -168,8 +168,8 @@ static inline void set_eiem(unsigned long val) | |||
168 | /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ | 168 | /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ |
169 | #define __ldcw(a) ({ \ | 169 | #define __ldcw(a) ({ \ |
170 | unsigned __ret; \ | 170 | unsigned __ret; \ |
171 | __asm__ __volatile__(__LDCW " 0(%1),%0" \ | 171 | __asm__ __volatile__(__LDCW " 0(%2),%0" \ |
172 | : "=r" (__ret) : "r" (a)); \ | 172 | : "=r" (__ret), "+m" (*(a)) : "r" (a)); \ |
173 | __ret; \ | 173 | __ret; \ |
174 | }) | 174 | }) |
175 | 175 | ||
diff --git a/arch/parisc/include/asm/tlbflush.h b/arch/parisc/include/asm/tlbflush.h index 1f6fd4fc05b9..8f1a8100bf2d 100644 --- a/arch/parisc/include/asm/tlbflush.h +++ b/arch/parisc/include/asm/tlbflush.h | |||
@@ -12,14 +12,12 @@ | |||
12 | * N class systems, only one PxTLB inter processor broadcast can be | 12 | * N class systems, only one PxTLB inter processor broadcast can be |
13 | * active at any one time on the Merced bus. This tlb purge | 13 | * active at any one time on the Merced bus. This tlb purge |
14 | * synchronisation is fairly lightweight and harmless so we activate | 14 | * synchronisation is fairly lightweight and harmless so we activate |
15 | * it on all SMP systems not just the N class. We also need to have | 15 | * it on all systems not just the N class. |
16 | * preemption disabled on uniprocessor machines, and spin_lock does that | ||
17 | * nicely. | ||
18 | */ | 16 | */ |
19 | extern spinlock_t pa_tlb_lock; | 17 | extern spinlock_t pa_tlb_lock; |
20 | 18 | ||
21 | #define purge_tlb_start(x) spin_lock(&pa_tlb_lock) | 19 | #define purge_tlb_start(flags) spin_lock_irqsave(&pa_tlb_lock, flags) |
22 | #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) | 20 | #define purge_tlb_end(flags) spin_unlock_irqrestore(&pa_tlb_lock, flags) |
23 | 21 | ||
24 | extern void flush_tlb_all(void); | 22 | extern void flush_tlb_all(void); |
25 | extern void flush_tlb_all_local(void *); | 23 | extern void flush_tlb_all_local(void *); |
@@ -63,14 +61,16 @@ static inline void flush_tlb_mm(struct mm_struct *mm) | |||
63 | static inline void flush_tlb_page(struct vm_area_struct *vma, | 61 | static inline void flush_tlb_page(struct vm_area_struct *vma, |
64 | unsigned long addr) | 62 | unsigned long addr) |
65 | { | 63 | { |
64 | unsigned long flags; | ||
65 | |||
66 | /* For one page, it's not worth testing the split_tlb variable */ | 66 | /* For one page, it's not worth testing the split_tlb variable */ |
67 | 67 | ||
68 | mb(); | 68 | mb(); |
69 | mtsp(vma->vm_mm->context,1); | 69 | mtsp(vma->vm_mm->context,1); |
70 | purge_tlb_start(); | 70 | purge_tlb_start(flags); |
71 | pdtlb(addr); | 71 | pdtlb(addr); |
72 | pitlb(addr); | 72 | pitlb(addr); |
73 | purge_tlb_end(); | 73 | purge_tlb_end(flags); |
74 | } | 74 | } |
75 | 75 | ||
76 | void __flush_tlb_range(unsigned long sid, | 76 | void __flush_tlb_range(unsigned long sid, |
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h index ef26b009dc5d..f3d3b8b012c4 100644 --- a/arch/parisc/include/asm/unistd.h +++ b/arch/parisc/include/asm/unistd.h | |||
@@ -807,8 +807,12 @@ | |||
807 | #define __NR_dup3 (__NR_Linux + 312) | 807 | #define __NR_dup3 (__NR_Linux + 312) |
808 | #define __NR_pipe2 (__NR_Linux + 313) | 808 | #define __NR_pipe2 (__NR_Linux + 313) |
809 | #define __NR_inotify_init1 (__NR_Linux + 314) | 809 | #define __NR_inotify_init1 (__NR_Linux + 314) |
810 | #define __NR_preadv (__NR_Linux + 315) | ||
811 | #define __NR_pwritev (__NR_Linux + 316) | ||
812 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 317) | ||
813 | #define __NR_perf_counter_open (__NR_Linux + 318) | ||
810 | 814 | ||
811 | #define __NR_Linux_syscalls (__NR_inotify_init1 + 1) | 815 | #define __NR_Linux_syscalls (__NR_perf_counter_open + 1) |
812 | 816 | ||
813 | 817 | ||
814 | #define __IGNORE_select /* newselect */ | 818 | #define __IGNORE_select /* newselect */ |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 837530ea32e7..b6ed34de14e1 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: cache.c,v 1.4 2000/01/25 00:11:38 prumpf Exp $ | 1 | /* |
2 | * | ||
3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
5 | * for more details. | 4 | * for more details. |
@@ -398,12 +397,13 @@ EXPORT_SYMBOL(flush_kernel_icache_range_asm); | |||
398 | 397 | ||
399 | void clear_user_page_asm(void *page, unsigned long vaddr) | 398 | void clear_user_page_asm(void *page, unsigned long vaddr) |
400 | { | 399 | { |
400 | unsigned long flags; | ||
401 | /* This function is implemented in assembly in pacache.S */ | 401 | /* This function is implemented in assembly in pacache.S */ |
402 | extern void __clear_user_page_asm(void *page, unsigned long vaddr); | 402 | extern void __clear_user_page_asm(void *page, unsigned long vaddr); |
403 | 403 | ||
404 | purge_tlb_start(); | 404 | purge_tlb_start(flags); |
405 | __clear_user_page_asm(page, vaddr); | 405 | __clear_user_page_asm(page, vaddr); |
406 | purge_tlb_end(); | 406 | purge_tlb_end(flags); |
407 | } | 407 | } |
408 | 408 | ||
409 | #define FLUSH_THRESHOLD 0x80000 /* 0.5MB */ | 409 | #define FLUSH_THRESHOLD 0x80000 /* 0.5MB */ |
@@ -444,20 +444,24 @@ extern void clear_user_page_asm(void *page, unsigned long vaddr); | |||
444 | 444 | ||
445 | void clear_user_page(void *page, unsigned long vaddr, struct page *pg) | 445 | void clear_user_page(void *page, unsigned long vaddr, struct page *pg) |
446 | { | 446 | { |
447 | unsigned long flags; | ||
448 | |||
447 | purge_kernel_dcache_page((unsigned long)page); | 449 | purge_kernel_dcache_page((unsigned long)page); |
448 | purge_tlb_start(); | 450 | purge_tlb_start(flags); |
449 | pdtlb_kernel(page); | 451 | pdtlb_kernel(page); |
450 | purge_tlb_end(); | 452 | purge_tlb_end(flags); |
451 | clear_user_page_asm(page, vaddr); | 453 | clear_user_page_asm(page, vaddr); |
452 | } | 454 | } |
453 | EXPORT_SYMBOL(clear_user_page); | 455 | EXPORT_SYMBOL(clear_user_page); |
454 | 456 | ||
455 | void flush_kernel_dcache_page_addr(void *addr) | 457 | void flush_kernel_dcache_page_addr(void *addr) |
456 | { | 458 | { |
459 | unsigned long flags; | ||
460 | |||
457 | flush_kernel_dcache_page_asm(addr); | 461 | flush_kernel_dcache_page_asm(addr); |
458 | purge_tlb_start(); | 462 | purge_tlb_start(flags); |
459 | pdtlb_kernel(addr); | 463 | pdtlb_kernel(addr); |
460 | purge_tlb_end(); | 464 | purge_tlb_end(flags); |
461 | } | 465 | } |
462 | EXPORT_SYMBOL(flush_kernel_dcache_page_addr); | 466 | EXPORT_SYMBOL(flush_kernel_dcache_page_addr); |
463 | 467 | ||
@@ -490,8 +494,10 @@ void __flush_tlb_range(unsigned long sid, unsigned long start, | |||
490 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ | 494 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ |
491 | flush_tlb_all(); | 495 | flush_tlb_all(); |
492 | else { | 496 | else { |
497 | unsigned long flags; | ||
498 | |||
493 | mtsp(sid, 1); | 499 | mtsp(sid, 1); |
494 | purge_tlb_start(); | 500 | purge_tlb_start(flags); |
495 | if (split_tlb) { | 501 | if (split_tlb) { |
496 | while (npages--) { | 502 | while (npages--) { |
497 | pdtlb(start); | 503 | pdtlb(start); |
@@ -504,7 +510,7 @@ void __flush_tlb_range(unsigned long sid, unsigned long start, | |||
504 | start += PAGE_SIZE; | 510 | start += PAGE_SIZE; |
505 | } | 511 | } |
506 | } | 512 | } |
507 | purge_tlb_end(); | 513 | purge_tlb_end(flags); |
508 | } | 514 | } |
509 | } | 515 | } |
510 | 516 | ||
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c index bd1f7f1ff74e..d228d8237879 100644 --- a/arch/parisc/kernel/inventory.c +++ b/arch/parisc/kernel/inventory.c | |||
@@ -170,23 +170,27 @@ static void __init pagezero_memconfig(void) | |||
170 | static int __init | 170 | static int __init |
171 | pat_query_module(ulong pcell_loc, ulong mod_index) | 171 | pat_query_module(ulong pcell_loc, ulong mod_index) |
172 | { | 172 | { |
173 | pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; | 173 | pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell; |
174 | unsigned long bytecnt; | 174 | unsigned long bytecnt; |
175 | unsigned long temp; /* 64-bit scratch value */ | 175 | unsigned long temp; /* 64-bit scratch value */ |
176 | long status; /* PDC return value status */ | 176 | long status; /* PDC return value status */ |
177 | struct parisc_device *dev; | 177 | struct parisc_device *dev; |
178 | 178 | ||
179 | pa_pdc_cell = kmalloc(sizeof (*pa_pdc_cell), GFP_KERNEL); | ||
180 | if (!pa_pdc_cell) | ||
181 | panic("couldn't allocate memory for PDC_PAT_CELL!"); | ||
182 | |||
179 | /* return cell module (PA or Processor view) */ | 183 | /* return cell module (PA or Processor view) */ |
180 | status = pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index, | 184 | status = pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index, |
181 | PA_VIEW, &pa_pdc_cell); | 185 | PA_VIEW, pa_pdc_cell); |
182 | 186 | ||
183 | if (status != PDC_OK) { | 187 | if (status != PDC_OK) { |
184 | /* no more cell modules or error */ | 188 | /* no more cell modules or error */ |
185 | return status; | 189 | return status; |
186 | } | 190 | } |
187 | 191 | ||
188 | temp = pa_pdc_cell.cba; | 192 | temp = pa_pdc_cell->cba; |
189 | dev = alloc_pa_dev(PAT_GET_CBA(temp), &pa_pdc_cell.mod_path); | 193 | dev = alloc_pa_dev(PAT_GET_CBA(temp), &(pa_pdc_cell->mod_path)); |
190 | if (!dev) { | 194 | if (!dev) { |
191 | return PDC_OK; | 195 | return PDC_OK; |
192 | } | 196 | } |
@@ -203,8 +207,8 @@ pat_query_module(ulong pcell_loc, ulong mod_index) | |||
203 | 207 | ||
204 | /* save generic info returned from the call */ | 208 | /* save generic info returned from the call */ |
205 | /* REVISIT: who is the consumer of this? not sure yet... */ | 209 | /* REVISIT: who is the consumer of this? not sure yet... */ |
206 | dev->mod_info = pa_pdc_cell.mod_info; /* pass to PAT_GET_ENTITY() */ | 210 | dev->mod_info = pa_pdc_cell->mod_info; /* pass to PAT_GET_ENTITY() */ |
207 | dev->pmod_loc = pa_pdc_cell.mod_location; | 211 | dev->pmod_loc = pa_pdc_cell->mod_location; |
208 | 212 | ||
209 | register_parisc_device(dev); /* advertise device */ | 213 | register_parisc_device(dev); /* advertise device */ |
210 | 214 | ||
@@ -216,14 +220,14 @@ pat_query_module(ulong pcell_loc, ulong mod_index) | |||
216 | 220 | ||
217 | case PAT_ENTITY_PROC: | 221 | case PAT_ENTITY_PROC: |
218 | printk(KERN_DEBUG "PAT_ENTITY_PROC: id_eid 0x%lx\n", | 222 | printk(KERN_DEBUG "PAT_ENTITY_PROC: id_eid 0x%lx\n", |
219 | pa_pdc_cell.mod[0]); | 223 | pa_pdc_cell->mod[0]); |
220 | break; | 224 | break; |
221 | 225 | ||
222 | case PAT_ENTITY_MEM: | 226 | case PAT_ENTITY_MEM: |
223 | printk(KERN_DEBUG | 227 | printk(KERN_DEBUG |
224 | "PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n", | 228 | "PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n", |
225 | pa_pdc_cell.mod[0], pa_pdc_cell.mod[1], | 229 | pa_pdc_cell->mod[0], pa_pdc_cell->mod[1], |
226 | pa_pdc_cell.mod[2]); | 230 | pa_pdc_cell->mod[2]); |
227 | break; | 231 | break; |
228 | case PAT_ENTITY_CA: | 232 | case PAT_ENTITY_CA: |
229 | printk(KERN_DEBUG "PAT_ENTITY_CA: %ld\n", pcell_loc); | 233 | printk(KERN_DEBUG "PAT_ENTITY_CA: %ld\n", pcell_loc); |
@@ -243,23 +247,26 @@ pat_query_module(ulong pcell_loc, ulong mod_index) | |||
243 | print_ranges: | 247 | print_ranges: |
244 | pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index, | 248 | pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index, |
245 | IO_VIEW, &io_pdc_cell); | 249 | IO_VIEW, &io_pdc_cell); |
246 | printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell.mod[1]); | 250 | printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell->mod[1]); |
247 | for (i = 0; i < pa_pdc_cell.mod[1]; i++) { | 251 | for (i = 0; i < pa_pdc_cell->mod[1]; i++) { |
248 | printk(KERN_DEBUG | 252 | printk(KERN_DEBUG |
249 | " PA_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", | 253 | " PA_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", |
250 | i, pa_pdc_cell.mod[2 + i * 3], /* type */ | 254 | i, pa_pdc_cell->mod[2 + i * 3], /* type */ |
251 | pa_pdc_cell.mod[3 + i * 3], /* start */ | 255 | pa_pdc_cell->mod[3 + i * 3], /* start */ |
252 | pa_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */ | 256 | pa_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */ |
253 | printk(KERN_DEBUG | 257 | printk(KERN_DEBUG |
254 | " IO_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", | 258 | " IO_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", |
255 | i, io_pdc_cell.mod[2 + i * 3], /* type */ | 259 | i, io_pdc_cell->mod[2 + i * 3], /* type */ |
256 | io_pdc_cell.mod[3 + i * 3], /* start */ | 260 | io_pdc_cell->mod[3 + i * 3], /* start */ |
257 | io_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */ | 261 | io_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */ |
258 | } | 262 | } |
259 | printk(KERN_DEBUG "\n"); | 263 | printk(KERN_DEBUG "\n"); |
260 | break; | 264 | break; |
261 | } | 265 | } |
262 | #endif /* DEBUG_PAT */ | 266 | #endif /* DEBUG_PAT */ |
267 | |||
268 | kfree(pa_pdc_cell); | ||
269 | |||
263 | return PDC_OK; | 270 | return PDC_OK; |
264 | } | 271 | } |
265 | 272 | ||
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 8007f1e65729..330f536a9324 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -120,7 +120,7 @@ int cpu_check_affinity(unsigned int irq, const struct cpumask *dest) | |||
120 | if (CHECK_IRQ_PER_CPU(irq)) { | 120 | if (CHECK_IRQ_PER_CPU(irq)) { |
121 | /* Bad linux design decision. The mask has already | 121 | /* Bad linux design decision. The mask has already |
122 | * been set; we must reset it */ | 122 | * been set; we must reset it */ |
123 | cpumask_setall(&irq_desc[irq].affinity); | 123 | cpumask_setall(irq_desc[irq].affinity); |
124 | return -EINVAL; | 124 | return -EINVAL; |
125 | } | 125 | } |
126 | 126 | ||
@@ -138,13 +138,13 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest) | |||
138 | if (cpu_dest < 0) | 138 | if (cpu_dest < 0) |
139 | return -1; | 139 | return -1; |
140 | 140 | ||
141 | cpumask_copy(&irq_desc[irq].affinity, dest); | 141 | cpumask_copy(irq_desc[irq].affinity, dest); |
142 | 142 | ||
143 | return 0; | 143 | return 0; |
144 | } | 144 | } |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | static struct hw_interrupt_type cpu_interrupt_type = { | 147 | static struct irq_chip cpu_interrupt_type = { |
148 | .typename = "CPU", | 148 | .typename = "CPU", |
149 | .startup = cpu_startup_irq, | 149 | .startup = cpu_startup_irq, |
150 | .shutdown = cpu_disable_irq, | 150 | .shutdown = cpu_disable_irq, |
@@ -299,7 +299,7 @@ int txn_alloc_irq(unsigned int bits_wide) | |||
299 | unsigned long txn_affinity_addr(unsigned int irq, int cpu) | 299 | unsigned long txn_affinity_addr(unsigned int irq, int cpu) |
300 | { | 300 | { |
301 | #ifdef CONFIG_SMP | 301 | #ifdef CONFIG_SMP |
302 | cpumask_copy(&irq_desc[irq].affinity, cpumask_of(cpu)); | 302 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); |
303 | #endif | 303 | #endif |
304 | 304 | ||
305 | return per_cpu(cpu_data, cpu).txn_addr; | 305 | return per_cpu(cpu_data, cpu).txn_addr; |
@@ -356,7 +356,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
356 | irq = eirr_to_irq(eirr_val); | 356 | irq = eirr_to_irq(eirr_val); |
357 | 357 | ||
358 | #ifdef CONFIG_SMP | 358 | #ifdef CONFIG_SMP |
359 | cpumask_copy(&dest, &irq_desc[irq].affinity); | 359 | cpumask_copy(&dest, irq_desc[irq].affinity); |
360 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) && | 360 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) && |
361 | !cpu_isset(smp_processor_id(), dest)) { | 361 | !cpu_isset(smp_processor_id(), dest)) { |
362 | int cpu = first_cpu(dest); | 362 | int cpu = first_cpu(dest); |
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index 7d927eac932b..c07f618ff7da 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c | |||
@@ -90,12 +90,14 @@ static inline int map_pte_uncached(pte_t * pte, | |||
90 | if (end > PMD_SIZE) | 90 | if (end > PMD_SIZE) |
91 | end = PMD_SIZE; | 91 | end = PMD_SIZE; |
92 | do { | 92 | do { |
93 | unsigned long flags; | ||
94 | |||
93 | if (!pte_none(*pte)) | 95 | if (!pte_none(*pte)) |
94 | printk(KERN_ERR "map_pte_uncached: page already exists\n"); | 96 | printk(KERN_ERR "map_pte_uncached: page already exists\n"); |
95 | set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC)); | 97 | set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC)); |
96 | purge_tlb_start(); | 98 | purge_tlb_start(flags); |
97 | pdtlb_kernel(orig_vaddr); | 99 | pdtlb_kernel(orig_vaddr); |
98 | purge_tlb_end(); | 100 | purge_tlb_end(flags); |
99 | vaddr += PAGE_SIZE; | 101 | vaddr += PAGE_SIZE; |
100 | orig_vaddr += PAGE_SIZE; | 102 | orig_vaddr += PAGE_SIZE; |
101 | (*paddr_ptr) += PAGE_SIZE; | 103 | (*paddr_ptr) += PAGE_SIZE; |
@@ -168,11 +170,13 @@ static inline void unmap_uncached_pte(pmd_t * pmd, unsigned long vaddr, | |||
168 | if (end > PMD_SIZE) | 170 | if (end > PMD_SIZE) |
169 | end = PMD_SIZE; | 171 | end = PMD_SIZE; |
170 | do { | 172 | do { |
173 | unsigned long flags; | ||
171 | pte_t page = *pte; | 174 | pte_t page = *pte; |
175 | |||
172 | pte_clear(&init_mm, vaddr, pte); | 176 | pte_clear(&init_mm, vaddr, pte); |
173 | purge_tlb_start(); | 177 | purge_tlb_start(flags); |
174 | pdtlb_kernel(orig_vaddr); | 178 | pdtlb_kernel(orig_vaddr); |
175 | purge_tlb_end(); | 179 | purge_tlb_end(flags); |
176 | vaddr += PAGE_SIZE; | 180 | vaddr += PAGE_SIZE; |
177 | orig_vaddr += PAGE_SIZE; | 181 | orig_vaddr += PAGE_SIZE; |
178 | pte++; | 182 | pte++; |
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index 6936386c9861..f7064abc3bb6 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: pci.c,v 1.6 2000/01/29 00:12:05 grundler Exp $ | 1 | /* |
2 | * | ||
3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
5 | * for more details. | 4 | * for more details. |
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index e09d0f7fb6b0..c8fb61ed32f4 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: processor.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $ | 1 | /* |
2 | * | ||
3 | * Initial setup-routines for HP 9000 based hardware. | 2 | * Initial setup-routines for HP 9000 based hardware. |
4 | * | 3 | * |
5 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
@@ -121,22 +120,28 @@ static int __cpuinit processor_probe(struct parisc_device *dev) | |||
121 | if (is_pdc_pat()) { | 120 | if (is_pdc_pat()) { |
122 | ulong status; | 121 | ulong status; |
123 | unsigned long bytecnt; | 122 | unsigned long bytecnt; |
124 | pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; | 123 | pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell; |
125 | #undef USE_PAT_CPUID | 124 | #undef USE_PAT_CPUID |
126 | #ifdef USE_PAT_CPUID | 125 | #ifdef USE_PAT_CPUID |
127 | struct pdc_pat_cpu_num cpu_info; | 126 | struct pdc_pat_cpu_num cpu_info; |
128 | #endif | 127 | #endif |
129 | 128 | ||
129 | pa_pdc_cell = kmalloc(sizeof (*pa_pdc_cell), GFP_KERNEL); | ||
130 | if (!pa_pdc_cell) | ||
131 | panic("couldn't allocate memory for PDC_PAT_CELL!"); | ||
132 | |||
130 | status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc, | 133 | status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc, |
131 | dev->mod_index, PA_VIEW, &pa_pdc_cell); | 134 | dev->mod_index, PA_VIEW, pa_pdc_cell); |
132 | 135 | ||
133 | BUG_ON(PDC_OK != status); | 136 | BUG_ON(PDC_OK != status); |
134 | 137 | ||
135 | /* verify it's the same as what do_pat_inventory() found */ | 138 | /* verify it's the same as what do_pat_inventory() found */ |
136 | BUG_ON(dev->mod_info != pa_pdc_cell.mod_info); | 139 | BUG_ON(dev->mod_info != pa_pdc_cell->mod_info); |
137 | BUG_ON(dev->pmod_loc != pa_pdc_cell.mod_location); | 140 | BUG_ON(dev->pmod_loc != pa_pdc_cell->mod_location); |
141 | |||
142 | txn_addr = pa_pdc_cell->mod[0]; /* id_eid for IO sapic */ | ||
138 | 143 | ||
139 | txn_addr = pa_pdc_cell.mod[0]; /* id_eid for IO sapic */ | 144 | kfree(pa_pdc_cell); |
140 | 145 | ||
141 | #ifdef USE_PAT_CPUID | 146 | #ifdef USE_PAT_CPUID |
142 | /* We need contiguous numbers for cpuid. Firmware's notion | 147 | /* We need contiguous numbers for cpuid. Firmware's notion |
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index 82131ca8e05c..cb71f3dac995 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: setup.c,v 1.8 2000/02/02 04:42:38 prumpf Exp $ | 1 | /* |
2 | * | ||
3 | * Initial setup-routines for HP 9000 based hardware. | 2 | * Initial setup-routines for HP 9000 based hardware. |
4 | * | 3 | * |
5 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index 1adb40c81669..92a0acaa0d12 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -174,68 +174,6 @@ asmlinkage long sys32_sched_rr_get_interval(pid_t pid, | |||
174 | return ret; | 174 | return ret; |
175 | } | 175 | } |
176 | 176 | ||
177 | /*** copied from mips64 ***/ | ||
178 | /* | ||
179 | * Ooo, nasty. We need here to frob 32-bit unsigned longs to | ||
180 | * 64-bit unsigned longs. | ||
181 | */ | ||
182 | |||
183 | static inline int | ||
184 | get_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset) | ||
185 | { | ||
186 | n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32)); | ||
187 | if (ufdset) { | ||
188 | unsigned long odd; | ||
189 | |||
190 | if (!access_ok(VERIFY_WRITE, ufdset, n*sizeof(u32))) | ||
191 | return -EFAULT; | ||
192 | |||
193 | odd = n & 1UL; | ||
194 | n &= ~1UL; | ||
195 | while (n) { | ||
196 | unsigned long h, l; | ||
197 | __get_user(l, ufdset); | ||
198 | __get_user(h, ufdset+1); | ||
199 | ufdset += 2; | ||
200 | *fdset++ = h << 32 | l; | ||
201 | n -= 2; | ||
202 | } | ||
203 | if (odd) | ||
204 | __get_user(*fdset, ufdset); | ||
205 | } else { | ||
206 | /* Tricky, must clear full unsigned long in the | ||
207 | * kernel fdset at the end, this makes sure that | ||
208 | * actually happens. | ||
209 | */ | ||
210 | memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32)); | ||
211 | } | ||
212 | return 0; | ||
213 | } | ||
214 | |||
215 | static inline void | ||
216 | set_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset) | ||
217 | { | ||
218 | unsigned long odd; | ||
219 | n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32)); | ||
220 | |||
221 | if (!ufdset) | ||
222 | return; | ||
223 | |||
224 | odd = n & 1UL; | ||
225 | n &= ~1UL; | ||
226 | while (n) { | ||
227 | unsigned long h, l; | ||
228 | l = *fdset++; | ||
229 | h = l >> 32; | ||
230 | __put_user(l, ufdset); | ||
231 | __put_user(h, ufdset+1); | ||
232 | ufdset += 2; | ||
233 | n -= 2; | ||
234 | } | ||
235 | if (odd) | ||
236 | __put_user(*fdset, ufdset); | ||
237 | } | ||
238 | |||
239 | struct msgbuf32 { | 177 | struct msgbuf32 { |
240 | int mtype; | 178 | int mtype; |
241 | char mtext[1]; | 179 | char mtext[1]; |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 03b9a01bc16c..cf145eb026b3 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -413,6 +413,10 @@ | |||
413 | ENTRY_SAME(dup3) | 413 | ENTRY_SAME(dup3) |
414 | ENTRY_SAME(pipe2) | 414 | ENTRY_SAME(pipe2) |
415 | ENTRY_SAME(inotify_init1) | 415 | ENTRY_SAME(inotify_init1) |
416 | ENTRY_COMP(preadv) /* 315 */ | ||
417 | ENTRY_COMP(pwritev) | ||
418 | ENTRY_COMP(rt_tgsigqueueinfo) | ||
419 | ENTRY_SAME(perf_counter_open) | ||
416 | 420 | ||
417 | /* Nothing yet */ | 421 | /* Nothing yet */ |
418 | 422 | ||
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index d4dd05674c62..a79c6f9e7e2c 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -56,9 +56,9 @@ static unsigned long clocktick __read_mostly; /* timer cycles per tick */ | |||
56 | */ | 56 | */ |
57 | irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) | 57 | irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) |
58 | { | 58 | { |
59 | unsigned long now; | 59 | unsigned long now, now2; |
60 | unsigned long next_tick; | 60 | unsigned long next_tick; |
61 | unsigned long cycles_elapsed, ticks_elapsed; | 61 | unsigned long cycles_elapsed, ticks_elapsed = 1; |
62 | unsigned long cycles_remainder; | 62 | unsigned long cycles_remainder; |
63 | unsigned int cpu = smp_processor_id(); | 63 | unsigned int cpu = smp_processor_id(); |
64 | struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu); | 64 | struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu); |
@@ -71,44 +71,24 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) | |||
71 | /* Initialize next_tick to the expected tick time. */ | 71 | /* Initialize next_tick to the expected tick time. */ |
72 | next_tick = cpuinfo->it_value; | 72 | next_tick = cpuinfo->it_value; |
73 | 73 | ||
74 | /* Get current interval timer. | 74 | /* Get current cycle counter (Control Register 16). */ |
75 | * CR16 reads as 64 bits in CPU wide mode. | ||
76 | * CR16 reads as 32 bits in CPU narrow mode. | ||
77 | */ | ||
78 | now = mfctl(16); | 75 | now = mfctl(16); |
79 | 76 | ||
80 | cycles_elapsed = now - next_tick; | 77 | cycles_elapsed = now - next_tick; |
81 | 78 | ||
82 | if ((cycles_elapsed >> 5) < cpt) { | 79 | if ((cycles_elapsed >> 6) < cpt) { |
83 | /* use "cheap" math (add/subtract) instead | 80 | /* use "cheap" math (add/subtract) instead |
84 | * of the more expensive div/mul method | 81 | * of the more expensive div/mul method |
85 | */ | 82 | */ |
86 | cycles_remainder = cycles_elapsed; | 83 | cycles_remainder = cycles_elapsed; |
87 | ticks_elapsed = 1; | ||
88 | while (cycles_remainder > cpt) { | 84 | while (cycles_remainder > cpt) { |
89 | cycles_remainder -= cpt; | 85 | cycles_remainder -= cpt; |
90 | ticks_elapsed++; | 86 | ticks_elapsed++; |
91 | } | 87 | } |
92 | } else { | 88 | } else { |
89 | /* TODO: Reduce this to one fdiv op */ | ||
93 | cycles_remainder = cycles_elapsed % cpt; | 90 | cycles_remainder = cycles_elapsed % cpt; |
94 | ticks_elapsed = 1 + cycles_elapsed / cpt; | 91 | ticks_elapsed += cycles_elapsed / cpt; |
95 | } | ||
96 | |||
97 | /* Can we differentiate between "early CR16" (aka Scenario 1) and | ||
98 | * "long delay" (aka Scenario 3)? I don't think so. | ||
99 | * | ||
100 | * We expected timer_interrupt to be delivered at least a few hundred | ||
101 | * cycles after the IT fires. But it's arbitrary how much time passes | ||
102 | * before we call it "late". I've picked one second. | ||
103 | */ | ||
104 | if (unlikely(ticks_elapsed > HZ)) { | ||
105 | /* Scenario 3: very long delay? bad in any case */ | ||
106 | printk (KERN_CRIT "timer_interrupt(CPU %d): delayed!" | ||
107 | " cycles %lX rem %lX " | ||
108 | " next/now %lX/%lX\n", | ||
109 | cpu, | ||
110 | cycles_elapsed, cycles_remainder, | ||
111 | next_tick, now ); | ||
112 | } | 92 | } |
113 | 93 | ||
114 | /* convert from "division remainder" to "remainder of clock tick" */ | 94 | /* convert from "division remainder" to "remainder of clock tick" */ |
@@ -122,18 +102,56 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) | |||
122 | 102 | ||
123 | cpuinfo->it_value = next_tick; | 103 | cpuinfo->it_value = next_tick; |
124 | 104 | ||
125 | /* Skip one clocktick on purpose if we are likely to miss next_tick. | 105 | /* Program the IT when to deliver the next interrupt. |
126 | * We want to avoid the new next_tick being less than CR16. | 106 | * Only bottom 32-bits of next_tick are writable in CR16! |
127 | * If that happened, itimer wouldn't fire until CR16 wrapped. | ||
128 | * We'll catch the tick we missed on the tick after that. | ||
129 | */ | 107 | */ |
130 | if (!(cycles_remainder >> 13)) | ||
131 | next_tick += cpt; | ||
132 | |||
133 | /* Program the IT when to deliver the next interrupt. */ | ||
134 | /* Only bottom 32-bits of next_tick are written to cr16. */ | ||
135 | mtctl(next_tick, 16); | 108 | mtctl(next_tick, 16); |
136 | 109 | ||
110 | /* Skip one clocktick on purpose if we missed next_tick. | ||
111 | * The new CR16 must be "later" than current CR16 otherwise | ||
112 | * itimer would not fire until CR16 wrapped - e.g 4 seconds | ||
113 | * later on a 1Ghz processor. We'll account for the missed | ||
114 | * tick on the next timer interrupt. | ||
115 | * | ||
116 | * "next_tick - now" will always give the difference regardless | ||
117 | * if one or the other wrapped. If "now" is "bigger" we'll end up | ||
118 | * with a very large unsigned number. | ||
119 | */ | ||
120 | now2 = mfctl(16); | ||
121 | if (next_tick - now2 > cpt) | ||
122 | mtctl(next_tick+cpt, 16); | ||
123 | |||
124 | #if 1 | ||
125 | /* | ||
126 | * GGG: DEBUG code for how many cycles programming CR16 used. | ||
127 | */ | ||
128 | if (unlikely(now2 - now > 0x3000)) /* 12K cycles */ | ||
129 | printk (KERN_CRIT "timer_interrupt(CPU %d): SLOW! 0x%lx cycles!" | ||
130 | " cyc %lX rem %lX " | ||
131 | " next/now %lX/%lX\n", | ||
132 | cpu, now2 - now, cycles_elapsed, cycles_remainder, | ||
133 | next_tick, now ); | ||
134 | #endif | ||
135 | |||
136 | /* Can we differentiate between "early CR16" (aka Scenario 1) and | ||
137 | * "long delay" (aka Scenario 3)? I don't think so. | ||
138 | * | ||
139 | * Timer_interrupt will be delivered at least a few hundred cycles | ||
140 | * after the IT fires. But it's arbitrary how much time passes | ||
141 | * before we call it "late". I've picked one second. | ||
142 | * | ||
143 | * It's important NO printk's are between reading CR16 and | ||
144 | * setting up the next value. May introduce huge variance. | ||
145 | */ | ||
146 | if (unlikely(ticks_elapsed > HZ)) { | ||
147 | /* Scenario 3: very long delay? bad in any case */ | ||
148 | printk (KERN_CRIT "timer_interrupt(CPU %d): delayed!" | ||
149 | " cycles %lX rem %lX " | ||
150 | " next/now %lX/%lX\n", | ||
151 | cpu, | ||
152 | cycles_elapsed, cycles_remainder, | ||
153 | next_tick, now ); | ||
154 | } | ||
137 | 155 | ||
138 | /* Done mucking with unreliable delivery of interrupts. | 156 | /* Done mucking with unreliable delivery of interrupts. |
139 | * Go do system house keeping. | 157 | * Go do system house keeping. |
@@ -173,7 +191,7 @@ EXPORT_SYMBOL(profile_pc); | |||
173 | 191 | ||
174 | /* clock source code */ | 192 | /* clock source code */ |
175 | 193 | ||
176 | static cycle_t read_cr16(void) | 194 | static cycle_t read_cr16(struct clocksource *cs) |
177 | { | 195 | { |
178 | return get_cycles(); | 196 | return get_cycles(); |
179 | } | 197 | } |
diff --git a/arch/parisc/lib/checksum.c b/arch/parisc/lib/checksum.c index 462696d30d3b..ae66d31f9ecf 100644 --- a/arch/parisc/lib/checksum.c +++ b/arch/parisc/lib/checksum.c | |||
@@ -13,8 +13,6 @@ | |||
13 | * modify it under the terms of the GNU General Public License | 13 | * modify it under the terms of the GNU General Public License |
14 | * as published by the Free Software Foundation; either version | 14 | * as published by the Free Software Foundation; either version |
15 | * 2 of the License, or (at your option) any later version. | 15 | * 2 of the License, or (at your option) any later version. |
16 | * | ||
17 | * $Id: checksum.c,v 1.3 1997/12/01 17:57:34 ralf Exp $ | ||
18 | */ | 16 | */ |
19 | #include <linux/module.h> | 17 | #include <linux/module.h> |
20 | #include <linux/types.h> | 18 | #include <linux/types.h> |
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index bbda909c866e..abf41f4632a9 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c | |||
@@ -405,7 +405,7 @@ byte_copy: | |||
405 | 405 | ||
406 | unaligned_copy: | 406 | unaligned_copy: |
407 | /* possibly we are aligned on a word, but not on a double... */ | 407 | /* possibly we are aligned on a word, but not on a double... */ |
408 | if (likely(t1 & (sizeof(unsigned int)-1)) == 0) { | 408 | if (likely((t1 & (sizeof(unsigned int)-1)) == 0)) { |
409 | t2 = src & (sizeof(unsigned int) - 1); | 409 | t2 = src & (sizeof(unsigned int) - 1); |
410 | 410 | ||
411 | if (unlikely(t2 != 0)) { | 411 | if (unlikely(t2 != 0)) { |
diff --git a/arch/parisc/math-emu/decode_exc.c b/arch/parisc/math-emu/decode_exc.c index 66c8a9f6a27e..3ca1c6149218 100644 --- a/arch/parisc/math-emu/decode_exc.c +++ b/arch/parisc/math-emu/decode_exc.c | |||
@@ -40,7 +40,7 @@ | |||
40 | * END_DESC | 40 | * END_DESC |
41 | */ | 41 | */ |
42 | 42 | ||
43 | 43 | #include <linux/kernel.h> | |
44 | #include "float.h" | 44 | #include "float.h" |
45 | #include "sgl_float.h" | 45 | #include "sgl_float.h" |
46 | #include "dbl_float.h" | 46 | #include "dbl_float.h" |
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index bfb6dd6ab380..c6afbfc95770 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: fault.c,v 1.5 2000/01/26 16:20:29 jsm Exp $ | 1 | /* |
2 | * | ||
3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
5 | * for more details. | 4 | * for more details. |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 4356ceb1e366..b0831d9e35cb 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -370,34 +370,22 @@ static void __init setup_bootmem(void) | |||
370 | 370 | ||
371 | void free_initmem(void) | 371 | void free_initmem(void) |
372 | { | 372 | { |
373 | unsigned long addr, init_begin, init_end; | 373 | unsigned long addr; |
374 | 374 | unsigned long init_begin = (unsigned long)__init_begin; | |
375 | printk(KERN_INFO "Freeing unused kernel memory: "); | 375 | unsigned long init_end = (unsigned long)__init_end; |
376 | 376 | ||
377 | #ifdef CONFIG_DEBUG_KERNEL | 377 | #ifdef CONFIG_DEBUG_KERNEL |
378 | /* Attempt to catch anyone trying to execute code here | 378 | /* Attempt to catch anyone trying to execute code here |
379 | * by filling the page with BRK insns. | 379 | * by filling the page with BRK insns. |
380 | * | ||
381 | * If we disable interrupts for all CPUs, then IPI stops working. | ||
382 | * Kinda breaks the global cache flushing. | ||
383 | */ | 380 | */ |
384 | local_irq_disable(); | 381 | memset((void *)init_begin, 0x00, init_end - init_begin); |
385 | 382 | flush_icache_range(init_begin, init_end); | |
386 | memset(__init_begin, 0x00, | ||
387 | (unsigned long)__init_end - (unsigned long)__init_begin); | ||
388 | |||
389 | flush_data_cache(); | ||
390 | asm volatile("sync" : : ); | ||
391 | flush_icache_range((unsigned long)__init_begin, (unsigned long)__init_end); | ||
392 | asm volatile("sync" : : ); | ||
393 | |||
394 | local_irq_enable(); | ||
395 | #endif | 383 | #endif |
396 | 384 | ||
397 | /* align __init_begin and __init_end to page size, | 385 | /* align __init_begin and __init_end to page size, |
398 | ignoring linker script where we might have tried to save RAM */ | 386 | ignoring linker script where we might have tried to save RAM */ |
399 | init_begin = PAGE_ALIGN((unsigned long)(__init_begin)); | 387 | init_begin = PAGE_ALIGN(init_begin); |
400 | init_end = PAGE_ALIGN((unsigned long)(__init_end)); | 388 | init_end = PAGE_ALIGN(init_end); |
401 | for (addr = init_begin; addr < init_end; addr += PAGE_SIZE) { | 389 | for (addr = init_begin; addr < init_end; addr += PAGE_SIZE) { |
402 | ClearPageReserved(virt_to_page(addr)); | 390 | ClearPageReserved(virt_to_page(addr)); |
403 | init_page_count(virt_to_page(addr)); | 391 | init_page_count(virt_to_page(addr)); |
@@ -409,7 +397,8 @@ void free_initmem(void) | |||
409 | /* set up a new led state on systems shipped LED State panel */ | 397 | /* set up a new led state on systems shipped LED State panel */ |
410 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); | 398 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); |
411 | 399 | ||
412 | printk("%luk freed\n", (init_end - init_begin) >> 10); | 400 | printk(KERN_INFO "Freeing unused kernel memory: %luk freed\n", |
401 | (init_end - init_begin) >> 10); | ||
413 | } | 402 | } |
414 | 403 | ||
415 | 404 | ||
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 5d610cbcfe80..0f0e0b919ef4 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -1134,7 +1134,7 @@ static const struct file_operations ccio_proc_bitmap_fops = { | |||
1134 | .llseek = seq_lseek, | 1134 | .llseek = seq_lseek, |
1135 | .release = single_release, | 1135 | .release = single_release, |
1136 | }; | 1136 | }; |
1137 | #endif | 1137 | #endif /* CONFIG_PROC_FS */ |
1138 | 1138 | ||
1139 | /** | 1139 | /** |
1140 | * ccio_find_ioc - Find the ioc in the ioc_list | 1140 | * ccio_find_ioc - Find the ioc in the ioc_list |
@@ -1568,14 +1568,15 @@ static int __init ccio_probe(struct parisc_device *dev) | |||
1568 | /* if this fails, no I/O cards will work, so may as well bug */ | 1568 | /* if this fails, no I/O cards will work, so may as well bug */ |
1569 | BUG_ON(dev->dev.platform_data == NULL); | 1569 | BUG_ON(dev->dev.platform_data == NULL); |
1570 | HBA_DATA(dev->dev.platform_data)->iommu = ioc; | 1570 | HBA_DATA(dev->dev.platform_data)->iommu = ioc; |
1571 | 1571 | ||
1572 | #ifdef CONFIG_PROC_FS | ||
1572 | if (ioc_count == 0) { | 1573 | if (ioc_count == 0) { |
1573 | proc_create(MODULE_NAME, 0, proc_runway_root, | 1574 | proc_create(MODULE_NAME, 0, proc_runway_root, |
1574 | &ccio_proc_info_fops); | 1575 | &ccio_proc_info_fops); |
1575 | proc_create(MODULE_NAME"-bitmap", 0, proc_runway_root, | 1576 | proc_create(MODULE_NAME"-bitmap", 0, proc_runway_root, |
1576 | &ccio_proc_bitmap_fops); | 1577 | &ccio_proc_bitmap_fops); |
1577 | } | 1578 | } |
1578 | 1579 | #endif | |
1579 | ioc_count++; | 1580 | ioc_count++; |
1580 | 1581 | ||
1581 | parisc_has_iommu(); | 1582 | parisc_has_iommu(); |
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 52ae0b1d470c..c590974e9815 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -353,7 +353,7 @@ static unsigned int dino_startup_irq(unsigned int irq) | |||
353 | return 0; | 353 | return 0; |
354 | } | 354 | } |
355 | 355 | ||
356 | static struct hw_interrupt_type dino_interrupt_type = { | 356 | static struct irq_chip dino_interrupt_type = { |
357 | .typename = "GSC-PCI", | 357 | .typename = "GSC-PCI", |
358 | .startup = dino_startup_irq, | 358 | .startup = dino_startup_irq, |
359 | .shutdown = dino_disable_irq, | 359 | .shutdown = dino_disable_irq, |
@@ -1019,22 +1019,22 @@ static int __init dino_probe(struct parisc_device *dev) | |||
1019 | ** It's not used to avoid chicken/egg problems | 1019 | ** It's not used to avoid chicken/egg problems |
1020 | ** with configuration accessor functions. | 1020 | ** with configuration accessor functions. |
1021 | */ | 1021 | */ |
1022 | bus = pci_scan_bus_parented(&dev->dev, dino_current_bus, | 1022 | dino_dev->hba.hba_bus = bus = pci_scan_bus_parented(&dev->dev, |
1023 | &dino_cfg_ops, NULL); | 1023 | dino_current_bus, &dino_cfg_ops, NULL); |
1024 | |||
1024 | if(bus) { | 1025 | if(bus) { |
1025 | pci_bus_add_devices(bus); | ||
1026 | /* This code *depends* on scanning being single threaded | 1026 | /* This code *depends* on scanning being single threaded |
1027 | * if it isn't, this global bus number count will fail | 1027 | * if it isn't, this global bus number count will fail |
1028 | */ | 1028 | */ |
1029 | dino_current_bus = bus->subordinate + 1; | 1029 | dino_current_bus = bus->subordinate + 1; |
1030 | pci_bus_assign_resources(bus); | 1030 | pci_bus_assign_resources(bus); |
1031 | pci_bus_add_devices(bus); | ||
1031 | } else { | 1032 | } else { |
1032 | printk(KERN_ERR "ERROR: failed to scan PCI bus on %s (probably duplicate bus number %d)\n", | 1033 | printk(KERN_ERR "ERROR: failed to scan PCI bus on %s (duplicate bus number %d?)\n", |
1033 | dev_name(&dev->dev), dino_current_bus); | 1034 | dev_name(&dev->dev), dino_current_bus); |
1034 | /* increment the bus number in case of duplicates */ | 1035 | /* increment the bus number in case of duplicates */ |
1035 | dino_current_bus++; | 1036 | dino_current_bus++; |
1036 | } | 1037 | } |
1037 | dino_dev->hba.hba_bus = bus; | ||
1038 | return 0; | 1038 | return 0; |
1039 | } | 1039 | } |
1040 | 1040 | ||
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 5b89f404e668..51220749cb65 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
@@ -188,7 +188,7 @@ static unsigned int eisa_startup_irq(unsigned int irq) | |||
188 | return 0; | 188 | return 0; |
189 | } | 189 | } |
190 | 190 | ||
191 | static struct hw_interrupt_type eisa_interrupt_type = { | 191 | static struct irq_chip eisa_interrupt_type = { |
192 | .typename = "EISA", | 192 | .typename = "EISA", |
193 | .startup = eisa_startup_irq, | 193 | .startup = eisa_startup_irq, |
194 | .shutdown = eisa_disable_irq, | 194 | .shutdown = eisa_disable_irq, |
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c index d33632917696..647adc9f85ad 100644 --- a/drivers/parisc/gsc.c +++ b/drivers/parisc/gsc.c | |||
@@ -148,7 +148,7 @@ static unsigned int gsc_asic_startup_irq(unsigned int irq) | |||
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
150 | 150 | ||
151 | static struct hw_interrupt_type gsc_asic_interrupt_type = { | 151 | static struct irq_chip gsc_asic_interrupt_type = { |
152 | .typename = "GSC-ASIC", | 152 | .typename = "GSC-ASIC", |
153 | .startup = gsc_asic_startup_irq, | 153 | .startup = gsc_asic_startup_irq, |
154 | .shutdown = gsc_asic_disable_irq, | 154 | .shutdown = gsc_asic_disable_irq, |
@@ -158,7 +158,7 @@ static struct hw_interrupt_type gsc_asic_interrupt_type = { | |||
158 | .end = no_end_irq, | 158 | .end = no_end_irq, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | int gsc_assign_irq(struct hw_interrupt_type *type, void *data) | 161 | int gsc_assign_irq(struct irq_chip *type, void *data) |
162 | { | 162 | { |
163 | static int irq = GSC_IRQ_BASE; | 163 | static int irq = GSC_IRQ_BASE; |
164 | struct irq_desc *desc; | 164 | struct irq_desc *desc; |
diff --git a/drivers/parisc/gsc.h b/drivers/parisc/gsc.h index 762a1babad60..b9d7bfb68e24 100644 --- a/drivers/parisc/gsc.h +++ b/drivers/parisc/gsc.h | |||
@@ -38,7 +38,7 @@ struct gsc_asic { | |||
38 | int gsc_common_setup(struct parisc_device *parent, struct gsc_asic *gsc_asic); | 38 | int gsc_common_setup(struct parisc_device *parent, struct gsc_asic *gsc_asic); |
39 | int gsc_alloc_irq(struct gsc_irq *dev); /* dev needs an irq */ | 39 | int gsc_alloc_irq(struct gsc_irq *dev); /* dev needs an irq */ |
40 | int gsc_claim_irq(struct gsc_irq *dev, int irq); /* dev needs this irq */ | 40 | int gsc_claim_irq(struct gsc_irq *dev, int irq); /* dev needs this irq */ |
41 | int gsc_assign_irq(struct hw_interrupt_type *type, void *data); | 41 | int gsc_assign_irq(struct irq_chip *type, void *data); |
42 | int gsc_find_local_irq(unsigned int irq, int *global_irq, int limit); | 42 | int gsc_find_local_irq(unsigned int irq, int *global_irq, int limit); |
43 | void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl, | 43 | void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl, |
44 | void (*choose)(struct parisc_device *child, void *ctrl)); | 44 | void (*choose)(struct parisc_device *child, void *ctrl)); |
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 4a9cc92d4d18..88e333553212 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c | |||
@@ -729,7 +729,7 @@ static int iosapic_set_affinity_irq(unsigned int irq, | |||
729 | } | 729 | } |
730 | #endif | 730 | #endif |
731 | 731 | ||
732 | static struct hw_interrupt_type iosapic_interrupt_type = { | 732 | static struct irq_chip iosapic_interrupt_type = { |
733 | .typename = "IO-SAPIC-level", | 733 | .typename = "IO-SAPIC-level", |
734 | .startup = iosapic_startup_irq, | 734 | .startup = iosapic_startup_irq, |
735 | .shutdown = iosapic_disable_irq, | 735 | .shutdown = iosapic_disable_irq, |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 59fbbf128365..ede614616f8e 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -980,28 +980,38 @@ static void | |||
980 | lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) | 980 | lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) |
981 | { | 981 | { |
982 | unsigned long bytecnt; | 982 | unsigned long bytecnt; |
983 | pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; /* PA_VIEW */ | ||
984 | pdc_pat_cell_mod_maddr_block_t io_pdc_cell; /* IO_VIEW */ | ||
985 | long io_count; | 983 | long io_count; |
986 | long status; /* PDC return status */ | 984 | long status; /* PDC return status */ |
987 | long pa_count; | 985 | long pa_count; |
986 | pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell; /* PA_VIEW */ | ||
987 | pdc_pat_cell_mod_maddr_block_t *io_pdc_cell; /* IO_VIEW */ | ||
988 | int i; | 988 | int i; |
989 | 989 | ||
990 | pa_pdc_cell = kzalloc(sizeof(pdc_pat_cell_mod_maddr_block_t), GFP_KERNEL); | ||
991 | if (!pa_pdc_cell) | ||
992 | return; | ||
993 | |||
994 | io_pdc_cell = kzalloc(sizeof(pdc_pat_cell_mod_maddr_block_t), GFP_KERNEL); | ||
995 | if (!pa_pdc_cell) { | ||
996 | kfree(pa_pdc_cell); | ||
997 | return; | ||
998 | } | ||
999 | |||
990 | /* return cell module (IO view) */ | 1000 | /* return cell module (IO view) */ |
991 | status = pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index, | 1001 | status = pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index, |
992 | PA_VIEW, & pa_pdc_cell); | 1002 | PA_VIEW, pa_pdc_cell); |
993 | pa_count = pa_pdc_cell.mod[1]; | 1003 | pa_count = pa_pdc_cell->mod[1]; |
994 | 1004 | ||
995 | status |= pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index, | 1005 | status |= pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index, |
996 | IO_VIEW, &io_pdc_cell); | 1006 | IO_VIEW, io_pdc_cell); |
997 | io_count = io_pdc_cell.mod[1]; | 1007 | io_count = io_pdc_cell->mod[1]; |
998 | 1008 | ||
999 | /* We've already done this once for device discovery...*/ | 1009 | /* We've already done this once for device discovery...*/ |
1000 | if (status != PDC_OK) { | 1010 | if (status != PDC_OK) { |
1001 | panic("pdc_pat_cell_module() call failed for LBA!\n"); | 1011 | panic("pdc_pat_cell_module() call failed for LBA!\n"); |
1002 | } | 1012 | } |
1003 | 1013 | ||
1004 | if (PAT_GET_ENTITY(pa_pdc_cell.mod_info) != PAT_ENTITY_LBA) { | 1014 | if (PAT_GET_ENTITY(pa_pdc_cell->mod_info) != PAT_ENTITY_LBA) { |
1005 | panic("pdc_pat_cell_module() entity returned != PAT_ENTITY_LBA!\n"); | 1015 | panic("pdc_pat_cell_module() entity returned != PAT_ENTITY_LBA!\n"); |
1006 | } | 1016 | } |
1007 | 1017 | ||
@@ -1016,8 +1026,8 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) | |||
1016 | } *p, *io; | 1026 | } *p, *io; |
1017 | struct resource *r; | 1027 | struct resource *r; |
1018 | 1028 | ||
1019 | p = (void *) &(pa_pdc_cell.mod[2+i*3]); | 1029 | p = (void *) &(pa_pdc_cell->mod[2+i*3]); |
1020 | io = (void *) &(io_pdc_cell.mod[2+i*3]); | 1030 | io = (void *) &(io_pdc_cell->mod[2+i*3]); |
1021 | 1031 | ||
1022 | /* Convert the PAT range data to PCI "struct resource" */ | 1032 | /* Convert the PAT range data to PCI "struct resource" */ |
1023 | switch(p->type & 0xff) { | 1033 | switch(p->type & 0xff) { |
@@ -1096,6 +1106,9 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) | |||
1096 | break; | 1106 | break; |
1097 | } | 1107 | } |
1098 | } | 1108 | } |
1109 | |||
1110 | kfree(pa_pdc_cell); | ||
1111 | kfree(io_pdc_cell); | ||
1099 | } | 1112 | } |
1100 | #else | 1113 | #else |
1101 | /* keep compiler from complaining about missing declarations */ | 1114 | /* keep compiler from complaining about missing declarations */ |
@@ -1509,10 +1522,6 @@ lba_driver_probe(struct parisc_device *dev) | |||
1509 | lba_bus = lba_dev->hba.hba_bus = | 1522 | lba_bus = lba_dev->hba.hba_bus = |
1510 | pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start, | 1523 | pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start, |
1511 | cfg_ops, NULL); | 1524 | cfg_ops, NULL); |
1512 | if (lba_bus) { | ||
1513 | lba_next_bus = lba_bus->subordinate + 1; | ||
1514 | pci_bus_add_devices(lba_bus); | ||
1515 | } | ||
1516 | 1525 | ||
1517 | /* This is in lieu of calling pci_assign_unassigned_resources() */ | 1526 | /* This is in lieu of calling pci_assign_unassigned_resources() */ |
1518 | if (is_pdc_pat()) { | 1527 | if (is_pdc_pat()) { |
@@ -1533,7 +1542,6 @@ lba_driver_probe(struct parisc_device *dev) | |||
1533 | } | 1542 | } |
1534 | pci_enable_bridges(lba_bus); | 1543 | pci_enable_bridges(lba_bus); |
1535 | 1544 | ||
1536 | |||
1537 | /* | 1545 | /* |
1538 | ** Once PCI register ops has walked the bus, access to config | 1546 | ** Once PCI register ops has walked the bus, access to config |
1539 | ** space is restricted. Avoids master aborts on config cycles. | 1547 | ** space is restricted. Avoids master aborts on config cycles. |
@@ -1543,6 +1551,11 @@ lba_driver_probe(struct parisc_device *dev) | |||
1543 | lba_dev->flags |= LBA_FLAG_SKIP_PROBE; | 1551 | lba_dev->flags |= LBA_FLAG_SKIP_PROBE; |
1544 | } | 1552 | } |
1545 | 1553 | ||
1554 | if (lba_bus) { | ||
1555 | lba_next_bus = lba_bus->subordinate + 1; | ||
1556 | pci_bus_add_devices(lba_bus); | ||
1557 | } | ||
1558 | |||
1546 | /* Whew! Finally done! Tell services we got this one covered. */ | 1559 | /* Whew! Finally done! Tell services we got this one covered. */ |
1547 | return 0; | 1560 | return 0; |
1548 | } | 1561 | } |
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index d46dd57450ac..123d8fe3427d 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c | |||
@@ -2057,6 +2057,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r) | |||
2057 | r->start = (base & ~1UL) | PCI_F_EXTEND; | 2057 | r->start = (base & ~1UL) | PCI_F_EXTEND; |
2058 | size = ~ READ_REG32(reg + LMMIO_DIRECT0_MASK); | 2058 | size = ~ READ_REG32(reg + LMMIO_DIRECT0_MASK); |
2059 | r->end = r->start + size; | 2059 | r->end = r->start + size; |
2060 | r->flags = IORESOURCE_MEM; | ||
2060 | } | 2061 | } |
2061 | } | 2062 | } |
2062 | 2063 | ||
@@ -2093,4 +2094,5 @@ void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r ) | |||
2093 | size = (~READ_REG32(sba->sba_hpa + LMMIO_DIST_MASK)) / ROPES_PER_IOC; | 2094 | size = (~READ_REG32(sba->sba_hpa + LMMIO_DIST_MASK)) / ROPES_PER_IOC; |
2094 | r->start += rope * (size + 1); /* adjust base for this rope */ | 2095 | r->start += rope * (size + 1); /* adjust base for this rope */ |
2095 | r->end = r->start + size; | 2096 | r->end = r->start + size; |
2097 | r->flags = IORESOURCE_MEM; | ||
2096 | } | 2098 | } |
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index 33e5ade774ca..675f04e6597a 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c | |||
@@ -325,7 +325,7 @@ static unsigned int superio_startup_irq(unsigned int irq) | |||
325 | return 0; | 325 | return 0; |
326 | } | 326 | } |
327 | 327 | ||
328 | static struct hw_interrupt_type superio_interrupt_type = { | 328 | static struct irq_chip superio_interrupt_type = { |
329 | .typename = SUPERIO, | 329 | .typename = SUPERIO, |
330 | .startup = superio_startup_irq, | 330 | .startup = superio_startup_irq, |
331 | .shutdown = superio_disable_irq, | 331 | .shutdown = superio_disable_irq, |
@@ -434,8 +434,8 @@ static void __init superio_parport_init(void) | |||
434 | 0 /*base_hi*/, | 434 | 0 /*base_hi*/, |
435 | PAR_IRQ, | 435 | PAR_IRQ, |
436 | PARPORT_DMA_NONE /* dma */, | 436 | PARPORT_DMA_NONE /* dma */, |
437 | NULL /*struct pci_dev* */), | 437 | NULL /*struct pci_dev* */, |
438 | 0 /* shared irq flags */ ) | 438 | 0 /* shared irq flags */)) |
439 | 439 | ||
440 | printk(KERN_WARNING PFX "Probing parallel port failed.\n"); | 440 | printk(KERN_WARNING PFX "Probing parallel port failed.\n"); |
441 | #endif /* CONFIG_PARPORT_PC */ | 441 | #endif /* CONFIG_PARPORT_PC */ |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index d6d65ef85f54..8afcf08eba98 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -616,6 +616,8 @@ config FB_STI | |||
616 | select FB_CFB_FILLRECT | 616 | select FB_CFB_FILLRECT |
617 | select FB_CFB_COPYAREA | 617 | select FB_CFB_COPYAREA |
618 | select FB_CFB_IMAGEBLIT | 618 | select FB_CFB_IMAGEBLIT |
619 | select STI_CONSOLE | ||
620 | select VT | ||
619 | default y | 621 | default y |
620 | ---help--- | 622 | ---help--- |
621 | STI refers to the HP "Standard Text Interface" which is a set of | 623 | STI refers to the HP "Standard Text Interface" which is a set of |
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 8f729aedc1a3..d3042a6ba03d 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -29,6 +29,12 @@ | |||
29 | #define cpu_relax() asm volatile("" ::: "memory") | 29 | #define cpu_relax() asm volatile("" ::: "memory") |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef __hppa__ | ||
33 | #include "../../arch/parisc/include/asm/unistd.h" | ||
34 | #define rmb() asm volatile("" ::: "memory") | ||
35 | #define cpu_relax() asm volatile("" ::: "memory"); | ||
36 | #endif | ||
37 | |||
32 | #include <time.h> | 38 | #include <time.h> |
33 | #include <unistd.h> | 39 | #include <unistd.h> |
34 | #include <sys/types.h> | 40 | #include <sys/types.h> |