[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190820071639.GA2335@infradead.org>
Date: Tue, 20 Aug 2019 00:16:40 -0700
From: "hch@...radead.org" <hch@...radead.org>
To: Andreas Schwab <schwab@...ux-m68k.org>
Cc: "hch@...radead.org" <hch@...radead.org>,
Atish Patra <atish.patra@....com>,
Albert Ou <aou@...s.berkeley.edu>,
Anup Patel <anup@...infault.org>,
Palmer Dabbelt <palmer@...ive.com>,
linux-kernel@...r.kernel.org,
Paul Walmsley <paul.walmsley@...ive.com>,
linux-riscv@...ts.infradead.org,
Allison Randal <allison@...utok.net>
Subject: Re: [v2 PATCH] RISC-V: Optimize tlb flush path.
On Tue, Aug 20, 2019 at 09:14:58AM +0200, Andreas Schwab wrote:
> On Aug 19 2019, "hch@...radead.org" <hch@...radead.org> wrote:
>
> > This looks a little odd to m and assumes we never pass a size smaller
> > than PAGE_SIZE. Whule that is probably true, why not something like:
> >
> > if (size < PAGE_SIZE && size != -1)
>
> ITYM size <= PAGE_SIZE. And since size is unsigned it cannot be == -1
> at the same time.
Yes, the <= was obvious, that's what you get for hacking up a demo
patch on the plan. And true for the -1. That being said I find the
-1 convention rather annoying, a ULONG_MAX in the callers would be
a lot more obvious.
Powered by blists - more mailing lists