Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2723451rda; Wed, 25 Oct 2023 10:23:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6xpZJg5F0xwFJ2OMqiCtGkXZHlxSMp19/F6Kbg6mShi0g8gDWhV15NMB8g2Yl90DlQPMD X-Received: by 2002:a05:6808:1590:b0:3ae:2bc8:2b93 with SMTP id t16-20020a056808159000b003ae2bc82b93mr19735704oiw.3.1698254596198; Wed, 25 Oct 2023 10:23:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698254596; cv=none; d=google.com; s=arc-20160816; b=SLK+ul5PwcPmDj7GZs8DZ6htiF6qQBJaChDYyBUvY4SYanddSM+s8Q60kcJ99Vnk7H DYZ+Y3IQspKfTRcz2UHAAUTMqxZcrh/3Vspbm6ZrqSBWYYiZXOwhcFseojkoQc8ih3if i4NDnO9UCurl/UaGzQEBP1L4bh3zmGg6MuugE7C3QiM13b7vziOlWo+qmD8vi4DeMZnJ XCUq3Okq4bX8frh8oMha+C72/kD9aJGhErv9np4rNjzh3WvLJTkOKIqU4v+yy0wN0Bc8 oA7b3rOnq5ghXEgG+LTBLyF2beQ1y1zbmrq5xYeRQcap+BtrgsCY18BGFuIrGiSNaUmZ bGrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=vwiOvGGH4qq4tmelpBUN93yVtkxXv42JTqEvkaCteG8=; fh=+RZWHnNwArDh5DQkB7S+gjDUDQDsfRebTy/1SA46fcI=; b=Gx4eBAwtx1/dNPl6V9assdzBB8tNL5vVSlAYd39DfFmWbv1JXiJZOGMG2NAUfXAhHA 8ozu9Ua37RQ1Z+XimEqhBtGNedom3iBKnDfmB7xDnAuzIoYDDUyKFjgsnsOnJmolYwRG rCoVW31LTX9FspoFiNJvZH9u7LVaI9rk4OpIQ4/MsZytOVPYKfQIRCZTnupQ2AZ30En5 tcP2gpjG0gsucPQz8hGn1TEJw1UOvCGJEloP1TgKZUjb8eP38zdSB+KAGzzgicwCZz9f TN6BMauNH/ORpiBJIomPjBkqiBF+aS0TqfivwlV1VX8vTuzKdoqHirx8ZpvfpClYZUXY o0uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Jqyc/pzO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id d197-20020a2568ce000000b00d9ae190aff1si11122187ybc.451.2023.10.25.10.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:23:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Jqyc/pzO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 661298026DBA; Wed, 25 Oct 2023 10:22:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbjJYRWm (ORCPT + 99 others); Wed, 25 Oct 2023 13:22:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjJYRWl (ORCPT ); Wed, 25 Oct 2023 13:22:41 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4915C12F; Wed, 25 Oct 2023 10:22:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE601C433C7; Wed, 25 Oct 2023 17:22:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698254559; bh=TpVWJFapHo0VMT3nduTVoXX71bNPxxczuV+vN2OQlj4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Jqyc/pzOjnUqQi1ENoMFIHd7NAJDIILKbOQvRshNeIA3ZnJKYJGIT5ZdBwEKw6eZr PvaG2CsPwhJ6ndvZ6rX/02SEki/3nG+d0/O4kjEL/BlQ6bVlkGoSl826D76E0kq59K /BxYttdXvaH/+fNXL7Elqx25hV8Hr7uMHo6BleqPNvpQthRCZENDhE7p2vpgfVBSo+ VeFXA9HJ1CsHXY5l8hClMG4s1bcShaSrmYRWHIBqYDSILDENJmbXn9URBdku28K1AR The3ZP1ObSvDReM0tXcECgSlgcH0PeX0AFm7BONVLizklk0qQwaRQKsF/vr2F9voHy Wd1lv6GQYGqjQ== Date: Wed, 25 Oct 2023 12:22:37 -0500 From: Bjorn Helgaas To: D Scott Phillips Cc: linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Len Brown , Darren Hart , patches@amperecomputing.com Subject: Re: [PATCH v2 2/2] PCI: hotplug: Add extension driver for Ampere Altra hotplug LED control Message-ID: <20231025172237.GA1754650@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230930002036.6491-2-scott@os.amperecomputing.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:22:51 -0700 (PDT) On Fri, Sep 29, 2023 at 05:20:36PM -0700, D Scott Phillips wrote: > On Ampere Altra, PCIe hotplug is handled through ACPI. A side interface is > also present to request system firmware control of attention LEDs. Add an > ACPI PCI Hotplug companion driver to support attention LED control. > ... > + arm_smccc_smc(REQUEST, LED_CMD, led_status(status), LED_ATTENTION, > + pci_domain_nr(bus) | (PCI_SLOT(root_port->devfn) << 4), 0, 0, pci_domain_nr() returns "int" (normally 32 bits), but since this is an ACPI system, the domain comes from _SEG, which is defined to be 16 bits (ACPI r6.5, sec 6.5.6). So it looks like ORing in the "slot << 4" clobbers the upper 12 bits of _SEG. Is this code doing the right thing?