From patchwork Tue Dec 9 16:22:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 419167 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6FC391400D5 for ; Wed, 10 Dec 2014 03:22:53 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 489E51A04F2 for ; Wed, 10 Dec 2014 03:22:53 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e28smtp07.in.ibm.com (e28smtp07.in.ibm.com [122.248.162.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 8B5EB1A04EB for ; Wed, 10 Dec 2014 03:22:48 +1100 (AEDT) Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Dec 2014 21:52:45 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp07.in.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 9 Dec 2014 21:52:43 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 4287F1258044 for ; Tue, 9 Dec 2014 21:53:05 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay04.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sB9GND4t27066404 for ; Tue, 9 Dec 2014 21:53:14 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sB9GMaHv002727 for ; Tue, 9 Dec 2014 21:52:37 +0530 Received: from hegdevasant.in.ibm.com ([9.80.67.90]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sB9GMVr3001984; Tue, 9 Dec 2014 21:52:33 +0530 To: skiboot@lists.ozlabs.org From: Vasant Hegde Date: Tue, 09 Dec 2014 21:52:28 +0530 Message-ID: <20141209162219.27549.61942.stgit@hegdevasant.in.ibm.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14120916-0025-0000-0000-0000024EF2FC Subject: [Skiboot] [PATCH 1/2] FSP/CUPD: Convert printf based log messages into prlog based logs X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This patch changes all printf based log messages in the Code Update code into prlog based log messages with appropriate priority level. Signed-off-by: Vasant Hegde --- hw/fsp/fsp-codeupdate.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/fsp/fsp-codeupdate.c b/hw/fsp/fsp-codeupdate.c index 626b384..4f1a6a5 100644 --- a/hw/fsp/fsp-codeupdate.c +++ b/hw/fsp/fsp-codeupdate.c @@ -121,7 +121,7 @@ static void get_ipl_side(void) iplp = dt_find_by_path(dt_root, "ipl-params/ipl-params"); if (iplp) side = dt_prop_get_def(iplp, "cec-ipl-side", NULL); - printf("CUPD: IPL SIDE = %s\n", side); + prlog(PR_NOTICE, "CUPD: IPL SIDE = %s\n", side); if (!side || !strcmp(side, "temp")) ipl_side = FW_IPL_SIDE_TEMP; @@ -157,8 +157,8 @@ static void got_code_update_policy(uint32_t param_id __unused, int err_len, log_simple_error(&e_info(OPAL_RC_CU_INIT), "CUPD: Error " "retrieving code update policy: %d\n", err_len); } else - printf("CUPD: Code update policy from FSP: %d\n", - update_policy); + prlog(PR_NOTICE, "CUPD: Code update policy from FSP: %d\n", + update_policy); dec_in_flight_param(); } @@ -184,7 +184,8 @@ static void got_platform_hmc_managed(uint32_t param_id __unused, int err_len, log_simple_error(&e_info(OPAL_RC_CU_INIT), "CUPD: Error " "retrieving hmc managed status: %d\n", err_len); } else - printf("CUPD: HMC managed status from FSP: %d\n", hmc_managed); + prlog(PR_NOTICE, "CUPD: HMC managed status from FSP: %d\n", + hmc_managed); dec_in_flight_param(); } @@ -266,8 +267,8 @@ static void parse_marker_lid(uint32_t side) strncpy(fw_vpd[side].MI_keyword, mi_sec->MI_keyword, MI_KEYWORD_SIZE); fw_vpd[side].MI_keyword[MI_KEYWORD_SIZE - 1] = '\0'; - printf("CUPD: %s side MI Keyword = %s\n", - side == 0x00 ? "P" : "T", fw_vpd[side].MI_keyword); + prlog(PR_NOTICE, "CUPD: %s side MI Keyword = %s\n", + side == 0x00 ? "P" : "T", fw_vpd[side].MI_keyword); /* Get ML details */ adf_sec = (void *)header + be32_to_cpu(mi_sec->adf_offset); @@ -279,8 +280,8 @@ static void parse_marker_lid(uint32_t side) (void *)adf_sp + be32_to_cpu(adf_sp->sp_name_offset), ML_KEYWORD_SIZE); fw_vpd[side].ext_fw_id[ML_KEYWORD_SIZE - 1] = '\0'; - printf("CUPD: %s side ML Keyword = %s\n", - side == 0x00 ? "P" : "T", fw_vpd[side].ext_fw_id); + prlog(PR_NOTICE, "CUPD: %s side ML Keyword = %s\n", + side == 0x00 ? "P" : "T", fw_vpd[side].ext_fw_id); } static void validate_com_marker_lid(void) @@ -311,8 +312,9 @@ static void fetch_lid_data_complete(struct fsp_msg *msg) offset = msg->resp->data.words[1]; length = msg->resp->data.words[2]; - printf("CUPD: Marker LID id : size : status = 0x%x : 0x%x : 0x%x\n", - msg->data.words[1], msg->resp->data.words[2], status); + prlog(PR_NOTICE, "CUPD: Marker LID id : size : status = " + "0x%x : 0x%x : 0x%x\n", + msg->data.words[1], msg->resp->data.words[2], status); fsp_freemsg(msg); @@ -439,12 +441,12 @@ void fsp_code_update_wait_vpd(bool is_boot) if (!fsp_present()) return; - printf("CUPD: Waiting read marker LID completion...\n"); + prlog(PR_NOTICE, "CUPD: Waiting read marker LID completion...\n"); while(flash_state == FLASH_STATE_READING) opal_run_pollers(); - printf("CUPD: Waiting in flight params completion...\n"); + prlog(PR_NOTICE, "CUPD: Waiting in flight params completion...\n"); while(in_flight_params) opal_run_pollers(); @@ -1155,15 +1157,15 @@ static bool code_update_notify(uint32_t cmd_sub_mod, struct fsp_msg *msg) switch(cmd_sub_mod) { case FSP_CMD_FLASH_CACHE: cmd = FSP_CMD_FLASH_CACHE_RSP; - printf("CUPD: Update LID cache event [data = 0x%x]\n", - msg->data.words[0]); + prlog(PR_NOTICE, "CUPD: Update LID cache event [data = 0x%x]\n", + msg->data.words[0]); break; case FSP_CMD_FLASH_OUTC: case FSP_CMD_FLASH_OUTR: case FSP_CMD_FLASH_OUTS: cmd = FSP_CMD_FLASH_OUT_RSP; - printf("CUPD: Out of band commit notify [Type = 0x%x]\n", - (msg->word1 >> 8) & 0xff); + prlog(PR_NOTICE, "CUPD: Out of band commit notify " + "[Type = 0x%x]\n", (msg->word1 >> 8) & 0xff); break; default: log_simple_error(&e_info(OPAL_RC_CU_NOTIFY), "CUPD: Unknown "