From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C082C433E0 for ; Thu, 28 Jan 2021 14:30:37 +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 C027664D9F for ; Thu, 28 Jan 2021 14:30:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C027664D9F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.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:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ffAS2J6uK31oaQxDDHU2U8apI4agIZYubmTOPDwhH0Y=; b=poVMgJARi7IsyMaWTQ69tIfDp AC1oplejBrs9qmAvOSLnssCtFKPcvbN4W48ywW2eCVOq3+9tpmrvszj9VZluXvgszg5++iJ2Ce/P4 ZFyOh3G/ik/N/wDibp0fvAwmvwhhN5lwvesJ9txTZhnS1H8FFtNruYBPmOUfFa+jRkLkiUB6QUXVw fOPl5JLNmk9woP2o9iJyrJL444Zj0MQp76UHWBeq6E9nmoOg2uXAlmamxiVuGFjg+0MtM0OEskxeE 8k8mp3i2Ph9OSihonKzWYt29sIKNNE3pPTZOWi5aZWd9Od48HTwkWklUFCpfGx0NM3FtDnMmJSf2t DiX+Zd1lg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l58If-0006my-1x; Thu, 28 Jan 2021 14:29:33 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l58Ic-0006m4-Ol for linux-arm-kernel@lists.infradead.org; Thu, 28 Jan 2021 14:29:31 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8D95E64DE2 for ; Thu, 28 Jan 2021 14:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611844169; bh=KBjN8q3mMJRlZhvQryfNCm4f61GPKpVCwN7pH9ADCTU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uKvkO3BhkTD4e3twptTdvfucYn/gg1Eq3X0d74Ssnoy8K3sz5T0Qn55Cqa5O01rCX lca4aua3exXDpXxMvSuyaJWvUgpXlZV3T03tm7jP6/yn5L+oIulmidg0RBsYy6kheV DXAa7uECMlzAjeiSoozTbcttuC7YZE4dnUjwrEvqnCKv1N83hmWuqLFAnWxNjloSWe gYttDKbcVvyW6tye1TF6JejXhsHxAr2T3/CHBT8fUMh32gn0wI+m0N2ZX0xXRyxZk2 sPd5iqtCKMIN0Ot5gMOiYtDfRHwM5EbQt8jwuXiFbFwS0b1p3Vwm63XKRLWiQmg4xp EJVY9WvDVk12w== Received: by mail-oo1-f45.google.com with SMTP id x23so1458389oop.1 for ; Thu, 28 Jan 2021 06:29:29 -0800 (PST) X-Gm-Message-State: AOAM533uLosHCiU9N+F+6K7YNTimImiugCJrBz/OBbhyl6ejs8Wya3fY LhW0jyDVdW9AVcS5Xj0S8nr9V4hsZRJyBChts2c= X-Google-Smtp-Source: ABdhPJyE7pTmoGSVWTeD0pXYBDZ0WFZf158irr7xUNd6Z1QRS7e2GGFcwq87tnobHzsruRxDsYVrcHKFSvxe9Ys1CbQ= X-Received: by 2002:a4a:9c01:: with SMTP id y1mr11511239ooj.15.1611844168744; Thu, 28 Jan 2021 06:29:28 -0800 (PST) MIME-Version: 1.0 References: <20210116032740.873-1-thunder.leizhen@huawei.com> <20210116032740.873-2-thunder.leizhen@huawei.com> In-Reply-To: <20210116032740.873-2-thunder.leizhen@huawei.com> From: Arnd Bergmann Date: Thu, 28 Jan 2021 15:29:12 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/4] ARM: LPAE: Use phys_addr_t instead of unsigned long in outercache hooks To: Zhen Lei X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210128_092930_886869_91EAEB4A X-CRM114-Status: GOOD ( 16.77 ) 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: devicetree , Arnd Bergmann , Greg Kroah-Hartman , Will Deacon , linux-kernel , Haojian Zhuang , Rob Herring , Wei Xu , Russell King , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Jan 16, 2021 at 4:27 AM Zhen Lei wrote: > > The outercache of some Hisilicon SOCs support physical addresses wider > than 32-bits. The unsigned long datatype is not sufficient for mapping > physical addresses >= 4GB. The commit ad6b9c9d78b9 ("ARM: 6671/1: LPAE: > use phys_addr_t instead of unsigned long in outercache functions") has > already modified the outercache functions. But the parameters of the > outercache hooks are not changed. This patch use phys_addr_t instead of > unsigned long in outercache hooks: inv_range, clean_range, flush_range. > > To ensure the outercache that does not support LPAE works properly, do > cast phys_addr_t to unsigned long by adding a group of temporary > variables. For example: > -static void l2c220_inv_range(unsigned long start, unsigned long end) > +static void l2c220_inv_range(phys_addr_t pa_start, phys_addr_t pa_end) > { > + unsigned long start = pa_start; > + unsigned long end = pa_end; > > Note that the outercache functions have been doing this cast before this > patch. So now, the cast is just moved into the outercache hook functions. > > No functional change. > > Signed-off-by: Zhen Lei Reviewed-by: Arnd Bergmann _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel