[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4A 01/15] x86/msr: Add missing includes of <asm/msr.h>



On 5/2/2025 6:13 AM, Ilpo Järvinen wrote:
diff --git a/arch/x86/kernel/trace_clock.c b/arch/x86/kernel/trace_clock.c
index b8e7abe00b06..708d61743d15 100644
--- a/arch/x86/kernel/trace_clock.c
+++ b/arch/x86/kernel/trace_clock.c
@@ -4,7 +4,7 @@
   */
  #include <asm/trace_clock.h>
  #include <asm/barrier.h>
-#include <asm/msr.h>
+#include <asm/tsc.h>
Does this change belong to this patch?

It might even cause a build failure until the second patch which moves
the tsc related things to the other file (unless there's indirect include
path to asm/msr.h).

Ah, you're right as I have separated the relocation of rdtsc_ordered()
into a following patch.


diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c
index a58f451a7dd3..b5893928d55c 100644
--- a/arch/x86/lib/kaslr.c
+++ b/arch/x86/lib/kaslr.c
@@ -8,7 +8,7 @@
   */
  #include <asm/asm.h>
  #include <asm/kaslr.h>
-#include <asm/msr.h>
+#include <asm/tsc.h>
Same thing here.

  #include <asm/archrandom.h>
  #include <asm/e820/api.h>
  #include <asm/shared/io.h>
diff --git a/drivers/accel/habanalabs/common/habanalabs_ioctl.c 
b/drivers/accel/habanalabs/common/habanalabs_ioctl.c
index 8729a0c57d78..dc80ca921d90 100644
--- a/drivers/accel/habanalabs/common/habanalabs_ioctl.c
+++ b/drivers/accel/habanalabs/common/habanalabs_ioctl.c
@@ -17,8 +17,6 @@
  #include <linux/uaccess.h>
  #include <linux/vmalloc.h>
-#include <asm/msr.h>
-
I suggested making a separate patch out of these removals. Currently you
do them without any clear warning in the changelog which only talks about
adding asm/msr.h.


I didn't want to add an extra patch to the v4 series, but I really
should have mentioned the removal at least.


diff --git a/drivers/acpi/processor_throttling.c 
b/drivers/acpi/processor_throttling.c
index 00d045e5f524..ecd7fe256153 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -18,9 +18,13 @@
  #include <linux/sched.h>
  #include <linux/cpufreq.h>
  #include <linux/acpi.h>
+#include <linux/uaccess.h>
  #include <acpi/processor.h>
  #include <asm/io.h>
-#include <linux/uaccess.h>
+#include <asm/asm.h>
???

Damn me!

Not to find an excuse but I guess I got somewhat tired when doing it.


+#ifdef CONFIG_X86
+#include <asm/msr.h>
+#endif

I really appreciate you took the effort to do this change the correct
way! 🙂

Same here for pushing it the right direction!


Hi Ingo,

Since you *wisely* didn't remove msr.h from tsc.h, maybe you could just
zap this patch and I will send an afterwards patch set to replace this
patch?

Apology for the noise.

Thanks!
    Xin



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.