diff mbox

pci: Fix assigned-addresses for 64bit nonprefetchable BAR

Message ID 20170428060424.18631-1-aik@ozlabs.ru
State Superseded
Headers show

Commit Message

Alexey Kardashevskiy April 28, 2017, 6:04 a.m. UTC
975b31f80aff "pci: Put non-prefetchable 64bit BARs into 32bit MMIO window"
moved 64bit non-prefetchable BARs into 32bit non-prefetchable window
of a bridge. However the resource would still be advertised as 64bit
in the "assigned-addresses" property so fix the resource type.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 slof/fs/pci-properties.fs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth April 28, 2017, 6:33 a.m. UTC | #1
On 28.04.2017 08:04, Alexey Kardashevskiy wrote:
> 975b31f80aff "pci: Put non-prefetchable 64bit BARs into 32bit MMIO window"
> moved 64bit non-prefetchable BARs into 32bit non-prefetchable window
> of a bridge. However the resource would still be advertised as 64bit
> in the "assigned-addresses" property so fix the resource type.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>  slof/fs/pci-properties.fs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
> index 8594e5d..d446473 100644
> --- a/slof/fs/pci-properties.fs
> +++ b/slof/fs/pci-properties.fs
> @@ -257,7 +257,7 @@
>                  >r dup rtas-config-l@           \ | save size and fetch lower 32 bits ( paddr plen baddr val.lo R: size)
>                  over 4 + rtas-config-l@         \ | fetch upper 32 bits               ( paddr plen baddr val.lo val.hi R: size)
>                  20 lshift + -10 and >r          \ | calc 64 bit value and save it     ( paddr plen baddr R: size val )
> -                83000000 or encode-int+         \ | Encode config addr                ( paddr plen R: size val )
> +                82000000 or encode-int+         \ | Encode config addr                ( paddr plen R: size val )
>                  r> encode-64+                   \ | Encode assigned addr              ( paddr plen R: size )
>                  r> encode-64+                   \ | Encode size                       ( paddr plen )
>          ELSE                                    \ ELSE
> 

I'd still prefer to have a comment in the source code here, too, but anyway:

Reviewed-by: Thomas Huth <thuth@redhat.com>
Alexey Kardashevskiy April 28, 2017, 6:34 a.m. UTC | #2
On 28/04/17 16:33, Thomas Huth wrote:
> On 28.04.2017 08:04, Alexey Kardashevskiy wrote:
>> 975b31f80aff "pci: Put non-prefetchable 64bit BARs into 32bit MMIO window"
>> moved 64bit non-prefetchable BARs into 32bit non-prefetchable window
>> of a bridge. However the resource would still be advertised as 64bit
>> in the "assigned-addresses" property so fix the resource type.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>> ---
>>  slof/fs/pci-properties.fs | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
>> index 8594e5d..d446473 100644
>> --- a/slof/fs/pci-properties.fs
>> +++ b/slof/fs/pci-properties.fs
>> @@ -257,7 +257,7 @@
>>                  >r dup rtas-config-l@           \ | save size and fetch lower 32 bits ( paddr plen baddr val.lo R: size)
>>                  over 4 + rtas-config-l@         \ | fetch upper 32 bits               ( paddr plen baddr val.lo val.hi R: size)
>>                  20 lshift + -10 and >r          \ | calc 64 bit value and save it     ( paddr plen baddr R: size val )
>> -                83000000 or encode-int+         \ | Encode config addr                ( paddr plen R: size val )
>> +                82000000 or encode-int+         \ | Encode config addr                ( paddr plen R: size val )
>>                  r> encode-64+                   \ | Encode assigned addr              ( paddr plen R: size )
>>                  r> encode-64+                   \ | Encode size                       ( paddr plen )
>>          ELSE                                    \ ELSE
>>
> 
> I'd still prefer to have a comment in the source code here, too, but anyway:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 

Propose the text and the place, I'll put it in.
diff mbox

Patch

diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
index 8594e5d..d446473 100644
--- a/slof/fs/pci-properties.fs
+++ b/slof/fs/pci-properties.fs
@@ -257,7 +257,7 @@ 
                 >r dup rtas-config-l@           \ | save size and fetch lower 32 bits ( paddr plen baddr val.lo R: size)
                 over 4 + rtas-config-l@         \ | fetch upper 32 bits               ( paddr plen baddr val.lo val.hi R: size)
                 20 lshift + -10 and >r          \ | calc 64 bit value and save it     ( paddr plen baddr R: size val )
-                83000000 or encode-int+         \ | Encode config addr                ( paddr plen R: size val )
+                82000000 or encode-int+         \ | Encode config addr                ( paddr plen R: size val )
                 r> encode-64+                   \ | Encode assigned addr              ( paddr plen R: size )
                 r> encode-64+                   \ | Encode size                       ( paddr plen )
         ELSE                                    \ ELSE