All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Vikas Sajjan <sajjan.linux@gmail.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	linux-ia64@vger.kernel.org, Al Stone <al.stone@linaro.org>,
	Prashanth Prakash <pprakash@codeaurora.org>,
	x86@kernel.org, Ashwin Chaugule <ashwin.chaugule@linaro.org>
Subject: Re: [PATCH v4 1/5] ACPI / processor_idle: introduce ARCH_SUPPORTS_ACPI_PROCESSOR_CSTATE
Date: Wed, 20 Apr 2016 11:09:34 +0100	[thread overview]
Message-ID: <5717555E.8040401@arm.com> (raw)
In-Reply-To: <CAGm_ybjZ8ePc9KhcaaSX9aDJTE1Svuc-OnpYJpd9TTfi_sm_cQ@mail.gmail.com>



On 20/04/16 10:56, Vikas Sajjan wrote:
> Hi Sudeep,
>
> On Tue, Apr 19, 2016 at 6:00 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>> ACPI 6.0 adds a new method to specify the CPU idle states(C-states)
>> called Low Power Idle(LPI) states. Since new architectures like ARM64
>> use only LPIs, introduce ARCH_SUPPORTS_ACPI_PROCESSOR_CSTATE to
>> encapsulate all the code supporting the old style C-states(_CST)
>>
>> This patch will help to extend the processor_idle module to support
>> LPI.
>>

[...]

>> @@ -1018,29 +1062,11 @@ int acpi_processor_power_init(struct acpi_processor *pr)
>>          acpi_status status;
>>          int retval;
>>          struct cpuidle_device *dev;
>> -       static int first_run;
>>
>>          if (disabled_by_idle_boot_param())
>>                  return 0;
>>
>> -       if (!first_run) {
>> -               dmi_check_system(processor_power_dmi_table);
>> -               max_cstate = acpi_processor_cstate_check(max_cstate);
>> -               if (max_cstate < ACPI_C_STATES_MAX)
>> -                       printk(KERN_NOTICE
>> -                              "ACPI: processor limited to max C-state %d\n",
>> -                              max_cstate);
>> -               first_run++;
>> -       }
>> -
>> -       if (acpi_gbl_FADT.cst_control && !nocst) {
>> -               status =
>> -                   acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8);
>> -               if (ACPI_FAILURE(status)) {
>> -                       ACPI_EXCEPTION((AE_INFO, status,
>> -                                       "Notifying BIOS of _CST ability failed"));
>> -               }
>> -       }
>> +       acpi_processor_cstate_first_run_checks();
>>
>>          acpi_processor_get_power_info(pr);
>>          pr->flags.power_setup_done = 1;
>
> Not related to your change,
> The acpi_processor_get_power_info() function can return failure, so i
> thought it makes sense to check for the return value
> and then set the  flag pr->flags.power_setup_done appropriately.
>

Makes sense, will do that.

-- 
Regards,
Sudeep

WARNING: multiple messages have this Message-ID (diff)
From: Sudeep Holla <sudeep.holla@arm.com>
To: Vikas Sajjan <sajjan.linux@gmail.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	linux-ia64@vger.kernel.org, Al Stone <al.stone@linaro.org>,
	Prashanth Prakash <pprakash@codeaurora.org>,
	x86@kernel.org, Ashwin Chaugule <ashwin.chaugule@linaro.org>
Subject: Re: [PATCH v4 1/5] ACPI / processor_idle: introduce ARCH_SUPPORTS_ACPI_PROCESSOR_CSTATE
Date: Wed, 20 Apr 2016 10:09:34 +0000	[thread overview]
Message-ID: <5717555E.8040401@arm.com> (raw)
In-Reply-To: <CAGm_ybjZ8ePc9KhcaaSX9aDJTE1Svuc-OnpYJpd9TTfi_sm_cQ@mail.gmail.com>



On 20/04/16 10:56, Vikas Sajjan wrote:
> Hi Sudeep,
>
> On Tue, Apr 19, 2016 at 6:00 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>> ACPI 6.0 adds a new method to specify the CPU idle states(C-states)
>> called Low Power Idle(LPI) states. Since new architectures like ARM64
>> use only LPIs, introduce ARCH_SUPPORTS_ACPI_PROCESSOR_CSTATE to
>> encapsulate all the code supporting the old style C-states(_CST)
>>
>> This patch will help to extend the processor_idle module to support
>> LPI.
>>

