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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 674D6C54E58 for ; Fri, 15 Mar 2024 10:11:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yFM02dLL38AJaeiwa0pN+L2bH4DZUzsNmvcasNaUB3o=; b=h/5gKGkF+vAOQA Nf+B7eqgAaiWMbq4exckGwO9nk0tvWZbNITX+1yc8NbUb0kFjPdQcFdUyM3Va/52QUDNSuH1mdiLZ WjJUFDSTSA9/CdsYT6dZUP74e/kTtBHtnctCywCpWF7a+z2o6tyLDiWj0fxzFWKSAMDntphrSHNfN 0j2Rjf36sB4JhALT0UIC0I3rpJikWcwLnYE54vi3OYepCwdv/QOl00WTxf2SLNdoXM+KwV5b7KADH FjgOzcGjpawZwO+l3BtEedWd/8z+muLjxsIkSbiwgwIWxBhkAXmHxFN5oz0bsxsiV+RD1SwwBSKac Dlytvfl8p325tNqENL2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4Wo-0000000HQOi-0FZe; Fri, 15 Mar 2024 10:11:06 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4Wi-0000000HQCD-2EvZ for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 10:11:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wh3Jfll5wJDn5oh+cbxJ+dlWG43ZPVDivQeJ6xSfkuI=; b=X4WNf7A+W2kl0yAr/qEL3dwzCv QqQ4wDGPGhnrA5izJZ0ewNwlRAskzfkfcLDJM3MFieAa0Ggm9iG0HnYMF5rQILutk/7II5LYY3oKm I8d9lWAWcioZQtgBgiz+LQf7sj/kNrV2yXMBkbGyp0ks9TxrL7sqF1j3ZfQ/bZ/zJayLZlGX+6vj/ AL5WMVaWCqczFgpxZbmiQ0/OO11zmjqjjulxJf0SYh5q07U17wCsvTzZAh3ZbN54V+eOrboKV/2xW 3X6SCkR8wqiHx6sJAhh+P08UplmA+zhMcvHIGrHmsR19ZsNTa75VGSfyFgsD7bb2x0tTUJObY3gwG LJ7oQrQg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54248) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rl4UP-0001UZ-17; Fri, 15 Mar 2024 10:08:37 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rl4UM-0006J3-VP; Fri, 15 Mar 2024 10:08:34 +0000 Date: Fri, 15 Mar 2024 10:08:34 +0000 From: "Russell King (Oracle)" To: Linus Walleij Cc: Nathan Chancellor , Yipeng Zou , ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH-next] arm: fix clang build warning in include/asm/memory.h Message-ID: References: <20240314075409.2797149-1-zouyipeng@huawei.com> <20240315004352.GA768888@dev-arch.thelio-3990X> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_031100_902094_F0787DF1 X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Fri, Mar 15, 2024 at 08:40:28AM +0100, Linus Walleij wrote: > +1 and I would probably use this as well: > > > > #define IDMAP_INVALID_ADDR PHYS_ADDR_MAX > > if (IS_ENABLED(CONFIG_PHYS_ADDR_T_64BIT) && addr > PHYS_ADDR_MAX) > addr = IDMAP_INVALID_ADDR; > > Because then it is clear what is going on: we are capping to the max physical > address. > > PHYS_ADDR_MAX is defined to (~(phys_addr_t)0) which on > ARM is (~(u32)0). ... which is _not_ the same as (u32)~0, so using PHYS_ADDR_MAX is not appropriate. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel