Skip to contentSkip to conversation

linux-next: semantic conflict between the pm and tip trees

PATCH Sasha Levin 3 participants 3 messages Nov 24 – Nov 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Mark,

The current pm tree has a semantic conflict with the tip tree that breaks the x86 build:

drivers/thermal/intel/intel_hfi.c:407:38: error: too many arguments to function call, expected single argument 'msr', have 2 arguments

437ce3015e51 ("thermal: intel: hfi: Disable HFI on shutdown and kexec") in the pm tree uses rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG, msr_val), and e7f9f17e0013 ("treewide: Convert rdmsrq() from a macro to an inline function") in the tip tree makes rdmsrq() take only the MSR and return the value.

The fix for the merge:

drivers/thermal/intel/intel_hfi.c +1 -1
@@ -404,7 +404,7 @@ static bool hfi_disable_if_enabled(void)
 {
 	u64 msr_val;
 
-	rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG, msr_val);
+	msr_val = rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG);
 	if (!(msr_val & HW_FEEDBACK_CONFIG_HFI_ENABLE_BIT))
 		return false;
 
Signature · 2 lines
Thanks,
Sasha
#1 lore raw
Quoted 20 lines · Sasha Levin

Hi Mark,

The current pm tree has a semantic conflict with the tip tree that breaks the x86 build:

drivers/thermal/intel/intel_hfi.c:407:38: error: too many arguments to function call, expected single argument 'msr', have 2 arguments

437ce3015e51 ("thermal: intel: hfi: Disable HFI on shutdown and kexec") in the pm tree uses rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG, msr_val), and e7f9f17e0013 ("treewide: Convert rdmsrq() from a macro to an inline function") in the tip tree makes rdmsrq() take only the MSR and return the value.

The fix for the merge:

drivers/thermal/intel/intel_hfi.c static bool hfi_disable_if_enabled(void) · line 410

Quoted 8 lines
drivers/thermal/intel/intel_hfi.c +1 -1
@@ -404,7 +404,7 @@ static bool hfi_disable_if_enabled(void)
  {
  	u64 msr_val;
 
-	rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG, msr_val);
+	msr_val = rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG);
  	if (!(msr_val & HW_FEEDBACK_CONFIG_HFI_ENABLE_BIT))
  		return false;
 

The fix seems to be correct.

Juergen

#2 lore raw
In reply to Sasha Levin
Quoted 19 lines · Sasha Levin

Hi Mark,

The current pm tree has a semantic conflict with the tip tree that breaks the x86 build:

drivers/thermal/intel/intel_hfi.c:407:38: error: too many arguments to function call, expected single argument 'msr', have 2 arguments

437ce3015e51 ("thermal: intel: hfi: Disable HFI on shutdown and kexec") in the pm tree uses rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG, msr_val), and e7f9f17e0013 ("treewide: Convert rdmsrq() from a macro to an inline function") in the tip tree makes rdmsrq() take only the MSR and return the value.

The fix for the merge:

drivers/thermal/intel/intel_hfi.c static bool hfi_disable_if_enabled(void) · line 409

Quoted 7 lines
drivers/thermal/intel/intel_hfi.c +1 -1
@@ -404,7 +404,7 @@ static bool hfi_disable_if_enabled(void)
 {
 	u64 msr_val;
 
-	rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG, msr_val);
+	msr_val = rdmsrq(MSR_IA32_HW_FEEDBACK_CONFIG);
 	if (!(msr_val & HW_FEEDBACK_CONFIG_HFI_ENABLE_BIT))
 		return false;

LGTM, thank you!

Ingo