get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2194203,
    "url": "http://patchwork.ozlabs.org/api/patches/2194203/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/opensbi/patch/20260207102602.2917520-5-anup.patel@oss.qualcomm.com/",
    "project": {
        "id": 67,
        "url": "http://patchwork.ozlabs.org/api/projects/67/?format=api",
        "name": "OpenSBI development",
        "link_name": "opensbi",
        "list_id": "opensbi.lists.infradead.org",
        "list_email": "opensbi@lists.infradead.org",
        "web_url": "https://github.com/riscv/opensbi",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": "https://github.com/riscv/opensbi/commit/{}"
    },
    "msgid": "<20260207102602.2917520-5-anup.patel@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-02-07T10:25:58",
    "name": "[4/8] lib: utils/irqchip: Add IDC to hartindex map in struct aplic_data",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a94c4b97e4d4a1f98cdab53805c4c9b84af52091",
    "submitter": {
        "id": 92322,
        "url": "http://patchwork.ozlabs.org/api/people/92322/?format=api",
        "name": "Anup Patel",
        "email": "anup.patel@oss.qualcomm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/opensbi/patch/20260207102602.2917520-5-anup.patel@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 491373,
            "url": "http://patchwork.ozlabs.org/api/series/491373/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/opensbi/list/?series=491373",
            "date": "2026-02-07T10:26:02",
            "name": "Extend irqchip framework for M-mode interrupts",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/491373/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2194203/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2194203/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LaWMOw1x;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=Hh9X8ncf;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f7RvY16THz1xtV\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 07 Feb 2026 21:26:33 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vofWD-0000000CJUb-14iV;\n\tSat, 07 Feb 2026 10:26:25 +0000",
            "from mx0b-0031df01.pphosted.com ([205.220.180.131])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vofW8-0000000CJQ2-3qCH\n\tfor opensbi@lists.infradead.org;\n\tSat, 07 Feb 2026 10:26:22 +0000",
            "from pps.filterd (m0279870.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 6174Ou8B1740797;\n\tSat, 7 Feb 2026 10:26:08 GMT",
            "from apblrppmta02.qualcomm.com\n (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c5xbf8gy3-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tSat, 07 Feb 2026 10:26:07 +0000 (GMT)",
            "from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1])\n\tby APBLRPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 617AQ3w3002713;\n\tSat, 7 Feb 2026 10:26:03 GMT",
            "from pps.reinject (localhost [127.0.0.1])\n\tby APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4c5xfkj4j9-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tSat, 07 Feb 2026 10:26:03 +0000",
            "from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com\n [127.0.0.1])\n\tby pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 617AQ3qY002687;\n\tSat, 7 Feb 2026 10:26:03 GMT",
            "from hu-devc-blr-u24-a.qualcomm.com (hu-anuppate-blr.qualcomm.com\n [10.131.36.165])\n\tby APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 617AQ3xm002679\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tSat, 07 Feb 2026 10:26:03 +0000",
            "by hu-devc-blr-u24-a.qualcomm.com (Postfix, from userid 486687)\n\tid C63ED249C6; Sat,  7 Feb 2026 15:56:02 +0530 (+0530)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=nrhZ9n8PxNtRFGn7HH4pj3LVOuRTpEd0b3DNLEZHzSc=; b=LaWMOw1xiGl5s0\n\t/JwtTHcRMsuF/31yJZRg3dDt1u6uIn9jBo3Tjczxk6awRrTgVJbOroj51DC13ic3X9tHXDetG7sHh\n\tozQzUZWL1RWmS77o0f1Dq/rhMQDQlsXO3W03XvemG7SiqY5+ZLI+rvsjDdS4k/1xg1Rqr9FOsZ6Lc\n\tuQtJoDsOOlZEJUWAnas8z2VMvhVMJC0KRAtUn/msKNafhpM3NMrD2TCLtudcgZNwBBClqZpHmFdZ1\n\tE/MZwZhylVsHXp4O38ysAYD2LglceJBix+tPrBSRJy+UHmsD9d0CqXE5uL7lMrW3Rl6fgCUrz4mae\n\tuN1i+CyCL7Sgxk20+Jbg==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n\tcc:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to; s=qcppdkim1; bh=W+YoNnB4Txs\n\tVhGGBt2uBtE1JK6XI2srnGggoc3LXPWs=; b=Hh9X8ncfR/AwTCwB9eE9XqFgvKN\n\t7OC5AAB2KlanohNJijTl399zOde6oCRHvk3xi1lA31WN6tt7E14iOWCb7o+TwHUy\n\tthOvO6kqKw0sfKuwORSnJlpbWCPGPkRt0/LNh5FcnGkfo/iZdOwRek4aBV0D9iNb\n\t25cXlNkLX5uu8sEwIxemfz4oArSp88u+TlY++obVNnc0FPtXFxJJ09cnN/8aIoCU\n\tnFEZrQzoPLeoazbdK9vAQzFrKU8HFWbcSEqdwrFFsp7onpiMQisrpxu1tuTywgPD\n\tx2LezhBRG1DuG4SE26qTWEvQtyTPGeX3vGnA9cSOtFCjUGUELdbjUmSgFOw=="
        ],
        "From": "Anup Patel <anup.patel@oss.qualcomm.com>",
        "To": "Atish Patra <atish.patra@linux.dev>",
        "Cc": "Andrew Jones <andrew.jones@oss.qualcomm.com>,\n        Raymond Mao <raymond.mao@riscstar.com>,\n        Dave Patel <dave.patel@riscstar.com>,\n        Samuel Holland <samuel.holland@sifive.com>,\n        Anup Patel <anup@brainfault.org>, opensbi@lists.infradead.org,\n        Anup Patel <anup.patel@oss.qualcomm.com>",
        "Subject": "[PATCH 4/8] lib: utils/irqchip: Add IDC to hartindex map in struct\n aplic_data",
        "Date": "Sat,  7 Feb 2026 15:55:58 +0530",
        "Message-ID": "<20260207102602.2917520-5-anup.patel@oss.qualcomm.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260207102602.2917520-1-anup.patel@oss.qualcomm.com>",
        "References": "<20260207102602.2917520-1-anup.patel@oss.qualcomm.com>",
        "MIME-Version": "1.0",
        "X-QCInternal": [
            "smtphost",
            "smtphost"
        ],
        "X-Proofpoint-Virus-Version": [
            "vendor=nai engine=6200 definitions=5800\n signatures=585085",
            "vendor=nai engine=6200 definitions=5800\n signatures=585085",
            "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-02-06_05,2026-02-05_03,2025-10-01_01"
        ],
        "X-Proofpoint-ORIG-GUID": "0-PXfmtA4iBJqsufABSEfjc_JvB437ML",
        "X-Proofpoint-GUID": "0-PXfmtA4iBJqsufABSEfjc_JvB437ML",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjA3MDA4MiBTYWx0ZWRfX+R4PKCTM539J\n VIqhK6hlJOxIyZHJxRr2TZG6qg//PAVQWrApyUxriLWIG1Z/d6hIhfiJiLmM47NLCuXL44VOL+3\n aKCsckCGY18iqePrPUkc555vZdgR3Rhj89DBCT6aC+5bHovn8LwfGAv6s7ZNqhqCymHES+0sd0A\n PEBwQ+4TnikUfWxH56KThG5Vh/rOXPAaBWLMMoEqIrZ3n4VHobzHmk0L/EKV3lFqHggXg7gzrTO\n QAbuUy0k4hBwAGoo8X3YgCrwaOGuYWuqHYfqk/lrUqkDsnnIuto1hhY0Mp1GeqQ2WAf8KtKXY3k\n OjL+LfAqE7aLNysfIc9rM1glu5dl8Epa9RCfLBt1eG/8SkevxjfzfKC5hTRPxwDioxahOtmFldr\n jSmZxDreguW8YbmiiGTEgXi1shRB7SQ6bgj6V891UJENYNW1OD3muwmp/2deo8Cs45UOKZrI1o2\n mh2f4T/OAHSmMZJSvYA==",
        "X-Authority-Analysis": "v=2.4 cv=aIb9aL9m c=1 sm=1 tr=0 ts=69871340 cx=c_pps\n a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17\n a=HzLeVaNsDn8A:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22\n a=GgsMoib0sEa3-_RKJdDe:22 a=EUspDBNiAAAA:8 a=SFL2i2No19TeFF_6YJsA:9",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n spamscore=0 adultscore=0 suspectscore=0 phishscore=0 bulkscore=0\n lowpriorityscore=0 clxscore=1015 priorityscore=1501 impostorscore=0\n malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000\n definitions=main-2602070082",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260207_022621_073948_8B788CA6 ",
        "X-CRM114-Status": "GOOD (  15.76  )",
        "X-Spam-Score": "-2.7 (--)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  A platform can have multiple APLICs in direct-mode\n targetting\n    different subset of harts. Add APLIC ID to hartindex map in struct\n aplic_data\n    to capture the set of harts targed by a given APLIC in direc [...]\n Content analysis details:   (-2.7 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n                             query to Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                        [205.220.180.131 listed in\n sa-trusted.bondedsender.org]\n  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                           [205.220.180.131 listed in\n bl.score.senderscore.com]\n  0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [205.220.180.131 listed in\n sa-accredit.habeas.com]\n -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/, low\n                             trust\n                             [205.220.180.131 listed in list.dnswl.org]\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]",
        "X-BeenThere": "opensbi@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<opensbi.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/opensbi/>",
        "List-Post": "<mailto:opensbi@lists.infradead.org>",
        "List-Help": "<mailto:opensbi-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"opensbi\" <opensbi-bounces@lists.infradead.org>",
        "Errors-To": "opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "A platform can have multiple APLICs in direct-mode targetting\ndifferent subset of harts. Add APLIC ID to hartindex map in\nstruct aplic_data to capture the set of harts targed by a\ngiven APLIC in direct-mode.\n\nSigned-off-by: Anup Patel <anup.patel@oss.qualcomm.com>\n---\n include/sbi_utils/irqchip/aplic.h     |  1 +\n lib/utils/irqchip/fdt_irqchip_aplic.c | 54 ++++++++++++++++++++++++++-\n 2 files changed, 54 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/sbi_utils/irqchip/aplic.h b/include/sbi_utils/irqchip/aplic.h\nindex cbfcd3fd..ad613778 100644\n--- a/include/sbi_utils/irqchip/aplic.h\n+++ b/include/sbi_utils/irqchip/aplic.h\n@@ -45,6 +45,7 @@ struct aplic_data {\n \tbool has_msicfg_smode;\n \tstruct aplic_msicfg_data msicfg_smode;\n \tstruct aplic_delegate_data delegate[APLIC_MAX_DELEGATE];\n+\tu32 *idc_map;\n };\n \n int aplic_cold_irqchip_init(struct aplic_data *aplic);\ndiff --git a/lib/utils/irqchip/fdt_irqchip_aplic.c b/lib/utils/irqchip/fdt_irqchip_aplic.c\nindex 81ebe67d..4d7b1e77 100644\n--- a/lib/utils/irqchip/fdt_irqchip_aplic.c\n+++ b/lib/utils/irqchip/fdt_irqchip_aplic.c\n@@ -16,6 +16,43 @@\n #include <sbi_utils/irqchip/fdt_irqchip.h>\n #include <sbi_utils/irqchip/aplic.h>\n \n+static int irqchip_aplic_update_idc_map(const void *fdt, int nodeoff,\n+\t\t\t\t\tstruct aplic_data *pd)\n+{\n+\tint i, err, count, cpu_offset, cpu_intc_offset;\n+\tu32 phandle, hartid, hartindex;\n+\tconst fdt32_t *val;\n+\n+\tval = fdt_getprop(fdt, nodeoff, \"interrupts-extended\", &count);\n+\tif (!val || count < sizeof(fdt32_t))\n+\t\treturn SBI_EINVAL;\n+\tcount = count / sizeof(fdt32_t);\n+\n+\tfor (i = 0; i < count; i += 2) {\n+\t\tphandle = fdt32_to_cpu(val[i]);\n+\n+\t\tcpu_intc_offset = fdt_node_offset_by_phandle(fdt, phandle);\n+\t\tif (cpu_intc_offset < 0)\n+\t\t\tcontinue;\n+\n+\t\tcpu_offset = fdt_parent_offset(fdt, cpu_intc_offset);\n+\t\tif (cpu_offset < 0)\n+\t\t\tcontinue;\n+\n+\t\terr = fdt_parse_hart_id(fdt, cpu_offset, &hartid);\n+\t\tif (err)\n+\t\t\tcontinue;\n+\n+\t\thartindex = sbi_hartid_to_hartindex(hartid);\n+\t\tif (hartindex == -1U)\n+\t\t\tcontinue;\n+\n+\t\tpd->idc_map[i / 2] = hartindex;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int irqchip_aplic_cold_init(const void *fdt, int nodeoff,\n \t\t\t\t   const struct fdt_match *match)\n {\n@@ -30,12 +67,27 @@ static int irqchip_aplic_cold_init(const void *fdt, int nodeoff,\n \tif (rc)\n \t\tgoto fail_free_data;\n \n+\tif (pd->num_idc) {\n+\t\tpd->idc_map = sbi_zalloc(sizeof(*pd->idc_map) * pd->num_idc);\n+\t\tif (!pd->idc_map) {\n+\t\t\trc = SBI_ENOMEM;\n+\t\t\tgoto fail_free_data;\n+\t\t}\n+\n+\t\trc = irqchip_aplic_update_idc_map(fdt, nodeoff, pd);\n+\t\tif (rc)\n+\t\t\tgoto fail_free_idc_map;\n+\t}\n+\n \trc = aplic_cold_irqchip_init(pd);\n \tif (rc)\n-\t\tgoto fail_free_data;\n+\t\tgoto fail_free_idc_map;\n \n \treturn 0;\n \n+fail_free_idc_map:\n+\tif (pd->num_idc)\n+\t\tsbi_free(pd->idc_map);\n fail_free_data:\n \tsbi_free(pd);\n \treturn rc;\n",
    "prefixes": [
        "4/8"
    ]
}