From patchwork Thu Oct 25 14:45:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 10656103 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 6997214BB for ; Thu, 25 Oct 2018 15:46:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 557542BDC1 for ; Thu, 25 Oct 2018 15:46:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47A2D2BDDD; Thu, 25 Oct 2018 15:46:36 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DD08E2BDC1 for ; Thu, 25 Oct 2018 15:46:35 +0000 (UTC) Received: from localhost ([::1]:55274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFhqE-0001bW-W1 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 25 Oct 2018 11:46:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFh5W-0003lE-3M for qemu-devel@nongnu.org; Thu, 25 Oct 2018 10:58:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFguV-0007fR-Pi for qemu-devel@nongnu.org; Thu, 25 Oct 2018 10:46:58 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:50339) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gFguT-0007U3-WE for qemu-devel@nongnu.org; Thu, 25 Oct 2018 10:46:55 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B826B21D06; Thu, 25 Oct 2018 10:46:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 25 Oct 2018 10:46:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= mesmtp; bh=cuaXy4PIOaNeRXOGjaYFTlab+o91Tlnlucoul6y5WVg=; b=0ujh9 yHL8RHBk55mCKvmPcy+G6lOWMNSDb4Ady9s7738oCrO5apY0G0IU6/fwSoPRbmzY HsIGnk3lzXiyw2ixwEzZ7MJUgg7ccLJJl6lD0zVVvhbYUkD47OHpbR5I3ob5dJsL VntSN+yrmCh8OB/x0CE+xXCZTv+HqWl28A8Z1M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=cuaXy4PIOaNeRXOGjaYFTlab+o91T lnlucoul6y5WVg=; b=O9AvM0fD/4RAlmT7ncovG6onAGi1OTfsYh9MCxwp2ddlR gz21leXZvTrSfj8xF4zpF/4co5LLJauS5RxQchFD4Ip3l8o0YrcL8+uJtn0J3ru7 RlGidWmEYDx5yAjk6tB9yltHbSsrTiWms5mfga/tumx/1RsfMigoVe+RD9lcqDIE wuUOQLg+3mMxDnm5+24Y+IavTJrDd0GhoxC5kI0SXn1S01rI65oFiaJpfvIpTQT5 IY1kl7eeX48RYj/8zvXyC7PpeI8axJCFWLA8sZBnn5loFKYzr0VU+OyaNKMK2ox0 yjp6vFhExCbCb1prO1YSZb/q/14F0xQQYmkOONwYg== X-ME-Sender: X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 571BAE421C; Thu, 25 Oct 2018 10:46:46 -0400 (EDT) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Thu, 25 Oct 2018 10:45:38 -0400 Message-Id: <20181025144644.15464-5-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025144644.15464-1-cota@braap.org> References: <20181025144644.15464-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 Subject: [Qemu-devel] [RFC v4 05/71] cpu: move run_on_cpu to cpus-common X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP We don't pass a pointer to qemu_global_mutex anymore. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 10 ---------- cpus-common.c | 2 +- cpus.c | 5 ----- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 2fad537a4f..11cbf21f00 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -766,16 +766,6 @@ void qemu_cpu_kick(CPUState *cpu); */ bool cpu_is_stopped(CPUState *cpu); -/** - * do_run_on_cpu: - * @cpu: The vCPU to run on. - * @func: The function to be executed. - * @data: Data to pass to the function. - * - * Used internally in the implementation of run_on_cpu. - */ -void do_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data); - /** * run_on_cpu: * @cpu: The vCPU to run on. diff --git a/cpus-common.c b/cpus-common.c index 71469c85ce..3fccee5585 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -127,7 +127,7 @@ static void queue_work_on_cpu(CPUState *cpu, struct qemu_work_item *wi) cpu_mutex_unlock(cpu); } -void do_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data) +void run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data) { struct qemu_work_item wi; bool has_bql = qemu_mutex_iothread_locked(); diff --git a/cpus.c b/cpus.c index d0b7f8e02d..913db6a8a4 100644 --- a/cpus.c +++ b/cpus.c @@ -1234,11 +1234,6 @@ void qemu_init_cpu_loop(void) qemu_thread_get_self(&io_thread); } -void run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data) -{ - do_run_on_cpu(cpu, func, data); -} - static void qemu_kvm_destroy_vcpu(CPUState *cpu) { if (kvm_destroy_vcpu(cpu) < 0) {