[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220331122938.GB26108@lst.de>
Date: Thu, 31 Mar 2022 14:29:38 +0200
From: Christoph Hellwig <hch@....de>
To: Heiko Stuebner <heiko@...ech.de>
Cc: palmer@...belt.com, paul.walmsley@...ive.com,
aou@...s.berkeley.edu, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, wefu@...hat.com,
liush@...winnertech.com, guoren@...nel.org, atishp@...shpatra.org,
anup@...infault.org, drew@...gleboard.org, hch@....de,
arnd@...db.de, wens@...e.org, maxime@...no.tech,
gfavor@...tanamicro.com, andrea.mondelli@...wei.com,
behrensj@....edu, xinhaoqu@...wei.com, mick@....forth.gr,
allen.baum@...erantotech.com, jscheid@...tanamicro.com,
rtrauben@...il.com, samuel@...lland.org, cmuellner@...ux.com,
philipp.tomsich@...ll.eu, Wei Wu <lazyparser@...il.com>,
Daniel Lustig <dlustig@...dia.com>,
Bill Huffman <huffman@...ence.com>
Subject: Re: [PATCH v8 11/14] riscv: add RISC-V Svpbmt extension support
On Thu, Mar 24, 2022 at 01:07:07AM +0100, Heiko Stuebner wrote:
> +asm(ALTERNATIVE("li %0, 0\t\nnop", "li %0, %1\t\nslli %0,%0,%2", 0, \
> + CPUFEATURE_SVPBMT, CONFIG_64BIT) \
> + : "=r"(_val) : "I"(prot##_SVPBMT >> ALT_SVPBMT_SHIFT), "I"(ALT_SVPBMT_SHIFT))
This would be much more readable as;
asm(ALTERNATIVE("li %0, 0\t\nnop", "li %0, %1\t\nslli %0,%0,%2", 0, \
CPUFEATURE_SVPBMT, CONFIG_64BIT) \
: "=r"(_val) \
: "I"(prot##_SVPBMT >> ALT_SVPBMT_SHIFT), \
"I"(ALT_SVPBMT_SHIFT))
Otherwise this looks good to me:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists