lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef75e12e-707c-410a-8b9b-c116f54bc7ba@quicinc.com>
Date: Tue, 7 Jan 2025 16:08:52 +0530
From: Jyothi Kumar Seerapu <quic_jseerapu@...cinc.com>
To: Mukesh Kumar Savaliya <quic_msavaliy@...cinc.com>,
        Vinod Koul
	<vkoul@...nel.org>, Andi Shyti <andi.shyti@...nel.org>,
        Sumit Semwal
	<sumit.semwal@...aro.org>,
        Christian König
	<christian.koenig@....com>
CC: <linux-arm-msm@...r.kernel.org>, <dmaengine@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-i2c@...r.kernel.org>,
        <linux-media@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
        <linaro-mm-sig@...ts.linaro.org>, <quic_vtanuku@...cinc.com>
Subject: Re: [PATCH v4 1/2] dmaengine: qcom: gpi: Add GPI Block event
 interrupt support



On 1/7/2025 11:11 AM, Mukesh Kumar Savaliya wrote:
> 
> 
> On 12/17/2024 10:34 PM, Jyothi Kumar Seerapu wrote:
>> GSI hardware generates an interrupt for each transfer completion.
>> For multiple messages within a single transfer, this results in
>> N interrupts for N messages, leading to significant software
>> interrupt latency.
>>
>> To mitigate this latency, utilize Block Event Interrupt (BEI) mechanism.
>> Enabling BEI instructs the GSI hardware to prevent interrupt generation
>> and BEI is disabled when an interrupt is necessary.
>>
>> When using BEI, consider splitting a single multi-message transfer into
>> chunks of 8 internally. Interrupts are not expected for the first 7 
>> message
> chunks of 8 internally. This seems half statement to me. Something is 
> missing to complete the statement.
Okay, will review and update in next patch.
>> completions, only the last message triggers an interrupt,indicating
> ,indicating
> here give space before.
Sure, will update it in next patch v5.
>> the completion of 8 messages.
>>
>> This BEI mechanism enhances overall transfer efficiency.
>>
>> Signed-off-by: Jyothi Kumar Seerapu <quic_jseerapu@...cinc.com>
>> ---
>>
>> v3 -> v4:
>>    - API's added for Block event interrupt with multi descriptor 
>> support for
>>      I2C is moved from qcom-gpi-dma.h file to I2C geni qcom driver file.
>>    - gpi_multi_xfer_timeout_handler function is moved from GPI driver to
>>      I2C driver.
>>
>> v2-> v3:
>>     - Renamed gpi_multi_desc_process to gpi_multi_xfer_timeout_handler
>>     - MIN_NUM_OF_MSGS_MULTI_DESC changed from 4 to 2
>>     - Added documentation for newly added changes in "qcom-gpi-dma.h" 
>> file
>>     - Updated commit description.
>>
>> v1 -> v2:
>>     - Changed dma_addr type from array of pointers to array.
>>     - To support BEI functionality with the TRE size of 64 defined in 
>> GPI driver,
>>       updated QCOM_GPI_MAX_NUM_MSGS to 16 and NUM_MSGS_PER_IRQ to 4.
>>
>>   drivers/dma/qcom/gpi.c           | 3 +++
>>   include/linux/dma/qcom-gpi-dma.h | 9 +++++++++
>>   2 files changed, 12 insertions(+)
>>
>> diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
>> index 52a7c8f2498f..74eabcd1416d 100644
>> --- a/drivers/dma/qcom/gpi.c
>> +++ b/drivers/dma/qcom/gpi.c
>> @@ -1693,6 +1693,9 @@ static int gpi_create_i2c_tre(struct gchan 
>> *chan, struct gpi_desc *desc,
>>           tre->dword[3] = u32_encode_bits(TRE_TYPE_DMA, TRE_FLAGS_TYPE);
>>           tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOT);
>> +
>> +        if (i2c->flags & QCOM_GPI_BLOCK_EVENT_IRQ)
>> +            tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_BEI);
>>       }
>>       for (i = 0; i < tre_idx; i++)
>> diff --git a/include/linux/dma/qcom-gpi-dma.h b/include/linux/dma/ 
>> qcom-gpi-dma.h
>> index 6680dd1a43c6..d818c6a955e2 100644
>> --- a/include/linux/dma/qcom-gpi-dma.h
>> +++ b/include/linux/dma/qcom-gpi-dma.h
>> @@ -15,6 +15,13 @@ enum spi_transfer_cmd {
>>       SPI_DUPLEX,
>>   };
>> +/**
>> + * define QCOM_GPI_BLOCK_EVENT_IRQ - Block event interrupt support
>> + *
>> + * This is used to enable/disable the Block event interrupt mechanism.
>> + */
>> +#define QCOM_GPI_BLOCK_EVENT_IRQ    BIT(0)
>> +
>>   /**
>>    * struct gpi_spi_config - spi config for peripheral
>>    *
>> @@ -65,6 +72,7 @@ enum i2c_op {
>>    * @rx_len: receive length for buffer
>>    * @op: i2c cmd
>>    * @muli-msg: is part of multi i2c r-w msgs
>> + * @flags: true for block event interrupt support
>>    */
>>   struct gpi_i2c_config {
>>       u8 set_config;
>> @@ -78,6 +86,7 @@ struct gpi_i2c_config {
>>       u32 rx_len;
>>       enum i2c_op op;
>>       bool multi_msg;
>> +    bool flags;
> can we better singular name instead of general name ?
> something like bei_flag ? OR block_int_flag ?
Sure, will update it in next patch v5.
> 
>>   };
>>   #endif /* QCOM_GPI_DMA_H */
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