Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp12308pxb; Fri, 5 Mar 2021 12:57:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzv6Bqi1PjBBfVqyiSkvkyNsWw5OTcYdTPHzLkgIJLg5UPAfTYl0NyjT+xU3kzp+zil0qxM X-Received: by 2002:a17:907:f97:: with SMTP id kb23mr4145663ejc.33.1614977862531; Fri, 05 Mar 2021 12:57:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614977862; cv=none; d=google.com; s=arc-20160816; b=esmaG++D+T7nXT09LkLdobc7+TNQN8qmpHIruHlW8jAFsnUptCihxUyPxEDjn6/WSO MO9qWO88Ltl6nvguCYNuDBQORrAmHiJ5w0SuToBDtFzzzhgBlz6h3SsM/DXhWrPqwTYt rnIxFTBgoqyDqzoF7nqPAs5c+eEKOyqdaZ6/nP39eGJ6uEJptWEETQLWF6siBZCRblqu 7rO2y7kohQSvJdt9z2X1gS6oKi12NFF5GO1b55Wjomxz8fgnyE+eUFFUwnx0EFwIVKjI Ruy4rzyhKmQ4tGt473H/cZ/eA65H11oZ06rnM3DCUofDfLe+bZEP05w9tnj1jkGa4uX1 dH7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=thrXrLjLF5z/SKJCD+pGwIOuWV3vLVJ4ZtDl+1J1x0k=; b=Iqlr/dHMvulGFOOFhzyANEpNsuoCUKIZ71U6uBSpuWg6vUXS1HukGNpmXesRQ3BtLW pSUqOU9wz0eR8I5E50MZhqCbkEsNJYjglv8olQQFhmv5YFJzchsdXj6qWsm2M2MS8CP9 G+MhZ/UxyvxaYBjG8Dvk5SVmLfgZ84yQj01ONtCXpM9OroXFYu/ye3e1H9ltUxhwF3Y/ L3pN9cskmv4WgBzt1NWy9mwkyQIq17cnUoFzd2lbL1rPcSu4TRh0g3IT/xWrnff2QfI9 hE+v7sLPxTeoB/IwdMUQU0G6PMWUZPPuUSB7xAy8XSC5FCktC/nmUQSukDHH2yE2xQYq j30Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BvlOojU3; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si2057616ejk.360.2021.03.05.12.57.19; Fri, 05 Mar 2021 12:57:42 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BvlOojU3; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229446AbhCEUz6 (ORCPT + 99 others); Fri, 5 Mar 2021 15:55:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbhCEUzk (ORCPT ); Fri, 5 Mar 2021 15:55:40 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1CCCC06175F; Fri, 5 Mar 2021 12:55:39 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id p1so4497894edy.2; Fri, 05 Mar 2021 12:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=thrXrLjLF5z/SKJCD+pGwIOuWV3vLVJ4ZtDl+1J1x0k=; b=BvlOojU3y4cr6Tr29mW2pAJL7JS7bRcYr9Wca1Z5mhWKgyWeoXFAxXUwmqSDJBXVVt 8QsQj05UKy9jLOYjQ7nJdsALDUYYnOmkID5zpIlYNyAzvkpT69URsdh3k14NV1bV3UDc HOZURVMYYDFQb2cZ6ldiBAnE7yCwUzqocXCX2z+dL0R0Fz6BnmnsNSfPKkfSDAi3ek1+ uYrkuKva3lOI3fsaBGy3S3JizhhFl9xeZIENUhe7RLgn1DDnipoBAqquwEnLu0yxerov H6N9x1tXDu1wy1HoZu2UEV+zHZcxp49ZDm+oQz5hy+yVtu+4VIu1bXEKRHo+VwuFKkn4 WoQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=thrXrLjLF5z/SKJCD+pGwIOuWV3vLVJ4ZtDl+1J1x0k=; b=hW7S0KooH9HixcfJK97kBm39GCoTDO2nv8vflsb0WdLQBj6JzStxJIdigW9SelU0fP vZYUQB2AfBO0EkzdH3hmPn1SrRKlpMqfAOgPnBFycXYWEW1/dodCfPctG1yyoXevOJI2 3VVDSUEqK+kO3sD32IbiymWQdedxRQJqNuJmiLJ6U/JLCf8QVD+EfQAVtanFc1xMh8oX SNzXBcrMezxxlGrvkXHYEm4CCasnfFLEedP2GOaYR0VXj74eLvVlyhoEljLl+nU6zvzF TGc5/UDcDAceyVGwhrO8Tc/UFOGYKHiEvJJBufoiHAJcW6BqbBjWjAZ680INyvzkv0Ek x+gA== X-Gm-Message-State: AOAM530mq4AksaM2tu/Dndd7JPeka/760AaCjRPEOa8XRvU/zAc0VLin /dT06Mz4NsyodXxxlzZ9vP30fizQWPlyIVvEjC0= X-Received: by 2002:aa7:d74d:: with SMTP id a13mr1111123eds.199.1614977738465; Fri, 05 Mar 2021 12:55:38 -0800 (PST) MIME-Version: 1.0 References: <20210209031744.26474-1-weidongcui@gmail.com> In-Reply-To: Reply-To: weidongcui@gmail.com From: Weidong Cui Date: Fri, 5 Mar 2021 12:55:26 -0800 Message-ID: Subject: Re: [PATCH] Enable ACPI_ADR_SPACE_PCI_CONFIG in acpi_gbl_default_address_spaces only when ACPI_PCI_CONFIGURED is defined To: "Moore, Robert" Cc: "Kaneda, Erik" , "Wysocki, Rafael J" , Xinyang Ge , "linux-acpi@vger.kernel.org" , "devel@acpica.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 5, 2021 at 12:46 PM Moore, Robert wrote: > > After giving this some thought, I think we can #define ACPI_PCI_CONFIGURED in the global configuration file (I think it is acconfig.h) - and document why and when it should be removed. > Bob Hi Bob, Thank you very much for your new suggestion! Let me make sure I understand it. 1. We should move the following define from aclinux.h to acconfig.h. #ifdef CONFIG_PCI #define ACPI_PCI_CONFIGURED #endif 2. We should add a comment there to "document why and when it should be removed". I don't really know "why and when" since I'm not an expert on ACPI (we were just trying to fix a bug :-)). Thanks! Weidong > -----Original Message----- > From: Moore, Robert > Sent: Thursday, March 04, 2021 9:37 AM > To: weidongcui@gmail.com > Cc: Kaneda, Erik ; Wysocki, Rafael J ; Xinyang Ge ; linux-acpi@vger.kernel.org; devel@acpica.org; linux-kernel@vger.kernel.org > Subject: [Devel] Re: [PATCH] Enable ACPI_ADR_SPACE_PCI_CONFIG in acpi_gbl_default_address_spaces only when ACPI_PCI_CONFIGURED is defined > > > > -----Original Message----- > From: Weidong Cui > Sent: Thursday, March 04, 2021 9:06 AM > To: Moore, Robert > Cc: Kaneda, Erik ; Wysocki, Rafael J ; Xinyang Ge ; linux-acpi@vger.kernel.org; devel@acpica.org; linux-kernel@vger.kernel.org; Len Brown > Subject: Re: [PATCH] Enable ACPI_ADR_SPACE_PCI_CONFIG in acpi_gbl_default_address_spaces only when ACPI_PCI_CONFIGURED is defined > > > Well, I don't like the fact that PCI_CONFIGURED would have to be defined by each current host: > > > > > +#ifdef ACPI_PCI_CONFIGURED > > > > I would rather the logic be reversed: > > > > > +#ifdef ACPI_PCI_NOT_CONFIGURED > > Thank you for the comments, Erik and Bob! > > ACPI_PCI_CONFIGURED is defined in aclinux.h (see below) and used in several places in evhandler.c and exregion.c. > I'm not sure why we want to introduce ACPI_PCI_NOT_CONFIGURED. Bob, I don't understand your concerns about "have to be defined by each current host". Can you please shed some light on it? > > It is required in aclinux.h, and thus it is required in every host-dependent configuration file (acfreebsd.h, acmacosx.h, acnetbsd.h, achaiku.h, etc.) I would rather not force these host-specific header files to change. > Bob > > > #ifdef CONFIG_PCI > #define ACPI_PCI_CONFIGURED > #endif > > > -----Original Message----- > > From: Kaneda, Erik > > Sent: Wednesday, March 03, 2021 10:29 AM > > To: Weidong Cui ; Moore, Robert > > ; Wysocki, Rafael J > > > > Cc: Xinyang Ge ; linux-acpi@vger.kernel.org; > > devel@acpica.org; linux-kernel@vger.kernel.org; Len Brown > > > > Subject: RE: [PATCH] Enable ACPI_ADR_SPACE_PCI_CONFIG in > > acpi_gbl_default_address_spaces only when ACPI_PCI_CONFIGURED is > > defined > > > > This looks good to me. Bob, do you have any comments? > > > > Erik > > > > > -----Original Message----- > > > From: Weidong Cui > > > Sent: Monday, February 8, 2021 7:18 PM > > > To: Moore, Robert ; Kaneda, Erik > > > ; Wysocki, Rafael J > > > ; Len Brown > > > Cc: Weidong Cui ; Xinyang Ge > > > ; linux-acpi@vger.kernel.org; devel@acpica.org; > > > linux- kernel@vger.kernel.org > > > Subject: [PATCH] Enable ACPI_ADR_SPACE_PCI_CONFIG in > > > acpi_gbl_default_address_spaces only when ACPI_PCI_CONFIGURED is > > > defined > > > > > > Signed-off-by: Weidong Cui > > > Signed-off-by: Xinyang Ge > > > --- > > > drivers/acpi/acpica/evhandler.c | 2 ++ > > > include/acpi/acconfig.h | 4 ++++ > > > 2 files changed, 6 insertions(+) > > > > > > diff --git a/drivers/acpi/acpica/evhandler.c > > > b/drivers/acpi/acpica/evhandler.c index 5884eba04..4c25ad433 100644 > > > --- a/drivers/acpi/acpica/evhandler.c > > > +++ b/drivers/acpi/acpica/evhandler.c > > > @@ -26,7 +26,9 @@ acpi_ev_install_handler(acpi_handle obj_handle, > > > u8 acpi_gbl_default_address_spaces[ACPI_NUM_DEFAULT_SPACES] = { > > > ACPI_ADR_SPACE_SYSTEM_MEMORY, > > > ACPI_ADR_SPACE_SYSTEM_IO, > > > +#ifdef ACPI_PCI_CONFIGURED > > > ACPI_ADR_SPACE_PCI_CONFIG, > > > +#endif > > > ACPI_ADR_SPACE_DATA_TABLE > > > }; > > > > > > diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index > > > a225eff49..790999028 100644 > > > --- a/include/acpi/acconfig.h > > > +++ b/include/acpi/acconfig.h > > > @@ -162,7 +162,11 @@ > > > /* Maximum space_ids for Operation Regions */ > > > > > > #define ACPI_MAX_ADDRESS_SPACE 255 > > > +#ifdef ACPI_PCI_CONFIGURED > > > #define ACPI_NUM_DEFAULT_SPACES 4 > > > +#else > > > +#define ACPI_NUM_DEFAULT_SPACES 3 > > > +#endif > > > > > > /* Array sizes. Used for range checking also */ > > > > > > -- > > > 2.24.3 (Apple Git-128) > > > _______________________________________________ > Devel mailing list -- devel@acpica.org > To unsubscribe send an email to devel-leave@acpica.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s