Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9439954ybl; Fri, 17 Jan 2020 12:02:50 -0800 (PST) X-Google-Smtp-Source: APXvYqz8UJxa+sHDj7k+4wdYPxs+vk8F56gAI9CmgMBJb9iWcp3ti9rMUTn7xn7RsYcdaBm55IAp X-Received: by 2002:a05:6808:181:: with SMTP id w1mr4802127oic.176.1579291370345; Fri, 17 Jan 2020 12:02:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579291370; cv=none; d=google.com; s=arc-20160816; b=rtASuXfrSp3D5A1/00OFBuaU3thBy1nfYPx1bQ83CsknOfPE4cTPFOCeaNFjNtsQn6 loLUSMojIKxbIcSBCSXosHoOC5XmhN3ch930kCqGGxZ35jNWRiMNzflvUPDzK0jRptZO qwa5Gx6quDUeeciXWNi02Od0chZkoctKmTuk0sS8AcCH2yd/Yoia2VPiK/t2xh0nakz9 dy3oo1m/psJtjR7ScO6TpaPNLO0/jH3l4Rh6L403I5KUqn8B0BshjKnvnemkBj5FrJtG XftgTpvxzRREOLOruv7L3BwCIOmvwfmVI/rGT/RELRaKAcWrMKupp+28f8EyyXZg7QRz txQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WtLR19hFs+LsyK9KKDc5U1EMy+Rsoybh1tO8OYgc20U=; b=Kdt1Oi/bIcLKevY4Ve12d7JRNvZIiQRd2O80NYHPkCRp4FakVFr/gSaXZ+7H1oxp0W JVefPQ+dk/Rrsa8OHHKUfEuzkUOOcMq7YU2sKZOkZ3Mnp9srgUdJT3/HBkWOfXPcviE8 5qFKHXbRcw7jT8KlZUg+W2t0iOk6mkfG8jTfAQRjPxmjD1MRrEiZGzhgXx5XDHFmNFEC HyFvjbcHx+sEWYRZvAl/X4sbOd5jd47SLOGJ9GN4O8VtNiiB6HIjVIpGz8/lpkdorn+9 3PfJha5drkFPrf3p/jGPgyy114n94q6bUAFJC9cl3RUxwYwmjKFXxJ81SQi5ZB0OiiMX pK3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OBErEIy8; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si17173344otk.221.2020.01.17.12.02.37; Fri, 17 Jan 2020 12:02:50 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OBErEIy8; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729602AbgAQUB2 (ORCPT + 99 others); Fri, 17 Jan 2020 15:01:28 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:34366 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbgAQUB1 (ORCPT ); Fri, 17 Jan 2020 15:01:27 -0500 Received: by mail-oi1-f193.google.com with SMTP id l136so23287044oig.1; Fri, 17 Jan 2020 12:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WtLR19hFs+LsyK9KKDc5U1EMy+Rsoybh1tO8OYgc20U=; b=OBErEIy85vDSePoCzZvgSPRQLShCO3QAVhGIorrjIQXQN/W3AgaJYZrvDmALxj4MbA Uw0PmB5IwUsueDXgJNCyGqyAacdZOhWyZgQN1ClMsxqfiTLBR+KnCa9bi3Ertbd2T5Gr v6+zgoh+1cUbZGTYnGmzd5bB7H/5m9yMF8cMoKZ5YBg+cCCLxq2ApcvP/iGvDERe6t0W f1eAgsSuU9IqxX1ULYiSsX7BxdGJX7nt6sjwVuIn8+rlA94p8x6vkiht2g0v+d3eZdrC 655KhkwVDK6tm6mpu0Thw0DgCmSCixG6LDG9VRYGAcbo5qza5gsrIUWG7f+VNFs1a1eL NK1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WtLR19hFs+LsyK9KKDc5U1EMy+Rsoybh1tO8OYgc20U=; b=CdgvWk3Aae8IgC34xS389kIIkM1VdfTBerSjNQnlXsbTOkdKqZ2K/0EaozLeyZhJwk 4qnvrR0snfNmxjEhkzE5aJ8ZvAJJ1ef17a0sj/0WXXW2nwg1Xh0nSBmxvWj5UVrZrYEA JxiGQhkIPJDHELk/EYY81+FFczle4SW3OCXCh78bEJ7eohnyP850PIOXyx3f0MpiHPED cDjHPmzUY/VbTu1+PXgVnExl0hs3VhE3UtkytPBdL3yWwzgRcwt/bCSJHWzoqukX97Jd PaDpwQZnqSHg7WbmQ+NiM45dUvIouig3Up7jlGIHiUtS/ItVx/ieUfL/MgAPV617t7tQ 0o+A== X-Gm-Message-State: APjAAAWLFENyelYC1FRc5BrBsAluym0Hqa+ooJoV44RNoE2Pt/9yJc1A FPRum4ax0AwH6ZCGYc0rV4kd2ix9AuLCC9ntq5o= X-Received: by 2002:a54:4713:: with SMTP id k19mr4664423oik.113.1579291286913; Fri, 17 Jan 2020 12:01:26 -0800 (PST) MIME-Version: 1.0 References: <87wo9ub5f6.fsf@nanos.tec.linutronix.de> <87imldbqe3.fsf@nanos.tec.linutronix.de> <87v9pcw55q.fsf@nanos.tec.linutronix.de> <87pnfjwxtx.fsf@nanos.tec.linutronix.de> <87zhem172r.fsf@nanos.tec.linutronix.de> <87sgke1004.fsf@nanos.tec.linutronix.de> In-Reply-To: <87sgke1004.fsf@nanos.tec.linutronix.de> From: Ramon Fried Date: Fri, 17 Jan 2020 22:01:15 +0200 Message-ID: Subject: Re: MSI irqchip configured as IRQCHIP_ONESHOT_SAFE causes spurious IRQs To: Thomas Gleixner Cc: hkallweit1@gmail.com, Bjorn Helgaas , maz@kernel.org, lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 17, 2020 at 7:11 PM Thomas Gleixner wrote: > > Ramon, > > Ramon Fried writes: > > On Fri, Jan 17, 2020 at 4:38 PM Thomas Gleixner wrote: > >> This is wrong. MSI is edge type, not level and you are really mixing up > >> the concepts here. > >> > >> The fact that the MSI block raises a level interrupt on the output side > >> has absolutely nothing to do with the type of the MSI interrupt itself. > >> > >> MSI is edge type by definition and this does not change just because > >> there is a translation unit between the MSI interrupt and the CPU > >> controller. > >> > >> The actual MSI interrupts do not even know about the existance of that > >> MSI block at all. They do not care, as all they need to know is a > >> message and an address. When an interrupt is raised in the device the > >> MSI chip associated to the device (PCI or something else) writes this > >> message to the address exactly ONCE. And this exactly ONCE defines the > >> edge nature of MSI. > > > > OK, now I understand my mistake. thanks. > > :) > > >> A proper designed MSI device should not send another message before the > >> interrupt handler which is associated to the device has handled the > >> interrupt at the device level. > > > > By "MSI device" you mean the MSI controller in the SOC or the endpoint > > that sends the MSI ? > > The device which incorporates the MSI endpoint. This is not how the MSI specs describe it, so I'm confused. According to spec, MSI is just an ordinary post PCIe TLP to a certain memory on the root-complex. The only information it has whether to send an MSI or not is the masked/pending register in the config space. So, basically, back to my original question, without tinkering with these bits, the device will always send the MSI's, it's just that they will be masked on the MSI controller on the host. right ? Thanks, Ramon. > > Thanks, > > tglx