Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932685AbcCHJWb (ORCPT ); Tue, 8 Mar 2016 04:22:31 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35001 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753677AbcCHJWZ (ORCPT ); Tue, 8 Mar 2016 04:22:25 -0500 From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: linux-arm@lists.infradead.org, Greg Kroah-Hartman , Robin Murphy , Laura Abbott , Arnd Bergmann , Marek Szyprowski , Mimi Zohar , Andrew Morton , Mark Brown , Catalin Marinas , Will Deacon Subject: [RFC/PATCH 0/4] request_firmware() on memory constrained devices Date: Tue, 8 Mar 2016 16:22:15 +0700 Message-Id: <1457428939-26659-1-git-send-email-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.7.0.25.gfc10eb5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1564 Lines: 38 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