Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754040AbcDVIty (ORCPT ); Fri, 22 Apr 2016 04:49:54 -0400 Received: from foss.arm.com ([217.140.101.70]:60043 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190AbcDVItv (ORCPT ); Fri, 22 Apr 2016 04:49:51 -0400 Subject: Re: [PATCH V2 02/14] irqchip/gic: WARN if setting the interrupt type for a PPI fails To: Jon Hunter , Thomas Gleixner , Jason Cooper , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Stephen Warren , Thierry Reding References: <1461150237-15580-1-git-send-email-jonathanh@nvidia.com> <1461150237-15580-3-git-send-email-jonathanh@nvidia.com> Cc: Kevin Hilman , Geert Uytterhoeven , Grygorii Strashko , Lars-Peter Clausen , Linus Walleij , linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org From: Marc Zyngier Organization: ARM Ltd Message-ID: <5719E5AA.9060504@arm.com> Date: Fri, 22 Apr 2016 09:49:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <1461150237-15580-3-git-send-email-jonathanh@nvidia.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1333 Lines: 29 On 20/04/16 12:03, Jon Hunter wrote: > Setting the interrupt type for private peripheral interrupts (PPIs) may > not be supported by a given GIC because it is IMPLEMENTATION DEFINED > whether this is allowed. There is no way to know if setting the type is > supported for a given GIC and so the value written is read back to > verify it matches the desired configuration. If it does not match then > an error is return. > > There are cases where the interrupt configuration read from firmware > (such as a device-tree blob), has been incorrect and hence > gic_configure_irq() has returned an error. This error has gone > undetected because the error code returned was ignored but the interrupt > still worked fine because the configuration for the interrupt could not > be overwritten. > > Given that this has done undetected and that failing to set the > configuration for a PPI may not be a catastrophic, don't return an error > but WARN if we fail to configure a PPI. This will allows us to fix up > any places in the kernel where we should be checking the return status > and maintain backward compatibility with firmware images that may have > incorrect PPI configurations. > > Signed-off-by: Jon Hunter Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...