Message ID | 20231002135424.2603191-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1547051vqb; Mon, 2 Oct 2023 09:36:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKVXmbJ6E5i4iBxPPpPaMi2V3a0rMxBntp0LCdYQml0Ia15SQl4aHdJgXGtMGBsyF/hF1r X-Received: by 2002:a05:6a20:9148:b0:154:4246:d63b with SMTP id x8-20020a056a20914800b001544246d63bmr11438776pzc.25.1696264563439; Mon, 02 Oct 2023 09:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696264563; cv=none; d=google.com; s=arc-20160816; b=I1loaOP+vQ0ilVIITHH/oQoNqqaZ1MiVvwMtS0JFQXTnlWgqwnchUoIUyugw1f8Je2 7kC79Fz4eZqhZgrB9IymAtkNkgrph1NbbejqkIkitS3rklgyW2sOEtVHeFwJGFh+73Hh Z3An31pQymNqq3tOFPvZZCQMUR8DNVZmYrisBeovwCxTNamMuXNqCcL5REA/HMsymBkW qBsg16Oc9isMda9GJdgKyAf4/xouS/QjT1exAFnSmOtYGeDf+Xg8HTMFaMBbkp8xBCjN 6+jkl5b9UuWwlY2YiyW2xXI7dMaucfcQP3MtQPaO2AmtbUWVLclwpGFft2PrGUQDUXjo 9xMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8WO5OMCFaXUIiXGoeiUaScDGHvWxAt4Cbkewos9Z5kI=; fh=h6NT3WMwcVrxm4s6uvAQ5WvJVDjfN0XlM8p5r40fKdY=; b=ffbj3ftU/bsGPwE+GJMwaFM8sIZWegk6NpuhLY5rmesvSu/eRrFK01I9t6vYD5XAZr f8mmokAE8SKGGqjHhQX4rFPkXenZbJgNt5hgM09F9pQdARRYhMuw6GjGnyckc6zQTL1+ 35j/QQSA7MklTDNGaJ0wyy0NElBv/Fnc5mE987l7iM4fVjYEygTh/SANG4qqoxXStTYR o/88jxyMIqn0gEIqS/g3hc0jt0vvSFa2GiW4uOYOt7nGnTwQGuE7XT7WdLq4q4xDMDrs Qu7FcOWJTwNs4AhYeksMMX6iKPfoRdOUhKx1SAcjSEexx+RjUl1ErD9I4DLMRe3Xrm6Z Ok6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mkBV4JoG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l3-20020a056a00140300b0068e4037c5f7si27990239pfu.388.2023.10.02.09.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 09:36:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mkBV4JoG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B6F298097799; Mon, 2 Oct 2023 07:05:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237634AbjJBOE4 (ORCPT <rfc822;pusanteemu@gmail.com> + 18 others); Mon, 2 Oct 2023 10:04:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237474AbjJBOEy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 2 Oct 2023 10:04:54 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8424BE1; Mon, 2 Oct 2023 07:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696255491; x=1727791491; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=nKIji5IZJhMWabHMFqIgraecALuN9dFAb1DqaVopkOo=; b=mkBV4JoGpyQS4QO+sXZDM5ofoPdXSEGvVvUf4M6279HpOH2KiO+bFwtd QeSEwiaIc5lahvAVpGK31n5fRTPoOUCFGFyZPcAboNrYQg5g1YwppqWhH rbZgE26Vq0golsJX3Z4Hk5rfVaBwo7ksqYrz8ghfZ6mNmYIXF0XsbriqF 740s5DsoXjvOfHRaKHtEog3cyBmyhg08acGY3lGXrTK4Lye9xNvutTm9q t1THk5FZbEeMFYvYhcIDk89rJLkFs7jvqAWoBfenhPHLlMj59uGul3TmI OPZCHaei1ol15Po4JLFhcLnGqoPNJ58fao6e8ZuUbojifCvrpbgKQbJTR g==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="468922858" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="468922858" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 07:04:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="840994379" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="840994379" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 02 Oct 2023 07:04:48 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 3751F1A7; Mon, 2 Oct 2023 16:54:25 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Dan Williams <dan.j.williams@intel.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bjorn Helgaas <bhelgaas@google.com>, "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org> Subject: [PATCH v1 1/1] ACPI: PCI: Switch to use acpi_evaluate_dsm_typed() Date: Mon, 2 Oct 2023 16:54:24 +0300 Message-Id: <20231002135424.2603191-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 02 Oct 2023 07:05:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778662311034227513 X-GMAIL-MSGID: 1778662311034227513 |
Series |
[v1,1/1] ACPI: PCI: Switch to use acpi_evaluate_dsm_typed()
|
|
Commit Message
Andy Shevchenko
Oct. 2, 2023, 1:54 p.m. UTC
The acpi_evaluate_dsm_typed() provides a way to check the type of the
object evaluated by _DSM call. Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/acpi/pci_root.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Mon, Oct 2, 2023 at 4:04 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > The acpi_evaluate_dsm_typed() provides a way to check the type of the > object evaluated by _DSM call. Use it instead of open coded variant. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/acpi/pci_root.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c > index 84030804a763..58b89b8d950e 100644 > --- a/drivers/acpi/pci_root.c > +++ b/drivers/acpi/pci_root.c > @@ -1055,9 +1055,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, > * exists and returns 0, we must preserve any PCI resource > * assignments made by firmware for this host bridge. > */ > - obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1, > - DSM_PCI_PRESERVE_BOOT_CONFIG, NULL); > - if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0) > + obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1, > + DSM_PCI_PRESERVE_BOOT_CONFIG, NULL, ACPI_TYPE_INTEGER); > + if (obj && obj->integer.value == 0) > host_bridge->preserve_config = 1; > ACPI_FREE(obj); > > -- Applied as 6.7 material, thanks!
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 84030804a763..58b89b8d950e 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -1055,9 +1055,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, * exists and returns 0, we must preserve any PCI resource * assignments made by firmware for this host bridge. */ - obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1, - DSM_PCI_PRESERVE_BOOT_CONFIG, NULL); - if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0) + obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1, + DSM_PCI_PRESERVE_BOOT_CONFIG, NULL, ACPI_TYPE_INTEGER); + if (obj && obj->integer.value == 0) host_bridge->preserve_config = 1; ACPI_FREE(obj);