Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
match.c File Reference
#include <asm/cpu_device_id.h>
#include <asm/processor.h>
#include <linux/cpu.h>
#include <linux/module.h>
#include <linux/slab.h>

Go to the source code of this file.

Functions

struct x86_cpu_idx86_match_cpu (const struct x86_cpu_id *match)
 
 EXPORT_SYMBOL (x86_match_cpu)
 
ssize_t arch_print_cpu_modalias (struct device *dev, struct device_attribute *attr, char *bufptr)
 
int arch_cpu_uevent (struct device *dev, struct kobj_uevent_env *env)
 

Function Documentation

int arch_cpu_uevent ( struct device dev,
struct kobj_uevent_env env 
)

Definition at line 82 of file match.c.

ssize_t arch_print_cpu_modalias ( struct device dev,
struct device_attribute attr,
char bufptr 
)

Definition at line 51 of file match.c.

EXPORT_SYMBOL ( x86_match_cpu  )
struct x86_cpu_id* x86_match_cpu ( const struct x86_cpu_id match)
read

x86_match_cpu - match current CPU again an array of x86_cpu_ids : 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(x86cpu, ...)

This always matches against the boot cpu, assuming models and features are consistent over all CPUs.

Definition at line 31 of file match.c.