Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5806877ybl; Tue, 14 Jan 2020 15:31:40 -0800 (PST) X-Google-Smtp-Source: APXvYqwrAbX6VSUWkItiL8S6rLSL5inO18lFeZ0YounN2gxUQr5tJ2jlnzT5Ll92IVtAKgGeKuq+ X-Received: by 2002:a9d:7586:: with SMTP id s6mr683459otk.342.1579044700005; Tue, 14 Jan 2020 15:31:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579044699; cv=none; d=google.com; s=arc-20160816; b=0UPY6PFLiYjqbJLGW+YpV6GaEUWnBOKNG0x7IbIk4o9l4E3TvYHotLOM2kjo9UVnSd nluo5QGQIfo7mfRIrJ7ieZBV0rmavcQ/DBl0pRjuSjoqeDkJ3lz4uo9+ksBAyCfpT8Ha zZRvIuGnK745ZdZM/3B7h8yqV/zZfmoAp+Q5KO/4m8oLsaLX2LSs3lPtufic9c4suVVp IbgKoV//osp1hZGTrhzb4xdjSlNUMZ1rdUFWrRwkoUA6Z2AMF6H/4aoqms2YZ1LTtdhg HkndWvQYw8uNLapOX9LTyOHc6myigR0GtRHrdST8wlIg4RSKwTpEZI3Ar1xwMzhz5QuO q3QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xtay45JSoYDoBInOvIBkON2umcFhUQpYehz+90UqGzQ=; b=c2kxfv7tl3pC/DR4TfHtX1E4N7pWe/275XzH8DLB/rMe2M7FQIC9hqRjrTMoDUi3qA rpudeBJq8BdaS165eSJI8tYS4Oq7CUFcPITM1qwsYJFXBvyBGZPNv102081/1Oi7MVf6 BhEKpKLVBIkUCIk41/pyQSHN7/MyiF8C9S8rt18osb3tt2qCJhJVsksDWLTMZUDVM1VT 7ZckcUJ4s0pX080jQtW7vzD0Qq3JaEzLjaa+xXgMx5JEaZoO+z2KwIG7xTlwAHyKc014 gZdBG+hzmG+FRQa0aG+oN3naFNtqUY8iHdrCdgp9P3EWbc5uafQW/oyn+TcV4DKTPapp XPig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u16si9370524otq.92.2020.01.14.15.31.23; Tue, 14 Jan 2020 15:31:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729015AbgANXa2 (ORCPT + 99 others); Tue, 14 Jan 2020 18:30:28 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41994 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728759AbgANXa2 (ORCPT ); Tue, 14 Jan 2020 18:30:28 -0500 Received: by mail-pg1-f196.google.com with SMTP id s64so7144123pgb.9; Tue, 14 Jan 2020 15:30:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=xtay45JSoYDoBInOvIBkON2umcFhUQpYehz+90UqGzQ=; b=TjpglJOOlC/4jLwV42ppWnmffTIgwiSgCGYqV636ES1IcvGsUupi4hBriH1agzg3J2 bdC5qkm1aVR0dWn86nMu2Nank7VGSMm5DQ4GfzxWnNKrVNKm9I2qmbOpu/Ggo419iBAh 1wgYJA0kkKbbPCWkK2rFIjllOp6s1OpwzLDdAoq7g+Krwn8EsLAibUmCTw0F5f0Up7Zx 9WIHcBsYRfFFEcE0aL+Rm2iX+tl0wQoISvJzoElVccPoc51HxZ1pI0VqE6Lv7Xgb5NBn AKJwrIqlObTns8ph8iHIrxpWA6cNwK6bgYNaFee/A+GtaGCqoXM3DskWog4BkZ4OWXI5 dR5w== X-Gm-Message-State: APjAAAXnmuCHwnn7EbdsLQ+0sQjRLjHtRASAornxOPk4rABmqUZ6hx9N BcA4cZrV/Z5lyOFLDcSp4MY= X-Received: by 2002:a62:486:: with SMTP id 128mr28162928pfe.236.1579044627249; Tue, 14 Jan 2020 15:30:27 -0800 (PST) Received: from localhost (MIPS-TECHNO.ear1.SanJose1.Level3.net. [4.15.122.74]) by smtp.gmail.com with ESMTPSA id dw10sm14376039pjb.11.2020.01.14.15.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2020 15:30:26 -0800 (PST) Date: Tue, 14 Jan 2020 15:30:25 -0800 From: Paul Burton To: Jiaxun Yang Cc: linux-mips@vger.kernel.org, chenhc@lemote.com, paul.burton@mips.com, tglx@linutronix.de, jason@lakedaemon.net, maz@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] irqchip: mips-cpu: Remove eoi operation Message-ID: <20200114233025.y4azwvivqo7kg7i5@pburton-laptop> References: <20200113101251.37471-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200113101251.37471-1-jiaxun.yang@flygoat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiaxun, On Mon, Jan 13, 2020 at 06:12:51PM +0800, Jiaxun Yang wrote: > The eoi opreation in mips_cpu_irq_controller caused chained_irq_enter > falsely consider CPU IP interrupt as a FastEOI type IRQ. So the interrupt > won't be masked during in handler. Which might lead to spurious interrupt. > > Thus we simply remove eoi operation for mips_cpu_irq_controller, > > Signed-off-by: Jiaxun Yang > --- > drivers/irqchip/irq-mips-cpu.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.c > index 95d4fd8f7a96..0ad7f1f9a58b 100644 > --- a/drivers/irqchip/irq-mips-cpu.c > +++ b/drivers/irqchip/irq-mips-cpu.c > @@ -55,7 +55,6 @@ static struct irq_chip mips_cpu_irq_controller = { > .irq_mask = mask_mips_irq, > .irq_mask_ack = mask_mips_irq, > .irq_unmask = unmask_mips_irq, > - .irq_eoi = unmask_mips_irq, > .irq_disable = mask_mips_irq, > .irq_enable = unmask_mips_irq, > }; This one scares me; something doesn't seem right. The irq_eoi (n?e eoi) callback was first added way back in commit 1417836e81c0 ("[MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq"). The commit message there states that the motivation was to allow use of handle_percpu_irq(), and indeed handle_percpu_irq() does: irq_ack() (ie. mask) invoke the handler(s) irq_eoi() (ie. unmask) By removing the irq_eoi callback I don't see how we'd ever unmask the interrupt again..? Thanks, Paul