Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752260AbbDHKXZ (ORCPT ); Wed, 8 Apr 2015 06:23:25 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:35416 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbbDHKXX (ORCPT ); Wed, 8 Apr 2015 06:23:23 -0400 Message-ID: <55250198.1010808@linaro.org> Date: Wed, 08 Apr 2015 11:23:20 +0100 From: Daniel Thompson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Hillf Danton CC: linux-kernel , linux-arm-kernel@lists.infradead.org, "'Russell King'" Subject: Re: [RESEND PATCH 4.0-rc5 v19 3/6] irqchip: gic: Introduce plumbing for IPI FIQ References: <088701d071d3$ec642a90$c52c7fb0$@alibaba-inc.com> <088d01d071d4$cddd9240$6998b6c0$@alibaba-inc.com> In-Reply-To: <088d01d071d4$cddd9240$6998b6c0$@alibaba-inc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1428 Lines: 38 On 08/04/15 09:19, Hillf Danton wrote: >> +/* >> + * Fully acknowledge (both ack and eoi) any outstanding FIQ-based IPI, >> + * otherwise do nothing. >> + */ >> +void gic_handle_fiq_ipi(void) >> +{ >> + struct gic_chip_data *gic = &gic_data[0]; >> + void __iomem *cpu_base = gic_data_cpu_base(gic); >> + unsigned long irqstat, irqnr; >> + >> + if (WARN_ON(!in_nmi())) >> + return; >> + >> + while ((1u << readl_relaxed(cpu_base + GIC_CPU_HIGHPRI)) & >> + SMP_IPI_FIQ_MASK) { >> + irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK); >> + writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI); >> + >> + irqnr = irqstat & GICC_IAR_INT_ID_MASK; >> + WARN_RATELIMIT(irqnr > 16, >> + "Unexpected irqnr %lu (bad prioritization?)\n", > > Help more if s/Unexpected/Unexpected FIQ/ ? The GIC logic to prioritize interrupts is independent of the logic to route interrupt sources to IRQ or FIQ. Thus if this code acknowledges an unexpected interrupt source then we really don't know whether it is an IRQ or a FIQ so we cannot accurately describe this is an unexpected FIQ. If there is bad prioritization then we cannot predict what type of interrupt INTACK will give use. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/