Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1169984lqp; Fri, 22 Mar 2024 07:31:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwHzuI6ZyjKvJ1Tzs4ED8DVnw6RfYuX9iGNmT7eef+AlmhUc0mIHmZjbmLY25Kfjkf35WW6QFlBn/Ma7n4r6b0kEl3aagjplRxijsarg== X-Google-Smtp-Source: AGHT+IEn7V4IopdKVsXibMr/yeRgmhwDok/GIDjg3jR3bU8BkEYdC4v8iXZczb/tKEGpJwlQ0niC X-Received: by 2002:a19:2d02:0:b0:513:da61:9b46 with SMTP id k2-20020a192d02000000b00513da619b46mr1634485lfj.53.1711117869744; Fri, 22 Mar 2024 07:31:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711117869; cv=pass; d=google.com; s=arc-20160816; b=cVm92POCZtYZlIEZ6PG1N5AUUt9a27WE3oHEQzo/fs1K3BQB5r0ZgFqxjGpWXdZ9Kr MOX88qZt7Nh5p1aqBWHq4i9Xzh3F6xhXepQranQVuzWSgV/MesiwCUCaV0d5BCjLW5O2 xfuCBqg53B7a3pxe0MR4UmrlDyeJTBfCLMGJMH0GDE31jyNN+QGyFoWRF/Y9QBadvf1K q22fIXPib4S1KXa/QME9di0MHZpnxchC+6sxXAbmEIWoSCNvg7elp4EeWcK6ilAyW0J1 9N/hn3ZZ3Qfk7tU0+QllUYREQ8GGvgJykaP+yI6RmrZjtuk/vggOcO6DmtQXQsLk6Nhg 3sUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vd6z0+OnqZW5QybR9tLuv3j4C1UuBACM6h5MLrHASbo=; fh=JKY6SwZ/UO5SnvZSw7Mmjay8pgc9RjTHFIsxURS91JM=; b=l575zLHFqTtILNfz4L4Ug2ioerOkt8imCI3Rz0zckp43tAfKTEajwc7DQKwyqxQqci Y6X6jHxCRR7SxvxyT1UemIoFc9QOXW8bcdCLJ40JWt1jgeYZPRRBjFmo2pTaylyClFL2 C1qk07PSKcYQufjtVNs9IBWFLuo8HfFOAM23fWqTOP4e0d971GNb4iJ+hYVn6PI4JCwt ygAXUOMS3k36Sh76z8PVEWFvdwlUNGmnarFbtJQ3+bz+5OZzISI4PT3F9WLOZY3OPJHH XNDIvzyHyxNIsdsA4TULBOoBvl/ozN3raTTy9/IQTjdb3wnqIZ71876q1K4mySIUKeeF ghgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F0ZEsdOm; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-111615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c3-20020a50f603000000b0056bc06874basi993452edn.355.2024.03.22.07.31.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 07:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F0ZEsdOm; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-111615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 165521F23807 for ; Fri, 22 Mar 2024 14:31:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3FD24AEFA; Fri, 22 Mar 2024 14:30:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="F0ZEsdOm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A431481D0; Fri, 22 Mar 2024 14:30:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711117842; cv=none; b=O74AiG/nNJSOJrd7ryfYhWz8V4o2He8QH9Ti31nfj+xbtIAu3pgCZbz1MNwxzNlgwTnRiG60Il9lkMp9j9d7Pfi+q6N0qTm0UwEhin8OAuY4eoVG3Hvakz53Vr32zsCMelI+DeA3ZHcrHn3znuQEhBQ/JOP2XLAoTTIB7DJ5lG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711117842; c=relaxed/simple; bh=T/jKj4/iW9yfrA6kGZOg1yFTxBhpOhojURXvqMGy8G8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Yo71IMW3fnY2ofuvFOM1MgauP/SHgZ9QAHpn7Oh9q6S+G1LXQxKPyFeKFe5qVLKiWw+4uMYpFVy489yjnXnbORU0P43s32cjgYRs/92B5WAIGbjEYtw07eUd9Xywgm8Wx7jHA4E2udRCRjadNvfyF4Wkong+EPboMhjjtk+ybTY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=F0ZEsdOm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DC57C43394; Fri, 22 Mar 2024 14:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711117840; bh=T/jKj4/iW9yfrA6kGZOg1yFTxBhpOhojURXvqMGy8G8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F0ZEsdOm1JYUMZqeYJCE3EC0AqqMsFWIxQlVCZSY7N3Sz+NIlaceCz/FL7RMbHsF1 K1hxFhrj1aFF5dzMmZawvCKTkGWNzYeCxdfDR4Pj5Ge18QboRFf7Oxum1G8M8uvleA 8eyNN8JcSOma2IRKCrnpd5ToWxjRUzMV0/7UlJpg= Date: Fri, 22 Mar 2024 15:30:37 +0100 From: Greg Kroah-Hartman To: Guenter Roeck Cc: Chris Leech , Nilesh Javali , Christoph Hellwig , John Meneghini , Lee Duncan , Mike Christie , Hannes Reinecke , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, GR-QLogic-Storage-Upstream@marvell.com, Simon Horman Subject: Re: [PATCH v6 1/4] uio: introduce UIO_MEM_DMA_COHERENT type Message-ID: <2024032203-dawn-crestless-4199@gregkh> References: <20240201233400.3394996-2-cleech@redhat.com> <20240205200137.138302-1-cleech@redhat.com> <4f606e50-865c-46f2-b89e-6c1dfe02f527@roeck-us.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f606e50-865c-46f2-b89e-6c1dfe02f527@roeck-us.net> On Fri, Mar 22, 2024 at 07:16:19AM -0700, Guenter Roeck wrote: > On Mon, Feb 05, 2024 at 12:01:37PM -0800, Chris Leech wrote: > > Add a UIO memtype specifically for sharing dma_alloc_coherent > > memory with userspace, backed by dma_mmap_coherent. > > > > This is mainly for the bnx2/bnx2x/bnx2i "cnic" interface, although there > > are a few other uio drivers which map dma_alloc_coherent memory and will > > be converted to use dma_mmap_coherent as well. > > > > Signed-off-by: Nilesh Javali > > Signed-off-by: Chris Leech > > --- > > Building i386:allyesconfig ... failed > -------------- > Error log: > drivers/uio/uio.c: In function 'uio_mmap_dma_coherent': > drivers/uio/uio.c:795:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > 795 | addr = (void *)mem->addr; > | ^ So on 32bit systems phys_addr_t != the same size as (void *)? How is that possible? We also are doing an explicit cast here, how does this not work? Ah, do you have CONFIG_X86_PAE enabled? That would cause that mess, ick. > cc1: all warnings being treated as errors > make[5]: [scripts/Makefile.build:244: drivers/uio/uio.o] Error 1 (ignored) > drivers/uio/uio_dmem_genirq.c: In function 'uio_dmem_genirq_open': > drivers/uio/uio_dmem_genirq.c:63:39: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > 63 | uiomem->addr = addr ? (phys_addr_t) addr : DMEM_MAP_ERROR; > | ^ > drivers/uio/uio_dmem_genirq.c: In function 'uio_dmem_genirq_release': > drivers/uio/uio_dmem_genirq.c:92:43: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > 92 | (void *) uiomem->addr, > | ^ > cc1: all warnings being treated as errors > make[5]: [scripts/Makefile.build:244: drivers/uio/uio_dmem_genirq.o] Error 1 (ignored) > drivers/uio/uio_pruss.c: In function 'pruss_probe': > drivers/uio/uio_pruss.c:194:34: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > 194 | p->mem[2].addr = (phys_addr_t) gdev->ddr_vaddr; > | ^ > cc1: all warnings being treated as errors > > Caused by this patch and "uio_dmem_genirq: UIO_MEM_DMA_COHERENT conversion" as well > as "uio_pruss: UIO_MEM_DMA_COHERENT conversion". > > I'd suggest to make uio dependent on 64 bit if 32 bit is no longer supported > to prevent waste of test builds resources. Perhaps disable it if PHYS_ADDR_T_64BIT is not enabled? Chris, can you make up a patch? Odd that this didn't show up in 0-day before this, does it not test 32bit builds anymore? thanks, greg k-h