diff mbox

[U-Boot,02/15] pci: Indicate prefetchable memory allocate when debugging

Message ID 1438033652-30435-3-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass July 27, 2015, 9:47 p.m. UTC
At present the PCI output displays 'Mem' when it allocates memory for a PCI
device, whether it is prefetchable or not. There is a distinction since the
memory comes from separate pools. Use 'Prf' instead of 'Mem' when allocating
prefetchable memory.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/pci/pci_auto.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Bin Meng July 28, 2015, 7:47 a.m. UTC | #1
On Tue, Jul 28, 2015 at 5:47 AM, Simon Glass <sjg@chromium.org> wrote:
> At present the PCI output displays 'Mem' when it allocates memory for a PCI
> device, whether it is prefetchable or not. There is a distinction since the
> memory comes from separate pools. Use 'Prf' instead of 'Mem' when allocating
> prefetchable memory.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  drivers/pci/pci_auto.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
> index 51d2ac0..41d5447 100644
> --- a/drivers/pci/pci_auto.c
> +++ b/drivers/pci/pci_auto.c
> @@ -148,8 +148,9 @@ void pciauto_setup_device(struct pci_controller *hose,
>                                 bar_res = mem;
>  #endif
>
> -                       debug("PCI Autoconfig: BAR %d, Mem, size=0x%llx, ",
> -                             bar_nr, (unsigned long long)bar_size);
> +                       debug("PCI Autoconfig: BAR %d, %s, size=0x%llx, ",
> +                             bar_nr, bar_res == prefetch ? "Prf" : "Mem",
> +                             (unsigned long long)bar_size);
>                 }
>
>  #ifndef CONFIG_PCI_ENUM_ONLY
> --

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass Aug. 2, 2015, 11:37 p.m. UTC | #2
On 28 July 2015 at 01:47, Bin Meng <bmeng.cn@gmail.com> wrote:
> On Tue, Jul 28, 2015 at 5:47 AM, Simon Glass <sjg@chromium.org> wrote:
>> At present the PCI output displays 'Mem' when it allocates memory for a PCI
>> device, whether it is prefetchable or not. There is a distinction since the
>> memory comes from separate pools. Use 'Prf' instead of 'Mem' when allocating
>> prefetchable memory.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>>  drivers/pci/pci_auto.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
>> index 51d2ac0..41d5447 100644
>> --- a/drivers/pci/pci_auto.c
>> +++ b/drivers/pci/pci_auto.c
>> @@ -148,8 +148,9 @@ void pciauto_setup_device(struct pci_controller *hose,
>>                                 bar_res = mem;
>>  #endif
>>
>> -                       debug("PCI Autoconfig: BAR %d, Mem, size=0x%llx, ",
>> -                             bar_nr, (unsigned long long)bar_size);
>> +                       debug("PCI Autoconfig: BAR %d, %s, size=0x%llx, ",
>> +                             bar_nr, bar_res == prefetch ? "Prf" : "Mem",
>> +                             (unsigned long long)bar_size);
>>                 }
>>
>>  #ifndef CONFIG_PCI_ENUM_ONLY
>> --
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot-x86.
diff mbox

Patch

diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
index 51d2ac0..41d5447 100644
--- a/drivers/pci/pci_auto.c
+++ b/drivers/pci/pci_auto.c
@@ -148,8 +148,9 @@  void pciauto_setup_device(struct pci_controller *hose,
 				bar_res = mem;
 #endif
 
-			debug("PCI Autoconfig: BAR %d, Mem, size=0x%llx, ",
-			      bar_nr, (unsigned long long)bar_size);
+			debug("PCI Autoconfig: BAR %d, %s, size=0x%llx, ",
+			      bar_nr, bar_res == prefetch ? "Prf" : "Mem",
+			      (unsigned long long)bar_size);
 		}
 
 #ifndef CONFIG_PCI_ENUM_ONLY