linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Lynch <nathanl@linux.ibm.com>
To: Tyrel Datwyler <tyreld@linux.ibm.com>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 2/9] powerpc/pseries: fix bad drc_index_start value parsing of drc-info entry
Date: Thu, 10 Oct 2019 14:04:59 -0500	[thread overview]
Message-ID: <87y2xsifqc.fsf@linux.ibm.com> (raw)
In-Reply-To: <1569910334-5972-3-git-send-email-tyreld@linux.ibm.com>

Tyrel Datwyler <tyreld@linux.ibm.com> writes:
> The ibm,drc-info property is an array property that contains drc-info
> entries such that each entry is made up of 2 string encoded elements
> followed by 5 int encoded elements. The of_read_drc_info_cell()
> helper contains comments that correctly name the expected elements
> and their encoding. However, the usage of of_prop_next_string() and
> of_prop_next_u32() introduced a subtle skippage of the first u32.
> This is a result of of_prop_next_string() returns a pointer to the
> next property value which is not a string, but actually a (__be32 *).
> As, a result the following call to of_prop_next_u32() passes over the
> current int encoded value and actually stores the next one wrongly.
>
> Simply endian swap the current value in place after reading the first
> two string values. The remaining int encoded values can then be read
> correctly using of_prop_next_u32().

Good but I think it would make more sense for a fix for
of_read_drc_info_cell() to precede any patch in the series which
introduces new callers, such as patch #1.

  reply	other threads:[~2019-10-10 19:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01  6:12 [RFC PATCH 0/9] Fixes and Enablement of ibm,drc-info property Tyrel Datwyler
2019-10-01  6:12 ` [RFC PATCH 1/9] powerpc/pseries: add cpu DLPAR support for drc-info property Tyrel Datwyler
2019-10-10 18:56   ` Nathan Lynch
2019-10-30 23:35     ` Tyrel Datwyler
2019-10-31 17:14       ` Nathan Lynch
2019-10-01  6:12 ` [RFC PATCH 2/9] powerpc/pseries: fix bad drc_index_start value parsing of drc-info entry Tyrel Datwyler
2019-10-10 19:04   ` Nathan Lynch [this message]
2019-10-10 20:16     ` powerpc/405GP, cuImage and PCI support Carlo Pisani
2019-10-31  0:15     ` [RFC PATCH 2/9] powerpc/pseries: fix bad drc_index_start value parsing of drc-info entry Tyrel Datwyler
2019-10-01  6:12 ` [RFC PATCH 3/9] powerpc/pseries: fix drc-info mappings of logical cpus to drc-index Tyrel Datwyler
2019-10-01  6:12 ` [RFC PATCH 4/9] PCI: rpaphp: fix up pointer to first drc-info entry Tyrel Datwyler
2019-10-01  6:12 ` [RFC PATCH 5/9] PCI: rpaphp: don't rely on firmware feature to imply drc-info support Tyrel Datwyler
2019-10-01  6:12 ` [RFC PATCH 6/9] PCI: rpaphp: add drc-info support for hotplug slot registration Tyrel Datwyler
2019-10-01  6:12 ` [RFC PATCH 7/9] PCI: rpaphp: annotate and correctly byte swap DRC properties Tyrel Datwyler
2019-10-01  6:12 ` [RFC PATCH 8/9] PCI: rpaphp: correctly match ibm, my-drc-index to drc-name when using drc-info Tyrel Datwyler
2019-10-01  6:12 ` [RFC PATCH 9/9] powerpc: Enable support for ibm,drc-info property Tyrel Datwyler
2019-10-01 20:02 ` [RFC PATCH 0/9] Fixes and Enablement of " Bjorn Helgaas
2019-10-31  0:15   ` Tyrel Datwyler

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=87y2xsifqc.fsf@linux.ibm.com \
    --to=nathanl@linux.ibm.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=tyreld@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).