From patchwork Fri Jul 27 05:42:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 10546625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 915181822 for ; Fri, 27 Jul 2018 05:43:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84CBB2B58F for ; Fri, 27 Jul 2018 05:43:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 787ED2B591; Fri, 27 Jul 2018 05:43:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 16DE42B592 for ; Fri, 27 Jul 2018 05:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ovQFoRk/Fj8OACwcyGG0bAg5Hwfee1H5OvwJvosfTDA=; b=F3wpClFppPiJWj Wcj6Gp0kX9KYGEiyZ5LubpYNbB7wrG4A6QLZl99LoGjU98OmUSBMiEcO6ZDoPWCa9qnyB+TYiH2tX 0vJMPd+Y9VMsnFKAeyJezWS89sMp1nd5NNS6O/YnLxp0z/PbdBH/3u4tM70rEaq1IubHPpNoIMEqY 6DtBwIsi+SoL27j6tlpjta1awMGSyDjbY/8HsHoPTtLsMv1a56+Zgsb8nj6TqpPpP8Br4ACcnGEQN xUAPLu5NZkOCECnuwdsLyhpgW4y8gSZk/is0vios0Tyi6+UMxliCqGDuVNuQv+k8CAI8eyoyizXqK mGL/MKaXVHXbWl+jB82A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fivWy-00065f-Q8; Fri, 27 Jul 2018 05:43:12 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fivWv-00064i-Fn for linux-arm-kernel@lists.infradead.org; Fri, 27 Jul 2018 05:43:11 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id w6R5gd3o117204; Fri, 27 Jul 2018 00:42:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1532670159; bh=D4NeL9HDeTRqS6Yi3iMlaatPoDeikaS0Fxw6kxSxMuc=; h=To:CC:From:Subject:Date; b=RQxuR9S0kG4PFVdt2KkSSVPNuAVTMhbZo1aaC62WApuReh3ZxoRd2y8d8a39VuxWp 272Rp1XjsAP72a+BkduWU275dr7upQBslZaWbzv7oxR2pevGwqH0a2N9fGtMzbWujb +4NJkaD7pfDUXMHiClQNWXuHStCUaa64KuQDwmeY= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w6R5gd1l002272; Fri, 27 Jul 2018 00:42:39 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 27 Jul 2018 00:42:38 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 27 Jul 2018 00:42:38 -0500 Received: from [172.24.191.45] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w6R5gaxh006247; Fri, 27 Jul 2018 00:42:36 -0500 To: From: Keerthy Subject: ARM: Build failures with CONFIG_HAVE_RCU_TABLE_FREE=y on linux-next Message-ID: <8a8db414-4723-14f2-ef9d-c10aecc80278@ti.com> Date: Fri, 27 Jul 2018 11:12:35 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180726_224309_607264_38F6BECF X-CRM114-Status: GOOD ( 12.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , tony@atomide.com, Tero Kristo , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Russell, commit 2ff6ddf19c0ec40633bd14d8fe28a289816bd98d Author: Rik van Riel Date: Mon Jul 16 15:03:32 2018 -0400 x86/mm/tlb: Leave lazy TLB mode at page table free time On linux-next introduces tlb_flush_remove_tables_local and tlb_flush_remove_tables functions that are more or less for x86 only. I see build failures for standalone dra7 K2 defconfigs and NOT in case of omap2plus_defconfig, reason being CONFIG_HAVE_RCU_TABLE_FREE is defined for the failing defconfigs. I looked at arch/arm/Kconfig which has: select HAVE_RCU_TABLE_FREE if (SMP && ARM_LPAE) So in case of K2G/Keystone/dra7 both SMP and LPAE are defined and hence CONFIG_HAVE_RCU_TABLE_FREE is defined which gives me the following build errors: ti_sdk_dra7x_release_defconfig + make -j16 ARCH=arm O=/home/lcpdbld/jenkins_ws/workspace/linux_next_compile/build_out/kernel/ti_s dk_dra7x_release_defconfig :1332:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp] :1338:2: warning: #warning syscall open_tree not implemented [-Wcpp] :1341:2: warning: #warning syscall move_mount not implemented [-Wcpp] :1344:2: warning: #warning syscall fsopen not implemented [-Wcpp] :1347:2: warning: #warning syscall fsmount not implemented [-Wcpp] :1350:2: warning: #warning syscall fspick not implemented [-Wcpp] :1353:2: warning: #warning syscall fsinfo not implemented [-Wcpp] /scratch/lcpdbld/jenkins_ws/workspace/linux_next_compile/linux- kernel/mm/memory.c: In function ‘tlb_remove_table_smp_sync’: /scratch/lcpdbld/jenkins_ws/workspace/linux_next_compile/linux- kernel/mm/memory.c:339:2: error: implicit declaration of function ‘tlb_flush_remove_tables_local’; did you mean ‘tlb_remove_table’? [- Werror=implicit-function-declaration] tlb_flush_remove_tables_local(mm); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tlb_remove_table /scratch/lcpdbld/jenkins_ws/workspace/linux_next_compile/linux- kernel/mm/memory.c: In function ‘tlb_table_flush’: /scratch/lcpdbld/jenkins_ws/workspace/linux_next_compile/linux- kernel/mm/memory.c:372:2: error: implicit declaration of function ‘tlb_flush_remove_tables’; did you mean ‘tlb_remove_table’? [-Werror=implicit- function-declaration] tlb_flush_remove_tables(tlb->mm); ^~~~~~~~~~~~~~~~~~~~~~~ tlb_remove_table cc1: some warnings being treated as errors make[2]: *** [mm/memory.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [mm] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [sub-make] Error 2 I could fix the above errors with the hunk below: Regards, Keerthy diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index d5562f9..638f2c4 100644 --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h @@ -35,6 +35,15 @@ #define MMU_GATHER_BUNDLE 8 +/* + * Used to flush the TLB when page tables are removed, when lazy + * TLB mode may cause a CPU to retain intermediate translations + * pointing to about-to-be-freed page table memory. + */ +#ifndef HAVE_TLB_FLUSH_REMOVE_TABLES +#define tlb_flush_remove_tables(mm) do {} while (0) +#define tlb_flush_remove_tables_local(mm) do {} while (0) +#endif I am sure there is a better way to fix this. Let me know if this can be fixed in a better way.