Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 313758 Details for
Bug 454981
CPUID driver does not support cpuid.4 and cpuid.0xb instruments
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
test patch
RHEL5-cpuid-update.patch (text/plain), 2.44 KB, created by
Brian Maly
on 2008-08-07 22:26:14 UTC
(
hide
)
Description:
test patch
Filename:
MIME Type:
Creator:
Brian Maly
Created:
2008-08-07 22:26:14 UTC
Size:
2.44 KB
patch
obsolete
>--- linux-2.6.18.noarch/arch/i386/kernel/cpuid.c.orig 2008-08-07 14:28:11.000000000 -0400 >+++ linux-2.6.18.noarch/arch/i386/kernel/cpuid.c 2008-08-07 18:15:35.000000000 -0400 >@@ -19,6 +19,10 @@ > * and then read in chunks of 16 bytes. A larger size means multiple > * reads of consecutive levels. > * >+ * The lower 32 bits of the file position is used as the incoming %eax, >+ * and the upper 32 bits of the file position as the incoming %ecx, >+ * the latter intended for "counting" eax levels like eax=4. >+ * > * This driver uses /dev/cpu/%d/cpuid where %d is the minor number, and on > * an SMP box will direct the access to CPU %d. > */ >@@ -46,48 +50,18 @@ > > static struct class *cpuid_class; > >-#ifdef CONFIG_SMP >- >-struct cpuid_command { >- int cpu; >- u32 reg; >- u32 *data; >+struct cpuid_regs { >+ u32 eax, ebx, ecx, edx; > }; > > static void cpuid_smp_cpuid(void *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], >- &cmd->data[3]); >-} >- >-static inline void do_cpuid(int cpu, u32 reg, u32 * data) >-{ >- struct cpuid_command cmd; >+ struct cpuid_regs *cmd = (struct cpuid_regs *)cmd_block; > >- preempt_disable(); >- 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; >- >- smp_call_function(cpuid_smp_cpuid, &cmd, 1, 1); >- } >- preempt_enable(); >-} >-#else /* ! CONFIG_SMP */ >- >-static inline void do_cpuid(int cpu, u32 reg, u32 * data) >-{ >- cpuid(reg, &data[0], &data[1], &data[2], &data[3]); >+ cpuid_count(cmd->eax, cmd->ecx, >+ &cmd->eax, &cmd->ebx, &cmd->ecx, &cmd->edx); > } > >-#endif /* ! CONFIG_SMP */ >- > static loff_t cpuid_seek(struct file *file, loff_t offset, int orig) > { > loff_t ret; >@@ -115,19 +89,21 @@ static ssize_t cpuid_read(struct file *f > size_t count, loff_t * ppos) > { > char __user *tmp = buf; >- u32 data[4]; >- u32 reg = *ppos; >+ struct cpuid_regs cmd; > int cpu = iminor(file->f_dentry->d_inode); >+ u64 pos = *ppos; > > if (count % 16) > return -EINVAL; /* Invalid chunk size */ > > for (; count; count -= 16) { >- do_cpuid(cpu, reg, data); >- if (copy_to_user(tmp, &data, 16)) >+ cmd.eax = pos; >+ cmd.ecx = pos >> 32; >+ smp_call_function_single(cpu, cpuid_smp_cpuid, &cmd, 1, 1); >+ if (copy_to_user(tmp, &cmd, 16)) > return -EFAULT; > tmp += 16; >- *ppos = reg++; >+ *ppos = ++pos; > } > > return tmp - buf;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 454981
:
311558
|
311559
|
313758
|
314897
|
315667
|
315732
|
316164