From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
To: Anton Blanchard <anton@samba.org>,
benh@kernel.crashing.org, paulus@samba.org,
stewart@linux.vnet.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 6/6] powerpc/powernv: Fix little endian issues in OPAL dump code
Date: Tue, 22 Apr 2014 14:02:33 +0530 [thread overview]
Message-ID: <53562921.6050300@linux.vnet.ibm.com> (raw)
In-Reply-To: <1398142887-24109-6-git-send-email-anton@samba.org>
On 04/22/2014 10:31 AM, Anton Blanchard wrote:
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> arch/powerpc/include/asm/opal.h | 4 ++--
> arch/powerpc/platforms/powernv/opal-dump.c | 13 +++++++++----
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
> index afb0fed..66ad7a7 100644
> --- a/arch/powerpc/include/asm/opal.h
> +++ b/arch/powerpc/include/asm/opal.h
> @@ -868,8 +868,8 @@ int64_t opal_validate_flash(uint64_t buffer, uint32_t *size, uint32_t *result);
> int64_t opal_manage_flash(uint8_t op);
> int64_t opal_update_flash(uint64_t blk_list);
> int64_t opal_dump_init(uint8_t dump_type);
> -int64_t opal_dump_info(uint32_t *dump_id, uint32_t *dump_size);
> -int64_t opal_dump_info2(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type);
> +int64_t opal_dump_info(__be32 *dump_id, __be32 *dump_size);
> +int64_t opal_dump_info2(__be32 *dump_id, __be32 *dump_size, __be32 *dump_type);
> int64_t opal_dump_read(uint32_t dump_id, uint64_t buffer);
> int64_t opal_dump_ack(uint32_t dump_id);
Shouldn't we change above two functions as well ?
> int64_t opal_dump_resend_notification(void);
> diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c
> index f0b4724..788a197 100644
> --- a/arch/powerpc/platforms/powernv/opal-dump.c
> +++ b/arch/powerpc/platforms/powernv/opal-dump.c
> @@ -209,15 +209,20 @@ static struct kobj_type dump_ktype = {
> .default_attrs = dump_default_attrs,
> };
>
> -static int64_t dump_read_info(uint32_t *id, uint32_t *size, uint32_t *type)
> +static int64_t dump_read_info(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type)
> {
> + __be32 id, size, type;
> int rc;
> - *type = 0xffffffff;
>
> - rc = opal_dump_info2(id, size, type);
> + type = cpu_to_be32(0xffffffff);
>
> + rc = opal_dump_info2(&id, &size, &type);
> if (rc == OPAL_PARAMETER)
> - rc = opal_dump_info(id, size);
> + rc = opal_dump_info(&id, &size);
> +
> + *dump_id = be32_to_cpu(id);
> + *dump_size = be32_to_cpu(size);
> + *dump_type = be32_to_cpu(type);
>
Should we convert ID back to BE format in dump_send_ack() ?
-Vasant
> if (rc)
> pr_warn("%s: Failed to get dump info (%d)\n",
>
next prev parent reply other threads:[~2014-04-22 8:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-22 5:01 [PATCH 1/6] powerpc/powernv: Use uint64_t instead of size_t in OPAL APIs Anton Blanchard
2014-04-22 5:01 ` [PATCH 2/6] powerpc/powernv: Remove some OPAL function declaration duplication Anton Blanchard
2014-04-22 5:01 ` [PATCH 3/6] powerpc/powernv: Fix little endian issues with opal_do_notifier calls Anton Blanchard
2014-04-22 5:01 ` [PATCH 4/6] powerpc/powernv: Fix little endian issues in OPAL error log code Anton Blanchard
2014-04-22 8:10 ` Vasant Hegde
2014-04-22 5:01 ` [PATCH 5/6] powerpc/powernv: Create OPAL sglist helper functions and fix endian issues Anton Blanchard
2014-04-22 9:16 ` Vasant Hegde
2014-04-22 21:34 ` Anton Blanchard
2014-04-22 5:01 ` [PATCH 6/6] powerpc/powernv: Fix little endian issues in OPAL dump code Anton Blanchard
2014-04-22 8:32 ` Vasant Hegde [this message]
2014-04-22 21:31 ` Anton Blanchard
2014-04-23 4:36 ` Vasant Hegde
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=53562921.6050300@linux.vnet.ibm.com \
--to=hegdevasant@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=stewart@linux.vnet.ibm.com \
/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.