linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: Fix gic_set_affinity infinite loop

To: "Steven J. Hill" <Steven.Hill@imgtec.com>
Subject: Re: [PATCH] MIPS: Fix gic_set_affinity infinite loop
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 26 Jun 2013 21:05:47 +0200
Cc: Tony Wu <tung7970@gmail.com>, linux-mips@linux-mips.org, Chris Dearman <chris.dearman@imgtec.com>
In-reply-to: <51C486DF.4020303@imgtec.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: <20130621111308.GC23231@hades.local> <51C486DF.4020303@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Jun 21, 2013 at 12:01:19PM -0500, Steven J. Hill wrote:

> On 06/21/2013 06:13 AM, Tony Wu wrote:
> >There is an infinite loop in gic_set_affinity. When irq_set_affinity
> >gets called on gic controller, it blocks forever.
> >
> Tony,
> 
> What hardware platform is this on and how do you trigger the call to
> 'gic_set_affinity' such that you get stuck? Thanks.

I assume on a SMP GIC configuration he must have tried something like

  echo 1 > /proc/irq/2/smp_affinity

Where 1 is a CPU bit mask and 2 the number of a GIC interrupt of which
to change the affinity.

This is a hillarious bug, this obviously has never been working.

I'm not sure if anything else would need fixing or if the loop had any
sane purpose but as of now I can't see one so I'm queueing the patch
for linux-next.

  Ralf

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