Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / arch / s390 / kernel / setup.c
index c8e8e13..6f63508 100644 (file)
@@ -409,6 +409,9 @@ setup_lowcore(void)
        lc->current_task = (unsigned long) init_thread_union.thread_info.task;
        lc->thread_info = (unsigned long) &init_thread_union;
        lc->machine_flags = S390_lowcore.machine_flags;
+       lc->stfl_fac_list = S390_lowcore.stfl_fac_list;
+       memcpy(lc->stfle_fac_list, S390_lowcore.stfle_fac_list,
+              MAX_FACILITY_BIT/8);
 #ifndef CONFIG_64BIT
        if (MACHINE_HAS_IEEE) {
                lc->extended_save_area_addr = (__u32)
@@ -627,7 +630,8 @@ setup_memory(void)
                add_active_range(0, start_chunk, end_chunk);
                pfn = max(start_chunk, start_pfn);
                for (; pfn < end_chunk; pfn++)
-                       page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY);
+                       page_set_storage_key(PFN_PHYS(pfn),
+                                            PAGE_DEFAULT_KEY, 0);
        }
 
        psw_set_key(PAGE_DEFAULT_KEY);
@@ -674,12 +678,9 @@ setup_memory(void)
 static void __init setup_hwcaps(void)
 {
        static const int stfl_bits[6] = { 0, 2, 7, 17, 19, 21 };
-       unsigned long long facility_list_extended;
-       unsigned int facility_list;
        struct cpuid cpu_id;
        int i;
 
-       facility_list = stfl();
        /*
         * The store facility list bits numbers as found in the principles
         * of operation are numbered with bit 1UL<<31 as number 0 to
@@ -699,11 +700,10 @@ static void __init setup_hwcaps(void)
         *   HWCAP_S390_ETF3EH bit 8 (22 && 30).
         */
        for (i = 0; i < 6; i++)
-               if (facility_list & (1UL << (31 - stfl_bits[i])))
+               if (test_facility(stfl_bits[i]))
                        elf_hwcap |= 1UL << i;
 
-       if ((facility_list & (1UL << (31 - 22)))
-           && (facility_list & (1UL << (31 - 30))))
+       if (test_facility(22) && test_facility(30))
                elf_hwcap |= HWCAP_S390_ETF3EH;
 
        /*
@@ -719,12 +719,8 @@ static void __init setup_hwcaps(void)
         * translated to:
         *   HWCAP_S390_DFP bit 6 (42 && 44).
         */
-       if ((elf_hwcap & (1UL << 2)) &&
-           __stfle(&facility_list_extended, 1) > 0) {
-               if ((facility_list_extended & (1ULL << (63 - 42)))
-                   && (facility_list_extended & (1ULL << (63 - 44))))
-                       elf_hwcap |= HWCAP_S390_DFP;
-       }
+       if ((elf_hwcap & (1UL << 2)) && test_facility(42) && test_facility(44))
+               elf_hwcap |= HWCAP_S390_DFP;
 
        /*
         * Huge page support HWCAP_S390_HPAGE is bit 7.
@@ -765,6 +761,9 @@ static void __init setup_hwcaps(void)
        case 0x2098:
                strcpy(elf_platform, "z10");
                break;
+       case 0x2817:
+               strcpy(elf_platform, "z196");
+               break;
        }
 }