From patchwork Sat Feb 23 08:48:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 1047323 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="hr5gsab8"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44621h5lK0z9sCH for ; Sat, 23 Feb 2019 19:48:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbfBWIsx (ORCPT ); Sat, 23 Feb 2019 03:48:53 -0500 Received: from mail-eopbgr00058.outbound.protection.outlook.com ([40.107.0.58]:40992 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726043AbfBWIsw (ORCPT ); Sat, 23 Feb 2019 03:48:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bpbTdDrKo+7cESGxClZRP1FQfgMsumJO69ae+l+VN0M=; b=hr5gsab8+2LdmNuPVopKBoJZeYt7rOcys+tOfjvtaaNYGMN9Mv7NdBW6uapAZUbkb6nFdHwdzU8nQ4aWITVEvE8/f032rLfwKvapN/pPtH9zIq8Updk44nsOJp2tAxf6HIoH5DejKqJlkua4kK1dDXpDS5rJVjn7lbZudi2qfiM= Received: from VI1PR0402MB2800.eurprd04.prod.outlook.com (10.172.255.18) by VI1PR0402MB3855.eurprd04.prod.outlook.com (52.134.16.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.15; Sat, 23 Feb 2019 08:48:48 +0000 Received: from VI1PR0402MB2800.eurprd04.prod.outlook.com ([fe80::74fe:7d24:1e75:3477]) by VI1PR0402MB2800.eurprd04.prod.outlook.com ([fe80::74fe:7d24:1e75:3477%5]) with mapi id 15.20.1643.019; Sat, 23 Feb 2019 08:48:48 +0000 From: Ioana Ciornei To: Leo Li CC: Roy Pledge , Ioana Ciocoi Radulescu , Laurentiu Tudor , Horia Geanta , "brouer@redhat.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Ioana Ciornei Subject: [PATCH 1/3] soc: fsl: dpio: enable frame data cache stashing per software portal Thread-Topic: [PATCH 1/3] soc: fsl: dpio: enable frame data cache stashing per software portal Thread-Index: AQHUy1SXrb9aUlm5bU2xUZ+TgixJJQ== Date: Sat, 23 Feb 2019 08:48:48 +0000 Message-ID: <20190223084816.28985-2-ioana.ciornei@nxp.com> References: <20190223084816.28985-1-ioana.ciornei@nxp.com> In-Reply-To: <20190223084816.28985-1-ioana.ciornei@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR04CA0061.namprd04.prod.outlook.com (2603:10b6:805:2a::38) To VI1PR0402MB2800.eurprd04.prod.outlook.com (2603:10a6:800:ad::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ioana.ciornei@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.8.3 x-originating-ip: [64.157.242.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bbd4196e-42c2-4509-1f5e-08d6996bba25 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0402MB3855; x-ms-traffictypediagnostic: VI1PR0402MB3855: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BVI1PR0402MB3855=3B23?= =?iso-8859-1?q?=3APp7gxlE+n7Laq4Wy0zA3HIsj/3P7cAk7C6MiuB18YeyL8/dK?= =?iso-8859-1?q?8ktAwbN4pRz9DfqEdh8powezBdIS3rIMUu5M8gyIAou6EN+b3GZ?= =?iso-8859-1?q?5vDzXyW56HCBwt65I9RndhtUGlrL19sMQeaC3qpJELiCzotvm+E?= =?iso-8859-1?q?/W7Aq+gCMRccSTVCRfoaOWL/4PchaH56GJKWIuOHTOLOXV8+VRe?= =?iso-8859-1?q?a+TKlUQB0KtgkzKxh/McySKkYREmQgKR+T4pgmQJHwWMXVFrFj+?= =?iso-8859-1?q?yxHt+SiwGUuqr53wwZinu8kFfdqAUv4v4+kczYLDeu7hHAnQ+Wk?= =?iso-8859-1?q?wVM77Y/82Z3eZNAvoVDWkXTpNvpi9vLoQ+Hl2HKZUNZb+3Dkf4k?= =?iso-8859-1?q?FtiUsPSJ99Yy67Og/05DQUPWw/KkTvA3cabUdOuYenDSNFJsolS?= =?iso-8859-1?q?0qnyYwU6ES5GWQ6GjrfAvWVFVn+5lx5ldVWJZGRiyFrpU3EC26H?= =?iso-8859-1?q?wgD10jMGjApVaPno3Ybaz5NKFLX7PECW0AMcIlPQREsnvcEw8Rt?= =?iso-8859-1?q?qQhw54ND/gDgrXCc/ItQiQhJjEoeLRGaPWSQfTDtC7PbvQ6E0Sw?= =?iso-8859-1?q?f7rX9RCrruT7B3D1yQv2UpGkFyiGwz6DFg9/puiSIqz/GRvNhAS?= =?iso-8859-1?q?B599Tu/+WEZpNj3uNr2HVT3HUJH0GejCXPWswLggo/qWm34xKR4?= =?iso-8859-1?q?ZftqyRn8+O8mcSciMbKLZjzm7GcryQ8cGc6Nb5j7Jts1+vMkMfY?= =?iso-8859-1?q?yvXVNhLxarCJx4Y2MHSVyp/nP9p+U8laYjmAkU6jRwjMOGJLpYF?= =?iso-8859-1?q?5ynmSUQ7xZ4r89Lr0xGkLNokigkEX1DikiQ2D7m1X5172eBvbBV?= =?iso-8859-1?q?7XrdFkkuLvT/y0UjaTeymtE5TGGh+PSsQ2Vwdb/HbWNOnOUFqpC?= =?iso-8859-1?q?LkfJ6JvQT3fD7ZrLlmQ6PFiet8KP8uaHy7Qj/3piJhG6CVGcYpy?= =?iso-8859-1?q?oYuqtqthhIXBqy8KV+LrWlHHKea5NJg84bg3rNucP08fGPjwJ17?= =?iso-8859-1?q?sRrXc33uxvuN8/LLVTKvoCveZyYvSsNYsWxE5eLEeIeDhU4kCOq?= =?iso-8859-1?q?CTOdj/QWC9DVIC7C1SHbiuVuyyBEmhAMAY2JJe+vZEeQRPwZ+2D?= =?iso-8859-1?q?Kknxb7TMGn3NrmuO5LQ1B2coW54gV5M+RjljXukdQYNRPz8x2fu?= =?iso-8859-1?q?HQFzhuCtqyz5DhFiwWLR3ug8h/6aEUPH3JTfAuDUhtoB7xebFTH?= =?iso-8859-1?q?Cua1gw61YZZEme7yR8Mm2fwZ0sSzxZHBT4XxFo8gxWD6sQ5Yb0A?= =?iso-8859-1?q?yez0sD+tpfDNZ9Y5pwF36EKin89LzmQsr2nn/FGmjQidBcuGzsY?= =?iso-8859-1?q?SmP6UbdHooOvkhy3ZI70sL6U3oqOhQ=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0957AD37A0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(39860400002)(376002)(396003)(346002)(189003)(199004)(486006)(14454004)(50226002)(71190400001)(26005)(11346002)(44832011)(186003)(2616005)(478600001)(71200400001)(99286004)(52116002)(68736007)(4326008)(102836004)(2906002)(25786009)(446003)(476003)(76176011)(6636002)(6862004)(105586002)(6506007)(6436002)(54906003)(386003)(8936002)(3846002)(305945005)(8676002)(37006003)(6486002)(86362001)(5660300002)(106356001)(53936002)(256004)(7736002)(97736004)(14444005)(6512007)(66066001)(36756003)(316002)(81166006)(6116002)(1076003)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB3855; H:VI1PR0402MB2800.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: lfAuYioYByAEKR8MPQyoFz0s8e2EVqoT0XoF7EcjjHHWzIVRwsXwurB/aaeAWODC472sKY3r8Nk7V3hofgRhEI/AJ6HYDwQ6oxUbFX00mnvD2Sa2ByFRL5/Tm3U5sFtGJbKy0AkTfKobCxm/C8BLppGoVtlwfqH10Otj5mUUmDfZ+0QL2Rpc+5g9GxK4HvPxrR/IySbj109RsFKom2ejHptUyrHuu8uSdHo6EP8VS9dc3EldqrnFxdxfevBgGsKLTgj1NjpC4TcaMVapMKvUQoexaZdQtifnbA4/N0YTqYZO/5S8BimZJk9RjYTPXZl2gOu5BQVZVXndVdVIOsAMs8lSp6TixE7PE9Hs2QJIM/dAzIDiDyG9sEYC4oeMuwY8RX+PT2l3E2fMwoEJ0rdrQ//fhT4xfypxjdwRmoh69zU= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbd4196e-42c2-4509-1f5e-08d6996bba25 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2019 08:48:46.7596 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3855 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Enable cache stashing on the frame data dequeued using this software portal. Also, enable dropping a stash request transaction when the target request queue is almost full. Signed-off-by: Ioana Ciornei --- drivers/soc/fsl/dpio/qbman-portal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/dpio/qbman-portal.c b/drivers/soc/fsl/dpio/qbman-portal.c index 5a73397..d020135 100644 --- a/drivers/soc/fsl/dpio/qbman-portal.c +++ b/drivers/soc/fsl/dpio/qbman-portal.c @@ -169,9 +169,9 @@ struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d) 3, /* RPM: Valid bit mode, RCR in array mode */ 2, /* DCM: Discrete consumption ack mode */ 3, /* EPM: Valid bit mode, EQCR in array mode */ - 0, /* mem stashing drop enable == FALSE */ + 1, /* mem stashing drop enable == TRUE */ 1, /* mem stashing priority == TRUE */ - 0, /* mem stashing enable == FALSE */ + 1, /* mem stashing enable == TRUE */ 1, /* dequeue stashing priority == TRUE */ 0, /* dequeue stashing enable == FALSE */ 0); /* EQCR_CI stashing priority == FALSE */ From patchwork Sat Feb 23 08:48:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 1047324 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="bemWZ7Bm"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44621n5bGlz9sDL for ; Sat, 23 Feb 2019 19:49:01 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727168AbfBWIs5 (ORCPT ); Sat, 23 Feb 2019 03:48:57 -0500 Received: from mail-eopbgr00050.outbound.protection.outlook.com ([40.107.0.50]:8064 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726043AbfBWIs4 (ORCPT ); Sat, 23 Feb 2019 03:48:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GAf4nhmHdLry0AG8wO4p2T0U5PDrNaQsC8bzTBBaMpg=; b=bemWZ7Bmh9+3JHQfTz5fYi37d2WtKe7qDwPACf+jIq71xtsli0opBn+p+8+loXU+GeNviSYWr3CoOECO0OORTq4fGBTZljTdQEATYuxATiWNP5jWc73o41nCJSPHEPQ93g9EauIBLkLXjg3fXHA2BiTr4O2B1h6S43iGQOWq10Q= Received: from VI1PR0402MB2800.eurprd04.prod.outlook.com (10.172.255.18) by VI1PR0402MB3855.eurprd04.prod.outlook.com (52.134.16.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.15; Sat, 23 Feb 2019 08:48:52 +0000 Received: from VI1PR0402MB2800.eurprd04.prod.outlook.com ([fe80::74fe:7d24:1e75:3477]) by VI1PR0402MB2800.eurprd04.prod.outlook.com ([fe80::74fe:7d24:1e75:3477%5]) with mapi id 15.20.1643.019; Sat, 23 Feb 2019 08:48:52 +0000 From: Ioana Ciornei To: Leo Li CC: Roy Pledge , Ioana Ciocoi Radulescu , Laurentiu Tudor , Horia Geanta , "brouer@redhat.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Ioana Ciornei Subject: [PATCH 2/3] soc: fsl: dpio: configure cache stashing destination Thread-Topic: [PATCH 2/3] soc: fsl: dpio: configure cache stashing destination Thread-Index: AQHUy1Sa6XcjNUTofUqAEtVAuu5zgw== Date: Sat, 23 Feb 2019 08:48:52 +0000 Message-ID: <20190223084816.28985-3-ioana.ciornei@nxp.com> References: <20190223084816.28985-1-ioana.ciornei@nxp.com> In-Reply-To: <20190223084816.28985-1-ioana.ciornei@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR04CA0061.namprd04.prod.outlook.com (2603:10b6:805:2a::38) To VI1PR0402MB2800.eurprd04.prod.outlook.com (2603:10a6:800:ad::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ioana.ciornei@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.8.3 x-originating-ip: [64.157.242.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d81edf30-b85d-4511-b68b-08d6996bbc78 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0402MB3855; x-ms-traffictypediagnostic: VI1PR0402MB3855: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BVI1PR0402MB3855=3B23?= =?iso-8859-1?q?=3A/eiDqIDdsQJlbrCdPNTqXS6GlpmasHhg58THeDvHb2xDaBgg?= =?iso-8859-1?q?hb4S46b3wZumKkNNJ5KE+yjOeltMxhwA4RA5AhqA1RBPgts61Xo?= =?iso-8859-1?q?eodOLFosLH6VKi3eGvxDGbQNoO6slQY20GPgAMzApq8cf4IrzHE?= =?iso-8859-1?q?ZQFBm01Xpa8TxATq+A/ObQcuD/fNUnjXt/n4ybdR7Xla3co07Le?= =?iso-8859-1?q?YRulgUx/TSz9e682GJ++sJIt3pGBtFLqvPAPGanYqzLrkPqdZ7L?= =?iso-8859-1?q?MmSgzVL14NI/4GawT9Sj0s9V2iKCthCdeCOjkpTFzI6s3QKTihK?= =?iso-8859-1?q?DpNtiiB+3zQq1w6fxAAB0pBiLKBBFF2ez6e2zXqLVuuwhTGGkQ+?= =?iso-8859-1?q?H9XmtsrxWaP2P942rerBDSVztbdCeXy1RYV1n+/RpJzmuP5NgoB?= =?iso-8859-1?q?2G8QJF9B6Ls0eNBcQ7Yp3hHB5gR15kXVpSW2NUSzYYV409WDkZR?= =?iso-8859-1?q?RqkyBF3Vo9nU1ghtFMa2SljzKww5zX/TLFlqHohM/pHNNYF6LOP?= =?iso-8859-1?q?XNn0A73nr4wtKi8zqZEkGy82sSB3itEvNyG2JgWtNQwJWDnDq3/?= =?iso-8859-1?q?24m+HAl7fr34xpkpuaWYGGMyDp7rZuj5Jvh+5NNbNxDfWOyyyeZ?= =?iso-8859-1?q?lBZZaJAMkCF53A1U+othwFuezzbN/FzInqqZEKwi7yc2SaqYBNC?= =?iso-8859-1?q?3MJJz6hKDNZ1yjKLZrLlTMiQVzycC6ZjoNTSjIqLwqMxKTH0JUG?= =?iso-8859-1?q?XLfzdeSyYvSxgAXQ9IWd4W5xQa72zcoOf5BDuiwwBQLrrrNkOw0?= =?iso-8859-1?q?PqXpuanm2WSHdaRD3nXdvAsfo3fWFspd3rDoQTk6TpaeLBj7cZo?= =?iso-8859-1?q?H4HdCW2l0ba2hxKjkkwtivya6nqtDHRFkPsxZ5C52IGs77Lf6hQ?= =?iso-8859-1?q?5ESXRKLWFr31k7twluXTmSHoom2hCtRsl5rnvRz9vJdwWILfrzH?= =?iso-8859-1?q?aAoBTy7fqwFhD2EXOpl1TOjJ4BPR36jlwhnKny44c/cCujqIILF?= =?iso-8859-1?q?GNtnjCxiRDtQLsW1rctsw/KTc6Uk4ylPgs3l3ZKIQDRWnfSiXqI?= =?iso-8859-1?q?ci2T7pJ3zDLPrI1oAH7NUbTvao/wl6OMsqbGrHpHLvKw1DBh9ON?= =?iso-8859-1?q?Hjg2Jua2q4mKimfM0/z3A6Q5oFcSez63RX9Gh0hMG3BRxzhjaNa?= =?iso-8859-1?q?cQqFeV2Sv5PN/29B6YsOBbxic8m3sRjQBEKadU4TdrXXvtrgR7G?= =?iso-8859-1?q?cjOB2IUFe2eGsO0ySRVVLDXV16/hMQjuyhVUB4xq/MZcieMribg?= =?iso-8859-1?q?dgmat16HcUdvQ2Z9JGjvBPAyjC/Jc5jM/LZEElp4do/I5gd3asS?= =?iso-8859-1?q?Jls+umUg?= x-microsoft-antispam-prvs: x-forefront-prvs: 0957AD37A0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(39860400002)(376002)(396003)(346002)(189003)(199004)(486006)(14454004)(50226002)(71190400001)(26005)(11346002)(44832011)(186003)(2616005)(478600001)(71200400001)(99286004)(52116002)(68736007)(4326008)(102836004)(2906002)(25786009)(446003)(476003)(76176011)(6636002)(6862004)(105586002)(6506007)(6436002)(54906003)(386003)(8936002)(3846002)(305945005)(8676002)(37006003)(6486002)(86362001)(5660300002)(106356001)(53936002)(256004)(7736002)(97736004)(6512007)(66066001)(36756003)(316002)(81166006)(6116002)(1076003)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB3855; H:VI1PR0402MB2800.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: /uybtH3vYCVOlZFtezoGUkj8WpSFcctl2qSnYZhVqZ08qdmBg99tvUBW2HRpc+yJlqTEa8h2nLtDB36g+u77KKN0CkSpq1qfh3nW3CM1bheBqFnUGnJYpEsu92oEzvq/nppJ+I55oH4Do++gbwUebLQoUV3Qkc3yfNoXbomL/WWpaXLIYAZNGKcz+exSvGjwuBMWVF97AWUOzsYCH1J29I6pgZy6/PKN/T8VRsQL4sBurNN9YGMs0Gb49p02Sw/10M6m6R0zl0wjAJUCyw0EjUUR7q87qzyJB34LRxqivAapIvO7YFP1lt6MAocCop+OAG9jFtaQlBkwUiX0w6gJzjA0+mHqlt/rrSt6NrvkH7j3ksQxESCKCrV6Z+mISSCRZlhlymn9O2eKz+7OAR3teEs3Ism0sB+0gVTdthg5Cz0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d81edf30-b85d-4511-b68b-08d6996bbc78 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2019 08:48:50.6639 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3855 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Depending on the SoC version and the CPU id, configure the cache stashing destination for a specific dpio. Signed-off-by: Ioana Ciornei --- drivers/soc/fsl/Kconfig | 1 + drivers/soc/fsl/dpio/dpio-cmd.h | 5 ++++ drivers/soc/fsl/dpio/dpio-driver.c | 52 ++++++++++++++++++++++++++++++++++++++ drivers/soc/fsl/dpio/dpio.c | 16 ++++++++++++ drivers/soc/fsl/dpio/dpio.h | 5 ++++ 5 files changed, 79 insertions(+) diff --git a/drivers/soc/fsl/Kconfig b/drivers/soc/fsl/Kconfig index 8f80e8b..61f8e14 100644 --- a/drivers/soc/fsl/Kconfig +++ b/drivers/soc/fsl/Kconfig @@ -22,6 +22,7 @@ config FSL_GUTS config FSL_MC_DPIO tristate "QorIQ DPAA2 DPIO driver" depends on FSL_MC_BUS + select SOC_BUS help Driver for the DPAA2 DPIO object. A DPIO provides queue and buffer management facilities for software to interact with diff --git a/drivers/soc/fsl/dpio/dpio-cmd.h b/drivers/soc/fsl/dpio/dpio-cmd.h index 5814d2f..e13fd3a 100644 --- a/drivers/soc/fsl/dpio/dpio-cmd.h +++ b/drivers/soc/fsl/dpio/dpio-cmd.h @@ -26,6 +26,7 @@ #define DPIO_CMDID_DISABLE DPIO_CMD(0x003) #define DPIO_CMDID_GET_ATTR DPIO_CMD(0x004) #define DPIO_CMDID_RESET DPIO_CMD(0x005) +#define DPIO_CMDID_SET_STASHING_DEST DPIO_CMD(0x120) struct dpio_cmd_open { __le32 dpio_id; @@ -47,4 +48,8 @@ struct dpio_rsp_get_attr { __le32 qbman_version; }; +struct dpio_stashing_dest { + u8 sdest; +}; + #endif /* _FSL_DPIO_CMD_H */ diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c index a28799b..c0cdc89 100644 --- a/drivers/soc/fsl/dpio/dpio-driver.c +++ b/drivers/soc/fsl/dpio/dpio-driver.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -32,6 +33,46 @@ struct dpio_priv { static cpumask_var_t cpus_unused_mask; +static const struct soc_device_attribute ls1088a_soc[] = { + {.family = "QorIQ LS1088A"}, + { /* sentinel */ } +}; + +static const struct soc_device_attribute ls2080a_soc[] = { + {.family = "QorIQ LS2080A"}, + { /* sentinel */ } +}; + +static const struct soc_device_attribute ls2088a_soc[] = { + {.family = "QorIQ LS2088A"}, + { /* sentinel */ } +}; + +static const struct soc_device_attribute lx2160a_soc[] = { + {.family = "QorIQ LX2160A"}, + { /* sentinel */ } +}; + +static int dpaa2_dpio_get_cluster_sdest(struct fsl_mc_device *dpio_dev, int cpu) +{ + int cluster_base, cluster_size; + + if (soc_device_match(ls1088a_soc)) { + cluster_base = 2; + cluster_size = 4; + } else if (soc_device_match(ls2080a_soc) || + soc_device_match(ls2088a_soc) || + soc_device_match(lx2160a_soc)) { + cluster_base = 0; + cluster_size = 2; + } else { + dev_err(&dpio_dev->dev, "unknown SoC version\n"); + return -1; + } + + return cluster_base + cpu / cluster_size; +} + static irqreturn_t dpio_irq_handler(int irq_num, void *arg) { struct device *dev = (struct device *)arg; @@ -89,6 +130,7 @@ static int dpaa2_dpio_probe(struct fsl_mc_device *dpio_dev) int err = -ENOMEM; struct device *dev = &dpio_dev->dev; int possible_next_cpu; + int sdest; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -145,6 +187,16 @@ static int dpaa2_dpio_probe(struct fsl_mc_device *dpio_dev) desc.cpu = possible_next_cpu; cpumask_clear_cpu(possible_next_cpu, cpus_unused_mask); + sdest = dpaa2_dpio_get_cluster_sdest(dpio_dev, desc.cpu); + if (sdest >= 0) { + err = dpio_set_stashing_destination(dpio_dev->mc_io, 0, + dpio_dev->mc_handle, + sdest); + if (err) + dev_err(dev, "dpio_set_stashing_destination failed for cpu%d\n", + desc.cpu); + } + /* * Set the CENA regs to be the cache inhibited area of the portal to * avoid coherency issues if a user migrates to another core. diff --git a/drivers/soc/fsl/dpio/dpio.c b/drivers/soc/fsl/dpio/dpio.c index 521bc69..af74c59 100644 --- a/drivers/soc/fsl/dpio/dpio.c +++ b/drivers/soc/fsl/dpio/dpio.c @@ -166,6 +166,22 @@ int dpio_get_attributes(struct fsl_mc_io *mc_io, return 0; } +int dpio_set_stashing_destination(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + u8 sdest) +{ + struct fsl_mc_command cmd = { 0 }; + struct dpio_stashing_dest *dpio_cmd; + + cmd.header = mc_encode_cmd_header(DPIO_CMDID_SET_STASHING_DEST, + cmd_flags, token); + dpio_cmd = (struct dpio_stashing_dest *)cmd.params; + dpio_cmd->sdest = sdest; + + return mc_send_command(mc_io, &cmd); +} + /** * dpio_get_api_version - Get Data Path I/O API version * @mc_io: Pointer to MC portal's DPIO object diff --git a/drivers/soc/fsl/dpio/dpio.h b/drivers/soc/fsl/dpio/dpio.h index b2ac4ba..da06f72 100644 --- a/drivers/soc/fsl/dpio/dpio.h +++ b/drivers/soc/fsl/dpio/dpio.h @@ -75,6 +75,11 @@ int dpio_get_attributes(struct fsl_mc_io *mc_io, u16 token, struct dpio_attr *attr); +int dpio_set_stashing_destination(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + u8 dest); + int dpio_get_api_version(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 *major_ver, From patchwork Sat Feb 23 08:48:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 1047325 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="IqgI783a"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44621w0w8Gz9sCH for ; Sat, 23 Feb 2019 19:49:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727573AbfBWItC (ORCPT ); Sat, 23 Feb 2019 03:49:02 -0500 Received: from mail-eopbgr00050.outbound.protection.outlook.com ([40.107.0.50]:32576 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727329AbfBWIs7 (ORCPT ); Sat, 23 Feb 2019 03:48:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E9Ze09qwdhxVOM725jUjaMrvxUe0dyEHvpL1bkdoooo=; b=IqgI783aC/0ir4XEktlWUU3GJekgcHUi+XPnIFxi3cg4rj69TGuT2jHuq+P5+Z8mE8fLPgpkdY1kKVP6sLlPUUC+ZVHYw7U4T6oa8iEaBsb3alUW476Gb8i5PVilbC8/SdjXky1E9g08NhdB4YqEj7frupYattQ8ScVxO7bqEi8= Received: from VI1PR0402MB2800.eurprd04.prod.outlook.com (10.172.255.18) by VI1PR0402MB3855.eurprd04.prod.outlook.com (52.134.16.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.15; Sat, 23 Feb 2019 08:48:55 +0000 Received: from VI1PR0402MB2800.eurprd04.prod.outlook.com ([fe80::74fe:7d24:1e75:3477]) by VI1PR0402MB2800.eurprd04.prod.outlook.com ([fe80::74fe:7d24:1e75:3477%5]) with mapi id 15.20.1643.019; Sat, 23 Feb 2019 08:48:55 +0000 From: Ioana Ciornei To: Leo Li CC: Roy Pledge , Ioana Ciocoi Radulescu , Laurentiu Tudor , Horia Geanta , "brouer@redhat.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Ioana Ciornei Subject: [PATCH 3/3] dpaa2-eth: configure the cache stashing amount on a queue Thread-Topic: [PATCH 3/3] dpaa2-eth: configure the cache stashing amount on a queue Thread-Index: AQHUy1Sce6CSfKYA40uc+yzfmqx49A== Date: Sat, 23 Feb 2019 08:48:55 +0000 Message-ID: <20190223084816.28985-4-ioana.ciornei@nxp.com> References: <20190223084816.28985-1-ioana.ciornei@nxp.com> In-Reply-To: <20190223084816.28985-1-ioana.ciornei@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR04CA0061.namprd04.prod.outlook.com (2603:10b6:805:2a::38) To VI1PR0402MB2800.eurprd04.prod.outlook.com (2603:10a6:800:ad::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ioana.ciornei@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.8.3 x-originating-ip: [64.157.242.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 443011c1-e52a-4027-1bbc-08d6996bbe6a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0402MB3855; x-ms-traffictypediagnostic: VI1PR0402MB3855: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BVI1PR0402MB3855=3B23?= =?iso-8859-1?q?=3AreNY8u9BNfPSeKlDGZS8KMWZi1gbU3j8FgiYrvq1GZSPUmWB?= =?iso-8859-1?q?S5GPeltxAC3Sck9+3Wvh6CkWbJpNpOVaD8Q4IgePHG+2dFaZqJP?= =?iso-8859-1?q?db2hFW2JGs1yBHREwK4lw4Y5b0sfVQq3c8ENbAronXSFI61yxQb?= =?iso-8859-1?q?VyLHJEun9Ohyd2pX19NqPveJKGMgz24GLkwA566+bUeQsUnBGar?= =?iso-8859-1?q?K6QBUcOhDndNlqB8+GHZLQunaQqb9aL1DuMNp5h0JPInY/iFk9+?= =?iso-8859-1?q?in7PJu+Smuz1tYJ/kr42V2+OvuWDir/cjmJAtf04BUBiWjtSMva?= =?iso-8859-1?q?m5InebRk0tAmWyOTF9/zsCxssT2dsIN5WFmZq8O4Fa+HW03swRb?= =?iso-8859-1?q?VtUK95HT6pAxi6g0BUj9LT3xcG+t88DXk2YVkhAA8eNFTCtx9Bh?= =?iso-8859-1?q?pME4JTwuyujPG0X05bzLXH7kKI4u2Rnnp04iPH5hQboSNUs+Qqp?= =?iso-8859-1?q?/abCegHwCmh+hTHZrQGEFzaB6VINY3rpIzaBbBRll2FccFhnBHA?= =?iso-8859-1?q?8A2uq3UP6SeeMQdLeyyHeCsfwvXnSwWk5SzwNGkB4IjxMkOtZaH?= =?iso-8859-1?q?v0PAlEJHHZrYg4RxmbJvIyn//OUQVP6ifDEdUYDyjDSoXYH2/JY?= =?iso-8859-1?q?/M+CN/aPm/VF++B4whfXAPLt1zJLl8UdWrxSG8d04Culm8Fqtqo?= =?iso-8859-1?q?SJ8nc6ag2yYytVQV34iixrnOxe37Of4gvwIxyyxf9pLd8ZN4y8i?= =?iso-8859-1?q?sC1Zs0DXNne1WyV3cQMWKDKyNTG0Vssdd3tGcyBRuTQgf9d2LTz?= =?iso-8859-1?q?Mf2y56mkSS5nMUj3U3TSF2fz3C9XoxdKWHsSP0I06nXaretI27O?= =?iso-8859-1?q?GHjAavrap0M94Op6OHCJ6Ko7f1TQxdh+gi31EF6maKQ22FnF/ml?= =?iso-8859-1?q?M2EuHgW9fsHp45kgUzvNH+64DdVQtL2eI3gD7bTdN5XZGtiEgRy?= =?iso-8859-1?q?cTIBy00FWsaDzr56Vy4lXir/XglnioWtCzEm9RRi21qrbXS8AMK?= =?iso-8859-1?q?0neyvLide/haFt8JmQx0YUhKnkkGLw7lIV6mh1XsjSk+1V92kka?= =?iso-8859-1?q?0Wa/tQBx1QUonfqmMwwVu0yLEVYTJePS8a1K8HbDZB/QqpxQNxD?= =?iso-8859-1?q?wy7jx+81NPnxV6TbrTrckKKuP4L5qAauuQy/MOcl/HZUgK2O8jn?= =?iso-8859-1?q?Y04F8tEFp0BiB91tq9xzDj8XxVE/UVNWEnDIy/p/HOLt8zcGPNM?= =?iso-8859-1?q?MAE0JKHZ9UtJwf8GjMi2I3oXN5X2sdSzTfM81pYaZvefIOKmJ0m?= =?iso-8859-1?q?GSfz/6pTeaICXUVKzTlnA7I1pGSSiXfMp5rwEeOSHK+kIrc8XWN?= =?iso-8859-1?q?U7wHoXp49V5iwSD53sDPqANSPqzuFw=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0957AD37A0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(39860400002)(376002)(396003)(346002)(189003)(199004)(486006)(14454004)(50226002)(71190400001)(26005)(11346002)(44832011)(186003)(2616005)(478600001)(71200400001)(99286004)(52116002)(68736007)(4326008)(102836004)(2906002)(25786009)(446003)(476003)(76176011)(6636002)(6862004)(105586002)(6506007)(6436002)(54906003)(386003)(8936002)(3846002)(305945005)(8676002)(37006003)(6486002)(86362001)(5660300002)(106356001)(53936002)(256004)(7736002)(97736004)(14444005)(6512007)(66066001)(36756003)(316002)(81166006)(6116002)(1076003)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB3855; H:VI1PR0402MB2800.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 9+idEhZOFk5vqN4Uh6IvAkrJUKDSLwswtyRG0SIFdtotl9cIK4oqJmK+ZFwHOACxfERGfpzExsZF9T3P6GFHRggV7kwGqlRVMRHuS55K40Yin5bKwW3/xsr21wszbmog5Cftu72qPMvnTM3csJZPG0lMkAIflQmNOHczcN21UyPfQfGXoafopbf3VR+x4aFdiMsL6uyaFpz6RU8DZ/HOL5shmKm+e0oOpJ1SXrqyaj9ywmIcHuSr7nP3R0ovK7klH/wtW8RSOGGmWWYSjhO5aR+GetugLD1XG9eWJzp5lRZ1Z9QUcbhzgwfsZ80XJroMQ7xNOjuZWUsGZ3HL8M7fSRQOjSusVpQ4xbLMCmAZTP4KjL53iD2MH2TUocr3+/SeMDd6V6+K8538Oq/oyAyrxEIjDYid5QTuZrWqEFmD2/s= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 443011c1-e52a-4027-1bbc-08d6996bbe6a X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2019 08:48:53.9246 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3855 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Configure the amount of 64 bytes of frame, annotation and context data that will be cache stashed for a specific frame queue. Since the frame context is not used, configure that only 64 bytes of frame data and 64 bytes of annotation will be stashed. Signed-off-by: Ioana Ciornei --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index c500ea7..3c03fca8 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -2303,9 +2303,14 @@ static int setup_rx_flow(struct dpaa2_eth_priv *priv, queue.destination.type = DPNI_DEST_DPCON; queue.destination.priority = 1; queue.user_context = (u64)(uintptr_t)fq; + queue.flc.stash_control = 1; + queue.flc.value &= 0xFFFFFFFFFFFFFFC0; + /* 01 01 00 - data, annotation, flow context */ + queue.flc.value |= 0x14; err = dpni_set_queue(priv->mc_io, 0, priv->mc_token, DPNI_QUEUE_RX, 0, fq->flowid, - DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST, + DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST | + DPNI_QUEUE_OPT_FLC, &queue); if (err) { dev_err(dev, "dpni_set_queue(RX) failed\n");