mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Shijith Thotton <sthotton@marvell.com>
Cc: virtualization@lists.linux.dev, mst@redhat.com,
	jasowang@redhat.com, "Satha Rao" <skoteshwar@marvell.com>,
	schalla@marvell.com, vattunuru@marvell.com,
	ndabilpuram@marvell.com, jerinj@marvell.com,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] vdpa/octeon_ep: handle device config change events
Date: Wed, 20 Nov 2024 10:26:43 +0300	[thread overview]
Message-ID: <e939fa9f-fedf-4097-8dbe-45d3bc2523d9@stanley.mountain> (raw)
In-Reply-To: <20241120070508.789508-2-sthotton@marvell.com>

On Wed, Nov 20, 2024 at 12:34:51PM +0530, Shijith Thotton wrote:
> From: Satha Rao <skoteshwar@marvell.com>
> 
> 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@marvell.com>
> Signed-off-by: Shijith Thotton <sthotton@marvell.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.

regards,
dan carpenter

> +			oct_hw->config_cb.callback(oct_hw->config_cb.private);
> +	}
> +
>  	return IRQ_HANDLED;
>  }
>  
> -- 
> 2.25.1
> 

  reply	other threads:[~2024-11-20  7:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-20  7:04 [PATCH 1/4] vdpa/octeon_ep: enable support for multiple interrupts per device Shijith Thotton
2024-11-20  7:04 ` [PATCH 2/4] vdpa/octeon_ep: handle device config change events Shijith Thotton
2024-11-20  7:26   ` Dan Carpenter [this message]
2024-11-21  5:16     ` Shijith Thotton
2024-11-20  7:04 ` [PATCH 3/4] vdpa/octeon_ep: read vendor-specific PCI capability Shijith Thotton
2024-11-20  7:04 ` [PATCH 4/4] vdpa/octeon_ep: add interrupt handler for virtio crypto device Shijith Thotton
2024-11-20  8:05 ` [PATCH 1/4] vdpa/octeon_ep: enable support for multiple interrupts per device Dan Carpenter
2024-11-21  5:42   ` Shijith Thotton

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=e939fa9f-fedf-4097-8dbe-45d3bc2523d9@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jerinj@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=ndabilpuram@marvell.com \
    --cc=schalla@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=sthotton@marvell.com \
    --cc=vattunuru@marvell.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®