get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/131613/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 131613,
    "url": "http://patches.dpdk.org/api/patches/131613/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230919095440.45445-5-chaoyong.he@corigine.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230919095440.45445-5-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230919095440.45445-5-chaoyong.he@corigine.com",
    "date": "2023-09-19T09:54:18",
    "name": "[v5,04/26] net/nfp: remove the unneeded logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "64e651bafa29175cc024d912837c37928c31ae30",
    "submitter": {
        "id": 2554,
        "url": "http://patches.dpdk.org/api/people/2554/?format=api",
        "name": "Chaoyong He",
        "email": "chaoyong.he@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230919095440.45445-5-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 29547,
            "url": "http://patches.dpdk.org/api/series/29547/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29547",
            "date": "2023-09-19T09:54:14",
            "name": "refact the nfpcore module",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/29547/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/131613/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/131613/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 742C942600;\n\tTue, 19 Sep 2023 11:57:58 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B6ECD410F9;\n\tTue, 19 Sep 2023 11:56:09 +0200 (CEST)",
            "from NAM11-CO1-obe.outbound.protection.outlook.com\n (mail-co1nam11on2125.outbound.protection.outlook.com [40.107.220.125])\n by mails.dpdk.org (Postfix) with ESMTP id 94480409FA\n for <dev@dpdk.org>; Tue, 19 Sep 2023 11:56:03 +0200 (CEST)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by PH7PR13MB5868.namprd13.prod.outlook.com (2603:10b6:510:15a::6)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Tue, 19 Sep\n 2023 09:55:28 +0000",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::7a1c:2887:348a:84bd]) by SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::7a1c:2887:348a:84bd%6]) with mapi id 15.20.6792.026; Tue, 19 Sep 2023\n 09:55:28 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=huguLGcXI3EUoUrGWXcyZAhh1xcLepqczojWlPq1ocB3cTGApbO3MomeNCk/pXyUlHPq72P2gJ3KAmbevKUFOdZHDawYss9IuDq+aDTwib6gs0xDpJJjnW/2fSOynyCfESCy167DRZ6s4xY5zQYcQrLHIk4ztP1qyoAv13MTy5jYCAn6olahr6j+i0jCY8mmZrLQJvO5a/efOuOMY4Ppt9mGF1w0dFP3rd9F4heupoCJ5owDjl9OGqTPRYIypWNRX2mUjzQgUIHTSPds1IpU9X6YwkpN/PEBCVGH1Wis2GfDJi5Ww5dSg0u3o/g5yJDu5ZwSoHXzRYsLcg2jzszvAA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=4vFijFEbm25fvbtOwo4YafXxjin+crBfcVHY2kskbFM=;\n b=TM4nDOlSzuMg8hwh7xWxaFD3ZQlUlCWSBEYMs2K0yYR2dY6DKxJD3GNr7Y0mL98UsYF9uMIutP6WGs9nn7e6zbyh5kaxF7GcEDowbyI+hzgHzpLxd576ga9l8FFJ17FG+VdIg2jGwCLsJ1SKN36tZ3kyIfd2QKQIwamIKY/lnz7KKVPPFktUHLLJUkE9z8nIPmFT4mhPcx831lpQP1nuatnvVnspqCfDStNDYqvxZ/s1HN58CNwmNkxhBynO/RBa+rp8mgUhEE9FAdVKujlVcJWjsxBg5E6yAI4K5OQCvwk87pPit4VfxnzGM9sa8fcEvrrTraUrjv5JihA+5XsAQw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com;\n dkim=pass header.d=corigine.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=4vFijFEbm25fvbtOwo4YafXxjin+crBfcVHY2kskbFM=;\n b=X0CRL2VODzvJhBRQ2y+NumrmqXeM24qMx86hPe1pRXr3E6/gBdFvO1q8c5y46AMHylyk8nBc/PuPpO7b/W67YyxROzD/D0olBj4Vrq0GstH70epsEGJH8hJDf8yBZ6rOQtSMOk0V1UGTndhlB5a01r/Yj0fmh1/yt7mAS4A5+FM=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=corigine.com;",
        "From": "Chaoyong He <chaoyong.he@corigine.com>",
        "To": "dev@dpdk.org",
        "Cc": "oss-drivers@corigine.com,\n\tChaoyong He <chaoyong.he@corigine.com>",
        "Subject": "[PATCH v5 04/26] net/nfp: remove the unneeded logic",
        "Date": "Tue, 19 Sep 2023 17:54:18 +0800",
        "Message-Id": "<20230919095440.45445-5-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20230919095440.45445-1-chaoyong.he@corigine.com>",
        "References": "<20230918024612.1600536-1-chaoyong.he@corigine.com>\n <20230919095440.45445-1-chaoyong.he@corigine.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "BY5PR04CA0014.namprd04.prod.outlook.com\n (2603:10b6:a03:1d0::24) To SJ0PR13MB5545.namprd13.prod.outlook.com\n (2603:10b6:a03:424::5)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SJ0PR13MB5545:EE_|PH7PR13MB5868:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "17ad880a-1173-40e7-cd25-08dbb8f68d61",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n DPLAWRxBYSLJZ57Sf4Dun4C1NwMD0lsqfh7yVly/Ipocx8oh5zaDCEMeWTC3ou5ksRDub4Id2ukDPb3ti+CmZqEyJIliKO9DIEKzKu/znDTG8LGo8TDjS2kWVT8y+NNZuOhd94QEb6kiiFgHbLXi5PTDZHUZOr++DxkaaPmRIhMDoLN8WE7XKjNylKLJI+DEqpt5lpIUpQTV366CTAMNNa8TbIrn//rz0SgMmpunuTqe7/d7Pn2UbW0wZn3orr334LlN6WUt2mRT/EIhHWKG5yanxs4Fksk+/guglmsQ+oXyyLET+ThaP13GtJbg0JjoKw37Tp6JVgyrF9Xsj2JEPsuuUIj6PT2qY/EYIAcVXFJHYDE7VayxlXnISz0TrXkbyVsf4cUwWbkZdNAMyBkor6/tfqyAAqw1CmP1ujM9iGST8qp1ACmFtj0D8IMb1kSuFj2PkN49q2p/ZYONCp8fZ871Zicdlq6/4Nz5yVzLOKDhOpnVjsMAI25jl5+JLoo5XxZYwtm+FzCi+OaI4FurhNMCKBSUVUT0xn+mEKB0qgkCEN8v85eiAwZ+fnrV00StNp8r/H/XA1ooMD6QVi/fGxRVcrDueS1tkmRMR0oqjBhUXvJzXeeeFNc0K/TPQZ+pvh0JVCb8dEXHNSXjsbzQxTaZkAxn6QIfVLH+pZ3pSzo=",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230031)(136003)(39830400003)(366004)(346002)(376002)(396003)(1800799009)(186009)(451199024)(26005)(8936002)(2616005)(1076003)(8676002)(4326008)(107886003)(83380400001)(2906002)(30864003)(36756003)(44832011)(86362001)(52116002)(6506007)(6486002)(478600001)(5660300002)(6666004)(6916009)(316002)(6512007)(38100700002)(66946007)(66476007)(41300700001)(66556008)(38350700002);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n +Rrjsebby91zaZu1sO+r0xt7vSQz6ymHgynBQDrJzPfvAjttvTBjQtg062dNpQEocmUkNq4o1PZ/f00LuC0ccmiXnztPdxXqDOIWfCEPOx8g822HaE7YyXfqa4gXr4tCME7S080JT0my9udg40rKt1rSmvqaSlGas2lltewmyWgaJmwsddVV81S31qiYJxXAfxsHK+yqAXqJeXq31g+5xy9o58/Q0sHGfc64saUH+7ERqBS9/VIZL3/NYm684JCfnQGJsM3n/CS2CzizhCifzI+MlmDjIgKfEykqVJ2RsjC+xuFJ1FY4bh/SwdhdUfbtxz5SW2kCU3h7gZOjGeCuYmIg0lZomNd1tJPlbVzWUIZooowu2fMhlcXrg4eM5MdwePW0fpTQAcdv3wiADe/OU02kkFwp6FK2ejNkZB+APAOtM4pkykP32LSSv+GQOV749l7DF8d1jwamiC18UCwkQO1lL6Z5i8Uvp2EQAd+NWj4YG16TcQAf1xRJ2lvmjG6fH2IkLWXr5UOYGeLRp90obmofZoEQkqwhwBI0bj6OD+5J31UfmX6IKrI/QnoWR+dF8ioAazUzMxHwI4JNKLwgQlQ2ZZ4JlO4lVliD14DmLKFJJMKOSH6SHVWjqzb00fC17jMt1qmlxsuoVPxDsWG5tv455g4+wtHm+OK3bFl9wJRZHlQ1IeIXVtuJYI1umvFhkaxkdS7vEx62a8Dlx7RFGCE706z8w0IXUW8tFW05Yn1kEEAOC/zxJNubhJraKkPVvw8R6U4K/RYhgtjk7joTI9eEcKtvLQzJXYD/u+DKdsNYDrS4SSeaqUQYexbDrnkCNHVlMEpqkKC9NEpzzP2DCenzTUXzHwzh55u86ZlNeoQ4TB5Mr8ZCmJ8b/+WimO6Q0mNJS+G2u9xMj1Asa2nGapKd9K4r0lk2bheTftQUBr0JFH0iI3dIsq+CtXLNZGE5+ETX/CZBrV8eLAcodtE9FGQTE1X0mwNoIR5KkUZjPQ0Tii0sRXnjHEV6Cp6xr78cVX6AbYzk4Cs190+I48XK2QcczNGkXN6/JRQc79D8wlef9ypOg9I5f2x+TZeTfXzoTqYHUJB2o7y05k88Jk+JC+DkmCNevuAskdN76fpIx1C/w5IBAwEzrE/PdoC5p0x2c5fPbTMchHy6os6cCYwxhyeQZvlM1m3IJL+KWHuPFfrNYt5dXp+rTNzvpTCL0tkQ0iwNj+jrCIrg1QvotN1GrYu9HdxdMJy7wlpcn91Jvb0Mr6cg8Can+x43HGdjjA0I1TQUc72A+bKZNEIQf9qiDL73DMJRlRTV5OXuRWaOC+CGSQV9z8t9IKN7vxdH56MsBb9XP0RiazD3ncLOWX49u/NnEahC7yJLy1EuOwjTPOAbD9EpEJQF2kjZQty5hGQcRwNXG5Cf0bJk7u00qGUAjbV1IOxloG9jW5LAnYEyBrJYgIdGTLevD1aRiWZjhsnU21QnGtsqZg0opHKpINsqYF7uxTyaf5vj3TK+QaVcszuljXOAdK4si00t+0Wdc4PC/S9APIzY/S3PVwE3wUHX/J8oFTGfk11cBfZx6iXTRv82twLAsNDw25IrlerPTxXd/rRc3NurRluS3lsZ0z4GFg==",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 17ad880a-1173-40e7-cd25-08dbb8f68d61",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "19 Sep 2023 09:55:28.1073 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "fe128f2c-073b-4c20-818e-7246a585940c",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n 3Jmmco0JMqhT23J711cEBwDRqHxMlEbOb1xVWv6gEw76HUIPS6MFGQM4o/u5HCoDrus+BHdKn6V4XmJ3ouVJ/eEzUzp5olugo2UaMHKLwVo=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR13MB5868",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Remove the unneeded logic.\n\nSigned-off-by: Chaoyong He <chaoyong.he@corigine.com>\n---\n drivers/net/nfp/nfpcore/nfp_cpp.h          | 107 ----\n drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c |  12 -\n drivers/net/nfp/nfpcore/nfp_cppcore.c      | 162 ------\n drivers/net/nfp/nfpcore/nfp_mutex.c        |  48 --\n drivers/net/nfp/nfpcore/nfp_nsp_eth.c      |  24 -\n drivers/net/nfp/nfpcore/nfp_target.h       | 567 ---------------------\n 6 files changed, 920 deletions(-)",
    "diff": "diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h\nindex 782272a3f4..139752f85a 100644\n--- a/drivers/net/nfp/nfpcore/nfp_cpp.h\n+++ b/drivers/net/nfp/nfpcore/nfp_cpp.h\n@@ -96,7 +96,6 @@ struct nfp_cpp_operations {\n \n \tvoid *(*area_iomem)(struct nfp_cpp_area *area);\n \n-\tvoid *(*area_mapped)(struct nfp_cpp_area *area);\n \t/*\n \t * Perform a read from a NFP CPP area\n \t * Serialized\n@@ -457,16 +456,6 @@ void nfp_cpp_area_release_free(struct nfp_cpp_area *area);\n uint8_t *nfp_cpp_map_area(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t addr, uint32_t size, struct nfp_cpp_area **area);\n \n-/*\n- * Return an IO pointer to the beginning of the NFP CPP area handle. The area\n- * must be acquired with 'nfp_cpp_area_acquire()' before calling this operation.\n- *\n- * @param[in]\tarea\tNFP CPP area handle\n- *\n- * @return Pointer to IO memory, or NULL on failure.\n- */\n-void *nfp_cpp_area_mapped(struct nfp_cpp_area *area);\n-\n /*\n  * Read from a NFP CPP area handle into a buffer. The area must be acquired with\n  * 'nfp_cpp_area_acquire()' before calling this operation.\n@@ -508,18 +497,6 @@ int nfp_cpp_area_write(struct nfp_cpp_area *area, uint32_t offset,\n  */\n void *nfp_cpp_area_iomem(struct nfp_cpp_area *area);\n \n-/*\n- * Verify that IO can be performed on an offset in an area\n- *\n- * @param[in]\tarea\tNFP CPP area handle\n- * @param[in]\toffset\tOffset into the area\n- * @param[in]\tsize\tSize of region to validate\n- *\n- * @return 0 on success, negative value on failure.\n- */\n-int nfp_cpp_area_check_range(struct nfp_cpp_area *area,\n-\t\tunsigned long long offset, unsigned long size);\n-\n /*\n  * Get the NFP CPP handle that is the parent of a NFP CPP area handle\n  *\n@@ -564,20 +541,6 @@ int nfp_cpp_read(struct nfp_cpp *cpp, uint32_t cpp_id,\n int nfp_cpp_write(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t address, const void *kernel_vaddr, size_t length);\n \n-\n-/*\n- * Fill a NFP CPP area handle and offset with a value\n- *\n- * @param[in]\tarea\tNFP CPP area handle\n- * @param[in]\toffset\tOffset into the NFP CPP ID address space\n- * @param[in]\tvalue\t32-bit value to fill area with\n- * @param[in]\tlength\tSize of the area to reserve\n- *\n- * @return bytes written on success, negative value on failure.\n- */\n-int nfp_cpp_area_fill(struct nfp_cpp_area *area, unsigned long offset,\n-\t\tuint32_t value, size_t length);\n-\n /*\n  * Read a single 32-bit value from a NFP CPP area handle\n  *\n@@ -668,33 +631,6 @@ int nfp_xpb_writel(struct nfp_cpp *cpp, uint32_t xpb_tgt, uint32_t value);\n  */\n int nfp_xpb_readl(struct nfp_cpp *cpp, uint32_t xpb_tgt, uint32_t *value);\n \n-/*\n- * Modify bits of a 32-bit value from the XPB bus\n- *\n- * @param cpp           NFP CPP device handle\n- * @param xpb_tgt       XPB target and address\n- * @param mask          mask of bits to alter\n- * @param value         value to modify\n- *\n- * @return 0 on success, or -1 on failure.\n- */\n-int nfp_xpb_writelm(struct nfp_cpp *cpp, uint32_t xpb_tgt, uint32_t mask,\n-\t\tuint32_t value);\n-\n-/*\n- * Modify bits of a 32-bit value from the XPB bus\n- *\n- * @param cpp           NFP CPP device handle\n- * @param xpb_tgt       XPB target and address\n- * @param mask          mask of bits to alter\n- * @param value         value to monitor for\n- * @param timeout_us    maximum number of us to wait (-1 for forever)\n- *\n- * @return >= 0 on success, negative value on failure.\n- */\n-int nfp_xpb_waitlm(struct nfp_cpp *cpp, uint32_t xpb_tgt, uint32_t mask,\n-\t\tuint32_t value, int timeout_us);\n-\n /*\n  * Read a 32-bit word from a NFP CPP ID\n  *\n@@ -789,49 +725,6 @@ int nfp_cpp_mutex_init(struct nfp_cpp *cpp, int target,\n struct nfp_cpp_mutex *nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, int target,\n \t\tuint64_t address, uint32_t key_id);\n \n-/*\n- * Get the NFP CPP handle the mutex was created with\n- *\n- * @param   mutex   NFP mutex handle\n- * @return          NFP CPP handle\n- */\n-struct nfp_cpp *nfp_cpp_mutex_cpp(struct nfp_cpp_mutex *mutex);\n-\n-/*\n- * Get the mutex key\n- *\n- * @param   mutex   NFP mutex handle\n- * @return          Mutex key\n- */\n-uint32_t nfp_cpp_mutex_key(struct nfp_cpp_mutex *mutex);\n-\n-/*\n- * Get the mutex owner\n- *\n- * @param   mutex   NFP mutex handle\n- * @return          Interface ID of the mutex owner\n- *\n- * NOTE: This is for debug purposes ONLY - the owner may change at any time,\n- * unless it has been locked by this NFP CPP handle.\n- */\n-uint16_t nfp_cpp_mutex_owner(struct nfp_cpp_mutex *mutex);\n-\n-/*\n- * Get the mutex target\n- *\n- * @param   mutex   NFP mutex handle\n- * @return          Mutex CPP target (ie NFP_CPP_TARGET_MU)\n- */\n-int nfp_cpp_mutex_target(struct nfp_cpp_mutex *mutex);\n-\n-/*\n- * Get the mutex address\n- *\n- * @param   mutex   NFP mutex handle\n- * @return          Mutex CPP address\n- */\n-uint64_t nfp_cpp_mutex_address(struct nfp_cpp_mutex *mutex);\n-\n /*\n  * Free a mutex handle - does not alter the lock state\n  *\ndiff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c\nindex 881f21bfd0..ec14ec45dc 100644\n--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c\n+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c\n@@ -471,17 +471,6 @@ nfp6000_area_acquire(struct nfp_cpp_area *area)\n \treturn 0;\n }\n \n-static void *\n-nfp6000_area_mapped(struct nfp_cpp_area *area)\n-{\n-\tstruct nfp6000_area_priv *area_priv = nfp_cpp_area_priv(area);\n-\n-\tif (area_priv->iomem == NULL)\n-\t\treturn NULL;\n-\n-\treturn area_priv->iomem;\n-}\n-\n static void\n nfp6000_area_release(struct nfp_cpp_area *area)\n {\n@@ -829,7 +818,6 @@ static const struct nfp_cpp_operations nfp6000_pcie_ops = {\n \t.area_init = nfp6000_area_init,\n \t.area_acquire = nfp6000_area_acquire,\n \t.area_release = nfp6000_area_release,\n-\t.area_mapped = nfp6000_area_mapped,\n \t.area_read = nfp6000_area_read,\n \t.area_write = nfp6000_area_write,\n \t.area_iomem = nfp6000_area_iomem,\ndiff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c\nindex 627d4eaa5d..7e7c36eda3 100644\n--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c\n+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c\n@@ -388,35 +388,6 @@ nfp_cpp_area_write(struct nfp_cpp_area *area,\n \treturn area->cpp->op->area_write(area, kernel_vaddr, offset, length);\n }\n \n-void *\n-nfp_cpp_area_mapped(struct nfp_cpp_area *area)\n-{\n-\tif (area->cpp->op->area_mapped)\n-\t\treturn area->cpp->op->area_mapped(area);\n-\treturn NULL;\n-}\n-\n-/*\n- * nfp_cpp_area_check_range - check if address range fits in CPP area\n- *\n- * @area:   CPP area handle\n- * @offset: offset into CPP area\n- * @length: size of address range in bytes\n- *\n- * Check if address range fits within CPP area.  Return 0 if area fits\n- * or negative value on error.\n- */\n-int\n-nfp_cpp_area_check_range(struct nfp_cpp_area *area,\n-\t\tunsigned long long offset,\n-\t\tunsigned long length)\n-{\n-\tif (((offset + length) > area->size))\n-\t\treturn -EFAULT;\n-\n-\treturn 0;\n-}\n-\n /*\n  * Return the correct CPP address, and fixup xpb_addr as needed,\n  * based upon NFP model.\n@@ -671,82 +642,6 @@ nfp_cpp_from_device_name(struct rte_pci_device *dev,\n \treturn nfp_cpp_alloc(dev, driver_lock_needed);\n }\n \n-/*\n- * Modify bits of a 32-bit value from the XPB bus\n- *\n- * @param cpp           NFP CPP device handle\n- * @param xpb_tgt       XPB target and address\n- * @param mask          mask of bits to alter\n- * @param value         value to modify\n- *\n- * @return 0 on success, or -1 on failure.\n- */\n-int\n-nfp_xpb_writelm(struct nfp_cpp *cpp,\n-\t\tuint32_t xpb_tgt,\n-\t\tuint32_t mask,\n-\t\tuint32_t value)\n-{\n-\tint err;\n-\tuint32_t tmp;\n-\n-\terr = nfp_xpb_readl(cpp, xpb_tgt, &tmp);\n-\tif (err < 0)\n-\t\treturn err;\n-\n-\ttmp &= ~mask;\n-\ttmp |= (mask & value);\n-\treturn nfp_xpb_writel(cpp, xpb_tgt, tmp);\n-}\n-\n-/*\n- * Modify bits of a 32-bit value from the XPB bus\n- *\n- * @param cpp           NFP CPP device handle\n- * @param xpb_tgt       XPB target and address\n- * @param mask          mask of bits to alter\n- * @param value         value to monitor for\n- * @param timeout_us    maximum number of us to wait (-1 for forever)\n- *\n- * @return >= 0 on success, or negative value on failure.\n- */\n-int\n-nfp_xpb_waitlm(struct nfp_cpp *cpp,\n-\t\tuint32_t xpb_tgt,\n-\t\tuint32_t mask,\n-\t\tuint32_t value,\n-\t\tint timeout_us)\n-{\n-\tuint32_t tmp;\n-\tint err;\n-\n-\tdo {\n-\t\terr = nfp_xpb_readl(cpp, xpb_tgt, &tmp);\n-\t\tif (err < 0)\n-\t\t\tgoto exit;\n-\n-\t\tif ((tmp & mask) == (value & mask)) {\n-\t\t\tif (timeout_us < 0)\n-\t\t\t\ttimeout_us = 0;\n-\t\t\tbreak;\n-\t\t}\n-\n-\t\tif (timeout_us < 0)\n-\t\t\tcontinue;\n-\n-\t\ttimeout_us -= 100;\n-\t\tusleep(100);\n-\t} while (timeout_us >= 0);\n-\n-\tif (timeout_us < 0)\n-\t\terr = -ETIMEDOUT;\n-\telse\n-\t\terr = timeout_us;\n-\n-exit:\n-\treturn err;\n-}\n-\n /*\n  * nfp_cpp_read - read from CPP target\n  * @cpp:        CPP handle\n@@ -805,63 +700,6 @@ nfp_cpp_write(struct nfp_cpp *cpp,\n \treturn err;\n }\n \n-/*\n- * nfp_cpp_area_fill - fill a CPP area with a value\n- * @area:       CPP area\n- * @offset:     offset into CPP area\n- * @value:      value to fill with\n- * @length:     length of area to fill\n- */\n-int\n-nfp_cpp_area_fill(struct nfp_cpp_area *area,\n-\t\tunsigned long offset,\n-\t\tuint32_t value,\n-\t\tsize_t length)\n-{\n-\tint err;\n-\tsize_t i;\n-\tuint64_t value64;\n-\n-\tvalue = rte_cpu_to_le_32(value);\n-\tvalue64 = ((uint64_t)value << 32) | value;\n-\n-\tif ((offset + length) > area->size)\n-\t\treturn -EINVAL;\n-\n-\tif ((area->offset + offset) & 3)\n-\t\treturn -EINVAL;\n-\n-\tif (((area->offset + offset) & 7) == 4 && length >= 4) {\n-\t\terr = nfp_cpp_area_write(area, offset, &value, sizeof(value));\n-\t\tif (err < 0)\n-\t\t\treturn err;\n-\t\tif (err != sizeof(value))\n-\t\t\treturn -ENOSPC;\n-\t\toffset += sizeof(value);\n-\t\tlength -= sizeof(value);\n-\t}\n-\n-\tfor (i = 0; (i + sizeof(value)) < length; i += sizeof(value64)) {\n-\t\terr = nfp_cpp_area_write(area, offset + i, &value64,\n-\t\t\t\tsizeof(value64));\n-\t\tif (err < 0)\n-\t\t\treturn err;\n-\t\tif (err != sizeof(value64))\n-\t\t\treturn -ENOSPC;\n-\t}\n-\n-\tif ((i + sizeof(value)) <= length) {\n-\t\terr = nfp_cpp_area_write(area, offset + i, &value, sizeof(value));\n-\t\tif (err < 0)\n-\t\t\treturn err;\n-\t\tif (err != sizeof(value))\n-\t\t\treturn -ENOSPC;\n-\t\ti += sizeof(value);\n-\t}\n-\n-\treturn (int)i;\n-}\n-\n /*\n  * NOTE: This code should not use nfp_xpb_* functions,\n  * as those are model-specific\ndiff --git a/drivers/net/nfp/nfpcore/nfp_mutex.c b/drivers/net/nfp/nfpcore/nfp_mutex.c\nindex 7ac06e897a..edc8137304 100644\n--- a/drivers/net/nfp/nfpcore/nfp_mutex.c\n+++ b/drivers/net/nfp/nfpcore/nfp_mutex.c\n@@ -178,54 +178,6 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp,\n \treturn mutex;\n }\n \n-struct nfp_cpp *\n-nfp_cpp_mutex_cpp(struct nfp_cpp_mutex *mutex)\n-{\n-\treturn mutex->cpp;\n-}\n-\n-uint32_t\n-nfp_cpp_mutex_key(struct nfp_cpp_mutex *mutex)\n-{\n-\treturn mutex->key;\n-}\n-\n-uint16_t\n-nfp_cpp_mutex_owner(struct nfp_cpp_mutex *mutex)\n-{\n-\tuint32_t mur = NFP_CPP_ID(mutex->target, 3, 0);\t/* atomic_read */\n-\tuint32_t value, key;\n-\tint err;\n-\n-\terr = nfp_cpp_readl(mutex->cpp, mur, mutex->address, &value);\n-\tif (err < 0)\n-\t\treturn err;\n-\n-\terr = nfp_cpp_readl(mutex->cpp, mur, mutex->address + 4, &key);\n-\tif (err < 0)\n-\t\treturn err;\n-\n-\tif (key != mutex->key)\n-\t\treturn -EPERM;\n-\n-\tif (MUTEX_IS_LOCKED(value) == 0)\n-\t\treturn 0;\n-\n-\treturn MUTEX_INTERFACE(value);\n-}\n-\n-int\n-nfp_cpp_mutex_target(struct nfp_cpp_mutex *mutex)\n-{\n-\treturn mutex->target;\n-}\n-\n-uint64_t\n-nfp_cpp_mutex_address(struct nfp_cpp_mutex *mutex)\n-{\n-\treturn mutex->address;\n-}\n-\n /*\n  * Free a mutex handle - does not alter the lock state\n  *\ndiff --git a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c\nindex 5492840aa1..bc155b44d8 100644\n--- a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c\n+++ b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c\n@@ -11,30 +11,6 @@\n #include \"nfp_nsp.h\"\n #include \"nfp6000/nfp6000.h\"\n \n-#define GENMASK_ULL(h, l) \\\n-\t(((~0ULL) - (1ULL << (l)) + 1) & \\\n-\t (~0ULL >> (64 - 1 - (h))))\n-\n-#define __bf_shf(x) (__builtin_ffsll(x) - 1)\n-\n-#define FIELD_GET(_mask, _reg)\t\t\t\t\t\t\\\n-\t(__extension__ ({ \\\n-\t\ttypeof(_mask) _x = (_mask); \\\n-\t\t(typeof(_x))(((_reg) & (_x)) >> __bf_shf(_x));\t\\\n-\t}))\n-\n-#define FIELD_FIT(_mask, _val)\t\t\t\t\t\t\\\n-\t(__extension__ ({ \\\n-\t\ttypeof(_mask) _x = (_mask); \\\n-\t\t!((((typeof(_x))_val) << __bf_shf(_x)) & ~(_x)); \\\n-\t}))\n-\n-#define FIELD_PREP(_mask, _val)\t\t\t\t\t\t\\\n-\t(__extension__ ({ \\\n-\t\ttypeof(_mask) _x = (_mask); \\\n-\t\t((typeof(_x))(_val) << __bf_shf(_x)) & (_x);\t\\\n-\t}))\n-\n #define NSP_ETH_NBI_PORT_COUNT\t\t24\n #define NSP_ETH_MAX_COUNT\t\t(2 * NSP_ETH_NBI_PORT_COUNT)\n #define NSP_ETH_TABLE_SIZE\t\t(NSP_ETH_MAX_COUNT *\t\t\\\ndiff --git a/drivers/net/nfp/nfpcore/nfp_target.h b/drivers/net/nfp/nfpcore/nfp_target.h\nindex 03908a894f..195e599d31 100644\n--- a/drivers/net/nfp/nfpcore/nfp_target.h\n+++ b/drivers/net/nfp/nfpcore/nfp_target.h\n@@ -6,571 +6,4 @@\n #ifndef NFP_TARGET_H\n #define NFP_TARGET_H\n \n-#include \"nfp_cpp.h\"\n-\n-#define P32 1\n-#define P64 2\n-\n-#define PUSHPULL(_pull, _push) (((_pull) << 4) | ((_push) << 0))\n-\n-#ifndef NFP_ERRNO\n-#include <errno.h>\n-#define NFP_ERRNO(x)    (errno = (x), -1)\n-#endif\n-\n-static inline int\n-pushpull_width(int pp)\n-{\n-\tpp &= 0xf;\n-\n-\tif (pp == 0)\n-\t\treturn NFP_ERRNO(EINVAL);\n-\treturn (2 << pp);\n-}\n-\n-#define PUSH_WIDTH(_pushpull)      pushpull_width((_pushpull) >> 0)\n-#define PULL_WIDTH(_pushpull)      pushpull_width((_pushpull) >> 4)\n-\n-static inline int\n-target_rw(uint32_t cpp_id, int pp, int start, int len)\n-{\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);\n-\n-\tif (island && (island < start || island > (start + len)))\n-\t\treturn NFP_ERRNO(EINVAL);\n-\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 0, 0):\n-\t\treturn PUSHPULL(0, pp);\n-\tcase NFP_CPP_ID(0, 1, 0):\n-\t\treturn PUSHPULL(pp, 0);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 0):\n-\t\treturn PUSHPULL(pp, pp);\n-\tdefault:\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_nbi_dma(uint32_t cpp_id)\n-{\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 0, 0): /* ReadNbiDma */\n-\t\treturn PUSHPULL(0, P64);\n-\tcase NFP_CPP_ID(0, 1, 0): /* WriteNbiDma */\n-\t\treturn PUSHPULL(P64, 0);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 0):\n-\t\treturn PUSHPULL(P64, P64);\n-\tdefault:\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_nbi_stats(uint32_t cpp_id)\n-{\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 0, 0): /* ReadNbiStats */\n-\t\treturn PUSHPULL(0, P64);\n-\tcase NFP_CPP_ID(0, 1, 0): /* WriteNbiStats */\n-\t\treturn PUSHPULL(P64, 0);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 0):\n-\t\treturn PUSHPULL(P64, P64);\n-\tdefault:\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_nbi_tm(uint32_t cpp_id)\n-{\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 0, 0): /* ReadNbiTM */\n-\t\treturn PUSHPULL(0, P64);\n-\tcase NFP_CPP_ID(0, 1, 0):  /* WriteNbiTM */\n-\t\treturn PUSHPULL(P64, 0);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 0):\n-\t\treturn PUSHPULL(P64, P64);\n-\tdefault:\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_nbi_ppc(uint32_t cpp_id)\n-{\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 0, 0): /* ReadNbiPreclassifier */\n-\t\treturn PUSHPULL(0, P64);\n-\tcase NFP_CPP_ID(0, 1, 0): /* WriteNbiPreclassifier */\n-\t\treturn PUSHPULL(P64, 0);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 0):\n-\t\treturn PUSHPULL(P64, P64);\n-\tdefault:\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_nbi(uint32_t cpp_id, uint64_t address)\n-{\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);\n-\tuint64_t rel_addr = address & 0x3fFFFF;\n-\n-\tif (island && (island < 8 || island > 9))\n-\t\treturn NFP_ERRNO(EINVAL);\n-\n-\tif (rel_addr < (1 << 20))\n-\t\treturn nfp6000_nbi_dma(cpp_id);\n-\tif (rel_addr < (2 << 20))\n-\t\treturn nfp6000_nbi_stats(cpp_id);\n-\tif (rel_addr < (3 << 20))\n-\t\treturn nfp6000_nbi_tm(cpp_id);\n-\treturn nfp6000_nbi_ppc(cpp_id);\n-}\n-\n-/*\n- * This structure ONLY includes items that can be done with a read or write of\n- * 32-bit or 64-bit words. All others are not listed.\n- */\n-static inline int\n-nfp6000_mu_common(uint32_t cpp_id)\n-{\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 0): /* read_be/write_be */\n-\t\treturn PUSHPULL(P64, P64);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 1): /* read_le/write_le */\n-\t\treturn PUSHPULL(P64, P64);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 2): /* {read/write}_swap_be */\n-\t\treturn PUSHPULL(P64, P64);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 3): /* {read/write}_swap_le */\n-\t\treturn PUSHPULL(P64, P64);\n-\tcase NFP_CPP_ID(0, 0, 0): /* read_be */\n-\t\treturn PUSHPULL(0, P64);\n-\tcase NFP_CPP_ID(0, 0, 1): /* read_le */\n-\t\treturn PUSHPULL(0, P64);\n-\tcase NFP_CPP_ID(0, 0, 2): /* read_swap_be */\n-\t\treturn PUSHPULL(0, P64);\n-\tcase NFP_CPP_ID(0, 0, 3): /* read_swap_le */\n-\t\treturn PUSHPULL(0, P64);\n-\tcase NFP_CPP_ID(0, 1, 0): /* write_be */\n-\t\treturn PUSHPULL(P64, 0);\n-\tcase NFP_CPP_ID(0, 1, 1): /* write_le */\n-\t\treturn PUSHPULL(P64, 0);\n-\tcase NFP_CPP_ID(0, 1, 2): /* write_swap_be */\n-\t\treturn PUSHPULL(P64, 0);\n-\tcase NFP_CPP_ID(0, 1, 3): /* write_swap_le */\n-\t\treturn PUSHPULL(P64, 0);\n-\tcase NFP_CPP_ID(0, 3, 0): /* atomic_read */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 3, 2): /* mask_compare_write */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 4, 0): /* atomic_write */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 4, 2): /* atomic_write_imm */\n-\t\treturn PUSHPULL(0, 0);\n-\tcase NFP_CPP_ID(0, 4, 3): /* swap_imm */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 5, 0): /* set */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 5, 3): /* test_set_imm */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 6, 0): /* clr */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 6, 3): /* test_clr_imm */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 7, 0): /* add */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 7, 3): /* test_add_imm */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 8, 0): /* addsat */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 8, 3): /* test_subsat_imm */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 9, 0): /* sub */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 9, 3): /* test_sub_imm */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 10, 0): /* subsat */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 10, 3): /* test_subsat_imm */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 13, 0): /* microq128_get */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 13, 1): /* microq128_pop */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 13, 2): /* microq128_put */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 15, 0): /* xor */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 15, 3): /* test_xor_imm */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 28, 0): /* read32_be */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 28, 1): /* read32_le */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 28, 2): /* read32_swap_be */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 28, 3): /* read32_swap_le */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 31, 0): /* write32_be */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 31, 1): /* write32_le */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 31, 2): /* write32_swap_be */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 31, 3): /* write32_swap_le */\n-\t\treturn PUSHPULL(P32, 0);\n-\tdefault:\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_mu_ctm(uint32_t cpp_id)\n-{\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 16, 1): /* packet_read_packet_status */\n-\t\treturn PUSHPULL(0, P32);\n-\tdefault:\n-\t\treturn nfp6000_mu_common(cpp_id);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_mu_emu(uint32_t cpp_id)\n-{\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 18, 0): /* read_queue */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 18, 1): /* read_queue_ring */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 18, 2): /* write_queue */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 18, 3): /* write_queue_ring */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 20, 2): /* journal */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 21, 0): /* get */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 21, 1): /* get_eop */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 21, 2): /* get_freely */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 22, 0): /* pop */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 22, 1): /* pop_eop */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 22, 2): /* pop_freely */\n-\t\treturn PUSHPULL(0, P32);\n-\tdefault:\n-\t\treturn nfp6000_mu_common(cpp_id);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_mu_imu(uint32_t cpp_id)\n-{\n-\treturn nfp6000_mu_common(cpp_id);\n-}\n-\n-static inline int\n-nfp6000_mu(uint32_t cpp_id, uint64_t address)\n-{\n-\tint pp;\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);\n-\n-\tif (island == 0) {\n-\t\tif (address < 0x2000000000ULL)\n-\t\t\tpp = nfp6000_mu_ctm(cpp_id);\n-\t\telse if (address < 0x8000000000ULL)\n-\t\t\tpp = nfp6000_mu_emu(cpp_id);\n-\t\telse if (address < 0x9800000000ULL)\n-\t\t\tpp = nfp6000_mu_ctm(cpp_id);\n-\t\telse if (address < 0x9C00000000ULL)\n-\t\t\tpp = nfp6000_mu_emu(cpp_id);\n-\t\telse if (address < 0xA000000000ULL)\n-\t\t\tpp = nfp6000_mu_imu(cpp_id);\n-\t\telse\n-\t\t\tpp = nfp6000_mu_ctm(cpp_id);\n-\t} else if (island >= 24 && island <= 27) {\n-\t\tpp = nfp6000_mu_emu(cpp_id);\n-\t} else if (island >= 28 && island <= 31) {\n-\t\tpp = nfp6000_mu_imu(cpp_id);\n-\t} else if (island == 1 ||\n-\t\t   (island >= 4 && island <= 7) ||\n-\t\t   (island >= 12 && island <= 13) ||\n-\t\t   (island >= 32 && island <= 47) ||\n-\t\t   (island >= 48 && island <= 51)) {\n-\t\tpp = nfp6000_mu_ctm(cpp_id);\n-\t} else {\n-\t\tpp = NFP_ERRNO(EINVAL);\n-\t}\n-\n-\treturn pp;\n-}\n-\n-static inline int\n-nfp6000_ila(uint32_t cpp_id)\n-{\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);\n-\n-\tif (island && (island < 48 || island > 51))\n-\t\treturn NFP_ERRNO(EINVAL);\n-\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 0, 1): /* read_check_error */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 2, 0): /* read_int */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 3, 0): /* write_int */\n-\t\treturn PUSHPULL(P32, 0);\n-\tdefault:\n-\t\treturn target_rw(cpp_id, P32, 48, 4);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_pci(uint32_t cpp_id)\n-{\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);\n-\n-\tif (island && (island < 4 || island > 7))\n-\t\treturn NFP_ERRNO(EINVAL);\n-\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 2, 0):\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 3, 0):\n-\t\treturn PUSHPULL(P32, 0);\n-\tdefault:\n-\t\treturn target_rw(cpp_id, P32, 4, 4);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_crypto(uint32_t cpp_id)\n-{\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);\n-\n-\tif (island && (island < 12 || island > 15))\n-\t\treturn NFP_ERRNO(EINVAL);\n-\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 2, 0):\n-\t\treturn PUSHPULL(P64, 0);\n-\tdefault:\n-\t\treturn target_rw(cpp_id, P64, 12, 4);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_cap_xpb(uint32_t cpp_id)\n-{\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);\n-\n-\tif (island > 63)\n-\t\treturn NFP_ERRNO(EINVAL);\n-\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 0, 1): /* RingGet */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 0, 2): /* Interthread Signal */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 1, 1): /* RingPut */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 1, 2): /* CTNNWr */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 2, 0): /* ReflectRd, signal none */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 2, 1): /* ReflectRd, signal self */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 2, 2): /* ReflectRd, signal remote */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 2, 3): /* ReflectRd, signal both */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 3, 0): /* ReflectWr, signal none */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 3, 1): /* ReflectWr, signal self */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 3, 2): /* ReflectWr, signal remote */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 3, 3): /* ReflectWr, signal both */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, NFP_CPP_ACTION_RW, 1):\n-\t\treturn PUSHPULL(P32, P32);\n-\tdefault:\n-\t\treturn target_rw(cpp_id, P32, 1, 63);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_cls(uint32_t cpp_id)\n-{\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);\n-\n-\tif (island > 63)\n-\t\treturn NFP_ERRNO(EINVAL);\n-\n-\tswitch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {\n-\tcase NFP_CPP_ID(0, 0, 3): /* xor */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 2, 0): /* set */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 2, 1): /* clr */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 4, 0): /* add */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 4, 1): /* add64 */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 6, 0): /* sub */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 6, 1): /* sub64 */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 6, 2): /* subsat */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 8, 2): /* hash_mask */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 8, 3): /* hash_clear */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 9, 0): /* ring_get */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 9, 1): /* ring_pop */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 9, 2): /* ring_get_freely */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 9, 3): /* ring_pop_freely */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 10, 0): /* ring_put */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 10, 2): /* ring_journal */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 14, 0): /* reflect_write_sig_local */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 15, 1):  /* reflect_read_sig_local */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 17, 2): /* statistic */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 24, 0): /* ring_read */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 24, 1): /* ring_write */\n-\t\treturn PUSHPULL(P32, 0);\n-\tcase NFP_CPP_ID(0, 25, 0): /* ring_workq_add_thread */\n-\t\treturn PUSHPULL(0, P32);\n-\tcase NFP_CPP_ID(0, 25, 1): /* ring_workq_add_work */\n-\t\treturn PUSHPULL(P32, 0);\n-\tdefault:\n-\t\treturn target_rw(cpp_id, P32, 0, 64);\n-\t}\n-}\n-\n-static inline int\n-nfp6000_target_pushpull(uint32_t cpp_id, uint64_t address)\n-{\n-\tswitch (NFP_CPP_ID_TARGET_of(cpp_id)) {\n-\tcase NFP6000_CPPTGT_NBI:\n-\t\treturn nfp6000_nbi(cpp_id, address);\n-\tcase NFP6000_CPPTGT_VQDR:\n-\t\treturn target_rw(cpp_id, P32, 24, 4);\n-\tcase NFP6000_CPPTGT_ILA:\n-\t\treturn nfp6000_ila(cpp_id);\n-\tcase NFP6000_CPPTGT_MU:\n-\t\treturn nfp6000_mu(cpp_id, address);\n-\tcase NFP6000_CPPTGT_PCIE:\n-\t\treturn nfp6000_pci(cpp_id);\n-\tcase NFP6000_CPPTGT_ARM:\n-\t\tif (address < 0x10000)\n-\t\t\treturn target_rw(cpp_id, P64, 1, 1);\n-\t\telse\n-\t\t\treturn target_rw(cpp_id, P32, 1, 1);\n-\tcase NFP6000_CPPTGT_CRYPTO:\n-\t\treturn nfp6000_crypto(cpp_id);\n-\tcase NFP6000_CPPTGT_CTXPB:\n-\t\treturn nfp6000_cap_xpb(cpp_id);\n-\tcase NFP6000_CPPTGT_CLS:\n-\t\treturn nfp6000_cls(cpp_id);\n-\tcase 0:\n-\t\treturn target_rw(cpp_id, P32, 4, 4);\n-\tdefault:\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-}\n-\n-static inline int\n-nfp_target_pushpull_width(int pp, int write_not_read)\n-{\n-\tif (pp < 0)\n-\t\treturn pp;\n-\n-\tif (write_not_read)\n-\t\treturn PULL_WIDTH(pp);\n-\telse\n-\t\treturn PUSH_WIDTH(pp);\n-}\n-\n-static inline int\n-nfp6000_target_action_width(uint32_t cpp_id, uint64_t address,\n-\t\t\t    int write_not_read)\n-{\n-\tint pp;\n-\n-\tpp = nfp6000_target_pushpull(cpp_id, address);\n-\n-\treturn nfp_target_pushpull_width(pp, write_not_read);\n-}\n-\n-static inline int\n-nfp_target_action_width(uint32_t model, uint32_t cpp_id, uint64_t address,\n-\t\t\tint write_not_read)\n-{\n-\tif (NFP_CPP_MODEL_IS_6000(model)) {\n-\t\treturn nfp6000_target_action_width(cpp_id, address,\n-\t\t\t\t\t\t   write_not_read);\n-\t} else {\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-}\n-\n-static inline int\n-nfp_target_cpp(uint32_t cpp_island_id, uint64_t cpp_island_address,\n-\t       uint32_t *cpp_target_id, uint64_t *cpp_target_address,\n-\t       const uint32_t *imb_table)\n-{\n-\tint err;\n-\tuint8_t island = NFP_CPP_ID_ISLAND_of(cpp_island_id);\n-\tuint8_t target = NFP_CPP_ID_TARGET_of(cpp_island_id);\n-\tuint32_t imb;\n-\n-\tif (target >= 16)\n-\t\treturn NFP_ERRNO(EINVAL);\n-\n-\tif (island == 0) {\n-\t\t/* Already translated */\n-\t\t*cpp_target_id = cpp_island_id;\n-\t\t*cpp_target_address = cpp_island_address;\n-\t\treturn 0;\n-\t}\n-\n-\tif (imb_table == NULL) {\n-\t\t/* CPP + Island only allowed on systems with IMB tables */\n-\t\treturn NFP_ERRNO(EINVAL);\n-\t}\n-\n-\timb = imb_table[target];\n-\n-\t*cpp_target_address = cpp_island_address;\n-\terr = _nfp6000_cppat_addr_encode(cpp_target_address, island, target,\n-\t\t\t\t\t ((imb >> 13) & 7),\n-\t\t\t\t\t ((imb >> 12) & 1),\n-\t\t\t\t\t ((imb >> 6) & 0x3f),\n-\t\t\t\t\t ((imb >> 0) & 0x3f));\n-\tif (err == 0) {\n-\t\t*cpp_target_id =\n-\t\t    NFP_CPP_ID(target, NFP_CPP_ID_ACTION_of(cpp_island_id),\n-\t\t\t       NFP_CPP_ID_TOKEN_of(cpp_island_id));\n-\t}\n-\n-\treturn err;\n-}\n-\n #endif /* NFP_TARGET_H */\n",
    "prefixes": [
        "v5",
        "04/26"
    ]
}