Re: svn commit: r346687 - head/sys/compat/linuxkpi/common/src

2019-04-25 Thread Konstantin Belousov
On Thu, Apr 25, 2019 at 02:56:36PM -0400, Tycho Nightingale wrote:
> 
> 
> > On Apr 25, 2019, at 2:50 PM, John Baldwin  wrote:
> > 
> > On 4/25/19 11:43 AM, Konstantin Belousov wrote:
> >> On Thu, Apr 25, 2019 at 06:13:56PM +, Tycho Nightingale wrote:
> >>> Author: tychon
> >>> Date: Thu Apr 25 18:13:55 2019
> >>> New Revision: 346687
> >>> URL: https://svnweb.freebsd.org/changeset/base/346687
> >>> 
> >>> Log:
> >>>  LinuxKPI buildfix for ppc64 after r346645.
> >>> 
> >>>  Proposed by: hselasky
> >>>  Sponsored by:Dell EMC Isilon
> >>> 
> >>> Modified:
> >>>  head/sys/compat/linuxkpi/common/src/linux_pci.c
> >>> 
> >>> Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
> >>> ==
> >>> --- head/sys/compat/linuxkpi/common/src/linux_pci.c   Thu Apr 25 
> >>> 17:28:36 2019(r346686)
> >>> +++ head/sys/compat/linuxkpi/common/src/linux_pci.c   Thu Apr 25 
> >>> 18:13:55 2019(r346687)
> >>> @@ -137,9 +137,9 @@ linux_dma_tag_init(struct device *dev, u64 dma_mask)
> >>>   dma_mask,   /* lowaddr */
> >>>   BUS_SPACE_MAXADDR,  /* highaddr */
> >>>   NULL, NULL, /* filtfunc, filtfuncarg */
> >>> - BUS_SPACE_MAXADDR,  /* maxsize */
> >>> + BUS_SPACE_MAXSIZE,  /* maxsize */
> >>>   1,  /* nsegments */
> >>> - BUS_SPACE_MAXADDR,  /* maxsegsz */
> >>> + BUS_SPACE_MAXSIZE,  /* maxsegsz */
> >>>   0,  /* flags */
> >>>   NULL, NULL, /* lockfunc, lockfuncarg */
> >>>   >dmat);
> >> 
> >> It seems that amd64 BUS_SPACE_MAXSIZE is 4G, I do not know why.
> >> Either we should fix that, or the following fix is more appropriate.
> >> i386 and ppc both have PAE-like configs where maxaddr is 64bit but
> >> maxsize is 32bit.
> > 
> > I think we should fix amd64's maxsize.
> 
> That sounds reasonable.  Perhaps this was a conservative choice along with 
> the 4GB DMA boundary which I removed recently.
> 
> After some testing I can make this change.
Please do.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346687 - head/sys/compat/linuxkpi/common/src

2019-04-25 Thread Tycho Nightingale



> On Apr 25, 2019, at 2:50 PM, John Baldwin  wrote:
> 
> On 4/25/19 11:43 AM, Konstantin Belousov wrote:
>> On Thu, Apr 25, 2019 at 06:13:56PM +, Tycho Nightingale wrote:
>>> Author: tychon
>>> Date: Thu Apr 25 18:13:55 2019
>>> New Revision: 346687
>>> URL: https://svnweb.freebsd.org/changeset/base/346687
>>> 
>>> Log:
>>>  LinuxKPI buildfix for ppc64 after r346645.
>>> 
>>>  Proposed by:   hselasky
>>>  Sponsored by:  Dell EMC Isilon
>>> 
>>> Modified:
>>>  head/sys/compat/linuxkpi/common/src/linux_pci.c
>>> 
>>> Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
>>> ==
>>> --- head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Apr 25 17:28:36 
>>> 2019(r346686)
>>> +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Apr 25 18:13:55 
>>> 2019(r346687)
>>> @@ -137,9 +137,9 @@ linux_dma_tag_init(struct device *dev, u64 dma_mask)
>>> dma_mask,   /* lowaddr */
>>> BUS_SPACE_MAXADDR,  /* highaddr */
>>> NULL, NULL, /* filtfunc, filtfuncarg */
>>> -   BUS_SPACE_MAXADDR,  /* maxsize */
>>> +   BUS_SPACE_MAXSIZE,  /* maxsize */
>>> 1,  /* nsegments */
>>> -   BUS_SPACE_MAXADDR,  /* maxsegsz */
>>> +   BUS_SPACE_MAXSIZE,  /* maxsegsz */
>>> 0,  /* flags */
>>> NULL, NULL, /* lockfunc, lockfuncarg */
>>> >dmat);
>> 
>> It seems that amd64 BUS_SPACE_MAXSIZE is 4G, I do not know why.
>> Either we should fix that, or the following fix is more appropriate.
>> i386 and ppc both have PAE-like configs where maxaddr is 64bit but
>> maxsize is 32bit.
> 
> I think we should fix amd64's maxsize.

That sounds reasonable.  Perhaps this was a conservative choice along with the 
4GB DMA boundary which I removed recently.

After some testing I can make this change.

Tycho
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346687 - head/sys/compat/linuxkpi/common/src

