diff mbox

[v2] cpu: microcode: remove failures when kernel does not have newer version (LP: #1322534)

Message ID 1403031893-29436-1-git-send-email-alex.hung@canonical.com
State Accepted
Headers show

Commit Message

Alex Hung June 17, 2014, 7:04 p.m. UTC
New systems usually have new microcode than kernel does, and
therefore reporting failures is not correct. This patch changes
it to report skipped when kernel does not have microcode updates.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/cpu/microcode/microcode.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Colin Ian King June 18, 2014, 7:10 a.m. UTC | #1
On 17/06/14 20:04, Alex Hung wrote:
> New systems usually have new microcode than kernel does, and
> therefore reporting failures is not correct. This patch changes
> it to report skipped when kernel does not have microcode updates.
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/cpu/microcode/microcode.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/src/cpu/microcode/microcode.c b/src/cpu/microcode/microcode.c
> index 016b938..4434275 100644
> --- a/src/cpu/microcode/microcode.c
> +++ b/src/cpu/microcode/microcode.c
> @@ -230,13 +230,10 @@ static int microcode_test1(fwts_framework *fw)
>  				}
>  
>  				/*
> -				 * We found the old revision but not a
> -				 * new revsion, failed
> +				 * Kernel does not have newer version than BIOS
>  				 */
>  				if (info->new_revision == UNKNOWN) {
> -					failed++;
> -					fwts_failed(fw, LOG_LEVEL_MEDIUM, "MicrocodeNotUpdated",
> -						"The kernel did not report that CPU %d has had a microcode update. "
> +					fwts_log_info(fw, "The kernel did not report that CPU %d has had a microcode update. "
>  						"The current firmware is revision 0x%x and probably has not been updated.",
>  						cpu, info->old_revision);
>  					continue;
> 

Tested this out and it looks good to me

Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu July 14, 2014, 7:26 a.m. UTC | #2
On 06/18/2014 03:04 AM, Alex Hung wrote:
> New systems usually have new microcode than kernel does, and
> therefore reporting failures is not correct. This patch changes
> it to report skipped when kernel does not have microcode updates.
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>   src/cpu/microcode/microcode.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/src/cpu/microcode/microcode.c b/src/cpu/microcode/microcode.c
> index 016b938..4434275 100644
> --- a/src/cpu/microcode/microcode.c
> +++ b/src/cpu/microcode/microcode.c
> @@ -230,13 +230,10 @@ static int microcode_test1(fwts_framework *fw)
>   				}
>
>   				/*
> -				 * We found the old revision but not a
> -				 * new revsion, failed
> +				 * Kernel does not have newer version than BIOS
>   				 */
>   				if (info->new_revision == UNKNOWN) {
> -					failed++;
> -					fwts_failed(fw, LOG_LEVEL_MEDIUM, "MicrocodeNotUpdated",
> -						"The kernel did not report that CPU %d has had a microcode update. "
> +					fwts_log_info(fw, "The kernel did not report that CPU %d has had a microcode update. "
>   						"The current firmware is revision 0x%x and probably has not been updated.",
>   						cpu, info->old_revision);
>   					continue;
>


Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/cpu/microcode/microcode.c b/src/cpu/microcode/microcode.c
index 016b938..4434275 100644
--- a/src/cpu/microcode/microcode.c
+++ b/src/cpu/microcode/microcode.c
@@ -230,13 +230,10 @@  static int microcode_test1(fwts_framework *fw)
 				}
 
 				/*
-				 * We found the old revision but not a
-				 * new revsion, failed
+				 * Kernel does not have newer version than BIOS
 				 */
 				if (info->new_revision == UNKNOWN) {
-					failed++;
-					fwts_failed(fw, LOG_LEVEL_MEDIUM, "MicrocodeNotUpdated",
-						"The kernel did not report that CPU %d has had a microcode update. "
+					fwts_log_info(fw, "The kernel did not report that CPU %d has had a microcode update. "
 						"The current firmware is revision 0x%x and probably has not been updated.",
 						cpu, info->old_revision);
 					continue;