Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp803771pxb; Tue, 3 Nov 2020 13:00:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJywCfaxBmqJI44bEunexK6UX3tCqbuTzhpgdo7ue5JFwteqIu1f3UrORHGXiFYgr1K1Xhp5 X-Received: by 2002:a50:d84a:: with SMTP id v10mr11105856edj.84.1604437240231; Tue, 03 Nov 2020 13:00:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604437240; cv=none; d=google.com; s=arc-20160816; b=WdfV65+Q9B+HrgSHehNAkNhc2HNdhwfv8XHC7ljmoUMGKMDej8guGE99tG9yfED3lu Is1G5v0mx0F6TUTWWUvhnYW9OTEyb0fW0AWAYnLi0vfOlhVw3VWDchMAf2y3MzPmEX3L pF4UmzJDavi/VOz+LFyAeW8Hh6StoC9rrpFhGn2T6Brp5R61Fnn8cFDup5kE8UkovGeP oZ1nKo1YuekxTsdGfItqDr/XV2jKaNYVNaCAmc45HW7azSAlNHjJ0q0V+wis70cNl1c/ Ao7J/RUSpZN6Ee8xCmXkVKxHwuR3xuOMxhdxAgZyUR8CMSBda9JYjFjV5ypBO4R7Al8l 31vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7cx5K8lhWXg6akmLo0LHuMiXX60plXAYiOsbCmJq/4k=; b=t+xvl2J12C40i8/jFrbdYEqQ/0wYLRQpmnY07MrV00F/AwyBtn1Y11psL46nyv/XCs kDbEX17HQQ9NfNwmA+k99xSGxduUtdTjJnQ7QJJiYqUni6woFlyoYvgmEDBNNhSfatir 3//Ew04Rje1ibuWz1kL9UjekKjyNwzmiEP4DhZUp/h+khEae/ppc1zL43XWbtxzM+i7S s7ZJKr9Xci8jZrfX5cWqO9aTM/RCV3QcfSharyRdaTubx90bRF56Y8Sx9ovmVC8qpBva SACcXuasha8vifJQEO7o8CZHLMnSQf489fBhoV2IkZD0VmxMgjlwfMRMJrgqV0/cQ53P zIuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bKOR0Bi6; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si13942789edv.144.2020.11.03.13.00.17; Tue, 03 Nov 2020 13:00:40 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=bKOR0Bi6; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732406AbgKCU67 (ORCPT + 99 others); Tue, 3 Nov 2020 15:58:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:33720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732615AbgKCU65 (ORCPT ); Tue, 3 Nov 2020 15:58:57 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F16792053B; Tue, 3 Nov 2020 20:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437137; bh=SutxnjuQiNcWOuXeErlj94rMuCuFG4npuCUEcq4W/d4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bKOR0Bi6KrRgWT+NIhMz7gAo0cDTwQlNQZPA4+p59VZ8eo6k5WT28sCnr+7RpO3Nc H7lZgfrvkiNW5mKVlOL6PbPQ9CdznXNJ3fafaCKyWaCxrjkPY32seu+uDDBHt2qtR9 Xh6bvQYO+P3LclvL5IBsSa5/2XCSDxEs3H7PumVM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Aneesh Kumar K.V" , Nathan Lynch , Michael Ellerman Subject: [PATCH 5.4 155/214] powerpc/drmem: Make lmb_size 64 bit Date: Tue, 3 Nov 2020 21:36:43 +0100 Message-Id: <20201103203305.328304107@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aneesh Kumar K.V commit ec72024e35dddb88a81e40071c87ceb18b5ee835 upstream. Similar to commit 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure different variables tracking lmb_size are updated to be 64 bit. This was found by code audit. Cc: stable@vger.kernel.org Signed-off-by: Aneesh Kumar K.V Acked-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007114836.282468-2-aneesh.kumar@linux.ibm.com Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/include/asm/drmem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/powerpc/include/asm/drmem.h +++ b/arch/powerpc/include/asm/drmem.h @@ -20,7 +20,7 @@ struct drmem_lmb { struct drmem_lmb_info { struct drmem_lmb *lmbs; int n_lmbs; - u32 lmb_size; + u64 lmb_size; }; extern struct drmem_lmb_info *drmem_info; @@ -79,7 +79,7 @@ struct of_drconf_cell_v2 { #define DRCONF_MEM_AI_INVALID 0x00000040 #define DRCONF_MEM_RESERVED 0x00000080 -static inline u32 drmem_lmb_size(void) +static inline u64 drmem_lmb_size(void) { return drmem_info->lmb_size; }