x86: Update mpspec to build on 64-bit machines
At present this uses u32 to store an address. We should use unsigned long
and avoid special types in function return values and parameters unless
necessary. This makes the code more portable.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h
index 146a4b0..30dbdca 100644
--- a/arch/x86/include/asm/mpspec.h
+++ b/arch/x86/include/asm/mpspec.h
@@ -224,9 +224,9 @@
* @mc: configuration table header address
* @return: configuration table end address
*/
-static inline u32 mp_next_mpc_entry(struct mp_config_table *mc)
+static inline ulong mp_next_mpc_entry(struct mp_config_table *mc)
{
- return (u32)mc + mc->mpc_length;
+ return (ulong)mc + mc->mpc_length;
}
/**
@@ -254,9 +254,9 @@
* @mc: configuration table header address
* @return: configuration table end address
*/
-static inline u32 mp_next_mpe_entry(struct mp_config_table *mc)
+static inline ulong mp_next_mpe_entry(struct mp_config_table *mc)
{
- return (u32)mc + mc->mpc_length + mc->mpe_length;
+ return (ulong)mc + mc->mpc_length + mc->mpe_length;
}
/**