Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp513939ybi; Wed, 3 Jul 2019 00:16:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqywnAaQzlJED22Topm05FdIgy+NZw5u6afhgRy+RzuS3A9qEKVyfKR/SX1bXOxZR/PWOJRo X-Received: by 2002:a17:902:f087:: with SMTP id go7mr40505437plb.330.1562138167244; Wed, 03 Jul 2019 00:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562138167; cv=none; d=google.com; s=arc-20160816; b=Uozlo2xyOnBdzJfSE/tJGfdYH36gErC5nrKmxIJ0Wn65a7vn0KvHWkpFER3hck4W7y +BwBVPuEkjXY0OfZegZxiETHgv/zyOA2u58BmphSwROeDjLDUIW7Q8cZYA9KLsGg46Rc 9puauGmejqO1GDjA7axIC0laYQK0cZPKJYkk40fsmAb/NIblv8/IsHKIQ5TriTUILRAR vDQeFn8LyogO/9K2zeop1CaiZUmmNFzB6rWw5nWSGh/UK/tVkkefz/t1GrYvKlHD5Cix 3OIe/QVFNAdnDsSNy3JP72zlPw4fkFVpI839lb8Jgwbf8tFBNVLCkxTamoOXmjXrpMpj LTIA== 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:cc:to:from; bh=2mFcMeeg2rlqe6ogUMwdbY/ZnqwhxbuwUlkai/MVFEE=; b=by/06W5UxWWJnUT32dBHxUU5eoQ3ILFeMtpJW743gbUBXw0xcVR0cvlq5M390ED/5b 01icCvnZ09oHfZNOOLK4dU9dEQEyV3vTwxKcf1KPPMgYVjoQ7XWXSHRUZYf1DhFT9at1 bB/axhqt9/e3uMe5ySd8WYYOmITBByWGnar1NImsxL4h2AhQw2oYXXQXs9ND3kgmlgyb RDtbYqdZJjUoPe5AMAZtAzAaXmKHt8UbB9sbMShGFnnB8fL+xhE3YBu8NCu5kYlnbnIk fcoct+MsCVnBZRxs4JbXLeZsuwJG/Cl6f8Jojqu7+U+aMXPF7Y8FrM/dI08IcV/SkizS MsPQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si1409009pgv.448.2019.07.03.00.15.49; Wed, 03 Jul 2019 00:16:07 -0700 (PDT) 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; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727220AbfGCHOH (ORCPT + 99 others); Wed, 3 Jul 2019 03:14:07 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42245 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727205AbfGCHOG (ORCPT ); Wed, 3 Jul 2019 03:14:06 -0400 Received: by mail-pg1-f193.google.com with SMTP id t132so717036pgb.9 for ; Wed, 03 Jul 2019 00:14:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2mFcMeeg2rlqe6ogUMwdbY/ZnqwhxbuwUlkai/MVFEE=; b=dMiL352Hfs+GGD89/KamAPwbt5Me9eY0Gzx8JOa3JCTAyZD6jNSvMzsJkE6vsJSIsn SYDtIf4W1gfOINpyMZiclnhWLdrKWSPyCKNbgIFWpTr2wnlu/P5piPWZnmp5ArIuOJmL 4XnBYAiSq86ayAPk3qWtFOUUmFGkvAvdGjceLaFKy3LQafoI6ilKiIaDhl8xA8rtae/+ dvMVNRzen16TCszPCDrlAN4m5ep7jQfaJi7lF7ZBLnkOs+Sjnty3sHQ40v+0ExuLtunt tNmWPhjWy/aZfGVNF3eOUrT3PjCScJ62+0i1fGp1STWNWfVNcDx41/nZ5XxmB7A1nGBI 2NSA== X-Gm-Message-State: APjAAAX3Cgv6Vzr4axlH6U2v6hAv6n/2ZmFJ7pbqqb74IjfbBWaBR8gd Mb74IUs24AP3dASm5GFo64Q= X-Received: by 2002:a17:90a:ca0f:: with SMTP id x15mr10588302pjt.82.1562138045528; Wed, 03 Jul 2019 00:14:05 -0700 (PDT) Received: from sc2-haas01-esx0118.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id j21sm1256593pfh.86.2019.07.03.00.14.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 00:14:04 -0700 (PDT) From: Nadav Amit To: Andy Lutomirski , Dave Hansen Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Nadav Amit , Rik van Riel , Josh Poimboeuf Subject: [PATCH v2 2/9] x86/mm/tlb: Remove reason as argument for flush_tlb_func_local() Date: Tue, 2 Jul 2019 16:51:44 -0700 Message-Id: <20190702235151.4377-3-namit@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190702235151.4377-1-namit@vmware.com> References: <20190702235151.4377-1-namit@vmware.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To use flush_tlb_func_local() as an argument to __smp_call_function_many() we need it to have a single (void *) parameter. Eliminate the second parameter and deduce the reason for the flush. Cc: Peter Zijlstra Cc: Dave Hansen Cc: Rik van Riel Cc: Thomas Gleixner Cc: Andy Lutomirski Cc: Josh Poimboeuf Signed-off-by: Nadav Amit --- arch/x86/mm/tlb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 91f6db92554c..8a957b58525f 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -635,9 +635,12 @@ static void flush_tlb_func_common(const struct flush_tlb_info *f, this_cpu_write(cpu_tlbstate.ctxs[loaded_mm_asid].tlb_gen, mm_tlb_gen); } -static void flush_tlb_func_local(const void *info, enum tlb_flush_reason reason) +static void flush_tlb_func_local(void *info) { const struct flush_tlb_info *f = info; + enum tlb_flush_reason reason; + + reason = (f->mm == NULL) ? TLB_LOCAL_SHOOTDOWN : TLB_LOCAL_MM_SHOOTDOWN; flush_tlb_func_common(f, true, reason); } @@ -790,7 +793,7 @@ void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, if (mm == this_cpu_read(cpu_tlbstate.loaded_mm)) { lockdep_assert_irqs_enabled(); local_irq_disable(); - flush_tlb_func_local(info, TLB_LOCAL_MM_SHOOTDOWN); + flush_tlb_func_local(info); local_irq_enable(); } @@ -862,7 +865,7 @@ void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch) if (cpumask_test_cpu(cpu, &batch->cpumask)) { lockdep_assert_irqs_enabled(); local_irq_disable(); - flush_tlb_func_local(&full_flush_tlb_info, TLB_LOCAL_SHOOTDOWN); + flush_tlb_func_local(&full_flush_tlb_info); local_irq_enable(); } -- 2.17.1