Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4463154rwb; Sat, 21 Jan 2023 12:29:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXv3TepeYP4altfe6UoAfJPHsPrbsmyCTDZ+sJORLk5dz08k1B8lrXP5pWvVLkmSnXkcxjuj X-Received: by 2002:a17:90b:3601:b0:219:967c:95c3 with SMTP id ml1-20020a17090b360100b00219967c95c3mr20268528pjb.1.1674332983199; Sat, 21 Jan 2023 12:29:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674332983; cv=none; d=google.com; s=arc-20160816; b=HMg9JtO1tIfkWx/pzOGjA0cyx1DLaB8vtVsqJI1oOw0jFAS3D54NA2C/HouYIeLYSD AoWsdIb6O1cpmgxTiJNliUyuz158aJYI5IizyXnvgPp4BD6UjFgpaVp7RKrG0s62IOHT RJ43Q3ZVPQGBfxrEiK8xe0TdhO5dNja1KP1XFHM8ioxI/0qvhaMZFnqgC41lz4NXhbQ/ Mk6Wqg85Yu3hpE86eGW8cv9eTv+tfe7o71Mk+EwfISrgCMnbsZZBhHZb1amx7XEsvIMc 43skJZXg2MtCzmAV995IcB8NFSsSDk2Lp6C4KXLzn9CptJaLAGlvsX0iUVHfxnNC9eVc bkhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GZErTABo/SBODU1OWSG2QbWD8zbMwylRd+dHspExDIU=; b=GBl3Q/XNp59Zve/1KtR+UkchuUQgFK250BoOrmv2p3L/H3gXOy2biXN3EweEmaC0oT 7keW9pIpzjg/5rBsYq8aCcyHYokiThvI6E5RB0fcl3DpFdFOy7AV9U79VgZ/sPcgUXp+ Y980bmkW9dOkuxleUrWzEJti+d7VLY/4MoHlot69jDo4GriVzWsEmtX2wbOsAazWCtpB d64ZVN/WTUOGCthRD/QfcY2AW5JofFlaWz3AfqsvBm4QELaF2g2ZwU+4hlqoxkgyp4Pa 06tbsFuO+U6NwHLZW822SYOmnRfDNXDqmXbgAmWLFNWaCdk/jt02gWK+cjqA9E26A5Mw KvRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=TPbgRb4Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a17090a588b00b0022baf386859si5700682pji.115.2023.01.21.12.29.37; Sat, 21 Jan 2023 12:29:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=TPbgRb4Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbjAUT2D (ORCPT + 50 others); Sat, 21 Jan 2023 14:28:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjAUT2A (ORCPT ); Sat, 21 Jan 2023 14:28:00 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FD4B2A176; Sat, 21 Jan 2023 11:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; 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; bh=GZErTABo/SBODU1OWSG2QbWD8zbMwylRd+dHspExDIU=; b=TPbgRb4Z8Y0H6bStBI39xxYki9 fZKFXz5ZpdFkdoUdCuWwgxRXZjvmm6eOa6TktlEwgK3KlZMSL9iEw2amlmrFUEDEpcWa/1Zj7Z+cL tPR6Uz7dX6BVqN8cTXuesTwVGt10d5/iEuhUiysi1ZW41+EH2oAuyz6K4WoRQvl5uQiAYcyeLnIoD 3mf1wVbOGFYI5nALAFN3clv9m3vrkBuROzhNY/QOiutfppFTITFyuo9SvoWLjy0T6kmBJ05KeEXSU DQjzJn2mBSNjNNLflGAnLi0AK5t3udcXXA6puJn00PSXnOeIj/+GZxNW+BlHz4L8pYQFrb3mS7EYL 2EkHM6Wg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pJJVw-003Jrq-2Z; Sat, 21 Jan 2023 19:26:56 +0000 Date: Sat, 21 Jan 2023 19:26:56 +0000 From: Al Viro To: Ira Weiny Cc: Helge Deller , Matthew Wilcox , "Fabio M. De Francesco" , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-parisc@vger.kernel.org Subject: Re: [PATCH v3 4/4] fs/sysv: Replace kmap() with kmap_local_page() Message-ID: References: <20230119153232.29750-1-fmdefrancesco@gmail.com> <20230119153232.29750-5-fmdefrancesco@gmail.com> <99978295-6643-0cf2-8760-43e097f20dad@gmx.de> <63cb9ce63db7e_c68ad29473@iweiny-mobl.notmuch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63cb9ce63db7e_c68ad29473@iweiny-mobl.notmuch> Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 21, 2023 at 12:05:58AM -0800, Ira Weiny wrote: > First, arn't PAGE_ALIGN_DOWN(addr) and PTR_ALIGN_DOWN(addr, PAGE_SIZE) the > same? > > align.h > #define PTR_ALIGN_DOWN(p, a) ((typeof(p))ALIGN_DOWN((unsigned long)(p), (a))) > > mm.h: > #define PAGE_ALIGN_DOWN(addr) ALIGN_DOWN(addr, PAGE_SIZE) ... and ALIGN_DOWN ends up with doing bitwise and on the first argument. Which doesn't work for pointers, thus the separate variant for those and typecast to unsigned long in it...