Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1194672ybj; Thu, 7 May 2020 17:29:35 -0700 (PDT) X-Google-Smtp-Source: APiQypJAYyClvQl328NQkFNh0V5lzAbhXscoGXGBRwiR2BhUARzC5W9RZxM8lhbuoM4RaQROP5es X-Received: by 2002:a50:a624:: with SMTP id d33mr65816edc.58.1588897775140; Thu, 07 May 2020 17:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588897775; cv=none; d=google.com; s=arc-20160816; b=JHOBXQY/X7hgpo1bljZLoS1KxEjhIx0QhEDL87RdLojwnD2NZ4kfWFAb9Qch2FKIJH P1UuRRZ+LE0DqCzSwLlJuv0mjXUiEYh2BmahJlY4aCBazfi18MN/QAYsgbaMK9lUSmtk bwHRQjswIgaclG42s5kJsgmnGWap6AMXOXREmru0iKJJ+sHpyafqJeluVDVYixfZg4fT x2q6W8i4/Ipdrnlv/w/r+VfyJQXkOZK3jcoJqn1kdvELx8X0URcw4hkbBNd7V52bw0Bd PtO18+3xg7b9OQ2/3dgtcD7cxd2BkRdHtWNrXPQO65de/efFdA39xG2wzjCYaeo2S50p nPgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=V0C3bRiQIupjvnAB404TNg3msK2myuQCmZ2x7HRHG2I=; b=GNfMi0S4+nV9f0R0KgDMFhHd2Zl2Du+RH3T6G7RLcJTnPtiBOVmA5B5W1fXMjPISvZ 0kQ1qAJStjAayZtN+2nexheXKZLHFlsRDyq/C/8HkU1M+lV+cBvBuQN1iOHBmfko9hjO V9h280m17Pi64rD47WLQMnAopWPR16q8U1lwOXEgMfaoFLtqKqhEvkiCb20hlZQ/svU2 MvfJ9m8W0N2Bdi4PMrmyUmag+HVPSc0IRfiPpzzcOeMuNQNGShTge//ofxo2ywOmZJWw wHts1/+Hu1BwOlWU3BE2C4ILNcbBIkaIfr6jGwtn/zJi5f9K6hg5uumFO9HtMczwqWeZ GwSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Jj5o2Eh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id a11si2240edq.562.2020.05.07.17.29.11; Thu, 07 May 2020 17:29:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Jj5o2Eh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726533AbgEHA1x (ORCPT + 99 others); Thu, 7 May 2020 20:27:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726470AbgEHA1w (ORCPT ); Thu, 7 May 2020 20:27:52 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C3AAC05BD43 for ; Thu, 7 May 2020 17:27:52 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id 7so4460912pjo.0 for ; Thu, 07 May 2020 17:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=V0C3bRiQIupjvnAB404TNg3msK2myuQCmZ2x7HRHG2I=; b=Jj5o2Eh+WgC06ImxPAdAiLKa43hIVr2SX7PjM5ta2/GY9A8rSs1GqK+RFCHZ9xbE0u Oj6CkcxAK/e5keveJNLW6FVl+GLxByi6cVM3Q1SDB3TlG+bD9rIluZ8RJ8OnPVjk1+MN Fn8EaOsdeA5cq27MGG/osiw6jB4oxDEZ8o+xM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=V0C3bRiQIupjvnAB404TNg3msK2myuQCmZ2x7HRHG2I=; b=tMz8PVhMxJh3Qt9vcupGcFCfDElCpk0C47yJv7hT7clXJ6igLNqq41tjnNyYTP46bI O+rcc6sY5FCea94UBiTdfQRDCGLbz2DRrPxK9PSqMfiUlVMZbQCAPpuMv0ldOWZQj3vb fzA9aYlYi7cNTaztE66k6y8xkMQOFfOmCsPkjBX8KEdkaHvbHb3GCZLu9cabxa3NdPaO Z4qVeBI16vle68TTd7LnAp8x4BD5saLZKKon05iNPY1mVf7pIMm+E7ReUST03mKoRsTY DQidKuCy8OcLfzXMrnoI6uOfzPYrjvfrEHPpy6w6DD72RjqV7J+sxn+v0khnUjeBgowb 8/Rg== X-Gm-Message-State: AGi0PubQplZRpi9lIaF0xqdG16Ay+njDCSNAhNcmo/7/RKZoOJW/t33w Bn+/agyqwQ0I+FQW07EJA7AZvg== X-Received: by 2002:a17:90a:3b0c:: with SMTP id d12mr2871289pjc.78.1588897671362; Thu, 07 May 2020 17:27:51 -0700 (PDT) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id gz14sm882677pjb.42.2020.05.07.17.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 17:27:50 -0700 (PDT) From: Scott Branden To: Luis Chamberlain , Greg Kroah-Hartman , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann Cc: "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , Takashi Iwai , linux-kselftest@vger.kernel.org, Andy Gross , Scott Branden Subject: [PATCH v5 0/7] firmware: add partial read support in request_firmware_into_buf Date: Thu, 7 May 2020 17:27:32 -0700 Message-Id: <20200508002739.19360-1-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please consider this version series ready for upstream acceptance. This patch series adds partial read support in request_firmware_into_buf. In order to accept the enhanced API it has been requested that kernel selftests and upstreamed driver utilize the API enhancement and so are included in this patch series. Also in this patch series is the addition of a new Broadcom VK driver utilizing the new request_firmware_into_buf enhanced API. Changes from v4: - handle reset issues if card crashes - allow driver to have min required msix - add card utilization information Changes from v3: - fix sparse warnings - fix printf format specifiers for size_t - fix 32-bit cross-compiling reports 32-bit shifts - use readl/writel,_relaxed to access pci ioremap memory, removed memory barriers and volatile keyword with such change - driver optimizations for interrupt/poll functionalities Changes from v2: - remove unnecessary code and mutex locks in lib/test_firmware.c - remove VK_IOCTL_ACCESS_BAR support from driver and use pci sysfs instead - remove bitfields - remove Kconfig default m - adjust formatting and some naming based on feedback - fix error handling conditions - use appropriate return codes - use memcpy_toio instead of direct access to PCIE bar Scott Branden (7): fs: introduce kernel_pread_file* support firmware: add offset to request_firmware_into_buf test_firmware: add partial read support for request_firmware_into_buf firmware: test partial file reads of request_firmware_into_buf bcm-vk: add bcm_vk UAPI misc: bcm-vk: add Broadcom VK driver MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver MAINTAINERS | 7 + drivers/base/firmware_loader/firmware.h | 5 + drivers/base/firmware_loader/main.c | 52 +- drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/bcm-vk/Kconfig | 29 + drivers/misc/bcm-vk/Makefile | 12 + drivers/misc/bcm-vk/bcm_vk.h | 435 +++++ drivers/misc/bcm-vk/bcm_vk_dev.c | 1256 +++++++++++++++ drivers/misc/bcm-vk/bcm_vk_legacy.c | 89 + drivers/misc/bcm-vk/bcm_vk_msg.c | 1425 +++++++++++++++++ drivers/misc/bcm-vk/bcm_vk_msg.h | 196 +++ drivers/misc/bcm-vk/bcm_vk_sg.c | 271 ++++ drivers/misc/bcm-vk/bcm_vk_sg.h | 60 + drivers/misc/bcm-vk/bcm_vk_tty.c | 352 ++++ drivers/soc/qcom/mdt_loader.c | 7 +- fs/exec.c | 96 +- include/linux/firmware.h | 8 +- include/linux/fs.h | 20 + include/uapi/linux/misc/bcm_vk.h | 99 ++ lib/test_firmware.c | 144 +- .../selftests/firmware/fw_filesystem.sh | 80 + 22 files changed, 4596 insertions(+), 49 deletions(-) create mode 100644 drivers/misc/bcm-vk/Kconfig create mode 100644 drivers/misc/bcm-vk/Makefile create mode 100644 drivers/misc/bcm-vk/bcm_vk.h create mode 100644 drivers/misc/bcm-vk/bcm_vk_dev.c create mode 100644 drivers/misc/bcm-vk/bcm_vk_legacy.c create mode 100644 drivers/misc/bcm-vk/bcm_vk_msg.c create mode 100644 drivers/misc/bcm-vk/bcm_vk_msg.h create mode 100644 drivers/misc/bcm-vk/bcm_vk_sg.c create mode 100644 drivers/misc/bcm-vk/bcm_vk_sg.h create mode 100644 drivers/misc/bcm-vk/bcm_vk_tty.c create mode 100644 include/uapi/linux/misc/bcm_vk.h -- 2.17.1