Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp186823iob; Wed, 11 May 2022 12:08:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHt1f/N9DY4iT4S3OlbRCL7zRjWLUL+YyRQ9ic+9o0vogPvmhYeKLInFFmQ7HPayTKM0m1 X-Received: by 2002:a17:907:a41f:b0:6f3:e75c:5a77 with SMTP id sg31-20020a170907a41f00b006f3e75c5a77mr25050986ejc.70.1652296135574; Wed, 11 May 2022 12:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652296135; cv=none; d=google.com; s=arc-20160816; b=Xi2PnL5v7uG8goxjrl/CogEihj/e0LPHwU5ByJLyYl663wJB3I7vhqVMLlNq6y51lS okda0+lFlMF4s2/7tfM7WRFYnbtwjwPwjS+XGKYk0lEd0+b51bwhjOPSLzOs2e1deGoj J6rX9AvUjI3tRXK+4hrmYREt6lsnwrUhdAkttxxjz6kTEwU63fHmcInKMxZe7bRoCVym oOApsJISmiafhJbVQQ+DIe4lDtEW9sb+vEmUL6JsVxqtQVGTUFY22kb4/j6/V7sIwRhO CCbgeQypblzd2slFHbd1OuHPMz6VMkghg0W3jpNQMVa41qn+SnfMJH0lTTqn13VmShPB XyeQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QhkOVNWBXEJMtmk0rtt1ac6CYxU2zoXJCfUOda5ajfE=; b=Zu4/8vbrZC6KldEdi+NTvsvfniw+xeNLJENn/OJZBUqm72YNfJ/ZWnaOaZfhaso5iD ss3ixXnxEvqWXFpISDj2Uedx8s3Y5063eQhhx035U0FhNKMcpgr37bZPpVRm8m8Eplj0 nQFEHc6N/M/LKz0O89v8PvBwuA5mjvVwf9NSH2kCgrkN6KYxPS6471A2NPBanFbBW+vN IYSyJFAkvWv/KiaIodIHjQwiGXG+2+6fZOkX3t4G/pw3WARR6KFB6RjZUL7Pr+VjuI6C qTasJKZiVHxjcpUS2IUPNxLwZeK1Hw3QUP2oMXaz8hjnab+Irm6CB1QUQZD7qvTCCw37 JiLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id an10-20020a17090656ca00b006e83fe14ac1si2937729ejc.554.2022.05.11.12.08.29; Wed, 11 May 2022 12:08:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241650AbiEKORk (ORCPT + 99 others); Wed, 11 May 2022 10:17:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234540AbiEKORg (ORCPT ); Wed, 11 May 2022 10:17:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 78F4531DDC; Wed, 11 May 2022 07:17:35 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4F5ADED1; Wed, 11 May 2022 07:17:35 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CB2473F66F; Wed, 11 May 2022 07:17:33 -0700 (PDT) Date: Wed, 11 May 2022 15:17:31 +0100 From: Sudeep Holla To: Pierre Gondois Cc: linux-kernel@vger.kernel.org, Ionela.Voinescu@arm.com, Dietmar.Eggemann@arm.com, "Rafael J. Wysocki" , Len Brown , Viresh Kumar , Robert Moore , linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, devel@acpica.org Subject: Re: [PATCH v1 1/5] ACPI: CPPC: Check _OSC for flexible address space Message-ID: <20220511141731.rjyjmgvux43lsj3x@bogus> References: <20220511134559.1466925-1-pierre.gondois@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220511134559.1466925-1-pierre.gondois@arm.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 11, 2022 at 03:45:55PM +0200, Pierre Gondois wrote: > ACPI 6.2 Section 6.2.11.2 'Platform-Wide OSPM Capabilities': > Starting with ACPI Specification 6.2, all _CPC registers can be in > PCC, System Memory, System IO, or Functional Fixed Hardware address > spaces. OSPM support for this more flexible register space scheme is > indicated by the “Flexible Address Space for CPPC Registers” _OSC bit > > Otherwise (cf ACPI 6.1, s8.4.7.1.1.X), _CPC registers must be in: > - PCC or Functional Fixed Hardware address space if defined > - SystemMemory address space (NULL register) if not defined > > Add the corresponding _OSC bit and check it when parsing _CPC objects. > Looks good, other than a minor nit below. Feel free to ignore that or check what is Rafael's preference. Otherwise, Reviewed-by: Sudeep Holla > Signed-off-by: Pierre Gondois > --- > drivers/acpi/bus.c | 18 ++++++++++++++++++ > drivers/acpi/cppc_acpi.c | 9 +++++++++ > include/linux/acpi.h | 2 ++ > 3 files changed, 29 insertions(+) > [...] > diff --git a/include/linux/acpi.h b/include/linux/acpi.h > index d7136d13aa44..977d74d0465b 100644 > --- a/include/linux/acpi.h > +++ b/include/linux/acpi.h > @@ -574,6 +574,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); > #define OSC_SB_OSLPI_SUPPORT 0x00000100 > #define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT 0x00001000 > #define OSC_SB_GENERIC_INITIATOR_SUPPORT 0x00002000 > +#define OSC_SB_CPC_FLEXIBLE_ADR_SP 0x00004000 I would prefer ADR_SPACE instead of ADR_SP. -- Regards, Sudeep