Lines 820-826
static ssize_t counter_set(struct kobject *kobj,
Link Here
|
820 |
*/ |
820 |
*/ |
821 |
#define ACPI_MASKABLE_GPE_MAX 0x80 |
821 |
#define ACPI_MASKABLE_GPE_MAX 0x80 |
822 |
|
822 |
|
823 |
static u64 __initdata acpi_masked_gpes; |
823 |
static __initdata DECLARE_BITMAP(acpi_masked_gpes, ACPI_MASKABLE_GPE_MAX); |
824 |
|
824 |
|
825 |
static int __init acpi_gpe_set_masked_gpes(char *val) |
825 |
static int __init acpi_gpe_set_masked_gpes(char *val) |
826 |
{ |
826 |
{ |
Lines 828-834
static int __init acpi_gpe_set_masked_gpes(char *val)
Link Here
|
828 |
|
828 |
|
829 |
if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX) |
829 |
if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX) |
830 |
return -EINVAL; |
830 |
return -EINVAL; |
831 |
acpi_masked_gpes |= ((u64)1<<gpe); |
831 |
set_bit(gpe, acpi_masked_gpes); |
832 |
|
832 |
|
833 |
return 1; |
833 |
return 1; |
834 |
} |
834 |
} |
Lines 843-849
void __init acpi_gpe_apply_masked_gpes(void)
Link Here
|
843 |
for (gpe = 0; |
843 |
for (gpe = 0; |
844 |
gpe < min_t(u8, ACPI_MASKABLE_GPE_MAX, acpi_current_gpe_count); |
844 |
gpe < min_t(u8, ACPI_MASKABLE_GPE_MAX, acpi_current_gpe_count); |
845 |
gpe++) { |
845 |
gpe++) { |
846 |
if (acpi_masked_gpes & ((u64)1<<gpe)) { |
846 |
if (test_bit(gpe, acpi_masked_gpes)) { |
847 |
status = acpi_get_gpe_device(gpe, &handle); |
847 |
status = acpi_get_gpe_device(gpe, &handle); |
848 |
if (ACPI_SUCCESS(status)) { |
848 |
if (ACPI_SUCCESS(status)) { |
849 |
pr_info("Masking GPE 0x%x.\n", gpe); |
849 |
pr_info("Masking GPE 0x%x.\n", gpe); |
850 |
- |
|
|