[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PH0PR18MB4425DF39509A4EE6F4E81D32D9222@PH0PR18MB4425.namprd18.prod.outlook.com>
Date: Thu, 21 Nov 2024 05:16:27 +0000
From: Shijith Thotton <sthotton@...vell.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: "virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>,
"mst@...hat.com" <mst@...hat.com>,
"jasowang@...hat.com"
<jasowang@...hat.com>,
Satha Koteswara Rao Kottidi <skoteshwar@...vell.com>,
Srujana Challa <schalla@...vell.com>,
Vamsi Krishna Attunuru
<vattunuru@...vell.com>,
Nithin Kumar Dabilpuram <ndabilpuram@...vell.com>,
Jerin Jacob <jerinj@...vell.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio PĂ©rez <eperezma@...hat.com>,
open list
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] vdpa/octeon_ep: handle device config change events
>>
>> The first interrupt of the device is used to notify the host about
>> device configuration changes, such as link status updates. The ISR
>> configuration area is updated to indicate a config change event when
>> triggered.
>>
>> Signed-off-by: Satha Rao <skoteshwar@...vell.com>
>> Signed-off-by: Shijith Thotton <sthotton@...vell.com>
>> ---
>> drivers/vdpa/octeon_ep/octep_vdpa_main.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/vdpa/octeon_ep/octep_vdpa_main.c
>b/drivers/vdpa/octeon_ep/octep_vdpa_main.c
>> index 482c178a5221..6db951c6cb92 100644
>> --- a/drivers/vdpa/octeon_ep/octep_vdpa_main.c
>> +++ b/drivers/vdpa/octeon_ep/octep_vdpa_main.c
>> @@ -74,6 +74,14 @@ static irqreturn_t octep_vdpa_intr_handler(int irq,
>void *data)
>> }
>> }
>>
>> + /* Check for config interrupt. Config uses the first interrupt */
>> + if (unlikely(ring_start == 0 && ioread8(oct_hw->isr))) {
>> + iowrite8(0, oct_hw->isr);
>> +
>> + if (likely(oct_hw->config_cb.callback))
>
>Adding unlikely() and likey() hurts readability. It adds noise. You should do
>it if it makes a difference on a benchmark but that seems unlikely here.
>
Yes, this one can be removed. I will do it.
Thanks,
Shijith
Powered by blists - more mailing lists