Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2339783imm; Sat, 28 Jul 2018 14:58:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeL9IeiDXG9o2kz530fEbFqEKtfpUPrn5BQRFGHo7a51FtvKWwidTN87rhGL5HM74u6y5v0 X-Received: by 2002:a17:902:201:: with SMTP id 1-v6mr11101924plc.310.1532815134958; Sat, 28 Jul 2018 14:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532815134; cv=none; d=google.com; s=arc-20160816; b=ykwbw7/6CT78G6J8GcUzsG+tgQZKP8fUSUE0UCBghbg+vNcv47jrMvKNdlh/7TYz3R 8DrAtTgaDq4uI0bFrJGk5stdF8q+qkxtZ0BatRtaamByf2p2AgV1byg58oNZjJB45UnT gM1eZxW8iPa6QPQuUbYXMlCLqtIOAEBeTjsfwr97vTf1mVeDwIbMN6RQwB3AiqrnSm8+ 9NmppffQjF8iNldu1W7o+RcrNjEaaUidB6kixoQIUjS7Q80tgqVr89DZUmowaoAl6nHm zbfQg7CbK81cbxReO3qKDCOrdokt5ZFNL7k24wdaE8Nmpz0R/XmhtCnz9tnmxNY5/1d0 T/AA== 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:arc-authentication-results; bh=QYBeAkxelt8vYRfb5uDA5c/sErgHGiJgZObPqhh5mSk=; b=OwfBsSflyEWNtBkYn76SUUGXBCpgk2fKKqZknB4zV4of1KQcnN4PXFpmlYd0y9FjfZ Isn28Kw6u+KbMaWtLB29FwGgPCsXHZd094st1V0TpHD20m+3NcEBJ5rrisGMxnrxhGJG prjimbzOnHNbRVm6E4jZ9T09MoMp/vImvluIE4bL1nqVWsqiywztyRh4lrGcAreZu4E9 /qv7sFz/z8deDu0VrvlDRk7AuVURbQhpDvbePF2BKHefoPFdZwDn3AjcJBL7POrT7Vkd Q65s6rh/oE27pLFqv5JLT2cCoAiVfct3nFH3s1XHoXg8NF8wJvV0PYW6Au8YJFApGrYC PFIw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d30-v6si3526786pld.452.2018.07.28.14.58.41; Sat, 28 Jul 2018 14:58:54 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731361AbeG1XWU (ORCPT + 99 others); Sat, 28 Jul 2018 19:22:20 -0400 Received: from shelob.surriel.com ([96.67.55.147]:44082 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731345AbeG1XWU (ORCPT ); Sat, 28 Jul 2018 19:22:20 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fjXA0-0000QZ-Qa; Sat, 28 Jul 2018 17:54:00 -0400 From: Rik van Riel To: linux-kernel@vger.kernel.org Cc: kernel-team@fb.com, peterz@infradead.org, luto@kernel.org, x86@kernel.org, vkuznets@redhat.com, mingo@kernel.org, efault@gmx.de, dave.hansen@intel.com, will.daecon@arm.com, catalin.marinas@arm.com, benh@kernel.crashing.org, Rik van Riel Subject: [PATCH 07/10] x86,mm: remove leave_mm cpu argument Date: Sat, 28 Jul 2018 17:53:54 -0400 Message-Id: <20180728215357.3249-8-riel@surriel.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180728215357.3249-1-riel@surriel.com> References: <20180728215357.3249-1-riel@surriel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function leave_mm does not use its cpu argument, but always works on the CPU where it is called. Change the argument to a void *, so leave_mm can be called directly from smp_call_function_mask, and stop looking up the CPU number in current leave_mm callers. Signed-off-by: Rik van Riel --- arch/x86/include/asm/mmu.h | 2 +- arch/x86/mm/tlb.c | 2 +- arch/x86/xen/mmu_pv.c | 2 +- drivers/acpi/processor_idle.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h index 5ff3e8af2c20..ec27966f338f 100644 --- a/arch/x86/include/asm/mmu.h +++ b/arch/x86/include/asm/mmu.h @@ -61,6 +61,6 @@ typedef struct { .ctx_id = 1, \ } -void leave_mm(int cpu); +void leave_mm(void * dummy); #endif /* _ASM_X86_MMU_H */ diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 149fb64e4bf4..ea4ef5ceaba2 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -121,7 +121,7 @@ static void load_new_mm_cr3(pgd_t *pgdir, u16 new_asid, bool need_flush) write_cr3(new_mm_cr3); } -void leave_mm(int cpu) +void leave_mm(void *dummy) { struct mm_struct *loaded_mm = this_cpu_read(cpu_tlbstate.loaded_mm); diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index 52206ad81e4b..3402d2bf4ae0 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -984,7 +984,7 @@ static void drop_mm_ref_this_cpu(void *info) struct mm_struct *mm = info; if (this_cpu_read(cpu_tlbstate.loaded_mm) == mm) - leave_mm(smp_processor_id()); + leave_mm(NULL); /* * If this cpu still has a stale cr3 reference, then make sure diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index abb559cd28d7..675ffacdd82b 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -714,7 +714,7 @@ static DEFINE_RAW_SPINLOCK(c3_lock); static void acpi_idle_enter_bm(struct acpi_processor *pr, struct acpi_processor_cx *cx, bool timer_bc) { - acpi_unlazy_tlb(smp_processor_id()); + acpi_unlazy_tlb(NULL); /* * Must be done before busmaster disable as we might need to -- 2.14.4