From patchwork Fri Mar 9 09:50:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 131093 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp781051lja; Fri, 9 Mar 2018 01:50:55 -0800 (PST) X-Google-Smtp-Source: AG47ELtgVLFj2nIfjIXM8pBMmdsOR+EReEalELm08HRHwAw3kk8ZA3TKCiMTVZz7ApESAc7vJDcB X-Received: by 10.98.236.82 with SMTP id k79mr29778098pfh.119.1520589055249; Fri, 09 Mar 2018 01:50:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520589055; cv=none; d=google.com; s=arc-20160816; b=gCZSQ2EZ0hYMIUrd3dSV6NfmppMzhMXLvWh6lO9+5klUSTjaIW5uez/WDmb0WvEKCS PHuw54KfTC/iqCJiGxYr3ycA/m/khSG75j7IRKiH0q97yTtImaf74H2FfkOwIyKHGsk7 b/IjmDP3HprD4CyVzzXGGI7RYPRMOlQKxyBLEcCafls/Icl4C36MtGWujpwV3j5122j2 QbYICgfsYtg5HFLYZXe3gglCNSKCh9wnJsxjBmOMnTTxBud0yeAQ2Hp9Lw9Ns+A+VAk8 7vpeMVNeCG9m7Q0M3pPTC9DW6vqR8j7r6T9UMlqGcDvhMmIoVOvqhDoBkuE7TPO7Toj1 82og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature:arc-authentication-results; bh=tUujjLCIB6vgCrH1xGBVUPS0mtN1xSpX+FP1XSoJNzU=; b=FqqTvrYuZBsKaKG7dIjOhIMsHBRWrY/U1Lbv8OCS2ObCSnbgGh8R3B+LPEhc3nC+3q D+x5VHqsGgpBJIkaNZht2yQuCQE0MfhkGkqgoAS+Z3Q9NeQB4wNi0Vmxa6EG+GFK78bs 4c6ALj/fvH3+73tnsxNWVckKh1lZmNJBWJOGz9kfEgo8SJ6FGwXovHyotmQ0n/p/uu40 900GDKigSeDBLQoPUK5DWEV63+RvL5aqmUv99Afk2kihuey5jzPIFfsdppXIjjSri4BG K76UYmIrROeWUeexJNj4J14ZXyy3tkQMu4tj/rdyhYe5ySesKGiqxHWfF7TkdhRSEgBE r1Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=xy0jwAgH; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13si605746pfk.26.2018.03.09.01.50.55; Fri, 09 Mar 2018 01:50:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=xy0jwAgH; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751121AbeCIJux (ORCPT + 5 others); Fri, 9 Mar 2018 04:50:53 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:34071 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbeCIJux (ORCPT ); Fri, 9 Mar 2018 04:50:53 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w299oWoS028432; Fri, 9 Mar 2018 03:50:32 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1520589032; bh=Fkg+bOIDBntzXzkiRcZqWFfQShGkxsx22rd3h8idWi8=; h=From:To:CC:Subject:Date; b=xy0jwAgHrDdOWNlvzguo0Wl+0hNQrWZakr8kuMGXAVyoSDU4rvALl2PNla8j7MMOo tDC+ELCi6pKiaKjmKt4GRMLlwLPFTPZ5zuZOJIrBmSjBhB6z1SY4fRMgfP78vOxq1c JB7atk/VmMrvkDwaSgpR7LRanDWGNyIuOEo5jUUU= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w299oWVK022555; Fri, 9 Mar 2018 03:50:32 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 9 Mar 2018 03:50:31 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 9 Mar 2018 03:50:31 -0600 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w299oTep021607; Fri, 9 Mar 2018 03:50:30 -0600 From: Tero Kristo To: , CC: Subject: [PATCH] ARM: OMAP2+: powerdomain: use raw_smp_processor_id() for trace Date: Fri, 9 Mar 2018 11:50:20 +0200 Message-ID: <1520589020-14018-1-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org smp_processor_id() checks preemption if CONFIG_DEBUG_PREEMPT is enabled, causing a warning dump during boot: [ 5.042377] BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 [ 5.050281] caller is pwrdm_set_next_pwrst+0x48/0x88 [ 5.055330] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.24-g57341df0b4 #1 Use the raw_smp_processor_id() for the trace instead, this value does not need to be perfectly correct. The alternative of disabling preempt is too heavy weight operation to be applied in PM hot path for just tracing purposes. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/powerdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 76eb6ec..1e6a967 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -188,7 +188,7 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) ((prev & OMAP_POWERSTATE_MASK) << 0)); trace_power_domain_target_rcuidle(pwrdm->name, trace_state, - smp_processor_id()); + raw_smp_processor_id()); } break; default: @@ -518,7 +518,7 @@ int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) { /* Trace the pwrdm desired target state */ trace_power_domain_target_rcuidle(pwrdm->name, pwrst, - smp_processor_id()); + raw_smp_processor_id()); /* Program the pwrdm desired target state */ ret = arch_pwrdm->pwrdm_set_next_pwrst(pwrdm, pwrst); }