Received: by 10.223.185.116 with SMTP id b49csp511714wrg; Tue, 20 Feb 2018 03:17:47 -0800 (PST) X-Google-Smtp-Source: AH8x224KXUZG+/QiHcDyULNnY3pdarMEFvll7TZUxYsEMTWh3nTUrk59A7mRp9BKvTcl/su/t1YV X-Received: by 2002:a17:902:a585:: with SMTP id az5-v6mr17320384plb.167.1519125467283; Tue, 20 Feb 2018 03:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519125467; cv=none; d=google.com; s=arc-20160816; b=iJtSmyt1w5QNdqi6/wxQJdCdY5Vmc9taf788NEoLe6f6NG1RUjzxl5r3QrzYtjq20O gWdd89Ga94skxHM2RC5gQBBdmuGvtLuwAc8y9Frm/4GN6Xzzc7Bs8YP6ZG0QFo8kvwHq j98wMicBw/sker1XKveAkxaCCW7vnbQ5N9OUSKIuz+0wjWuV3bcrOGjcoQj15KqNUnqS DNP+Wt6rHTcFWjEW5VZi8VM0Y4EA/Nkgg01FjAL7p+Ls14j1zNzKtBVDfzA7dgXOeFPa 73Yj33NmUrCugZiwSsvnD4ZvArEHcgSiaEi2EThjZQidwEdUCBcR46DqZbXzb1KVMHAD bEbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=7rSP4DhJsA0dTruGuL3VVFj1AJ6DARZLwDi221NSYTQ=; b=mB/+VrLWIK5MgvyXXQT9FKihYvKdBUBhYozt81Pot7rYSmUKcLpGdS2FPkHHRHKT7h O1Z/ywEASp61IbS+9CC5G7qrvbOhTOO29JDJfg+R2cxHjn8Xityh8AasU/2oWzbClYR4 KCZ17UwcbHvTBJn9FMyRtraK9b3GISNhyTuX2p3xVQ5h2+aTcZn653VmCSVQ/p5cRl8p JrEuZ3U7ZPpEZOOJzWQuweXQqvwqFdsfThtZ0gzMkPf8JpkQaxE+ipT/F+vfdz/GD28A n83o9E6xeydLDgW5n9LNTG8matJGW8mzbzrKUhwRSIHzsaLOJvgK4Kv4oFMEPr2KPGGL 2jEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=SX/RmlQU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si10482296pgs.259.2018.02.20.03.17.32; Tue, 20 Feb 2018 03:17:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=SX/RmlQU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751709AbeBTLQ2 (ORCPT + 99 others); Tue, 20 Feb 2018 06:16:28 -0500 Received: from mail-bl2nam02on0075.outbound.protection.outlook.com ([104.47.38.75]:31776 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751509AbeBTLQZ (ORCPT ); Tue, 20 Feb 2018 06:16:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=7rSP4DhJsA0dTruGuL3VVFj1AJ6DARZLwDi221NSYTQ=; b=SX/RmlQUuj87Q7jeNKIdWkQW6WXFks+/00Z5mPXzzXnPsHUD16qmjx3pO6KXtOhrxG9Ze8t37uA4tsXokmYvOXWklEffa6VTuVck/gn+BeorHma/l0T0snBNyL3JdKqqHtigsh43a1d5MrdpG/taDNTdWwIilViZkKZo5Vyzg0c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=George.Cherian@cavium.com; Received: from ubuntu.caveonetworks.com (111.93.218.67) by CY1PR07MB2331.namprd07.prod.outlook.com (10.166.194.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Tue, 20 Feb 2018 11:16:20 +0000 From: George Cherian To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rjw@rjwysocki.net, lenb@kernel.org, George Cherian Subject: [PATCH] ACPI / CPPC: Update all pr_(debug/err) messages to log the susbspace id Date: Tue, 20 Feb 2018 11:16:03 +0000 Message-Id: <1519125363-23907-1-git-send-email-george.cherian@cavium.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR0101CA0032.INDPRD01.PROD.OUTLOOK.COM (10.174.221.18) To CY1PR07MB2331.namprd07.prod.outlook.com (10.166.194.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0dd4fab-97e0-40d3-01af-08d578535fa3 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:CY1PR07MB2331; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2331;3:nZvMrNJfTo+yQWGjxAnf/kXT+BeozBQk3rjSm28IjJx8evEUSsTqnaP1AzG32dXXU4U7iv/gvP8y2Tw/3bPrqYQGtPvadJaOL5YXg/+OCe4dnpkMyn46ktIV7Tm8UoZkCDfnOzVgEnacqvsb5XhU5Z+QJNhCqwK5Ty43JRNairuTHVnmXQNBB8qoS3bFLT5yg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WbYiUkJ43wnGkj30gA1etQDQGjUehXZIpwtjVJ89fcOlBL3V+E3bK7ZAhgkr8O/85kz//h38xe711sNyBBjlEX7pje3ZkCoHHuo2ccYvYx4ZbigssfzcVhrRDQ21Nt7sf+5A53MgjtFeRZ0nTaC/CWT2SW;4:Ur+wo6IRL474RLDhYmCKgbM2weLIKLmn0+WmJau2bt5rjMuMJRixJ7h/wYV2ApeiYVKpGWAuNrr0Lmm1SNF7zL2fdq8Y8DveM30uiTNoxhqqJl+9jxq+FnWW218Cd2z/8Hmw8UW6M+uiwYDR7+xM0HSbQnwjfjavm+UtZ1Il2lx49FE/npnnHveL8VUHC9OHofbfIcRP7buEvEOF6cw1P6JPCrjGDbMzdNHqLzUKKdYLaMSAoyrV0nRIYrlIae9nzXlsY0MhYcLUz4gTO07LwQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231101)(944501161)(6041288)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011);SRVR:CY1PR07MB2331;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB2331; X-Forefront-PRVS: 05891FB07F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(376002)(39380400002)(366004)(396003)(39850400004)(346002)(189003)(199004)(81166006)(51416003)(81156014)(3846002)(66066001)(59450400001)(5660300001)(8676002)(48376002)(4326008)(50466002)(47776003)(7736002)(68736007)(86362001)(50226002)(53416004)(6512007)(5009440100003)(15650500001)(6506007)(16586007)(106356001)(16526019)(72206003)(478600001)(6486002)(105586002)(107886003)(6116002)(2906002)(316002)(186003)(25786009)(52116002)(6666003)(8936002)(97736004)(386003)(69596002)(305945005)(53936002)(1857600001)(26005)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2331;H:ubuntu.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2331;23:6yuJ+KVAKgHD4enSDCFYtdhDMdNOVOGpGMFrjqkTo?= =?us-ascii?Q?DhFDfng/+705p2mlug5I7AmhuYyc6bIxvR+Un+pQS5G9MXoo6v6TRxmk/4Zw?= =?us-ascii?Q?9+jzHhUJaYokVzHP7oY5YYVu0AnKXZY1poA3hwT/czRzeAWHEk5mWTS7C6Uz?= =?us-ascii?Q?3Qdpciz3DGhqzrqTC8NIjbPQzm+DtuDP3dkr0j4Mh9vfHjjn4CxJtRcLTQEU?= =?us-ascii?Q?VFoBpT39KvNldk4fn4wNG+qIJTSG+wbqywslONuVf3aMp09BjajvO6f+u6nY?= =?us-ascii?Q?7U3MHtyxMQfVRzBxQTnJTllVWiVbq+41nTnQ5PbJLfxkcdvrNg8QaOUO1Vfz?= =?us-ascii?Q?3SjNYd3Up0n69boQat17znqcCb5jo2eqlYGGmnnHubqMSc+Bb2OeoEy0AYB+?= =?us-ascii?Q?nBCJNjne+X1HlI+U5sDhJ46E7wOaCBIkayYJ0Yytihooxm7HJixxS4V6XyX3?= =?us-ascii?Q?avac+dlXmP1BQFdBJ3e1/R5ITGLt4JV7c+dEADnp5t7VjzSHHFVxwTwH7AR8?= =?us-ascii?Q?Xm1+pI/3InyFFg1OSVhv10E/lby1gS51G3+d29IPeaZ8plozsLrmj/nmBrNl?= =?us-ascii?Q?iuLnNRwgWIeuf9Nltt5lujW75Su96KqzC2FTBhtOEOxJR3ZU5hzpc3TIjcf6?= =?us-ascii?Q?Zpfydv+uNGD2wNfZDdBKn0chfAXQNo+1VNy/fMrS9pawCOAF1xikaQEuq/yz?= =?us-ascii?Q?ynHBcWEbci76vAv6B/PsQzxGI6N73FwrznOA6gyBo0bqOwSteIMhG2J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kcP7XgiK3tCSUeU0tPhcEWza1BgAgcvDJPXP1FqS0hjNZW3eGjCBOGuY37VBaAWf5ORotEudC3tBP5ma2NJnb/4LC0PWQ1JDKlxj8OVSy4=;24:D9xmFINEtjXYQzvPtGRsdJTr+akARlyRpWozX5hWlDN6U6rSqRRJq5ogGjOUxA4HQNgn4Lj6bm7KaaJAU1g4e0yPzzvvzwPwYspjdrb1SLI=;7:TqMpbUtfLp80zxEmrdfG/iOgV/I0ZoLNc/071R+aXTea1kZIh0jbSHixo7XQBWDr05pOLIEFeBO1YIDV4CUM8mIwuSUbB0Sh7e2HRPe6L9ImeIfT1ByO8FG/8Ku5fP8mMuUHk5x/rGVrq1jGdPQDPXjQsjD7hex5t+zDGLpI721gPJhn9crWKptMAcg6Anmoc4e0oGfuHm+juuwEBORJE/Qv7UPKvgyu//YgJR/biD4Ywf3uJrOHoCJc4iR0rnbY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2018 11:16:20.6179 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0dd4fab-97e0-40d3-01af-08d578535fa3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2331 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CPPC dirver is aware of multiple PCC subspace IDs. Enhance the debug and error messages in the driver to print the subspace id. In case of error it will be helpful to find which particular subspace is failing. Signed-off-by: George Cherian --- drivers/acpi/cppc_acpi.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 06ea474..a4133d7 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -227,7 +227,8 @@ static int check_pcc_chan(int pcc_ss_id, bool chk_err_bit) if (likely(!ret)) pcc_ss_data->platform_owns_pcc = false; else - pr_err("PCC check channel failed. Status=%x\n", status); + pr_err("PCC check channel failed for ss: %d. Status=%x\n", + pcc_ss_id, status); return ret; } @@ -291,7 +292,8 @@ static int send_pcc_cmd(int pcc_ss_id, u16 cmd) time_delta = ktime_ms_delta(ktime_get(), pcc_ss_data->last_mpar_reset); if ((time_delta < 60 * MSEC_PER_SEC) && pcc_ss_data->last_mpar_reset) { - pr_debug("PCC cmd not sent due to MPAR limit"); + pr_debug("PCC cmd for subspace %d not sent due to MPAR limit", + pcc_ss_id); ret = -EIO; goto end; } @@ -312,8 +314,8 @@ static int send_pcc_cmd(int pcc_ss_id, u16 cmd) /* Ring doorbell */ ret = mbox_send_message(pcc_ss_data->pcc_channel, &cmd); if (ret < 0) { - pr_err("Err sending PCC mbox message. cmd:%d, ret:%d\n", - cmd, ret); + pr_err("Err sending PCC mbox message. ss: %d cmd:%d, ret:%d\n", + pcc_ss_id, cmd, ret); goto end; } @@ -553,7 +555,8 @@ static int register_pcc_channel(int pcc_ss_idx) pcc_mbox_request_channel(&cppc_mbox_cl, pcc_ss_idx); if (IS_ERR(pcc_data[pcc_ss_idx]->pcc_channel)) { - pr_err("Failed to find PCC communication channel\n"); + pr_err("Failed to find PCC channel for subspace %d\n", + pcc_ss_idx); return -ENODEV; } @@ -566,7 +569,8 @@ static int register_pcc_channel(int pcc_ss_idx) cppc_ss = (pcc_data[pcc_ss_idx]->pcc_channel)->con_priv; if (!cppc_ss) { - pr_err("No PCC subspace found for CPPC\n"); + pr_err("No PCC subspace found for %d CPPC\n", + pcc_ss_idx); return -ENODEV; } @@ -584,7 +588,8 @@ static int register_pcc_channel(int pcc_ss_idx) pcc_data[pcc_ss_idx]->pcc_comm_addr = acpi_os_ioremap(cppc_ss->base_address, cppc_ss->length); if (!pcc_data[pcc_ss_idx]->pcc_comm_addr) { - pr_err("Failed to ioremap PCC comm region mem\n"); + pr_err("Failed to ioremap PCC comm region mem for %d\n", + pcc_ss_idx); return -ENOMEM; } @@ -973,8 +978,8 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) *val = readq_relaxed(vaddr); break; default: - pr_debug("Error: Cannot read %u bit width from PCC\n", - reg->bit_width); + pr_debug("Error: Cannot read %u bit width from PCC for ss: %d\n", + reg->bit_width, pcc_ss_id); ret_val = -EFAULT; } @@ -1012,8 +1017,8 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val) writeq_relaxed(val, vaddr); break; default: - pr_debug("Error: Cannot write %u bit width to PCC\n", - reg->bit_width); + pr_debug("Error: Cannot write %u bit width to PCC for ss: %d\n", + reg->bit_width, pcc_ss_id); ret_val = -EFAULT; break; } -- 2.1.4