From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F34B6C4332F for ; Mon, 14 Nov 2022 09:05:34 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 313EB846; Mon, 14 Nov 2022 10:04:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 313EB846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1668416733; bh=06mnWo/4HV/wIaSI0daIO8J4kFFZajLRWGmHZEXZwkc=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WFIJVnXhx6MdYDVXZNtUq9cW+9cepceU+nZXIYCwUzXPuA65BVc+zp1IcqI9TFZ+H Vleug3q9yPmZTArhGgnh8hVcCU7fNHBRE8E4oNlBM+/VkBSOstYrBipb5FLAUsSLCr WUu6EjRAZuHqikLdz3JWES5eBdJGmDjVgMH0tlAc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D37CFF80245; Mon, 14 Nov 2022 10:04:42 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1662BF80431; Mon, 14 Nov 2022 10:04:41 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BFD86F800B6 for ; Mon, 14 Nov 2022 10:04:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BFD86F800B6 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="YE8YpyZ1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Llx/kP6o" Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 19B291FD67; Mon, 14 Nov 2022 09:04:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668416678; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qYeyMGzPpWeJjemOhgQTqv3gXdbN1HV6WuzeSdghX/w=; b=YE8YpyZ139VQeNK68TlYpnZ25AsIpwxeaayX1shw2BLDESgrmTvnKy7KsOLoovwmZBfSwj feMoKYc76x8HYSZ+pvUN+xmQZPf09XVjndfDwC301JINk5rEiybUHATWKeqGyjEEiBHLXG fJHUXRrpHHEd1U3ub5JGJMJKODHR4yM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668416678; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qYeyMGzPpWeJjemOhgQTqv3gXdbN1HV6WuzeSdghX/w=; b=Llx/kP6o5oi7w9LY9pE3+/vMOmMFKljhPvJvgNrLZwx0lxnO0V03LM2WxQjWChbMOB9Zo+ 9l/BHoMLUwQN+PBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C727613A8C; Mon, 14 Nov 2022 09:04:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CAa7L6UEcmPcMwAAMHmgww (envelope-from ); Mon, 14 Nov 2022 09:04:37 +0000 Date: Mon, 14 Nov 2022 10:04:37 +0100 Message-ID: <87leod52l6.wl-tiwai@suse.de> From: Takashi Iwai To: Christoph Hellwig Subject: Re: [PATCH 6/7] ALSA: memalloc: don't pass bogus GFP_ flags to dma_alloc_* In-Reply-To: <20221113163535.884299-7-hch@lst.de> References: <20221113163535.884299-1-hch@lst.de> <20221113163535.884299-7-hch@lst.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Cc: linux-s390@vger.kernel.org, alsa-devel@alsa-project.org, linux-media@vger.kernel.org, Alexandra Winter , Dennis Dalessandro , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Takashi Iwai , Wenjia Zhang , iommu@lists.linux.dev, Russell King , Mauro Carvalho Chehab , Robin Murphy , linux-arm-kernel@lists.infradead.org, Marek Szyprowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Sun, 13 Nov 2022 17:35:34 +0100, Christoph Hellwig wrote: > > dma_alloc_coherent/dma_alloc_wc is an opaque allocator that only uses > the GFP_ flags for allocation context control. Don't pass __GFP_COMP > which makes no sense for an allocation that can't in any way be > converted to a page pointer. The addition of __GFP_COMP there was really old, it was Hugh's commit f3d48f0373c1 at 2005: [PATCH] unpaged: fix sound Bad page states It mentions something about sparc32/64. I hope this isn't relevant any longer (honestly I have no idea about that). > Note that for dma_alloc_noncoherent and dma_alloc_noncontigous in > combination with the DMA mmap helpers __GFP_COMP looks sketchy as well, > so I would suggest to drop that as well after a careful audit. Yeah, that's a cargo-cult copy&paste from the old idiom. Should be killed altogether. Thanks! Takashi From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A34823A8 for ; Mon, 14 Nov 2022 09:04:45 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 19B291FD67; Mon, 14 Nov 2022 09:04:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668416678; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qYeyMGzPpWeJjemOhgQTqv3gXdbN1HV6WuzeSdghX/w=; b=YE8YpyZ139VQeNK68TlYpnZ25AsIpwxeaayX1shw2BLDESgrmTvnKy7KsOLoovwmZBfSwj feMoKYc76x8HYSZ+pvUN+xmQZPf09XVjndfDwC301JINk5rEiybUHATWKeqGyjEEiBHLXG fJHUXRrpHHEd1U3ub5JGJMJKODHR4yM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668416678; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qYeyMGzPpWeJjemOhgQTqv3gXdbN1HV6WuzeSdghX/w=; b=Llx/kP6o5oi7w9LY9pE3+/vMOmMFKljhPvJvgNrLZwx0lxnO0V03LM2WxQjWChbMOB9Zo+ 9l/BHoMLUwQN+PBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C727613A8C; Mon, 14 Nov 2022 09:04:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CAa7L6UEcmPcMwAAMHmgww (envelope-from ); Mon, 14 Nov 2022 09:04:37 +0000 Date: Mon, 14 Nov 2022 10:04:37 +0100 Message-ID: <87leod52l6.wl-tiwai@suse.de> From: Takashi Iwai To: Christoph Hellwig Cc: Dennis Dalessandro , Mauro Carvalho Chehab , Alexandra Winter , Wenjia Zhang , Marek Szyprowski , Jaroslav Kysela , Takashi Iwai , Russell King , Robin Murphy , linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-media@vger.kernel.org, netdev@vger.kernel.org, linux-s390@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 6/7] ALSA: memalloc: don't pass bogus GFP_ flags to dma_alloc_* In-Reply-To: <20221113163535.884299-7-hch@lst.de> References: <20221113163535.884299-1-hch@lst.de> <20221113163535.884299-7-hch@lst.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII On Sun, 13 Nov 2022 17:35:34 +0100, Christoph Hellwig wrote: > > dma_alloc_coherent/dma_alloc_wc is an opaque allocator that only uses > the GFP_ flags for allocation context control. Don't pass __GFP_COMP > which makes no sense for an allocation that can't in any way be > converted to a page pointer. The addition of __GFP_COMP there was really old, it was Hugh's commit f3d48f0373c1 at 2005: [PATCH] unpaged: fix sound Bad page states It mentions something about sparc32/64. I hope this isn't relevant any longer (honestly I have no idea about that). > Note that for dma_alloc_noncoherent and dma_alloc_noncontigous in > combination with the DMA mmap helpers __GFP_COMP looks sketchy as well, > so I would suggest to drop that as well after a careful audit. Yeah, that's a cargo-cult copy&paste from the old idiom. Should be killed altogether. Thanks! Takashi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6FEE3C4332F for ; Mon, 14 Nov 2022 09:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rlXsQ55O9nwpBbG8CnFI4W9Lg0MpRpD3JJYR+tIDIFo=; b=sd9cZ8WrdUKzCR Y55c5pG5PODIsEKkOycRyscfHnYRHVtCB3SbZZ/Jehr0P0uGjvKZk7VXv+dAh7ayukIXY5g275r6u 8bOUP/zbHvQ6tI6J/3ZRCQlcwfgt4miGvkUE6wu7GKHqYNIZtgFRt5JLZiMf/v2qb0/ilgNBAxyHa rO3UEw1IFgmaqxH13zZSv5f0jJTG5D+YktItihJNCMnbNi0FW4RbuZKOtT+kMt6vmT5zmRVb195US ioxLSuvZn2kDbNHQkI74EhJnHPOT9tQ7dxQ1rf0H2NuFxDajc1QWzkJ2Pbm5DVxcLmE38fqsjBz+5 ZQ9GX7bdf/4IWTuj40Zg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouVT4-00H5oT-V7; Mon, 14 Nov 2022 09:09:30 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouVOT-00H2XO-TW for linux-arm-kernel@lists.infradead.org; Mon, 14 Nov 2022 09:04:45 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 19B291FD67; Mon, 14 Nov 2022 09:04:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668416678; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qYeyMGzPpWeJjemOhgQTqv3gXdbN1HV6WuzeSdghX/w=; b=YE8YpyZ139VQeNK68TlYpnZ25AsIpwxeaayX1shw2BLDESgrmTvnKy7KsOLoovwmZBfSwj feMoKYc76x8HYSZ+pvUN+xmQZPf09XVjndfDwC301JINk5rEiybUHATWKeqGyjEEiBHLXG fJHUXRrpHHEd1U3ub5JGJMJKODHR4yM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668416678; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qYeyMGzPpWeJjemOhgQTqv3gXdbN1HV6WuzeSdghX/w=; b=Llx/kP6o5oi7w9LY9pE3+/vMOmMFKljhPvJvgNrLZwx0lxnO0V03LM2WxQjWChbMOB9Zo+ 9l/BHoMLUwQN+PBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C727613A8C; Mon, 14 Nov 2022 09:04:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CAa7L6UEcmPcMwAAMHmgww (envelope-from ); Mon, 14 Nov 2022 09:04:37 +0000 Date: Mon, 14 Nov 2022 10:04:37 +0100 Message-ID: <87leod52l6.wl-tiwai@suse.de> From: Takashi Iwai To: Christoph Hellwig Cc: Dennis Dalessandro , Mauro Carvalho Chehab , Alexandra Winter , Wenjia Zhang , Marek Szyprowski , Jaroslav Kysela , Takashi Iwai , Russell King , Robin Murphy , linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-media@vger.kernel.org, netdev@vger.kernel.org, linux-s390@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 6/7] ALSA: memalloc: don't pass bogus GFP_ flags to dma_alloc_* In-Reply-To: <20221113163535.884299-7-hch@lst.de> References: <20221113163535.884299-1-hch@lst.de> <20221113163535.884299-7-hch@lst.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221114_010442_132327_889FB53A X-CRM114-Status: GOOD ( 16.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, 13 Nov 2022 17:35:34 +0100, Christoph Hellwig wrote: > > dma_alloc_coherent/dma_alloc_wc is an opaque allocator that only uses > the GFP_ flags for allocation context control. Don't pass __GFP_COMP > which makes no sense for an allocation that can't in any way be > converted to a page pointer. The addition of __GFP_COMP there was really old, it was Hugh's commit f3d48f0373c1 at 2005: [PATCH] unpaged: fix sound Bad page states It mentions something about sparc32/64. I hope this isn't relevant any longer (honestly I have no idea about that). > Note that for dma_alloc_noncoherent and dma_alloc_noncontigous in > combination with the DMA mmap helpers __GFP_COMP looks sketchy as well, > so I would suggest to drop that as well after a careful audit. Yeah, that's a cargo-cult copy&paste from the old idiom. Should be killed altogether. Thanks! Takashi _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel