Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1245989 > unrolled thread
| Started by | Kevin Hilman <khilman@kernel.org> |
|---|---|
| First post | 2015-10-13 20:00 +0200 |
| Last post | 2015-10-13 23:30 +0200 |
| Articles | 13 — 5 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 7/8] PCI: iproc: Add outbound mapping support Kevin Hilman <khilman@kernel.org> - 2015-10-13 20:00 +0200
Re: [PATCH] PCI: iproc: fix 32-bit build error Hauke Mehrtens <hauke@hauke-m.de> - 2015-10-13 22:10 +0200
Re: [PATCH] PCI: iproc: fix 32-bit build error Ray Jui <rjui@broadcom.com> - 2015-10-13 22:20 +0200
Re: [PATCH] PCI: iproc: fix 32-bit build error Arnd Bergmann <arnd@arndb.de> - 2015-10-13 23:10 +0200
Re: [PATCH] PCI: iproc: fix 32-bit build error Bjorn Helgaas <helgaas@kernel.org> - 2015-10-15 18:10 +0200
Re: [PATCH] PCI: iproc: fix 32-bit build error Ray Jui <rjui@broadcom.com> - 2015-10-15 18:20 +0200
[PATCH v2] PCI: iproc: fix 32-bit build error Arnd Bergmann <arnd@arndb.de> - 2015-10-15 21:50 +0200
Re: [PATCH v2] PCI: iproc: fix 32-bit build error Hauke Mehrtens <hauke@hauke-m.de> - 2015-10-15 23:00 +0200
Re: [PATCH v2] PCI: iproc: fix 32-bit build error Bjorn Helgaas <helgaas@kernel.org> - 2015-10-15 23:10 +0200
Re: [PATCH v2] PCI: iproc: fix 32-bit build error Arnd Bergmann <arnd@arndb.de> - 2015-10-16 11:50 +0200
Re: [PATCH v2] PCI: iproc: fix 32-bit build error Bjorn Helgaas <helgaas@kernel.org> - 2015-10-16 15:30 +0200
[PATCH] PCI: iproc: fix 32-bit build error Arnd Bergmann <arnd@arndb.de> - 2015-10-13 22:10 +0200
Re: [PATCH] PCI: iproc: fix 32-bit build error Kevin Hilman <khilman@kernel.org> - 2015-10-13 23:30 +0200
| From | Kevin Hilman <khilman@kernel.org> |
|---|---|
| Date | 2015-10-13 20:00 +0200 |
| Subject | Re: [PATCH 7/8] PCI: iproc: Add outbound mapping support |
| Message-ID | <qjc1I-5sd-33@gated-at.bofh.it> |
On Tue, Sep 15, 2015 at 5:39 PM, Ray Jui <rjui@broadcom.com> wrote: > Certain iProc SoCs require the PCIe outbound mapping to be configured in > SW. This patch adds support for those chips > > Signed-off-by: Ray Jui <rjui@broadcom.com> kernelci.org bot found a new build failure in linux-next[1] and it was bisected down to this patch, which landed in linux-next in the form of 90e4032eeaf2 PCI: iproc: Add outbound mapping support. The build fails on arm[1] with multi_v7_defconfig and CONFIG_ARM_LPAE=y with: drivers/built-in.o: In function `iproc_pcie_setup': :(.text+0x6d874): undefined reference to `__aeabi_uldivmod' Kevin [1] http://storage.kernelci.org/next/next-20151013/arm-multi_v7_defconfig+CONFIG_ARM_LPAE=y/build.log -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Hauke Mehrtens <hauke@hauke-m.de> |
|---|---|
| Date | 2015-10-13 22:10 +0200 |
| Subject | Re: [PATCH] PCI: iproc: fix 32-bit build error |
| Message-ID | <qje3w-cv-31@gated-at.bofh.it> |
| In reply to | #1245989 |
On 10/13/2015 10:02 PM, Arnd Bergmann wrote:
> The iproc PCI driver tries to figure out whether the MMIO window has
> a valid size, but does this using a 64-bit modulo operation, which
> is not allowed on 32-bit kernels and leads to a link error:
>
> drivers/built-in.o: In function `iproc_pcie_setup':
> :(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
>
> This works around that error by using the div64_u64() function
> provided by the kernel. While this is an expensive operation,
> it is harmless because we only call it during the probing
> of the driver.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
>
> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
> index f3481ddff344..abcb4be2ee19 100644
> --- a/drivers/pci/host/pcie-iproc.c
> +++ b/drivers/pci/host/pcie-iproc.c
> @@ -235,12 +235,13 @@ static void iproc_pcie_enable(struct iproc_pcie *pcie)
> *
> * axi_addr -> iproc_pcie_address -> OARR -> OMAP -> pci_address
> */
> -static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
> +int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
Why are you removing the static here?
> u64 pci_addr, resource_size_t size)
> {
> struct iproc_pcie_ob *ob = &pcie->ob;
> unsigned i;
> u64 max_size = (u64)ob->window_size * MAX_NUM_OB_WINDOWS;
> + u64 remainder;
>
> if (size > max_size) {
> dev_err(pcie->dev,
> @@ -249,7 +250,8 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
> return -EINVAL;
> }
>
> - if (size % ob->window_size) {
> + div64_u64_rem(size, ob->window_size, &remainder);
> + if (remainder) {
> dev_err(pcie->dev,
> "res size %pap needs to be multiple of window size %pap\n",
> &size, &ob->window_size);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ray Jui <rjui@broadcom.com> |
|---|---|
| Date | 2015-10-13 22:20 +0200 |
| Subject | Re: [PATCH] PCI: iproc: fix 32-bit build error |
| Message-ID | <qjedc-o2-11@gated-at.bofh.it> |
| In reply to | #1246101 |
On 10/13/2015 1:06 PM, Hauke Mehrtens wrote:
> On 10/13/2015 10:02 PM, Arnd Bergmann wrote:
>> The iproc PCI driver tries to figure out whether the MMIO window has
>> a valid size, but does this using a 64-bit modulo operation, which
>> is not allowed on 32-bit kernels and leads to a link error:
>>
>> drivers/built-in.o: In function `iproc_pcie_setup':
>> :(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
>>
>> This works around that error by using the div64_u64() function
>> provided by the kernel. While this is an expensive operation,
>> it is harmless because we only call it during the probing
>> of the driver.
>>
Thanks, Arnd. Guess I did not see this issue when running on ARM32 based
platforms like Cygnus, because LAPE was not enabled by default for
multi_v7_defconfig. When LAPE is enabled, resource_size_t becomes 64-bit.
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
>>
>> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
>> index f3481ddff344..abcb4be2ee19 100644
>> --- a/drivers/pci/host/pcie-iproc.c
>> +++ b/drivers/pci/host/pcie-iproc.c
>> @@ -235,12 +235,13 @@ static void iproc_pcie_enable(struct iproc_pcie *pcie)
>> *
>> * axi_addr -> iproc_pcie_address -> OARR -> OMAP -> pci_address
>> */
>> -static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
>> +int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
>
> Why are you removing the static here?
>
Yeah we should keep this function as static. The rest of this change
looks good!
>> u64 pci_addr, resource_size_t size)
>> {
>> struct iproc_pcie_ob *ob = &pcie->ob;
>> unsigned i;
>> u64 max_size = (u64)ob->window_size * MAX_NUM_OB_WINDOWS;
>> + u64 remainder;
>>
>> if (size > max_size) {
>> dev_err(pcie->dev,
>> @@ -249,7 +250,8 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
>> return -EINVAL;
>> }
>>
>> - if (size % ob->window_size) {
>> + div64_u64_rem(size, ob->window_size, &remainder);
>> + if (remainder) {
>> dev_err(pcie->dev,
>> "res size %pap needs to be multiple of window size %pap\n",
>> &size, &ob->window_size);
>>
>
Thanks,
Ray
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-10-13 23:10 +0200 |
| Subject | Re: [PATCH] PCI: iproc: fix 32-bit build error |
| Message-ID | <qjeZA-1zx-3@gated-at.bofh.it> |
| In reply to | #1246110 |
On Tuesday 13 October 2015 13:11:34 Ray Jui wrote: > >> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c > >> index f3481ddff344..abcb4be2ee19 100644 > >> --- a/drivers/pci/host/pcie-iproc.c > >> +++ b/drivers/pci/host/pcie-iproc.c > >> @@ -235,12 +235,13 @@ static void iproc_pcie_enable(struct iproc_pcie *pcie) > >> * > >> * axi_addr -> iproc_pcie_address -> OARR -> OMAP -> pci_address > >> */ > >> -static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr, > >> +int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr, > > > > Why are you removing the static here? > > > > Yeah we should keep this function as static. The rest of this change > looks good! > Sorry, this accidentally ended up in the patch when I marked the function as global to track down how the division got called. I'll send a new version. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Date | 2015-10-15 18:10 +0200 |
| Subject | Re: [PATCH] PCI: iproc: fix 32-bit build error |
| Message-ID | <qjTgn-2Z7-41@gated-at.bofh.it> |
| In reply to | #1246142 |
On Tue, Oct 13, 2015 at 11:00:31PM +0200, Arnd Bergmann wrote: > On Tuesday 13 October 2015 13:11:34 Ray Jui wrote: > > >> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c > > >> index f3481ddff344..abcb4be2ee19 100644 > > >> --- a/drivers/pci/host/pcie-iproc.c > > >> +++ b/drivers/pci/host/pcie-iproc.c > > >> @@ -235,12 +235,13 @@ static void iproc_pcie_enable(struct iproc_pcie *pcie) > > >> * > > >> * axi_addr -> iproc_pcie_address -> OARR -> OMAP -> pci_address > > >> */ > > >> -static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr, > > >> +int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr, > > > > > > Why are you removing the static here? > > > > > > > Yeah we should keep this function as static. The rest of this change > > looks good! > > > > Sorry, this accidentally ended up in the patch when I marked the > function as global to track down how the division got called. > > I'll send a new version. Ping; I can easily fix up the static, but it'd be nice to have real acks from Ray and Hauke. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ray Jui <rjui@broadcom.com> |
|---|---|
| Date | 2015-10-15 18:20 +0200 |
| Subject | Re: [PATCH] PCI: iproc: fix 32-bit build error |
| Message-ID | <qjTq3-3aG-47@gated-at.bofh.it> |
| In reply to | #1247946 |
On 10/15/2015 9:00 AM, Bjorn Helgaas wrote: > On Tue, Oct 13, 2015 at 11:00:31PM +0200, Arnd Bergmann wrote: >> On Tuesday 13 October 2015 13:11:34 Ray Jui wrote: >>>>> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c >>>>> index f3481ddff344..abcb4be2ee19 100644 >>>>> --- a/drivers/pci/host/pcie-iproc.c >>>>> +++ b/drivers/pci/host/pcie-iproc.c >>>>> @@ -235,12 +235,13 @@ static void iproc_pcie_enable(struct iproc_pcie *pcie) >>>>> * >>>>> * axi_addr -> iproc_pcie_address -> OARR -> OMAP -> pci_address >>>>> */ >>>>> -static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr, >>>>> +int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr, >>>> >>>> Why are you removing the static here? >>>> >>> >>> Yeah we should keep this function as static. The rest of this change >>> looks good! >>> >> >> Sorry, this accidentally ended up in the patch when I marked the >> function as global to track down how the division got called. >> >> I'll send a new version. > > Ping; I can easily fix up the static, but it'd be nice to have real acks > from Ray and Hauke. > > Bjorn > The current patch looks good to me except that iproc_pcie_setup_ob should be kept static. With static added back: Acked-by: Ray Jui <rjui@broadcom.com> Thanks, Ray -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-10-15 21:50 +0200 |
| Subject | [PATCH v2] PCI: iproc: fix 32-bit build error |
| Message-ID | <qjWHg-7WB-21@gated-at.bofh.it> |
| In reply to | #1247963 |
The iproc PCI driver tries to figure out whether the MMIO window has
a valid size, but does this using a 64-bit modulo operation, which
is not allowed on 32-bit kernels and leads to a link error:
drivers/built-in.o: In function `iproc_pcie_setup':
:(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
This works around that error by using the div64_u64() function
provided by the kernel. While this is an expensive operation,
it is harmless because we only call it during the probing
of the driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ray Jui <rjui@broadcom.com>
Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
---
On Thursday 15 October 2015 09:19:27 Ray Jui wrote:
> On 10/15/2015 9:00 AM, Bjorn Helgaas wrote:
> >
> > Ping; I can easily fix up the static, but it'd be nice to have real acks
> > from Ray and Hauke.
Argh, I knew there was one patch from my build fixes that I needed to
redo, I just couldn't find it again. Thanks for the reminder.
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index f3481ddff344..9193951ae861 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -241,6 +241,7 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
struct iproc_pcie_ob *ob = &pcie->ob;
unsigned i;
u64 max_size = (u64)ob->window_size * MAX_NUM_OB_WINDOWS;
+ u64 remainder;
if (size > max_size) {
dev_err(pcie->dev,
@@ -249,7 +250,8 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
return -EINVAL;
}
- if (size % ob->window_size) {
+ div64_u64_rem(size, ob->window_size, &remainder);
+ if (remainder) {
dev_err(pcie->dev,
"res size %pap needs to be multiple of window size %pap\n",
&size, &ob->window_size);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Hauke Mehrtens <hauke@hauke-m.de> |
|---|---|
| Date | 2015-10-15 23:00 +0200 |
| Subject | Re: [PATCH v2] PCI: iproc: fix 32-bit build error |
| Message-ID | <qjXN0-1dR-3@gated-at.bofh.it> |
| In reply to | #1248112 |
On 10/15/2015 09:40 PM, Arnd Bergmann wrote:
> The iproc PCI driver tries to figure out whether the MMIO window has
> a valid size, but does this using a 64-bit modulo operation, which
> is not allowed on 32-bit kernels and leads to a link error:
>
> drivers/built-in.o: In function `iproc_pcie_setup':
> :(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
>
> This works around that error by using the div64_u64() function
> provided by the kernel. While this is an expensive operation,
> it is harmless because we only call it during the probing
> of the driver.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Ray Jui <rjui@broadcom.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
> Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
>
> ---
> On Thursday 15 October 2015 09:19:27 Ray Jui wrote:
>> On 10/15/2015 9:00 AM, Bjorn Helgaas wrote:
>>>
>>> Ping; I can easily fix up the static, but it'd be nice to have real acks
>>> from Ray and Hauke.
>
>
> Argh, I knew there was one patch from my build fixes that I needed to
> redo, I just couldn't find it again. Thanks for the reminder.
>
>
> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
> index f3481ddff344..9193951ae861 100644
> --- a/drivers/pci/host/pcie-iproc.c
> +++ b/drivers/pci/host/pcie-iproc.c
> @@ -241,6 +241,7 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
> struct iproc_pcie_ob *ob = &pcie->ob;
> unsigned i;
> u64 max_size = (u64)ob->window_size * MAX_NUM_OB_WINDOWS;
> + u64 remainder;
>
> if (size > max_size) {
> dev_err(pcie->dev,
> @@ -249,7 +250,8 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
> return -EINVAL;
> }
>
> - if (size % ob->window_size) {
> + div64_u64_rem(size, ob->window_size, &remainder);
> + if (remainder) {
> dev_err(pcie->dev,
> "res size %pap needs to be multiple of window size %pap\n",
> &size, &ob->window_size);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Date | 2015-10-15 23:10 +0200 |
| Subject | Re: [PATCH v2] PCI: iproc: fix 32-bit build error |
| Message-ID | <qjXWG-1Ez-17@gated-at.bofh.it> |
| In reply to | #1248112 |
On Thu, Oct 15, 2015 at 09:40:45PM +0200, Arnd Bergmann wrote:
> The iproc PCI driver tries to figure out whether the MMIO window has
> a valid size, but does this using a 64-bit modulo operation, which
> is not allowed on 32-bit kernels and leads to a link error:
>
> drivers/built-in.o: In function `iproc_pcie_setup':
> :(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
>
> This works around that error by using the div64_u64() function
> provided by the kernel. While this is an expensive operation,
> it is harmless because we only call it during the probing
> of the driver.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Ray Jui <rjui@broadcom.com>
> Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
This *looks* like it should be fixing 90e4032eeaf2 ("PCI: iproc: Add
outbound mapping support"), not 0ab99ca8eb6c.
90e4032eeaf2 added the "if (size % ob->window_size)".
Is this more subtle than that?
> ---
> On Thursday 15 October 2015 09:19:27 Ray Jui wrote:
> > On 10/15/2015 9:00 AM, Bjorn Helgaas wrote:
> > >
> > > Ping; I can easily fix up the static, but it'd be nice to have real acks
> > > from Ray and Hauke.
>
>
> Argh, I knew there was one patch from my build fixes that I needed to
> redo, I just couldn't find it again. Thanks for the reminder.
>
>
> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
> index f3481ddff344..9193951ae861 100644
> --- a/drivers/pci/host/pcie-iproc.c
> +++ b/drivers/pci/host/pcie-iproc.c
> @@ -241,6 +241,7 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
> struct iproc_pcie_ob *ob = &pcie->ob;
> unsigned i;
> u64 max_size = (u64)ob->window_size * MAX_NUM_OB_WINDOWS;
> + u64 remainder;
>
> if (size > max_size) {
> dev_err(pcie->dev,
> @@ -249,7 +250,8 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
> return -EINVAL;
> }
>
> - if (size % ob->window_size) {
> + div64_u64_rem(size, ob->window_size, &remainder);
> + if (remainder) {
> dev_err(pcie->dev,
> "res size %pap needs to be multiple of window size %pap\n",
> &size, &ob->window_size);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-10-16 11:50 +0200 |
| Subject | Re: [PATCH v2] PCI: iproc: fix 32-bit build error |
| Message-ID | <qk9O9-2oP-1@gated-at.bofh.it> |
| In reply to | #1248181 |
On Thursday 15 October 2015 16:01:13 Bjorn Helgaas wrote:
> On Thu, Oct 15, 2015 at 09:40:45PM +0200, Arnd Bergmann wrote:
> > The iproc PCI driver tries to figure out whether the MMIO window has
> > a valid size, but does this using a 64-bit modulo operation, which
> > is not allowed on 32-bit kernels and leads to a link error:
> >
> > drivers/built-in.o: In function `iproc_pcie_setup':
> > :(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
> >
> > This works around that error by using the div64_u64() function
> > provided by the kernel. While this is an expensive operation,
> > it is harmless because we only call it during the probing
> > of the driver.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Acked-by: Ray Jui <rjui@broadcom.com>
> > Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
>
> This *looks* like it should be fixing 90e4032eeaf2 ("PCI: iproc: Add
> outbound mapping support"), not 0ab99ca8eb6c.
>
> 90e4032eeaf2 added the "if (size % ob->window_size)".
>
> Is this more subtle than that?
>
>
You are absolutely right, I must have copy-pasted the wrong entry.
Do you want me to resend this? I guess you can just remove the
line as this commit has not appeared in any release anyway.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Date | 2015-10-16 15:30 +0200 |
| Subject | Re: [PATCH v2] PCI: iproc: fix 32-bit build error |
| Message-ID | <qkdf6-7zE-57@gated-at.bofh.it> |
| In reply to | #1248525 |
On Fri, Oct 16, 2015 at 11:47:42AM +0200, Arnd Bergmann wrote:
> On Thursday 15 October 2015 16:01:13 Bjorn Helgaas wrote:
> > On Thu, Oct 15, 2015 at 09:40:45PM +0200, Arnd Bergmann wrote:
> > > The iproc PCI driver tries to figure out whether the MMIO window has
> > > a valid size, but does this using a 64-bit modulo operation, which
> > > is not allowed on 32-bit kernels and leads to a link error:
> > >
> > > drivers/built-in.o: In function `iproc_pcie_setup':
> > > :(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
> > >
> > > This works around that error by using the div64_u64() function
> > > provided by the kernel. While this is an expensive operation,
> > > it is harmless because we only call it during the probing
> > > of the driver.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > Acked-by: Ray Jui <rjui@broadcom.com>
> > > Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
> >
> > This *looks* like it should be fixing 90e4032eeaf2 ("PCI: iproc: Add
> > outbound mapping support"), not 0ab99ca8eb6c.
> >
> > 90e4032eeaf2 added the "if (size % ob->window_size)".
> >
> > Is this more subtle than that?
>
> You are absolutely right, I must have copy-pasted the wrong entry.
> Do you want me to resend this? I guess you can just remove the
> line as this commit has not appeared in any release anyway.
I squashed this fix and Jon's %pap fix into Ray's original "Add outbound
mapping support" patch and re-did the merge. Thanks!
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-10-13 22:10 +0200 |
| Subject | [PATCH] PCI: iproc: fix 32-bit build error |
| Message-ID | <qje3w-cv-33@gated-at.bofh.it> |
| In reply to | #1245989 |
The iproc PCI driver tries to figure out whether the MMIO window has
a valid size, but does this using a 64-bit modulo operation, which
is not allowed on 32-bit kernels and leads to a link error:
drivers/built-in.o: In function `iproc_pcie_setup':
:(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
This works around that error by using the div64_u64() function
provided by the kernel. While this is an expensive operation,
it is harmless because we only call it during the probing
of the driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index f3481ddff344..abcb4be2ee19 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -235,12 +235,13 @@ static void iproc_pcie_enable(struct iproc_pcie *pcie)
*
* axi_addr -> iproc_pcie_address -> OARR -> OMAP -> pci_address
*/
-static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
+int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
u64 pci_addr, resource_size_t size)
{
struct iproc_pcie_ob *ob = &pcie->ob;
unsigned i;
u64 max_size = (u64)ob->window_size * MAX_NUM_OB_WINDOWS;
+ u64 remainder;
if (size > max_size) {
dev_err(pcie->dev,
@@ -249,7 +250,8 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
return -EINVAL;
}
- if (size % ob->window_size) {
+ div64_u64_rem(size, ob->window_size, &remainder);
+ if (remainder) {
dev_err(pcie->dev,
"res size %pap needs to be multiple of window size %pap\n",
&size, &ob->window_size);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kevin Hilman <khilman@kernel.org> |
|---|---|
| Date | 2015-10-13 23:30 +0200 |
| Subject | Re: [PATCH] PCI: iproc: fix 32-bit build error |
| Message-ID | <qjfiV-1XD-3@gated-at.bofh.it> |
| In reply to | #1246103 |
Arnd Bergmann <arnd@arndb.de> writes:
> The iproc PCI driver tries to figure out whether the MMIO window has
> a valid size, but does this using a 64-bit modulo operation, which
> is not allowed on 32-bit kernels and leads to a link error:
>
> drivers/built-in.o: In function `iproc_pcie_setup':
> :(.text+0x4b798): undefined reference to `__aeabi_uldivmod'
>
> This works around that error by using the div64_u64() function
> provided by the kernel. While this is an expensive operation,
> it is harmless because we only call it during the probing
> of the driver.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 0ab99ca8eb6c ("PCI: iproc: Fix compile warnings")
Tested-by: Kevin Hilman <khilman@linaro.org>
Verified that this fixes the build failure on arm multi_v7_defconfig +
CONFIG_ARM_LPAE=y on top of next-20151013.
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web