Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753482AbbGXC72 (ORCPT ); Thu, 23 Jul 2015 22:59:28 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:35073 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752208AbbGXC70 (ORCPT ); Thu, 23 Jul 2015 22:59:26 -0400 Message-ID: <55B1AA08.3020706@linaro.org> Date: Fri, 24 Jul 2015 10:59:20 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Jonathan (Zhixiong) Zhang" , catalin.marinas@arm.com, will.deacon@arm.com, fu.wei@linaro.org, al.stone@linaro.org, "bp @ alien8 . de Matt Fleming" , rjw@rjwysocki.net CC: linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org Subject: Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes() References: <1437515960-16812-1-git-send-email-zjzhang@codeaurora.org> <1437515960-16812-5-git-send-email-zjzhang@codeaurora.org> In-Reply-To: <1437515960-16812-5-git-send-email-zjzhang@codeaurora.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1323 Lines: 44 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. ... [...] > +#ifdef CONFIG_ACPI_APEI > +/* > + * According to "Table 8 Map: EFI memory types to AArch64 memory types" > + * of UEFI 2.5 section 2.3.6.1, each EFI memory type is mapped to > + * corresponding MAIR attribute encoding. > + */ > +static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr) > +{ > + pgprot_t prot; > + > + prot = efi_mem_attributes(addr); > + if (prot & EFI_MEMORY_UC) > + return PROT_DEVICE_nGnRnE; > + if (prot & EFI_MEMORY_WC) > + return PROT_NORMAL_NC; > + if (prot & EFI_MEMORY_WT) > + return PROT_NORMAL_WT; > + return PAGE_KERNEL; > +} The change log is not matching the code here, and the PROT_DEVICE_nGnRE in the change log is wrong, if you fix that, Acked-by: Hanjun Guo Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/