Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113331
b: refs/heads/master
c: d33dcb9
h: refs/heads/master
i:
  113329: aa22622
  113327: a66d722
v: v3
  • Loading branch information
Peter Oruba authored and Ingo Molnar committed Aug 15, 2008
1 parent 9c4ae30 commit f315b1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34a1b9fc4995102ecbb3a980b348aebf168d8196
refs/heads/master: d33dcb9e7d272cc3171dcc3a21049902185ab03d
24 changes: 13 additions & 11 deletions trunk/arch/x86/kernel/microcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
* in a single CPU package.
* 1.10 28 Feb 2002 Asit K Mallick <asit.k.mallick@intel.com> and
* Tigran Aivazian <tigran@veritas.com>,
* Serialize updates as required on HT processors due to speculative
* nature of implementation.
* Serialize updates as required on HT processors due to
* speculative nature of implementation.
* 1.11 22 Mar 2002 Tigran Aivazian <tigran@veritas.com>
* Fix the panic when writing zero-length microcode chunk.
* 1.12 29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>,
Expand All @@ -71,7 +71,7 @@
* Thanks to Stuart Swales for pointing out this bug.
*/

//#define DEBUG /* pr_debug */
/*#define DEBUG pr_debug */
#include <linux/capability.h>
#include <linux/kernel.h>
#include <linux/init.h>
Expand Down Expand Up @@ -116,7 +116,7 @@ EXPORT_SYMBOL_GPL(user_buffer);
unsigned int user_buffer_size; /* it's size */
EXPORT_SYMBOL_GPL(user_buffer_size);

static int do_microcode_update (void)
static int do_microcode_update(void)
{
long cursor = 0;
int error = 0;
Expand Down Expand Up @@ -158,18 +158,20 @@ static int do_microcode_update (void)
return error;
}

static int microcode_open (struct inode *unused1, struct file *unused2)
static int microcode_open(struct inode *unused1, struct file *unused2)
{
cycle_kernel_lock();
return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
}

static ssize_t microcode_write (struct file *file, const char __user *buf, size_t len, loff_t *ppos)
static ssize_t microcode_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{
ssize_t ret;

if ((len >> PAGE_SHIFT) > num_physpages) {
printk(KERN_ERR "microcode: too much data (max %ld pages)\n", num_physpages);
printk(KERN_ERR "microcode: too much data (max %ld pages)\n",
num_physpages);
return -EINVAL;
}

Expand Down Expand Up @@ -201,7 +203,7 @@ static struct miscdevice microcode_dev = {
.fops = &microcode_fops,
};

static int __init microcode_dev_init (void)
static int __init microcode_dev_init(void)
{
int error;

Expand All @@ -216,15 +218,15 @@ static int __init microcode_dev_init (void)
return 0;
}

static void microcode_dev_exit (void)
static void microcode_dev_exit(void)
{
misc_deregister(&microcode_dev);
}

MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
#else
#define microcode_dev_init() 0
#define microcode_dev_exit() do { } while(0)
#define microcode_dev_exit() do { } while (0)
#endif

/* fake device for request_firmware */
Expand Down Expand Up @@ -451,7 +453,7 @@ int microcode_init(void *opaque, struct module *module)
}
EXPORT_SYMBOL_GPL(microcode_init);

void __exit microcode_exit (void)
void __exit microcode_exit(void)
{
microcode_dev_exit();

Expand Down

0 comments on commit f315b1f

Please sign in to comment.