linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <stephen.boyd@linaro.org>
To: linux-kernel@vger.kernel.org
Cc: linux-arm@lists.infradead.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Laura Abbott <labbott@redhat.com>, Arnd Bergmann <arnd@arndb.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mark Brown <broonie@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>
Subject: [RFC/PATCH 0/4] request_firmware() on memory constrained devices
Date: Tue,  8 Mar 2016 16:22:15 +0700	[thread overview]
Message-ID: <1457428939-26659-1-git-send-email-stephen.boyd@linaro.org> (raw)

Some systems are memory constrained but they need to load very
large firmwares. The firmware subsystem allows drivers to request
this firmware be loaded from the filesystem, but this requires
that the entire firmware be loaded into kernel memory first
before it's provided to the driver. This can lead to a situation
where we map the firmware twice, once to load the firmware into
kernel memory and once to copy the firmware into the final
resting place.

This design creates needless memory pressure and delays loading
because we have to copy from kernel memory to somewhere else.
This patch sets adds support to the request firmware and DMA APIs
to map DMA buffers a page at a time and load the firmware directly
into those pages, skipping the intermediate copying step and
alleviating memory pressure during firmware loading. The drawback
is that we can't use the firmware caching feature because the
memory for the firmware cache is never allocated.

Patches based on v4.5-rc1.

Laura Abbott (1):
  dma-mapping: Add dma_remap() APIs

Stephen Boyd (2):
  ARM64: dma: Add support for NO_KERNEL_MAPPING attribute
  firmware: Support requesting firmware directly into DMA memory

Vikram Mulukutla (1):
  firmware_class: Provide infrastructure to make fw caching optional

 arch/arm64/mm/dma-mapping.c   |  78 +++++++++++--
 drivers/base/firmware_class.c | 263 ++++++++++++++++++++++++++++++++----------
 include/linux/dma-mapping.h   |  35 ++++++
 include/linux/firmware.h      |  13 +++
 4 files changed, 316 insertions(+), 73 deletions(-)

-- 
2.7.0.25.gfc10eb5

             reply	other threads:[~2016-03-08  9:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08  9:22 Stephen Boyd [this message]
2016-03-08  9:22 ` [PATCH 1/4] ARM64: dma: Add support for NO_KERNEL_MAPPING attribute Stephen Boyd
2016-03-08 13:58   ` Robin Murphy
2016-03-08  9:22 ` [RFC/PATCH 2/4] dma-mapping: Add dma_remap() APIs Stephen Boyd
2016-03-08  9:22 ` [RFC/PATCH 3/4] firmware_class: Provide infrastructure to make fw caching optional Stephen Boyd
2016-03-08  9:22 ` [RFC/PATCH 4/4] firmware: Support requesting firmware directly into DMA memory Stephen Boyd
2016-03-08 11:58   ` Mimi Zohar
     [not found]     ` <20160412172708.28213.21206@sboyd-linaro>
2016-04-12 23:04       ` Mimi Zohar
2016-03-08 13:42   ` Ming Lei
2016-03-09  2:29     ` Mark Brown
2016-03-08  9:32 ` [RFC/PATCH 0/4] request_firmware() on memory constrained devices Alexander Stein
2016-03-08 10:07   ` Stephen Boyd

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=1457428939-26659-1-git-send-email-stephen.boyd@linaro.org \
    --to=stephen.boyd@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=labbott@redhat.com \
    --cc=linux-arm@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=will.deacon@arm.com \
    --cc=zohar@linux.vnet.ibm.com \
    /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).