get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2230198,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2230198/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260429122617.7324-12-ilpo.jarvinen@linux.intel.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20260429122617.7324-12-ilpo.jarvinen@linux.intel.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260429122617.7324-12-ilpo.jarvinen@linux.intel.com/",
    "date": "2026-04-29T12:26:17",
    "name": "[11/11] PCI: Return valid alignment for assigned resources",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "167f42c22f4d944917b0de1f27858879da05772b",
    "submitter": {
        "id": 83553,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/83553/?format=api",
        "name": "Ilpo Järvinen",
        "email": "ilpo.jarvinen@linux.intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260429122617.7324-12-ilpo.jarvinen@linux.intel.com/mbox/",
    "series": [
        {
            "id": 502049,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/502049/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=502049",
            "date": "2026-04-29T12:26:06",
            "name": "PCI: pci_resource_alignment() improvement + cleanups",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502049/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230198/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230198/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-20287-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=Rz7bv+4s;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-20287-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=198.175.65.12",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=Rz7bv+4s;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.intel.com\n (client-ip=198.175.65.12; helo=mgamail.intel.com;\n envelope-from=ilpo.jarvinen@linux.intel.com; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5GpM6G63z1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 22:29:47 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g5GpJ3Fvfz2yvT;\n\tWed, 29 Apr 2026 22:29:44 +1000 (AEST)",
            "from mgamail.intel.com (mgamail.intel.com [198.175.65.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4g5GpH22Nnz2ytV\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 29 Apr 2026 22:29:42 +1000 (AEST)",
            "from orviesa002.jf.intel.com ([10.64.159.142])\n  by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Apr 2026 05:28:36 -0700",
            "from ijarvine-mobl1.ger.corp.intel.com (HELO localhost)\n ([10.245.245.212])\n  by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Apr 2026 05:28:33 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1777465784;\n\tcv=none;\n b=OHR7FqtXVHtipEHA+Dakz9R2l+P/ep4hO9tHMB8FCzUbghnyyOE46n6djapLKpopFt6MYnHeiIeFXwDnZIiCIjMLQSDQXogYdfabaIA5ug5LIJH26shUIG96dMkHwkBRY+8yO9vQMjEQ2mpuZcAdusuoOYecrQJ6pSj2B09jVvfEgae+p8xtEkKodGcOzkc07uR9UErJodRZ88UioL8H7QdHvOyok01lqtPstPZKqvoXyqpgVkmRmidTc+o/e3SRnRZbYJZcxKTNm+pGsUD4DL4CfdG6yp+N1GNKXAXnRl3YlGcFT08jUKbQRrAFwy0ffNLsZZFcY4S7BynB2iTlgg==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1777465784; c=relaxed/relaxed;\n\tbh=kblWfe9kTibuhrRU5efH3gDMw18eS1z20lnTSnESx6k=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=R42rOVEeO5ee5evRt21j6vj2KHU5kmn5eMyxDq9QfxYHjhcvTnRI8uO2iE/XwHYk1B5gtHQ64aawGD0PyFFIHLCgEF9iyfqzNrzKRPiHb9ngiKBHWlqcshhJPVnGJMOpNrLLEs+BUWAODhGZkT6N62PlnvmOhGsjY3+uus+zoIG2rD3ej+oCvb5owqjpXBP5UE+9SU1mGOQJNGO7iiw1E+lUAOAoSa6Bz4xDDmYD8ITIHXcdv+2xbxux13+/SXoWSI5wxnFtSsehKELxUVArR2V/G3XG6QAal74E8vAceZPEW7cvtkFJnc9uGrj0iYTNahjSfZQzWDiHAq8sR2sAyg==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com;\n dkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=Rz7bv+4s; dkim-atps=neutral;\n spf=pass (client-ip=198.175.65.12; helo=mgamail.intel.com;\n envelope-from=ilpo.jarvinen@linux.intel.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=linux.intel.com",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1777465784; x=1809001784;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=GKXpXP0HLpIzXt9FVzTWoltHAc5rYgaa1I20ERAvp2k=;\n  b=Rz7bv+4shmMBpxa7imBuP1+bJy9EpetkMooa8aS08Vty+wirFcWxrgew\n   FAx7gqbXvSYaQ4ejEy/sYlnvlGitXLv1PTlmnhzkHIw5K5M/76JOdAet0\n   WVylXaocGUP+QVJ/fHJtGSubO8hAUnEcgS6espO1vIoKUENg0tQF8JUAS\n   FWg+IYhLgvQ/ZuPq1ybgSFFNoB+galtU6vGr3/zZgGmZPXJJ8ZDVU0zOe\n   fKTTh6KrCypUU2TRg0ogfnf474VgjbPrf9oqEAGn83B03MS1iwO9PLtnz\n   bSJN0XYs9OmjMe+zfi2XuVkOx46NZWeCl6od9/DbybYNMf5+V7UslEIUE\n   Q==;",
        "X-CSE-ConnectionGUID": [
            "VAKngYhsRruYprushhlp3g==",
            "wGp35jvkToyaC0AQ8zhvVw=="
        ],
        "X-CSE-MsgGUID": [
            "G2Jtn3QZRMmG0QochOB1lA==",
            "vJjmMR20RrCYutR71IFsrQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11770\"; a=\"89853560\"",
            "E=Sophos;i=\"6.23,206,1770624000\";\n   d=\"scan'208\";a=\"89853560\"",
            "E=Sophos;i=\"6.23,206,1770624000\";\n   d=\"scan'208\";a=\"264639579\""
        ],
        "X-ExtLoop1": "1",
        "From": "=?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>",
        "To": "linux-pci@vger.kernel.org,\n\tBjorn Helgaas <bhelgaas@google.com>,\n\tShawn Jin <shawn.jin@asteralabs.com>,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tMadhavan Srinivasan <maddy@linux.ibm.com>,\n\tMichael Ellerman <mpe@ellerman.id.au>,\n\tNicholas Piggin <npiggin@gmail.com>,\n\tlinux-kernel@vger.kernel.org",
        "Cc": "=?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>",
        "Subject": "[PATCH 11/11] PCI: Return valid alignment for assigned resources",
        "Date": "Wed, 29 Apr 2026 15:26:17 +0300",
        "Message-Id": "<20260429122617.7324-12-ilpo.jarvinen@linux.intel.com>",
        "X-Mailer": "git-send-email 2.39.5",
        "In-Reply-To": "<20260429122617.7324-1-ilpo.jarvinen@linux.intel.com>",
        "References": "<20260429122617.7324-1-ilpo.jarvinen@linux.intel.com>",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-Spam-Status": "No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,\n\tDKIM_VALID,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "When a resource is assigned, IORESOURCE_STARTALIGN flag is cleared,\nresulting in pci_resource_alignment() returning 0 in some situations\n(at least for bridge windows).\n\nAdd heuristic to pci_resource_alignment() which mimics start and size\nalignment by taking minimum of those for an assigned resource. It may\noverestimate alignment when start has large alignment but the exact\nalignment information is not available and regenerating it by sizing\nthe bridge again is costly.\n\nSigned-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>\n---\n drivers/pci/setup-res.c | 13 +++++++++++++\n 1 file changed, 13 insertions(+)",
    "diff": "diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c\nindex c15bce20815d..03098f159ec9 100644\n--- a/drivers/pci/setup-res.c\n+++ b/drivers/pci/setup-res.c\n@@ -13,6 +13,7 @@\n  *\t     Resource sorting\n  */\n \n+#include <linux/bitops.h>\n #include <linux/kernel.h>\n #include <linux/export.h>\n #include <linux/pci.h>\n@@ -265,6 +266,18 @@ resource_size_t pci_resource_alignment(const struct pci_dev *dev,\n \t    (res->flags & (IORESOURCE_IO|IORESOURCE_MEM)))\n \t\tmin_align = pci_min_window_alignment(dev->bus, res->flags);\n \n+\tif (resource_assigned(res)) {\n+\t\tresource_size_t start_align = 1, size_align;\n+\n+\t\tsize_align = roundup_pow_of_two(resource_size(res));\n+\t\tif (res->start)\n+\t\t\tstart_align <<= __ffs(res->start);\n+\t\telse\n+\t\t\tstart_align = size_align;\n+\n+\t\treturn max(min(start_align, size_align), min_align);\n+\t}\n+\n \treturn max(resource_alignment(res), min_align);\n }\n \n",
    "prefixes": [
        "11/11"
    ]
}