From patchwork Fri Oct 13 13:49:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 10004789 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 C874C602B3 for ; Fri, 13 Oct 2017 13:57:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB14A2907B for ; Fri, 13 Oct 2017 13:57:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFFA129081; Fri, 13 Oct 2017 13:57:37 +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 4264A2907B for ; Fri, 13 Oct 2017 13:57:37 +0000 (UTC) Received: from localhost ([::1]:50448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e30T2-0004aR-Gg for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 Oct 2017 09:57:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e30Lm-00085c-UB for qemu-devel@nongnu.org; Fri, 13 Oct 2017 09:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e30Lj-0006nC-6n for qemu-devel@nongnu.org; Fri, 13 Oct 2017 09:50:07 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:48212) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e30Lj-0006lV-1o for qemu-devel@nongnu.org; Fri, 13 Oct 2017 09:50:03 -0400 Received: by mail-pf0-x242.google.com with SMTP id b79so10314086pfk.5 for ; Fri, 13 Oct 2017 06:50:02 -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=dA3KRL1iqyrqw7fD0cnKD4pQlAFssOTUvv+hOGWLIQab4YzrpZsnW5+DqQtVJMeuWB d+UZ4QYnqFCTOzx80O/cRFa/OkmeMLAZ+hLCHGITAPvB2eNyRUUqjJozaqxTza0/WDnh khbdnWOFVYUFSzH3rGTVqn/FzHN9PCtyTApbvYBgCSANoN4eWHvek/gn+po9yPDyFlEu Fth7o7GnZa/zL97EMkh7FDZ+wsrZGICTxJPEdtxqRipha46PPZB9bEs/UWR0B6zsAIdL Ce9p3dEfcniHi+AnXzZUnkio0/Cxfuqteq82VrHYzccLCp4n31vRwEtg5LvH9P7Yugpc rODw== 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=IJcU9ytid2PkHtJHJqUv8l5T3ygqpJOXDcLJ2rF924+LT0q4OeEzSsXbZoFnoDa1Cd bYE/9L/gdefVD5ae/C+cX8k+EdtD+bT5LESgjNa8QR2A4D2wW/hByC+BnT8l+qgfnozm OC4upVRl0CBrh/0021relRG4nw/6di7CwW+AI95BMoxgAaB6ST0iNt8zzNFI7YM9f/JK 7JfmgIiI76TXfn01/24/vRN+4e/fJv0WNhVDQuUOaE0yyzABDRZHh3esUfL5yFeZRaaB mwNA13Hx+zj3XKwZx45YIbk2qJueLt+ZdX35Mjyh54vQmnx8BRXoqtj99niNew6T2JpL pGjw== X-Gm-Message-State: AMCzsaW+KYMHWyYbGQX4Kx5WL0EwboHSo2Slcf/m1uv+X0p9rQYgXl9k THGfx5MBDsAQm8pz4VoCIGP7+Irc X-Google-Smtp-Source: AOwi7QAaOQIZHk7/tY0w9iewSgXMMfgRTTKHfGsKIkfdRa2mi0TrEzZ14IYmCfgbx28No+o8Oxs8Og== X-Received: by 10.159.233.137 with SMTP id bh9mr1464214plb.201.1507902601916; Fri, 13 Oct 2017 06:50:01 -0700 (PDT) Received: from localhost (g248.61-45-56.ppp.wakwak.ne.jp. [61.45.56.248]) by smtp.gmail.com with ESMTPSA id n124sm2934002pga.11.2017.10.13.06.50.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Oct 2017 06:50:01 -0700 (PDT) From: Stafford Horne To: QEMU Development Date: Fri, 13 Oct 2017 22:49:30 +0900 Message-Id: <20171013134930.32547-6-shorne@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171013134930.32547-1-shorne@gmail.com> References: <20171013134930.32547-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] [PATCH 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 , Openrisc , Richard Henderson , 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. 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 = {