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=unavailable 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 787E2C433DF for ; Tue, 26 May 2020 14:04:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5654B208C7 for ; Tue, 26 May 2020 14:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590501865; bh=er1ViqgVwJ24ihRfhaLTKTZlbDupuxjf/x6qnwIhkAQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=Vg3KtjSZqMUx0tKXvZmawMrJLV6ZGpIhVtzSyHS8TrGfdOd4K0cgOU5CyNkZbJ39j ol4WDMoWb2wEcpP18f9vkqCoq0+EnXdnPLAxEGBNEKi/7jUrRSv1j2rBgYOKZaYCrI bKc0VXUm/rRMAW6toP9NWOcjqLGXk/vrqOUP/o9w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728799AbgEZOEY (ORCPT ); Tue, 26 May 2020 10:04:24 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:41114 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726856AbgEZOEY (ORCPT ); Tue, 26 May 2020 10:04:24 -0400 Received: by mail-ot1-f67.google.com with SMTP id 63so16341701oto.8; Tue, 26 May 2020 07:04:23 -0700 (PDT) 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=5Ierdu4jhjBArg4KAhxK2ET/zYux67GkijyWUlcmSlg=; b=t8bBqFbmYQ/VnfvQ16TPgsta/UMd6BjOJxfiQrsjr3GJRIWknMTExOA/9FcNxwwyi2 dSFJdQUgRzyqK2hbe2Br6lXNql3X+ZUkGsQFv5SLN0yTRF6QOcK26If3t7JE9BQRuQSz VbslbKXA6aNYer+m9wQmF+sygHMIt/y15Orl1RuNMMs8Jlr78evQq2bzJK73hNuQhlYr oRc3KfFRowe2MPP1yAhy3QIRbRpyFnY+5E3AklSlfR6/cIHbQRU9KshMsOY8A7VufOVY VPMRImQ8FelqfWBQDg2Flujq/+ro/9bHEA1rh9GS0c2jwfqvVuC+Odf41zb1waz59CO5 9Wlw== X-Gm-Message-State: AOAM5310RoIOchT3Ga7eOFlxXmV5vEkyyz4MMTVmZgeBwE+o11Kpmejc k6tuYWBUDaWLkIks4areqxk44OHRjd6dMCbcnCU= X-Google-Smtp-Source: ABdhPJyUNtHDNcsWTXkodpXr8omxt8fKKmdXPMuKjXr10pz49QCMDOCfVptyEHRHzvYaFzWQrAougJhfu1ijiVuoj4E= X-Received: by 2002:a9d:6c0f:: with SMTP id f15mr934672otq.118.1590501863497; Tue, 26 May 2020 07:04:23 -0700 (PDT) MIME-Version: 1.0 References: <20200515093613.18691-1-ardb@kernel.org> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 26 May 2020 16:04:10 +0200 Message-ID: Subject: Re: [PATCH] ACPI: GED: add support for _Exx / _Lxx handler methods To: Ard Biesheuvel Cc: "Rafael J. Wysocki" , Linux Kernel Mailing List , Linux ARM , "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Stable Content-Type: text/plain; charset="UTF-8" Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Tue, May 26, 2020 at 1:12 PM Ard Biesheuvel wrote: > > Hello Rafael, > > I spotted an issue with this patch. Please see below. > > > On Fri, 15 May 2020 at 18:32, Rafael J. Wysocki wrote: > > > > On Fri, May 15, 2020 at 11:37 AM Ard Biesheuvel wrote: > > > > > > Per the ACPI spec, interrupts in the range [0, 255] may be handled > > > in AML using individual methods whose naming is based on the format > > > _Exx or _Lxx, where xx is the hex representation of the interrupt > > > index. > > > > > > Add support for this missing feature to our ACPI GED driver. > > > > > > Cc: "Rafael J. Wysocki" > > > Cc: Len Brown > > > Cc: linux-acpi@vger.kernel.org > > > Cc: # v4.9+ > > > Signed-off-by: Ard Biesheuvel > > > --- > > > drivers/acpi/evged.c | 22 +++++++++++++++++--- > > > 1 file changed, 19 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c > > > index aba0d0027586..6d7a522952bf 100644 > > > --- a/drivers/acpi/evged.c > > > +++ b/drivers/acpi/evged.c > > > @@ -79,6 +79,8 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares, > > > struct resource r; > > > struct acpi_resource_irq *p = &ares->data.irq; > > > struct acpi_resource_extended_irq *pext = &ares->data.extended_irq; > > > + char ev_name[5]; > > > + u8 trigger; > > > > > > if (ares->type == ACPI_RESOURCE_TYPE_END_TAG) > > > return AE_OK; > > > @@ -87,14 +89,28 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares, > > > dev_err(dev, "unable to parse IRQ resource\n"); > > > return AE_ERROR; > > > } > > > - if (ares->type == ACPI_RESOURCE_TYPE_IRQ) > > > + if (ares->type == ACPI_RESOURCE_TYPE_IRQ) { > > > gsi = p->interrupts[0]; > > > - else > > > + trigger = p->triggering; > > > + } else { > > > gsi = pext->interrupts[0]; > > > + trigger = p->triggering; > > This should be 'pext->triggering' instead. > > In practice, it doesn't matter, since p and pext point to the same > union, and the 'triggering' field happens to be at the same offset. > But it should still be fixed, of course. > > Would you prefer a followup patch? Or can you fix it locally? A followup, please.