Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: devel@driverdev.osuosl.org, linux-mips@linux-mips.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH 1/2] staging: octeon-ethernet: don't assume that CPU 0 is special
Date: Sat, 28 Sep 2013 22:40:47 +0200	[thread overview]
Message-ID: <52473ECF.8080503@nod.at> (raw)
In-Reply-To: <1380397834-14286-1-git-send-email-aaro.koskinen@iki.fi>

Am 28.09.2013 21:50, schrieb Aaro Koskinen:
> Currently the driver assumes that CPU 0 is handling all the hard IRQs.
> This is wrong in Linux SMP systems where user is allowed to assign to
> hardware IRQs to any CPU. The driver will stop working if user sets
> smp_affinity so that interrupts end up being handled by other than CPU
> 0. The patch fixes that.
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> ---
>  drivers/staging/octeon/ethernet-rx.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
> index e14a1bb..de831c1 100644
> --- a/drivers/staging/octeon/ethernet-rx.c
> +++ b/drivers/staging/octeon/ethernet-rx.c
> @@ -80,6 +80,8 @@ struct cvm_oct_core_state {
>  
>  static struct cvm_oct_core_state core_state __cacheline_aligned_in_smp;
>  
> +static int cvm_irq_cpu = -1;

Why are you introducing a new global variable here?
Can't you pass cvm_irq_cpu as argument to cvm_oct_enable_napi()?

Thanks,
//richard

  parent reply	other threads:[~2013-09-28 20:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-28 19:50 [PATCH 1/2] staging: octeon-ethernet: don't assume that CPU 0 is special Aaro Koskinen
2013-09-28 19:50 ` [PATCH 2/2] staging: octeon-ethernet: allow to use only 1 CPU for packet processing Aaro Koskinen
2013-09-28 20:40 ` Richard Weinberger [this message]
2013-09-28 21:12   ` [PATCH 1/2] staging: octeon-ethernet: don't assume that CPU 0 is special Aaro Koskinen
2013-09-28 21:15 ` Richard Weinberger
2013-09-30 17:23 ` David Daney
2013-09-30 17:23   ` David Daney
2013-09-30 19:35   ` Aaro Koskinen
2013-09-30 19:41     ` David Daney
2013-09-30 19:41       ` David Daney
2013-09-30 19:56       ` Aaro Koskinen
2013-09-30 21:08         ` David Daney
2013-09-30 21:08           ` David Daney
2013-09-30 21:27           ` Aaro Koskinen
2013-10-03 20:36 ` Greg Kroah-Hartman

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=52473ECF.8080503@nod.at \
    --to=richard@nod.at \
    --cc=aaro.koskinen@iki.fi \
    --cc=david.daney@cavium.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-mips@linux-mips.org \
    /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