Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754399AbbETToc (ORCPT ); Wed, 20 May 2015 15:44:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40396 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751609AbbETTo3 (ORCPT ); Wed, 20 May 2015 15:44:29 -0400 Date: Wed, 20 May 2015 12:44:28 -0700 From: Andrew Morton To: "Aneesh Kumar K.V" Cc: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, kirill.shutemov@linux.intel.com, aarcange@redhat.com, schwidefsky@de.ibm.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH V5 2/3] powerpc/mm: Use generic version of pmdp_clear_flush Message-Id: <20150520124428.9bab9007d7d589ec4b615ee6@linux-foundation.org> In-Reply-To: <1431704550-19937-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1431704550-19937-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1431704550-19937-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1768 Lines: 43 On Fri, 15 May 2015 21:12:29 +0530 "Aneesh Kumar K.V" wrote: > Also move the pmd_trans_huge check to generic code. > > ... > > --- a/include/asm-generic/pgtable.h > +++ b/include/asm-generic/pgtable.h > @@ -196,7 +196,12 @@ static inline pmd_t pmdp_collapse_flush(struct vm_area_struct *vma, > unsigned long address, > pmd_t *pmdp) > { > - return pmdp_clear_flush(vma, address, pmdp); > + pmd_t pmd; > + VM_BUG_ON(address & ~HPAGE_PMD_MASK); > + VM_BUG_ON(pmd_trans_huge(*pmdp)); > + pmd = pmdp_get_and_clear(vma->vm_mm, address, pmdp); > + flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE); > + return pmd; > } x86_64 allmodconfig: In file included from ./arch/x86/include/asm/pgtable.h:878, from include/linux/mm.h:53, from include/linux/suspend.h:8, from arch/x86/kernel/asm-offsets.c:12: include/asm-generic/pgtable.h: In function 'pmdp_collapse_flush': include/asm-generic/pgtable.h:199: error: 'HPAGE_PMD_MASK' undeclared (first use in this function) include/asm-generic/pgtable.h:199: error: (Each undeclared identifier is reported only once include/asm-generic/pgtable.h:199: error: for each function it appears in.) include/asm-generic/pgtable.h:202: error: implicit declaration of function 'flush_tlb_range' include/asm-generic/pgtable.h:202: error: 'HPAGE_PMD_SIZE' undeclared (first use in this function) Including linux/huge_mm.h doesn't work. A suitable fix would be to move this into a .c file. -- 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/