linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TRIVIAL PATCH] Microcode: show results on success too
@ 2008-03-27 19:52 Ben Castricum
  2008-03-28  8:59 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Castricum @ 2008-03-27 19:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial


Report when microcode was successfully updated. It used to be there but 
now with DEBUG unset it becomes very silent. Also some cosmetic fixes.

Signed-off-by: Ben Castricum <lk08@bencastricum.nl>

---

This is take 2 of the patch. Thanks for the feedback on the first one. It 
is now sent with a decent mailer. It is also a bit larger since I made the 
debug message more consistent.

Does anyone know if there are still plans on using the firmware loader for 
this? Last thing I could dig up on this subject is that we are waiting for 
some program to split up the large microcode.dat file into the ucode 
files.


diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index f2702d0..25cf6de 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -290,7 +290,7 @@ static int get_maching_microcode(void *m
 	}
 	return 0;
 find:
-	pr_debug("microcode: CPU %d found a matching microcode update with"
+	pr_debug("microcode: CPU%d found a matching microcode update with"
 		" version 0x%x (current=0x%x)\n", cpu, mc_header->rev,uci->rev);
 	new_mc = vmalloc(total_size);
 	if (!new_mc) {
@@ -336,11 +336,11 @@ static void apply_microcode(int cpu)
 
 	spin_unlock_irqrestore(&microcode_update_lock, flags);
 	if (val[1] != uci->mc->hdr.rev) {
-		printk(KERN_ERR "microcode: CPU%d updated from revision "
+		printk(KERN_ERR "microcode: CPU%d update from revision "
 			"0x%x to 0x%x failed\n", cpu_num, uci->rev, val[1]);
 		return;
 	}
-	pr_debug("microcode: CPU%d updated from revision "
+	printk(KERN_INFO "microcode: CPU%d updated from revision "
 	       "0x%x to 0x%x, date = %08x \n", 
 	       cpu_num, uci->rev, val[1], uci->mc->hdr.date);
 	uci->rev = val[1];
@@ -534,7 +534,7 @@ static int cpu_request_microcode(int cpu
 		c->x86, c->x86_model, c->x86_mask);
 	error = request_firmware(&firmware, name, &microcode_pdev->dev);
 	if (error) {
-		pr_debug("ucode data file %s load failed\n", name);
+		pr_debug("microcode: ucode data file %s load failed\n", name);
 		return error;
 	}
 	buf = firmware->data;
@@ -709,7 +709,7 @@ static int __mc_sysdev_add(struct sys_de
 	if (!cpu_online(cpu))
 		return 0;
 
-	pr_debug("Microcode:CPU %d added\n", cpu);
+	pr_debug("microcode: CPU%d added\n", cpu);
 	memset(uci, 0, sizeof(*uci));
 
 	err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group);
@@ -733,7 +733,7 @@ static int mc_sysdev_remove(struct sys_d
 	if (!cpu_online(cpu))
 		return 0;
 
-	pr_debug("Microcode:CPU %d removed\n", cpu);
+	pr_debug("microcode: CPU%d removed\n", cpu);
 	microcode_fini_cpu(cpu);
 	sysfs_remove_group(&sys_dev->kobj, &mc_attr_group);
 	return 0;
@@ -745,7 +745,7 @@ static int mc_sysdev_resume(struct sys_d
 
 	if (!cpu_online(cpu))
 		return 0;
-	pr_debug("Microcode:CPU %d resumed\n", cpu);
+	pr_debug("microcode: CPU%d resumed\n", cpu);
 	/* only CPU 0 will apply ucode here */
 	apply_microcode(0);
 	return 0;
@@ -783,7 +783,7 @@ mc_cpu_callback(struct notifier_block *n
 		}
 	case CPU_DOWN_FAILED_FROZEN:
 		if (sysfs_create_group(&sys_dev->kobj, &mc_attr_group))
-			printk(KERN_ERR "Microcode: Failed to create the sysfs "
+			printk(KERN_ERR "microcode: Failed to create the sysfs "
 				"group for CPU%d\n", cpu);
 		break;
 	case CPU_DOWN_PREPARE:

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [TRIVIAL PATCH] Microcode: show results on success too
  2008-03-27 19:52 [TRIVIAL PATCH] Microcode: show results on success too Ben Castricum
@ 2008-03-28  8:59 ` Ingo Molnar
  2008-03-31 11:48   ` Giacomo A. Catenazzi
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-03-28  8:59 UTC (permalink / raw)
  To: Ben Castricum; +Cc: linux-kernel, trivial


* Ben Castricum <lk08@bencastricum.nl> wrote:

> Report when microcode was successfully updated. It used to be there 
> but now with DEBUG unset it becomes very silent. Also some cosmetic 
> fixes.

thanks Ben, applied.

> This is take 2 of the patch. Thanks for the feedback on the first one. 
> It is now sent with a decent mailer. It is also a bit larger since I 
> made the debug message more consistent.

looks good. A tiny detail for future patches, please prefix x86 patches 
with "x86: " and make it lowercase, i.e. use:

 Subject: [patch] x86: microcode: show results on success too

instead of:

 Subject: [TRIVIAL PATCH] Microcode: show results on success too

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [TRIVIAL PATCH] Microcode: show results on success too
  2008-03-28  8:59 ` Ingo Molnar
@ 2008-03-31 11:48   ` Giacomo A. Catenazzi
  0 siblings, 0 replies; 3+ messages in thread
From: Giacomo A. Catenazzi @ 2008-03-31 11:48 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Ben Castricum, linux-kernel, trivial

Ingo Molnar wrote:
> * Ben Castricum <lk08@bencastricum.nl> wrote:
> 
>> Report when microcode was successfully updated. It used to be there 
>> but now with DEBUG unset it becomes very silent. Also some cosmetic 
>> fixes.
> 
> thanks Ben, applied.

I think this part of the patch is not so good:
-	pr_debug("ucode data file %s load failed\n", name);
+	pr_debug("microcode: ucode data file %s load failed\n", name);

ucode is a short way for microcode, so you should remove "ucode" in
the new version

ciao
	cate

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-31 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-27 19:52 [TRIVIAL PATCH] Microcode: show results on success too Ben Castricum
2008-03-28  8:59 ` Ingo Molnar
2008-03-31 11:48   ` Giacomo A. Catenazzi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).