aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/entry.S6
-rw-r--r--arch/s390/kernel/entry64.S6
-rw-r--r--arch/s390/kernel/head.S9
-rw-r--r--arch/s390/kernel/head64.S5
-rw-r--r--arch/s390/kernel/s390_ext.c16
-rw-r--r--arch/s390/kernel/setup.c6
-rw-r--r--arch/s390/kernel/smp.c10
7 files changed, 29 insertions, 29 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 5b262b5d869f..1a271b16cb5c 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -690,9 +690,9 @@ mcck_int_handler:
690 bo BASED(0f) 690 bo BASED(0f)
691 spt __LC_LAST_UPDATE_TIMER # revalidate cpu timer 691 spt __LC_LAST_UPDATE_TIMER # revalidate cpu timer
692#ifdef CONFIG_VIRT_CPU_ACCOUNTING 692#ifdef CONFIG_VIRT_CPU_ACCOUNTING
693 mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER 693 mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER
694 mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER 694 mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER
695 mvc __LC_LAST_UPDATE_TIMER(8),__LC_EXIT_TIMER 695 mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER
6960: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? 6960: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid?
697 bno BASED(mcck_no_vtime) # no -> skip cleanup critical 697 bno BASED(mcck_no_vtime) # no -> skip cleanup critical
698 tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? 698 tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ?
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 57ca75d0ad7f..d9f22915008c 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -727,9 +727,9 @@ mcck_int_handler:
727 jo 0f 727 jo 0f
728 spt __LC_LAST_UPDATE_TIMER 728 spt __LC_LAST_UPDATE_TIMER
729#ifdef CONFIG_VIRT_CPU_ACCOUNTING 729#ifdef CONFIG_VIRT_CPU_ACCOUNTING
730 mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER 730 mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER
731 mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER 731 mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER
732 mvc __LC_LAST_UPDATE_TIMER(8),__LC_EXIT_TIMER 732 mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER
7330: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? 7330: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid?
734 jno mcck_no_vtime # no -> no timer update 734 jno mcck_no_vtime # no -> no timer update
735 tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? 735 tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ?
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index fc8bf5e285f6..d12cff11b4bc 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -535,8 +535,13 @@ startup:basr %r13,0 # get base
535 lhi %r1,0 535 lhi %r1,0
536 icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 536 icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0
537 jnz .Lscnd 537 jnz .Lscnd
538 l %r1,.Lscpincr2-PARMAREA+4(%r4) # otherwise use this one 538 lhi %r1,0x800 # otherwise report 2GB
539.Lscnd: 539.Lscnd:
540 lhi %r3,0x800 # limit reported memory size to 2GB
541 cr %r1,%r3
542 jl .Lno2gb
543 lr %r1,%r3
544.Lno2gb:
540 xr %r3,%r3 # same logic 545 xr %r3,%r3 # same logic
541 ic %r3,.Lscpa1-PARMAREA(%r4) 546 ic %r3,.Lscpa1-PARMAREA(%r4)
542 chi %r3,0x00 547 chi %r3,0x00
@@ -765,7 +770,7 @@ _stext: basr %r13,0 # get base
765 770
766# check control registers 771# check control registers
767 stctl %c0,%c15,0(%r15) 772 stctl %c0,%c15,0(%r15)
768 oi 2(%r15),0x20 # enable sigp external interrupts 773 oi 2(%r15),0x40 # enable sigp emergency signal
769 oi 0(%r15),0x10 # switch on low address protection 774 oi 0(%r15),0x10 # switch on low address protection
770 lctl %c0,%c15,0(%r15) 775 lctl %c0,%c15,0(%r15)
771 776
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index f525c0c21250..10bc592c3637 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -658,10 +658,8 @@ startup:basr %r13,0 # get base
658# 658#
659 la %r1,0f-.LPG1(%r13) # set program check address 659 la %r1,0f-.LPG1(%r13) # set program check address
660 stg %r1,__LC_PGM_NEW_PSW+8 660 stg %r1,__LC_PGM_NEW_PSW+8
661 mvc __LC_DIAG44_OPCODE(8),.Lnop-.LPG1(%r13)
662 diag 0,0,0x44 # test diag 0x44 661 diag 0,0,0x44 # test diag 0x44
663 oi 7(%r12),32 # set diag44 flag 662 oi 7(%r12),32 # set diag44 flag
664 mvc __LC_DIAG44_OPCODE(8),.Ldiag44-.LPG1(%r13)
6650: 6630:
666 664
667# 665#
@@ -702,7 +700,6 @@ startup:basr %r13,0 # get base
702.L4malign:.quad 0xffffffffffc00000 700.L4malign:.quad 0xffffffffffc00000
703.Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 701.Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8
704.Lnop: .long 0x07000700 702.Lnop: .long 0x07000700
705.Ldiag44:.long 0x83000044
706 703
707 .org PARMAREA-64 704 .org PARMAREA-64
708.Lduct: .long 0,0,0,0,0,0,0,0 705.Lduct: .long 0,0,0,0,0,0,0,0
@@ -765,7 +762,7 @@ _stext: basr %r13,0 # get base
765 762
766# check control registers 763# check control registers
767 stctg %c0,%c15,0(%r15) 764 stctg %c0,%c15,0(%r15)
768 oi 6(%r15),0x20 # enable sigp external interrupts 765 oi 6(%r15),0x40 # enable sigp emergency signal
769 oi 4(%r15),0x10 # switch on low address proctection 766 oi 4(%r15),0x10 # switch on low address proctection
770 lctlg %c0,%c15,0(%r15) 767 lctlg %c0,%c15,0(%r15)
771 768
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c
index 3bdd38ec71da..207bc511a6e3 100644
--- a/arch/s390/kernel/s390_ext.c
+++ b/arch/s390/kernel/s390_ext.c
@@ -19,7 +19,6 @@
19#include <asm/irq.h> 19#include <asm/irq.h>
20 20
21/* 21/*
22 * Simple hash strategy: index = code & 0xff;
23 * ext_int_hash[index] is the start of the list for all external interrupts 22 * ext_int_hash[index] is the start of the list for all external interrupts
24 * that hash to this index. With the current set of external interrupts 23 * that hash to this index. With the current set of external interrupts
25 * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000 24 * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000
@@ -27,6 +26,11 @@
27 */ 26 */
28ext_int_info_t *ext_int_hash[256] = { 0, }; 27ext_int_info_t *ext_int_hash[256] = { 0, };
29 28
29static inline int ext_hash(__u16 code)
30{
31 return (code + (code >> 9)) & 0xff;
32}
33
30int register_external_interrupt(__u16 code, ext_int_handler_t handler) 34int register_external_interrupt(__u16 code, ext_int_handler_t handler)
31{ 35{
32 ext_int_info_t *p; 36 ext_int_info_t *p;
@@ -37,7 +41,7 @@ int register_external_interrupt(__u16 code, ext_int_handler_t handler)
37 return -ENOMEM; 41 return -ENOMEM;
38 p->code = code; 42 p->code = code;
39 p->handler = handler; 43 p->handler = handler;
40 index = code & 0xff; 44 index = ext_hash(code);
41 p->next = ext_int_hash[index]; 45 p->next = ext_int_hash[index];
42 ext_int_hash[index] = p; 46 ext_int_hash[index] = p;
43 return 0; 47 return 0;
@@ -52,7 +56,7 @@ int register_early_external_interrupt(__u16 code, ext_int_handler_t handler,
52 return -EINVAL; 56 return -EINVAL;
53 p->code = code; 57 p->code = code;
54 p->handler = handler; 58 p->handler = handler;
55 index = code & 0xff; 59 index = ext_hash(code);
56 p->next = ext_int_hash[index]; 60 p->next = ext_int_hash[index];
57 ext_int_hash[index] = p; 61 ext_int_hash[index] = p;
58 return 0; 62 return 0;
@@ -63,7 +67,7 @@ int unregister_external_interrupt(__u16 code, ext_int_handler_t handler)
63 ext_int_info_t *p, *q; 67 ext_int_info_t *p, *q;
64 int index; 68 int index;
65 69
66 index = code & 0xff; 70 index = ext_hash(code);
67 q = NULL; 71 q = NULL;
68 p = ext_int_hash[index]; 72 p = ext_int_hash[index];
69 while (p != NULL) { 73 while (p != NULL) {
@@ -90,7 +94,7 @@ int unregister_early_external_interrupt(__u16 code, ext_int_handler_t handler,
90 94
91 if (p == NULL || p->code != code || p->handler != handler) 95 if (p == NULL || p->code != code || p->handler != handler)
92 return -EINVAL; 96 return -EINVAL;
93 index = code & 0xff; 97 index = ext_hash(code);
94 q = ext_int_hash[index]; 98 q = ext_int_hash[index];
95 if (p != q) { 99 if (p != q) {
96 while (q != NULL) { 100 while (q != NULL) {
@@ -120,7 +124,7 @@ void do_extint(struct pt_regs *regs, unsigned short code)
120 */ 124 */
121 account_ticks(regs); 125 account_ticks(regs);
122 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; 126 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
123 index = code & 0xff; 127 index = ext_hash(code);
124 for (p = ext_int_hash[index]; p; p = p->next) { 128 for (p = ext_int_hash[index]; p; p = p->next) {
125 if (likely(p->code == code)) { 129 if (likely(p->code == code)) {
126 if (likely(p->handler)) 130 if (likely(p->handler))
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index a12183989a79..5ba5a5485da9 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -431,12 +431,6 @@ setup_lowcore(void)
431 ctl_set_bit(14, 29); 431 ctl_set_bit(14, 29);
432 } 432 }
433#endif 433#endif
434#ifdef CONFIG_ARCH_S390X
435 if (MACHINE_HAS_DIAG44)
436 lc->diag44_opcode = 0x83000044;
437 else
438 lc->diag44_opcode = 0x07000700;
439#endif /* CONFIG_ARCH_S390X */
440 set_prefix((u32)(unsigned long) lc); 434 set_prefix((u32)(unsigned long) lc);
441} 435}
442 436
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 642572a8e334..da77f001af8d 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -375,7 +375,7 @@ static void smp_ext_bitcall(int cpu, ec_bit_sig sig)
375 * Set signaling bit in lowcore of target cpu and kick it 375 * Set signaling bit in lowcore of target cpu and kick it
376 */ 376 */
377 set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast); 377 set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast);
378 while(signal_processor(cpu, sigp_external_call) == sigp_busy) 378 while(signal_processor(cpu, sigp_emergency_signal) == sigp_busy)
379 udelay(10); 379 udelay(10);
380} 380}
381 381
@@ -394,7 +394,7 @@ static void smp_ext_bitcall_others(ec_bit_sig sig)
394 * Set signaling bit in lowcore of target cpu and kick it 394 * Set signaling bit in lowcore of target cpu and kick it
395 */ 395 */
396 set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast); 396 set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast);
397 while (signal_processor(cpu, sigp_external_call) == sigp_busy) 397 while (signal_processor(cpu, sigp_emergency_signal) == sigp_busy)
398 udelay(10); 398 udelay(10);
399 } 399 }
400} 400}
@@ -751,9 +751,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
751 unsigned int cpu; 751 unsigned int cpu;
752 int i; 752 int i;
753 753
754 /* request the 0x1202 external interrupt */ 754 /* request the 0x1201 emergency signal external interrupt */
755 if (register_external_interrupt(0x1202, do_ext_call_interrupt) != 0) 755 if (register_external_interrupt(0x1201, do_ext_call_interrupt) != 0)
756 panic("Couldn't request external interrupt 0x1202"); 756 panic("Couldn't request external interrupt 0x1201");
757 smp_check_cpus(max_cpus); 757 smp_check_cpus(max_cpus);
758 memset(lowcore_ptr,0,sizeof(lowcore_ptr)); 758 memset(lowcore_ptr,0,sizeof(lowcore_ptr));
759 /* 759 /*