Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp563608lqb; Thu, 14 Mar 2024 22:29:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWcU5TWaQCY6q8bjLhJU7L9Jlostff8ob/rewStzRWWrd+YH/pTDmUzIjNr2vZItdOnrXpkDV375gvrJ8Qr+A8E0lwmrDxcdc5j/jXHwg== X-Google-Smtp-Source: AGHT+IGaNmBJZFdECc4h8PNkEADh1qkadiNTBi5ej9p0WY7b+wT4dLhEVRf1n8BjfFxD1iA+/29B X-Received: by 2002:a05:6a20:9149:b0:1a1:6ab9:9139 with SMTP id x9-20020a056a20914900b001a16ab99139mr2510807pzc.11.1710480545309; Thu, 14 Mar 2024 22:29:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710480545; cv=pass; d=google.com; s=arc-20160816; b=lIjO3iowVU6zA6T5B6UT0w7FQoyE9wdUyM9XAiWIwcEmHxa3chzB31phR+xQXASrWd 4cyVUYkoso/YeJIqupam0OpvMpelxKIv9cBPuzjiLPHEl11Z7mhJBffjhMb9KrbqfuMv JNm37XMNt/aa96I7Nz/glE4leBN4JXAYHKV7EzgLX/UPaEQukSRkyG2eqx7R+yre0PEb aVZyu62+k/PWcHDB5Foh9KHYJ55EZNfzvAlkkO1iVWhLfS6d1s4CE7vjSRECGh18fH6R u0UpgL0QCFU7N9qYmoYxO0HsbpNdlt1EujBXYrAJ93JcfvRVGY1VcedF6XxQlVONBebY Sd+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/6G2n4e8p7C1eVE+gmMKGmm9QowQsFFL9iknvi5QMHI=; fh=WSicE4VnktkiNE1UUmq62m9wBkcb9zIKYL3I0FHxDdI=; b=EfqTRuxbYWpKB0z3TqgEgvSifHU98+73ISVo1X1ENsQlwbIr2xxtjsumfcs0T1G5Sn qL9WX0QRfWZJ/X2jRxGzzOv7RzQldwOGDe+63iZqyZ6dDBe5NMQpUzKW3ccOjhTHv4jv /a8Eb42km2J0iSPra89FD94AbGp7KDePrjJCgHpHrEOANKz4O5DNJdftBWg/uoEYI4D0 mzMOuiXc+9TyXfXhVs/+sBAKfRXEWyLkfbkLuTo8hcF4+xoWI76A7tWujuT6N6ZjrwEb 0XWpJa8nmSkFCRdlj+8dJI4YEsrhiPcR3bslTxOZgpo7mxgIr+S8bD4YR1Jf2MbZDf3E dk+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="fQb/pU1N"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-104067-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jx8-20020a17090b46c800b0029bbc6b109asi2024826pjb.114.2024.03.14.22.29.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 22:29:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104067-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="fQb/pU1N"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-104067-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F2D462829CA for ; Fri, 15 Mar 2024 05:29:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D285101F2; Fri, 15 Mar 2024 05:28:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="fQb/pU1N" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1353DF51; Fri, 15 Mar 2024 05:28:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710480534; cv=none; b=sERd+RqRE/PlxOUYD4YjlIelBGoAYs9uYs0PBLhQaCmZ/jKBLpzeOg1K0NSS2YQsmzi+gImDB/oCfLQstva0D9PlDpSYJCw2kgds8tN3RcSK0DevekAK9atXjzFpmGOtENajNkn2nytsg6JKRi5QVgetHZCYJPPFLeSHUejPsH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710480534; c=relaxed/simple; bh=/xPxAzCyhJN43wEXC0maiJE/UWoPU0LwRgLXzSrXbZA=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K/i/J7v91wjHeseCwSJ/84NKg6t4e+kF5NZqXPNcW2Jd0eH36Sjz73zZ6h7u1ei6PJVFFiMPE6z0Wgv5oMZ16OInkTjgRqwB9fm4YbzwbhWqbGeQT7TkttFN1W8jI/f7ksn7QJxcCfsJa3ehTKAa0okEJ0/L9or0FchRrXl0mXY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=fQb/pU1N; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42F5Rwhl009845; Fri, 15 Mar 2024 00:27:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1710480478; bh=/6G2n4e8p7C1eVE+gmMKGmm9QowQsFFL9iknvi5QMHI=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=fQb/pU1NAsoTLsgzpPTYk2XWYXulJ99R6WCw3e34GECDrhUBQ6BO49OWv5qEJGnjA SpQtQ5nSGo3YFBtNzRyvsu7DhL90Kc2PkXerMTJ9y0PLuKclkcg/wkWxdvSc/jYCjC et51MitlsDTSiRv1gYorkmu0FUDm0MjMG9kM8MCo= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42F5Rw58005758 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 15 Mar 2024 00:27:58 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 15 Mar 2024 00:27:57 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 15 Mar 2024 00:27:58 -0500 Received: from localhost (dhruva.dhcp.ti.com [172.24.227.68]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42F5RvAV037118; Fri, 15 Mar 2024 00:27:57 -0500 Date: Fri, 15 Mar 2024 10:57:56 +0530 From: Dhruva Gole To: Marek Szyprowski CC: , , , , "Rafael J. Wysocki" , Viresh Kumar , Stephan Gerhold , Catalin Marinas , Russell King , Christoph Lameter , Mark Rutland , Sudeep Holla , Will Deacon , Subject: Re: [PATCH] cpufreq: dt: always allocate zeroed cpumask Message-ID: <20240315052756.5w4zizrod3w7kzzn@dhruva> References: <20240314125457.186678-1-m.szyprowski@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240314125457.186678-1-m.szyprowski@samsung.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On Mar 14, 2024 at 13:54:57 +0100, Marek Szyprowski wrote: > 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 > --- > 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; Good catch! Reviewed-by: Dhruva Gole -- Best regards, Dhruva