From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752201AbbCDXQU (ORCPT ); Wed, 4 Mar 2015 18:16:20 -0500 Received: from g9t5008.houston.hp.com ([15.240.92.66]:55155 "EHLO g9t5008.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750786AbbCDXQT (ORCPT ); Wed, 4 Mar 2015 18:16:19 -0500 X-Greylist: delayed 86467 seconds by postgrey-1.27 at vger.kernel.org; Wed, 04 Mar 2015 18:16:19 EST Message-ID: <1425510939.17007.271.camel@misato.fc.hp.com> Subject: Re: [PATCH v3 3/6] mm: Change ioremap to set up huge I/O mappings From: Toshi Kani To: Ingo Molnar Cc: akpm@linux-foundation.org, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, arnd@arndb.de, linux-mm@kvack.org, x86@kernel.org, linux-kernel@vger.kernel.org, dave.hansen@intel.com, Elliott@hp.com Date: Wed, 04 Mar 2015 16:15:39 -0700 In-Reply-To: <20150304220912.GA22518@gmail.com> References: <1425404664-19675-1-git-send-email-toshi.kani@hp.com> <1425404664-19675-4-git-send-email-toshi.kani@hp.com> <20150304220912.GA22518@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-03-04 at 23:09 +0100, Ingo Molnar wrote: > * Toshi Kani wrote: : > Hm, so I don't see where you set the proper x86 PAT table attributes > for the pmds. > > MTRR's are basically a legacy mechanism, the proper way to set cache > attribute is PAT and I don't see where this generic code does that, > but I might be missing something? It's done by x86 code, not by this generic code. __ioremap_caller() takes page_cache_mode and converts it to pgprot_t using the PAT table attribute. It then calls this generic func, ioremap_page_range(). When creating a huge page mapping, pud_set_huge() and pmd_set_huge() handle the relocation of the PAT bit. Thanks, -Toshi