* [PATCH] x86: Add a platform_type helper
@ 2010-03-24 12:14 Alan Cox
0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2010-03-24 12:14 UTC (permalink / raw)
To: linux-kernel, mingo
Various x86 drivers for embedded stuff will need to know the platform they
are running on to do runtime setup. Having them all grovelling around at
boot_params.hdr.hardware_subarch seems a bad idea, so export it as an
inline function that hides all the details of how the value arrives.
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
arch/x86/include/asm/setup.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 86b1506..4008446 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -60,6 +60,12 @@ static inline void x86_mrst_early_setup(void) { }
*/
extern struct boot_params boot_params;
+/* Isolate the internal knowledge from the generic callers */
+extern __inline int x86_platform_type(void)
+{
+ return boot_params.hdr.hardware_subarch;
+}
+
/*
* Do NOT EVER look at the BIOS memory size location.
* It does not work on many machines.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-24 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 12:14 [PATCH] x86: Add a platform_type helper Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®