Skip to contentSkip to conversation

drivers/acpi/processor_pdc.c:59:24: error: implicit declaration of function 'xen_processor_present'

PATCH kernel test robot 1 participant 1 message Mar 21, 2023 ACPI

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   2a191fe33656f0fdff33b061fb03b1ffeb75b3f6
commit: 8509b1a86a966321a7ee9163620285f60da40468 [44/49] ACPI: processor: Fix evaluating _PDC method when running as Xen dom0
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20230321/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0

reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=8509b1a86a966321a7ee9163620285f60da40468
git remote add rafael-pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags rafael-pm bleeding-edge
git checkout 8509b1a86a966321a7ee9163620285f60da40468
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

drivers/acpi/processor_pdc.c: In function 'processor_physically_present':

>> drivers/acpi/processor_pdc.c:59:24: error: implicit declaration of function 'xen_processor_present' [-Werror=implicit-function-declaration]
      59 |                 return xen_processor_present(acpi_id);
         |                        ^~~~~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

vim +/xen_processor_present +59 drivers/acpi/processor_pdc.c

    20	
    21	static bool __init processor_physically_present(acpi_handle handle)
    22	{
    23		int cpuid, type;
    24		u32 acpi_id;
    25		acpi_status status;
    26		acpi_object_type acpi_type;
    27		unsigned long long tmp;
    28		union acpi_object object = { 0 };
    29		struct acpi_buffer buffer = { sizeof(union acpi_object), &object };
    30	
    31		status = acpi_get_type(handle, &acpi_type);
    32		if (ACPI_FAILURE(status))
    33			return false;
    34	
    35		switch (acpi_type) {
    36		case ACPI_TYPE_PROCESSOR:
    37			status = acpi_evaluate_object(handle, NULL, NULL, &buffer);
    38			if (ACPI_FAILURE(status))
    39				return false;
    40			acpi_id = object.processor.proc_id;
    41			break;
    42		case ACPI_TYPE_DEVICE:
    43			status = acpi_evaluate_integer(handle, "_UID", NULL, &tmp);
    44			if (ACPI_FAILURE(status))
    45				return false;
    46			acpi_id = tmp;
    47			break;
    48		default:
    49			return false;
    50		}
    51	
    52		if (xen_initial_domain())
    53			/*
    54			 * When running as a Xen dom0 the number of processors Linux
    55			 * sees can be different from the real number of processors on
    56			 * the system, and we still need to execute _PDC for all of
    57			 * them.
    58			 */
  > 59			return xen_processor_present(acpi_id);
    60	
    61		type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0;
    62		cpuid = acpi_get_cpuid(handle, type, acpi_id);
    63	
    64		return !invalid_logical_cpuid(cpuid);
    65	}
    66	
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests