Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5368281ybi; Wed, 12 Jun 2019 01:05:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwR0/Ge7ktit1brQ+XgJ4kxFniVdPcbI0JPsB8fTOYldt0PepPwjAne63WEYM220rpIAemv X-Received: by 2002:a17:90a:1904:: with SMTP id 4mr12292875pjg.116.1560326733958; Wed, 12 Jun 2019 01:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560326733; cv=none; d=google.com; s=arc-20160816; b=Ty+1zqgk1qF0K/5GPrYjHi1jrsFsSrSBPpSRnZaxNeEfEvy7LM9K1UpWsLjfnct+vZ C0fMKHSSi1yCbtFi1Xe5lVr25zwgUM0Ck4SuLWuh3uzZnNau6Nq0aNiWKUhlpoL+zSif uZD1PKk/RZwahPN45xZUukmSZ6JZEiNTxTiynXT+aaPCKMZw1tbFAZ8iDKRjUa9D1YdD 6M9DrlCdZNaUqq+x1lKGmqGaud4yuG8FfrJfGAkPGqjX0ErCTaK8QLdwgghVJWb4DanI /4titncMopbhOyNS4IUNBFPTuVBFitdR3Bdku8gcuwah7YiGSwkzlF+D28RtPBIwlnPn P3GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=bG8N39DjZFcrMT38OgelL0ivg5pqr5NQ7Zu4yBM3ir8=; b=hzMiwsSj/HDafXXIDw9sdCDPucOT8HlppFP21wweagU3ysrR1LutUBlnY3wSp5cmN4 d5Kt7f/kZXl9ZPBusUc7SvZFDuJBKWnVmc4+rLhwhRtfb3aUm+gtDeGjR+8H8Ynhtxai eJpFKY9dzdrGiTaIuc8pSKfJ6eBlB6+iG0mVr36yoFpAUQ4yR9hanjTPPLIJIEnuZriD k6hqbCQKPVqJBapbhIr85/JlP7RCeX6dFdu/5KolBH7CYm9uA2GGqhYHQDC/m0ysVEmK 6cjs1fxOQjTX7yAOnmJFsuSam1I/wyXj1L9dJ1qa0ZZzILujfUF9bBOT4bP3da4YKjns VP4w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 204si9547057pgd.520.2019.06.12.01.05.17; Wed, 12 Jun 2019 01:05:33 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730642AbfFLFzb (ORCPT + 99 others); Wed, 12 Jun 2019 01:55:31 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:60554 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbfFLFzb (ORCPT ); Wed, 12 Jun 2019 01:55:31 -0400 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23990398AbfFLFz2EBmjF (ORCPT + 1 other); Wed, 12 Jun 2019 07:55:28 +0200 Date: Wed, 12 Jun 2019 06:55:28 +0100 (BST) From: "Maciej W. Rozycki" To: Aaro Koskinen cc: Alexandre Oliva , Tom Li , James Hogan , Jiaxun Yang , Huacai Chen , Ralf Baechle , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] On the Current Troubles of Mainlining Loongson Platform Drivers In-Reply-To: <20190610214938.GB7147@darkstar.musicnaut.iki.fi> Message-ID: References: <20190211230614.GB22242@darkstar.musicnaut.iki.fi> <20190217235951.GA20700@darkstar.musicnaut.iki.fi> <20190610214938.GB7147@darkstar.musicnaut.iki.fi> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Jun 2019, Aaro Koskinen wrote: > However, with your patch the "nobody cared" is never reached so all is > good. I tried 10 boots with the patch and all were successful. Without > the patch 8 out of 10 failed with the "nobody cared" warning. I wouldn't call it "good", just less obvious or painful. This is still causing wasted CPU cycles that are used for taking the phantom interrupts. There is clearly a completion barrier missing somewhere that causes the interrupt request to linger beyond the point interrupts are reenabled at the CPU. One way to attempt to narrow it down might be taking a backtrace from where IRQ 14 is found to be spurious. This would indicate the offending interrupt unmask action. E.g. I see no explicit completion barrier between the final `outb' in `mask_and_ack_8259A' and the following call to `raw_spin_unlock_irqrestore', which are obviously otherwise unordered WRT each other (because `outb' is I/O or MMIO and `raw_spin_unlock_irqrestore' is contained within the CPU on UP). I can see provisions however for issuing an architecture-specific barrier in `do_raw_spin_unlock', which is the workhorse for `raw_spin_unlock_irqrestore', so maybe this is the place to look into? Also how's IRQ 14 registered as indicated by /proc/interrupts? Maciej