From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755474Ab3GBUTm (ORCPT ); Tue, 2 Jul 2013 16:19:42 -0400 Received: from hydra.sisk.pl ([212.160.235.94]:56942 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754487Ab3GBUTk (ORCPT ); Tue, 2 Jul 2013 16:19:40 -0400 From: "Rafael J. Wysocki" To: Bjorn Helgaas Cc: Mika Westerberg , "Kirill A. Shutemov" , Greg Kroah-Hartman , "Rafael J. Wysocki" , Jesse Barnes , Yinghai Lu , "Ronciak, John" , "Penner, Miles J" , Bruce Allan , Heikki Krogerus , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , "x86@kernel.org" Subject: Re: [PATCH 1/6] PCI: acpiphp: do not check for SLOT_ENABLED in enable_device() Date: Tue, 02 Jul 2013 22:29:12 +0200 Message-ID: <4523014.G6VJLhZf81@vostro.rjw.lan> User-Agent: KMail/4.9.5 (Linux/3.10.0-rc5+; KDE/4.9.5; x86_64; ; ) In-Reply-To: References: <1372177330-28013-1-git-send-email-mika.westerberg@linux.intel.com> <3216917.m2IEX2IHod@vostro.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, July 02, 2013 10:40:39 AM Bjorn Helgaas wrote: > On Mon, Jul 1, 2013 at 7:29 PM, Rafael J. Wysocki wrote: > > On Monday, July 01, 2013 09:36:13 PM Mika Westerberg wrote: > >> On Mon, Jul 01, 2013 at 04:01:37PM +0200, Rafael J. Wysocki wrote: > >> > > Given the fact that SLOT_ENABLED is only checked in acpiphp_enable_slot() > >> > > (after this patch) and that /sys/bus/pci/slots/*/power uses SLOT_POWEREDON > >> > > anyway, should we remove the whole flag? > >> > > >> > Sure, if it is not necessary any more, we should remove it. > >> > >> Well, there is one thing that changes due that. Once the flag is gone > >> userspace can do 'echo 1 > /sys/bus/pci/slots/*/power' several times and > >> the slot is always re-enumerated. > >> > >> If that is not acceptable we should probably move the SLOT_ENABLED check > >> closer to acpiphp_core:enable_device() and drop it from here, so that we > >> always re-enumerate on Bus Check event but userspace can only do enable > >> once (we still re-enumerate on Bus Check). > > > > Yes, that sounds like the right thing to do. > > Is it actually a problem if we re-enumerate every time userspace does > 'echo 1 > /sys/bus/pci/slots/*/power'? I assume re-enumeration is a > no-op if nothing has changed. Well, if it's a no-op in that case, then re-enumerating shouldn't be a problem, but is it a no-op? Rafael (who's not really sure) -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.