Message ID | 20210625195849.837976-1-trix@redhat.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <SRS0=wsnO=LT=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BACC4C2B9F4 for <linux-arm-kernel@archiver.kernel.org>; Fri, 25 Jun 2021 20:00:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D3D761960 for <linux-arm-kernel@archiver.kernel.org>; Fri, 25 Jun 2021 20:00:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D3D761960 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=xKSJXbQf1BpoAuJEwbW7hxKOMDcXSyg22nnvNCmvF+Y=; b=3mg1dQY8w30s6c NWKIr/qiJnPa6QnGIGmXQm0n+DDD5nieGke1H41NJ1WGcGco/lG+9MQNqnWF5KM5pbbMeUqIU3t29 3e5l6i+uXR/jhu8a6H5dihwCT+afCjDRCXl/S8GjIe04bYfupHcKwzupMlBSUH+VfKV77kOYuh7nI IVgzd9B2fCeeCs/30tU1yPJ3TtVErII8g0zFKBmx4EYfhyyCsGO8rLJyHppVwi7fwO/y+D46heIPp hRdKflaHdDKH9xDNYPxo3rBgrf1CtILso/vkecyN4gcjzoUCeR0dSwKIRGHFwHIvLOAucxSu36ZQ3 jJJ7xR/HCXlu7fiaogNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwryl-002l3e-7w; Fri, 25 Jun 2021 19:59:08 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwryd-002l2J-8U for linux-arm-kernel@lists.infradead.org; Fri, 25 Jun 2021 19:59:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624651138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cKZbkTJmpGtN/IdbnoPTOQJqZouuD1FRtyZb5ELX/mU=; b=iXD8LErj+C1PWRGj3DHGdPJI2uSkUAteUKoDiMy8dNAx5+I92g8aipKEw32gnpeV2CxaNk YTaH2zrCF7ahMCNsevv+xOzTYan7SNxS4p226NS16wRjklFd0yoIs+3GK6uy1sIcrClhYN K6dBCP2ox2e9ligTnGt6XpAASTsL3FA= Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-oi2ePyW1P1SLouBUvy4wtw-1; Fri, 25 Jun 2021 15:58:56 -0400 X-MC-Unique: oi2ePyW1P1SLouBUvy4wtw-1 Received: by mail-oo1-f72.google.com with SMTP id x3-20020a4ae7830000b029024c5e82a290so471057oov.22 for <linux-arm-kernel@lists.infradead.org>; Fri, 25 Jun 2021 12:58:56 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=cKZbkTJmpGtN/IdbnoPTOQJqZouuD1FRtyZb5ELX/mU=; b=lqZPJ/OI+zEq78wGWiZg0jtFAbPpzH5wiKO2eFrZWi3trTEGr1/S8goXP+W8PQ2327 qrDa3vY+zB6Ugz1EZ/jMxDoMDgqN6xTkbgt+EETwRShFWuG+OVbutpEGLDmR6OE2kCZ6 T8ZAaWBUUXcudjPHpBWBaS15j41n6JCmj/iLnh5IDFPmu+yBBhBit3PSR2FNP7mEiLly OJxvcnHImFMaX0iel4WTGRTzADeJ7wUUud9O/LgzutbpvQmpCrn9VSUJzIoiNX9FmlNV oh5wtqgvnJZh7kRNFHE0y0fsqi1LsK8XxqbrDwFWMwj2iycNFBaSeZj0u4TQIj/FFnbw AGcg== X-Gm-Message-State: AOAM530DhBODa2Vbd633gB3ezwQUzsaKDw9JJoMurnJ9wHPg3LlJh/xP jIVWTIVvMP7HBnztWP1Pb6cncpWjBhCBZjWKhJhaLTl/hi1eJcLFhqZNJbNysVCeXKDtisqLuWg lnUNK8Q6E54MNnGFMz2bFKPz3uApmUsuI7HE= X-Received: by 2002:a54:440a:: with SMTP id k10mr12678113oiw.59.1624651136187; Fri, 25 Jun 2021 12:58:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjWad8+91HNuP1vH4HhgSb+cVNKVucceXg2FsrIECVnI0lomtdR0fS8FNKnfz3l2lhsugMCA== X-Received: by 2002:a54:440a:: with SMTP id k10mr12678101oiw.59.1624651136006; Fri, 25 Jun 2021 12:58:56 -0700 (PDT) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id r204sm1467374oih.11.2021.06.25.12.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 12:58:55 -0700 (PDT) From: trix@redhat.com To: mdf@kernel.org, hao.wu@intel.com, michal.simek@xilinx.com Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix <trix@redhat.com> Subject: [PATCH v5 0/4] generalize fpga_mgr_load Date: Fri, 25 Jun 2021 12:58:44 -0700 Message-Id: <20210625195849.837976-1-trix@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210625_125859_451477_4B7E6B8A X-CRM114-Status: GOOD ( 11.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series | generalize fpga_mgr_load | expand |
From: Tom Rix <trix@redhat.com> Depends on https://lore.kernel.org/linux-fpga/20210625195148.837230-9-trix@redhat.com/ A refactor of the fpga-manager to make space for the functionality of the secure update in this thread. https://lore.kernel.org/linux-fpga/20210517023200.52707-1-mdf@kernel.org/T/#mf3a1951d429a973c863eee079ed990c55056827c Splits the reconfig write ops into its own ops structure and then has an instance for the existing loading (reconfig) and the secure update (reimage) fpga_mgr_load uses a new bit, FPGA_MGR_REIMAGE, in fpga_info_info to use either the reconfig or the reimage ops. valid write op checking has moved to make the reimage path option. Since fpga_image_info_alloc zalloc's the fpga_info_struct, the reimage path will not be taken. Changes since v1: - update op names changed from partial_update to reconfig full_update to reimage - dropped the cancel() and get_error() ops. - add FPGA_MGR_REIMAGE bit - refactor fpga_mgr_load to use either update ops Changes since v2: - Fix a missed write op change - Stub in dfl reimage Changes since v3 - refactor for wrapper ops patchset - drop 0004 fpga: defer checking.., wrapper ops took care of that - drop 0006 fpga: dfl stub in..., simplify the patchset - add a wrapper for write_sg - rearrange the passing of update ops to be last. - simplify some wrapper checks, this should go in the wrapper ps. Changes since v4 - refactor for wrapper ops patchset - drop write_sg wrapper - drop 'fpga: fpga-mgr: simplify mops check in wrappers' Tom Rix (4): fpga: generalize updating the card fpga: add FPGA_MGR_REIMAGE flag fpga: pass fpga_manager_update_ops to the fpga_manager_write functions fpga: use reimage ops in fpga_mgr_load() drivers/fpga/altera-cvp.c | 8 +-- drivers/fpga/altera-pr-ip-core.c | 8 +-- drivers/fpga/altera-ps-spi.c | 8 +-- drivers/fpga/dfl-fme-mgr.c | 8 +-- drivers/fpga/fpga-mgr.c | 95 +++++++++++++++++++------------- drivers/fpga/ice40-spi.c | 8 +-- drivers/fpga/machxo2-spi.c | 8 +-- drivers/fpga/socfpga-a10.c | 10 ++-- drivers/fpga/socfpga.c | 8 +-- drivers/fpga/stratix10-soc.c | 6 +- drivers/fpga/ts73xx-fpga.c | 6 +- drivers/fpga/xilinx-spi.c | 8 +-- drivers/fpga/zynq-fpga.c | 10 ++-- drivers/fpga/zynqmp-fpga.c | 6 +- include/linux/fpga/fpga-mgr.h | 35 ++++++++---- 15 files changed, 132 insertions(+), 100 deletions(-)