Thread (30 messages) 30 messages, 6 authors, 2025-08-28

Re: [PATCH 01/16] gpio: dwapb: Use modern PM macros

From: Jisheng Zhang <jszhang@kernel.org>
Date: 2025-08-21 17:02:12
Also in: linux-gpio, linux-omap, lkml

On Wed, Aug 20, 2025 at 10:04:39PM +0300, Andy Shevchenko wrote:
On Wed, Aug 20, 2025 at 8:11 PM Michael Büsch [off-list ref] wrote:
quoted
On Wed, 20 Aug 2025 19:54:44 +0300
Andy Shevchenko [off-list ref] wrote:
quoted
quoted
The dwapb_context structure is always embedded into struct
dwapb_gpio_port to simplify code. Sure this brings a tiny 36 bytes
data overhead for !CONFIG_PM_SLEP.
I don't think it's a good approach to add a lot of data for peanuts in
case of PM_SLEEP=n.
It wastes 36 bytes in case of PM=n.
...per port.
quoted
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.
...per driver.
Before the patch, struct dwapb_context *ctx is also per port.
So, I can't say it's equal, but I leave this to maintainers to decide,
What in my mind now: this is linux rather than RTOS. After greping the
the arm/arm64/riscv dts dir, the max port number is 6, the berlin2q
soc families, so this means current we have wasted 216 bytes memory which
is trivial compared to the system memory.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help