[...]

>> @@ -1018,29 +1062,11 @@ int acpi_processor_power_init(struct acpi_processor *pr)
>>          acpi_status status;
>>          int retval;
>>          struct cpuidle_device *dev;
>> -       static int first_run;
>>
>>          if (disabled_by_idle_boot_param())
>>                  return 0;
>>
>> -       if (!first_run) {
>> -               dmi_check_system(processor_power_dmi_table);
>> -               max_cstate = acpi_processor_cstate_check(max_cstate);
>> -               if (max_cstate < ACPI_C_STATES_MAX)
>> -                       printk(KERN_NOTICE
>> -                              "ACPI: processor limited to max C-state %d\n",
>> -                              max_cstate);
>> -               first_run++;
>> -       }
>> -
>> -       if (acpi_gbl_FADT.cst_control && !nocst) {
>> -               status >> -                   acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8);
>> -               if (ACPI_FAILURE(status)) {
>> -                       ACPI_EXCEPTION((AE_INFO, status,
>> -                                       "Notifying BIOS of _CST ability failed"));
>> -               }
>> -       }
>> +       acpi_processor_cstate_first_run_checks();
>>
>>          acpi_processor_get_power_info(pr);
>>          pr->flags.power_setup_done = 1;
>
> Not related to your change,
> The acpi_processor_get_power_info() function can return failure, so i
> thought it makes sense to check for the return value
> and then set the  flag pr->flags.power_setup_done appropriately.
>

Makes sense, will do that.

-- 
Regards,
Sudeep

WARNING: multiple messages have this Message-ID (diff)
From: sudeep.holla@arm.com (Sudeep Holla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/5] ACPI / processor_idle: introduce ARCH_SUPPORTS_ACPI_PROCESSOR_CSTATE
Date: Wed, 20 Apr 2016 11:09:34 +0100	[thread overview]
Message-ID: <5717555E.8040401@arm.com> (raw)
In-Reply-To: <CAGm_ybjZ8ePc9KhcaaSX9aDJTE1Svuc-OnpYJpd9TTfi_sm_cQ@mail.gmail.com>



On 20/04/16 10:56, Vikas Sajjan wrote:
> Hi Sudeep,
>
> On Tue, Apr 19, 2016 at 6:00 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>> ACPI 6.0 adds a new method to specify the CPU idle states(C-states)
>> called Low Power Idle(LPI) states. Since new architectures like ARM64
>> use only LPIs, introduce ARCH_SUPPORTS_ACPI_PROCESSOR_CSTATE to
>> encapsulate all the code supporting the old style C-states(_CST)
>>
>> This patch will help to extend the processor_idle module to support
>> LPI.
>>

[...]

>> @@ -1018,29 +1062,11 @@ int acpi_processor_power_init(struct acpi_processor *pr)
>>          acpi_status status;
>>          int retval;
>>          struct cpuidle_device *dev;
>> -       static int first_run;
>>
>>          if (disabled_by_idle_boot_param())
>>                  return 0;
>>
>> -       if (!first_run) {
>> -               dmi_check_system(processor_power_dmi_table);
>> -               max_cstate = acpi_processor_cstate_check(max_cstate);
>> -               if (max_cstate < ACPI_C_STATES_MAX)
>> -                       printk(KERN_NOTICE
>> -                              "ACPI: processor limited to max C-state %d\n",
>> -                              max_cstate);
>> -               first_run++;
>> -       }
>> -
>> -       if (acpi_gbl_FADT.cst_control && !nocst) {
>> -               status =
>> -                   acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8);
>> -               if (ACPI_FAILURE(status)) {
>> -                       ACPI_EXCEPTION((AE_INFO, status,
>> -                                       "Notifying BIOS of _CST ability failed"));
>> -               }
>> -       }
>> +       acpi_processor_cstate_first_run_checks();
>>
>>          acpi_processor_get_power_info(pr);
>>          pr->flags.power_setup_done = 1;
>
> Not related to your change,
> The acpi_processor_get_power_info() function can return failure, so i
> thought it makes sense to check for the return value
> and then set the  flag pr->flags.power_setup_done appropriately.
>

Makes sense, will do that.

