diff options
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 26 | ||||
-rw-r--r-- | arch/s390/kernel/entry.S | 6 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 6 | ||||
-rw-r--r-- | arch/s390/kernel/head.S | 16 | ||||
-rw-r--r-- | arch/s390/kernel/head64.S | 12 | ||||
-rw-r--r-- | arch/s390/kernel/machine_kexec.c | 7 | ||||
-rw-r--r-- | arch/s390/kernel/relocate_kernel.S | 41 | ||||
-rw-r--r-- | arch/s390/kernel/relocate_kernel64.S | 45 | ||||
-rw-r--r-- | arch/s390/kernel/s390_ext.c | 16 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 6 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 16 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 5 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 15 |
13 files changed, 183 insertions, 34 deletions
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 799a98eac92d..23fe94e58688 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1449,3 +1449,29 @@ compat_sys_kexec_load_wrapper: | |||
1449 | llgtr %r4,%r4 # struct kexec_segment * | 1449 | llgtr %r4,%r4 # struct kexec_segment * |
1450 | llgfr %r5,%r5 # unsigned long | 1450 | llgfr %r5,%r5 # unsigned long |
1451 | jg compat_sys_kexec_load | 1451 | jg compat_sys_kexec_load |
1452 | |||
1453 | .globl sys_ioprio_set_wrapper | ||
1454 | sys_ioprio_set_wrapper: | ||
1455 | lgfr %r2,%r2 # int | ||
1456 | lgfr %r3,%r3 # int | ||
1457 | lgfr %r4,%r4 # int | ||
1458 | jg sys_ioprio_set | ||
1459 | |||
1460 | .globl sys_ioprio_get_wrapper | ||
1461 | sys_ioprio_get_wrapper: | ||
1462 | lgfr %r2,%r2 # int | ||
1463 | lgfr %r3,%r3 # int | ||
1464 | jg sys_ioprio_get | ||
1465 | |||
1466 | .globl sys_inotify_add_watch_wrapper | ||
1467 | sys_inotify_add_watch_wrapper: | ||
1468 | lgfr %r2,%r2 # int | ||
1469 | llgtr %r3,%r3 # const char * | ||
1470 | llgfr %r4,%r4 # u32 | ||
1471 | jg sys_inotify_add_watch | ||
1472 | |||
1473 | .globl sys_inotify_rm_watch_wrapper | ||
1474 | sys_inotify_rm_watch_wrapper: | ||
1475 | lgfr %r2,%r2 # int | ||
1476 | llgfr %r3,%r3 # u32 | ||
1477 | jg sys_inotify_rm_watch | ||
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 |
696 | 0: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? | 696 | 0: 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 |
733 | 0: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? | 733 | 0: 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..2710e66fefba 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -346,6 +346,13 @@ iplstart: | |||
346 | la %r2,.Lreset | 346 | la %r2,.Lreset |
347 | lhi %r3,26 | 347 | lhi %r3,26 |
348 | diag %r2,%r3,8 | 348 | diag %r2,%r3,8 |
349 | la %r5,.Lirb | ||
350 | stsch 0(%r5) # check if irq is pending | ||
351 | tm 30(%r5),0x0f # by verifying if any of the | ||
352 | bnz .Lwaitforirq # activity or status control | ||
353 | tm 31(%r5),0xff # bits is set in the schib | ||
354 | bz .Lnoreset | ||
355 | .Lwaitforirq: | ||
349 | mvc 0x78(8),.Lrdrnewpsw # set up IO interrupt psw | 356 | mvc 0x78(8),.Lrdrnewpsw # set up IO interrupt psw |
350 | .Lwaitrdrirq: | 357 | .Lwaitrdrirq: |
351 | lpsw .Lrdrwaitpsw | 358 | lpsw .Lrdrwaitpsw |
@@ -535,8 +542,13 @@ startup:basr %r13,0 # get base | |||
535 | lhi %r1,0 | 542 | lhi %r1,0 |
536 | icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 | 543 | icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 |
537 | jnz .Lscnd | 544 | jnz .Lscnd |
538 | l %r1,.Lscpincr2-PARMAREA+4(%r4) # otherwise use this one | 545 | lhi %r1,0x800 # otherwise report 2GB |
539 | .Lscnd: | 546 | .Lscnd: |
547 | lhi %r3,0x800 # limit reported memory size to 2GB | ||
548 | cr %r1,%r3 | ||
549 | jl .Lno2gb | ||
550 | lr %r1,%r3 | ||
551 | .Lno2gb: | ||
540 | xr %r3,%r3 # same logic | 552 | xr %r3,%r3 # same logic |
541 | ic %r3,.Lscpa1-PARMAREA(%r4) | 553 | ic %r3,.Lscpa1-PARMAREA(%r4) |
542 | chi %r3,0x00 | 554 | chi %r3,0x00 |
@@ -765,7 +777,7 @@ _stext: basr %r13,0 # get base | |||
765 | 777 | ||
766 | # check control registers | 778 | # check control registers |
767 | stctl %c0,%c15,0(%r15) | 779 | stctl %c0,%c15,0(%r15) |
768 | oi 2(%r15),0x20 # enable sigp external interrupts | 780 | oi 2(%r15),0x40 # enable sigp emergency signal |
769 | oi 0(%r15),0x10 # switch on low address protection | 781 | oi 0(%r15),0x10 # switch on low address protection |
770 | lctl %c0,%c15,0(%r15) | 782 | lctl %c0,%c15,0(%r15) |
771 | 783 | ||
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index f525c0c21250..9a8263a153cb 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -345,6 +345,13 @@ iplstart: | |||
345 | la %r2,.Lreset | 345 | la %r2,.Lreset |
346 | lhi %r3,26 | 346 | lhi %r3,26 |
347 | diag %r2,%r3,8 | 347 | diag %r2,%r3,8 |
348 | la %r5,.Lirb | ||
349 | stsch 0(%r5) # check if irq is pending | ||
350 | tm 30(%r5),0x0f # by verifying if any of the | ||
351 | bnz .Lwaitforirq # activity or status control | ||
352 | tm 31(%r5),0xff # bits is set in the schib | ||
353 | bz .Lnoreset | ||
354 | .Lwaitforirq: | ||
348 | mvc 0x78(8),.Lrdrnewpsw # set up IO interrupt psw | 355 | mvc 0x78(8),.Lrdrnewpsw # set up IO interrupt psw |
349 | .Lwaitrdrirq: | 356 | .Lwaitrdrirq: |
350 | lpsw .Lrdrwaitpsw | 357 | lpsw .Lrdrwaitpsw |
@@ -658,10 +665,8 @@ startup:basr %r13,0 # get base | |||
658 | # | 665 | # |
659 | la %r1,0f-.LPG1(%r13) # set program check address | 666 | la %r1,0f-.LPG1(%r13) # set program check address |
660 | stg %r1,__LC_PGM_NEW_PSW+8 | 667 | stg %r1,__LC_PGM_NEW_PSW+8 |
661 | mvc __LC_DIAG44_OPCODE(8),.Lnop-.LPG1(%r13) | ||
662 | diag 0,0,0x44 # test diag 0x44 | 668 | diag 0,0,0x44 # test diag 0x44 |
663 | oi 7(%r12),32 # set diag44 flag | 669 | oi 7(%r12),32 # set diag44 flag |
664 | mvc __LC_DIAG44_OPCODE(8),.Ldiag44-.LPG1(%r13) | ||
665 | 0: | 670 | 0: |
666 | 671 | ||
667 | # | 672 | # |
@@ -702,7 +707,6 @@ startup:basr %r13,0 # get base | |||
702 | .L4malign:.quad 0xffffffffffc00000 | 707 | .L4malign:.quad 0xffffffffffc00000 |
703 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 | 708 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 |
704 | .Lnop: .long 0x07000700 | 709 | .Lnop: .long 0x07000700 |
705 | .Ldiag44:.long 0x83000044 | ||
706 | 710 | ||
707 | .org PARMAREA-64 | 711 | .org PARMAREA-64 |
708 | .Lduct: .long 0,0,0,0,0,0,0,0 | 712 | .Lduct: .long 0,0,0,0,0,0,0,0 |
@@ -765,7 +769,7 @@ _stext: basr %r13,0 # get base | |||
765 | 769 | ||
766 | # check control registers | 770 | # check control registers |
767 | stctg %c0,%c15,0(%r15) | 771 | stctg %c0,%c15,0(%r15) |
768 | oi 6(%r15),0x20 # enable sigp external interrupts | 772 | oi 6(%r15),0x40 # enable sigp emergency signal |
769 | oi 4(%r15),0x10 # switch on low address proctection | 773 | oi 4(%r15),0x10 # switch on low address proctection |
770 | lctlg %c0,%c15,0(%r15) | 774 | lctlg %c0,%c15,0(%r15) |
771 | 775 | ||
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 2721c3a32b84..5aa71b05b8ae 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c | |||
@@ -70,6 +70,8 @@ machine_kexec(struct kimage *image) | |||
70 | for (;;); | 70 | for (;;); |
71 | } | 71 | } |
72 | 72 | ||
73 | extern void pfault_fini(void); | ||
74 | |||
73 | static void | 75 | static void |
74 | kexec_halt_all_cpus(void *kernel_image) | 76 | kexec_halt_all_cpus(void *kernel_image) |
75 | { | 77 | { |
@@ -78,6 +80,11 @@ kexec_halt_all_cpus(void *kernel_image) | |||
78 | struct kimage *image; | 80 | struct kimage *image; |
79 | relocate_kernel_t data_mover; | 81 | relocate_kernel_t data_mover; |
80 | 82 | ||
83 | #ifdef CONFIG_PFAULT | ||
84 | if (MACHINE_IS_VM) | ||
85 | pfault_fini(); | ||
86 | #endif | ||
87 | |||
81 | if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid)) | 88 | if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid)) |
82 | signal_processor(smp_processor_id(), sigp_stop); | 89 | signal_processor(smp_processor_id(), sigp_stop); |
83 | 90 | ||
diff --git a/arch/s390/kernel/relocate_kernel.S b/arch/s390/kernel/relocate_kernel.S index d5e4a62fbb79..2a25ec7147ff 100644 --- a/arch/s390/kernel/relocate_kernel.S +++ b/arch/s390/kernel/relocate_kernel.S | |||
@@ -4,6 +4,7 @@ | |||
4 | * (C) Copyright IBM Corp. 2005 | 4 | * (C) Copyright IBM Corp. 2005 |
5 | * | 5 | * |
6 | * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com> | 6 | * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com> |
7 | * Heiko Carstens <heiko.carstens@de.ibm.com> | ||
7 | * | 8 | * |
8 | */ | 9 | */ |
9 | 10 | ||
@@ -25,8 +26,31 @@ | |||
25 | relocate_kernel: | 26 | relocate_kernel: |
26 | basr %r13,0 #base address | 27 | basr %r13,0 #base address |
27 | .base: | 28 | .base: |
28 | spx zero64-.base(%r13) #absolute addressing mode | ||
29 | stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQ (external) | 29 | stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQ (external) |
30 | spx zero64-.base(%r13) #absolute addressing mode | ||
31 | stctl %c0,%c15,ctlregs-.base(%r13) | ||
32 | stm %r0,%r15,gprregs-.base(%r13) | ||
33 | la %r1,load_psw-.base(%r13) | ||
34 | mvc 0(8,%r0),0(%r1) | ||
35 | la %r0,.back-.base(%r13) | ||
36 | st %r0,4(%r0) | ||
37 | oi 4(%r0),0x80 | ||
38 | mvc 0x68(8,%r0),0(%r1) | ||
39 | la %r0,.back_pgm-.base(%r13) | ||
40 | st %r0,0x6c(%r0) | ||
41 | oi 0x6c(%r0),0x80 | ||
42 | lhi %r0,0 | ||
43 | diag %r0,%r0,0x308 | ||
44 | .back: | ||
45 | basr %r13,0 | ||
46 | .back_base: | ||
47 | oi have_diag308-.back_base(%r13),0x01 | ||
48 | lctl %c0,%c15,ctlregs-.back_base(%r13) | ||
49 | lm %r0,%r15,gprregs-.back_base(%r13) | ||
50 | j .start_reloc | ||
51 | .back_pgm: | ||
52 | lm %r0,%r15,gprregs-.base(%r13) | ||
53 | .start_reloc: | ||
30 | lhi %r10,-1 #preparing the mask | 54 | lhi %r10,-1 #preparing the mask |
31 | sll %r10,12 #shift it such that it becomes 0xf000 | 55 | sll %r10,12 #shift it such that it becomes 0xf000 |
32 | .top: | 56 | .top: |
@@ -63,6 +87,10 @@ | |||
63 | o %r3,4(%r4) #or load address into psw | 87 | o %r3,4(%r4) #or load address into psw |
64 | st %r3,4(%r4) | 88 | st %r3,4(%r4) |
65 | mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0 | 89 | mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0 |
90 | tm have_diag308-.base(%r13),0x01 | ||
91 | jno .no_diag308 | ||
92 | diag %r0,%r0,0x308 | ||
93 | .no_diag308: | ||
66 | sr %r1,%r1 #clear %r1 | 94 | sr %r1,%r1 #clear %r1 |
67 | sr %r2,%r2 #clear %r2 | 95 | sr %r2,%r2 #clear %r2 |
68 | sigp %r1,%r2,0x12 #set cpuid to zero | 96 | sigp %r1,%r2,0x12 #set cpuid to zero |
@@ -75,6 +103,17 @@ | |||
75 | .long 0x00080000,0x80000000 | 103 | .long 0x00080000,0x80000000 |
76 | sys_msk: | 104 | sys_msk: |
77 | .quad 0 | 105 | .quad 0 |
106 | ctlregs: | ||
107 | .rept 16 | ||
108 | .long 0 | ||
109 | .endr | ||
110 | gprregs: | ||
111 | .rept 16 | ||
112 | .long 0 | ||
113 | .endr | ||
114 | have_diag308: | ||
115 | .byte 0 | ||
116 | .align 8 | ||
78 | relocate_kernel_end: | 117 | relocate_kernel_end: |
79 | .globl relocate_kernel_len | 118 | .globl relocate_kernel_len |
80 | relocate_kernel_len: | 119 | relocate_kernel_len: |
diff --git a/arch/s390/kernel/relocate_kernel64.S b/arch/s390/kernel/relocate_kernel64.S index 96290cc4eb3c..8cdb86e8911f 100644 --- a/arch/s390/kernel/relocate_kernel64.S +++ b/arch/s390/kernel/relocate_kernel64.S | |||
@@ -4,6 +4,7 @@ | |||
4 | * (C) Copyright IBM Corp. 2005 | 4 | * (C) Copyright IBM Corp. 2005 |
5 | * | 5 | * |
6 | * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com> | 6 | * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com> |
7 | * Heiko Carstens <heiko.carstens@de.ibm.com> | ||
7 | * | 8 | * |
8 | */ | 9 | */ |
9 | 10 | ||
@@ -26,8 +27,34 @@ | |||
26 | relocate_kernel: | 27 | relocate_kernel: |
27 | basr %r13,0 #base address | 28 | basr %r13,0 #base address |
28 | .base: | 29 | .base: |
30 | stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQs | ||
29 | spx zero64-.base(%r13) #absolute addressing mode | 31 | spx zero64-.base(%r13) #absolute addressing mode |
30 | stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQ (external) | 32 | stctg %c0,%c15,ctlregs-.base(%r13) |
33 | stmg %r0,%r15,gprregs-.base(%r13) | ||
34 | lghi %r0,3 | ||
35 | sllg %r0,%r0,31 | ||
36 | stg %r0,0x1d0(%r0) | ||
37 | la %r0,.back_pgm-.base(%r13) | ||
38 | stg %r0,0x1d8(%r0) | ||
39 | la %r1,load_psw-.base(%r13) | ||
40 | mvc 0(8,%r0),0(%r1) | ||
41 | la %r0,.back-.base(%r13) | ||
42 | st %r0,4(%r0) | ||
43 | oi 4(%r0),0x80 | ||
44 | lghi %r0,0 | ||
45 | diag %r0,%r0,0x308 | ||
46 | .back: | ||
47 | lhi %r1,1 #mode 1 = esame | ||
48 | sigp %r1,%r0,0x12 #switch to esame mode | ||
49 | sam64 #switch to 64 bit addressing mode | ||
50 | basr %r13,0 | ||
51 | .back_base: | ||
52 | oi have_diag308-.back_base(%r13),0x01 | ||
53 | lctlg %c0,%c15,ctlregs-.back_base(%r13) | ||
54 | lmg %r0,%r15,gprregs-.back_base(%r13) | ||
55 | j .top | ||
56 | .back_pgm: | ||
57 | lmg %r0,%r15,gprregs-.base(%r13) | ||
31 | .top: | 58 | .top: |
32 | lghi %r7,4096 #load PAGE_SIZE in r7 | 59 | lghi %r7,4096 #load PAGE_SIZE in r7 |
33 | lghi %r9,4096 #load PAGE_SIZE in r9 | 60 | lghi %r9,4096 #load PAGE_SIZE in r9 |
@@ -62,6 +89,10 @@ | |||
62 | o %r3,4(%r4) #or load address into psw | 89 | o %r3,4(%r4) #or load address into psw |
63 | st %r3,4(%r4) | 90 | st %r3,4(%r4) |
64 | mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0 | 91 | mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0 |
92 | tm have_diag308-.base(%r13),0x01 | ||
93 | jno .no_diag308 | ||
94 | diag %r0,%r0,0x308 | ||
95 | .no_diag308: | ||
65 | sam31 #31 bit mode | 96 | sam31 #31 bit mode |
66 | sr %r1,%r1 #erase register r1 | 97 | sr %r1,%r1 #erase register r1 |
67 | sr %r2,%r2 #erase register r2 | 98 | sr %r2,%r2 #erase register r2 |
@@ -75,8 +106,18 @@ | |||
75 | .long 0x00080000,0x80000000 | 106 | .long 0x00080000,0x80000000 |
76 | sys_msk: | 107 | sys_msk: |
77 | .quad 0 | 108 | .quad 0 |
109 | ctlregs: | ||
110 | .rept 16 | ||
111 | .quad 0 | ||
112 | .endr | ||
113 | gprregs: | ||
114 | .rept 16 | ||
115 | .quad 0 | ||
116 | .endr | ||
117 | have_diag308: | ||
118 | .byte 0 | ||
119 | .align 8 | ||
78 | relocate_kernel_end: | 120 | relocate_kernel_end: |
79 | .globl relocate_kernel_len | 121 | .globl relocate_kernel_len |
80 | relocate_kernel_len: | 122 | relocate_kernel_len: |
81 | .quad relocate_kernel_end - relocate_kernel | 123 | .quad relocate_kernel_end - relocate_kernel |
82 | |||
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 | */ |
28 | ext_int_info_t *ext_int_hash[256] = { 0, }; | 27 | ext_int_info_t *ext_int_hash[256] = { 0, }; |
29 | 28 | ||
29 | static inline int ext_hash(__u16 code) | ||
30 | { | ||
31 | return (code + (code >> 9)) & 0xff; | ||
32 | } | ||
33 | |||
30 | int register_external_interrupt(__u16 code, ext_int_handler_t handler) | 34 | int 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..85222fee4361 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 | } |
@@ -537,7 +537,8 @@ int __devinit start_secondary(void *cpuvoid) | |||
537 | #endif | 537 | #endif |
538 | #ifdef CONFIG_PFAULT | 538 | #ifdef CONFIG_PFAULT |
539 | /* Enable pfault pseudo page faults on this cpu. */ | 539 | /* Enable pfault pseudo page faults on this cpu. */ |
540 | pfault_init(); | 540 | if (MACHINE_IS_VM) |
541 | pfault_init(); | ||
541 | #endif | 542 | #endif |
542 | /* Mark this cpu as online */ | 543 | /* Mark this cpu as online */ |
543 | cpu_set(smp_processor_id(), cpu_online_map); | 544 | cpu_set(smp_processor_id(), cpu_online_map); |
@@ -690,7 +691,8 @@ __cpu_disable(void) | |||
690 | 691 | ||
691 | #ifdef CONFIG_PFAULT | 692 | #ifdef CONFIG_PFAULT |
692 | /* Disable pfault pseudo page faults on this cpu. */ | 693 | /* Disable pfault pseudo page faults on this cpu. */ |
693 | pfault_fini(); | 694 | if (MACHINE_IS_VM) |
695 | pfault_fini(); | ||
694 | #endif | 696 | #endif |
695 | 697 | ||
696 | /* disable all external interrupts */ | 698 | /* disable all external interrupts */ |
@@ -751,9 +753,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
751 | unsigned int cpu; | 753 | unsigned int cpu; |
752 | int i; | 754 | int i; |
753 | 755 | ||
754 | /* request the 0x1202 external interrupt */ | 756 | /* request the 0x1201 emergency signal external interrupt */ |
755 | if (register_external_interrupt(0x1202, do_ext_call_interrupt) != 0) | 757 | if (register_external_interrupt(0x1201, do_ext_call_interrupt) != 0) |
756 | panic("Couldn't request external interrupt 0x1202"); | 758 | panic("Couldn't request external interrupt 0x1201"); |
757 | smp_check_cpus(max_cpus); | 759 | smp_check_cpus(max_cpus); |
758 | memset(lowcore_ptr,0,sizeof(lowcore_ptr)); | 760 | memset(lowcore_ptr,0,sizeof(lowcore_ptr)); |
759 | /* | 761 | /* |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index a8668afb5f87..426d7cafdab3 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -290,3 +290,8 @@ SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key_wrapper) | |||
290 | SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper) | 290 | SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper) |
291 | SYSCALL(sys_keyctl,sys_keyctl,compat_sys_keyctl) /* 280 */ | 291 | SYSCALL(sys_keyctl,sys_keyctl,compat_sys_keyctl) /* 280 */ |
292 | SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper) | 292 | SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper) |
293 | SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper) | ||
294 | SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper) | ||
295 | SYSCALL(sys_inotify_init,sys_inotify_init,sys_inotify_init) | ||
296 | SYSCALL(sys_inotify_add_watch,sys_inotify_add_watch,sys_inotify_add_watch_wrapper) | ||
297 | SYSCALL(sys_inotify_rm_watch,sys_inotify_rm_watch,sys_inotify_rm_watch_wrapper) | ||
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index bc7b7be7acbe..6b8703ec2ae6 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/kallsyms.h> | 31 | #include <linux/kallsyms.h> |
32 | #include <linux/reboot.h> | ||
32 | 33 | ||
33 | #include <asm/system.h> | 34 | #include <asm/system.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
@@ -675,6 +676,19 @@ asmlinkage void kernel_stack_overflow(struct pt_regs * regs) | |||
675 | panic("Corrupt kernel stack, can't continue."); | 676 | panic("Corrupt kernel stack, can't continue."); |
676 | } | 677 | } |
677 | 678 | ||
679 | #ifndef CONFIG_ARCH_S390X | ||
680 | static int | ||
681 | pagex_reboot_event(struct notifier_block *this, unsigned long event, void *ptr) | ||
682 | { | ||
683 | if (MACHINE_IS_VM) | ||
684 | cpcmd("SET PAGEX OFF", NULL, 0, NULL); | ||
685 | return NOTIFY_DONE; | ||
686 | } | ||
687 | |||
688 | static struct notifier_block pagex_reboot_notifier = { | ||
689 | .notifier_call = &pagex_reboot_event, | ||
690 | }; | ||
691 | #endif | ||
678 | 692 | ||
679 | /* init is done in lowcore.S and head.S */ | 693 | /* init is done in lowcore.S and head.S */ |
680 | 694 | ||
@@ -735,6 +749,7 @@ void __init trap_init(void) | |||
735 | &ext_int_pfault); | 749 | &ext_int_pfault); |
736 | #endif | 750 | #endif |
737 | #ifndef CONFIG_ARCH_S390X | 751 | #ifndef CONFIG_ARCH_S390X |
752 | register_reboot_notifier(&pagex_reboot_notifier); | ||
738 | cpcmd("SET PAGEX ON", NULL, 0, NULL); | 753 | cpcmd("SET PAGEX ON", NULL, 0, NULL); |
739 | #endif | 754 | #endif |
740 | } | 755 | } |