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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E90A4C4332F for ; Mon, 14 Nov 2022 09:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236868AbiKNJGN (ORCPT ); Mon, 14 Nov 2022 04:06:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236913AbiKNJFw (ORCPT ); Mon, 14 Nov 2022 04:05:52 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 808F51D66F; Mon, 14 Nov 2022 01:04:39 -0800 (PST) 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") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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