-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 ...
- Loading branch information
Showing
85 changed files
with
1,543 additions
and
915 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
What: /sys/devices/socX | ||
Date: January 2012 | ||
contact: Lee Jones <lee.jones@linaro.org> | ||
Description: | ||
The /sys/devices/ directory contains a sub-directory for each | ||
System-on-Chip (SoC) device on a running platform. Information | ||
regarding each SoC can be obtained by reading sysfs files. This | ||
functionality is only available if implemented by the platform. | ||
|
||
The directory created for each SoC will also house information | ||
about devices which are commonly contained in /sys/devices/platform. | ||
It has been agreed that if an SoC device exists, its supported | ||
devices would be better suited to appear as children of that SoC. | ||
|
||
What: /sys/devices/socX/machine | ||
Date: January 2012 | ||
contact: Lee Jones <lee.jones@linaro.org> | ||
Description: | ||
Read-only attribute common to all SoCs. Contains the SoC machine | ||
name (e.g. Ux500). | ||
|
||
What: /sys/devices/socX/family | ||
Date: January 2012 | ||
contact: Lee Jones <lee.jones@linaro.org> | ||
Description: | ||
Read-only attribute common to all SoCs. Contains SoC family name | ||
(e.g. DB8500). | ||
|
||
What: /sys/devices/socX/soc_id | ||
Date: January 2012 | ||
contact: Lee Jones <lee.jones@linaro.org> | ||
Description: | ||
Read-only attribute supported by most SoCs. In the case of | ||
ST-Ericsson's chips this contains the SoC serial number. | ||
|
||
What: /sys/devices/socX/revision | ||
Date: January 2012 | ||
contact: Lee Jones <lee.jones@linaro.org> | ||
Description: | ||
Read-only attribute supported by most SoCs. Contains the SoC's | ||
manufacturing revision number. | ||
|
||
What: /sys/devices/socX/process | ||
Date: January 2012 | ||
contact: Lee Jones <lee.jones@linaro.org> | ||
Description: | ||
Read-only attribute supported ST-Ericsson's silicon. Contains the | ||
the process by which the silicon chip was manufactured. | ||
|
||
What: /sys/bus/soc | ||
Date: January 2012 | ||
contact: Lee Jones <lee.jones@linaro.org> | ||
Description: | ||
The /sys/bus/soc/ directory contains the usual sub-folders | ||
expected under most buses. /sys/bus/soc/devices is of particular | ||
interest, as it contains a symlink for each SoC device found on | ||
the system. Each symlink points back into the aforementioned | ||
/sys/devices/socX devices. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef _CPU_DEVICE_ID | ||
#define _CPU_DEVICE_ID 1 | ||
|
||
/* | ||
* Declare drivers belonging to specific x86 CPUs | ||
* Similar in spirit to pci_device_id and related PCI functions | ||
*/ | ||
|
||
#include <linux/mod_devicetable.h> | ||
|
||
extern const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#include <asm/cpu_device_id.h> | ||
#include <asm/processor.h> | ||
#include <linux/cpu.h> | ||
#include <linux/module.h> | ||
#include <linux/slab.h> | ||
|
||
/** | ||
* x86_match_cpu - match current CPU again an array of x86_cpu_ids | ||
* @match: Pointer to array of x86_cpu_ids. Last entry terminated with | ||
* {}. | ||
* | ||
* Return the entry if the current CPU matches the entries in the | ||
* passed x86_cpu_id match table. Otherwise NULL. The match table | ||
* contains vendor (X86_VENDOR_*), family, model and feature bits or | ||
* respective wildcard entries. | ||
* | ||
* A typical table entry would be to match a specific CPU | ||
* { X86_VENDOR_INTEL, 6, 0x12 } | ||
* or to match a specific CPU feature | ||
* { X86_FEATURE_MATCH(X86_FEATURE_FOOBAR) } | ||
* | ||
* Fields can be wildcarded with %X86_VENDOR_ANY, %X86_FAMILY_ANY, | ||
* %X86_MODEL_ANY, %X86_FEATURE_ANY or 0 (except for vendor) | ||
* | ||
* Arrays used to match for this should also be declared using | ||
* MODULE_DEVICE_TABLE(x86_cpu, ...) | ||
* | ||
* This always matches against the boot cpu, assuming models and features are | ||
* consistent over all CPUs. | ||
*/ | ||
const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match) | ||
{ | ||
const struct x86_cpu_id *m; | ||
struct cpuinfo_x86 *c = &boot_cpu_data; | ||
|
||
for (m = match; m->vendor | m->family | m->model | m->feature; m++) { | ||
if (m->vendor != X86_VENDOR_ANY && c->x86_vendor != m->vendor) | ||
continue; | ||
if (m->family != X86_FAMILY_ANY && c->x86 != m->family) | ||
continue; | ||
if (m->model != X86_MODEL_ANY && c->x86_model != m->model) | ||
continue; | ||
if (m->feature != X86_FEATURE_ANY && !cpu_has(c, m->feature)) | ||
continue; | ||
return m; | ||
} | ||
return NULL; | ||
} | ||
EXPORT_SYMBOL(x86_match_cpu); | ||
|
||
ssize_t arch_print_cpu_modalias(struct device *dev, | ||
struct device_attribute *attr, | ||
char *bufptr) | ||
{ | ||
int size = PAGE_SIZE; | ||
int i, n; | ||
char *buf = bufptr; | ||
|
||
n = snprintf(buf, size, "x86cpu:vendor:%04X:family:%04X:" | ||
"model:%04X:feature:", | ||
boot_cpu_data.x86_vendor, | ||
boot_cpu_data.x86, | ||
boot_cpu_data.x86_model); | ||
size -= n; | ||
buf += n; | ||
size -= 2; | ||
for (i = 0; i < NCAPINTS*32; i++) { | ||
if (boot_cpu_has(i)) { | ||
n = snprintf(buf, size, ",%04X", i); | ||
if (n < 0) { | ||
WARN(1, "x86 features overflow page\n"); | ||
break; | ||
} | ||
size -= n; | ||
buf += n; | ||
} | ||
} | ||
*buf++ = ','; | ||
*buf++ = '\n'; | ||
return buf - bufptr; | ||
} | ||
|
||
int arch_cpu_uevent(struct device *dev, struct kobj_uevent_env *env) | ||
{ | ||
char *buf = kzalloc(PAGE_SIZE, GFP_KERNEL); | ||
if (buf) { | ||
arch_print_cpu_modalias(NULL, NULL, buf); | ||
add_uevent_var(env, "MODALIAS=%s", buf); | ||
kfree(buf); | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.