Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2842423pxb; Tue, 21 Sep 2021 08:49:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiOB19JgB5OrECEl26B4RRpgHAhgj8+MKv1CV4YcFfiDUTKTElAe7XkK0g6aAcB2N3gdAG X-Received: by 2002:a17:906:144b:: with SMTP id q11mr36059642ejc.78.1632239368476; Tue, 21 Sep 2021 08:49:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632239368; cv=none; d=google.com; s=arc-20160816; b=d9Vwu7a5ehRq8SFj+YT2KvHEs/pjyjzwtr3lAxrHM8K+b1Em4WngN0gJGOLvDmug4x J+gpHN4mR1Ujsg4hJ1lxa+yhNzdy7FkPFYCWd22QWgAV7MoNyyfW65LdNv2ZZ6U09XRK neHqPpLXAGCB08bgc6xOTsy8+GZwspSRXkxSDnutzQ6VlLvKb/Gm4rNcRdWXMXDEP6Z8 ulA8H77ox6cfzx86mWFhsTVgfX51aVxdCKT8ENf8aa95zzC79f5fIwZUq3QgLNfofdIV BSecCqBLWnkXHhi6sRYYfDHxHjO/w4C4RIeJGpX6qaAMDsCpxkJS4NaalRQoO+5OwcIg /+sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=UJjyvLbECMITjl8agbHLReCB4H3cgOXh93EE1y7HsII=; b=YHvI0GKttwi1O3hqYWb/+0BIUHzixvfT2xEAD7kIxWgmgUEsLllnusYbHY1k16hnWZ 5KwN87+DjfF7CAdLJhbpx9YihglLlFuZlE5TYJcEJJ2e9xOZIOlKL2WPgi7cR+C6os81 hHTilZslSCXo4++DVH2aLoXABA1oOylj46TtV9cwYsjjJrNf4hS7HQQrl9nk8tDrWoDo GRwk06JlJ2EjM4XM8WzZlnIDBjG1EQ2h+yjcqBmUFrqZ7hKUX+iLHFhIw8y14/+H/oY1 Hm2JxLkMgzrlrZSs8cK21l9dOwl5x45O9a6QWbxEMEAWncZNMRrZcNgTd3OX8kgHEgvY C1Og== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si19452649edx.506.2021.09.21.08.49.03; Tue, 21 Sep 2021 08:49:28 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234182AbhIUPtG (ORCPT + 99 others); Tue, 21 Sep 2021 11:49:06 -0400 Received: from foss.arm.com ([217.140.110.172]:35474 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234031AbhIUPtF (ORCPT ); Tue, 21 Sep 2021 11:49:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 19BFA113E; Tue, 21 Sep 2021 08:47:37 -0700 (PDT) Received: from lpieralisi (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4D7233F718; Tue, 21 Sep 2021 08:47:36 -0700 (PDT) Date: Tue, 21 Sep 2021 16:47:31 +0100 From: Lorenzo Pieralisi To: Yajun Deng Cc: catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function Message-ID: <20210921154731.GA2756@lpieralisi> References: <20210826060406.12571-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210826060406.12571-1-yajun.deng@linux.dev> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote: > pcibios_alloc_irq() will be called in pci_device_probe(), but there > hasn't pcibios_free_irq() in arm64 architecture correspond it. > pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c. "pcibios_alloc_irq() is a weak function called to allocate IRQs for a device in pci_device_probe(); arm64 implements it with ACPI specific code to enable IRQs for a device. When a device is removed (pci_device_remove()) the pcibios_free_irq() counterpart is called. Current arm64 code does not implement a pcibios_free_irq() function, and therefore, the weak empty stub is executed, which means that the IRQ for a device are not properly disabled when a device is removed. Add an arm64 pcibios_free_irq() to undo the actions carried out in pcibios_alloc_irq()." This is a stub commit log. Then you need to describe the bug you are fixing (if any, or it is just code inspection ?) > So add pcibios_free_irq() for correspond it. This will be called > in pci_device_remove(). > > ==================== > v2: remove the change in pcibios_alloc_irq(), and modify the commit log. > ==================== Don't add versioning in the commit log, it does not belong here. I don't think we should send this to stable kernels straight away, it is best to make sure we are not triggering any regressions first. Lorenzo > Signed-off-by: Yajun Deng > --- > arch/arm64/kernel/pci.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c > index 2276689b5411..6ffd92126f65 100644 > --- a/arch/arm64/kernel/pci.c > +++ b/arch/arm64/kernel/pci.c > @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev) > > return 0; > } > + > +void pcibios_free_irq(struct pci_dev *dev) > +{ > + if (!acpi_disabled) > + acpi_pci_irq_disable(dev); > +} > + > #endif > > /* > -- > 2.32.0 >