[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2uxL3qGtDOuCg2Np4k_MtYML2VgOj4HVvOZXEFAEEuvg@mail.gmail.com>
Date: Wed, 27 Oct 2021 12:38:05 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Li Yang <leoyang.li@....com>, Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>,
USB list <linux-usb@...r.kernel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: gadget: Mark USB_FSL_QE broken on 64-bit
On Wed, Oct 27, 2021 at 10:08 AM Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
>
> On 64-bit:
>
> drivers/usb/gadget/udc/fsl_qe_udc.c: In function ‘qe_ep0_rx’:
> drivers/usb/gadget/udc/fsl_qe_udc.c:842:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> 842 | vaddr = (u32)phys_to_virt(in_be32(&bd->buf));
> | ^
> In file included from drivers/usb/gadget/udc/fsl_qe_udc.c:41:
> drivers/usb/gadget/udc/fsl_qe_udc.c:843:28: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> 843 | frame_set_data(pframe, (u8 *)vaddr);
> | ^
>
> The driver assumes physical and virtual addresses are 32-bit, hence it
> cannot work on 64-bit platforms.
>
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
Interesting, I have not seen this one in randconfig builds.
It looks like the driver also assumes that physical addresses are the same as
bus addresses, so maybe it should also be marked broken when CONFIG_IOMMU
is enabled? Maybe that takes it too far, as this driver could still be used
on a machine without IOMMU in a kernel that supports IOMMUs on
other machines.
Arnd
Powered by blists - more mailing lists