-- 
Regards,
Sudeep

  reply	other threads:[~2016-04-20 10:09 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19 12:30 [PATCH v4 0/5] ACPI / processor_idle: Add ACPI v6.0 LPI support Sudeep Holla
2016-04-19 12:30 ` Sudeep Holla
2016-04-19 12:30 ` [PATCH v4 1/5] ACPI / processor_idle: introduce ARCH_SUPPORTS_ACPI_PROCESSOR_CSTATE Sudeep Holla
2016-04-19 12:30   ` Sudeep Holla
2016-04-19 12:30   ` Sudeep Holla
2016-04-19 12:49   ` kbuild test robot
2016-04-19 12:49     ` kbuild test robot
2016-04-19 12:49     ` kbuild test robot
2016-04-19 12:49     ` kbuild test robot
2016-04-19 13:00     ` Sudeep Holla
2016-04-19 13:00       ` Sudeep Holla
2016-04-19 13:00       ` Sudeep Holla
2016-04-20  9:56   ` Vikas Sajjan
2016-04-20  9:57     ` Vikas Sajjan
2016-04-20  9:56     ` Vikas Sajjan
2016-04-20 10:09     ` Sudeep Holla [this message]
2016-04-20 10:09       ` Sudeep Holla
2016-04-20 10:09       ` Sudeep Holla
2016-05-09 23:59   ` Rafael J. Wysocki
2016-05-10  0:02     ` Rafael J. Wysocki
2016-05-10  0:02     ` Rafael J. Wysocki
2016-05-11 15:07     ` Sudeep Holla
2016-05-11 15:07       ` Sudeep Holla
2016-05-11 15:07       ` Sudeep Holla
2016-04-19 12:30 ` [PATCH v4 2/5] ACPI / processor_idle: Add support for Low Power Idle(LPI) states Sudeep Holla
2016-04-19 12:30   ` Sudeep Holla
2016-05-10  0:04   ` Rafael J. Wysocki
2016-05-10  0:04     ` Rafael J. Wysocki
2016-05-11  0:03   ` Rafael J. Wysocki
2016-05-11  0:03     ` Rafael J. Wysocki
2016-05-11 15:06     ` Sudeep Holla
2016-05-11 15:06       ` Sudeep Holla
2016-05-11 20:45       ` Rafael J. Wysocki
2016-05-11 20:45         ` Rafael J. Wysocki
2016-04-19 12:30 ` [PATCH v4 3/5] drivers: psci: refactor psci_cpu_init_idle in preparation for ACPI LPI support Sudeep Holla
2016-04-19 12:30   ` Sudeep Holla
2016-06-09 13:24   ` Lorenzo Pieralisi
2016-06-09 13:24     ` Lorenzo Pieralisi
2016-06-09 14:26     ` Sudeep Holla
2016-06-09 14:26       ` Sudeep Holla
2016-04-19 12:30 ` [PATCH v4 4/5] arm64: add support for ACPI Low Power Idle(LPI) Sudeep Holla
2016-04-19 12:30   ` Sudeep Holla
2016-04-19 13:59   ` kbuild test robot
2016-04-19 13:59     ` kbuild test robot
2016-04-19 13:59     ` kbuild test robot
2016-04-19 15:42     ` Sudeep Holla
2016-04-19 15:42       ` Sudeep Holla
2016-04-20  9:59   ` Vikas Sajjan
2016-04-20  9:59     ` Vikas Sajjan
2016-04-20 10:20     ` Sudeep Holla
2016-04-20 10:20       ` Sudeep Holla
2016-04-20 10:39   ` Jisheng Zhang
2016-04-20 10:39     ` Jisheng Zhang
2016-04-20 10:39     ` Jisheng Zhang
2016-04-26 15:51   ` Prakash, Prashanth
2016-04-26 15:51     ` Prakash, Prashanth
2016-04-26 16:01     ` Sudeep Holla
2016-04-26 16:01       ` Sudeep Holla
2016-05-11  0:07   ` Rafael J. Wysocki
2016-05-11  0:07     ` Rafael J. Wysocki
2016-05-11 15:06     ` Sudeep Holla
2016-05-11 15:06       ` Sudeep Holla
2016-04-19 12:30 ` [PATCH v4 5/5] ACPI : enable ACPI_PROCESSOR_IDLE on ARM64 Sudeep Holla
2016-04-19 12:30   ` Sudeep Holla

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=5717555E.8040401@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=al.stone@linaro.org \
    --cc=ashwin.chaugule@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=pprakash@codeaurora.org \
    --cc=rjw@rjwysocki.net \
    --cc=sajjan.linux@gmail.com \
    --cc=x86@kernel.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.