From patchwork Thu Mar 14 12:54:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 13592416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99A4EC54E67 for ; Thu, 14 Mar 2024 12:56:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 073EC800A1; Thu, 14 Mar 2024 08:56:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EECDF80073; Thu, 14 Mar 2024 08:56:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C7C7A800A1; Thu, 14 Mar 2024 08:56:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id AEA3780073 for ; Thu, 14 Mar 2024 08:56:34 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8EF31A059F for ; Thu, 14 Mar 2024 12:56:34 +0000 (UTC) X-FDA: 81895643508.27.B884651 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by imf28.hostedemail.com (Postfix) with ESMTP id 8B43EC0015 for ; Thu, 14 Mar 2024 12:56:31 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b="R/p4zuCW"; dmarc=pass (policy=none) header.from=samsung.com; spf=pass (imf28.hostedemail.com: domain of m.szyprowski@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=m.szyprowski@samsung.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710420992; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:references:dkim-signature; bh=AtiIPD1nd1BTHIsx1dMEytn/tsBihsCy+dwOY7jQpBY=; b=LrBMyMlnHqze9FPHTzrPcSMUqZOxkpJilNVQf/9t0eBvJ9L9lpux+3uDpP0xiGW6Q6vHGZ oJ+Iyq+CmTyR3Am9vjlDp/FtFXEivROvYxNEmFAS4UhcMWYJJFYRfugU9CBXXVy7Wdrenz fautaxGijzCpa9C3C+GnYXBOe+2rcvk= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b="R/p4zuCW"; dmarc=pass (policy=none) header.from=samsung.com; spf=pass (imf28.hostedemail.com: domain of m.szyprowski@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=m.szyprowski@samsung.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710420992; a=rsa-sha256; cv=none; b=qHqUT6hl4QbzObgYvfT8yLxwTekeWqXnC8keJGRlhwX3kPJRHSmSbWRkcItTB572mvjN7w N8JZqPiiGZsGDzIlzMfMxcNN6W1CEzJYIk6FXBgoDOx3vbQjYzuDSUGhaaRd38NIrOKhEx EMEt1tMraBGlS8WzSU/9/1BT7p9izK0= Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240314125629euoutp01eb481564e7cf9180887f00d439c333ae~8otPQv3Dp1058610586euoutp01f for ; Thu, 14 Mar 2024 12:56:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240314125629euoutp01eb481564e7cf9180887f00d439c333ae~8otPQv3Dp1058610586euoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1710420989; bh=AtiIPD1nd1BTHIsx1dMEytn/tsBihsCy+dwOY7jQpBY=; h=From:To:Cc:Subject:Date:References:From; b=R/p4zuCWtTO6I2S2SBVnoJM4D/03rroyRNjc6VN1uUfQYoV9rcRtFkqbqNIVLKN2E yST+G/UfoOeOU8ynRiUXYXFs4KrDKfJUi1GBYlX3rrYQr7n/hhpXrgCaKU79D6rnQf s2iu5gvtOGEOh+p/VydajeBDAGzE7WKyeSuAobgI= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240314125628eucas1p2e3ad48e936d6c53ce89ca5f2e02d474c~8otOyC5e32014220142eucas1p2m; Thu, 14 Mar 2024 12:56:28 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 46.99.09814.CF3F2F56; Thu, 14 Mar 2024 12:56:28 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240314125628eucas1p161af377a50fd957f445397bc1404978b~8otOP51sB1264712647eucas1p1m; Thu, 14 Mar 2024 12:56:28 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240314125628eusmtrp157bb9d209f9df74e3c1ff96e3a790aaf~8otOPJAlG1799517995eusmtrp1O; Thu, 14 Mar 2024 12:56:28 +0000 (GMT) X-AuditID: cbfec7f4-727ff70000002656-24-65f2f3fc65a2 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id D2.FA.09146.BF3F2F56; Thu, 14 Mar 2024 12:56:27 +0000 (GMT) Received: from AMDC4653.digital.local (unknown [106.120.51.32]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240314125627eusmtip12f547f04dc25f77ebf9f2ed838088094~8otNdUPBP2067620676eusmtip1f; Thu, 14 Mar 2024 12:56:27 +0000 (GMT) From: Marek Szyprowski To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , "Rafael J. Wysocki" , Viresh Kumar , Stephan Gerhold , Catalin Marinas , Russell King , Christoph Lameter , Mark Rutland , Sudeep Holla , Will Deacon , stable@vger.kernel.org Subject: [PATCH] cpufreq: dt: always allocate zeroed cpumask Date: Thu, 14 Mar 2024 13:54:57 +0100 Message-Id: <20240314125457.186678-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNKsWRmVeSWpSXmKPExsWy7djP87p/Pn9KNdj8Sc7i/bIeRovlc+Yy WWx6fI3V4vKuOWwW99b8Z7X43HuE0eLQ1L2MFmuP3GW3WHr9IpPF3C9TmS0WbHzEaHFjronF 8lM7WCw2fvWwaLlj6sDvsWbeGkaPy9cuMnvsP1zk0bbA3mPTqk42j02fJrF73Lm2h81j85J6 j74tqxg9Pm+SC+CK4rJJSc3JLEst0rdL4MpYvGk3S0ETV8W/43/YGhj3cHQxcnJICJhIdF34 wNzFyMUhJLCCUeL37TOsEM4XRolL0zawQDifGSUubz7PBNNyctMJqMRyRolVU18ywbV8uNHD BlLFJmAo0fW2C8wWESiT6P17CKyIWWAZs8Sse0+BNnJwCAvYSKztCQOpYRFQlZi95iNYPa+A nUTzhVWMENvkJfYfPMsMEReUODnzCQuIzQwUb946mxmi5geHxMvFQSAjJQRcJL68YYEIC0u8 Or6FHcKWkTg9uQfsaAmBdkaJBb/vM0E4ExglGp7fglpmLXHn3C82kEHMApoS63fpQ4QdJf7e f8ACMZ9P4sZbQYgT+CQmbZvODBHmlehoE4KoVpOYdXwd3NqDFy5BlXhIHL8kDhIWEoiVODPr MMsERoVZSP6aheSvWQgnLGBkXsUonlpanJueWmyUl1quV5yYW1yal66XnJ+7iRGY3k7/O/5l B+PyVx/1DjEycTAe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/pgrxpiRWVqUW5ccXleakFh9iNAW6byKzlGhyPjC280riDc0MTA1N zCwNTC3NjJXEeT0LOhKFBNITS1KzU1MLUotg+pg4OKUamFw/7E4v/uWZdV5549zwmvN8lR33 S+52fEn7ZP1bZ4l00qZn3f9za94Xf56jcqr7/KyMsPBZFoceStyo7VjsttjnfEPK3EO9yxI1 zoi4nG6VCVVezMOcfPbmwRN+wv8ydx98b/Uj4NKlyMtz4j5zr4sWvP9X/aqdTOaBMn1h4W99 v2Mt/qdo/bz9Im7j4eZz0vEnfBM7BWXavvAcdDa873uJ929W4tbE31+3bJK5sfvA0aKX4RuN H+2q3STGIxTDbe35VUw62CCi+ymHuAaDuW1ym3YuwyZjlboL250ez/PoyHP0uyX7m8l2NtvN r1aN86LNV3dKpe+1jNfQe81o7juFaS4nX0tZzMUPRdtXKrEUZyQaajEXFScCAG0BSGY1AwAA X-CMS-MailID: 20240314125628eucas1p161af377a50fd957f445397bc1404978b X-Msg-Generator: CA X-RootMTR: 20240314125628eucas1p161af377a50fd957f445397bc1404978b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240314125628eucas1p161af377a50fd957f445397bc1404978b References: X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8B43EC0015 X-Stat-Signature: izk8qr3pfkzcw44bi4q1m1bciqybsd3e X-HE-Tag: 1710420991-993435 X-HE-Meta: U2FsdGVkX1+acEBrBI8x+20Rj/MrgfLGeU42vsFjs4l/QysLsS+IspoTaGibY8AP9MZwy2I9OOU6UtDWDTQC6i/jneqXW4fEEntRkqPH+BbiiDwyP/ldxpFpxUKzPMX3SXEaDNDIp0Te2iYdzN4y9vn2GLrll0pp+veQTRk3gHj2bWKu+i073es0TXEkh3x0yFwPMddrjrzobntoXt9N3HkV9wEcriXELw5fUVZ5HMIwjaih72EtsI0vZc0h/NGI/cUlaen0MBX8lqaeBqgot+w+nVANw/3LFSUrFREXnrSODevNLG4EM+JOjjUd+89JePGP+91VMR1RXKMTQuhwCBO3PG86efKbQUHeAyn67bKCk4qstrNliG2NFyiipDVyYICY70Nih7numgMfKYGTZhWB98m/4/P/5ec18dqMSCHkhL2v1vnKC707/U4rPErLn+b1tkiHoXQYZUpXhmZls55xG2pvc0afPRpS7NYSBAA2jRdKTj9aU1gPYYK52/mauqlGQ3rPM4pzhOHQ+ElwxaDYj/Djn/k4vJaBO9xCcN/dyK2h5U62f0nJsTs2MXQtEry7sNs3efqqdY5XhMTRn2Fd3l3X4WcMOnGW5MYMN0UM6yB3qzq93PRjokPK5m8Qm/U4blXoYQ1rOCUISLQ2pUKgum0yAg3aK3wC7kWc9sVEGA7d567XoX4Ri6JTFxj/D/2jwg9fzN5nVC0nZw8BiFqSsZSY+o5kHWRterrZ70rKTwNXcZ6tKtS75dSjLigPpbpUmsCFDUT2EU2lq9iuDkZk20kTJh8tMqAQMrH53aOrfkQyY5hXxUF/VOY8/GU2JA54Fb52/JzizDglJdGZkQ//5YbT6gs01RgdZ5shq4Mfc7rHHJubBzlH7FHyW8x7vqYpuH5oTcptpSJRMprbVpfG1N+4xjFOeY0PvIikUKitaGn+SAxQ1Yw27PU3VxAJgmcmNa4ZTuRmoUomatq 99A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit 0499a78369ad ("ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512") changed the handling of cpumasks on ARM 64bit, what resulted in the strange issues and warnings during cpufreq-dt initialization on some big.LITTLE platforms. This was caused by mixing OPPs between big and LITTLE cores, because OPP-sharing information between big and LITTLE cores is computed on cpumask, which in turn was not zeroed on allocation. Fix this by switching to zalloc_cpumask_var() call. Fixes: dc279ac6e5b4 ("cpufreq: dt: Refactor initialization to handle probe deferral properly") CC: stable@vger.kernel.org # v5.10+ Signed-off-by: Marek Szyprowski Reviewed-by: Christoph Lameter (Ampere) Reviewed-by: Dhruva Gole --- drivers/cpufreq/cpufreq-dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 8bd6e5e8f121..2d83bbc65dd0 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -208,7 +208,7 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu) if (!priv) return -ENOMEM; - if (!alloc_cpumask_var(&priv->cpus, GFP_KERNEL)) + if (!zalloc_cpumask_var(&priv->cpus, GFP_KERNEL)) return -ENOMEM; cpumask_set_cpu(cpu, priv->cpus);