From: Jisheng Zhang <jszhang@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Hoan Tran" <hoan@os.amperecomputing.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Andy Shevchenko" <andy@kernel.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, "Michael Büsch" <mb@bues.ch>
Subject: Re: [PATCH] gpio: dwapb: Fold dwapb_context into dwapb_gpio_port
Date: Thu, 20 Nov 2025 07:59:47 +0800 [thread overview]
Message-ID: <aR5Z8-haM4NwhdPg@xhacker> (raw)
In-Reply-To: <aR4EEJO_PeXMKF_h@smile.fi.intel.com>
On Wed, Nov 19, 2025 at 07:53:20PM +0200, Andy Shevchenko wrote:
> On Wed, Nov 19, 2025 at 11:00:49PM +0800, Jisheng Zhang wrote:
> > Fold dwapb_context into struct dwapb_gpio_port to further simplify
> > the code. Sure this brings a tiny 36 bytes data overhead for
> > !PM_SLEEP. After grepping the arm/arm64/riscv dts dir, the max dwapb
> > gpio port number is 6(the berlin2q soc family), so this means we will
>
> GPIO
>
> *and I believe this is limitation by Synopsys in HW, but I'm not going to check
> the datasheet right now.
snps doesn't limit this. The max dwapb gpio controller number is 6 as
is grepped the arm/arm64/riscv etc. dts dir.
>
> > waste 216 bytes memory in total which is trivial compared to the
> > system memory.
> >
> > From another side, as Michael mentioned:
> > "The driver currently allocates the struct with kzalloc and stores a
> > pointer to it in case of PM=y.
> > So this probably has an overhead in the same order of magnitude
> > (pointer + malloc overhead/alignment/fragmentation) in case of PM=y
> > now."
> >
> > So let's Fold dwapb_context into struct dwapb_gpio_port.
> >
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
>
> > CC: Michael Büsch <mb@bues.ch>
>
> Please, use --cc or move Cc list below...
>
> > ---
>
> ...this cutter line. It will have the same effect on the emails, but it will
> reduce the noise in the commit message.
>
> > NOTE: this patch is applied against the following series:
> > [PATCH v3 00/15] gpio: Use modern PM macros
>
> It's better to just put a link to lore.kernel.org or at least message-id.
>
> ...
>
> I have a mixed feelings about this, but if maintainers go with it,
> let it be then.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <jszhang@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Hoan Tran" <hoan@os.amperecomputing.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Andy Shevchenko" <andy@kernel.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, "Michael Büsch" <mb@bues.ch>
Subject: Re: [PATCH] gpio: dwapb: Fold dwapb_context into dwapb_gpio_port
Date: Thu, 20 Nov 2025 07:59:47 +0800 [thread overview]
Message-ID: <aR5Z8-haM4NwhdPg@xhacker> (raw)
In-Reply-To: <aR4EEJO_PeXMKF_h@smile.fi.intel.com>
On Wed, Nov 19, 2025 at 07:53:20PM +0200, Andy Shevchenko wrote:
> On Wed, Nov 19, 2025 at 11:00:49PM +0800, Jisheng Zhang wrote:
> > Fold dwapb_context into struct dwapb_gpio_port to further simplify
> > the code. Sure this brings a tiny 36 bytes data overhead for
> > !PM_SLEEP. After grepping the arm/arm64/riscv dts dir, the max dwapb
> > gpio port number is 6(the berlin2q soc family), so this means we will
>
> GPIO
>
> *and I believe this is limitation by Synopsys in HW, but I'm not going to check
> the datasheet right now.
snps doesn't limit this. The max dwapb gpio controller number is 6 as
is grepped the arm/arm64/riscv etc. dts dir.
>
> > waste 216 bytes memory in total which is trivial compared to the
> > system memory.
> >
> > From another side, as Michael mentioned:
> > "The driver currently allocates the struct with kzalloc and stores a
> > pointer to it in case of PM=y.
> > So this probably has an overhead in the same order of magnitude
> > (pointer + malloc overhead/alignment/fragmentation) in case of PM=y
> > now."
> >
> > So let's Fold dwapb_context into struct dwapb_gpio_port.
> >
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
>
> > CC: Michael Büsch <mb@bues.ch>
>
> Please, use --cc or move Cc list below...
>
> > ---
>
> ...this cutter line. It will have the same effect on the emails, but it will
> reduce the noise in the commit message.
>
> > NOTE: this patch is applied against the following series:
> > [PATCH v3 00/15] gpio: Use modern PM macros
>
> It's better to just put a link to lore.kernel.org or at least message-id.
>
> ...
>
> I have a mixed feelings about this, but if maintainers go with it,
> let it be then.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-11-20 0:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 15:00 [PATCH] gpio: dwapb: Fold dwapb_context into dwapb_gpio_port Jisheng Zhang
2025-11-19 15:00 ` Jisheng Zhang
2025-11-19 17:28 ` Linus Walleij
2025-11-19 17:28 ` Linus Walleij
2025-11-19 17:53 ` Andy Shevchenko
2025-11-19 17:53 ` Andy Shevchenko
2025-11-19 23:59 ` Jisheng Zhang [this message]
2025-11-19 23:59 ` Jisheng Zhang
2025-11-20 13:19 ` Bartosz Golaszewski
2025-11-20 13:19 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aR5Z8-haM4NwhdPg@xhacker \
--to=jszhang@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=hoan@os.amperecomputing.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mb@bues.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.