From patchwork Fri Oct 5 22:01:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 189609 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BF2842C0040 for ; Sat, 6 Oct 2012 08:01:28 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932409Ab2JEWBM (ORCPT ); Fri, 5 Oct 2012 18:01:12 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52686 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754583Ab2JEWBL (ORCPT ); Fri, 5 Oct 2012 18:01:11 -0400 Received: from akpm.mtv.corp.google.com (216-239-45-4.google.com [216.239.45.4]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EEEF054F; Fri, 5 Oct 2012 22:01:10 +0000 (UTC) Date: Fri, 5 Oct 2012 15:01:10 -0700 From: Andrew Morton To: David Miller Cc: linux-mm@kvack.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, aarcange@redhat.com, hannes@cmpxchg.org, Gerald Schaefer Subject: Re: [PATCH v2 5/7] mm: Add and use update_mmu_cache_pmd() in transparent huge page code. Message-Id: <20121005150110.fdf08c96.akpm@linux-foundation.org> In-Reply-To: <20121004.154738.461031090401264236.davem@davemloft.net> References: <20121004.154738.461031090401264236.davem@davemloft.net> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org On Thu, 04 Oct 2012 15:47:38 -0400 (EDT) David Miller wrote: > The transparent huge page code passes a PMD pointer in as the third > argument of update_mmu_cache(), which expects a PTE pointer. > > This never got noticed because X86 implements update_mmu_cache() as a > macro and thus we don't get any type checking, and X86 is the only > architecture which supports transparent huge pages currently. > > Before oter architectures can support transparent huge pages properly > we need to add a new interface which will take a PMD pointer as the > third argument rather than a PTE pointer. I'll toss this on top: --- a/arch/s390/include/asm/pgtable.h~mm-add-and-use-update_mmu_cache_pmd-in-transparent-huge-page-code-fix +++ a/arch/s390/include/asm/pgtable.h @@ -42,6 +42,7 @@ extern void fault_init(void); * tables contain all the necessary information. */ #define update_mmu_cache(vma, address, ptep) do { } while (0) +#define update_mmu_cache_pmd(vma, address, ptep) do { } while (0) /* * ZERO_PAGE is a global shared page that is always zero; used