Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814391/?format=api
{ "id": 814391, "url": "http://patchwork.ozlabs.org/api/patches/814391/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20170915195115.1316041-1-arnd@arndb.de/", "project": { "id": 21, "url": "http://patchwork.ozlabs.org/api/projects/21/?format=api", "name": "Linux Tegra Development", "link_name": "linux-tegra", "list_id": "linux-tegra.vger.kernel.org", "list_email": "linux-tegra@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170915195115.1316041-1-arnd@arndb.de>", "list_archive_url": null, "date": "2017-09-15T19:50:36", "name": "drm: tegra: reduce stack usage in register dump helpers", "commit_ref": null, "pull_url": null, "state": "deferred", "archived": false, "hash": "7e4fb29b0653b0c24a9fa8666434be1e8a2d2b3b", "submitter": { "id": 30, "url": "http://patchwork.ozlabs.org/api/people/30/?format=api", "name": "Arnd Bergmann", "email": "arnd@arndb.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20170915195115.1316041-1-arnd@arndb.de/mbox/", "series": [ { "id": 3376, "url": "http://patchwork.ozlabs.org/api/series/3376/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=3376", "date": "2017-09-15T19:50:36", "name": "drm: tegra: reduce stack usage in register dump helpers", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/3376/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814391/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814391/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-tegra-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xv5cy37BYz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 05:51:30 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751594AbdIOTv3 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tFri, 15 Sep 2017 15:51:29 -0400", "from mout.kundenserver.de ([212.227.126.135]:59282 \"EHLO\n\tmout.kundenserver.de\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751588AbdIOTv2 (ORCPT\n\t<rfc822;linux-tegra@vger.kernel.org>);\n\tFri, 15 Sep 2017 15:51:28 -0400", "from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de\n\t(mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id\n\t0MT3vW-1e1Dqi3yVC-00S5xC; Fri, 15 Sep 2017 21:51:19 +0200" ], "From": "Arnd Bergmann <arnd@arndb.de>", "To": "Thierry Reding <thierry.reding@gmail.com>,\n\tDavid Airlie <airlied@linux.ie>, Jonathan Hunter <jonathanh@nvidia.com>", "Cc": "Arnd Bergmann <arnd@arndb.de>,\n\tLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,\n\tDaniel Vetter <daniel.vetter@ffwll.ch>,\n\tErik Faye-Lund <kusmabite@gmail.com>,\n\tMikko Perttunen <mperttunen@nvidia.com>,\n\tArto Merilainen <amerilainen@nvidia.com>,\n\tdri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org", "Subject": "[PATCH] drm: tegra: reduce stack usage in register dump helpers", "Date": "Fri, 15 Sep 2017 21:50:36 +0200", "Message-Id": "<20170915195115.1316041-1-arnd@arndb.de>", "X-Mailer": "git-send-email 2.9.0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AJ2LHX0xE\n\tezGnaeFkCcypTXy3KDiBTyC+9z5OPoyyLTfHqQ==", "Sender": "linux-tegra-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-tegra.vger.kernel.org>", "X-Mailing-List": "linux-tegra@vger.kernel.org" }, "content": "The tracing code in the tegra drm driver can lead to excessive\nstack usage in somem tegra_*_show_regs() functions:\n\ndrivers/gpu/drm/tegra/dc.c: In function 'tegra_dc_show_regs':\ndrivers/gpu/drm/tegra/dc.c:1639: error: the frame size of 1704 bytes is larger than 1024 bytes\ndrivers/gpu/drm/tegra/hdmi.c: In function 'tegra_hdmi_show_regs':\ndrivers/gpu/drm/tegra/hdmi.c:1414: error: the frame size of 1320 bytes is larger than 1024 bytes\n\nI assume that we don't actually need to trace the register\naccesses in those functions, so I'm converting all four\ninstances of this code to skip the tracing, which brings the\nstack usage down to acceptable levels.\n\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\n---\n drivers/gpu/drm/tegra/dc.c | 2 +-\n drivers/gpu/drm/tegra/drm.h | 5 +++++\n drivers/gpu/drm/tegra/dsi.c | 7 ++++++-\n drivers/gpu/drm/tegra/hdmi.c | 8 +++++++-\n drivers/gpu/drm/tegra/sor.c | 7 ++++++-\n 5 files changed, 25 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c\nindex 4df39112e38e..c80d1329f082 100644\n--- a/drivers/gpu/drm/tegra/dc.c\n+++ b/drivers/gpu/drm/tegra/dc.c\n@@ -1416,7 +1416,7 @@ static int tegra_dc_show_regs(struct seq_file *s, void *data)\n \n #define DUMP_REG(name)\t\t\t\t\t\t\\\n \tseq_printf(s, \"%-40s %#05x %08x\\n\", #name, name,\t\\\n-\t\t tegra_dc_readl(dc, name))\n+\t\t tegra_dc_readl_notrace(dc, name))\n \n \tDUMP_REG(DC_CMD_GENERAL_INCR_SYNCPT);\n \tDUMP_REG(DC_CMD_GENERAL_INCR_SYNCPT_CNTRL);\ndiff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h\nindex 063f5d397526..308d61729a9f 100644\n--- a/drivers/gpu/drm/tegra/drm.h\n+++ b/drivers/gpu/drm/tegra/drm.h\n@@ -188,6 +188,11 @@ static inline u32 tegra_dc_readl(struct tegra_dc *dc, unsigned int offset)\n \treturn value;\n }\n \n+static inline u32 tegra_dc_readl_notrace(struct tegra_dc *dc, unsigned int offset)\n+{\n+\treturn readl(dc->regs + (offset << 2));\n+}\n+\n struct tegra_dc_window {\n \tstruct {\n \t\tunsigned int x;\ndiff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c\nindex 046649ec9441..fe731d88198b 100644\n--- a/drivers/gpu/drm/tegra/dsi.c\n+++ b/drivers/gpu/drm/tegra/dsi.c\n@@ -115,6 +115,11 @@ static inline u32 tegra_dsi_readl(struct tegra_dsi *dsi, unsigned int offset)\n \treturn value;\n }\n \n+static inline u32 tegra_dsi_readl_notrace(struct tegra_dsi *dsi, unsigned int offset)\n+{\n+\treturn readl(dsi->regs + (offset << 2));\n+}\n+\n static inline void tegra_dsi_writel(struct tegra_dsi *dsi, u32 value,\n \t\t\t\t unsigned int offset)\n {\n@@ -139,7 +144,7 @@ static int tegra_dsi_show_regs(struct seq_file *s, void *data)\n \n #define DUMP_REG(name)\t\t\t\t\t\t\\\n \tseq_printf(s, \"%-32s %#05x %08x\\n\", #name, name,\t\\\n-\t\t tegra_dsi_readl(dsi, name))\n+\t\t tegra_dsi_readl_notrace(dsi, name))\n \n \tDUMP_REG(DSI_INCR_SYNCPT);\n \tDUMP_REG(DSI_INCR_SYNCPT_CONTROL);\ndiff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c\nindex 5b9d83b71943..3be5f1709585 100644\n--- a/drivers/gpu/drm/tegra/hdmi.c\n+++ b/drivers/gpu/drm/tegra/hdmi.c\n@@ -110,6 +110,12 @@ static inline u32 tegra_hdmi_readl(struct tegra_hdmi *hdmi,\n \treturn value;\n }\n \n+static inline u32 tegra_hdmi_readl_notrace(struct tegra_hdmi *hdmi,\n+\t\t\t\t\t unsigned int offset)\n+{\n+\treturn readl(hdmi->regs + (offset << 2));\n+}\n+\n static inline void tegra_hdmi_writel(struct tegra_hdmi *hdmi, u32 value,\n \t\t\t\t unsigned int offset)\n {\n@@ -1239,7 +1245,7 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)\n \n #define DUMP_REG(name)\t\t\t\t\t\t\\\n \tseq_printf(s, \"%-56s %#05x %08x\\n\", #name, name,\t\\\n-\t\t tegra_hdmi_readl(hdmi, name))\n+\t\t tegra_hdmi_readl_notrace(hdmi, name))\n \n \tDUMP_REG(HDMI_CTXSW);\n \tDUMP_REG(HDMI_NV_PDISP_SOR_STATE0);\ndiff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c\nindex 7ab1d1dc7cd7..910d49f6c5d2 100644\n--- a/drivers/gpu/drm/tegra/sor.c\n+++ b/drivers/gpu/drm/tegra/sor.c\n@@ -242,6 +242,11 @@ static inline u32 tegra_sor_readl(struct tegra_sor *sor, unsigned int offset)\n \treturn value;\n }\n \n+static inline u32 tegra_sor_readl_notrace(struct tegra_sor *sor, unsigned int offset)\n+{\n+\treturn readl(sor->regs + (offset << 2));\n+}\n+\n static inline void tegra_sor_writel(struct tegra_sor *sor, u32 value,\n \t\t\t\t unsigned int offset)\n {\n@@ -1120,7 +1125,7 @@ static int tegra_sor_show_regs(struct seq_file *s, void *data)\n \n #define DUMP_REG(name)\t\t\t\t\t\t\\\n \tseq_printf(s, \"%-38s %#05x %08x\\n\", #name, name,\t\\\n-\t\t tegra_sor_readl(sor, name))\n+\t\t tegra_sor_readl_notrace(sor, name))\n \n \tDUMP_REG(SOR_CTXSW);\n \tDUMP_REG(SOR_SUPER_STATE0);\n", "prefixes": [] }