Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1184300
| From | Joel Stanley <joel@jms.id.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 3/6] cpufreq: powernv: Register for OCC related opal_message notification |
| Date | 2015-07-15 08:20 +0200 |
| Message-ID | <pMocW-7vv-7@gated-at.bofh.it> (permalink) |
| References | <pLMKl-64q-3@gated-at.bofh.it> <pLMKm-64q-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello,
On Mon, 2015-07-13 at 19:39 +0530, Shilpasri G Bhat wrote:
> diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
> index d0c18c9..1f59958 100644
> --- a/drivers/cpufreq/powernv-cpufreq.c
> +++ b/drivers/cpufreq/powernv-cpufreq.c
> @@ -414,6 +415,71 @@ static struct notifier_block powernv_cpufreq_reboot_nb = {
> .notifier_call = powernv_cpufreq_reboot_notifier,
> };
>
> +static char throttle_reason[][30] = {
> + "No throttling",
> + "Power Cap",
> + "Processor Over Temperature",
> + "Power Supply Failure",
> + "Over Current",
> + "OCC Reset"
> + };
> +
> +static int powernv_cpufreq_occ_msg(struct notifier_block *nb,
> + unsigned long msg_type, void *_msg)
> +{
> + struct opal_msg *msg = _msg;
> + struct opal_occ_msg omsg;
> +
> + if (msg_type != OPAL_MSG_OCC)
> + return 0;
> +
> + memcpy(&omsg, msg->params, sizeof(omsg));
You need to ensure the of the members of struct opal_occ_msg are in the
correct byte order when copying them over.
Have you tested this code with in a little endian configuration?
Do the messages you're sending make sense for a system that has a BMC
instead of a FSP?
Cheers,
Joel
> +
> + switch (omsg.type) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v4 3/6] cpufreq: powernv: Register for OCC related opal_message notification Joel Stanley <joel@jms.id.au> - 2015-07-15 08:20 +0200 Re: [PATCH v4 3/6] cpufreq: powernv: Register for OCC related opal_message notification Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> - 2015-07-15 12:20 +0200
csiph-web