[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8w8gJZBCNqKaYXs@ZenIV>
Date: Sat, 21 Jan 2023 19:26:56 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Ira Weiny <ira.weiny@...el.com>
Cc: Helge Deller <deller@....de>, Matthew Wilcox <willy@...radead.org>,
"Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Christoph Hellwig <hch@...radead.org>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-parisc@...r.kernel.org
Subject: Re: [PATCH v3 4/4] fs/sysv: Replace kmap() with kmap_local_page()
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...
Powered by blists - more mailing lists