linux-mips
[Top] [All Lists]

Re: [PATCH 1/2] staging: octeon-ethernet: don't assume that CPU 0 is spe

To: David Daney <ddaney@caviumnetworks.com>
Subject: Re: [PATCH 1/2] staging: octeon-ethernet: don't assume that CPU 0 is special
From: Aaro Koskinen <aaro.koskinen@iki.fi>
Date: Mon, 30 Sep 2013 22:56:42 +0300
Cc: devel@driverdev.osuosl.org, linux-mips@linux-mips.org, David Daney <david.daney@cavium.com>, richard@nod.at, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In-reply-to: <5249D407.2090904@caviumnetworks.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1380397834-14286-1-git-send-email-aaro.koskinen@iki.fi> <5249B37E.4050000@caviumnetworks.com> <20130930193502.GE4572@blackmetal.musicnaut.iki.fi> <5249D407.2090904@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
Hi,

On Mon, Sep 30, 2013 at 12:41:59PM -0700, David Daney wrote:
> On 09/30/2013 12:35 PM, Aaro Koskinen wrote:
> >No, the original logic was already broken. The code assumed that the
> >NAPI scheduled by the driver init gets executed always on CPU 0. The
> >IRQ got enabled just because we are lucky.
> 
> No.  The default affinity for all irqs is CPU0 for just this reason.
> So there was no luck involved.

According the Kconfig, this driver can be compiled as a module:

> config OCTEON_ETHERNET
>       tristate "Cavium Networks Octeon Ethernet support"
[...]
>       To compile this driver as a module, choose M here.  The module
>       will be called octeon-ethernet.

What guarantees that CPU0 is around (or the smp_affinity is at its
default value) by the time user executes modprobe?

A.

<Prev in Thread] Current Thread [Next in Thread>