mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-19 17:14:40 +08:00
056b44a4d1
arch_pnpbios_disabled() is defined in architecture code on x86, but this does not include the appropriate header, causing a warning: arch/x86/kernel/platform-quirks.c:42:13: error: no previous prototype for 'arch_pnpbios_disabled' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://lore.kernel.org/all/20230516193549.544673-10-arnd%40kernel.org
48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <linux/kernel.h>
|
|
#include <linux/init.h>
|
|
#include <linux/pnp.h>
|
|
|
|
#include <asm/setup.h>
|
|
#include <asm/bios_ebda.h>
|
|
|
|
void __init x86_early_init_platform_quirks(void)
|
|
{
|
|
x86_platform.legacy.i8042 = X86_LEGACY_I8042_EXPECTED_PRESENT;
|
|
x86_platform.legacy.rtc = 1;
|
|
x86_platform.legacy.warm_reset = 1;
|
|
x86_platform.legacy.reserve_bios_regions = 0;
|
|
x86_platform.legacy.devices.pnpbios = 1;
|
|
|
|
switch (boot_params.hdr.hardware_subarch) {
|
|
case X86_SUBARCH_PC:
|
|
x86_platform.legacy.reserve_bios_regions = 1;
|
|
break;
|
|
case X86_SUBARCH_XEN:
|
|
x86_platform.legacy.devices.pnpbios = 0;
|
|
x86_platform.legacy.rtc = 0;
|
|
break;
|
|
case X86_SUBARCH_INTEL_MID:
|
|
case X86_SUBARCH_CE4100:
|
|
x86_platform.legacy.devices.pnpbios = 0;
|
|
x86_platform.legacy.rtc = 0;
|
|
x86_platform.legacy.i8042 = X86_LEGACY_I8042_PLATFORM_ABSENT;
|
|
break;
|
|
}
|
|
|
|
if (x86_platform.set_legacy_features)
|
|
x86_platform.set_legacy_features();
|
|
}
|
|
|
|
bool __init x86_pnpbios_disabled(void)
|
|
{
|
|
return x86_platform.legacy.devices.pnpbios == 0;
|
|
}
|
|
|
|
#if defined(CONFIG_PNPBIOS)
|
|
bool __init arch_pnpbios_disabled(void)
|
|
{
|
|
return x86_pnpbios_disabled();
|
|
}
|
|
#endif
|