2019-04-25 Thread John Baldwin
On 4/25/19 11:43 AM, Konstantin Belousov wrote:
> On Thu, Apr 25, 2019 at 06:13:56PM +, Tycho Nightingale wrote:
>> Author: tychon
>> Date: Thu Apr 25 18:13:55 2019
>> New Revision: 346687
>> URL: https://svnweb.freebsd.org/changeset/base/346687
>>
>> Log:
>>   LinuxKPI buildfix for ppc64 after r346645.
>>   
>>   Proposed by:   hselasky
>>   Sponsored by:  Dell EMC Isilon
>>
>> Modified:
>>   head/sys/compat/linuxkpi/common/src/linux_pci.c
>>
>> Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
>> ==
>> --- head/sys/compat/linuxkpi/common/src/linux_pci.c  Thu Apr 25 17:28:36 
>> 2019(r346686)
>> +++ head/sys/compat/linuxkpi/common/src/linux_pci.c  Thu Apr 25 18:13:55 
>> 2019(r346687)
>> @@ -137,9 +137,9 @@ linux_dma_tag_init(struct device *dev, u64 dma_mask)
>>  dma_mask,   /* lowaddr */
>>  BUS_SPACE_MAXADDR,  /* highaddr */
>>  NULL, NULL, /* filtfunc, filtfuncarg */
>> -BUS_SPACE_MAXADDR,  /* maxsize */
>> +BUS_SPACE_MAXSIZE,  /* maxsize */
>>  1,  /* nsegments */
>> -BUS_SPACE_MAXADDR,  /* maxsegsz */
>> +BUS_SPACE_MAXSIZE,  /* maxsegsz */
>>  0,  /* flags */
>>  NULL, NULL, /* lockfunc, lockfuncarg */
>>  >dmat);
> 
> It seems that amd64 BUS_SPACE_MAXSIZE is 4G, I do not know why.
> Either we should fix that, or the following fix is more appropriate.
> i386 and ppc both have PAE-like configs where maxaddr is 64bit but
> maxsize is 32bit.

I think we should fix amd64's maxsize.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346687 - head/sys/compat/linuxkpi/common/src

2019-04-25 Thread Konstantin Belousov
On Thu, Apr 25, 2019 at 06:13:56PM +, Tycho Nightingale wrote:
> Author: tychon
> Date: Thu Apr 25 18:13:55 2019
> New Revision: 346687
> URL: https://svnweb.freebsd.org/changeset/base/346687
> 
> Log:
>   LinuxKPI buildfix for ppc64 after r346645.
>   
>   Proposed by:hselasky
>   Sponsored by:   Dell EMC Isilon
> 
> Modified:
>   head/sys/compat/linuxkpi/common/src/linux_pci.c
> 
> Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
> ==
> --- head/sys/compat/linuxkpi/common/src/linux_pci.c   Thu Apr 25 17:28:36 
> 2019(r346686)
> +++ head/sys/compat/linuxkpi/common/src/linux_pci.c   Thu Apr 25 18:13:55 
> 2019(r346687)
> @@ -137,9 +137,9 @@ linux_dma_tag_init(struct device *dev, u64 dma_mask)
>   dma_mask,   /* lowaddr */
>   BUS_SPACE_MAXADDR,  /* highaddr */
>   NULL, NULL, /* filtfunc, filtfuncarg */
> - BUS_SPACE_MAXADDR,  /* maxsize */
> + BUS_SPACE_MAXSIZE,  /* maxsize */
>   1,  /* nsegments */
> - BUS_SPACE_MAXADDR,  /* maxsegsz */
> + BUS_SPACE_MAXSIZE,  /* maxsegsz */
>   0,  /* flags */
>   NULL, NULL, /* lockfunc, lockfuncarg */
>   >dmat);

It seems that amd64 BUS_SPACE_MAXSIZE is 4G, I do not know why.
Either we should fix that, or the following fix is more appropriate.
i386 and ppc both have PAE-like configs where maxaddr is 64bit but
maxsize is 32bit.

diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c 
b/sys/compat/linuxkpi/common/src/linux_pci.c
index 4e93827e2e9..ed0d5575b05 100644
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -137,9 +137,17 @@ linux_dma_tag_init(struct device *dev, u64 dma_mask)
dma_mask,   /* lowaddr */
BUS_SPACE_MAXADDR,  /* highaddr */
NULL, NULL, /* filtfunc, filtfuncarg */
+#if defined(__i386__) || defined(__powerpc__)
+   BUS_SPACE_MAXSIZE,
+#else
BUS_SPACE_MAXADDR,  /* maxsize */
+#endif
1,  /* nsegments */
+#if defined(__i386__) || defined(__powerpc__)
+   BUS_SPACE_MAXSIZE,
+#else
BUS_SPACE_MAXADDR,  /* maxsegsz */
+#endif
0,  /* flags */
NULL, NULL, /* lockfunc, lockfuncarg */
>dmat);


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346687 - head/sys/compat/linuxkpi/common/src

2019-04-25 Thread Tycho Nightingale
Author: tychon
Date: Thu Apr 25 18:13:55 2019
New Revision: 346687
URL: https://svnweb.freebsd.org/changeset/base/346687

Log:
  LinuxKPI buildfix for ppc64 after r346645.
  
  Proposed by:  hselasky
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/compat/linuxkpi/common/src/linux_pci.c

Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
==
--- head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Apr 25 17:28:36 
2019(r346686)
+++ head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Apr 25 18:13:55 
2019(r346687)
@@ -137,9 +137,9 @@ linux_dma_tag_init(struct device *dev, u64 dma_mask)
dma_mask,   /* lowaddr */
BUS_SPACE_MAXADDR,  /* highaddr */
NULL, NULL, /* filtfunc, filtfuncarg */
-   BUS_SPACE_MAXADDR,  /* maxsize */
+   BUS_SPACE_MAXSIZE,  /* maxsize */
1,  /* nsegments */
-   BUS_SPACE_MAXADDR,  /* maxsegsz */
+   BUS_SPACE_MAXSIZE,  /* maxsegsz */
0,  /* flags */
NULL, NULL, /* lockfunc, lockfuncarg */
>dmat);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"