s390/mm: rename addressing_mode to s390_user_mode
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Sun, 2 Sep 2012 09:02:23 +0000 (11:02 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 26 Sep 2012 13:45:05 +0000 (15:45 +0200)
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>
arch/s390/include/asm/mmu_context.h
arch/s390/include/asm/setup.h
arch/s390/kernel/runtime_instr.c
arch/s390/kernel/setup.c
arch/s390/kernel/vdso.c
arch/s390/mm/fault.c
arch/s390/mm/pgtable.c

index b749c573365767af8487c4c24c07b8cbc8ace903..084e7755ed9b7958f3f9cb9db9c02e8a4a8004b2 100644 (file)
@@ -57,7 +57,7 @@ static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk)
        pgd_t *pgd = mm->pgd;
 
        S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd);
-       if (addressing_mode != HOME_SPACE_MODE) {
+       if (s390_user_mode != HOME_SPACE_MODE) {
                /* Load primary space page table origin. */
                asm volatile(LCTL_OPCODE" 1,1,%0\n"
                             : : "m" (S390_lowcore.user_asce) );
index 908f6887139385250825423601949f53110d4765..87b47ca954f1c1ceec09ee083427eae697166242 100644 (file)
@@ -60,7 +60,7 @@ void create_mem_hole(struct mem_chunk memory_chunk[], unsigned long addr,
 #define SECONDARY_SPACE_MODE   2
 #define HOME_SPACE_MODE                3
 
-extern unsigned int addressing_mode;
+extern unsigned int s390_user_mode;
 
 /*
  * Machine features detected in head.S
index e27e23da0e6044c743930bc6cafa4db832a8801d..61066f6f71a590d3d35fd688e8e6715719919dc1 100644 (file)
@@ -40,7 +40,7 @@ static void disable_runtime_instr(void)
 static void init_runtime_instr_cb(struct runtime_instr_cb *cb)
 {
        cb->buf_limit = 0xfff;
-       if (addressing_mode == HOME_SPACE_MODE)
+       if (s390_user_mode == HOME_SPACE_MODE)
                cb->home_space = 1;
        cb->int_requested = 1;
        cb->pstate = 1;
index 39d609b582ca131e0fd81d88bedc940cfce2349d..555f985226f51535c3be49aa3feb03cd95d55d60 100644 (file)
@@ -302,8 +302,8 @@ static int __init parse_vmalloc(char *arg)
 }
 early_param("vmalloc", parse_vmalloc);
 
-unsigned int addressing_mode = PRIMARY_SPACE_MODE;
-EXPORT_SYMBOL_GPL(addressing_mode);
+unsigned int s390_user_mode = PRIMARY_SPACE_MODE;
+EXPORT_SYMBOL_GPL(s390_user_mode);
 
 static int set_amode_primary(void)
 {
@@ -326,9 +326,9 @@ static int set_amode_primary(void)
 static int __init early_parse_user_mode(char *p)
 {
        if (p && strcmp(p, "primary") == 0)
-               addressing_mode = PRIMARY_SPACE_MODE;
+               s390_user_mode = PRIMARY_SPACE_MODE;
        else if (!p || strcmp(p, "home") == 0)
-               addressing_mode = HOME_SPACE_MODE;
+               s390_user_mode = HOME_SPACE_MODE;
        else
                return 1;
        return 0;
@@ -337,7 +337,7 @@ early_param("user_mode", early_parse_user_mode);
 
 static void setup_addressing_mode(void)
 {
-       if (addressing_mode == PRIMARY_SPACE_MODE) {
+       if (s390_user_mode == PRIMARY_SPACE_MODE) {
                if (set_amode_primary())
                        pr_info("Address spaces switched, "
                                "mvcos available\n");
index 9a19ca367c17bc41e1f8e781ed173a93bba5da12..d7776281cb60ff0cd2738ab9c949d68c6f805d1f 100644 (file)
@@ -85,7 +85,7 @@ struct vdso_data *vdso_data = &vdso_data_store.data;
 static void vdso_init_data(struct vdso_data *vd)
 {
        vd->ectg_available =
-               addressing_mode != HOME_SPACE_MODE && test_facility(31);
+               s390_user_mode != HOME_SPACE_MODE && test_facility(31);
 }
 
 #ifdef CONFIG_64BIT
@@ -102,7 +102,7 @@ int vdso_alloc_per_cpu(struct _lowcore *lowcore)
 
        lowcore->vdso_per_cpu_data = __LC_PASTE;
 
-       if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled)
+       if (s390_user_mode == HOME_SPACE_MODE || !vdso_enabled)
                return 0;
 
        segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER);
@@ -147,7 +147,7 @@ void vdso_free_per_cpu(struct _lowcore *lowcore)
        unsigned long segment_table, page_table, page_frame;
        u32 *psal, *aste;
 
-       if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled)
+       if (s390_user_mode == HOME_SPACE_MODE || !vdso_enabled)
                return;
 
        psal = (u32 *)(addr_t) lowcore->paste[4];
@@ -165,7 +165,7 @@ static void vdso_init_cr5(void)
 {
        unsigned long cr5;
 
-       if (addressing_mode == HOME_SPACE_MODE || !vdso_enabled)
+       if (s390_user_mode == HOME_SPACE_MODE || !vdso_enabled)
                return;
        cr5 = offsetof(struct _lowcore, paste);
        __ctl_load(cr5, 5, 5);
index 12c887bcdf1f7d9dc8fabf27f04ec630dd1adc51..8b2cac1ddbc556a1c4446bc40aa28f0addb3682c 100644 (file)
@@ -111,7 +111,7 @@ static inline int user_space_fault(unsigned long trans_exc_code)
        if (trans_exc_code == 2)
                /* Access via secondary space, set_fs setting decides */
                return current->thread.mm_segment.ar4;
-       if (addressing_mode == HOME_SPACE_MODE)
+       if (s390_user_mode == HOME_SPACE_MODE)
                /* User space if the access has been done via home space. */
                return trans_exc_code == 3;
        /*
index 18df31d1f2c9841cac3d97248a2806f9fb2d81a4..d83ecbf020184640d447bcfd39f4a7f9d7c29fba 100644 (file)
@@ -796,7 +796,7 @@ int s390_enable_sie(void)
        struct mm_struct *mm, *old_mm;
 
        /* Do we have switched amode? If no, we cannot do sie */
-       if (addressing_mode == HOME_SPACE_MODE)
+       if (s390_user_mode == HOME_SPACE_MODE)
                return -EINVAL;
 
        /* Do we have pgstes? if yes, we are done */