Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2917029ybc; Thu, 14 Nov 2019 00:51:39 -0800 (PST) X-Google-Smtp-Source: APXvYqx2BnoliB1wfb3qRClU2RScYAFL0iIRSbzdW0D//+WDG5VSiyJxic4dhbb5MSpsOUDoHBD+ X-Received: by 2002:a50:9fc1:: with SMTP id c59mr8758981edf.305.1573721498935; Thu, 14 Nov 2019 00:51:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573721498; cv=none; d=google.com; s=arc-20160816; b=nHj5XWjyGmnVwuvxHw96shCVn0mc0epErRke92O7GBBv20A/FO+862VSJxvLNs85ix 8LP3Y0Oa3bg4VVGtrrQGVDPUDrrsefln4m9QTC1L5AbT8N0ZvBj1ih1HeSpZYKr5hTba qMu/DO5fORMX7wgY0qkdsgAwau3huRHD6En10kFzcCFzAFZiOiIVon4WoXXDIN8pi3fE UbBmdNmsiOhFew1mm/JOaz72hop8kOKhgxMk4F3jc8GPRxCo6f4QsSLWaoGaoLKo8fUR FUo3Mabcv+WGYispkUs4VYpYt6pR1bF9Kozrb88BLo9HF4OHOUGS7k+P5mHkmxwCADIx YWZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=/bWhLkNhHl9VIbHrV6dW8/E/cVRdOoF8TYXGOFy/2rM=; b=lc3RmUAP4bNrKsJZ4Ox+T7ZW7U2aBAo4mPwmSO8TLzK3iVvEnOyeGiidSZEGnUliMA MBhCKnZyxDw4oNQHrfeKYFPtkexQYOzC1R83yYvVJWRT6Pipy4Qb+JdrpplZPtyHBm+r KaDOKfy08la3bIguL2gi4kS//WpRYx0ZINqsSS62KyuR405KdwtSBJpNV25qpoOZzOi3 XAyAd0TPCYkKP/m2xTc/8MlDLT1wTiBCBhEsV0UKtXy3/uHl43CbuAf58U2RJpmHXKtH DxOAwHee2s3MD6L+Bmzzmoc78b8lhgkQTKI9MKXfpbfM9j92ae5st/W8p4bC1Tem4yZ3 +ikQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b28si3715793edn.230.2019.11.14.00.51.14; Thu, 14 Nov 2019 00:51:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726409AbfKNIuL (ORCPT + 99 others); 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-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 >