get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 130842,
    "url": "http://patchwork.dpdk.org/api/patches/130842/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230830021457.2064750-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": "<20230830021457.2064750-5-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230830021457.2064750-5-chaoyong.he@corigine.com",
    "date": "2023-08-30T02:14:34",
    "name": "[v2,04/27] net/nfp: remove the unneeded logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/20230830021457.2064750-5-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 29363,
            "url": "http://patchwork.dpdk.org/api/series/29363/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29363",
            "date": "2023-08-30T02:14:30",
            "name": "refact the nfpcore module",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/29363/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/130842/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/130842/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 EAAA241FC8;\n\tWed, 30 Aug 2023 04:16:06 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 897F340287;\n\tWed, 30 Aug 2023 04:15:35 +0200 (CEST)",
            "from NAM11-CO1-obe.outbound.protection.outlook.com\n (mail-co1nam11on2118.outbound.protection.outlook.com [40.107.220.118])\n by mails.dpdk.org (Postfix) with ESMTP id 642624029B\n for <dev@dpdk.org>; Wed, 30 Aug 2023 04:15:33 +0200 (CEST)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by SJ0PR13MB5548.namprd13.prod.outlook.com (2603:10b6:a03:421::5)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.34; Wed, 30 Aug\n 2023 02:15:30 +0000",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::c0f3:c2cc:b5bb:4192]) by SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::c0f3:c2cc:b5bb:4192%4]) with mapi id 15.20.6699.034; Wed, 30 Aug 2023\n 02:15:30 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=J4fFmU4P6EfOlTm6kiarVcTQSrvtEbubJciG0r8chbMDIXQQ1dpnsw1EqJZHtzn0FykkpD3mfr+lz52dctjURVqaA7woDbXNb6P9eBivaPtouLRE+zl1OMSOUiah4DvsVOMfBB9kGlrnoQ3PwDErzscpQ2qcO7rppty37cABAb1O/0Kn286tffATUGqFyCB7nT17z2QKwM6ityXVXaU6nitbkO9x8r6oV3LAUqf68iGBW/+TV1N1sv4m2fM1qvlq/eudNUH9PYxkV9WFsd4n/KoBpIVL88PfPQW+hj30zpSdJtl79v7MNbOxvsqrJOJq1T8TnVt1L63ZwJeamwt7pA==",
        "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=5kGciSqKJ/jdnT7D460tcLjBRmu7a/Q3IuDJOZhCgTg=;\n b=EpV02kM2IdDgec3XUqfcOrYtU1mNVGopgu3sJxrWI+eU2LM8q3rw+b1LSnC97FewII4E8bAN9jKn8dZoXs380EgBCGUvx1FvrbWL53BdJYybn7yEbJ8Xf3UGyHofmqKxnRs+2H/FDuSiyP2XUzFJwD/Us6+nrHkm6syxHVOadWy+OUF4cOQnzOnBnLi1LwZyobvriqRl7HusmNF9WeJy9Va6obkC8WFBJRrag/v/Fm0u6DVq1e1lLzPA4IHNSGdcg/vyEd0KLcWK0583zalPvXATbTlw5+TX7NPNAAok9/UOD8sfT5U24kZSck4ikORbVAL/EPOmWB2x7ieXUItR6g==",
        "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=5kGciSqKJ/jdnT7D460tcLjBRmu7a/Q3IuDJOZhCgTg=;\n b=FBCU8VBct7hDqb+sPG+zYcmlASI6kTDyZUpJ+VnS5wz1mQ7p+lH12kC2k/c4/6d2vBLdwZ5sQjNDytq0U8YReW+uZO7ueV+rZN/ugp4vmGnNMktqEn5geDF9NLXo4ve0MhpmBewzB3s4ZhVdg73qKPOQ2qYYXNAoAM9nJDB00RI=",
        "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, niklas.soderlund@corigine.com,\n Chaoyong He <chaoyong.he@corigine.com>",
        "Subject": "[PATCH v2 04/27] net/nfp: remove the unneeded logic",
        "Date": "Wed, 30 Aug 2023 10:14:34 +0800",
        "Message-Id": "<20230830021457.2064750-5-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20230830021457.2064750-1-chaoyong.he@corigine.com>",
        "References": "<20230824110956.1943559-1-chaoyong.he@corigine.com>\n <20230830021457.2064750-1-chaoyong.he@corigine.com>",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-ClientProxiedBy": "PH0PR07CA0113.namprd07.prod.outlook.com\n (2603:10b6:510:4::28) 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_|SJ0PR13MB5548:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "9a7fad0c-e76a-4f08-d5bf-08dba8fefb3c",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n 6ufD0SE0qD602eBLZCJ29hILR/75ANHDmI9AqXcYcvY3AIjUMdY3C93kfuRXlsjPWNDmc8tzjVS9kB8TBjD4Wz+abKxTy8fgi8aIV9ZKAxkD5NKRcTQ6VDJaeS8gavTNy6fwiJduvERHl0qBA+KXyC4aDyCrH8Jjayn3jeM9ltnrpN8JTltxgQ36CgPL0n2YZznkH3fhiZkw21TKMbQ7Cg4dk+umZBE2zrem+sJ+xgZAgjaQIow5JZnEMrpRPSgWfZoKe2PzcNIECYrThD6v2kAb7yLi8Rf7WIaqmFwpG08zE7pMcrPjf9POTb5fiauaB46HidwOYhBqVMExeAdU/OJT32RX4Wi+vAb8O73iDekZoJcdS4fAg3vqlubiX78YikUQyxNbrL+JOZfKnD/LmAGPtSFu4TBkVoir1rdTgzWsttRtphn5JQsmveI8VHSGyQXPeFg1Mwj9Qq2ulH0124bkb0XIZ96wNYkJFYtvdiDbTljIKfrBJorOO3wYmmbLyFJKxyr+mNFF6z6HF4VeWpB+lcRouwzwEcdBsbXHhOrsEx1BFERff6Znp2QPKKeRDOcjboxpY8d2LpyJaVUtmIG1Z6ZjyBuk8/u+Y7fxd8P+YtNs8ySt5K0YJs+ef4mDniEPx/P4UUmngocWG0Wz8zxp+dURoY+loMVodRAGylM=",
        "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)(346002)(396003)(136003)(39830400003)(376002)(366004)(1800799009)(451199024)(186009)(44832011)(4326008)(66556008)(6916009)(2906002)(66476007)(36756003)(66946007)(5660300002)(316002)(8936002)(8676002)(41300700001)(6506007)(6486002)(52116002)(1076003)(26005)(107886003)(6512007)(66574015)(30864003)(2616005)(38350700002)(38100700002)(478600001)(83380400001)(86362001);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "=?utf-8?q?SgH3vwRfuPJWhF9b2yGV/UhSJMnT?=\n\t=?utf-8?q?v6K/IeBz2uKYhZ1+qqvt27b9O4pR/wg2HqUvS6Fs4ImX5MiH8WNjOMRrq2qzGnK8F?=\n\t=?utf-8?q?TRaZ3MuI8Fqce6u4K8oXYiIj6Ano+iZMN3gskB/4Z5AcMOAWmiSdvBFn+hEFuJJCq?=\n\t=?utf-8?q?njXcjuRINuuQ7zNVcyujuaby6p6y4w3x4ozsASJVuGFR1H3iuKHO/jMisrPo154+L?=\n\t=?utf-8?q?avoqm/iZKGEH9d1OEHp+dcO+jmRi6TkMhSNNYCR86KW9q24BhGhJwH37AJgTr0Qp0?=\n\t=?utf-8?q?DVljpAhjxH7JhH3PSuzfgT1rvzPMXchRsL/iuZF2239Z5wIms/DGy1qFSrtdG92o2?=\n\t=?utf-8?q?0DUrS6NIMpXuFrUOirh8EkM/6br+JE3VObQegxpZj13wePkspgyiGDonEYaZEud3/?=\n\t=?utf-8?q?PfcYkNHchm2ZMy0s71aAXElVP0A67QmbQRC52cb5q+SgtghlpP0RBFlXtLsC53ASf?=\n\t=?utf-8?q?s+zWRbT9NacwlUJUsZGbo0+wbSKou7dF9jOkHz+511+XnNJOAZuqClTvf1J8sWX/T?=\n\t=?utf-8?q?YcXnoT3VF16pLyWm5KYOx/GRC+tPgj7VT4++14GGwIB8IdayULwVrC7ZIIxR4va9x?=\n\t=?utf-8?q?S9P6cY1hA4u+Bthoj/Sxa1JATH34C6Ny2/HSsZfCJS1l3apvB/6A8QxTirwKUGb88?=\n\t=?utf-8?q?uvoCntHObswQeEp5HyV/Ysn4AiRms/tDtYmc244qpoAYsFT74wKLPCEuqR6jwxUU3?=\n\t=?utf-8?q?pSC3+io7eeuaB91LeH2c/ixu2mJ+zEwZcyyvhjEPFbFTeoFmp0+qCH/vI8z0j3S3R?=\n\t=?utf-8?q?L/gvaWJmwXbGxkCQerJAvY1qQyX1tVwrjHVAt7QWNPeQIdu1xIC/GJ3PVrSjrADKq?=\n\t=?utf-8?q?MQaicZLDr3A12zE5QuhVRBTSLoHtfX4jKrRJDaAjIDyvcBzizR9hSpDUbcOJWRz+y?=\n\t=?utf-8?q?oEe/XMKm797TiPFMTKdD4B7J5gHiZwd54H0NElprMA1yJfoX5OduTbAqRg5beMHmV?=\n\t=?utf-8?q?KZMMXblyruStOLpxTcOQzr+h8Ok40/tGj5x0L/DVOuoLoJbjGnbQHZ+4S9wQYpFC5?=\n\t=?utf-8?q?uxBfJ18gWhuWIMeunQeTTIFyKvBiy+/OwiKPJFzllKanb4O9pPppcJQ7g+KQ/Obxg?=\n\t=?utf-8?q?PKwUWPk/ftkAGAJu/Pu6T42sJmgc8lCRVkyOycIQzOza6ktgWJb2Zvm1cALdw/EFO?=\n\t=?utf-8?q?6X6Z4kVPs7ZcWClWqqj1pEIVRPjYwzjwfwTzNDfiNQCjx1qXFLkTG1KPs/T8nWYtX?=\n\t=?utf-8?q?PkKK7KqrfktNNm79lsIJ5yaAi517tbwGqpoDz6F53tskCWS/t02U2e5ohx1KoN211?=\n\t=?utf-8?q?Y/pdXEEov35L9HImVPljAvab1tBhKMatRS0ktTSaobbkyE+9cQktm6Oy5oMRd5rKI?=\n\t=?utf-8?q?bHxSSd5GY4TgHek2g/ZJ2JwqHnx1hNSgM22DY9kJ2fhqx5i2c9lL8TQp3i+M4gNQh?=\n\t=?utf-8?q?ImbddiPdZaly9c0oWFUSdakbLJ97jTsy6WOOXeVP6RUNJ4OCi0MkCRkbFV51gHQo1?=\n\t=?utf-8?q?L8p73Xb3gxeVNnFHlGnFgejtPGgTqINyZEzn9d4Y88gWUPzqmDIYcJEO0mIORfP3P?=\n\t=?utf-8?q?6IdiTXK+dzAx3C1Ova5N+WoU4HBRcCP9cA=3D=3D?=",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 9a7fad0c-e76a-4f08-d5bf-08dba8fefb3c",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "30 Aug 2023 02:15:30.3068 (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 N35l1upA7O3mx6/oJYOKlbwREjDLE1NetrqJSY0lbkqqMFW86cbea7gbJnB5C8qkDQ2YYhs0WGkOGpAIYJZH7Ofb6QRArMIUz4gopXEoSO4=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SJ0PR13MB5548",
        "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 7b32721d60..f885e7d8ff 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 697361da4d..4d26e6f052 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 9213023690..899fcd7441 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": [
        "v2",
        "04/27"
    ]
}