mbox series

[v10,0/6] ACPI: Allow ACPI to be built without CONFIG_PCI set

Message ID 20181215010247.26101-1-okaya@kernel.org (mailing list archive)
Headers show
Series ACPI: Allow ACPI to be built without CONFIG_PCI set | expand

Message

Sinan Kaya Dec. 15, 2018, 1:02 a.m. UTC
Diff from v9:
Collect Acked-by for 3/6
Rework 6/6 to stub out IORT code instead of creating a dummy function

Sinan Kaya (6):
  ACPI: Allow CONFIG_PCI to be unset for reboot
  ACPI / OSL: Stub out acpi_os_(read/write)_pci_configurations()
  PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set
  ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset
  arm64: select ACPI PCI code only both features are enabled
  ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set

 arch/arm64/Kconfig              |  4 ++--
 arch/x86/include/asm/pci_x86.h  |  7 +++++++
 drivers/acpi/Kconfig            |  1 -
 drivers/acpi/Makefile           |  2 +-
 drivers/acpi/acpica/Makefile    |  2 +-
 drivers/acpi/acpica/achware.h   |  9 +++++++++
 drivers/acpi/arm64/iort.c       |  2 ++
 drivers/acpi/internal.h         |  5 +++++
 drivers/acpi/osl.c              | 14 ++++++++++++++
 drivers/acpi/reboot.c           | 10 +++++++---
 drivers/pci/Makefile            |  2 +-
 include/acpi/acpi_drivers.h     |  7 +++++++
 include/acpi/platform/aclinux.h |  4 ++++
 include/linux/acpi.h            |  7 +++++++
 include/linux/pci.h             |  4 ++++
 15 files changed, 71 insertions(+), 9 deletions(-)

Comments

Hanjun Guo Dec. 18, 2018, 2:17 a.m. UTC | #1
Hi Sinan,

On 2018/12/15 9:02, Sinan Kaya wrote:
> Diff from v9:
> Collect Acked-by for 3/6
> Rework 6/6 to stub out IORT code instead of creating a dummy function
> 
> Sinan Kaya (6):
>   ACPI: Allow CONFIG_PCI to be unset for reboot
>   ACPI / OSL: Stub out acpi_os_(read/write)_pci_configurations()
>   PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set
>   ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset
>   arm64: select ACPI PCI code only both features are enabled
>   ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set

I applied this patch set on top of 4.20-rc5, and enable
"PCI slot detective driver" for ACPI based, got compile error:

drivers/acpi/pci_slot.c: In function ‘register_slot’:
drivers/acpi/pci_slot.c:123:2: error: implicit declaration of function ‘pci_create_slot’ [-Werror=implicit-function-declaration]
  pci_slot = pci_create_slot(pci_bus, device, name, NULL);
  ^
drivers/acpi/pci_slot.c:123:11: warning: assignment makes pointer from integer without a cast
  pci_slot = pci_create_slot(pci_bus, device, name, NULL);
           ^
drivers/acpi/pci_slot.c: In function ‘acpi_pci_slot_remove’:
drivers/acpi/pci_slot.c:161:4: error: implicit declaration of function ‘pci_destroy_slot’ [-Werror=implicit-function-declaration]
    pci_destroy_slot(slot->pci_slot);
    ^
