Skip to contentSkip to conversation

mtrr: fix types used in userspace exported header

PATCH Applied Kyle McMartin 2 participants 3 messages Jan 8, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtrr: fix types used in userspace exported header

From: Kyle McMartin <[email protected]>

Commit 932d27a7913fc6b3c64c6e6082628b0a1561dec9 exported some mtrr structures without using the exportable __uX types, causing userspace build failures.

arch/x86/include/asm/mtrr.h +4 -4
index cb988aa..1b0d528 100644
@@ -58,10 +58,10 @@ struct mtrr_gentry {
 #endif /* !__i386__ */
 
 struct mtrr_var_range {
-	u32 base_lo;
-	u32 base_hi;
-	u32 mask_lo;
-	u32 mask_hi;
+	__u32 base_lo;
+	__u32 base_hi;
+	__u32 mask_lo;
+	__u32 mask_hi;
 };
 
 /* In the Intel processor's MTRR interface, the MTRR type is always held in
#1 lore raw

From: Kyle McMartin <[email protected]>

Commit 932d27a7913fc6b3c64c6e6082628b0a1561dec9 exported some mtrr structures without using the exportable __uX types, causing userspace build failures.

---

Missed the u8 typedef below the struct.

arch/x86/include/asm/mtrr.h +5 -5
index cb988aa..14080d2 100644
@@ -58,15 +58,15 @@ struct mtrr_gentry {
 #endif /* !__i386__ */
 
 struct mtrr_var_range {
-	u32 base_lo;
-	u32 base_hi;
-	u32 mask_lo;
-	u32 mask_hi;
+	__u32 base_lo;
+	__u32 base_hi;
+	__u32 mask_lo;
+	__u32 mask_hi;
 };
 
 /* In the Intel processor's MTRR interface, the MTRR type is always held in
    an 8 bit field: */
-typedef u8 mtrr_type;
+typedef __u8 mtrr_type;
 
 #define MTRR_NUM_FIXED_RANGES 88
 #define MTRR_MAX_VAR_RANGES 256
Applied
#2 lore raw
Quoted 11 lines · Kyle McMartin

From: Kyle McMartin <[email protected]>

Commit 932d27a7913fc6b3c64c6e6082628b0a1561dec9 exported some mtrr structures without using the exportable __uX types, causing userspace build failures.

---

Missed the u8 typedef below the struct.

applied to tip/x86/urgent, thanks Kyle!

Ingo