summaryrefslogtreecommitdiff
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-02-13 06:30:04 +0000
committerArnd Bergmann <arnd@arndb.de>2012-02-13 06:30:04 +0000
commiteaa5699e3bff8e8335757cf401451ffbd4a88109 (patch)
treea5a23148d26f9d083080d94991e8ceed12c0857b /scripts/mod/file2alias.c
parentd65b4e98d7ea3038b767b70fe8be959b2913f16d (diff)
parentda5a70f3519fd6f73ece3eea261a861c9a4d6bbd (diff)
Merge branch 'depends/driver-core' into next/soc2
* depends/driver-core: (55 commits) Documentation: add information for new sysfs soc bus functionality drivers/base: add bus for System-on-Chip devices DWC3: use module_pci_driver PCI: Add helper macro for pci_register_driver boilerplate w1: Use linux/gpio.h rather than asm/gpio.h drivers: hv: Increase the number of VCPUs supported in the guest drivers: hv: kvp: Cleanup the kernel/user protocol tools: hv: Use hyperv.h to get the KVP definitions drivers: hv: Cleanup the kvp related state in hyperv.h ACPI: remove duplicated lines of merging problems with acpi_processor_start cpufreq/gx: Fix the compile error drivers: hv: kvp: Move the contents of hv_kvp.h to hyperv.h drivers: hv: kvp: Add/cleanup connector defines sysfs: Update the name hash when renaming sysfs entries PCI/XEN: Fix bug introduced by a recent change USB/PCI/PCMCIA: Clean up new_id and remove_id sysfs attribute routines CPU: Introduce ARCH_HAS_CPU_AUTOPROBE and X86 parts x86: autoload microcode driver on Intel and AMD systems v2 cpufreq: Add support for x86 cpuinfo auto loading v4 X86: Introduce HW-Pstate scattered cpuid feature ...
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r--scripts/mod/file2alias.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index e8c969577768..a468af059834 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1003,6 +1003,30 @@ static int do_amba_entry(const char *filename,
}
ADD_TO_DEVTABLE("amba", struct amba_id, do_amba_entry);
+/* LOOKS like x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:*,FEAT,*
+ * All fields are numbers. It would be nicer to use strings for vendor
+ * and feature, but getting those out of the build system here is too
+ * complicated.
+ */
+
+static int do_x86cpu_entry(const char *filename, struct x86_cpu_id *id,
+ char *alias)
+{
+ id->feature = TO_NATIVE(id->feature);
+ id->family = TO_NATIVE(id->family);
+ id->model = TO_NATIVE(id->model);
+ id->vendor = TO_NATIVE(id->vendor);
+
+ strcpy(alias, "x86cpu:");
+ ADD(alias, "vendor:", id->vendor != X86_VENDOR_ANY, id->vendor);
+ ADD(alias, ":family:", id->family != X86_FAMILY_ANY, id->family);
+ ADD(alias, ":model:", id->model != X86_MODEL_ANY, id->model);
+ ADD(alias, ":feature:*,", id->feature != X86_FEATURE_ANY, id->feature);
+ strcat(alias, ",*");
+ return 1;
+}
+ADD_TO_DEVTABLE("x86cpu", struct x86_cpu_id, do_x86cpu_entry);
+
/* Does namelen bytes of name exactly match the symbol? */
static bool sym_is(const char *name, unsigned namelen, const char *symbol)
{