Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4691449pxb; Tue, 28 Sep 2021 01:40:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZhS12GMGX2bdPmhH8t8MyMTfFBrXoKm6ZGeJJu41yasfPztL/wTlyit5+L6qR05qFhK1F X-Received: by 2002:a63:8f06:: with SMTP id n6mr3568760pgd.315.1632818414152; Tue, 28 Sep 2021 01:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632818414; cv=none; d=google.com; s=arc-20160816; b=FTWQTwUxtu/uFuD7gHpauew0SOGyTzSGoXpvPZuz+GcGUXWwPhVP6XhVitQSOPtcdT Ao68H8IgMRHZ/Bhbeb295D2Y9cLXOO3mUXEMftHpWBA/D1lgkSKru6p3T7568tMUrn9a 4vrDqfmQCqNXRvinpBdBir6wtKjRWomIuegVj/H43pLNn4kPWDTSR3UFWDw0qhWI0Gpc uLvRBEXJ62jCA8ofm3Fd4jHV9Vf47QodN/41kfdb4D4EdUg33LyVWwkWlfDWrgyhTj+z 7ACDM2F7sLpjw6nbsREPM5MF5rpMCJ04TWUnRM7CpVFqXamjRPC0FeiPIeU8ERgQV4rO bxEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Tzu7elGoNaBNjee+AV0ifcC4uwWI2JCqfK7TO28Gasg=; b=as7FNHo/nvR4lXMObe98ALm6P0CFzQxAy/dP6Zjr+2NjNoJtuIlIX+xNGRGZkgTo+m 6SD0ScdXMnSOcF5Ev4REVseqQHZYPIvNvVH+hfa96+S4DondRGn3nRecuDeOmqHZZDyo 9lyASzzmk6f7DVId+/tIznFBRuyS8mCAghvu1oGeSQrTARafTQne0121ukLDWWTMeI7L 7AwML+MeeEQ+BA6m89e7Ke+39GD99xUcAnwZKM6XjVEQFg/DZFFEzfezyQ8YLBK6BitU 3mQjELhss+6aRIDLewFfgeLaUn62SwLhEBzQCpDxHrFnoEp3YkvJfvcJat/goHb4db/i QQ2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=lBCmV+ah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si2367392pjm.149.2021.09.28.01.40.01; Tue, 28 Sep 2021 01:40:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=lBCmV+ah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239623AbhI1Ikm (ORCPT + 99 others); Tue, 28 Sep 2021 04:40:42 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:27100 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239613AbhI1Ikl (ORCPT ); Tue, 28 Sep 2021 04:40:41 -0400 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18S89qAL024637; Tue, 28 Sep 2021 03:37:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=Tzu7elGoNaBNjee+AV0ifcC4uwWI2JCqfK7TO28Gasg=; b=lBCmV+ah1AyjbfLtI2t+/MKUKpmqnRq81Um0b2egoJam4zU328+bmSS4VVgs186EWFo5 OpppvTOPhS2MUgxhUTFgcvOOcuul02q2UlREzt49Mb1f7ZJdELzkqcKEuFovFhEsJ/Jx q5oG+iQYpD836vXcSti6C+o6GZix8IIJMgc19RprWz469QhSXdSBWCis5dkWESxxCnwf 6u4Y5Wk3cDfiUCgcDEAibdnKC3j5HxrK/uJvH5y4vB1srXxrJRPVNY5P51Y+sLxXuF6r uUct1UnlccyTb17qKNIeklfq2uoVXmX5o/9dyE+HM35JSGCdoHdMU7E9/rz2cN9Vl/2u Vg== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 3bbgmygvpw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 28 Sep 2021 03:37:54 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 28 Sep 2021 09:37:52 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2242.12 via Frontend Transport; Tue, 28 Sep 2021 09:37:52 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id E3093B12; Tue, 28 Sep 2021 08:37:51 +0000 (UTC) Date: Tue, 28 Sep 2021 08:37:51 +0000 From: Charles Keepax To: Arnd Bergmann CC: Bjorn Andersson , Arnd Bergmann , Mark Brown , Liam Girdwood , Simon Trimmer , Michael Ellerman , Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Paul Walmsley , Palmer Dabbelt , Albert Ou , Thomas Gleixner , Ingo Molnar , Borislav Petkov , , "H. Peter Anvin" , Geert Uytterhoeven , Linus Walleij , Andrew Morton , Greg Kroah-Hartman , , , , , , Subject: Re: [PATCH 1/2] firmware: include drivers/firmware/Kconfig unconditionally Message-ID: <20210928083751.GG9223@ediswmail.ad.cirrus.com> References: <20210928075216.4193128-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20210928075216.4193128-1-arnd@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: BHnwWGNClqfICLow0fhaNk0GyjMOD9SM X-Proofpoint-GUID: BHnwWGNClqfICLow0fhaNk0GyjMOD9SM X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 28, 2021 at 09:50:26AM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > Compile-testing drivers that require access to a firmware layer > fails when that firmware symbol is unavailable. This happened > twice this week: > > - My proposed to change to rework the QCOM_SCM firmware symbol > broke on ppc64 and others. > > - The cs_dsp firmware patch added device specific firmware loader > into drivers/firmware, which broke on the same set of > architectures. > > We should probably do the same thing for other subsystems as well, > but fix this one first as this is a dependency for other patches > getting merged. > > Not sure how we'd want to merge this patch, if two other things > need it. I'd prefer to merge it along with the QCOM_SCM change > through the soc tree, but that leaves the cirrus firmware broken > unless we also merge it the same way (rather than through ASoC > as it is now). > > Alternatively, we can try to find a different home for the Cirrus > firmware to decouple the two problems. I'd argue that it's actually > misplaced here, as drivers/firmware is meant for kernel code that > interfaces with system firmware, not for device drivers to load > their own firmware blobs from user space. Thanks for looking at this for us. I don't think we are greatly attached to drivers/firmware as a location. Essentially, what we have is some firmware parsing code that needs to be shared across several devices, previously this was just in the sound subsystem as all our parts were audio. We are going to shortly be upstreaming some non-audio parts that use the same firmware infrastructure and it didn't seem very sensible to have them including bits of the audio subsystem. I guess the question might be where else would said code go? drivers/firmware seemed most obvious, all the other locations I can think of don't really make sense. Can't really put it a bus like spi/i2c etc. because we have parts on many buses. Can't really put it in a functional subsystem (audio/input etc.) since the whole idea was to try and get some independence from that so we don't have parts including subsystems they don't use. Could maybe put it in MFD, but no hard guarantee every part using it will be an MFD device and I am fairly confident Lee will feel it isn't MFD code as it doesn't relate to managing multiple devices. Only other option I can think of would be to make some sort of drivers/dsp or maybe drivers/cs_dsp, but not clear to me that is obviously better than using drivers/firmware. Thanks, Charles