From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752812AbaIJRCy (ORCPT ); Wed, 10 Sep 2014 13:02:54 -0400 Received: from g6t1526.atlanta.hp.com ([15.193.200.69]:59423 "EHLO g6t1526.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbaIJRCv (ORCPT ); Wed, 10 Sep 2014 13:02:51 -0400 From: Toshi Kani To: hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, akpm@linux-foundation.org, arnd@arndb.de Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, jgross@suse.com, stefan.bader@canonical.com, luto@amacapital.net, hmh@hmh.eng.br, yigal@plexistor.com, konrad.wilk@oracle.com, Toshi Kani Subject: [PATCH v2 6/6] x86, pat: Update documentation for WT changes Date: Wed, 10 Sep 2014 10:51:50 -0600 Message-Id: <1410367910-6026-7-git-send-email-toshi.kani@hp.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1410367910-6026-1-git-send-email-toshi.kani@hp.com> References: <1410367910-6026-1-git-send-email-toshi.kani@hp.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch updates the PAT documentation file to cover the new WT mapping interfaces. Signed-off-by: Toshi Kani --- Documentation/x86/pat.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation/x86/pat.txt b/Documentation/x86/pat.txt index cf08c9f..445caab 100644 --- a/Documentation/x86/pat.txt +++ b/Documentation/x86/pat.txt @@ -12,7 +12,7 @@ virtual addresses. PAT allows for different types of memory attributes. The most commonly used ones that will be supported at this time are Write-back, Uncached, -Write-combined and Uncached Minus. +Write-combined, Write-through and Uncached Minus. PAT APIs @@ -38,12 +38,17 @@ ioremap_nocache | -- | UC- | UC- | | | | | ioremap_wc | -- | -- | WC | | | | | +ioremap_wt | -- | -- | WT | + | | | | set_memory_uc | UC- | -- | -- | set_memory_wb | | | | | | | | set_memory_wc | WC | -- | -- | set_memory_wb | | | | | | | | +set_memory_wt | *1 | -- | WT | + set_memory_wb | | | | + | | | | pci sysfs resource | -- | -- | UC- | | | | | pci sysfs resource_wc | -- | -- | WC | @@ -79,6 +84,7 @@ pci proc | -- | -- | WC | MTRR says !WB | | | | | | | | ------------------------------------------------------------------- +*1: -EINVAL due to the current limitation in reserve_memtype(). Advanced APIs for drivers ------------------------- @@ -115,8 +121,8 @@ can be more restrictive, in case of any existing aliasing for that address. For example: If there is an existing uncached mapping, a new ioremap_wc can return uncached mapping in place of write-combine requested. -set_memory_[uc|wc] and set_memory_wb should be used in pairs, where driver will -first make a region uc or wc and switch it back to wb after use. +set_memory_[uc|wc|wt] and set_memory_wb should be used in pairs, where driver +will first make a region uc, wc or wt and switch it back to wb after use. Over time writes to /proc/mtrr will be deprecated in favor of using PAT based interfaces. Users writing to /proc/mtrr are suggested to use above interfaces. @@ -126,6 +132,8 @@ types. Drivers should use set_memory_[uc|wc] to set access type for RAM ranges. +Drivers may map the entire NV-DIMM range with ioremap_cache and then change +a specific range to wt with set_memory_wt. PAT debugging -------------