Re: [PATCH V3 09/30] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Anshuman Khandual <anshuman.khandual@xxxxxxx>
- Subject: Re: [PATCH V3 09/30] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT
- From: "Russell King (Oracle)" <linux@xxxxxxxxxxxxxxx>
- Date: Wed, 2 Mar 2022 11:19:22 +0000
- Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "linux-sh@xxxxxxxxxxxxxxx" <linux-sh@xxxxxxxxxxxxxxx>, "linux-mips@xxxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxxx>, "linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "linux-riscv@xxxxxxxxxxxxxxxxxxx" <linux-riscv@xxxxxxxxxxxxxxxxxxx>, "linux-arch@xxxxxxxxxxxxxxx" <linux-arch@xxxxxxxxxxxxxxx>, "linux-s390@xxxxxxxxxxxxxxx" <linux-s390@xxxxxxxxxxxxxxx>, "linux-hexagon@xxxxxxxxxxxxxxx" <linux-hexagon@xxxxxxxxxxxxxxx>, "linux-csky@xxxxxxxxxxxxxxx" <linux-csky@xxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, "linux-snps-arc@xxxxxxxxxxxxxxxxxxx" <linux-snps-arc@xxxxxxxxxxxxxxxxxxx>, "linux-xtensa@xxxxxxxxxxxxxxxx" <linux-xtensa@xxxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, "linux-um@xxxxxxxxxxxxxxxxxxx" <linux-um@xxxxxxxxxxxxxxxxxxx>, "linux-m68k@xxxxxxxxxxxxxxxxxxxx" <linux-m68k@xxxxxxxxxxxxxxx>, "openrisc@xxxxxxxxxxxxxxxxxxxx" <openrisc@xxxxxxxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-parisc@xxxxxxxxxxxxxxx" <linux-parisc@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-alpha@xxxxxxxxxxxxxxx" <linux-alpha@xxxxxxxxxxxxxxx>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>
- In-reply-to: <b1eca2cd-36e6-3a9a-9fe7-70fc0caed7a9@arm.com>
- References: <1646045273-9343-10-git-send-email-anshuman.khandual@arm.com> <Yhyqjo/4bozJB6j5@shell.armlinux.org.uk> <542fa048-131e-240b-cc3a-fd4fff7ce4ba@arm.com> <Yh1pYAOiskEQes3p@shell.armlinux.org.uk> <dc3c95a4-de06-9889-ce1e-f660fc9fbb95@csgroup.eu> <c3b60de0-38cd-160a-aa15-831349e07e23@arm.com> <52866c88-59f9-2d1c-6f5a-5afcaf23f2bb@csgroup.eu> <9caa90f5-c10d-75dd-b403-1388b7a3d296@arm.com> <CAMuHMdU11kaOzanhHZRH+mLTJzaz-i=PnKdK7NF9V-qx6kp8wg@mail.gmail.com> <b1eca2cd-36e6-3a9a-9fe7-70fc0caed7a9@arm.com>
On Wed, Mar 02, 2022 at 04:36:52PM +0530, Anshuman Khandual wrote:
> On 3/2/22 3:35 PM, Geert Uytterhoeven wrote:
> > I doubt the switch() variant would give better code on any platform.
> >
> > What about using tables everywhere, using designated initializers
> > to improve readability?
>
> Designated initializers ? Could you please be more specific. A table look
> up on arm platform would be something like this and arm_protection_map[]
> needs to be updated with user_pgprot like before.
There is *absolutely* nothing wrong with that. Updating it once during
boot is way more efficient than having to compute the value each time
vm_get_page_prot() gets called.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]