Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754259AbbGXQVy (ORCPT ); Fri, 24 Jul 2015 12:21:54 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:24725 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752293AbbGXQVx convert rfc822-to-8bit (ORCPT ); Fri, 24 Jul 2015 12:21:53 -0400 Date: Fri, 24 Jul 2015 17:21:49 +0100 From: Catalin Marinas To: Will Deacon Cc: "Jonathan (Zhixiong) Zhang" , "fu.wei@linaro.org" , "al.stone@linaro.org" , "bp @ alien8 . de Matt Fleming" , "rjw@rjwysocki.net" , "linux-kernel@vger.kernel.org" , "linaro-acpi@lists.linaro.org" Subject: Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes() Message-ID: <20150724162149.GX3550@e104818-lin.cambridge.arm.com> References: <1437515960-16812-1-git-send-email-zjzhang@codeaurora.org> <1437515960-16812-5-git-send-email-zjzhang@codeaurora.org> <20150724145707.GD12569@arm.com> MIME-Version: 1.0 In-Reply-To: <20150724145707.GD12569@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-OriginalArrivalTime: 24 Jul 2015 16:21:49.0585 (UTC) FILETIME=[D7D7D010:01D0C62C] X-MC-Unique: VqDNI6MeTYOiGZfEDS3p6g-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 953 Lines: 26 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) > > +{ > > + 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; > > Can we not use pgprot_noncached and pgprot_writecombine for these two? Actually, why do we even use pgprot_t for prot here? EFI_MEMORY_* don't have anything to do with the arch-specific pgprot_t. -- Catalin -- 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/