From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA1D8C432C3 for ; Thu, 14 Nov 2019 08:50:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A243B2070E for ; Thu, 14 Nov 2019 08:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573721412; bh=jBu/HKddn0XF3vdBy2KDoncGZ7is9C6AWQjv+21W00o=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=omtRh1+cNH8z4DcfsepMIg6cRGUIBo3JU4MZkIpDVhQRnsE8+VuetpCGtLIfrv39L aCCstZqmOfBgsFil2qbKUbG0zAEpB0V9ZUhMWKCuhozxG8j4+jKh25p1IhwW2iYV+k 4e0aX6uAy/VvtrRxbr1a/p6KtlJf01akH5zxGouw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726598AbfKNIuL (ORCPT ); Thu, 14 Nov 2019 03:50:11 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:34698 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbfKNIuL (ORCPT ); Thu, 14 Nov 2019 03:50:11 -0500 Received: by mail-ot1-f66.google.com with SMTP id 5so4221554otk.1; Thu, 14 Nov 2019 00:50:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/bWhLkNhHl9VIbHrV6dW8/E/cVRdOoF8TYXGOFy/2rM=; b=SQ5sULUQq6HHiDqWjqWObNq+OaApC7GYWWzV0SPE1no9AM44eHaVV/8EuJBKZnLBzV YVhV83mhhX8SmJf6iLS7MSZvPReRef8N8yWIGof//BCyfW3Q0/lEURLkAMoBkgWV9kgF sTDZfjngp3ZBf5xtIC313lw4EfQIP5DQ7QrIDFJh+buES00KUYAQN1w18Ecj3Ajvraiu 1ZxKe5eFE6B4ja3bzXPP7Ixw91NB1oHd63/XJoP1zcQgCuuu/it4G+8YGKwF297XmMR4 zad4XqY6K5fHIfhvbohZL8YJhqiOjeaqHVYgOFNLEIk/vFK4dfAX8jUqAWY04fPTyey4 94bQ== X-Gm-Message-State: APjAAAWQIrDcmTdHGlztDoegqKRcEC+cDrZL8R2WOZkE0LhCW6oXcwxZ d/iegD+5IX3bwSXVLiAU1lY/zurnbUHTtO7ODV8= X-Google-Smtp-Source: APXvYqxemxsnrvy+ic5ui5311TWGh+PLygVk5OF67FrT8flj6s/P4SOHtOLrIzHdBVxiJatAC6C9Ibom47ovFyQT6WQ= X-Received: by 2002:a9d:6b91:: with SMTP id b17mr6158857otq.189.1573721410165; Thu, 14 Nov 2019 00:50:10 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 14 Nov 2019 09:49:59 +0100 Message-ID: Subject: Re: [PATCH v2] ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100 To: Yunfeng Ye Cc: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List , "open list:DOCUMENTATION" , "hushiyuan@huawei.com" , "linfeilong@huawei.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 14, 2019 at 8:16 AM Yunfeng Ye wrote: > > The commit 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel > parameter cover all GPEs") says: > "Use a bitmap of size 0xFF instead of a u64 for the GPE mask so 256 > GPEs can be masked" > > But the masking of GPE 0xFF it not supported and the check condition > "gpe > ACPI_MASKABLE_GPE_MAX" is not valid because the type of gpe is > u8. > > So modify the macro ACPI_MASKABLE_GPE_MAX to 0x100, and drop the "gpe > > ACPI_MASKABLE_GPE_MAX" check. In addition, update the docs "Format" for > acpi_mask_gpe parameter. > > Fixes: 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs") > Signed-off-by: Yunfeng Ye Applying as 5.5 material, thanks! > --- > v1 -> v2: > - drop the "gpe > ACPI_MASKABLE_GPE_MAX" check > - update the docs "Format" from to for acpi_mask_gpe parameter > - update the commit comment > > Documentation/admin-guide/kernel-parameters.txt | 2 +- > drivers/acpi/sysfs.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index a84a83f8881e..87e27186dc69 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -113,7 +113,7 @@ > the GPE dispatcher. > This facility can be used to prevent such uncontrolled > GPE floodings. > - Format: > + Format: > > acpi_no_auto_serialize [HW,ACPI] > Disable auto-serialization of AML methods > diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c > index 75948a3f1a20..0a83ce186bc4 100644 > --- a/drivers/acpi/sysfs.c > +++ b/drivers/acpi/sysfs.c > @@ -819,14 +819,14 @@ static ssize_t counter_set(struct kobject *kobj, > * interface: > * echo unmask > /sys/firmware/acpi/interrupts/gpe00 > */ > -#define ACPI_MASKABLE_GPE_MAX 0xFF > +#define ACPI_MASKABLE_GPE_MAX 0x100 > static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata; > > static int __init acpi_gpe_set_masked_gpes(char *val) > { > u8 gpe; > > - if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX) > + if (kstrtou8(val, 0, &gpe)) > return -EINVAL; > set_bit(gpe, acpi_masked_gpes_map); > > -- > 2.7.4 >