aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-07-27 04:18:13 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-07-30 05:03:11 -0400
commit37fe1d73a449bdebc4908d04e518f5852d6c453b (patch)
tree1c42c13016f9982062718dc78fcdbc68be0b5e33 /arch
parent008c2e8f247f0a8db1e8e26139da12f3a3abcda0 (diff)
s390/mm: rename user_mode variable to addressing_mode
Fix name clash with user_mode() define which is also used in common code. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/include/asm/mmu_context.h2
-rw-r--r--arch/s390/include/asm/setup.h2
-rw-r--r--arch/s390/kernel/setup.c12
-rw-r--r--arch/s390/kernel/vdso.c9
-rw-r--r--arch/s390/mm/fault.c2
-rw-r--r--arch/s390/mm/pgtable.c2
6 files changed, 15 insertions, 14 deletions
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h
index 077de7efc82f..b749c5733657 100644
--- a/arch/s390/include/asm/mmu_context.h
+++ b/arch/s390/include/asm/mmu_context.h
@@ -57,7 +57,7 @@ static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk)
57 pgd_t *pgd = mm->pgd; 57 pgd_t *pgd = mm->pgd;
58 58
59 S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd); 59 S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd);
60 if (user_mode != HOME_SPACE_MODE) { 60 if (addressing_mode != HOME_SPACE_MODE) {
61 /* Load primary space page table origin. */ 61 /* Load primary space page table origin. */
62 asm volatile(LCTL_OPCODE" 1,1,%0\n" 62 asm volatile(LCTL_OPCODE" 1,1,%0\n"
63 : : "m" (S390_lowcore.user_asce) ); 63 : : "m" (S390_lowcore.user_asce) );
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h
index 57e80534375a..e6859d16ee2d 100644
--- a/arch/s390/include/asm/setup.h
+++ b/arch/s390/include/asm/setup.h
@@ -60,7 +60,7 @@ void create_mem_hole(struct mem_chunk memory_chunk[], unsigned long addr,
60#define SECONDARY_SPACE_MODE 2 60#define SECONDARY_SPACE_MODE 2
61#define HOME_SPACE_MODE 3 61#define HOME_SPACE_MODE 3
62 62
63extern unsigned int user_mode; 63extern unsigned int addressing_mode;
64 64
65/* 65/*
66 * Machine features detected in head.S 66 * Machine features detected in head.S
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 743c0f32fe3b..f86c81e13c37 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -302,8 +302,8 @@ static int __init parse_vmalloc(char *arg)
302} 302}
303early_param("vmalloc", parse_vmalloc); 303early_param("vmalloc", parse_vmalloc);
304 304
305unsigned int user_mode = HOME_SPACE_MODE; 305unsigned int addressing_mode = HOME_SPACE_MODE;
306EXPORT_SYMBOL_GPL(user_mode); 306EXPORT_SYMBOL_GPL(addressing_mode);
307 307
308static int set_amode_primary(void) 308static int set_amode_primary(void)
309{ 309{
@@ -328,7 +328,7 @@ static int set_amode_primary(void)
328 */ 328 */
329static int __init early_parse_switch_amode(char *p) 329static int __init early_parse_switch_amode(char *p)
330{ 330{
331 user_mode = PRIMARY_SPACE_MODE; 331 addressing_mode = PRIMARY_SPACE_MODE;
332 return 0; 332 return 0;
333} 333}
334early_param("switch_amode", early_parse_switch_amode); 334early_param("switch_amode", early_parse_switch_amode);
@@ -336,9 +336,9 @@ early_param("switch_amode", early_parse_switch_amode);
336static int __init early_parse_user_mode(char *p) 336static int __init early_parse_user_mode(char *p)
337{ 337{
338 if (p && strcmp(p, "primary") == 0) 338 if (p && strcmp(p, "primary") == 0)
339 user_mode = PRIMARY_SPACE_MODE; 339 addressing_mode = PRIMARY_SPACE_MODE;
340 else if (!p || strcmp(p, "home") == 0) 340 else if (!p || strcmp(p, "home") == 0)
341 user_mode = HOME_SPACE_MODE; 341 addressing_mode = HOME_SPACE_MODE;
342 else 342 else
343 return 1; 343 return 1;
344 return 0; 344 return 0;
@@ -347,7 +347,7 @@ early_param("user_mode", early_parse_user_mode);
347 347
348static void setup_addressing_mode(void) 348static void setup_addressing_mode(void)
349{ 349{
350 if (user_mode == PRIMARY_SPACE_MODE) { 350 if (addressing_mode == PRIMARY_SPACE_MODE) {
351 if (set_amode_primary()) 351 if (set_amode_primary())
352 pr_info("Address spaces switched, " 352 pr_info("Address spaces switched, "
353 "mvcos available\n"); 353 "mvcos available\n");
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index ea5590fdca3b..9a19ca367c17 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -84,7 +84,8 @@ struct vdso_data *vdso_data = &vdso_data_store.data;
84 */ 84 */
85static void vdso_init_data(struct vdso_data *vd) 85static void vdso_init_data(struct vdso_data *vd)
86{ 86{
87 vd->ectg_available = user_mode != HOME_SPACE_MODE && test_facility(31); 87 vd->ectg_available =
88 addressing_mode != HOME_SPACE_MODE && test_facility(31);
88} 89}
89 90
90#ifdef CONFIG_64BIT 91#ifdef CONFIG_64BIT
@@ -101,7 +102,7 @@ int vdso_alloc_per_cpu(struct _lowcore *lowcore)
101 102
102 lowcore->vdso_per_cpu_data = __LC_PASTE; 103 lowcore->vdso_per_cpu_data = __LC_PASTE;
103 104
104 if (user_mode == HOME_SPACE_MODE || !vdso_enabled) 105 if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled)
105 return 0; 106 return 0;
106 107
107 segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER); 108 segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER);
@@ -146,7 +147,7 @@ void vdso_free_per_cpu(struct _lowcore *lowcore)
146 unsigned long segment_table, page_table, page_frame; 147 unsigned long segment_table, page_table, page_frame;
147 u32 *psal, *aste; 148 u32 *psal, *aste;
148 149
149 if (user_mode == HOME_SPACE_MODE || !vdso_enabled) 150 if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled)
150 return; 151 return;
151 152
152 psal = (u32 *)(addr_t) lowcore->paste[4]; 153 psal = (u32 *)(addr_t) lowcore->paste[4];
@@ -164,7 +165,7 @@ static void vdso_init_cr5(void)
164{ 165{
165 unsigned long cr5; 166 unsigned long cr5;
166 167
167 if (user_mode == HOME_SPACE_MODE || !vdso_enabled) 168 if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled)
168 return; 169 return;
169 cr5 = offsetof(struct _lowcore, paste); 170 cr5 = offsetof(struct _lowcore, paste);
170 __ctl_load(cr5, 5, 5); 171 __ctl_load(cr5, 5, 5);
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index dc659da2fac9..5bddbe4895d5 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -111,7 +111,7 @@ static inline int user_space_fault(unsigned long trans_exc_code)
111 if (trans_exc_code == 2) 111 if (trans_exc_code == 2)
112 /* Access via secondary space, set_fs setting decides */ 112 /* Access via secondary space, set_fs setting decides */
113 return current->thread.mm_segment.ar4; 113 return current->thread.mm_segment.ar4;
114 if (user_mode == HOME_SPACE_MODE) 114 if (addressing_mode == HOME_SPACE_MODE)
115 /* User space if the access has been done via home space. */ 115 /* User space if the access has been done via home space. */
116 return trans_exc_code == 3; 116 return trans_exc_code == 3;
117 /* 117 /*
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index e9ac2d60b7e5..18df31d1f2c9 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -796,7 +796,7 @@ int s390_enable_sie(void)
796 struct mm_struct *mm, *old_mm; 796 struct mm_struct *mm, *old_mm;
797 797
798 /* Do we have switched amode? If no, we cannot do sie */ 798 /* Do we have switched amode? If no, we cannot do sie */
799 if (user_mode == HOME_SPACE_MODE) 799 if (addressing_mode == HOME_SPACE_MODE)
800 return -EINVAL; 800 return -EINVAL;
801 801
802 /* Do we have pgstes? if yes, we are done */ 802 /* Do we have pgstes? if yes, we are done */