|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/APIC: Change APIC reg types to unsigned int
commit c29f6ee94df34ce7391d0d9fabc32e5fe683b89e
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue Jul 23 20:28:24 2024 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Jul 24 12:18:44 2024 +0100
x86/APIC: Change APIC reg types to unsigned int
They're all within a 12 bit range of their respective bases, and this
prevents
all the x2APIC MSR addresses being calculated in %rcx.
Also swap two u32's for uint32_t.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/include/asm/apic.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h
index a254e49dd1..509a6683a1 100644
--- a/xen/arch/x86/include/asm/apic.h
+++ b/xen/arch/x86/include/asm/apic.h
@@ -49,12 +49,12 @@ const struct genapic *apic_x2apic_probe(void);
* Basic functions accessing APICs.
*/
-static inline void apic_mem_write(unsigned long reg, u32 v)
+static inline void apic_mem_write(unsigned int reg, uint32_t v)
{
*((volatile u32 *)(APIC_BASE+reg)) = v;
}
-static inline u32 apic_mem_read(unsigned long reg)
+static inline u32 apic_mem_read(unsigned int reg)
{
return *((volatile u32 *)(APIC_BASE+reg));
}
@@ -63,7 +63,7 @@ static inline u32 apic_mem_read(unsigned long reg)
* access the 64-bit ICR register.
*/
-static inline void apic_wrmsr(unsigned long reg, uint64_t msr_content)
+static inline void apic_wrmsr(unsigned int reg, uint64_t msr_content)
{
if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
reg == APIC_LVR)
@@ -72,7 +72,7 @@ static inline void apic_wrmsr(unsigned long reg, uint64_t
msr_content)
wrmsrl(MSR_X2APIC_FIRST + (reg >> 4), msr_content);
}
-static inline uint64_t apic_rdmsr(unsigned long reg)
+static inline uint64_t apic_rdmsr(unsigned int reg)
{
uint64_t msr_content;
@@ -83,7 +83,7 @@ static inline uint64_t apic_rdmsr(unsigned long reg)
return msr_content;
}
-static inline void apic_write(unsigned long reg, u32 v)
+static inline void apic_write(unsigned int reg, uint32_t v)
{
if ( x2apic_enabled )
@@ -92,7 +92,7 @@ static inline void apic_write(unsigned long reg, u32 v)
apic_mem_write(reg, v);
}
-static inline u32 apic_read(unsigned long reg)
+static inline u32 apic_read(unsigned int reg)
{
if ( x2apic_enabled )
return apic_rdmsr(reg);
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |