aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-09-02 05:02:23 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 09:45:05 -0400
commitd1b0d842c4450e410053083db837ef16532a4139 (patch)
tree1576b47cddbff2d898cd1c83a26ac56acba7fedf /arch
parent46e8894786327caf52cf686e27ba0795bddfcd63 (diff)
s390/mm: rename addressing_mode to s390_user_mode
Renaming the globally visible variable "user_mode" to "addressing_mode" in order to fix a name clash was not a good idea. (Commit 37fe1d73 "s390/mm: rename user_mode variable to addressing_mode") Looking at the code after a couple of weeks one thinks: addressing mode of what? So rename the variable again. This time to s390_user_mode. Which hopefully makes more sense. 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/runtime_instr.c2
-rw-r--r--arch/s390/kernel/setup.c10
-rw-r--r--arch/s390/kernel/vdso.c8
-rw-r--r--arch/s390/mm/fault.c2
-rw-r--r--arch/s390/mm/pgtable.c2
7 files changed, 14 insertions, 14 deletions
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h
index b749c5733657..084e7755ed9b 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 (addressing_mode != HOME_SPACE_MODE) { 60 if (s390_user_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 908f68871393..87b47ca954f1 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 addressing_mode; 63extern unsigned int s390_user_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/runtime_instr.c b/arch/s390/kernel/runtime_instr.c
index e27e23da0e60..61066f6f71a5 100644
--- a/arch/s390/kernel/runtime_instr.c
+++ b/arch/s390/kernel/runtime_instr.c
@@ -40,7 +40,7 @@ static void disable_runtime_instr(void)
40static void init_runtime_instr_cb(struct runtime_instr_cb *cb) 40static void init_runtime_instr_cb(struct runtime_instr_cb *cb)
41{ 41{
42 cb->buf_limit = 0xfff; 42 cb->buf_limit = 0xfff;
43 if (addressing_mode == HOME_SPACE_MODE) 43 if (s390_user_mode == HOME_SPACE_MODE)
44 cb->home_space = 1; 44 cb->home_space = 1;
45 cb->int_requested = 1; 45 cb->int_requested = 1;
46 cb->pstate = 1; 46 cb->pstate = 1;
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 39d609b582ca..555f985226f5 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 addressing_mode = PRIMARY_SPACE_MODE; 305unsigned int s390_user_mode = PRIMARY_SPACE_MODE;
306EXPORT_SYMBOL_GPL(addressing_mode); 306EXPORT_SYMBOL_GPL(s390_user_mode);
307 307
308static int set_amode_primary(void) 308static int set_amode_primary(void)
309{ 309{
@@ -326,9 +326,9 @@ static int set_amode_primary(void)
326static int __init early_parse_user_mode(char *p) 326static int __init early_parse_user_mode(char *p)
327{ 327{
328 if (p && strcmp(p, "primary") == 0) 328 if (p && strcmp(p, "primary") == 0)
329 addressing_mode = PRIMARY_SPACE_MODE; 329 s390_user_mode = PRIMARY_SPACE_MODE;
330 else if (!p || strcmp(p, "home") == 0) 330 else if (!p || strcmp(p, "home") == 0)
331 addressing_mode = HOME_SPACE_MODE; 331 s390_user_mode = HOME_SPACE_MODE;
332 else 332 else
333 return 1; 333 return 1;
334 return 0; 334 return 0;
@@ -337,7 +337,7 @@ early_param("user_mode", early_parse_user_mode);
337 337
338static void setup_addressing_mode(void) 338static void setup_addressing_mode(void)
339{ 339{
340 if (addressing_mode == PRIMARY_SPACE_MODE) { 340 if (s390_user_mode == PRIMARY_SPACE_MODE) {
341 if (set_amode_primary()) 341 if (set_amode_primary())
342 pr_info("Address spaces switched, " 342 pr_info("Address spaces switched, "
343 "mvcos available\n"); 343 "mvcos available\n");
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 9a19ca367c17..d7776281cb60 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -85,7 +85,7 @@ struct vdso_data *vdso_data = &vdso_data_store.data;
85static void vdso_init_data(struct vdso_data *vd) 85static void vdso_init_data(struct vdso_data *vd)
86{ 86{
87 vd->ectg_available = 87 vd->ectg_available =
88 addressing_mode != HOME_SPACE_MODE && test_facility(31); 88 s390_user_mode != HOME_SPACE_MODE && test_facility(31);
89} 89}
90 90
91#ifdef CONFIG_64BIT 91#ifdef CONFIG_64BIT
@@ -102,7 +102,7 @@ int vdso_alloc_per_cpu(struct _lowcore *lowcore)
102 102
103 lowcore->vdso_per_cpu_data = __LC_PASTE; 103 lowcore->vdso_per_cpu_data = __LC_PASTE;
104 104
105 if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled) 105 if (s390_user_mode == HOME_SPACE_MODE || !vdso_enabled)
106 return 0; 106 return 0;
107 107
108 segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER); 108 segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER);
@@ -147,7 +147,7 @@ void vdso_free_per_cpu(struct _lowcore *lowcore)
147 unsigned long segment_table, page_table, page_frame; 147 unsigned long segment_table, page_table, page_frame;
148 u32 *psal, *aste; 148 u32 *psal, *aste;
149 149
150 if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled) 150 if (s390_user_mode == HOME_SPACE_MODE || !vdso_enabled)
151 return; 151 return;
152 152
153 psal = (u32 *)(addr_t) lowcore->paste[4]; 153 psal = (u32 *)(addr_t) lowcore->paste[4];
@@ -165,7 +165,7 @@ static void vdso_init_cr5(void)
165{ 165{
166 unsigned long cr5; 166 unsigned long cr5;
167 167
168 if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled) 168 if (s390_user_mode == HOME_SPACE_MODE || !vdso_enabled)
169 return; 169 return;
170 cr5 = offsetof(struct _lowcore, paste); 170 cr5 = offsetof(struct _lowcore, paste);
171 __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 12c887bcdf1f..8b2cac1ddbc5 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 (addressing_mode == HOME_SPACE_MODE) 114 if (s390_user_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 18df31d1f2c9..d83ecbf02018 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 (addressing_mode == HOME_SPACE_MODE) 799 if (s390_user_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 */