From patchwork Wed Aug 23 05:57:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 9916613 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 54572602CB for ; Wed, 23 Aug 2017 06:00:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45E91283DA for ; Wed, 23 Aug 2017 06:00:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 398FC288E0; Wed, 23 Aug 2017 06:00:11 +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 A4F92283DA for ; Wed, 23 Aug 2017 06:00:10 +0000 (UTC) Received: from localhost ([::1]:41065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkOi1-000596-LL for patchwork-qemu-devel@patchwork.kernel.org; Wed, 23 Aug 2017 02:00:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkOg3-0004Pw-JM for qemu-devel@nongnu.org; Wed, 23 Aug 2017 01:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkOg2-0003Xt-U6 for qemu-devel@nongnu.org; Wed, 23 Aug 2017 01:58:07 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:34848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dkOg2-0003Xf-O8 for qemu-devel@nongnu.org; Wed, 23 Aug 2017 01:58:06 -0400 Received: by mail-pf0-x244.google.com with SMTP id k3so721465pfc.2 for ; Tue, 22 Aug 2017 22:58:06 -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 :in-reply-to:references; bh=ZeX10QpCstvNdR6BIMfLeaxlDkWw9VHsCihgIwawX4w=; b=Ad0UOSy5naeA/TRPR5cX/gASC8UjuP1F2QBVmnPPAvwQIfE47xS6hqu2/WS1wG39AD QEM0lX63qPgcIWLyel/7bdtROAu9cf7btdupBNlZLRgs7DPSRPlxAUYe0J9JChqcQSJl AyHK4x5ECzeSsz/n6LhoX7YrywxaXpwPyNItkjSwuOi9GMU7iheQVgsZWogh28z9aVXP 0YEtoCNXrWD5fXKFN/ykzuYr1k0ENHAwvZHrpW0RwpVUn0jf8loMsMA/Q8BdLDGtK/XD 8EkXivvo7mPrq3PJKZY8LCyVk85Fu4wXX5k0bmF54y9j/eEMIq/7M3nZazd0Zvv3SSvj K1PA== 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:in-reply-to:references; bh=ZeX10QpCstvNdR6BIMfLeaxlDkWw9VHsCihgIwawX4w=; b=PJfotxUMvQDW4XaJN5XBllkFoaONCSnxWMCPBcKOEVVN3cWHVaYwNqCDKzZA7GRxvM 7Dc/C2cMnIH93LX8izbTCJiUaLH5McqWuCkr3tq/zsDElv5LsL3e1rBEyno127H11AZn 1e/S56tLKh1igIDPP36MEuaBAM4RaY0e6mCX6PyBEH9VuYusjuCT+Bvd1NnHBXLLKB7t q6tdRofRXslSJdlEgxvL74jV0SC3xtsN35UMYWM/MS+1JTnWXf0OyMNQhBeHRWfpL7tq ZJp4zAr/XwusOaeH6U9IWlXyROGnWFbuUOSyKD9Ql8DU1ujT3af+g3XiZHwLalmk11kO tiuQ== X-Gm-Message-State: AHYfb5gojelmKEy4m3euSL2wxLTpTj7hSDZD3t09cIwVWyvKHQaR3PuE srxJ82OrA2qaoKSpNsCarA== X-Received: by 10.98.215.21 with SMTP id b21mr1677991pfh.120.1503467885587; Tue, 22 Aug 2017 22:58:05 -0700 (PDT) Received: from localhost (g28.222-224-182.ppp.wakwak.ne.jp. [222.224.182.28]) by smtp.gmail.com with ESMTPSA id g5sm1130498pgo.52.2017.08.22.22.58.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2017 22:58:05 -0700 (PDT) From: Stafford Horne To: QEMU Development Date: Wed, 23 Aug 2017 14:57:13 +0900 Message-Id: <5bbe0752efa40ad6fe397a344967ee0b93394392.1503467674.git.shorne@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: References: In-Reply-To: References: 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] [PATCH 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 , Openrisc , Richard Henderson 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. Signed-off-by: Stafford Horne Reviewed-by: Richard Henderson --- 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 = {