From patchwork Fri Oct 13 14:57:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 10005021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 006B160216 for ; Fri, 13 Oct 2017 15:02:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6474290A2 for ; Fri, 13 Oct 2017 15:02:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB21E290A5; Fri, 13 Oct 2017 15:02:02 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 C0314290A2 for ; Fri, 13 Oct 2017 15:02:01 +0000 (UTC) Received: from localhost ([::1]:50676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e31TN-0001KW-4E for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 Oct 2017 11:02:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e31PI-0006zh-Jl for qemu-devel@nongnu.org; Fri, 13 Oct 2017 10:57:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e31PH-0005Ay-Jh for qemu-devel@nongnu.org; Fri, 13 Oct 2017 10:57:48 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:53146) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e31PH-00059J-Db for qemu-devel@nongnu.org; Fri, 13 Oct 2017 10:57:47 -0400 Received: by mail-pf0-x242.google.com with SMTP id e64so10577892pfk.9 for ; Fri, 13 Oct 2017 07:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qjgld81jK6MKwplxYK3i0A9JzqfJ5q//fMIFcvNR+BE=; b=JhWbxOXVybWjX6SL6PjtkRfaLdKINL43LL7XvRqsuHxcFtvDePgIFAmiRtJCPi1DnA Jy8Azvg335SAyt714BWPg+3Dk0v6odi4mWB3uKVycSiFsZhUuDVekFGUx8C3BUPvLx73 Q/CXnwtneTYaNvlOel+Y/kqk+5uLAYaPj87g7CRXWXxCErcBRTN0AqOOGry+tOXn3B54 SqSpQqXY+dw7zX2IsLKpQifoFBPrX7rm+T8ZJ56AWgx1aM7Xq6mNF9XucsPV+KVsat1v E10rhiFXbjgHnlY7+qqckb7vZMAg/gGcitJF4esMX4wMjAZaCyGGL/IMKIR58J9jvzcV /qeQ== 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=qjgld81jK6MKwplxYK3i0A9JzqfJ5q//fMIFcvNR+BE=; b=SPpfBEGJqSHV0+hdO8fgPkvoqgFOPE8HGUw/fx9gLdTxtfRz9FhL2bYTRVHtVT3Ybg tYmGOJ7OXd0mWflOSBPlbVcRgamTSKv+BfFixV0kLUr3mqSBdImuGmcol0f8DxPRCq3Z RLJR3lJUbovRGZASQ6oVqziWPyzBgaxlxq46xv0dtNghtlLiRk+bVf0v0WLR5I2a3u2M w0Eg/vsdjlgZ1IeseC/IBzQvbvj0tf7miOwVo6EbSDZKk2K2z8/n+ZddGDCEbBEmpPuS NXYKKxgbzKDTy2NiBEvwsjDmDx+8E5QUwDdQPdhOQQqQSSsUiT+7HaE0AG6KKuHdTl8C HAiQ== X-Gm-Message-State: AMCzsaWqFXP9OuZuyg3nDuC10EQIULYPzwiZiIHj7gkwPaJzRZMB797p 6wkX4S7QI1F5H58FexWwyRYnJV4p X-Google-Smtp-Source: AOwi7QAxwsUVlYYO21Hd85fG12LsxwLrs6NqMQ2CatZta6BHdVSnUcQly3jlKPt8f0dktIjEg2yiww== X-Received: by 10.159.195.11 with SMTP id bd11mr1663313plb.58.1507906666346; Fri, 13 Oct 2017 07:57:46 -0700 (PDT) Received: from localhost (g248.61-45-56.ppp.wakwak.ne.jp. [61.45.56.248]) by smtp.gmail.com with ESMTPSA id o128sm2975195pfg.118.2017.10.13.07.57.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Oct 2017 07:57:45 -0700 (PDT) From: Stafford Horne To: QEMU Development Date: Fri, 13 Oct 2017 23:57:14 +0900 Message-Id: <20171013145714.2740-6-shorne@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171013145714.2740-1-shorne@gmail.com> References: <20171013145714.2740-1-shorne@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PULL 5/5] openrisc: Only kick cpu on timeout, not on update 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: Stafford Horne Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Previously we were kicking the cpu on every update. This caused problems noticeable in SMP configurations where one CPU got pinned continuously servicing timer exceptions. Reviewed-by: Richard Henderson Signed-off-by: Stafford Horne --- hw/openrisc/cputimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/openrisc/cputimer.c b/hw/openrisc/cputimer.c index 4c5415ff75..850f88761c 100644 --- a/hw/openrisc/cputimer.c +++ b/hw/openrisc/cputimer.c @@ -78,7 +78,6 @@ void cpu_openrisc_timer_update(OpenRISCCPU *cpu) } next = now + (uint64_t)wait * TIMER_PERIOD; timer_mod(cpu->env.timer, next); - qemu_cpu_kick(CPU(cpu)); } void cpu_openrisc_count_start(OpenRISCCPU *cpu) @@ -120,6 +119,7 @@ static void openrisc_timer_cb(void *opaque) } cpu_openrisc_timer_update(cpu); + qemu_cpu_kick(CPU(cpu)); } static const VMStateDescription vmstate_or1k_timer = {