Re: [PATCH] Enable ACPI_ADR_SPACE_PCI_CONFIG in acpi_gbl_default_address_spaces only when ACPI_PCI_CONFIGURED is defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 4, 2021 at 9:37 AM Moore, Robert <robert.moore@xxxxxxxxx> wrote:

> 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

Hi Bob,

I don't know the reason for ACPI_PCI_CONFIGURED to be introduced into
aclinux.h. That patch introduced the bug I'm trying to fix: if
CONFIG_PCI is not enabled, the kernel will crash.  Would it be okay to
accept this patch first to fix this kernel crash bug?  We can come up
a plan to fix this host-dependent configuration issue in a separate
patch.  What do you think?

@Erik, I would love to hear your thoughts on this.

Thank you!
Weidong

> > -----Original Message-----
> > From: Kaneda, Erik <erik.kaneda@xxxxxxxxx>
> > Sent: Wednesday, March 03, 2021 10:29 AM
> > To: Weidong Cui <weidongcui@xxxxxxxxx>; Moore, Robert
> > <robert.moore@xxxxxxxxx>; Wysocki, Rafael J
> > <rafael.j.wysocki@xxxxxxxxx>
> > Cc: Xinyang Ge <aegiryy@xxxxxxxxx>; linux-acpi@xxxxxxxxxxxxxxx;
> > devel@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Len Brown
> > <lenb@xxxxxxxxxx>
> > 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 <weidongcui@xxxxxxxxx>
> > > Sent: Monday, February 8, 2021 7:18 PM
> > > To: Moore, Robert <robert.moore@xxxxxxxxx>; Kaneda, Erik
> > > <erik.kaneda@xxxxxxxxx>; Wysocki, Rafael J
> > > <rafael.j.wysocki@xxxxxxxxx>; Len Brown <lenb@xxxxxxxxxx>
> > > Cc: Weidong Cui <weidongcui@xxxxxxxxx>; Xinyang Ge
> > > <aegiryy@xxxxxxxxx>; linux-acpi@xxxxxxxxxxxxxxx; devel@xxxxxxxxxx;
> > > linux- kernel@xxxxxxxxxxxxxxx
> > > 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 <weidongcui@xxxxxxxxx>
> > > Signed-off-by: Xinyang Ge <aegiryy@xxxxxxxxx>
> > > ---
> > >  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)
> >



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux