Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-28 Thread Zhang, Jonathan Zhixiong
On 7/27/2015 2:54 AM, Matt Fleming wrote: On Mon, 2015-07-27 at 10:45 +0100, Will Deacon wrote: That bit's fine. The weird bit is: pgprot_t prot; prot = efi_mem_attributes(addr); Since that's putting the arch-independent format into the pg_prot. Oops, missed that. Yeah that's funky.

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-28 Thread Zhang, Jonathan Zhixiong
On 7/27/2015 2:54 AM, Matt Fleming wrote: On Mon, 2015-07-27 at 10:45 +0100, Will Deacon wrote: That bit's fine. The weird bit is: pgprot_t prot; prot = efi_mem_attributes(addr); Since that's putting the arch-independent format into the pg_prot. Oops, missed that. Yeah that's funky.

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-27 Thread Matt Fleming
On Mon, 2015-07-27 at 10:45 +0100, Will Deacon wrote: > > That bit's fine. The weird bit is: > > pgprot_t prot; > > prot = efi_mem_attributes(addr); > > Since that's putting the arch-independent format into the pg_prot. Oops, missed that. Yeah that's funky. > > I don't see how you can do

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-27 Thread Will Deacon
On Mon, Jul 27, 2015 at 10:38:11AM +0100, Matt Fleming wrote: > On Fri, 2015-07-24 at 17:26 +0100, Will Deacon wrote: > > On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: > > > On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: > > > > On Tue, Jul 21, 2015 at 10:59:19PM

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-27 Thread Matt Fleming
On Fri, 2015-07-24 at 17:26 +0100, Will Deacon wrote: > On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: > > On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: > > > On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: > > > > diff --git

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-27 Thread Matt Fleming
On Fri, 2015-07-24 at 17:26 +0100, Will Deacon wrote: On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: diff --git

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-27 Thread Will Deacon
On Mon, Jul 27, 2015 at 10:38:11AM +0100, Matt Fleming wrote: On Fri, 2015-07-24 at 17:26 +0100, Will Deacon wrote: On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: On Tue, Jul 21, 2015 at 10:59:19PM +0100,

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-27 Thread Matt Fleming
On Mon, 2015-07-27 at 10:45 +0100, Will Deacon wrote: That bit's fine. The weird bit is: pgprot_t prot; prot = efi_mem_attributes(addr); Since that's putting the arch-independent format into the pg_prot. Oops, missed that. Yeah that's funky. I don't see how you can do that any

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Zhang, Jonathan Zhixiong
On 7/23/2015 7:59 PM, Hanjun Guo wrote: On 07/22/2015 05:59 AM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE. Otherwise, the page

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Zhang, Jonathan Zhixiong
On 7/24/2015 9:26 AM, Will Deacon wrote: On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: diff --git a/arch/arm64/include/asm/acpi.h

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Will Deacon
On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: > On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: > > On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: > > > diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h > > >

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Catalin Marinas
On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: > On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: > > diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h > > +static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr) > > +{

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Will Deacon
On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: > From: "Jonathan (Zhixiong) Zhang" > > If the physical address has memory attributes defined by EFI > memmap as EFI_MEMORY_UC, the page protection type is > PROT_DEVICE_nGnRE. Otherwise, the page protection type is >

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Will Deacon
On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h +static

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Will Deacon
On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: From: Jonathan (Zhixiong) Zhang zjzh...@codeaurora.org If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE. Otherwise, the page

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Catalin Marinas
On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h +static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr) +{ +

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Zhang, Jonathan Zhixiong
On 7/24/2015 9:26 AM, Will Deacon wrote: On Fri, Jul 24, 2015 at 05:21:49PM +0100, Catalin Marinas wrote: On Fri, Jul 24, 2015 at 03:57:08PM +0100, Will Deacon wrote: On Tue, Jul 21, 2015 at 10:59:19PM +0100, Jonathan (Zhixiong) Zhang wrote: diff --git a/arch/arm64/include/asm/acpi.h

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-24 Thread Zhang, Jonathan Zhixiong
On 7/23/2015 7:59 PM, Hanjun Guo wrote: On 07/22/2015 05:59 AM, Jonathan (Zhixiong) Zhang wrote: From: Jonathan (Zhixiong) Zhang zjzh...@codeaurora.org If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE.

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-23 Thread Hanjun Guo
On 07/22/2015 05:59 AM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE. Otherwise, the page protection type is PAGE_KERNEL. ... [...]

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-23 Thread Hanjun Guo
On 07/22/2015 05:59 AM, Jonathan (Zhixiong) Zhang wrote: From: Jonathan (Zhixiong) Zhang zjzh...@codeaurora.org If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE. Otherwise, the page protection type is

[PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-21 Thread Jonathan (Zhixiong) Zhang
From: "Jonathan (Zhixiong) Zhang" If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE. Otherwise, the page protection type is PAGE_KERNEL. Signed-off-by: Jonathan (Zhixiong) Zhang --- This patch applies cleanly to

[PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-21 Thread Jonathan (Zhixiong) Zhang
From: Jonathan (Zhixiong) Zhang zjzh...@codeaurora.org If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_UC, the page protection type is PROT_DEVICE_nGnRE. Otherwise, the page protection type is PAGE_KERNEL. Signed-off-by: Jonathan (Zhixiong) Zhang