summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/cpu.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-11-10 18:00:26 -0700
committerSimon Glass <sjg@chromium.org>2014-11-21 07:24:12 +0100
commit727c1a987147bb55ff41ab62f7e01293a38910b8 (patch)
treed859d062dc842c60c2c941fe38d6467a3319f1d1 /arch/x86/include/asm/cpu.h
parent003504b6fe2296f581191b77fd2f1e98c4f4720c (diff)
x86: Replace fill_processor_name() with cpu_get_name()
This implementation has a 'cpu' prefix and returns a pointer to the string, avoiding the need for copying. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/include/asm/cpu.h')
-rw-r--r--arch/x86/include/asm/cpu.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
index 89b748b392..c8392915f1 100644
--- a/arch/x86/include/asm/cpu.h
+++ b/arch/x86/include/asm/cpu.h
@@ -179,12 +179,17 @@ int cpu_has_64bit(void);
*/
const char *cpu_vendor_name(int vendor);
+#define CPU_MAX_NAME_LEN 49
+
/**
- * fill_processor_name() - Get processor name
+ * cpu_get_name() - Get the name of the current cpu
*
- * @processor_name: Address to hold the processor name string
+ * @name: Place to put name, which must be CPU_MAX_NAME_LEN bytes including
+ * @return pointer to name, which will likely be a few bytes after the start
+ * of @name
+ * \0 terminator
*/
-void fill_processor_name(char *processor_name);
+char *cpu_get_name(char *name);
/**
* cpu_call64() - Jump to a 64-bit Linux kernel (internal function)