From patchwork Wed Apr 18 07:41:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Pavan Boddu X-Patchwork-Id: 10347461 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 C0F476053F for ; Wed, 18 Apr 2018 07:44:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4CBB2856B for ; Wed, 18 Apr 2018 07:44:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7FC028585; Wed, 18 Apr 2018 07:44:03 +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=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, 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 1093B2856B for ; Wed, 18 Apr 2018 07:44:01 +0000 (UTC) Received: from localhost ([::1]:37995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8hl3-0002Ut-52 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 18 Apr 2018 03:44:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8hj3-0000xX-Lk for qemu-devel@nongnu.org; Wed, 18 Apr 2018 03:41:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8hiy-0006kE-Pf for qemu-devel@nongnu.org; Wed, 18 Apr 2018 03:41:57 -0400 Received: from mail-sn1nam01on0078.outbound.protection.outlook.com ([104.47.32.78]:60371 helo=NAM01-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f8hiy-0006io-EK for qemu-devel@nongnu.org; Wed, 18 Apr 2018 03:41:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8itpkX8TibRWilfvLY+FCdx+vwyrdQPH6VpO4+9lurI=; b=fUxeRuPrzkH0kHXe6IKBWIFZSomBqNleG7cw5A4uxU2NErmVPAykTblmAKXsa6JG+GN8yAGtXLKaw3nLquV9AHGkJ1JiUtsvrGGoqeKEJkyyC9vDN/eaBoRP0+EnCl9q68mAymAX/wJZtkkXV9KvAiTy5foFG55OpA9cW4rHrtI= Received: from BL0PR02CA0059.namprd02.prod.outlook.com (2603:10b6:207:3d::36) by BY1PR02MB1225.namprd02.prod.outlook.com (2a01:111:e400:52a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.14; Wed, 18 Apr 2018 07:41:50 +0000 Received: from BL2NAM02FT005.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::206) by BL0PR02CA0059.outlook.office365.com (2603:10b6:207:3d::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.12 via Frontend Transport; Wed, 18 Apr 2018 07:41:49 +0000 Authentication-Results: spf=none (sender IP is 149.199.60.100) smtp.mailfrom=xhdsaipava40.localdomain; nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=xilinx.com; Received-SPF: None (protection.outlook.com: xhdsaipava40.localdomain does not designate permitted sender hosts) Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT005.mail.protection.outlook.com (10.152.76.252) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.675.14 via Frontend Transport; Wed, 18 Apr 2018 07:41:48 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:56797 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1f8hiu-0006wi-AQ; Wed, 18 Apr 2018 00:41:48 -0700 Received: from [127.0.0.1] (helo=xsj-smtp-dlp1.xlnx.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1f8hip-0008DJ-7F; Wed, 18 Apr 2018 00:41:43 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w3I7fgrC002106; Wed, 18 Apr 2018 00:41:42 -0700 Received: from [172.23.37.96] (helo=xhdsaipava40.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1f8hio-0008D2-1v; Wed, 18 Apr 2018 00:41:42 -0700 Received: by xhdsaipava40.localdomain (Postfix, from userid 14131) id 37F704C10BA; Wed, 18 Apr 2018 13:11:41 +0530 (IST) From: Sai Pavan Boddu To: , , , , Date: Wed, 18 Apr 2018 13:11:38 +0530 Message-ID: <1524037298-23401-2-git-send-email-saipava@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524037298-23401-1-git-send-email-saipava@xilinx.com> References: <1524037298-23401-1-git-send-email-saipava@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-Result: No--2.064-7.0-31-1 X-imss-scan-details: No--2.064-7.0-31-1;No--2.064-5.0-31-1 X-TM-AS-User-Approved-Sender: No;No X-TM-AS-Result-Xfilter: Match text exemption rules:No X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(2970300002)(428003)(199004)(189003)(9170700003)(47776003)(59450400001)(50226002)(356003)(305945005)(8936002)(76176011)(5660300001)(51416003)(42882007)(8676002)(81166006)(2906002)(26005)(42186006)(4326008)(336012)(316002)(110136005)(6266002)(16586007)(103686004)(90966002)(6666003)(106466001)(105586002)(498600001)(50466002)(63266004)(486006)(52956003)(476003)(11346002)(86372001)(36756003)(48376002)(126002)(2201001)(2616005)(446003)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR02MB1225; H:xsj-pvapsmtpgw02; FPR:; SPF:None; LANG:en; MLV:ovrnspm; A:0; MX:0; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT005; 1:g/DQbGKJ0a9qlygAe4BBfIBu0Q58XJbfBlmFctzn9ht8Q5c3HMy4lTtt+C/5BOHcey2b1dAOxKgIKrZo+azdd7wxsaGDfIQRAlBKYU4JLUFntCeM4Llh+4m42ZdAbBKF MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(8559017)(2017052603328)(7153060); SRVR:BY1PR02MB1225; X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1225; 3:Xq5ZSj/OGmI9PUiMizwS+M2HKEnRwE3aa+XcNmh0606PIYa4/OrQtAu0P7ESX0bCyEhOLSkkQXqNA3r0fak4uOxLCEMCMDJUxhkhYUzKe26B8nKFhuYKiigZ5ttpyLOALR0sdTw3grmb6qeDMYSHVPB1qs/F/Vw6BZqSoQc7LbSXY3EAwMZZ5G97lcea/mleDFwOS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vmGng9i+0VjyfYL+nPWE6bNSGGBhQTA/WRp/hOF927lBjrVEgbBDvozesj73stNB5XlcX5O0DXHhyRUL9cDipB311Dt3CBu0UG5mCh3z7necikgpgGTCdV1EzICBm4yKOWlvoHuEFQstVza5odyf61sf0vBbRdY5QtGG8ui7X2YhjtM95KXrXHwILe7Q2cUo6DWPAfajWDvkyJJObzBZDVmABnE1Kw4hBknAC2X7tsIfy30HSnvOklK7+yPS50McVjkQczrC7 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231232)(944501327)(52105095)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:BY1PR02MB1225; BCL:0; PCL:0; RULEID:; SRVR:BY1PR02MB1225; X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1225; 4:ilCnlJwCoWvTxySvmOWCsqS7xnR4suL/rRQ3yu9VWDfz2osYFwvUwISgOB9pFXneCUVBlBrAmkm2cDxM0OkQ66aT4IbYq+Wd2dodG/PUZetU0EMicLY9tc6pnE+CGvowRuS80+E/RoDhRu5/7THMJf/JJvyHQvGvPftA1Nkcza2Zbwihc9ZRSgybYOdksWpLRi6jeGBejUJhqXZedAWftDlC1nhdofMkQWn8dRZ3wP0ZIoFg04txhGIGCm3YEZbrt93RPzlGsxF12JocMmkGXMWoyN318s/rL23Dx1h3Ao6qIe0xesr2rVnbIDsuNhN0 X-Forefront-PRVS: 06469BCC91 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR02MB1225; 23:JXFjWg5srmZR7Vsab1nQXRWy8Tsty7SYB0TatcuIc?= =?us-ascii?Q?y6jHrYBKfl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AwV6xX8aSkXpmPoqchVhzpm4Pw/d1Emg2ZSCARPvdlEeUrL7+3PC9O5h8jiL8RVJP40rOVe9uZNwg0ESjJlcZAnouDSWcnpsR8RUNEnoZmKtlx55B2K0MsUb0TdA=; 24:UeQa/YoCH+e4PGPSoe6bY2FDMQLtKbMmHbrVrw79tVCeXIHm8II2w9nijxAgkdog+VpvofWBkh3hX6bvIojIl8BVfMOTi2Wp0PplzRx0FLE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1225; 7:ElO2+f1b5uOgIVENI4szmfSAxbhtvnH2pJ8I8bLyCwIHhMexKt3iLd+XbAGQSTOE7ya/AQ0pJxNLf2U9NK/owYLvwwppfJ+0vHBR0FNHQfq9ZLUuYw2u7k47gELtoNkaLBUZSof0Lo5jGf8NOvnE7zyrnYMbVmFTl3IzBnOyOf8JbgBiQ/yT/oE1je2UO4GPAPuR5A0Dw6GjMJDc2feyaD5w5KzdaAIJJDWzKJB9wWa4qIqkd0gXhEg6ClBDL1f2 X-MS-Office365-Filtering-Correlation-Id: 6919e5c6-7304-461b-e4aa-08d5a4ffd7f7 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2018 07:41:48.8975 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6919e5c6-7304-461b-e4aa-08d5a4ffd7f7 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1225 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.32.78 Subject: [Qemu-devel] [PATCH v2 1/1] xilinx_spips: send dummy cycles only if cmd requires it 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP For all the commands, which do not have an entry in xilinx_spips_num_dummies, present logic sends dummy cycles when ever we are in SNOOP_NONE state, fix it to only send dummy cycles if the cmd requires them. SNOOP_NONE state handle is moved above (previously its part of default else case), as its same as SNOOP_STRIPPING during data cycles. Signed-off-by: Sai Pavan Boddu Signed-off-by: Sai Pavan Boddu --- TODO: Maybe we could delete the SNOOP_NONE state as it seems to be same as SNOOP_STRIPPING hw/ssi/xilinx_spips.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index 426f971..4f6760d 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -616,7 +616,8 @@ static void xilinx_spips_flush_txfifo(XilinxSPIPS *s) if (fifo8_is_empty(&s->tx_fifo)) { xilinx_spips_update_ixr(s); return; - } else if (s->snoop_state == SNOOP_STRIPING) { + } else if (s->snoop_state == SNOOP_STRIPING || + s->snoop_state == SNOOP_NONE) { for (i = 0; i < num_effective_busses(s); ++i) { tx_rx[i] = fifo8_pop(&s->tx_fifo); } @@ -626,11 +627,12 @@ static void xilinx_spips_flush_txfifo(XilinxSPIPS *s) for (i = 0; i < num_effective_busses(s); ++i) { tx_rx[i] = tx; } - } else { + } else if (s->cmd_dummies > 0) { /* Extract a dummy byte and generate dummy cycles according to the * link state */ tx = fifo8_pop(&s->tx_fifo); dummy_cycles = 8 / s->link_state; + s->cmd_dummies--; } for (i = 0; i < num_effective_busses(s); ++i) {