Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: ti: k3-psil: optimize struct psil_endpoint_config for size

Optimize struct psil_endpoint_config for size by
- reordering fields
- grouping bitfields
- change mapped_channel_id type to s16 (32K channel is enough)
- default_flow_id type to s16 as it's assigned to -1

before:
text data bss dec hex filename
12654100 5211472 666904 18532476 11ac87c vmlinux

after:
12654100 5208528 666904 18529532 11abcfc vmlinux

diff: 2944 bytes

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Link: https://lore.kernel.org/r/20210129193117.28833-1-grygorii.strashko@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Grygorii Strashko and committed by
Vinod Koul
a0f2a1cb cd90f69f

+6 -7
+6 -7
include/linux/dma/k3-psil.h
··· 42 42 /** 43 43 * struct psil_endpoint_config - PSI-L Endpoint configuration 44 44 * @ep_type: PSI-L endpoint type 45 + * @channel_tpl: Desired throughput level for the channel 45 46 * @pkt_mode: If set, the channel must be in Packet mode, otherwise in 46 47 * TR mode 47 48 * @notdpkt: TDCM must be suppressed on the TX channel 48 49 * @needs_epib: Endpoint needs EPIB 49 - * @psd_size: If set, PSdata is used by the endpoint 50 - * @channel_tpl: Desired throughput level for the channel 51 50 * @pdma_acc32: ACC32 must be enabled on the PDMA side 52 51 * @pdma_burst: BURST must be enabled on the PDMA side 52 + * @psd_size: If set, PSdata is used by the endpoint 53 53 * @mapped_channel_id: PKTDMA thread to channel mapping for mapped channels. 54 54 * The thread must be serviced by the specified channel if 55 55 * mapped_channel_id is >= 0 in case of PKTDMA ··· 62 62 */ 63 63 struct psil_endpoint_config { 64 64 enum psil_endpoint_type ep_type; 65 + enum udma_tp_level channel_tpl; 65 66 66 67 unsigned pkt_mode:1; 67 68 unsigned notdpkt:1; 68 69 unsigned needs_epib:1; 69 - u32 psd_size; 70 - enum udma_tp_level channel_tpl; 71 - 72 70 /* PDMA properties, valid for PSIL_EP_PDMA_* */ 73 71 unsigned pdma_acc32:1; 74 72 unsigned pdma_burst:1; 75 73 74 + u32 psd_size; 76 75 /* PKDMA mapped channel */ 77 - int mapped_channel_id; 76 + s16 mapped_channel_id; 78 77 /* PKTDMA tflow and rflow ranges for mapped channel */ 79 78 u16 flow_start; 80 79 u16 flow_num; 81 - u16 default_flow_id; 80 + s16 default_flow_id; 82 81 }; 83 82 84 83 int psil_set_new_ep_config(struct device *dev, const char *name,