Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2691749ybk; Tue, 12 May 2020 05:56:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrHWLTZNQps1uU0MDAqKKoWx9DaJIO+XXOa2E/5xSXTNQgYtQIMTdEeCx+NDbnBZbdBtUR X-Received: by 2002:a05:6402:c0e:: with SMTP id co14mr6577906edb.177.1589288211078; Tue, 12 May 2020 05:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589288211; cv=none; d=google.com; s=arc-20160816; b=djuGl6ycw5/TGQ1N7VpxOTK1wIb9meGKJSsooJBcnQ0w56nLXvLIRjAVdJ/6CA0Mxx TjG309DoGo91XHvwuszTCX11tA6GMUvbgvt4dNaUredG2ZPVqhef6R43/TvtR7IW1vDL 2n5dgAzVIYInIvMl6Iy8NJpjS3TD4fHcS/nbunMsVvCCR0opXcyvPQGueoPDCl1CTceP /cbFxuY2dZM8HbM0U2UZNJy/tHkjtE1kV+P/+xXhvv9kQQiXpqmaH+qc99T3iATXWmrY kOqD+f0FX4x41T9auJnQ1RsV+1VCMejhZ95qhUjrjfEBznEVxiquER7k3eiITglAg8ce xE2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=gCIJ6Bgq2kgK69n1WldE7hShnUHz4owjVkOTU8yEj5E=; b=oFgsg6GF+DwkmxbYB2bJ/EqKLZpAVyO6fe9vyy0ta+C5HRUdLhkH0ar904+ZpolRoK Nr86b05dilustJ91gqVNnjjgu3nh048opyGdmyIqBMMIyM0eqV6EI6Nz1xtHcUtWPhI+ 6DafxhbFCVQ7NwsRo2D0tCy/LW4KOVmFoyHWRk85MvS/YPmQkLO+XTpyRbwTVPewDLx8 IEdV2Md8hjKHFkVmXkMM/MulCbi9Cf/esQYkpsYHEJo4rALt7hbBqOy6gCIE2JeYKOVU ngwZWbhKt8KgKg0/Psh9zalxrYrsHP7IWdRo9ntB3vLoWohmOkCbd7Uc+gMuGMLFVt6t LuFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz16si3606326ejb.384.2020.05.12.05.56.26; Tue, 12 May 2020 05:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729586AbgELMxC (ORCPT + 99 others); Tue, 12 May 2020 08:53:02 -0400 Received: from foss.arm.com ([217.140.110.172]:54472 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727859AbgELMxC (ORCPT ); Tue, 12 May 2020 08:53:02 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0BFDB30E; Tue, 12 May 2020 05:53:02 -0700 (PDT) Received: from [10.37.12.83] (unknown [10.37.12.83]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E02C73F71E; Tue, 12 May 2020 05:52:59 -0700 (PDT) Subject: Re: [PATCH v3] memory/samsung: reduce protected code area in IRQ To: Bernard Zhao , Kukjin Kim , Krzysztof Kozlowski , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com References: <20200512123149.40162-1-bernard@vivo.com> From: Lukasz Luba Message-ID: <99adbca2-7f8f-b255-8538-8819f83d1991@arm.com> Date: Tue, 12 May 2020 13:52:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200512123149.40162-1-bernard@vivo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/12/20 1:31 PM, Bernard Zhao wrote: > This change will speed-up a bit this IRQ processing and there > is no need to protect return value or printing. > > Signed-off-by: Bernard Zhao LGTM Acked-by: Lukasz Luba > --- > Changes since v1: > *change release lock before the if statement. > *revert dmc->df->lock mutex lock to protect function > exynos5_dmc_perf_events_check > > Changes since v2: > *Improve subject and commit message > > Link for V1: > *https://lore.kernel.org/patchwork/patch/1238888/ > --- > drivers/memory/samsung/exynos5422-dmc.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c > index 22a43d662833..25196d6268e2 100644 > --- a/drivers/memory/samsung/exynos5422-dmc.c > +++ b/drivers/memory/samsung/exynos5422-dmc.c > @@ -1346,15 +1346,13 @@ static irqreturn_t dmc_irq_thread(int irq, void *priv) > struct exynos5_dmc *dmc = priv; > > mutex_lock(&dmc->df->lock); > - > exynos5_dmc_perf_events_check(dmc); > - > res = update_devfreq(dmc->df); > + mutex_unlock(&dmc->df->lock); > + > if (res) > dev_warn(dmc->dev, "devfreq failed with %d\n", res); > > - mutex_unlock(&dmc->df->lock); > - > return IRQ_HANDLED; > } > >