Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1996838ybm; Thu, 23 May 2019 09:43:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzTTM610e9cEe7Ye4bRDwaoGSuLQfQMchzKGW54ZEHxLyNCOMAGAnsBipiuzVgyhff/Luz X-Received: by 2002:aa7:942f:: with SMTP id y15mr46744199pfo.121.1558629799027; Thu, 23 May 2019 09:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558629799; cv=none; d=google.com; s=arc-20160816; b=mxzHrz1D7B+7SNWbcRbCBQZaIgD+NYQofJaLBi8oowzhNtJj6DMV/ksTH3Zmet6orU FzH0lVktJyO3jXFIBO0qGAKvuURGxiij5amgMeChRjM7Yb9LdWw3cpr+S0BG9H7BMiUF KO1Jkp0gQtFg0tJEj+YZhOP1ssQuuusm2tG80gtiyP4/Jn7Nn2QkW6O2zeWHRUGxfEjR xHg6SPH91MiRZa/ZYf/JnAGh30blulJkVzbRoDk3mFr/7tI6BckqOJL2z/Wdq7f58h0l vIsCdl8vhhcKE6AIOgGCC4KIVJaj8hpS7tq2B55RCkL1A1ip+AF4+1xj0issQTqb7A9W fmdQ== 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=QxLlMcpZF4s6oYuMc8pgq9hIU3JxTkHMlIXFqr7xT6c=; b=N/tvIns9b0HcwAjeHWcXbO4RPAAwkTAR4BSuS0FRUzJTWq1ZT+1aDgfNextG95LPmx FbnaASCy1j8ff9uSdRVJ51cq3I5A/hZdlHQPcUxDDYoSHLGcUhTbW/JhIirrMddBeHkT AsW+Q+t277/d3OfMH7hag7uFlkdSS/yz5bgl7h0Z+hTTY1SojHxEYwCxHPFhOoiO6eEq JQfeobVrkqivxG6sAdBNGGhuoJXR+IfH1gdjU4Bm1/mVjPLGtJlb+Vd4I4POn/J+lAUR E49PJXlEvsbGl7yXGZm2nbQIjGCLfMH5/ddmPw7WVOmIjleqgadJXaM5ZFcJSsG8ZBT1 Yokg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=FVFxuVHQ; 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 m62si1364062pjb.1.2019.05.23.09.43.02; Thu, 23 May 2019 09:43:19 -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=FVFxuVHQ; 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 S1731106AbfEWQlx (ORCPT + 99 others); Thu, 23 May 2019 12:41:53 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34364 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730893AbfEWQlx (ORCPT ); Thu, 23 May 2019 12:41:53 -0400 Received: by mail-pl1-f195.google.com with SMTP id w7so2982273plz.1 for ; Thu, 23 May 2019 09:41:53 -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=QxLlMcpZF4s6oYuMc8pgq9hIU3JxTkHMlIXFqr7xT6c=; b=FVFxuVHQtP/UwFTrvUUdg8Mu0s5/ZUDGf2daY9CljgY4Zl/eofCrRMJ/MAnm6ezoIT rplSNc3PXLwYrNvnWuPWkQZ5arZ0V7jHonRDY6SAjRiwCNQvdK66+Qx80NtPSj+hwrxd +XksfxQqaFKOl0koZkqKitzGyEXCiDMNCw6xU= 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=QxLlMcpZF4s6oYuMc8pgq9hIU3JxTkHMlIXFqr7xT6c=; b=FerLrOA+Py5Rpa9r3ie/Z2ASwWWF0PFF354KXcCil06wY+JXSFm+tfRJToJ/SQD9kZ C2P8qj9ji+EzUSnLTN3Vgb6Hfis/yNn3Iit2GDEvjYNtQ+D02dTD7mTdeJ4UOiuF12HE qWF6x6bdC/pJt44i1DfR64f6mhlw14JbZv7MOwXiseSvUfhmYb9oupUFGN4cOLwLa0zw dUC+kNADAdhBw/z8q/Pa+bQ+454S7EPgdWkgcu7dH6TmhlSXTiKg8KEw1ny7zqEchKt7 kw6aCQBysGExy0r7I+9WopHg0dBenFfohbm+hFvhH17wHKsJBi4hW4EFzGAtoF6ae3fL hq5g== X-Gm-Message-State: APjAAAUnRndKg7w1O6LWImqJwI7+PceSoD+13ck5B6NmwyXP6Jkzj/GQ mwHJBAol0PoADvkueQC30LAl1A== X-Received: by 2002:a17:902:aa85:: with SMTP id d5mr98713790plr.245.1558629712674; Thu, 23 May 2019 09:41:52 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id g9sm27282487pgs.78.2019.05.23.09.41.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 09:41:51 -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> From: Scott Branden Message-ID: Date: Thu, 23 May 2019 09:41:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190523055212.GA22946@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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-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. > > And didn't you break this driver in patch 2/3? You can't fix it up > later here, you need to also resolve that in the 2nd patch. I thought the driver changes needs to be in a different patch. If required I can squash this driver change in with the request_firmware_into_buf change. But the 2nd patch won't work without the 1st patch either. So that would mean you now want all 3 patches for different subsystems squashed together? Please let me know how you would like the patch series submitted. > > thanks, > > greg k-h Regards,  Scott