x86/cpu/intel: Fix the constant_tsc model check for Pentium 4
Subsystems (2)
PATCH v4 1/1 x86/cpu/intel: Fix the constant_tsc model check for Pentium 4
Pentium 4's which are INTEL_P4_PRESCOTT (model 0x03) and later have a constant TSC. This was correctly captured until commit fadb6f569b10 ("x86/cpu/intel: Limit the non-architectural constant_tsc model checks"). In that commit, an error was introduced while selecting the last P4 model (0x06) as the upper bound. Model 0x06 was transposed to INTEL_P4_WILLAMETTE, which is just plain wrong. That was presumably a simple typo, probably just copying and pasting the wrong P4 model. Fix the constant TSC logic to cover all later P4 models. End at INTEL_P4_CEDARMILL which accurately corresponds to the last P4 model.
Changes since v3:
- Refined changelog
Changes since v2:
- Improve commit message
Changes since v1:
- Fix incorrect logic
--- arch/x86/kernel/cpu/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/intel.c +1 -1
@@ -262,7 +262,7 @@ static void early_init_intel(struct cpuinfo_x86 *c)if (c->x86_power & (1 <<8 )) {set_cpu_cap (c,X86_FEATURE_CONSTANT_TSC );set_cpu_cap (c,X86_FEATURE_NONSTOP_TSC ); - }else if ((c->x86_vfm >=INTEL_P4_PRESCOTT && c->x86_vfm <=INTEL_P4_WILLAMETTE ) || + }else if ((c->x86_vfm >=INTEL_P4_PRESCOTT && c->x86_vfm <=INTEL_P4_CEDARMILL ) || (c->x86_vfm >=INTEL_CORE_YONAH && c->x86_vfm <=INTEL_IVYBRIDGE )) {set_cpu_cap (c,X86_FEATURE_CONSTANT_TSC ); }
Signature · 1 line
2.50.1
Hi Suchit
I would strongly suggest spending more time understanding reviewer feedback and incorporating it before sending another version. Most of the comments below are a repeat from previous reviews by multiple folks.
Quoted 9 lines · Suchit Karunakaran
Pentium 4's which are
INTEL_P4_PRESCOTT(model0x03) and later have a constant TSC. This was correctly captured until commitfadb6f569b10("x86/cpu/intel: Limit the non-architecturalconstant_tscmodel checks"). In that commit, an error was introduced while selecting the last P4 model (0x06) as the upper bound. Model0x06was transposed toINTEL_P4_WILLAMETTE, which is just plain wrong. That was presumably a simple typo, probably just copying and pasting the wrong P4 model. Fix the constant TSC logic to cover all later P4 models. End atINTEL_P4_CEDARMILLwhich accurately corresponds to the last P4 model.
Please use proper spacing and line breaks. Posting this as a single chunk makes it very hard to read.
Quoted 6 lines
Fixes fadb6f569b10 ("x86/cpu/intel: Limit the non-architectural constant_tsc model checks")Cc <[email protected]> # v6.15Signed-off-by Suchit Karunakaran <[email protected]>
No blank lines between these 3 statements.
Please take all review comments seriously, even if they are nits.
https://lore.kernel.org/lkml/2025073013-stimulus-snowdrift-d28c@gregkh/
Quoted 9 lines
Changes since v3:
- Refined changelogChanges since v2:
- Improve commit messageChanges since v1:
- Fix incorrect logic
Patch-to-patch changes go below the --- line.
You have been provided the same feedback by other folks as well.
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/lkml/[email protected]/
If you are not sure, please look at other submissions to the mailing list that do this.
Quoted 9 lines
--- arch/x86/kernel/cpu/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/cpu/intel.c +0
-0
arch/x86/kernel/cpu/intel.c static void early_init_intel(struct cpuinfo_x86 *c) · line 266
Quoted 6 lines
arch/x86/kernel/cpu/intel.c +1
-1@@ -262,7 +262,7 @@ static void early_init_intel(struct cpuinfo_x86 *c)if (c->x86_power & (1 <<8 )) {set_cpu_cap (c,X86_FEATURE_CONSTANT_TSC );set_cpu_cap (c,X86_FEATURE_NONSTOP_TSC ); - }else if ((c->x86_vfm >=INTEL_P4_PRESCOTT && c->x86_vfm <=INTEL_P4_WILLAMETTE ) || + }else if ((c->x86_vfm >=INTEL_P4_PRESCOTT && c->x86_vfm <=INTEL_P4_CEDARMILL ) || (c->x86_vfm >=INTEL_CORE_YONAH && c->x86_vfm <=INTEL_IVYBRIDGE )) {
Again, this changes the previous alignment. You do not need the extra space before INTEL_P4_PRESCOTT. Avoiding that would keep both the lines aligned.
https://lore.kernel.org/lkml/[email protected]/
It's acceptable to ask clarifying questions, but disregarding review comments frustrates reviewers and inclined to ignore future submissions.
Quoted 2 lines
arch/x86/kernel/cpu/intel.c +0
-0set_cpu_cap (c,X86_FEATURE_CONSTANT_TSC ); }
Quoted 77 lines · Sohil Mehta
Hi Suchit
I would strongly suggest spending more time understanding reviewer feedback and incorporating it before sending another version. Most of the comments below are a repeat from previous reviews by multiple folks.
Quoted 9 lines · Suchit Karunakaran
Pentium 4's which are
INTEL_P4_PRESCOTT(model0x03) and later have a constant TSC. This was correctly captured until commitfadb6f569b10("x86/cpu/intel: Limit the non-architecturalconstant_tscmodel checks"). In that commit, an error was introduced while selecting the last P4 model (0x06) as the upper bound. Model0x06was transposed toINTEL_P4_WILLAMETTE, which is just plain wrong. That was presumably a simple typo, probably just copying and pasting the wrong P4 model. Fix the constant TSC logic to cover all later P4 models. End atINTEL_P4_CEDARMILLwhich accurately corresponds to the last P4 model.Please use proper spacing and line breaks. Posting this as a single chunk makes it very hard to read.
Quoted 6 lines
Fixes fadb6f569b10 ("x86/cpu/intel: Limit the non-architectural constant_tsc model checks")Cc <[email protected]> # v6.15Signed-off-by Suchit Karunakaran <[email protected]>No blank lines between these 3 statements.
Please take all review comments seriously, even if they are nits.
https://lore.kernel.org/lkml/2025073013-stimulus-snowdrift-d28c@gregkh/
Quoted 9 lines
Changes since v3:
- Refined changelogChanges since v2:
- Improve commit messageChanges since v1:
- Fix incorrect logicPatch-to-patch changes go below the --- line.
You have been provided the same feedback by other folks as well.
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/lkml/[email protected]/
If you are not sure, please look at other submissions to the mailing list that do this.
Quoted 9 lines
--- arch/x86/kernel/cpu/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/cpu/intel.c +0
-0arch/x86/kernel/cpu/intel.c static void early_init_intel(struct cpuinfo_x86 *c) · line 266
Quoted 6 lines
arch/x86/kernel/cpu/intel.c +1
-1@@ -262,7 +262,7 @@ static void early_init_intel(struct cpuinfo_x86 *c)if (c->x86_power & (1 <<8 )) {set_cpu_cap (c,X86_FEATURE_CONSTANT_TSC );set_cpu_cap (c,X86_FEATURE_NONSTOP_TSC ); - }else if ((c->x86_vfm >=INTEL_P4_PRESCOTT && c->x86_vfm <=INTEL_P4_WILLAMETTE ) || + }else if ((c->x86_vfm >=INTEL_P4_PRESCOTT && c->x86_vfm <=INTEL_P4_CEDARMILL ) || (c->x86_vfm >=INTEL_CORE_YONAH && c->x86_vfm <=INTEL_IVYBRIDGE )) {Again, this changes the previous alignment. You do not need the extra space before
INTEL_P4_PRESCOTT. Avoiding that would keep both the lines aligned.
Quoted 9 lines
https://lore.kernel.org/lkml/[email protected]/
It's acceptable to ask clarifying questions, but disregarding review comments frustrates reviewers and inclined to ignore future submissions.
Quoted 2 lines
arch/x86/kernel/cpu/intel.c +0
-0set_cpu_cap (c,X86_FEATURE_CONSTANT_TSC ); }
Hi Sohil,
Thank you very much for your time and the detailed feedback. I sincerely apologize for the repeated mistakes in my submission. It was never my intention to disregard any of the review comments. I was just focused on the commit description and, as a result, was careless in properly incorporating the prior suggestions and formatting requirements. I understand how frustrating this can be, and I truly appreciate the patience shown by you and others throughout the review process. I will take greater care moving forward to ensure that all feedback is fully addressed before resubmitting.
Thank you again for your time and guidance.