Lines Matching +full:static +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * osi.c - _OSI implementation
27 bool enable; member
30 static struct acpi_osi_config {
40 static struct acpi_osi_config osi_config;
41 static struct acpi_osi_entry
49 static u32 acpi_osi_handler(acpi_string interface, u32 supported) in acpi_osi_handler()
72 bool enable = true; in acpi_osi_setup() local
96 osi->enable = false; in acpi_osi_setup()
103 enable = false; in acpi_osi_setup()
108 if (!strcmp(osi->string, str)) { in acpi_osi_setup()
109 osi->enable = enable; in acpi_osi_setup()
111 } else if (osi->string[0] == '\0') { in acpi_osi_setup()
112 osi->enable = enable; in acpi_osi_setup()
113 strscpy(osi->string, str, OSI_STRING_LENGTH_MAX); in acpi_osi_setup()
119 static void __init __acpi_osi_setup_darwin(bool enable) in __acpi_osi_setup_darwin() argument
121 osi_config.darwin_enable = !!enable; in __acpi_osi_setup_darwin()
122 if (enable) { in __acpi_osi_setup_darwin()
131 static void __init acpi_osi_setup_darwin(bool enable) in acpi_osi_setup_darwin() argument
136 __acpi_osi_setup_darwin(enable); in acpi_osi_setup_darwin()
142 * From pre-history through Linux-2.6.22, Linux responded TRUE upon a BIOS
147 * ill-conceived and opening the door to an un-bounded number of BIOS
150 * For example, OSI(Linux) was used on resume to re-POST a video card on
153 * capability, Linux has no way to tell the BIOS to skip the time-consuming
154 * POST -- putting Linux at a permanent performance disadvantage. On
161 * Linux-2.6.23 onward we respond FALSE.
168 static void __init __acpi_osi_setup_linux(bool enable) in __acpi_osi_setup_linux() argument
170 osi_config.linux_enable = !!enable; in __acpi_osi_setup_linux()
171 if (enable) in __acpi_osi_setup_linux()
177 static void __init acpi_osi_setup_linux(bool enable) in acpi_osi_setup_linux() argument
182 __acpi_osi_setup_linux(enable); in acpi_osi_setup_linux()
190 * otherwise string is added to list, augmenting built-in strings
192 static void __init acpi_osi_setup_late(void) in acpi_osi_setup_late()
210 str = osi->string; in acpi_osi_setup_late()
213 if (osi->enable) { in acpi_osi_setup_late()
225 static int __init osi_setup(char *str) in osi_setup()
248 static void __init acpi_osi_dmi_darwin(void) in acpi_osi_dmi_darwin()
255 static void __init acpi_osi_dmi_linux(bool enable, in acpi_osi_dmi_linux() argument
258 pr_notice("DMI detected to setup _OSI(\"Linux\"): %s\n", d->ident); in acpi_osi_dmi_linux()
260 __acpi_osi_setup_linux(enable); in acpi_osi_dmi_linux()
263 static int __init dmi_enable_osi_linux(const struct dmi_system_id *d) in dmi_enable_osi_linux()
270 static int __init dmi_disable_osi_vista(const struct dmi_system_id *d) in dmi_disable_osi_vista()
272 pr_notice("DMI detected: %s\n", d->ident); in dmi_disable_osi_vista()
280 static int __init dmi_disable_osi_win7(const struct dmi_system_id *d) in dmi_disable_osi_win7()
282 pr_notice("DMI detected: %s\n", d->ident); in dmi_disable_osi_win7()
288 static int __init dmi_disable_osi_win8(const struct dmi_system_id *d) in dmi_disable_osi_win8()
290 pr_notice("DMI detected: %s\n", d->ident); in dmi_disable_osi_win8()
302 static const struct dmi_system_id acpi_osi_dmi_table[] __initconst = {
324 DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
330 .ident = "Sony VGN-NS10J_S",
333 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-NS10J_S"),
338 .ident = "Sony VGN-SR290J",
341 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR290J"),
346 .ident = "VGN-NS50B_L",
349 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-NS50B_L"),
354 .ident = "VGN-SR19XN",
357 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR19XN"),
467 static __init void acpi_osi_dmi_blacklisted(void) in acpi_osi_dmi_blacklisted()
471 /* Enable _OSI("Darwin") for Apple platforms. */ in acpi_osi_dmi_blacklisted()