Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'parisc-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:
"This time we made the kernel- and interruption stack allocation
reentrant which fixed some strange kernel crashes (specifically
protection ID traps).

Furthemore this patchset fixes the interrupt stack in UP and SMP
configurations by using native locking instructions. And finally
usage of floating point calculations on parisc were disabled in the
MPILIB."

* 'parisc-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: fix irq stack on UP and SMP
parisc/superio: Use module_pci_driver to register driver
parisc: make interrupt and interruption stack allocation reentrant
parisc: show number of FPE and unaligned access handler calls in /proc/interrupts
parisc: add additional parisc git tree to MAINTAINERS file
parisc: use PAGE_SHIFT instead of hardcoded value 12 in pacache.S
parisc: add rp5470 entry to machine database
MPILIB: disable usage of floating point registers on parisc

+62 -71
+1
MAINTAINERS
··· 6084 6084 W: http://www.parisc-linux.org/ 6085 6085 Q: http://patchwork.kernel.org/project/linux-parisc/list/ 6086 6086 T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6.git 6087 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git 6087 6088 S: Maintained 6088 6089 F: arch/parisc/ 6089 6090 F: drivers/parisc/
-1
arch/parisc/include/asm/assembly.h
··· 438 438 SAVE_SP (%sr4, PT_SR4 (\regs)) 439 439 SAVE_SP (%sr5, PT_SR5 (\regs)) 440 440 SAVE_SP (%sr6, PT_SR6 (\regs)) 441 - SAVE_SP (%sr7, PT_SR7 (\regs)) 442 441 443 442 SAVE_CR (%cr17, PT_IASQ0(\regs)) 444 443 mtctl %r0, %cr17
+2 -5
arch/parisc/include/asm/hardirq.h
··· 17 17 18 18 typedef struct { 19 19 unsigned int __softirq_pending; 20 - #ifdef CONFIG_DEBUG_STACKOVERFLOW 21 20 unsigned int kernel_stack_usage; 22 - #ifdef CONFIG_IRQSTACKS 23 21 unsigned int irq_stack_usage; 24 - unsigned int irq_stack_counter; 25 - #endif 26 - #endif 27 22 #ifdef CONFIG_SMP 28 23 unsigned int irq_resched_count; 29 24 unsigned int irq_call_count; 30 25 #endif 26 + unsigned int irq_unaligned_count; 27 + unsigned int irq_fpassist_count; 31 28 unsigned int irq_tlb_count; 32 29 } ____cacheline_aligned irq_cpustat_t; 33 30
-21
arch/parisc/include/asm/processor.h
··· 17 17 #include <asm/ptrace.h> 18 18 #include <asm/types.h> 19 19 #include <asm/percpu.h> 20 - 21 20 #endif /* __ASSEMBLY__ */ 22 21 23 22 /* ··· 56 57 #endif 57 58 58 59 #ifndef __ASSEMBLY__ 59 - 60 - /* 61 - * IRQ STACK - used for irq handler 62 - */ 63 - #ifdef __KERNEL__ 64 - 65 - #include <linux/spinlock_types.h> 66 - 67 - #define IRQ_STACK_SIZE (4096 << 2) /* 16k irq stack size */ 68 - 69 - union irq_stack_union { 70 - unsigned long stack[IRQ_STACK_SIZE/sizeof(unsigned long)]; 71 - raw_spinlock_t lock; 72 - }; 73 - 74 - DECLARE_PER_CPU(union irq_stack_union, irq_stack_union); 75 - 76 - void call_on_stack(unsigned long p1, void *func, unsigned long new_stack); 77 - 78 - #endif /* __KERNEL__ */ 79 60 80 61 /* 81 62 * Data detected about CPUs at boot time which is the same for all CPU's.
+10 -9
arch/parisc/kernel/entry.S
··· 65 65 rsm PSW_SM_I, %r0 /* barrier for "Relied upon Translation */ 66 66 mtsp %r0, %sr4 67 67 mtsp %r0, %sr5 68 - mfsp %sr7, %r1 69 - or,= %r0,%r1,%r0 /* Only save sr7 in sr3 if sr7 != 0 */ 70 - mtsp %r1, %sr3 68 + mtsp %r0, %sr6 71 69 tovirt_r1 %r29 72 70 load32 KERNEL_PSW, %r1 73 71 74 72 rsm PSW_SM_QUIET,%r0 /* second "heavy weight" ctl op */ 75 - mtsp %r0, %sr6 76 - mtsp %r0, %sr7 77 73 mtctl %r0, %cr17 /* Clear IIASQ tail */ 78 74 mtctl %r0, %cr17 /* Clear IIASQ head */ 79 75 mtctl %r1, %ipsw ··· 115 119 116 120 /* we save the registers in the task struct */ 117 121 122 + copy %r30, %r17 118 123 mfctl %cr30, %r1 124 + ldo THREAD_SZ_ALGN(%r1), %r30 125 + mtsp %r0,%sr7 126 + mtsp %r16,%sr3 119 127 tophys %r1,%r9 120 128 LDREG TI_TASK(%r9), %r1 /* thread_info -> task_struct */ 121 129 tophys %r1,%r9 122 130 ldo TASK_REGS(%r9),%r9 123 - STREG %r30, PT_GR30(%r9) 131 + STREG %r17,PT_GR30(%r9) 124 132 STREG %r29,PT_GR29(%r9) 125 133 STREG %r26,PT_GR26(%r9) 134 + STREG %r16,PT_SR7(%r9) 126 135 copy %r9,%r29 127 - mfctl %cr30, %r1 128 - ldo THREAD_SZ_ALGN(%r1), %r30 129 136 .endm 130 137 131 138 .macro get_stack_use_r30 ··· 136 137 /* we put a struct pt_regs on the stack and save the registers there */ 137 138 138 139 tophys %r30,%r9 139 - STREG %r30,PT_GR30(%r9) 140 + copy %r30,%r1 140 141 ldo PT_SZ_ALGN(%r30),%r30 142 + STREG %r1,PT_GR30(%r9) 141 143 STREG %r29,PT_GR29(%r9) 142 144 STREG %r26,PT_GR26(%r9) 145 + STREG %r16,PT_SR7(%r9) 143 146 copy %r9,%r29 144 147 .endm 145 148
+1
arch/parisc/kernel/hardware.c
··· 222 222 {HPHW_NPROC,0x5DD,0x4,0x81,"Duet W2"}, 223 223 {HPHW_NPROC,0x5DE,0x4,0x81,"Piccolo W+"}, 224 224 {HPHW_NPROC,0x5DF,0x4,0x81,"Cantata W2"}, 225 + {HPHW_NPROC,0x5DF,0x0,0x00,"Marcato W+? (rp5470)"}, 225 226 {HPHW_NPROC,0x5E0,0x4,0x91,"Cantata DC- W2"}, 226 227 {HPHW_NPROC,0x5E1,0x4,0x91,"Crescendo DC- W2"}, 227 228 {HPHW_NPROC,0x5E2,0x4,0x91,"Crescendo 650 W2"},
+34 -15
arch/parisc/kernel/irq.c
··· 27 27 #include <linux/interrupt.h> 28 28 #include <linux/kernel_stat.h> 29 29 #include <linux/seq_file.h> 30 - #include <linux/spinlock.h> 31 30 #include <linux/types.h> 32 31 #include <asm/io.h> 33 32 34 33 #include <asm/smp.h> 34 + #include <asm/ldcw.h> 35 35 36 36 #undef PARISC_IRQ_CR16_COUNTS 37 37 ··· 172 172 for_each_online_cpu(j) 173 173 seq_printf(p, "%10u ", irq_stats(j)->irq_stack_usage); 174 174 seq_puts(p, " Interrupt stack usage\n"); 175 - seq_printf(p, "%*s: ", prec, "ISC"); 176 - for_each_online_cpu(j) 177 - seq_printf(p, "%10u ", irq_stats(j)->irq_stack_counter); 178 - seq_puts(p, " Interrupt stack usage counter\n"); 179 175 # endif 180 176 #endif 181 177 #ifdef CONFIG_SMP ··· 184 188 seq_printf(p, "%10u ", irq_stats(j)->irq_call_count); 185 189 seq_puts(p, " Function call interrupts\n"); 186 190 #endif 191 + seq_printf(p, "%*s: ", prec, "UAH"); 192 + for_each_online_cpu(j) 193 + seq_printf(p, "%10u ", irq_stats(j)->irq_unaligned_count); 194 + seq_puts(p, " Unaligned access handler traps\n"); 195 + seq_printf(p, "%*s: ", prec, "FPA"); 196 + for_each_online_cpu(j) 197 + seq_printf(p, "%10u ", irq_stats(j)->irq_fpassist_count); 198 + seq_puts(p, " Floating point assist traps\n"); 187 199 seq_printf(p, "%*s: ", prec, "TLB"); 188 200 for_each_online_cpu(j) 189 201 seq_printf(p, "%10u ", irq_stats(j)->irq_tlb_count); ··· 380 376 return (BITS_PER_LONG - bit) + TIMER_IRQ; 381 377 } 382 378 379 + #ifdef CONFIG_IRQSTACKS 380 + /* 381 + * IRQ STACK - used for irq handler 382 + */ 383 + #define IRQ_STACK_SIZE (4096 << 2) /* 16k irq stack size */ 384 + 385 + union irq_stack_union { 386 + unsigned long stack[IRQ_STACK_SIZE/sizeof(unsigned long)]; 387 + volatile unsigned int slock[4]; 388 + volatile unsigned int lock[1]; 389 + }; 390 + 391 + DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = { 392 + .slock = { 1,1,1,1 }, 393 + }; 394 + #endif 395 + 396 + 383 397 int sysctl_panic_on_stackoverflow = 1; 384 398 385 399 static inline void stack_overflow_check(struct pt_regs *regs) ··· 464 442 } 465 443 466 444 #ifdef CONFIG_IRQSTACKS 467 - DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = { 468 - .lock = __RAW_SPIN_LOCK_UNLOCKED((irq_stack_union).lock) 469 - }; 445 + /* in entry.S: */ 446 + void call_on_stack(unsigned long p1, void *func, unsigned long new_stack); 470 447 471 448 static void execute_on_irq_stack(void *func, unsigned long param1) 472 449 { 473 450 union irq_stack_union *union_ptr; 474 451 unsigned long irq_stack; 475 - raw_spinlock_t *irq_stack_in_use; 452 + volatile unsigned int *irq_stack_in_use; 476 453 477 454 union_ptr = &per_cpu(irq_stack_union, smp_processor_id()); 478 455 irq_stack = (unsigned long) &union_ptr->stack; 479 - irq_stack = ALIGN(irq_stack + sizeof(irq_stack_union.lock), 456 + irq_stack = ALIGN(irq_stack + sizeof(irq_stack_union.slock), 480 457 64); /* align for stack frame usage */ 481 458 482 459 /* We may be called recursive. If we are already using the irq stack, 483 460 * just continue to use it. Use spinlocks to serialize 484 461 * the irq stack usage. 485 462 */ 486 - irq_stack_in_use = &union_ptr->lock; 487 - if (!raw_spin_trylock(irq_stack_in_use)) { 463 + irq_stack_in_use = (volatile unsigned int *)__ldcw_align(union_ptr); 464 + if (!__ldcw(irq_stack_in_use)) { 488 465 void (*direct_call)(unsigned long p1) = func; 489 466 490 467 /* We are using the IRQ stack already. ··· 495 474 /* This is where we switch to the IRQ stack. */ 496 475 call_on_stack(param1, func, irq_stack); 497 476 498 - __inc_irq_stat(irq_stack_counter); 499 - 500 477 /* free up irq stack usage. */ 501 - do_raw_spin_unlock(irq_stack_in_use); 478 + *irq_stack_in_use = 1; 502 479 } 503 480 504 481 asmlinkage void do_softirq(void)
+6 -6
arch/parisc/kernel/pacache.S
··· 605 605 convert_phys_for_tlb_insert20 %r26 /* convert phys addr to tlb insert format */ 606 606 convert_phys_for_tlb_insert20 %r23 /* convert phys addr to tlb insert format */ 607 607 depd %r24,63,22, %r28 /* Form aliased virtual address 'to' */ 608 - depdi 0, 63,PAGE_SHIFT, %r28 /* Clear any offset bits */ 608 + depdi 0, 63,PAGE_SHIFT, %r28 /* Clear any offset bits */ 609 609 copy %r28, %r29 610 610 depdi 1, 41,1, %r29 /* Form aliased virtual address 'from' */ 611 611 #else 612 612 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ 613 613 extrw,u %r23, 24,25, %r23 /* convert phys addr to tlb insert format */ 614 614 depw %r24, 31,22, %r28 /* Form aliased virtual address 'to' */ 615 - depwi 0, 31,12, %r28 /* Clear any offset bits */ 615 + depwi 0, 31,PAGE_SHIFT, %r28 /* Clear any offset bits */ 616 616 copy %r28, %r29 617 617 depwi 1, 9,1, %r29 /* Form aliased virtual address 'from' */ 618 618 #endif ··· 762 762 #else 763 763 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ 764 764 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ 765 - depwi 0, 31,12, %r28 /* Clear any offset bits */ 765 + depwi 0, 31,PAGE_SHIFT, %r28 /* Clear any offset bits */ 766 766 #endif 767 767 768 768 /* Purge any old translation */ ··· 846 846 #else 847 847 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ 848 848 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ 849 - depwi 0, 31,12, %r28 /* Clear any offset bits */ 849 + depwi 0, 31,PAGE_SHIFT, %r28 /* Clear any offset bits */ 850 850 #endif 851 851 852 852 /* Purge any old translation */ ··· 918 918 #endif 919 919 convert_phys_for_tlb_insert20 %r26 /* convert phys addr to tlb insert format */ 920 920 depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ 921 - depdi 0, 63,PAGE_SHIFT, %r28 /* Clear any offset bits */ 921 + depdi 0, 63,PAGE_SHIFT, %r28 /* Clear any offset bits */ 922 922 #else 923 923 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ 924 924 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ 925 - depwi 0, 31,12, %r28 /* Clear any offset bits */ 925 + depwi 0, 31,PAGE_SHIFT, %r28 /* Clear any offset bits */ 926 926 #endif 927 927 928 928 /* Purge any old translation */
+1
arch/parisc/kernel/traps.c
··· 646 646 case 14: 647 647 /* Assist Exception Trap, i.e. floating point exception. */ 648 648 die_if_kernel("Floating point exception", regs, 0); /* quiet */ 649 + __inc_irq_stat(irq_fpassist_count); 649 650 handle_fpe(regs); 650 651 return; 651 652
+3
arch/parisc/kernel/unaligned.c
··· 27 27 #include <linux/signal.h> 28 28 #include <linux/ratelimit.h> 29 29 #include <asm/uaccess.h> 30 + #include <asm/hardirq.h> 30 31 31 32 /* #define DEBUG_UNALIGNED 1 */ 32 33 ··· 454 453 int ret = ERR_NOTHANDLED; 455 454 struct siginfo si; 456 455 register int flop=0; /* true if this is a flop */ 456 + 457 + __inc_irq_stat(irq_unaligned_count); 457 458 458 459 /* log a message with pacing */ 459 460 if (user_mode(regs)) {
+1 -12
drivers/parisc/superio.c
··· 494 494 .probe = superio_probe, 495 495 }; 496 496 497 - static int __init superio_modinit(void) 498 - { 499 - return pci_register_driver(&superio_driver); 500 - } 501 - 502 - static void __exit superio_exit(void) 503 - { 504 - pci_unregister_driver(&superio_driver); 505 - } 506 - 507 - module_init(superio_modinit); 508 - module_exit(superio_exit); 497 + module_pci_driver(superio_driver);
+3 -2
lib/mpi/longlong.h
··· 318 318 "rM" ((USItype)(bh)), \ 319 319 "rM" ((USItype)(al)), \ 320 320 "rM" ((USItype)(bl))) 321 - #if defined(_PA_RISC1_1) 321 + #if 0 && defined(_PA_RISC1_1) 322 + /* xmpyu uses floating point register which is not allowed in Linux kernel. */ 322 323 #define umul_ppmm(wh, wl, u, v) \ 323 324 do { \ 324 325 union {UDItype __ll; \ ··· 338 337 #define UMUL_TIME 40 339 338 #define UDIV_TIME 80 340 339 #endif 341 - #ifndef LONGLONG_STANDALONE 340 + #if 0 /* #ifndef LONGLONG_STANDALONE */ 342 341 #define udiv_qrnnd(q, r, n1, n0, d) \ 343 342 do { USItype __r; \ 344 343 (q) = __udiv_qrnnd(&__r, (n1), (n0), (d)); \