mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Andrey Utkin <andrey.utkin@corp.bluecherry.net>,
	khalasa@piap.pl, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.chehab@samsung.com
Subject: Re: SOLO6x10: fix a race in IRQ handler.
Date: Sat, 15 Nov 2014 11:39:37 +0100	[thread overview]
Message-ID: <54672D69.8060708@xs4all.nl> (raw)
In-Reply-To: <m3lhneez9h.fsf@t19.piap.pl>

Hi Andrey,

Please always prefix the subject line with [PATCH] when you post a patch. That way it
will be picked up by patchwork (https://patchwork.linuxtv.org/project/linux-media/list/)
and the patch won't be lost.

Can you repost with such a prefix?

Thanks!

	Hans

On 11/15/2014 11:34 AM, Andrey Utkin wrote:
> From: khalasa@piap.pl (Krzysztof =?utf-8?Q?Ha=C5=82asa?=)
> 
> The IRQs have to be acknowledged before they are serviced, otherwise some events
> may be skipped. Also, acknowledging IRQs just before returning from the handler
> doesn't leave enough time for the device to deassert the INTx line, and for
> bridges to propagate this change. This resulted in twice the IRQ rate on ARMv6
> dual core CPU.
> 
> Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
> Acked-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> Tested-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> 
> --- a/drivers/media/pci/solo6x10/solo6x10-core.c
> +++ b/drivers/media/pci/solo6x10/solo6x10-core.c
> @@ -105,11 +105,8 @@ static irqreturn_t solo_isr(int irq, void *data)
>  	if (!status)
>  		return IRQ_NONE;
>  
> -	if (status & ~solo_dev->irq_mask) {
> -		solo_reg_write(solo_dev, SOLO_IRQ_STAT,
> -			       status & ~solo_dev->irq_mask);
> -		status &= solo_dev->irq_mask;
> -	}
> +	/* Acknowledge all interrupts immediately */
> +	solo_reg_write(solo_dev, SOLO_IRQ_STAT, status);
>  
>  	if (status & SOLO_IRQ_PCI_ERR)
>  		solo_p2m_error_isr(solo_dev);
> @@ -132,9 +129,6 @@ static irqreturn_t solo_isr(int irq, void *data)
>  	if (status & SOLO_IRQ_G723)
>  		solo_g723_isr(solo_dev);
>  
> -	/* Clear all interrupts handled */
> -	solo_reg_write(solo_dev, SOLO_IRQ_STAT, status);
> -
>  	return IRQ_HANDLED;
>  }
> 

       reply	other threads:[~2014-11-15 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3lhneez9h.fsf@t19.piap.pl>
2014-11-15 10:39 ` Hans Verkuil [this message]
2014-11-15 10:52 ` [PATCH] solo6x10: " Andrey Utkin

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=54672D69.8060708@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=andrey.utkin@corp.bluecherry.net \
    --cc=khalasa@piap.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.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

Powered by JetHome