All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Alexey Klimov <alexey.klimov@arm.com>
Cc: rjw@rjwysocki.net, viresh.kumar@linaro.org,
	linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org,
	ashwin.chaugule@linaro.org
Subject: Re: [PATCH 5/5] acpi: bus: Enable HWP CPPC objects
Date: Tue, 16 Aug 2016 09:50:55 -0700	[thread overview]
Message-ID: <1471366255.3745.45.camel@linux.intel.com> (raw)
In-Reply-To: <20160816143257.GA22533@arm.com>

Hi Alexey,

On Tue, 2016-08-16 at 15:32 +0100, Alexey Klimov wrote:
> Hi Srinivas,
> 
> On Wed, Aug 10, 2016 at 05:17:26PM -0700, Srinivas Pandruvada wrote:
> > 
> > Need to set platform wide _OSC bits CPC version 1 and version 2
> > bits
> > so that BIOS presents CPPC objects.
> > Even though the cppc_acpi supports only version 2, need to set both
> > _OSC bits for version 1 and version 2, otherwise BIOS ignore _OSC
> > settings.
> Does such behaviour go against ACPI specs?
> If yes, it's better to add comment in the code.
I need to fix the commit description here. The bit 5 is generic CPPC
support and bit 6 is CPPC_V2 support capability. So if we set only bit
5 then we can support only CPPC v1. If we set bit 6, we also support
CPPC v2. So we have to set both bits for CPPC v2 (Table 6-176 Platform-
Wide _OSC Capabilities DWORD 2 ACPI 6.0 spec). 
 
> > 
> > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel
> > .com>
> > ---
> >  drivers/acpi/bus.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> > index 85b7d07..61643a5 100644
> > --- a/drivers/acpi/bus.c
> > +++ b/drivers/acpi/bus.c
> > @@ -330,6 +330,13 @@ static void acpi_bus_osc_support(void)
> >  	capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
> >  	capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT;
> >  
> > +#ifdef CONFIG_X86
> > +	if (boot_cpu_has(X86_FEATURE_HWP)) {
> > +		capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_SUPPORT;
> > +		capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPCV2_SUPPORT;
> > +	}
> > +#endif
> Just to check if I understand things correctly.
> I thought that OSC method is kind of 'handshake'. OS describes
> features
> that it supports and then platform indicates back what features it
> can
> provide/support.
> Here in this patch I see only first part and I don't see where you
> check
> confirmation from platform that it supports/enabled CPPC.
> You don't need that, do you?
Once we set these bits the BIOS will expose the CPPC tables. This will
result in acpi_cppc_processor_probe will be successful. Also _OSC
response will set bit 5 and 6 here to confirm the acceptance, but I
can't do any meaningful processing with that confirmation till
acpi_cppc_processor_probe() returns successfully, which is the
confirmation.
How the CPPC data is used in x86 as I indicated in the cover page will
be a separate series. I submitted CPPC ACPI changes before so that they
can be reviewed first.

Thanks,
Srinivas


> It will be nice to see explanation.
> 
> Best regards,
> Alexey.
> 
> > 
> >  	if (!ghes_disable)
> >  		capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_APEI_SUPPORT;
> >  	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))

  reply	other threads:[~2016-08-16 16:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11  0:17 [PATCH 0/5] x86 CPPC usage Srinivas Pandruvada
2016-08-11  0:17 ` [PATCH 1/5] acpi: cppc: Allow build with ACPI_CPU_FREQ_PSS config Srinivas Pandruvada
2016-08-12  9:13   ` Alexey Klimov
2016-08-12 12:34     ` Srinivas Pandruvada
2016-08-12 16:04     ` Prakash, Prashanth
2016-08-12 16:32       ` Hoan Tran
2016-08-12 16:53         ` Srinivas Pandruvada
2016-08-12 16:35   ` Hoan Tran
2016-08-12 16:52     ` Srinivas Pandruvada
2016-08-12 16:58       ` Hoan Tran
2016-08-12 17:16         ` Srinivas Pandruvada
2016-08-11  0:17 ` [PATCH 2/5] acpi: cpcc: Add integer read support Srinivas Pandruvada
2016-08-11  0:17 ` [PATCH 3/5] acpi: cppc: Add support for function fixed hardware address Srinivas Pandruvada
2016-08-11  0:17 ` [PATCH 4/5] acpi: cppc: Add prefix cppc to cpudata structure name Srinivas Pandruvada
2016-08-11  0:17 ` [PATCH 5/5] acpi: bus: Enable HWP CPPC objects Srinivas Pandruvada
2016-08-16 14:32   ` Alexey Klimov
2016-08-16 16:50     ` Srinivas Pandruvada [this message]
2016-08-18 21:14 ` [PATCH 0/5] x86 CPPC usage Srinivas Pandruvada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471366255.3745.45.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=alexey.klimov@arm.com \
    --cc=ashwin.chaugule@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.