Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965051AbdCXQGJ (ORCPT ); Fri, 24 Mar 2017 12:06:09 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:32820 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934204AbdCXQFu (ORCPT ); Fri, 24 Mar 2017 12:05:50 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Arnd Bergmann Date: Fri, 24 Mar 2017 17:05:48 +0100 X-Google-Sender-Auth: wmil4gpmgQhtPBrN3TRK3e0GzGg Message-ID: Subject: Re: [PATCH 03/17] pci: Only allow WC mmap on prefetchable resources To: David Woodhouse Cc: linux-pci , linux-arch , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 644 Lines: 17 On Wed, Mar 22, 2017 at 2:25 PM, David Woodhouse wrote: > From: David Woodhouse > > The /proc/bus/pci mmap interface allows the user to specify whether they > want WC or not. Don't let them do so on non-prefetchable BARs. > > Signed-off-by: David Woodhouse > Cc: stable@vger.kernel.org Can you explain this a little more? I understand that we usually want to use WC mappings on prefetchable BARs, and uncached non-WC on non-prefetchable, but why do we have to force an error here? Couldn't there be some hardware that allows write-combining access but no prefetches? Arnd