projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[powerpc.git]
/
arch
/
i386
/
kernel
/
cpuid.c
diff --git
a/arch/i386/kernel/cpuid.c
b/arch/i386/kernel/cpuid.c
index
db6dd20
..
eeae0d9
100644
(file)
--- a/
arch/i386/kernel/cpuid.c
+++ b/
arch/i386/kernel/cpuid.c
@@
-48,7
+48,6
@@
static struct class *cpuid_class;
#ifdef CONFIG_SMP
struct cpuid_command {
#ifdef CONFIG_SMP
struct cpuid_command {
- int cpu;
u32 reg;
u32 *data;
};
u32 reg;
u32 *data;
};
@@
-57,8
+56,7
@@
static void cpuid_smp_cpuid(void *cmd_block)
{
struct cpuid_command *cmd = (struct cpuid_command *)cmd_block;
{
struct cpuid_command *cmd = (struct cpuid_command *)cmd_block;
- if (cmd->cpu == smp_processor_id())
- cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
+ cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
&cmd->data[3]);
}
&cmd->data[3]);
}
@@
-70,11
+68,10
@@
static inline void do_cpuid(int cpu, u32 reg, u32 * data)
if (cpu == smp_processor_id()) {
cpuid(reg, &data[0], &data[1], &data[2], &data[3]);
} else {
if (cpu == smp_processor_id()) {
cpuid(reg, &data[0], &data[1], &data[2], &data[3]);
} else {
- cmd.cpu = cpu;
cmd.reg = reg;
cmd.data = data;
cmd.reg = reg;
cmd.data = data;
- smp_call_function
(
cpuid_smp_cpuid, &cmd, 1, 1);
+ smp_call_function
_single(cpu,
cpuid_smp_cpuid, &cmd, 1, 1);
}
preempt_enable();
}
}
preempt_enable();
}
@@
-116,7
+113,7
@@
static ssize_t cpuid_read(struct file *file, char __user *buf,
char __user *tmp = buf;
u32 data[4];
u32 reg = *ppos;
char __user *tmp = buf;
u32 data[4];
u32 reg = *ppos;
- int cpu = iminor(file->f_dentry->d_inode);
+ int cpu = iminor(file->f_
path.
dentry->d_inode);
if (count % 16)
return -EINVAL; /* Invalid chunk size */
if (count % 16)
return -EINVAL; /* Invalid chunk size */
@@
-134,7
+131,7
@@
static ssize_t cpuid_read(struct file *file, char __user *buf,
static int cpuid_open(struct inode *inode, struct file *file)
{
static int cpuid_open(struct inode *inode, struct file *file)
{
- unsigned int cpu = iminor(file->f_dentry->d_inode);
+ unsigned int cpu = iminor(file->f_
path.
dentry->d_inode);
struct cpuinfo_x86 *c = &(cpu_data)[cpu];
if (cpu >= NR_CPUS || !cpu_online(cpu))
struct cpuinfo_x86 *c = &(cpu_data)[cpu];
if (cpu >= NR_CPUS || !cpu_online(cpu))
@@
-148,7
+145,7
@@
static int cpuid_open(struct inode *inode, struct file *file)
/*
* File operations we support
*/
/*
* File operations we support
*/
-static struct file_operations cpuid_fops = {
+static
const
struct file_operations cpuid_fops = {
.owner = THIS_MODULE,
.llseek = cpuid_seek,
.read = cpuid_read,
.owner = THIS_MODULE,
.llseek = cpuid_seek,
.read = cpuid_read,