cc1: some warnings being treated as errors
make[2]: *** [drivers/acpi/pci_slot.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [drivers/acpi] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

Did I miss some other patches to fix this?

Thanks
Hanjun
Sinan Kaya Dec. 18, 2018, 2:30 a.m. UTC | #2
On 12/18/2018 3:17 AM, Hanjun Guo wrote:
> Hi Sinan,
> 
> On 2018/12/15 9:02, Sinan Kaya wrote:
>> Diff from v9:
>> Collect Acked-by for 3/6
>> Rework 6/6 to stub out IORT code instead of creating a dummy function
>>
>> Sinan Kaya (6):
>>    ACPI: Allow CONFIG_PCI to be unset for reboot
>>    ACPI / OSL: Stub out acpi_os_(read/write)_pci_configurations()
>>    PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set
>>    ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset
>>    arm64: select ACPI PCI code only both features are enabled
>>    ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set
> 
> I applied this patch set on top of 4.20-rc5, and enable
> "PCI slot detective driver" for ACPI based, got compile error:
> 
> drivers/acpi/pci_slot.c: In function ‘register_slot’:
> drivers/acpi/pci_slot.c:123:2: error: implicit declaration of function ‘pci_create_slot’ [-Werror=implicit-function-declaration]
>    pci_slot = pci_create_slot(pci_bus, device, name, NULL);
>    ^
> drivers/acpi/pci_slot.c:123:11: warning: assignment makes pointer from integer without a cast
>    pci_slot = pci_create_slot(pci_bus, device, name, NULL);
>             ^
> drivers/acpi/pci_slot.c: In function ‘acpi_pci_slot_remove’:
> drivers/acpi/pci_slot.c:161:4: error: implicit declaration of function ‘pci_destroy_slot’ [-Werror=implicit-function-declaration]
>      pci_destroy_slot(slot->pci_slot);
>      ^
> cc1: some warnings being treated as errors
> make[2]: *** [drivers/acpi/pci_slot.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [drivers/acpi] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [drivers] Error 2
> make: *** Waiting for unfinished jobs....
> 
> Did I miss some other patches to fix this?

Thanks for the report. I did compilation with defconfig only. This one is an
easy fix in Kconfig to add a dependency into PCI for this driver.

> 
> Thanks
> Hanjun
> 
>
Hanjun Guo Dec. 18, 2018, 2:38 a.m. UTC | #3
On 2018/12/18 10:30, Sinan Kaya wrote:
> On 12/18/2018 3:17 AM, Hanjun Guo wrote:
>> Hi Sinan,
>>
>> On 2018/12/15 9:02, Sinan Kaya wrote:
>>> Diff from v9:
>>> Collect Acked-by for 3/6
>>> Rework 6/6 to stub out IORT code instead of creating a dummy function
>>>
>>> Sinan Kaya (6):
>>>    ACPI: Allow CONFIG_PCI to be unset for reboot
>>>    ACPI / OSL: Stub out acpi_os_(read/write)_pci_configurations()
>>>    PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set
>>>    ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset
>>>    arm64: select ACPI PCI code only both features are enabled
>>>    ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set
>>
>> I applied this patch set on top of 4.20-rc5, and enable
>> "PCI slot detective driver" for ACPI based, got compile error:
>>
>> drivers/acpi/pci_slot.c: In function ‘register_slot’:
>> drivers/acpi/pci_slot.c:123:2: error: implicit declaration of function ‘pci_create_slot’ [-Werror=implicit-function-declaration]
>>    pci_slot = pci_create_slot(pci_bus, device, name, NULL);
>>    ^
>> drivers/acpi/pci_slot.c:123:11: warning: assignment makes pointer from integer without a cast
>>    pci_slot = pci_create_slot(pci_bus, device, name, NULL);
>>             ^
>> drivers/acpi/pci_slot.c: In function ‘acpi_pci_slot_remove’:
>> drivers/acpi/pci_slot.c:161:4: error: implicit declaration of function ‘pci_destroy_slot’ [-Werror=implicit-function-declaration]
>>      pci_destroy_slot(slot->pci_slot);
>>      ^
>> cc1: some warnings being treated as errors
>> make[2]: *** [drivers/acpi/pci_slot.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> make[1]: *** [drivers/acpi] Error 2
>> make[1]: *** Waiting for unfinished jobs....
>> make: *** [drivers] Error 2
>> make: *** Waiting for unfinished jobs....
>>
>> Did I miss some other patches to fix this?
> 
> Thanks for the report. I did compilation with defconfig only. This one is an
> easy fix in Kconfig to add a dependency into PCI for this driver.

Yes, it is.

Thanks
Hanjun