diff for duplicates of <20180914015240.1506-1-npiggin@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 6cbe382..e752965 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -755,7 +755,7 @@ index 7f5ac2e8581b..ffdee1ab4388 100644 - */ -power_enter_stop: -/* -- * Check if we are executing the lite variant with ESLì=0 +- * Check if we are executing the lite variant with ESL=EC=0 - */ - andis. r4,r3,PSSCR_EC_ESL_MASK_SHIFTED - clrldi r3,r3,60 /* r3 = Bits[60:63] = Requested Level (RL) */ @@ -773,7 +773,7 @@ index 7f5ac2e8581b..ffdee1ab4388 100644 - * reason, so there is no point setting r12 to SRR1. - * - * Further, we clear r12 here, so that we don't accidentally enter the -- * HMI in pnv_wakeup_noloss() if the value of r12[42:45] = WAKE_HMI. +- * HMI in pnv_wakeup_noloss() if the value of r12[42:45] == WAKE_HMI. - */ - li r12, 0 - b pnv_wakeup_noloss @@ -1138,8 +1138,8 @@ index 7f5ac2e8581b..ffdee1ab4388 100644 - * { - * bool first_in_core, first_in_subcore; - * -- * first_in_core = (core_idle_state & IDLE_THREAD_BITS) = 0; -- * first_in_subcore = (core_idle_state & SUBCORE_SIBLING_MASK) = 0; +- * first_in_core = (core_idle_state & IDLE_THREAD_BITS) == 0; +- * first_in_subcore = (core_idle_state & SUBCORE_SIBLING_MASK) == 0; - * - * core_idle_state |= thread_in_core; - * } @@ -1154,12 +1154,12 @@ index 7f5ac2e8581b..ffdee1ab4388 100644 - * { - * bool first_in_core, first_in_subcore, winkle_state_lost; - * -- * first_in_core = (core_idle_state & IDLE_THREAD_BITS) = 0; -- * first_in_subcore = (core_idle_state & SUBCORE_SIBLING_MASK) = 0; +- * first_in_core = (core_idle_state & IDLE_THREAD_BITS) == 0; +- * first_in_subcore = (core_idle_state & SUBCORE_SIBLING_MASK) == 0; - * - * core_idle_state |= thread_in_core; - * -- * if ((core_idle_state & WINKLE_MASK) = (8 << WINKLE_COUNT_SIHFT)) +- * if ((core_idle_state & WINKLE_MASK) == (8 << WINKLE_COUNT_SIHFT)) - * core_idle_state |= THREAD_WINKLE_BITS; - * core_idle_state -= 1 << WINKLE_COUNT_SHIFT; - * @@ -1708,8 +1708,10 @@ index 35f699ebb662..09b754e08b51 100644 - * if available. - */ - if (default_stop_found) { -- pnv_deepest_stop_psscr_val - pnv_default_stop_val; -- pnv_deepest_stop_psscr_mask - pnv_default_stop_mask; +- pnv_deepest_stop_psscr_val = +- pnv_default_stop_val; +- pnv_deepest_stop_psscr_mask = +- pnv_default_stop_mask; - pr_warn("cpuidle-powernv: Offlined CPUs will stop with psscr = 0x%016llx\n", - pnv_deepest_stop_psscr_val); - } else { /* Fallback to snooze loop for CPU-Hotplug */ @@ -1870,7 +1872,7 @@ index 35f699ebb662..09b754e08b51 100644 + *state &= ~thread; + + if (power7_fastsleep_workaround_entry) { -+ if ((*state & ((1 << threads_per_core) - 1)) = 0) { ++ if ((*state & ((1 << threads_per_core) - 1)) == 0) { + rc = opal_config_cpu_idle_state( + OPAL_CONFIG_IDLE_FASTSLEEP, + OPAL_CONFIG_IDLE_APPLY); @@ -1878,7 +1880,7 @@ index 35f699ebb662..09b754e08b51 100644 + } + } + -+ if (type = PNV_THREAD_WINKLE) { ++ if (type == PNV_THREAD_WINKLE) { + sprs.tscr = mfspr(SPRN_TSCR); + sprs.worc = mfspr(SPRN_WORC); + @@ -1906,9 +1908,9 @@ index 35f699ebb662..09b754e08b51 100644 + * this may not be a really big win. + */ + *state += 1 << PNV_CORE_IDLE_WINKLE_COUNT_SHIFT; -+ if ((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) >> PNV_CORE_IDLE_WINKLE_COUNT_SHIFT = threads_per_core) ++ if ((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) >> PNV_CORE_IDLE_WINKLE_COUNT_SHIFT == threads_per_core) + *state |= PNV_CORE_IDLE_THREAD_WINKLE_BITS; -+ WARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) = 0); ++ WARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) == 0); + } + + atomic_unlock_thread_idle(); @@ -1921,14 +1923,14 @@ index 35f699ebb662..09b754e08b51 100644 + WARN_ON_ONCE(!srr1); + WARN_ON_ONCE(mfmsr() & (MSR_IR|MSR_DR)); + -+ if (unlikely((srr1 & SRR1_WAKEMASK_P8) = SRR1_WAKEHMI)) ++ if (unlikely((srr1 & SRR1_WAKEMASK_P8) == SRR1_WAKEHMI)) + hmi_exception_realmode(NULL); + + if (likely((srr1 & SRR1_WAKESTATE) != SRR1_WS_HVLOSS)) { + if (unlikely(type != PNV_THREAD_NAP)) { + atomic_lock_thread_idle(); -+ if (type = PNV_THREAD_WINKLE) { -+ WARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) = 0); ++ if (type == PNV_THREAD_WINKLE) { ++ WARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) == 0); + *state -= 1 << PNV_CORE_IDLE_WINKLE_COUNT_SHIFT; + *state &= ~(thread << PNV_CORE_IDLE_THREAD_WINKLE_BITS_SHIFT); + } @@ -1938,13 +1940,13 @@ index 35f699ebb662..09b754e08b51 100644 + } + + /* HV state loss */ -+ BUG_ON(type = PNV_THREAD_NAP); ++ BUG_ON(type == PNV_THREAD_NAP); + + atomic_lock_thread_idle(); + + full_winkle = false; -+ if (type = PNV_THREAD_WINKLE) { -+ WARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) = 0); ++ if (type == PNV_THREAD_WINKLE) { ++ WARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) == 0); + *state -= 1 << PNV_CORE_IDLE_WINKLE_COUNT_SHIFT; + if (*state & (thread << PNV_CORE_IDLE_THREAD_WINKLE_BITS_SHIFT)) { + *state &= ~(thread << PNV_CORE_IDLE_THREAD_WINKLE_BITS_SHIFT); @@ -2226,7 +2228,7 @@ index 35f699ebb662..09b754e08b51 100644 + mtspr(SPRN_MMCRA, mmcra); + } + -+ if (unlikely((srr1 & SRR1_WAKEMASK_P8) = SRR1_WAKEHMI)) ++ if (unlikely((srr1 & SRR1_WAKEMASK_P8) == SRR1_WAKEHMI)) + hmi_exception_realmode(NULL); + + /* @@ -2505,7 +2507,7 @@ index 35f699ebb662..09b754e08b51 100644 + struct paca_struct *p = paca_ptrs[cpu]; + + p->idle_state = 0; -+ if (cpu = cpu_first_thread_sibling(cpu)) ++ if (cpu == cpu_first_thread_sibling(cpu)) + p->idle_state = (1 << threads_per_core) - 1; + + if (!cpu_has_feature(CPU_FTR_ARCH_300)) { diff --git a/a/content_digest b/N1/content_digest index c9e44e4..e59946a 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,6 @@ "From\0Nicholas Piggin <npiggin@gmail.com>\0" "Subject\0[PATCH v4] powerpc/64s: reimplement book3s idle code in C\0" - "Date\0Fri, 14 Sep 2018 01:52:40 +0000\0" + "Date\0Fri, 14 Sep 2018 11:52:40 +1000\0" "To\0linuxppc-dev@lists.ozlabs.org\0" "Cc\0Nicholas Piggin <npiggin@gmail.com>" kvm-ppc@vger.kernel.org @@ -767,7 +767,7 @@ "- */\n" "-power_enter_stop:\n" "-/*\n" - "- * Check if we are executing the lite variant with ESL\303\254=0\n" + "- * Check if we are executing the lite variant with ESL=EC=0\n" "- */\n" "-\tandis. r4,r3,PSSCR_EC_ESL_MASK_SHIFTED\n" "-\tclrldi r3,r3,60 /* r3 = Bits[60:63] = Requested Level (RL) */\n" @@ -785,7 +785,7 @@ "-\t * reason, so there is no point setting r12 to SRR1.\n" "-\t *\n" "-\t * Further, we clear r12 here, so that we don't accidentally enter the\n" - "-\t * HMI in pnv_wakeup_noloss() if the value of r12[42:45] = WAKE_HMI.\n" + "-\t * HMI in pnv_wakeup_noloss() if the value of r12[42:45] == WAKE_HMI.\n" "-\t */\n" "-\tli\tr12, 0\n" "-\tb \tpnv_wakeup_noloss\n" @@ -1150,8 +1150,8 @@ "-\t * {\n" "-\t * bool first_in_core, first_in_subcore;\n" "-\t *\n" - "-\t * first_in_core = (core_idle_state & IDLE_THREAD_BITS) = 0;\n" - "-\t * first_in_subcore = (core_idle_state & SUBCORE_SIBLING_MASK) = 0;\n" + "-\t * first_in_core = (core_idle_state & IDLE_THREAD_BITS) == 0;\n" + "-\t * first_in_subcore = (core_idle_state & SUBCORE_SIBLING_MASK) == 0;\n" "-\t *\n" "-\t * core_idle_state |= thread_in_core;\n" "-\t * }\n" @@ -1166,12 +1166,12 @@ "-\t * {\n" "-\t * bool first_in_core, first_in_subcore, winkle_state_lost;\n" "-\t *\n" - "-\t * first_in_core = (core_idle_state & IDLE_THREAD_BITS) = 0;\n" - "-\t * first_in_subcore = (core_idle_state & SUBCORE_SIBLING_MASK) = 0;\n" + "-\t * first_in_core = (core_idle_state & IDLE_THREAD_BITS) == 0;\n" + "-\t * first_in_subcore = (core_idle_state & SUBCORE_SIBLING_MASK) == 0;\n" "-\t *\n" "-\t * core_idle_state |= thread_in_core;\n" "-\t *\n" - "-\t * if ((core_idle_state & WINKLE_MASK) = (8 << WINKLE_COUNT_SIHFT))\n" + "-\t * if ((core_idle_state & WINKLE_MASK) == (8 << WINKLE_COUNT_SIHFT))\n" "-\t * core_idle_state |= THREAD_WINKLE_BITS;\n" "-\t * core_idle_state -= 1 << WINKLE_COUNT_SHIFT;\n" "-\t *\n" @@ -1720,8 +1720,10 @@ "-\t\t\t * if available.\n" "-\t\t\t */\n" "-\t\t\tif (default_stop_found) {\n" - "-\t\t\t\tpnv_deepest_stop_psscr_val -\t\t\t\t\tpnv_default_stop_val;\n" - "-\t\t\t\tpnv_deepest_stop_psscr_mask -\t\t\t\t\tpnv_default_stop_mask;\n" + "-\t\t\t\tpnv_deepest_stop_psscr_val =\n" + "-\t\t\t\t\tpnv_default_stop_val;\n" + "-\t\t\t\tpnv_deepest_stop_psscr_mask =\n" + "-\t\t\t\t\tpnv_default_stop_mask;\n" "-\t\t\t\tpr_warn(\"cpuidle-powernv: Offlined CPUs will stop with psscr = 0x%016llx\\n\",\n" "-\t\t\t\t\tpnv_deepest_stop_psscr_val);\n" "-\t\t\t} else { /* Fallback to snooze loop for CPU-Hotplug */\n" @@ -1882,7 +1884,7 @@ "+\t\t*state &= ~thread;\n" "+\n" "+\t\tif (power7_fastsleep_workaround_entry) {\n" - "+\t\t\tif ((*state & ((1 << threads_per_core) - 1)) = 0) {\n" + "+\t\t\tif ((*state & ((1 << threads_per_core) - 1)) == 0) {\n" "+\t\t\t\trc = opal_config_cpu_idle_state(\n" "+\t\t\t\t\t\tOPAL_CONFIG_IDLE_FASTSLEEP,\n" "+\t\t\t\t\t\tOPAL_CONFIG_IDLE_APPLY);\n" @@ -1890,7 +1892,7 @@ "+\t\t\t}\n" "+\t\t}\n" "+\n" - "+\t\tif (type = PNV_THREAD_WINKLE) {\n" + "+\t\tif (type == PNV_THREAD_WINKLE) {\n" "+\t\t\tsprs.tscr\t= mfspr(SPRN_TSCR);\n" "+\t\t\tsprs.worc\t= mfspr(SPRN_WORC);\n" "+\n" @@ -1918,9 +1920,9 @@ "+\t\t\t * this may not be a really big win.\n" "+\t\t\t */\n" "+\t\t\t*state += 1 << PNV_CORE_IDLE_WINKLE_COUNT_SHIFT;\n" - "+\t\t\tif ((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) >> PNV_CORE_IDLE_WINKLE_COUNT_SHIFT = threads_per_core)\n" + "+\t\t\tif ((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) >> PNV_CORE_IDLE_WINKLE_COUNT_SHIFT == threads_per_core)\n" "+\t\t\t\t*state |= PNV_CORE_IDLE_THREAD_WINKLE_BITS;\n" - "+\t\t\tWARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) = 0);\n" + "+\t\t\tWARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) == 0);\n" "+\t\t}\n" "+\n" "+\t\tatomic_unlock_thread_idle();\n" @@ -1933,14 +1935,14 @@ "+\tWARN_ON_ONCE(!srr1);\n" "+\tWARN_ON_ONCE(mfmsr() & (MSR_IR|MSR_DR));\n" "+\n" - "+\tif (unlikely((srr1 & SRR1_WAKEMASK_P8) = SRR1_WAKEHMI))\n" + "+\tif (unlikely((srr1 & SRR1_WAKEMASK_P8) == SRR1_WAKEHMI))\n" "+\t\thmi_exception_realmode(NULL);\n" "+\n" "+\tif (likely((srr1 & SRR1_WAKESTATE) != SRR1_WS_HVLOSS)) {\n" "+\t\tif (unlikely(type != PNV_THREAD_NAP)) {\n" "+\t\t\tatomic_lock_thread_idle();\n" - "+\t\t\tif (type = PNV_THREAD_WINKLE) {\n" - "+\t\t\t\tWARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) = 0);\n" + "+\t\t\tif (type == PNV_THREAD_WINKLE) {\n" + "+\t\t\t\tWARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) == 0);\n" "+\t\t\t\t*state -= 1 << PNV_CORE_IDLE_WINKLE_COUNT_SHIFT;\n" "+\t\t\t\t*state &= ~(thread << PNV_CORE_IDLE_THREAD_WINKLE_BITS_SHIFT);\n" "+\t\t\t}\n" @@ -1950,13 +1952,13 @@ "+\t}\n" "+\n" "+\t/* HV state loss */\n" - "+\tBUG_ON(type = PNV_THREAD_NAP);\n" + "+\tBUG_ON(type == PNV_THREAD_NAP);\n" "+\n" "+\tatomic_lock_thread_idle();\n" "+\n" "+\tfull_winkle = false;\n" - "+\tif (type = PNV_THREAD_WINKLE) {\n" - "+\t\tWARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) = 0);\n" + "+\tif (type == PNV_THREAD_WINKLE) {\n" + "+\t\tWARN_ON((*state & PNV_CORE_IDLE_WINKLE_COUNT_BITS) == 0);\n" "+\t\t*state -= 1 << PNV_CORE_IDLE_WINKLE_COUNT_SHIFT;\n" "+\t\tif (*state & (thread << PNV_CORE_IDLE_THREAD_WINKLE_BITS_SHIFT)) {\n" "+\t\t\t*state &= ~(thread << PNV_CORE_IDLE_THREAD_WINKLE_BITS_SHIFT);\n" @@ -2238,7 +2240,7 @@ "+\t\tmtspr(SPRN_MMCRA, mmcra);\n" "+\t}\n" "+\n" - "+\tif (unlikely((srr1 & SRR1_WAKEMASK_P8) = SRR1_WAKEHMI))\n" + "+\tif (unlikely((srr1 & SRR1_WAKEMASK_P8) == SRR1_WAKEHMI))\n" "+\t\thmi_exception_realmode(NULL);\n" "+\n" "+\t/*\n" @@ -2517,7 +2519,7 @@ "+\t\tstruct paca_struct *p = paca_ptrs[cpu];\n" "+\n" "+\t\tp->idle_state = 0;\n" - "+\t\tif (cpu = cpu_first_thread_sibling(cpu))\n" + "+\t\tif (cpu == cpu_first_thread_sibling(cpu))\n" "+\t\t\tp->idle_state = (1 << threads_per_core) - 1;\n" "+\n" "+\t\tif (!cpu_has_feature(CPU_FTR_ARCH_300)) {\n" @@ -2656,4 +2658,4 @@ "-- \n" 2.18.0 -9b3b56a460ec20b6a747e70852f4dc133900c6864aa0cb5d713bad0c69222aad +8c30064a2138c3fdc956114059103dc90e879b82536c33fb575d4b38998c1228
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.