Received: by 10.223.185.116 with SMTP id b49csp3214712wrg; Mon, 5 Mar 2018 16:43:46 -0800 (PST) X-Google-Smtp-Source: AG47ELsOQpjmmDMNRN2i41BQyrAm/Fkige1mUbmuzltLTZnBMnmRKrGd7miuDFj5ZNeWUyQFh0ZL X-Received: by 2002:a17:902:64d7:: with SMTP id y23-v6mr14730406pli.258.1520297026382; Mon, 05 Mar 2018 16:43:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520297026; cv=none; d=google.com; s=arc-20160816; b=fmOZkQ5zPE0D2obdzg+9D6bG8TzFaV9uUNnOcntU2szJct176Bq2vzlcvwz3xJNQVW FVMcwcwi3T5TUVX4J6n/tc8ysa7cP/NJylANQrTB1gnH7cfYfHdEvpwI7k2t4aFN4BKJ O8Wpx0kHUV9S2TFcyNlPCWiktkeyrIXFiSeaRC5tb3Rfzo/vpyfLls6ye//TwObIkT2c g4S8zMJcliPz/jepVZfblmbNfCoYqJEuat3fk5Nfbvp3FjHTCEgKTUK1JSCQ11OIgMKK ijwmD89fYzeCiT6v6sYoehz9mlDUlwQP1y9mRpA4Rq5MgnI1DuKgAoprBYTShUYLEaPb dUlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=8uaeY7VVV2WAyKE3bAx1MtEhAk8ueaA2hzkbsEkt94g=; b=GfvFAQ4N6YdcJVj88ErvIz/wL4DOo33KJSAnCToW3UpRB2fZc/3CxScNfIfjc+lJ1B kgN8KrlZQu/53M118TjkvdBOWrbxiQ9Mrjkt+umgemBwuV1DOlEBMORBZvsr03dk4Gqw jWCRRe9FY2xuWy558lDFe06mms5IRjncCbrqp/tkybYFKJrCVlM1PYbcSQCAQ9UwVbC8 0dZSzBRGWcm4ctUP7yraX2vRs/MPNf3QPdSQ94myEVa7h16uLlfkVojX1juLJGSD/o+B 4tgE7RAWdP6pVoGNV7LWGtaqXcGmZZLvh7XpBmnIAbGIc9dUL63HRwOb13DTy7OwqdT2 gjsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=Br4GL93I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n59-v6si10074949plb.690.2018.03.05.16.43.32; Mon, 05 Mar 2018 16:43:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=Br4GL93I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933158AbeCFAk6 (ORCPT + 99 others); Mon, 5 Mar 2018 19:40:58 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:34746 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932871AbeCFA0I (ORCPT ); Mon, 5 Mar 2018 19:26:08 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w260Lo5p115110; Tue, 6 Mar 2018 00:26:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=8uaeY7VVV2WAyKE3bAx1MtEhAk8ueaA2hzkbsEkt94g=; b=Br4GL93Id3kmvELn5ST7biqg+/629I0VtfyaGr1xqoQiewEQop39A3RBx/Jr8D94Cdls g1NAP8ETLdR10OrCxhIp7VFkh+yNm16OmQN6FU++kNY35qLmjaSQz02yd6dRHGxns9W1 fL5o2N0HcoUlFDVGxnPPmHPboyO3wOJgSaPG+nCo9goScUp+oaHrRM5Hb7zvpSPukSti cpD5lxKeD5kXzN/7kD8m4h3Wr/Bar/A7OKcxA6XvR82QnY/v3IvRGO5GBJs1tySv2mxz 3+p1fiK3FlKG3eCO/klQ33kamN/T5tXxmODyk7jjuseCCcSxXam83l3yGktlGSICD/yU rg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2ghdxf8k4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Mar 2018 00:26:04 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w260Q3ox024692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Mar 2018 00:26:03 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w260Q279029030; Tue, 6 Mar 2018 00:26:02 GMT Received: from localhost.localdomain (/98.216.35.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Mar 2018 16:26:02 -0800 From: Pavel Tatashin To: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, Alexander.Levin@microsoft.com, dan.j.williams@intel.com, sathyanarayanan.kuppuswamy@intel.com, pankaj.laxminarayan.bharadiya@intel.com, akuster@mvista.com, cminyard@mvista.com, pasha.tatashin@oracle.com, gregkh@linuxfoundation.org, stable@vger.kernel.org Subject: [PATCH 4.1 07/65] x86/mm: Build arch/x86/mm/tlb.c even on !SMP Date: Mon, 5 Mar 2018 19:24:40 -0500 Message-Id: <20180306002538.1761-8-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180306002538.1761-1-pasha.tatashin@oracle.com> References: <20180306002538.1761-1-pasha.tatashin@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8823 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803060003 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Lutomirski commit e1074888c326038340a1ada9129d679e661f2ea6 upstream. Currently all of the functions that live in tlb.c are inlined on !SMP builds. One can debate whether this is a good idea (in many respects the code in tlb.c is better than the inlined UP code). Regardless, I want to add code that needs to be built on UP and SMP kernels and relates to tlb flushing, so arrange for tlb.c to be compiled unconditionally. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f0d778f0d828fc46e5d1946bca80f0aaf9abf032.1461688545.git.luto@kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 83cc4b50e3a977915666ade0b951ba446e7181bd) Signed-off-by: Pavel Tatashin --- arch/x86/mm/Makefile | 3 +-- arch/x86/mm/tlb.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile index a482d105172b..d893640d5c68 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile @@ -1,5 +1,5 @@ obj-y := init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ - pat.o pgtable.o physaddr.o gup.o setup_nx.o + pat.o pgtable.o physaddr.o gup.o setup_nx.o tlb.o # Make sure __phys_addr has no stackprotector nostackp := $(call cc-option, -fno-stack-protector) @@ -9,7 +9,6 @@ CFLAGS_setup_nx.o := $(nostackp) CFLAGS_fault.o := -I$(src)/../include/asm/trace obj-$(CONFIG_X86_PAT) += pat_rbtree.o -obj-$(CONFIG_SMP) += tlb.o obj-$(CONFIG_X86_32) += pgtable_32.o iomap_32.o diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 061e0114005e..a1aa5f59e3ad 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -28,6 +28,8 @@ * Implement flush IPI by CALL_FUNCTION_VECTOR, Alex Shi */ +#ifdef CONFIG_SMP + struct flush_tlb_info { struct mm_struct *flush_mm; unsigned long flush_start; @@ -346,3 +348,5 @@ static int __init create_tlb_single_page_flush_ceiling(void) return 0; } late_initcall(create_tlb_single_page_flush_ceiling); + +#endif /* CONFIG_SMP */ -- 2.16.2