public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Darren Salt <devspam@moreofthesa.me.uk>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: <nirmoy.das@amd.com>, <bhelgaas@google.com>,
	<ckoenig.leichtzumerken@gmail.com>, <linux-pci@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>, <christian.koenig@amd.com>
Subject: Re: [PATCH 2/4] PCI: Add pci_rebar_bytes_to_size()
Date: Thu, 07 Jan 2021 23:31:36 +0000	[thread overview]
Message-ID: <58F0BFBCD0%devspam@moreofthesa.me.uk> (raw)
In-Reply-To: <20210107211757.GA1391831@bjorn-Precision-5520>

I demand that Bjorn Helgaas may or may not have written...

>> +static inline int pci_rebar_bytes_to_size(u64 bytes)
>> +{
>> +	bytes = roundup_pow_of_two(bytes);
>> +	return max(ilog2(bytes), 20) - 20;

> This isn't returning a "size", is it?  It looks like it's returning the
> log2 of the number of MB the BAR will be, i.e., the encoding used by the
> Resizable BAR Control register "BAR Size" field.  Needs a brief comment to
> that effect and/or a different function name.

Given that, it seems to me that pci_rebar_size_to_bytes should be similarly
commented and/or renamed.

  reply	other threads:[~2021-01-07 23:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 17:50 [PATCH 0/4] A PCI quirk for resizable BAR 0 on Navi10 Nirmoy Das
2021-01-07 17:50 ` [PATCH 1/4] PCI: Export pci_rebar_get_possible_sizes() Nirmoy Das
2021-01-07 21:18   ` Bjorn Helgaas
2021-01-07 17:50 ` [PATCH 2/4] PCI: Add pci_rebar_bytes_to_size() Nirmoy Das
2021-01-07 21:17   ` Bjorn Helgaas
2021-01-07 23:31     ` Darren Salt [this message]
2021-01-08  1:01       ` Bjorn Helgaas
2021-01-07 17:50 ` [PATCH 3/4] drm/amdgpu: Resize BAR0 to the maximum available size, even if it doesn't cover VRAM Nirmoy Das
2021-01-07 17:50 ` [PATCH 4/4] PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse Nirmoy Das
2021-01-07 21:32   ` Bjorn Helgaas
2021-01-07 20:25     ` Christian König

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=58F0BFBCD0%devspam@moreofthesa.me.uk \
    --to=devspam@moreofthesa.me.uk \
    --cc=bhelgaas@google.com \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=nirmoy.das@amd.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