Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4034724pxb; Mon, 1 Feb 2021 10:38:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRKjDYPMEvkyrU2GRvhpyxyK93knr7h7mcOuFdRdDlLz2ZvXcZ8E73R7WMwr+IEr4uaDci X-Received: by 2002:aa7:d2d2:: with SMTP id k18mr7665385edr.222.1612204710533; Mon, 01 Feb 2021 10:38:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612204710; cv=none; d=google.com; s=arc-20160816; b=bqdWM6sR7JhezUSvyf/pZHSzDetPgtbM++Q+jsv2PKJgw2xaQbpr/TjMdy3moz+mEu yTB3+A0TcWvS5oq1diMeTu5SRyRn2X8+fO9/e5WnmBulvTg809ABqXnjiA7CWsx8eoC7 OVBnrln5bnMO4FNAbwQreVrMb8RqCsRhGtMFd/a7nG5sdm8wGJlyK8tCQclhHPvKD2iA Nvz4wfXG7xRW6X8E77MJWE7Cm7bIiNpBEW3g7ZLIsZ+sI2b7X77MKH0Bt0VHNKqaxagz qFhgeYTccOtKqbs9ftx7kUMefHOLf4eJr041RgXzqY0gwROKPzwuql1HBxzI9B30A1M2 x3mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:to:subject:from:cc; bh=YQFEP6GSvW1zIC1LjmYGtyXJfsODcHwYy/5c7aXU1gs=; b=sZS5bSwKSc44Fw+hjJRJewkL1GgoBW1KU+unt3FCcWmGGOKdFwjmHA0X130IorafqP VP/OnCbzcOHhg+XNvpIIVHGPmtX02RAW9HMlZuSrQMU2YgsOlh9RXIJw05K/O5FmYfsa lnrrMNPNdJpFWCPlf7pA57cTu+rm7pC30jdO092AScUT11S7gOsvYceqUSUcIiidzNDq GJFfU9+Uzy0JByodUlHIF9gtbQLKqCnnRfzbT/+LPZkAJ1xKmznpi8yuE2ldi9HPnfoT aMa8xs/J7CNGP1EV0C5V6svLk8abvjhD7Do/PkrHVQcM+aqi8b3yXrwc9rMYKzDQxqqm qzVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz19si4937366ejb.179.2021.02.01.10.38.05; Mon, 01 Feb 2021 10:38:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232372AbhBAShZ (ORCPT + 99 others); Mon, 1 Feb 2021 13:37:25 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2471 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233115AbhBAShJ (ORCPT ); Mon, 1 Feb 2021 13:37:09 -0500 Received: from fraeml708-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DTxQM3Vlnz67js6; Tue, 2 Feb 2021 02:32:59 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml708-chm.china.huawei.com (10.206.15.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 1 Feb 2021 19:36:27 +0100 Received: from [10.47.11.37] (10.47.11.37) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 1 Feb 2021 18:36:26 +0000 CC: Zhou Wang , "linux-kernel@vger.kernel.org" From: John Garry Subject: PCI MSI issue with reinserting a driver To: Marc Zyngier , Thomas Gleixner Message-ID: Date: Mon, 1 Feb 2021 18:34:59 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.11.37] X-ClientProxiedBy: lhreml754-chm.china.huawei.com (10.201.108.204) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just a heads-up, by chance I noticed that I can't re-insert a specific driver on v5.11-rc6: [ 64.356023] hisi_dma 0000:7b:00.0: Adding to iommu group 31 [ 64.368627] hisi_dma 0000:7b:00.0: enabling device (0000 -> 0002) [ 64.384156] hisi_dma 0000:7b:00.0: Failed to allocate MSI vectors! [ 64.397180] hisi_dma: probe of 0000:7b:00.0 failed with error -28 That's with CONFIG_DEBUG_TEST_DRIVER_REMOVE=y Bisect tells me that this is the first bad commit: 4615fbc3788d genirq/irqdomain: Don't try to free an interrupt that has no mapping The relevant driver code is https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/hisi_dma.c#n547 That driver only allocates 30 MSI, so maybe there's a problem with not allocating (and freeing) all 32 MSI. I'll have a bit more of a look tomorrow. Cheers, john Bisect log: git bisect start # good: [2c85ebc57b3e1817b6ce1a6b703928e113a90442] Linux 5.10 git bisect good 2c85ebc57b3e1817b6ce1a6b703928e113a90442 # bad: [1048ba83fb1c00cd24172e23e8263972f6b5d9ac] Linux 5.11-rc6 git bisect bad 1048ba83fb1c00cd24172e23e8263972f6b5d9ac # bad: [ee249d30fadec7677364063648f5547e243bf93f] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input git bisect bad ee249d30fadec7677364063648f5547e243bf93f # good: [15b447361794271f4d03c04d82276a841fe06328] mm/lru: revise the comments of lru_lock git bisect good 15b447361794271f4d03c04d82276a841fe06328 # good: [15b447361794271f4d03c04d82276a841fe06328] mm/lru: revise the comments of lru_lock git bisect good 15b447361794271f4d03c04d82276a841fe06328 # good: [2aa899ebd5c3aef707460f58951cc8a1d1f466c1] MAINTAINERS: add mvpp2 driver entry git bisect good 2aa899ebd5c3aef707460f58951cc8a1d1f466c1 # good: [2911ed9f47b47cb5ab87d03314b3b9fe008e607f] Merge tag 'char-misc-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc git bisect good 2911ed9f47b47cb5ab87d03314b3b9fe008e607f # bad: [a45f1d43311d3a4f6534e48a3655ba3247a59d48] Merge tag 'regmap-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap git bisect bad a45f1d43311d3a4f6534e48a3655ba3247a59d48 # good: [749c1e1481e1d242ded9dd1bf210ddb7c0d22a4f] Merge tag 'iio-for-5.11a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next git bisect good 749c1e1481e1d242ded9dd1bf210ddb7c0d22a4f # good: [98b32c71a455ff289442779fee02ad60a6217006] staging: rtl8723bs: replace HT_CAP_AMPDU_FACTOR git bisect good 98b32c71a455ff289442779fee02ad60a6217006 # bad: [3c41e57a1e168d879e923c5583adeae47eec9f64] Merge tag 'irqchip-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core git bisect bad 3c41e57a1e168d879e923c5583adeae47eec9f64 # good: [e15f2fa959f2cce8a05e8e3a596e75d068cd42c5] driver core: platform: Add devm_platform_get_irqs_affinity() git bisect good e15f2fa959f2cce8a05e8e3a596e75d068cd42c5 # good: [2cb0837e56e1b04b773ed05df72297de4e010063] arm64: irqstat: Get rid of duplicated declaration git bisect good 2cb0837e56e1b04b773ed05df72297de4e010063 # bad: [4615fbc3788ddc8e7c6d697714ad35a53729aa2c] genirq/irqdomain: Don't try to free an interrupt that has no mapping git bisect bad 4615fbc3788ddc8e7c6d697714ad35a53729aa2c # good: [e091bc90cd2d65f48e4688faead2911558d177d7] irqstat: Move declaration into asm-generic/hardirq.h git bisect good e091bc90cd2d65f48e4688faead2911558d177d7 # good: [ae9ef58996a4447dd44aa638759f913c883ba816] softirq: Move related code into one section git bisect good ae9ef58996a4447dd44aa638759f913c883ba816 # good: [15b8d9372f27c47e17c91f6f16d359314cf11404] sh/irq: Add missing closing parentheses in arch_show_interrupts() git bisect good 15b8d9372f27c47e17c91f6f16d359314cf11404 # first bad commit: [4615fbc3788ddc8e7c6d697714ad35a53729aa2c] genirq/irqdomain: Don't try to free an interrupt that has no mapping