From patchwork Fri Oct 20 22:05:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 10021091 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 D359060211 for ; Fri, 20 Oct 2017 22:11:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3E56285E8 for ; Fri, 20 Oct 2017 22:11:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5AAD28783; Fri, 20 Oct 2017 22:11:21 +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 48CC7285E8 for ; Fri, 20 Oct 2017 22:11:21 +0000 (UTC) Received: from localhost ([::1]:55851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5fVg-0005do-K5 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 20 Oct 2017 18:11:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5fQa-0001zt-4B for qemu-devel@nongnu.org; Fri, 20 Oct 2017 18:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5fQW-0003ox-18 for qemu-devel@nongnu.org; Fri, 20 Oct 2017 18:06:04 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:52475) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5fQV-0003on-S3 for qemu-devel@nongnu.org; Fri, 20 Oct 2017 18:05:59 -0400 Received: by mail-pf0-x244.google.com with SMTP id e64so12864924pfk.9 for ; Fri, 20 Oct 2017 15:05:59 -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=orhAPritgSSUCHa/dRYovQQ8CiNTHUmoFVlfkVwcgB94wo/wTOpUkUvZ3mok0Rb1e8 plC/Hr4HhIOcD32WmfaxMSgwA9AFeskUBrNOVSVMe42yyvAts7Qbxomu5p15kp3igMge sDhoYYR0N69lvb59GUV/lk7AlW7rNemsY23EiZNaHZ2aeCbmfA5jJ8P/g7iCiBBuzd0F vV3YY/guxmL+Dfk/W8JTDrKvAYVALbZT7ZWUQenAcZjXSdYU9krZGD7HL1CMQMms77XE iUYDLiqsPNjsRv6TOop6T11pVhmswIY+Pk3YFwyz3SD5adroJyJSg62M5G/g8w3dnhl/ 2KSQ== 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=Pqf60fGwFmT1kdD2rWznggc7WRWVTks9QogWJ8t+7/PJ+TTRm0oSke0UA6o5DNPs2p FIDYr+6JccQ1DWC5Br7aASWGbTw/0+K44F0T6BEngqq8FmMtAv88iH7un3wxWJlQx9WR hYz0NDVbnbYOS9unZm4fLxV9n2LU2rscsERKTgLb9VhR4h9ZPL/t8KNICcsH97X8Jq/v BvVSrk2hFPYcxD654N0vLDrUy35v3S6Vm9DZVQ66S7KfRxnXQOKasOnl4hhCWzGpFJuk 6OcZBmuCf4iPkT+6+zUC5HlO9GFBBzz25w5Xj+acqzMN8CemCAArx+o7OQAxQ369WWyh /Zjg== X-Gm-Message-State: AMCzsaXdhwcbMv4VCc/0jrY+NplNcDTkxNAk2Wy7UJpZLNo4IBXjDoNF kGGp/rkOZcxe8yMz1EigxAQ= X-Google-Smtp-Source: ABhQp+RRKaRmidOfSy+7RO6Hza3m3UKBxLCWPyDjUDfHEIrzPK2dipN2RnzKDlxtSc0G3Pa4fWzo0w== X-Received: by 10.84.140.131 with SMTP id 3mr5063695plt.367.1508537159064; Fri, 20 Oct 2017 15:05:59 -0700 (PDT) Received: from localhost (g183.61-45-92.ppp.wakwak.ne.jp. [61.45.92.183]) by smtp.gmail.com with ESMTPSA id 125sm3027175pff.14.2017.10.20.15.05.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2017 15:05:58 -0700 (PDT) From: Stafford Horne To: Peter Maydell , QEMU Development Date: Sat, 21 Oct 2017 07:05:33 +0900 Message-Id: <20171020220533.29186-6-shorne@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171020220533.29186-1-shorne@gmail.com> References: <20171020220533.29186-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::244 Subject: [Qemu-devel] [PULL v2 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 = {