From owner-svn-src-all@freebsd.org Wed May 18 03:58:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33299B3FA06; Wed, 18 May 2016 03:58:06 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F422E1702; Wed, 18 May 2016 03:58:05 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4I3w5Mi012935; Wed, 18 May 2016 03:58:05 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4I3w5r2012934; Wed, 18 May 2016 03:58:05 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201605180358.u4I3w5r2012934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 18 May 2016 03:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300111 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2016 03:58:06 -0000 Author: sephe Date: Wed May 18 03:58:04 2016 New Revision: 300111 URL: https://svnweb.freebsd.org/changeset/base/300111 Log: hyperv/vmbus: Utilize curcpu MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6408 Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Wed May 18 03:55:54 2016 (r300110) +++ head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Wed May 18 03:58:04 2016 (r300111) @@ -77,11 +77,9 @@ static char *vmbus_ids[] = { "VMBUS", NU static void vmbus_msg_swintr(void *arg, int pending __unused) { - int cpu; hv_vmbus_message *msg; - cpu = (int)(long)arg; - msg = ((hv_vmbus_message *)hv_vmbus_g_context.syn_ic_msg_page[cpu]) + + msg = ((hv_vmbus_message *)hv_vmbus_g_context.syn_ic_msg_page[curcpu]) + HV_VMBUS_MESSAGE_SINT; for (;;) { const hv_vmbus_channel_msg_table_entry *entry; @@ -136,12 +134,10 @@ static inline int hv_vmbus_isr(struct trapframe *frame) { struct vmbus_softc *sc = vmbus_get_softc(); - int cpu; + int cpu = curcpu; hv_vmbus_message *msg; void *page_addr; - cpu = PCPU_GET(cpuid); - /* * The Windows team has advised that we check for events * before checking for messages. This is the way they do it @@ -447,7 +443,7 @@ vmbus_bus_init(void) taskqueue_start_threads_cpuset(&hv_vmbus_g_context.hv_msg_tq[j], 1, PI_NET, &cpu_mask, "hvmsg%d", j); TASK_INIT(&hv_vmbus_g_context.hv_msg_task[j], 0, - vmbus_msg_swintr, (void *)(long)j); + vmbus_msg_swintr, NULL); /* * Prepare the per cpu msg and event pages to be called on each cpu.