From patchwork Thu Jul 9 05:45:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 11653371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85F7C6C1 for ; Thu, 9 Jul 2020 05:35:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52B4020657 for ; Thu, 9 Jul 2020 05:35:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="2qiyCziW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="UuNw6Z9G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52B4020657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d4ju9zl7B4EJ//SHcIG5p0lvRNxPEwJQWv/J5ezWwAQ=; b=2qiyCziWWR+B7QKvuEaSCdnOn3 d1IxKYQNGQJljnDQww5eiIkveVJhLbSSBbQK5nZSgAWmLwD++2sIW3cbQB3lFe7o/BX1u6kEjUeNx 8AYypAp+SbjqGRtkMOvWEWE7p3ki6TBqgDA6jDiRWdU+8CRuIuIITwsWmKWAFR/Ca+mDSTiQFrVS3 +7XxK9yfsi6ZrgKuSeJxOMkdfSHXvvSJgoRQNljQ0qO/pKfW0QxiS2+uHGMAbGY46PFvE33IvazEs bAPQfOm1zAivxQIZ3Nb7AHlTWW9zyQ+suRmrQP3oArRUkXu4t7v3ddX69o5wz7KddUhxISHXhUbjo iVTafHJQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtPBv-0002Lw-VS; Thu, 09 Jul 2020 05:33:52 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtPBq-0002KQ-OI for linux-arm-kernel@lists.infradead.org; Thu, 09 Jul 2020 05:33:48 +0000 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200709053343epoutp048306c1a9e6acdf28291e511cfffccd0a~f-q_zgbLV1190911909epoutp04o for ; Thu, 9 Jul 2020 05:33:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200709053343epoutp048306c1a9e6acdf28291e511cfffccd0a~f-q_zgbLV1190911909epoutp04o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594272823; bh=jVppEfmh9bYYsHLPFi/M8mOz2+V2BZCTAqg58JtkmqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UuNw6Z9GfA7RyVzoSo5K1htSDGLmmpRAmviLMfQVfncmbSTITUUROUizEw2cayGmo sTxQe963wH/xeRs418Jw/+kpDwoRFCNs6L6M7I7M+elfiC7muXCBPeJ/dpMmW7tm5o nKFjulGcFy5sRrfW0dAfE/vErzFxoJrI4N6U2qDA= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200709053343epcas1p244cff0f7f767c50ca160c774c8707e94~f-q_U5-n-0912409124epcas1p2-; Thu, 9 Jul 2020 05:33:43 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.40.156]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4B2Pwh2K7VzMqYm6; Thu, 9 Jul 2020 05:33:40 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 6B.89.28578.43CA60F5; Thu, 9 Jul 2020 14:33:40 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200709053339epcas1p10278823f18b4650351f4e6f680d3d4a0~f-q7T7zlE2532625326epcas1p1p; Thu, 9 Jul 2020 05:33:39 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200709053339epsmtrp2278859c062e52c0ca61415a0acfb1948~f-q7S_ht70402704027epsmtrp2R; Thu, 9 Jul 2020 05:33:39 +0000 (GMT) X-AuditID: b6c32a39-e6f5da8000006fa2-bd-5f06ac342e3b Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 75.F6.08303.33CA60F5; Thu, 9 Jul 2020 14:33:39 +0900 (KST) Received: from localhost.localdomain (unknown [10.113.221.102]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200709053339epsmtip1f622ba8ae3db66941e034d765a2420a1~f-q7DFtbv1067810678epsmtip1h; Thu, 9 Jul 2020 05:33:39 +0000 (GMT) From: Chanwoo Choi To: lukasz.luba@arm.com, k.konieczny@samsung.com, krzk@kernel.org, kgene@kernel.org Subject: [PATCH v2 1/2] PM / devfreq: Add support delayed timer for polling mode Date: Thu, 9 Jul 2020 14:45:03 +0900 Message-Id: <20200709054504.656-2-cw00.choi@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200709054504.656-1-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkk+LIzCtJLcpLzFFi42LZdlhTT9dkDVu8QcMcfouNM9azWky8cYXF 4vqX56wWCz7NYLXof/ya2eL8+Q3sFmeb3rBbbHp8jdXi8q45bBafe48wWsw4v4/JYmFTC7vF 7cYVbBaH37SzWnw78YjRgd9jzbw1jB47Z91l99i0qpPNY/OSeo++LasYPT5vkgtgi8q2yUhN TEktUkjNS85PycxLt1XyDo53jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXLzAE6WUmhLDGnFCgU kFhcrKRvZ1OUX1qSqpCRX1xiq5RakJJTYFmgV5yYW1yal66XnJ9rZWhgYGQKVJiQnfHkTQ9z wQbzis/NP9gaGHfrdjFyckgImEh8XTmTuYuRi0NIYAejRNvxh+wgCSGBT4wSHbMVIBKfGSUe XzzIBNOx5WgbI0TRLkaJB+9NIIq+MEr8ufkRrJtNQEti/4sbbCC2iECoxOx7U8FWMAvsYpL4 Mg1kHyeHsECQxI6Df8CmsgioSuyevBlsKq+AhUTjtSlsENvkJVZvOABWzylgKbHlxjRWkEES AhM5JKatvMoIUeQi0dv9BOo8YYlXx7ewQ9hSEp/f7YUaVC2x8uQRNojmDkaJLfsvsEIkjCX2 L50M1MwBdJ6mxPpd+hBhRYmdv+eCzWcW4JN497WHFaREQoBXoqNNCKJEWeLyg7tQayUlFrd3 Qq3ykLi59ycLJFR6GCVeLm9jnsAoNwthwwJGxlWMYqkFxbnpqcWGBabIUbaJEZwmtSx3ME5/ +0HvECMTB+MhRgkOZiURXgNF1ngh3pTEyqrUovz4otKc1OJDjKbA0JvILCWanA9M1Hkl8Yam RsbGxhYmhmamhoZK4ryfFrDFCwmkJ5akZqemFqQWwfQxcXBKNTDNNKg+t2rynq4bTx7tfDRF KIJ7Ewv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yr+JtuL vg8lUx71/9SY7nPz38uf+WfUpV9V1wZve/u4mpGLyypJp6cwp+X72oNuU8O+GUyJDVTn9jx1 65xMfkT2wYdpW5vcVqwvkvOJPcs9ebdvnaby1KesX+Oq/m9p9b/X5Ky0dNpSg69yU66XNP3r aizr+KV5cscvvl1rrZR3yJ5eJJKdztr4bWH3Qk1t8SfOJw3usQm9irs6W0N7y5OVzq78nGrr WLxMHA/cnbtt6iclluKMREMt5qLiRABPWQZr1QIAAA== X-CMS-MailID: 20200709053339epcas1p10278823f18b4650351f4e6f680d3d4a0 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200709053339epcas1p10278823f18b4650351f4e6f680d3d4a0 References: <20200709054504.656-1-cw00.choi@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200709_013347_265469_57821518 X-CRM114-Status: GOOD ( 30.90 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [203.254.224.34 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: willy.mh.wolff.ml@gmail.com, linux-samsung-soc@vger.kernel.org, s.nawrocki@samsung.com, b.zolnierkie@samsung.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, cw00.choi@samsung.com, kyungmin.park@samsung.com, myungjoo.ham@samsung.com, chanwoo@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Until now, the devfreq driver using polling mode like simple_ondemand governor have used only deferrable timer for reducing the redundant power consumption. It reduces the CPU wake-up from idle due to polling mode which check the status of Non-CPU device. But, it has a problem for Non-CPU device like DMC device with DMA operation. Some Non-CPU device need to do monitor continuously regardless of CPU state in order to decide the proper next status of Non-CPU device. So, add support the delayed timer for polling mode to support the repetitive monitoring. The devfreq driver and user can select the kind of timer on either deferrable and delayed timer. For example, change the timer type of DMC device based on Exynos5422-based Odroid-XU3 as following: - If want to use deferrable timer as following: echo deferrable > /sys/class/devfreq/10c20000.memory-controller/timer - If want to use delayed timer as following: echo delayed > /sys/class/devfreq/10c20000.memory-controller/timer Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Lukasz Luba Signed-off-by: Chanwoo Choi --- Documentation/ABI/testing/sysfs-class-devfreq | 12 +++ drivers/devfreq/devfreq.c | 86 ++++++++++++++++++- include/linux/devfreq.h | 9 ++ 3 files changed, 106 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq index 9758eb85ade3..deefffb3bbe4 100644 --- a/Documentation/ABI/testing/sysfs-class-devfreq +++ b/Documentation/ABI/testing/sysfs-class-devfreq @@ -108,3 +108,15 @@ Description: frequency requested by governors and min_freq. The max_freq overrides min_freq because max_freq may be used to throttle devices to avoid overheating. + +What: /sys/class/devfreq/.../timer +Date: July 2020 +Contact: Chanwoo Choi +Description: + This ABI shows and stores the kind of work timer by users. + This work timer is used by devfreq workqueue in order to + monitor the device status such as utilization. The user + can change the work timer on runtime according to their demand + as following: + echo deferrable > /sys/class/devfreq/.../timer + echo delayed > /sys/class/devfreq/.../timer diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 52b9c3e141f3..10f1543df84b 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -49,6 +49,11 @@ static LIST_HEAD(devfreq_governor_list); static LIST_HEAD(devfreq_list); static DEFINE_MUTEX(devfreq_list_lock); +static const char timer_name[][DEVFREQ_NAME_LEN] = { + [DEVFREQ_TIMER_DEFERRABLE] = { "deferrable" }, + [DEVFREQ_TIMER_DELAYED] = { "delayed" }, +}; + /** * find_device_devfreq() - find devfreq struct using device pointer * @dev: device pointer used to lookup device devfreq. @@ -454,7 +459,17 @@ void devfreq_monitor_start(struct devfreq *devfreq) if (devfreq->governor->interrupt_driven) return; - INIT_DEFERRABLE_WORK(&devfreq->work, devfreq_monitor); + switch (devfreq->profile->timer) { + case DEVFREQ_TIMER_DEFERRABLE: + INIT_DEFERRABLE_WORK(&devfreq->work, devfreq_monitor); + break; + case DEVFREQ_TIMER_DELAYED: + INIT_DELAYED_WORK(&devfreq->work, devfreq_monitor); + break; + default: + return; + } + if (devfreq->profile->polling_ms) queue_delayed_work(devfreq_wq, &devfreq->work, msecs_to_jiffies(devfreq->profile->polling_ms)); @@ -771,6 +786,11 @@ struct devfreq *devfreq_add_device(struct device *dev, devfreq->data = data; devfreq->nb.notifier_call = devfreq_notifier_call; + if (devfreq->profile->timer < 0 + || devfreq->profile->timer >= DEVFREQ_TIMER_NUM) { + goto err_out; + } + if (!devfreq->profile->max_state && !devfreq->profile->freq_table) { mutex_unlock(&devfreq->lock); err = set_freq_table(devfreq); @@ -1625,6 +1645,69 @@ static ssize_t trans_stat_store(struct device *dev, } static DEVICE_ATTR_RW(trans_stat); +static ssize_t timer_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct devfreq *df = to_devfreq(dev); + + if (!df->governor) + return -EINVAL; + + return sprintf(buf, "%s\n", timer_name[df->profile->timer]); +} + +static ssize_t timer_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct devfreq *df = to_devfreq(dev); + char str_timer[DEVFREQ_NAME_LEN + 1]; + int timer = -1; + int ret = 0, i; + + if (!df->governor) + return -EINVAL; + + ret = sscanf(buf, "%16s", str_timer); + if (ret != 1) + return -EINVAL; + + for (i = 0; i < DEVFREQ_TIMER_NUM; i++) { + if (!strncmp(timer_name[i], str_timer, DEVFREQ_NAME_LEN)) { + timer = i; + break; + } + } + + if (timer < 0) { + ret = -EINVAL; + goto out; + } + + if (df->profile->timer == timer) { + ret = 0; + goto out; + } + + mutex_lock(&df->lock); + df->profile->timer = timer; + mutex_unlock(&df->lock); + + ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL); + if (ret) { + dev_warn(dev, "%s: Governor %s not stopped(%d)\n", + __func__, df->governor->name, ret); + goto out; + } + + ret = df->governor->event_handler(df, DEVFREQ_GOV_START, NULL); + if (ret) + dev_warn(dev, "%s: Governor %s not started(%d)\n", + __func__, df->governor->name, ret); +out: + return ret ? ret : count; +} +static DEVICE_ATTR_RW(timer); + static struct attribute *devfreq_attrs[] = { &dev_attr_name.attr, &dev_attr_governor.attr, @@ -1636,6 +1719,7 @@ static struct attribute *devfreq_attrs[] = { &dev_attr_min_freq.attr, &dev_attr_max_freq.attr, &dev_attr_trans_stat.attr, + &dev_attr_timer.attr, NULL, }; ATTRIBUTE_GROUPS(devfreq); diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 57e871a559a9..12782fbb4c25 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -31,6 +31,13 @@ #define DEVFREQ_PRECHANGE (0) #define DEVFREQ_POSTCHANGE (1) +/* DEVFREQ work timers */ +enum devfreq_timer { + DEVFREQ_TIMER_DEFERRABLE = 0, + DEVFREQ_TIMER_DELAYED, + DEVFREQ_TIMER_NUM, +}; + struct devfreq; struct devfreq_governor; @@ -70,6 +77,7 @@ struct devfreq_dev_status { * @initial_freq: The operating frequency when devfreq_add_device() is * called. * @polling_ms: The polling interval in ms. 0 disables polling. + * @timer: Timer type is either deferrable or delayed timer. * @target: The device should set its operating frequency at * freq or lowest-upper-than-freq value. If freq is * higher than any operable frequency, set maximum. @@ -96,6 +104,7 @@ struct devfreq_dev_status { struct devfreq_dev_profile { unsigned long initial_freq; unsigned int polling_ms; + enum devfreq_timer timer; int (*target)(struct device *dev, unsigned long *freq, u32 flags); int (*get_dev_status)(struct device *dev, From patchwork Thu Jul 9 05:45:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 11653369 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8526E6C1 for ; Thu, 9 Jul 2020 05:35:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EAF720657 for ; Thu, 9 Jul 2020 05:35:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l8VdPbgK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="FNc4WtO7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EAF720657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KKqr1nsPscm7BSQKmQxJg19LbgbO9KMafbwOSEv6/pM=; b=l8VdPbgKBqkPBldyyym6iHnZSu u5JQ7x7Bg6Hq+zvKJ7rYs+fV0+FKNBh0WD/3lsmyX17cMAxNHhe/X1Ryic7fr5EgqX7Y0MH6wWFzB EZfIKlRbH3Mn8ezTOaL8G/fKqWy0SgZ8+SD5+TqtKSHmkI3jRgFQTCoDpY5Hq2HfLbF42zWdsGVXZ KYMluK5jV2CpfS4fNlCuvZEhocWXnsO4R5yW4FGGcclB7s4HeRrPFOXakNOpjtlJRqzlKMC8FOO+V FpvKyxC8GTy2Qh3i1JMaIoU1F5ii3vzELn0OtWZE67jpjnPy4pB1JxxXA5OGlUfMjFsLJTHf9dpAN 4Y4XKfFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtPBy-0002Ml-PO; Thu, 09 Jul 2020 05:33:54 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtPBr-0002KR-JR for linux-arm-kernel@lists.infradead.org; Thu, 09 Jul 2020 05:33:48 +0000 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20200709053343epoutp0238cea65417ddb20673cd45f67025a2a6~f-q_6w2ZL1590215902epoutp02a for ; Thu, 9 Jul 2020 05:33:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20200709053343epoutp0238cea65417ddb20673cd45f67025a2a6~f-q_6w2ZL1590215902epoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594272823; bh=sfkpQ9HHY0HvMIk919py9z+6K8m7VZ3LXraenZFelz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FNc4WtO7vhk6MsGHnPgiDzN4wM9kSMSz8Ss2j09SdS4eN2uIa4Cj+pvcPUzApSQGd gyNpQDD9RaWU4lqj1IrwF+Jk3DfF1TCDWSPYPCvGR3+fVPeaF7JUK7UsYT8kUo1Y/f EvLmLpbT47EEU9EVM5n2JqhIEWTba+wb9YOZDyho= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20200709053343epcas1p3e21a6a9cc827ab154ec5c4eb42a85cea~f-q_Xabdh0095300953epcas1p35; Thu, 9 Jul 2020 05:33:43 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.40.158]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4B2Pwh3jdyzMqYm2; Thu, 9 Jul 2020 05:33:40 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 87.CC.28581.43CA60F5; Thu, 9 Jul 2020 14:33:40 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20200709053340epcas1p3bc307da98530bc166c7d354a62e4c894~f-q7aHAjo0095300953epcas1p3t; Thu, 9 Jul 2020 05:33:40 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200709053340epsmtrp1095143372c99b801f9a4c354a683ea5d~f-q7ZR-ss2587325873epsmtrp1P; Thu, 9 Jul 2020 05:33:40 +0000 (GMT) X-AuditID: b6c32a38-2e3ff70000006fa5-7c-5f06ac349ad5 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 76.F6.08303.33CA60F5; Thu, 9 Jul 2020 14:33:39 +0900 (KST) Received: from localhost.localdomain (unknown [10.113.221.102]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200709053339epsmtip14829e8e1b42e3ef1aac96617c44eec41~f-q7J4Hex1123511235epsmtip1S; Thu, 9 Jul 2020 05:33:39 +0000 (GMT) From: Chanwoo Choi To: lukasz.luba@arm.com, k.konieczny@samsung.com, krzk@kernel.org, kgene@kernel.org Subject: [PATCH v2 2/2] memory: samsung: exynos5422-dmc: Use delayed timer as default Date: Thu, 9 Jul 2020 14:45:04 +0900 Message-Id: <20200709054504.656-3-cw00.choi@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200709054504.656-1-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupik+LIzCtJLcpLzFFi42LZdlhTV9dkDVu8wcafYhYbZ6xntZh44wqL xfUvz1ktFnyawWrR//g1s8X58xvYLc42vWG32PT4GqvF5V1z2Cw+9x5htJhxfh+TxcKmFnaL 240r2CwOv2lntfh24hGjA7/HmnlrGD12zrrL7rFpVSebx+Yl9R59W1YxenzeJBfAFpVtk5Ga mJJapJCal5yfkpmXbqvkHRzvHG9qZmCoa2hpYa6kkJeYm2qr5OIToOuWmQN0spJCWWJOKVAo ILG4WEnfzqYov7QkVSEjv7jEVim1ICWnwLJArzgxt7g0L10vOT/XytDAwMgUqDAhO+PGu1tM BZ/ZK94e+8XSwPiMrYuRk0NCwETiw94f7CC2kMAORom7v3m6GLmA7E+MElubvzNBOJ8ZJV70 vIHr+PL5BjNEYhejxKJTz1ggnC+MEkvnHQarYhPQktj/4gaYLSIQKjH73lSwDmaBXUwSX6bN ZAZJCAuES3x8/IsJxGY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IIDyBaWOHy4GKLmE1DN/dWsIDVsAloS+1/cABskIhApcb7hKBtIEbPAMSaJ5W/b WUASwgKhEmcOzgazWQRUJXZ/nA9m8wpYSPzef4wVYpm8xOoNB5hBbE4BS4ktN6aBxYWAatZP W8w6gZFvASPDKkbJ1ILi3PTcYsMCo7zUcr3ixNzi0rx0veT83E2M4HDW0trBuGfVB71DjEwc jIcYJTiYlUR4DRRZ44V4UxIrq1KL8uOLSnNSiw8xSnOwKInzfp21ME5IID2xJDU7NbUgtQgm y8TBKdXApHVe2pCv6VhN76nO491mv65Fdb/k45i49l6J7ZSOZ/Nbrv+7phkid2cfu8SSSzIS clssJ9TrdCZxz+pUXuIWwn5qmtLZh6GPn84P45p8kCOMM+Snyu2ij7eU7z0IXXuaKSsgrGXi esfSso63OfU9mzTn/D9h6fB8AXOH9qT2H3J71lmcfRK+UUDhw90Ge99X4ta3l/xaN+OR4pWN Qb1bz3z42dSns6JK1f5t2EHeZoM7hre9Zs2P6vFbluF4reMH73pV/Q1bA2aEldf7yL5X3Ppp ikGR4u741MOt/BMa9JhsPew7uR7kH4z+97ql51ud/CpelQPua7e2q9+dEepp9GbBi3Md3jl3 NpQErgjvUmIpzkg01GIuKk4EAA+ZIdnWAgAA X-CMS-MailID: 20200709053340epcas1p3bc307da98530bc166c7d354a62e4c894 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200709053340epcas1p3bc307da98530bc166c7d354a62e4c894 References: <20200709054504.656-1-cw00.choi@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200709_013348_107714_EF2D13FD X-CRM114-Status: GOOD ( 15.03 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [203.254.224.25 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: willy.mh.wolff.ml@gmail.com, linux-samsung-soc@vger.kernel.org, s.nawrocki@samsung.com, b.zolnierkie@samsung.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, cw00.choi@samsung.com, kyungmin.park@samsung.com, myungjoo.ham@samsung.com, chanwoo@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use delayed timer as default instead of deferrable timer in order to monitor the DMC status regardless of CPU idle. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Lukasz Luba Signed-off-by: Chanwoo Choi --- drivers/memory/samsung/exynos5422-dmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c index 25196d6268e2..93e9c2429c0d 100644 --- a/drivers/memory/samsung/exynos5422-dmc.c +++ b/drivers/memory/samsung/exynos5422-dmc.c @@ -945,6 +945,7 @@ static int exynos5_dmc_get_cur_freq(struct device *dev, unsigned long *freq) * It provides to the devfreq framework needed functions and polling period. */ static struct devfreq_dev_profile exynos5_dmc_df_profile = { + .timer = DEVFREQ_TIMER_DELAYED, .target = exynos5_dmc_target, .get_dev_status = exynos5_dmc_get_status, .get_cur_freq = exynos5_dmc_get_cur_freq,