aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-11 21:59:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-11 21:59:45 -0400
commit409ab140e2ec662e473d4968e12b7ac97f5a5f4e (patch)
treeb6ddbb6ea24387b912706790cbd9302db01c3d5d /arch
parentce8453776d68982cfe93bcb28191af8ccad01f45 (diff)
parentbadb8bb983e9cf5b7a872e0a4f6ebeac2b1ce133 (diff)
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] fix alloc_pgste check in init_new_context [S390] oprofile: fix min/max interval query checks [S390] replace diag10() with diag10_range() function [S390] disassembler: handle b280/spp instruction [S390] kernel: Initialize register 14 when starting new CPU [S390] dasd: prevent IO error during reserve/release loop [S390] sclp/memory hotplug: fix initial usecount of increments
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/include/asm/diag.h17
-rw-r--r--arch/s390/include/asm/mmu_context.h2
-rw-r--r--arch/s390/kernel/diag.c21
-rw-r--r--arch/s390/kernel/dis.c1
-rw-r--r--arch/s390/kernel/entry.S2
-rw-r--r--arch/s390/kernel/entry64.S2
-rw-r--r--arch/s390/mm/cmm.c2
-rw-r--r--arch/s390/oprofile/hwsampler.c14
-rw-r--r--arch/s390/oprofile/hwsampler.h4
-rw-r--r--arch/s390/oprofile/init.c8
10 files changed, 28 insertions, 45 deletions
diff --git a/arch/s390/include/asm/diag.h b/arch/s390/include/asm/diag.h
index 72b2e2f2d32d..7e91c58072e2 100644
--- a/arch/s390/include/asm/diag.h
+++ b/arch/s390/include/asm/diag.h
@@ -9,9 +9,22 @@
9#define _ASM_S390_DIAG_H 9#define _ASM_S390_DIAG_H
10 10
11/* 11/*
12 * Diagnose 10: Release pages 12 * Diagnose 10: Release page range
13 */ 13 */
14extern void diag10(unsigned long addr); 14static inline void diag10_range(unsigned long start_pfn, unsigned long num_pfn)
15{
16 unsigned long start_addr, end_addr;
17
18 start_addr = start_pfn << PAGE_SHIFT;
19 end_addr = (start_pfn + num_pfn - 1) << PAGE_SHIFT;
20
21 asm volatile(
22 "0: diag %0,%1,0x10\n"
23 "1:\n"
24 EX_TABLE(0b, 1b)
25 EX_TABLE(1b, 1b)
26 : : "a" (start_addr), "a" (end_addr));
27}
15 28
16/* 29/*
17 * Diagnose 14: Input spool file manipulation 30 * Diagnose 14: Input spool file manipulation
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h
index a6f0e7cc9cde..8c277caa8d3a 100644
--- a/arch/s390/include/asm/mmu_context.h
+++ b/arch/s390/include/asm/mmu_context.h
@@ -23,7 +23,7 @@ static inline int init_new_context(struct task_struct *tsk,
23#ifdef CONFIG_64BIT 23#ifdef CONFIG_64BIT
24 mm->context.asce_bits |= _ASCE_TYPE_REGION3; 24 mm->context.asce_bits |= _ASCE_TYPE_REGION3;
25#endif 25#endif
26 if (current->mm->context.alloc_pgste) { 26 if (current->mm && current->mm->context.alloc_pgste) {
27 /* 27 /*
28 * alloc_pgste indicates, that any NEW context will be created 28 * alloc_pgste indicates, that any NEW context will be created
29 * with extended page tables. The old context is unchanged. The 29 * with extended page tables. The old context is unchanged. The
diff --git a/arch/s390/kernel/diag.c b/arch/s390/kernel/diag.c
index c032d11da8a1..8237fc07ac79 100644
--- a/arch/s390/kernel/diag.c
+++ b/arch/s390/kernel/diag.c
@@ -9,27 +9,6 @@
9#include <asm/diag.h> 9#include <asm/diag.h>
10 10
11/* 11/*
12 * Diagnose 10: Release pages
13 */
14void diag10(unsigned long addr)
15{
16 if (addr >= 0x7ff00000)
17 return;
18 asm volatile(
19#ifdef CONFIG_64BIT
20 " sam31\n"
21 " diag %0,%0,0x10\n"
22 "0: sam64\n"
23#else
24 " diag %0,%0,0x10\n"
25 "0:\n"
26#endif
27 EX_TABLE(0b, 0b)
28 : : "a" (addr));
29}
30EXPORT_SYMBOL(diag10);
31
32/*
33 * Diagnose 14: Input spool file manipulation 12 * Diagnose 14: Input spool file manipulation
34 */ 13 */
35int diag14(unsigned long rx, unsigned long ry1, unsigned long subcode) 14int diag14(unsigned long rx, unsigned long ry1, unsigned long subcode)
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
index c83726c9fe03..3d4a78fc1adc 100644
--- a/arch/s390/kernel/dis.c
+++ b/arch/s390/kernel/dis.c
@@ -672,6 +672,7 @@ static struct insn opcode_b2[] = {
672 { "rp", 0x77, INSTR_S_RD }, 672 { "rp", 0x77, INSTR_S_RD },
673 { "stcke", 0x78, INSTR_S_RD }, 673 { "stcke", 0x78, INSTR_S_RD },
674 { "sacf", 0x79, INSTR_S_RD }, 674 { "sacf", 0x79, INSTR_S_RD },
675 { "spp", 0x80, INSTR_S_RD },
675 { "stsi", 0x7d, INSTR_S_RD }, 676 { "stsi", 0x7d, INSTR_S_RD },
676 { "srnm", 0x99, INSTR_S_RD }, 677 { "srnm", 0x99, INSTR_S_RD },
677 { "stfpc", 0x9c, INSTR_S_RD }, 678 { "stfpc", 0x9c, INSTR_S_RD },
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 648f64239a9d..1b67fc6ebdc2 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -836,7 +836,7 @@ restart_base:
836 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on 836 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
837 basr %r14,0 837 basr %r14,0
838 l %r14,restart_addr-.(%r14) 838 l %r14,restart_addr-.(%r14)
839 br %r14 # branch to start_secondary 839 basr %r14,%r14 # branch to start_secondary
840restart_addr: 840restart_addr:
841 .long start_secondary 841 .long start_secondary
842 .align 8 842 .align 8
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 9d3603d6c511..9fd864563499 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -841,7 +841,7 @@ restart_base:
841 mvc __LC_SYSTEM_TIMER(8),__TI_system_timer(%r1) 841 mvc __LC_SYSTEM_TIMER(8),__TI_system_timer(%r1)
842 xc __LC_STEAL_TIMER(8),__LC_STEAL_TIMER 842 xc __LC_STEAL_TIMER(8),__LC_STEAL_TIMER
843 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on 843 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
844 jg start_secondary 844 brasl %r14,start_secondary
845 .align 8 845 .align 8
846restart_vtime: 846restart_vtime:
847 .long 0x7fffffff,0xffffffff 847 .long 0x7fffffff,0xffffffff
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index c66ffd8dbbb7..1f1dba9dcf58 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -91,7 +91,7 @@ static long cmm_alloc_pages(long nr, long *counter,
91 } else 91 } else
92 free_page((unsigned long) npa); 92 free_page((unsigned long) npa);
93 } 93 }
94 diag10(addr); 94 diag10_range(addr >> PAGE_SHIFT, 1);
95 pa->pages[pa->index++] = addr; 95 pa->pages[pa->index++] = addr;
96 (*counter)++; 96 (*counter)++;
97 spin_unlock(&cmm_lock); 97 spin_unlock(&cmm_lock);
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c
index 4952872d6f0a..33cbd373cce4 100644
--- a/arch/s390/oprofile/hwsampler.c
+++ b/arch/s390/oprofile/hwsampler.c
@@ -1021,20 +1021,14 @@ deallocate_exit:
1021 return rc; 1021 return rc;
1022} 1022}
1023 1023
1024long hwsampler_query_min_interval(void) 1024unsigned long hwsampler_query_min_interval(void)
1025{ 1025{
1026 if (min_sampler_rate) 1026 return min_sampler_rate;
1027 return min_sampler_rate;
1028 else
1029 return -EINVAL;
1030} 1027}
1031 1028
1032long hwsampler_query_max_interval(void) 1029unsigned long hwsampler_query_max_interval(void)
1033{ 1030{
1034 if (max_sampler_rate) 1031 return max_sampler_rate;
1035 return max_sampler_rate;
1036 else
1037 return -EINVAL;
1038} 1032}
1039 1033
1040unsigned long hwsampler_get_sample_overflow_count(unsigned int cpu) 1034unsigned long hwsampler_get_sample_overflow_count(unsigned int cpu)
diff --git a/arch/s390/oprofile/hwsampler.h b/arch/s390/oprofile/hwsampler.h
index 8c72b59316b5..1912f3bb190c 100644
--- a/arch/s390/oprofile/hwsampler.h
+++ b/arch/s390/oprofile/hwsampler.h
@@ -102,8 +102,8 @@ int hwsampler_setup(void);
102int hwsampler_shutdown(void); 102int hwsampler_shutdown(void);
103int hwsampler_allocate(unsigned long sdbt, unsigned long sdb); 103int hwsampler_allocate(unsigned long sdbt, unsigned long sdb);
104int hwsampler_deallocate(void); 104int hwsampler_deallocate(void);
105long hwsampler_query_min_interval(void); 105unsigned long hwsampler_query_min_interval(void);
106long hwsampler_query_max_interval(void); 106unsigned long hwsampler_query_max_interval(void);
107int hwsampler_start_all(unsigned long interval); 107int hwsampler_start_all(unsigned long interval);
108int hwsampler_stop_all(void); 108int hwsampler_stop_all(void);
109int hwsampler_deactivate(unsigned int cpu); 109int hwsampler_deactivate(unsigned int cpu);
diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
index c63d7e58352b..5995e9bc72d9 100644
--- a/arch/s390/oprofile/init.c
+++ b/arch/s390/oprofile/init.c
@@ -145,15 +145,11 @@ static int oprofile_hwsampler_init(struct oprofile_operations *ops)
145 * create hwsampler files only if hwsampler_setup() succeeds. 145 * create hwsampler files only if hwsampler_setup() succeeds.
146 */ 146 */
147 oprofile_min_interval = hwsampler_query_min_interval(); 147 oprofile_min_interval = hwsampler_query_min_interval();
148 if (oprofile_min_interval < 0) { 148 if (oprofile_min_interval == 0)
149 oprofile_min_interval = 0;
150 return -ENODEV; 149 return -ENODEV;
151 }
152 oprofile_max_interval = hwsampler_query_max_interval(); 150 oprofile_max_interval = hwsampler_query_max_interval();
153 if (oprofile_max_interval < 0) { 151 if (oprofile_max_interval == 0)
154 oprofile_max_interval = 0;
155 return -ENODEV; 152 return -ENODEV;
156 }
157 153
158 if (oprofile_timer_init(ops)) 154 if (oprofile_timer_init(ops))
159 return -ENODEV; 155 return -ENODEV;