Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp605206ybl; Fri, 23 Aug 2019 05:51:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYsBGfaBsP7VWq7yk5unKhT0UuhBqDgwZCDbAtPMPd86jXvDRH7C3wYrzZiR4734Aw5coX X-Received: by 2002:a17:90a:b292:: with SMTP id c18mr586919pjr.1.1566564685922; Fri, 23 Aug 2019 05:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566564685; cv=none; d=google.com; s=arc-20160816; b=hIZaw+4KVsoVDPI3z9JZnV9Wf72NvVqMi75MP+Etz90eQzZ7Tf3TMULnTU5pNY+xbG mS3qoDd24a47eCpqWHxuBFRmWLLAO5GJXh++w4UfusiKzwMDr6ofcd2UgO3NTL3wXHab B8pn2V6amKlJAYFRhBASpZbvM3B2CTJKrugRi6yNlcSAMmL1NW6DalX8X/9eOkIdvQaw 3f/5wNZVuANnFLrNxJGJaFKyDQwFW7T/eyDY3mifVvVQPQ+zk2tu3kdYpiBWm9qlUcHs coZdcUkCOrMHz05oEZ5Fi9H8TLgxMPZwdLf1HKjwYHy5+aHV/LUpbdnfUXvxcvp7h6xf uyrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Kxz8pVF8gu53BVgVWU7hUlZxdFRU3sKUz9YMeEmEGGo=; b=jitJ4+qYhq1L+NCF78wjEPzDZbr6NszBWh6aVKlvCZyCCBsI2klhXCRiGG8poTKtul K1qR7L0i8sOpMNgiz08roe9+iWL141n6M9Z8NJGHtWbOhYAmg2quv2FXlKCMuz9z4tIB IM3qDlfX5Q2UhbEyFcLZq5h/nocTAgZFURBsIx3VnCZTHRN8AFVeQLW8Xhdj/GCpbLGC 08EZ1ljfUU0foo5woSpb/KkrpxmARgPQuKZAvIY9NWrj+Cp4gykyAhFFwmv1PbsryvH3 /UHHT2jigA04shZ8tQ+jDXjXK5S0tDD5d1NdyVGjHZGNhQcJMJfhUPEJSRaWvq5cxZ9q PzLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=X5tSxEVI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si2465272pls.10.2019.08.23.05.51.11; Fri, 23 Aug 2019 05:51:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=X5tSxEVI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403981AbfHVTdO (ORCPT + 99 others); Thu, 22 Aug 2019 15:33:14 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36906 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391893AbfHVTdM (ORCPT ); Thu, 22 Aug 2019 15:33:12 -0400 Received: by mail-pf1-f193.google.com with SMTP id y9so4260599pfl.4 for ; Thu, 22 Aug 2019 12:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Kxz8pVF8gu53BVgVWU7hUlZxdFRU3sKUz9YMeEmEGGo=; b=X5tSxEVI7ukEorlWcO4kGGG81nwWerw3aBzMRrKLdaQbUCef4vcl5SUGE+qxmCRd70 IpO8xy44ce+zENMbDowj9r6RsW5hg5Nn85pyoxqRuhXpYfBvRh5YbBUDtBE3PNyDYhBI zeTzJKiiOkMfEykSPew3FMtBD2vATJosslK18= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Kxz8pVF8gu53BVgVWU7hUlZxdFRU3sKUz9YMeEmEGGo=; b=HO0+AVxgYpoV9IpBHEd4fIu7sapDSmQHUZulSF+n2ayrkHA/OkT+Uo0fXAg8FmXaKz 3Zs+Ilf3D0lhBGdHUFmlrPITBwVsfclqLmWIwi1cKqwGjgcKcp7pjP8nSFA6Jxej9xRL kScPGmQrj7YhxOmuLDQY5vUy5lnWWfdNBtEHIGDyAxASAtRAxTNcW5pxemvJOB+Kgk7Z IwT+WouBBX5uquUjt7tciLayLtI2pZUkGXq3T1Dycw5T183iwelCmIf2hrT9tD0+B49u zutpz7GFD19g9zkHgsyCy9FcW5xSeM5JA1Q9eOBlhWVJ4jlJBrhiK6hmtLDv+4Nrnv5R biQg== X-Gm-Message-State: APjAAAVOZHNEJ+Mw79FTYVT7sNhkZbAuP5ytg2kDyuPanUN4IpxjW5Yo JXWxQEmgB/MC4st7bHJLREDVAA== X-Received: by 2002:a17:90a:9b08:: with SMTP id f8mr1330067pjp.103.1566502391469; Thu, 22 Aug 2019 12:33:11 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id p10sm193711pff.132.2019.08.22.12.33.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Aug 2019 12:33:10 -0700 (PDT) Subject: Re: [PATCH 3/3] soc: qcom: mdt_loader: add offset to request_firmware_into_buf To: Greg Kroah-Hartman Cc: Luis Chamberlain , Andy Gross , David Brown , Alexander Viro , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson References: <20190523025113.4605-1-scott.branden@broadcom.com> <20190523025113.4605-4-scott.branden@broadcom.com> <20190523055212.GA22946@kroah.com> <20190523165605.GB21048@kroah.com> From: Scott Branden Message-ID: <9727af14-e368-97f8-7b98-36278fbef9de@broadcom.com> Date: Thu, 22 Aug 2019 12:33:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190523165605.GB21048@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On 2019-05-23 9:56 a.m., Greg Kroah-Hartman wrote: > On Thu, May 23, 2019 at 09:41:49AM -0700, Scott Branden wrote: >> Hi Greg, >> >> On 2019-05-22 10:52 p.m., Greg Kroah-Hartman wrote: >>> On Wed, May 22, 2019 at 07:51:13PM -0700, Scott Branden wrote: >>>> Adjust request_firmware_into_buf API to allow for portions >>>> of firmware file to be read into a buffer. mdt_loader still >>>> retricts request fo whole file read into buffer. >>>> >>>> Signed-off-by: Scott Branden >>>> --- >>>> drivers/soc/qcom/mdt_loader.c | 7 +++++-- >>>> 1 file changed, 5 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/drivers/soc/qcom/mdt_loader.c b/drivers/soc/qcom/mdt_loader.c >>>> index 1c488024c698..ad20d159699c 100644 >>>> --- a/drivers/soc/qcom/mdt_loader.c >>>> +++ b/drivers/soc/qcom/mdt_loader.c >>>> @@ -172,8 +172,11 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw, >>>> if (phdr->p_filesz) { >>>> sprintf(fw_name + fw_name_len - 3, "b%02d", i); >>>> - ret = request_firmware_into_buf(&seg_fw, fw_name, dev, >>>> - ptr, phdr->p_filesz); >>>> + ret = request_firmware_into_buf >>>> + (&seg_fw, fw_name, dev, >>>> + ptr, phdr->p_filesz, >>>> + 0, >>>> + KERNEL_PREAD_FLAG_WHOLE); >>> So, all that work in the first 2 patches for no real change at all? Why >>> are these changes even needed? >> The first two patches allow partial read of files into memory. >> >> Existing kernel drivers haven't need such functionality so, yes, there >> should be no real change >> >> with first two patches other than adding such partial file read support. >> >> We have a new driver in development which needs partial read of files >> supported in the kernel. > As I said before, I can not take new apis without any in-kernel user. > So let's wait for your new code that thinks it needs this, and then we > will be glad to evaluate all of this at that point in time. I have submitted all the necessary patches you requested here. These include first adding tests for existing API that never had a kernel selftest: https://lkml.org/lkml/2019/8/22/1367 Followed by API enhancement, tests updated, and a new driver requiring enhanced API: https://lkml.org/lkml/2019/8/22/1404 > > To do so otherwise is to have loads of unused "features" aquiring cruft > in the kernel source, and you do not want that. > > thanks, > > greg k-h Thanks, Scott