get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 131538,
    "url": "http://patchwork.dpdk.org/api/patches/131538/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230918024612.1600536-5-chaoyong.he@corigine.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230918024612.1600536-5-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230918024612.1600536-5-chaoyong.he@corigine.com",
    "date": "2023-09-18T02:45:50",
    "name": "[v4,04/26] net/nfp: remove the unneeded logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "64e651bafa29175cc024d912837c37928c31ae30",
    "submitter": {
        "id": 2554,
        "url": "http://patchwork.dpdk.org/api/people/2554/?format=api",
        "name": "Chaoyong He",
        "email": "chaoyong.he@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230918024612.1600536-5-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 29531,
            "url": "http://patchwork.dpdk.org/api/series/29531/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29531",
            "date": "2023-09-18T02:45:46",
            "name": "refact the nfpcore module",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/29531/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/131538/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/131538/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 40C87425C9;\n\tMon, 18 Sep 2023 04:47:50 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AC02C40DFD;\n\tMon, 18 Sep 2023 04:47:25 +0200 (CEST)",
            "from NAM12-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam12on2112.outbound.protection.outlook.com [40.107.244.112])\n by mails.dpdk.org (Postfix) with ESMTP id B2A2C40A71\n for <dev@dpdk.org>; Mon, 18 Sep 2023 04:47:21 +0200 (CEST)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by PH7PR13MB6435.namprd13.prod.outlook.com (2603:10b6:510:2ea::9)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Mon, 18 Sep\n 2023 02:47:19 +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; Mon, 18 Sep 2023\n 02:47:19 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=b7bsrzBttxjKHdKrqdXSVHh1fRL2lf2/80Ss57vFfwLY6r/60rlh0DPxHWuRrCUr0noRvhVQc3jiY+hrC/U0weyRf3NcT/f+XqcEjSGUA+HkHRcSqIetHKfLHB5PL5mGDpcS1vfR1pDX7nMKGBBpoZXzBhTKu1GAz/tnPEdL0caPWl3R4k0exCdxfaz/rTElnU20pZ4mKKpFP3pIuAtp9rxNr3GyshfYGxT8VHIkt3wt0uFmR3uLarkwSgrpB5+yIty5U53aRJG5COvNYFTo0r75/6zFeW5/ddxu09yd8r/pr6GDO8usvYXjwAlNEx0VZvceLRG3QluywD1tATgVoQ==",
        "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=xU9szdiJqoW0Vk3yHi7NDtw9JFvSB81vHRSnHA1159A=;\n b=RKhYVetkreAjSKGt4H7TttUyI98uC48uymev/fj8Sh8ThK0FqgumtQl7BTVm6XHSkT9HwxKD8Q1iyUxGbfGxmahpkI/8fG5GORzomKNVkZLwkKoSbxdWe1xI9hSfPf4AY8l551yA0hAkw2kTCwPQEiYeTlyV2zsCakbF/BCYXJz94M+mV3QSnHKJRqs2Gjx1uVfvq/tIDKMV4LKPtfkXRHrKrEG4uyoyEmNFyFstcJO57oluAedLu5zQmGYG1W1Jiii6e1bNSLaK7JnprPwiPkVUJG7f92IEkLstGps8MxCWCivegnr8EQx9u9PIbpMCe9q4SCiOeYX3yFpAxU6H6Q==",
        "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=xU9szdiJqoW0Vk3yHi7NDtw9JFvSB81vHRSnHA1159A=;\n b=L8CD2vKzAkHFXH3AkyfnbLIkx3tDTAIqcxpejJZ6PFIThn+kOBvp5oO5+CgvTdgiupsu8R4otBqy6QF3cmsUpYhUbqS3/XjK7oBYx0OlrI0zRIPzEcumn5AUZTEZhNJ5/4FBBTN4Q56dTTmHXHOr0y0amzNcMQSxIQ2R4K2HFp0=",
        "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": "Chaoyong He <chaoyong.he@corigine.com>,\n =?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@corigine.com>",
        "Subject": "[PATCH v4 04/26] net/nfp: remove the unneeded logic",
        "Date": "Mon, 18 Sep 2023 10:45:50 +0800",
        "Message-Id": "<20230918024612.1600536-5-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20230918024612.1600536-1-chaoyong.he@corigine.com>",
        "References": "<20230915091551.1459606-1-chaoyong.he@corigine.com>\n <20230918024612.1600536-1-chaoyong.he@corigine.com>",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-ClientProxiedBy": "SE2P216CA0016.KORP216.PROD.OUTLOOK.COM\n (2603:1096:101:114::20) 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_|PH7PR13MB6435:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "04c883be-7bbd-4eb0-c742-08dbb7f1939f",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n 6XtFg40vpnSrgt12w+gbVHEf8tcOMwjl0zlom9aEGVy4lL4f/6najU1PMd9En/S1heZr+xGVWUQBFIRyPwh2uD5AScrRsPR6NM8IhpVvCor7A6/DOYD+PK1D2cJZW4MuNJJwjSFRg2mGuiangNpAoXQFqrcnvB+Hrnn5jySq/RpSXrW7Jfj1MS/41G8TUpMAcLxSjjCtcQHHKX/okGj1LuoErQ1XpDZjH1FORpVBfNKrJv3tANh00vWnIGF3KhXetukZu+D1+nDQF7XYmq/mCAICky2YEuzbzrtM0lGfThyhEQBDxoyr/oSeItHcgbRXD+dprNsUrLxaLTD1Y67TnZj3WNwaGk8dTVc9wR/n4kZCFyf6AncUU52aApKllDUJ7GQ/aDhgTVVhZV1/OFijZqulz+9I6WLeuSyl2eTlPbM8qNsry1/h+f7bCzQGrBtH/H9pADjNPYK8l5/UWUHCOVVAm3c2gfmuaymWyYI+V09L8XYdJPJb6uRGb5pIH5gtxh/9JtNg97IhjTeRH3cXBSPSHQIB6DySu/Kdosv1YFjlfDQzVD8x2fLQMR2eulJOhp5VItxsrKMwamicRAG1F7x0h5S0TxGeC2XwEIuqcfZdSSvoAcnAzPnnajSbs/UBfEh3YI3bn45hSAnYD8jGivlBsaYrx462OtvwjK9Bka4=",
        "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)(39830400003)(136003)(346002)(366004)(376002)(396003)(1800799009)(451199024)(186009)(54906003)(66476007)(66946007)(66574015)(41300700001)(6916009)(316002)(8676002)(4326008)(8936002)(52116002)(6506007)(6486002)(6512007)(478600001)(6666004)(83380400001)(26005)(1076003)(2616005)(107886003)(86362001)(2906002)(30864003)(44832011)(38100700002)(38350700002)(5660300002)(36756003)(66556008);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "=?utf-8?q?kdM0nRu7uNSRGxoHzuSkgz4WPHzS?=\n\t=?utf-8?q?77fCodDGcy//IYn7QA2AjVUIb7NNbD+LBFSxyPwZ+RSDLRkveKgRflRZR5v7JTL04?=\n\t=?utf-8?q?nfMBoBr0JgczkooTD5j5SktS4rfxxW9vSTstmIwLAYdf+1xEs88i7pkVV3hERr5Aa?=\n\t=?utf-8?q?RJLpVRZDgKf/HWj1UtsRtugOaXPOaM6CJIiW5SOBgH5TUKYraMn3d2k4e706Q1z+M?=\n\t=?utf-8?q?zbl7TwjJAIIKxWxWg+4ctzpcDXci14HpsGEwrpEcl60rZ8LC5Z0ZW6ZHw1MSiXzyz?=\n\t=?utf-8?q?M5c7c8U338oXLztnCjZPKA4A5LSo7YNHbKC03DQQm9RHuKgM/OX+PeSowPuy4xt5N?=\n\t=?utf-8?q?PewNVT/znUkQUt5vuND0TE0vcCAyJzUgtKW1we0/alrFXG8LgDDt1X99t2Lwv7nRQ?=\n\t=?utf-8?q?ZkyZHexUmStq6RuDEhX5X/lJHIu9OBq36zUGaXVyC5Ql5886sVVJMe5C/B+KDEhxD?=\n\t=?utf-8?q?8NuYHSa76SUgmxoxHrdC8dFhe1Q2FFm/0+wRKLHXAS8IkZm2aVOLF/ciX0Xq7WIy/?=\n\t=?utf-8?q?o4NUKIa4Wlr1s6q/id9RbngsAWiAT+6Sd7usI9hbXvyGzZn4Ao4ZlERpR6k2gJjJf?=\n\t=?utf-8?q?YKPGnCrcAS4c8gK0ZKv5tDoWgybx3Y5h+IBLP+a6o5S3gMnCCDhLTzEN7iZX8qXH0?=\n\t=?utf-8?q?zMfSJgPUg7q86a7VXT88zvJqtlYR05T2lE0y4QkmCEnJg/gUCGpdoPOHHXfJq1ja1?=\n\t=?utf-8?q?mEkZYLn6xKLmKT1AhHVNw416zFq5w2hhWuvo1RdNZACrEzJ/qDLaZ6xpMGU9cquCQ?=\n\t=?utf-8?q?S5lJFFYCJCgUTPT/nOqODVT4r0c7/R6H1dgf4TVhe4sDicWDqz+w8nPcx8ZyObhNr?=\n\t=?utf-8?q?JVSM9UAxMdALEqM/3u+K7p/eeI4h2PEZRsWw3HOBSxomKS9Fb9rZZBZd9LWwGSUeu?=\n\t=?utf-8?q?sO4VXu3kuCZWMSpfKRE9cR56yYc45A7ksdImX0CK5RG3PeeFxrNdwKFNC7oh5GwhG?=\n\t=?utf-8?q?w0/ID2fDoJqsVWqn2seOecdZIecr5WsOIoeP2pnuDb5WXbq1wC8bcopUFGMBJAow8?=\n\t=?utf-8?q?2/YTVUB7mc6BQsiQJ3XxsUxpe2r/pW5jnkhpFgHusneFCzpgZuTos8XCPozgNo52w?=\n\t=?utf-8?q?mldIEdM23pXOfmQR2wwzJrwF9GUVi5s4z39wolJ4zkDa0+nz7GbsdbEODTkL9hBb6?=\n\t=?utf-8?q?5DaX8Ae71Pm63pthTLR4RAMfnTcsy2XWa8JN5fA7d6pFJHZoV50CCGNuS7di0enEz?=\n\t=?utf-8?q?1CSJEtgU/eXI63vy2Y6DN1CFXmpLEd2ausM8IY3tz8635Dg/RaqtqAaAQmmmZVSts?=\n\t=?utf-8?q?aliuUxhGQ5SZ0/KlTvAJVsDohpsVgvcNKEKiO4TL+nuGRQJ7eGbPWTn30qUkQ+ATI?=\n\t=?utf-8?q?3VG35Q3M03Z9OJUHeo+ZH45pZDbGJ0i6ymWciXgg+cr8hSq7+Ft1zoxaf3fqSeZrR?=\n\t=?utf-8?q?7WiWJStUkNHaco33VDj3iP9K8hqH/jyRz/tUBJ3eml1GRhmDKGpu/Gaqp+ITWMeNN?=\n\t=?utf-8?q?lUNo5ZzJNdux87S+1gJDULWSO+GeQTlzPONn2Z8MpBJAppNXQPWxwWT6+GrW3rdQH?=\n\t=?utf-8?q?S9TK1acY8CElaxzCco5gtpfVir94vy4WaQ=3D=3D?=",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 04c883be-7bbd-4eb0-c742-08dbb7f1939f",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "18 Sep 2023 02:47:19.6503 (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 ltl1tHSMfE5Hvxv/w8aUIB2yk58aO0j1rDo9vC5ixePrO59P5VlOp2PBXEn5bE610E/i3mBlz3Tw9rpyv5kvMdKFQ3dgHJBjZNNbT6mGxTo=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR13MB6435",
        "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>\nReviewed-by: Niklas Söderlund <niklas.soderlund@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": [
        "v4",
        "04/26"
    ]
}