linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Branden <scott.branden@broadcom.com>
To: Luis Chamberlain <mcgrof@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: David Brown <david.brown@linaro.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH 2/3] firmware: add offset to request_firmware_into_buf
Date: Thu, 1 Aug 2019 11:15:19 -0700	[thread overview]
Message-ID: <74be1aa7-0e10-51dc-bbbf-94bb5f4bf7c4@broadcom.com> (raw)
In-Reply-To: <20190801174215.GB16384@42.do-not-panic.com>

Hi Luis,

On 2019-08-01 10:42 a.m., Luis Chamberlain wrote:
> On Thu, Aug 01, 2019 at 08:18:01AM +0200, Greg Kroah-Hartman wrote:
>> On Wed, Jul 31, 2019 at 05:18:32PM -0700, Scott Branden wrote:
>>> Hi Greg,
>>>
>>> I am now back from leave to continue this patch.  Comment below.
>>>
>>> On 2019-05-23 10:22 p.m., Greg Kroah-Hartman wrote:
>>>> On Thu, May 23, 2019 at 10:01:38PM -0700, Scott Branden wrote:
>>>>> On 2019-05-23 9:54 a.m., Greg Kroah-Hartman wrote:
>>>>>> On Thu, May 23, 2019 at 09:36:02AM -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:12PM -0700, Scott Branden wrote:
>>>>>>>>> Add offset to request_firmware_into_buf to allow for portions
>>>>>>>>> of firmware file to be read into a buffer.  Necessary where firmware
>>>>>>>>> needs to be loaded in portions from file in memory constrained systems.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
>>>>>>>>> ---
>>>>>>>>>      drivers/base/firmware_loader/firmware.h |  5 +++
>>>>>>>>>      drivers/base/firmware_loader/main.c     | 49 +++++++++++++++++--------
>>>>>>>>>      include/linux/firmware.h                |  8 +++-
>>>>>>>>>      3 files changed, 45 insertions(+), 17 deletions(-)
>>>>>>>> No new firmware test for this new option?  How do we know it even works?
>>>>>>> I was unaware there are existing firmware tests.  Please let me know where
>>>>>>> these tests exists and I can add a test for this new option.
>>>>>> tools/testing/selftests/firmware/
>>>>> Unfortunately, there doesn't seem to be a test for the existing
>>>>> request_firmware_into_buf api.
>>>> Are you sure?  The test is for userspace functionality, there isn't
>>>> kernel unit tests here.  You need to verify that you didn't break
>>>> existing functionality as well as verify that your new functionality
>>>> works.
>>> I managed to figure out how to build and run
>>> tools/testing/selftest/firmware/fw_run_tests.sh
>>>
>>> and my changes don't break existing functionality.
> I'm soon going to release something that is going to let you do this
> faster and easier, let me know if you had troubles in trying to figure
> out how to not regress the kernel using this.

Yes, I had troubles in trying to figure it out.  The kernel build should

create an entire initrd with all the necessary components in it for 
testing purposes.

And the firmware test will now take me some time to figure out how it 
all works.

Could you please explain what you are going to release soon?  I don't 
want to waste

my time getting something working if everything is going to change on me 
right away?

>
>>> But, I find no use of request_firmware_into_buf in lib/test_firmware.c
>>> (triggered by fw_run_tests.sh).
>>>
>>> Is there another test for request_firmware_into_buf?
>> I have no idea, sorry.
> The folks who implemented request_firmware_into_buf() didn't add a
> respective test, because, well, this API went upstream IMO without much
> ACKs / review, and even no damn users. Now we have a user so we're stuck
> with it.

The request_firmware_into_buf is a necessity for me as well

(along with the need for a partial request of the file which I'm adding).

>
> So new testing calls for it would be appreciated. If you have questions
> I am happy to help.

If you're an expert on the firmware test and can quickly add a simple 
test of request_firmware_into_buf

it would be appreciated.  If not, I'm going to have to dig further into 
this and send early versions of

a test out which would be great for you to comment on.

>
>    Luis

Thanks,

Scott


  reply	other threads:[~2019-08-01 18:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  2:51 [PATCH 0/3] fs: add partial file read support Scott Branden
2019-05-23  2:51 ` [PATCH 1/3] fs: introduce kernel_pread_file* support Scott Branden
2019-05-23  2:51 ` [PATCH 2/3] firmware: add offset to request_firmware_into_buf Scott Branden
2019-05-23  5:52   ` Greg Kroah-Hartman
2019-05-23 16:36     ` Scott Branden
2019-05-23 16:54       ` Greg Kroah-Hartman
2019-05-24  5:01         ` Scott Branden
2019-05-24  5:22           ` Greg Kroah-Hartman
2019-08-01  0:18             ` Scott Branden
2019-08-01  6:18               ` Greg Kroah-Hartman
2019-08-01 17:42                 ` Luis Chamberlain
2019-08-01 18:15                   ` Scott Branden [this message]
2019-08-19 22:22                     ` Luis Chamberlain
2019-05-23  2:51 ` [PATCH 3/3] soc: qcom: mdt_loader: " Scott Branden
2019-05-23  5:52   ` Greg Kroah-Hartman
2019-05-23 16:41     ` Scott Branden
2019-05-23 16:56       ` Greg Kroah-Hartman
2019-05-27  5:36         ` Bjorn Andersson
2019-07-30 23:02           ` Scott Branden
2019-08-22 19:33         ` Scott Branden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74be1aa7-0e10-51dc-bbbf-94bb5f4bf7c4@broadcom.com \
    --to=scott.branden@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=david.brown@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=olof@lixom.net \
    --cc=rafael@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).