Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4792970rwb; Tue, 8 Aug 2023 14:04:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbi/DsMyiyYHP+sw8Xy41sRx+Az92FgpuMIVl56cz8aCjy6XPw5XQNPGmbsoJYZL23h8U+ X-Received: by 2002:a05:6870:c213:b0:1b7:308e:6cd9 with SMTP id z19-20020a056870c21300b001b7308e6cd9mr949203oae.5.1691528662529; Tue, 08 Aug 2023 14:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691528662; cv=none; d=google.com; s=arc-20160816; b=UHA0a1QFF/WS8Vqzfbjp6P65X60PgRxosUre0I8ZcHRV68Zpw4RGt6iEDf6nCHVS4P MrFxe6joBC/r4tTmK0XXQSVJdjuVF6jagKB1UaRJsM7ZXxF7Xbp6UCcqLf5cPZbn9GS9 XTQDOTBmWvAgBIFmSgIQvPuK04WOpdblyf6o2zIVt+HsF0Hy2gXIOfe1LkeiB0VloCWa sozcesh81WZAY9fPVwhz4RVb0j4FOLsDPYvSfuA8b30RYqxkDw/THpVxaGU8CNWCtRy0 RckhFsxVPJVkfwaQ5h5XgqgDDq6y1HxOOKCy/8d8dCPPkpFsdsPpKqI6/fJnuN8FDJFd 4fXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=v7AoWpzzoZmCrsEKK4jGgOBNoGhs5uUd3D9SEySpt58=; fh=/TdAI9NcgJmRjEf2EjAI4o3mzhos36qFvXdpsXE2128=; b=D9gFz5f1V5XqthGLMSjKJRSGI63W1eqXgi1YQD7liCY+kxdaoWtm//gC/3kRypzTdu erxyahD3qt2MnqI0jBts5tjsBD1VwyNW3H9Dz6nKjFvhaDD9EgLdi4y8y/S7Y9qiEYKu VF0LHAvHpmcd/HFYVOp+SC3KvV63kHW3pp1qMVoo5teRfVAEwvwqVGz5PLVd8qNi2Q7T d/y3RF7NXtRHLitRtau33grvKTXzSDSGZgh8MNHhwm5VcLoB3EQT816ire/+CnEu4aNH JZGChWsyiZpS01chYRQpWwi692ujKT6O3JsYi+Rl1YhloTcJ6pmMRQlaing4rlQdCSv/ 25Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nsogyuLB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 207-20020a6301d8000000b005638355e989si7347137pgb.773.2023.08.08.14.03.47; Tue, 08 Aug 2023 14:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nsogyuLB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234502AbjHHVAh (ORCPT + 99 others); Tue, 8 Aug 2023 17:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234743AbjHHVAK (ORCPT ); Tue, 8 Aug 2023 17:00:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 425D12132; Tue, 8 Aug 2023 13:58:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CDB2862CE4; Tue, 8 Aug 2023 20:58:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3CEAC433C8; Tue, 8 Aug 2023 20:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691528283; bh=mYemYrP7GxRXt1G2n3VYbCmt+/S/G4zndMYQnQVP8Ds=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=nsogyuLBgUkJ0Yqi3ufuq76tQCvCd4aRz5PRxcLx2mNmnAOFuJuV6lSDO2jUuJCXf qA/Kcgza+wEAauOSKITfIC9IffWs4bHG6n8g1HDn1pkrNf1TCypMqJK00ILaPLlc2g 7O3kgGQxEluLXn7jOxSiy/L/5UlpBX0wtAaIOYgZWfteN5bzStcFIvytflBN6k1WkY +VGLRGkq0kv9Opy5nkJh/rLKrqPPbhDeA/Cvap4l37Trhp6G3nV7MbDo8s/OQGdGZt G2pVOodYUJ5l/J1sMdR7wBc53hgcmhY7Tk/IM8csLCNeI/0/3/FDwSTsvVJDxYdKTR GsLRWCcjTs1QA== Date: Tue, 8 Aug 2023 15:58:00 -0500 From: Bjorn Helgaas To: "Rafael J. Wysocki" Cc: linux-pci@vger.kernel.org, Len Brown , Igor Mammedov , "Michael S . Tsirkin" , Woody Suwalski , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH] PCI: acpiphp: Log more slot and notification details Message-ID: <20230808205800.GA332785@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 08, 2023 at 09:39:22PM +0200, Rafael J. Wysocki wrote: > On Tue, Aug 8, 2023 at 9:27 PM Bjorn Helgaas wrote: > > From: Bjorn Helgaas > > > > When registering an acpiphp slot, log the slot name in the same style as > > pciehp and include the PCI bus/device and whether a device is present or > > the slot is empty. > > > > When handling an ACPI notification, log the PCI bus/device and notification > > type. > > > > Sample dmesg log diff: > > > > ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) > > - acpiphp: Slot [3] registered > > - acpiphp: Slot [4] registered > > PCI host bridge to bus 0000:00 > > pci 0000:00:03.0: [8086:100e] type 00 class 0x020000 > > > > pci 0000:00:04.0: [8086:100e] type 00 class 0x020000 > > > > ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) > > + acpiphp: pci 0000:00:03 Slot(3) registered (enabled) > > + acpiphp: pci 0000:00:04 Slot(4) registered (empty) > > PCI host bridge to bus 0000:00 > > pci 0000:00:03.0: [8086:100e] type 00 class 0x020000 > > > > + acpiphp: pci 0000:00:04 Slot(4) Device Check > > pci 0000:00:04.0: [8086:100e] type 00 class 0x020000 > > ... > > @@ -793,6 +804,14 @@ static void hotplug_event(u32 type, struct acpiphp_context *context) > > > > pci_lock_rescan_remove(); > > > > + pr_info("pci %04x:%02x:%02x Slot(%s) %s\n", > > + pci_domain_nr(slot->bus), slot->bus->number, > > + slot->device, slot_name(slot->slot), > > + type == ACPI_NOTIFY_BUS_CHECK ? "Bus Check" : > > + type == ACPI_NOTIFY_DEVICE_CHECK ? "Device Check" : > > + type == ACPI_NOTIFY_EJECT_REQUEST ? "Eject Request" : > > + "Notification"); > > pr_debug() perhaps? > > On systems that don't have any hotplug problems these messages will > just be filling the kernel log unnecessarily. If these notifications are really common, pr_debug() sounds like the right thing. I assumed that they would not be common, e.g., they would happen for user-time things like dock/undock, plug/unplug, suspend/resume, etc. In pciehp, we use _info for attention button presses, presence detect changes, link up/down, and I assumed the ACPI notify events would roughly correspond to those. No? Bjorn