From patchwork Mon Nov 1 22:47:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Leach X-Patchwork-Id: 12597507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66AE0C433EF for ; Mon, 1 Nov 2021 22:49:10 +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 344FB60F42 for ; Mon, 1 Nov 2021 22:49:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 344FB60F42 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=vLVS9ojZZanBjHydBxW94HD75fSuQWO6XIDBtCB7vzc=; b=UdmHLzgc5KvzV6 ftm7dVdfWduFU/po6GrOI18Q9XSUi/jXJpemq88+Yu7M+E5N0Uhfkz/T0R7am7SQSCLqKTjrOM4gr b74CHYiQLNAHbH5uHxVvDfy3tbhbZ7jO3Ii7iWz/Rsdg9lDemLckX8MxpWwv3rFqf8fw8nVGaXm9r RerjbKPgYaxQfVbcr1R3IQXHbhV5DdSWk9rsCnfCPxmsXTkf24NLTGIUqlxNGGULd40MzkBjQepC5 DN1vYVfHy8+ZVyE/EsmAI5vxLf+tv9h8mmxIWJWHqJVHd5LQvDuwz13ZVwQtoQAjEWlvQ+sBl1IyY uFvhOvPvX65bChT5B3iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhg5c-00HRXZ-7V; Mon, 01 Nov 2021 22:47:40 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhg5Y-00HRVh-4e for linux-arm-kernel@lists.infradead.org; Mon, 01 Nov 2021 22:47:37 +0000 Received: by mail-wr1-x436.google.com with SMTP id s13so23263353wrb.3 for ; Mon, 01 Nov 2021 15:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jRKntwKpylXUnWrUStAs+mMUo5zbzh7D10tjOsj+3d8=; b=Thw3EllWjq8UaOPcyvazI7/e/9zEUJFS3jUn4K+Fsj76d4842YUHOEboTJpfaktTmN f5GaSaLiI8l/vt2H5t2vyPti9jdgE6cgBDtIuHsRiG/RbJFgjaUqZqoewjFh3TNfMd7B 0lRZkI0cwAGyrAWvboguryF38i1gnn+YpoqBxHz2+BM9wpiVMhdAva7uZp5jI/MNfO63 Zc1HppI7Q7PQqp0xzHwtY0z/mrPnLShIVnNLRGLB3Wr2euOKAJ0YX2CnxgmWN/FcBDTg ifI0xXf+6BiapCh4MGEgVTSwXYx19NVXUa5ikETGE/yH2FibM6mipPVfMGj0AZfanydm aq0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jRKntwKpylXUnWrUStAs+mMUo5zbzh7D10tjOsj+3d8=; b=XlaA19c5VSGrIhvZLD12ZjPS6iCHqH9PjS4uRA4w/qExGZyeY9NDtEdob7snHbusBQ NF9XKQiVpPD6cjRH7Zpi4rDvpsy1bx8Q5r5xjx8LFDi7sR4Y0auRsDTRp7/nSEWhZ+oB Jn6BL1B4mOarQzdBm0agDh8kEAJKkomgfScm1fqJv/K7INFHGdQLqoMK0bzAmwSCW2pS PSjUJlKl/1hV8tGyUcksP28Hv+EFwYcSrL1cv5xpf1KbapIpoNtr4Juise1dX/CwdtxN fXKm6tswYLPqBc8bbR+WWjm+2mTwn0SDqncZXVe06qJCF0XLjSKFuMHQJ/fMSLHbTwHJ koxA== X-Gm-Message-State: AOAM533n48xF/Wk9B2z/oaaX/hveFB6V99TomihgZZJ8vqcw+rOyrooI 6mA3GNhchCP8c2oeRK5D++sp7A== X-Google-Smtp-Source: ABdhPJyCYNfGuyO1fI7jQjQcKpIEYc1s0reICAI19ZQkEEjTUh4GAgNQQ4GtMJWMg5o0sIZtpx3RGw== X-Received: by 2002:adf:f34b:: with SMTP id e11mr12284745wrp.62.1635806853868; Mon, 01 Nov 2021 15:47:33 -0700 (PDT) Received: from linaro.org ([2a00:23c5:6809:2201:cd6d:75aa:3402:e4a]) by smtp.gmail.com with ESMTPSA id 10sm858647wme.27.2021.11.01.15.47.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 15:47:33 -0700 (PDT) From: Mike Leach To: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org, mathieu.poirier@linaro.org, suzuki.poulose@arm.com, leo.yan@linaro.org, Mike Leach Subject: [PATCH 0/6] coresight: syscfg: Extend configfs for config load. Date: Mon, 1 Nov 2021 22:47:25 +0000 Message-Id: <20211101224731.27870-1-mike.leach@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211101_154736_216329_E40F00AF X-CRM114-Status: GOOD ( 10.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This set extends the configfs support to allow loading and unloading of configurations as binary files via configfs. Additional attributes - load, unload and last_load_status are provided to implement the load functionality. Routines to generate binary configuration files are supplied in ./samples/coresight. Documentation is updated to describe feature usage. Set applies on top of dynamic load set here: https://lists.linaro.org/pipermail/coresight/2021-October/007254.html Mike Leach (6): coresight: configfs: Add in functionality for load via configfs coresight: configfs: Add in binary attributes to load files coresight: configfs: Modify config files to allow userspace use coresight: samples: Add an example config writer for configfs load coresight: samples: Add coresight file reader sample program Documentation: coresight: Update coresight configuration docs .../trace/coresight/coresight-config.rst | 65 ++- drivers/hwtracing/coresight/Makefile | 2 +- .../coresight/coresight-config-file.c | 472 ++++++++++++++++++ .../coresight/coresight-config-file.h | 158 ++++++ .../hwtracing/coresight/coresight-config.h | 38 ++ .../coresight/coresight-syscfg-configfs.c | 148 +++++- .../coresight/coresight-syscfg-configfs.h | 8 + .../hwtracing/coresight/coresight-syscfg.c | 36 ++ .../hwtracing/coresight/coresight-syscfg.h | 2 + samples/coresight/Makefile | 23 + samples/coresight/Makefile.host | 39 ++ samples/coresight/coresight-cfg-bufw.c | 302 +++++++++++ samples/coresight/coresight-cfg-bufw.h | 24 + samples/coresight/coresight-cfg-file-read.c | 191 +++++++ samples/coresight/coresight-cfg-filegen.c | 89 ++++ 15 files changed, 1583 insertions(+), 14 deletions(-) create mode 100644 drivers/hwtracing/coresight/coresight-config-file.c create mode 100644 drivers/hwtracing/coresight/coresight-config-file.h create mode 100644 samples/coresight/Makefile.host create mode 100644 samples/coresight/coresight-cfg-bufw.c create mode 100644 samples/coresight/coresight-cfg-bufw.h create mode 100644 samples/coresight/coresight-cfg-file-read.c create mode 100644 samples/coresight/coresight-cfg-filegen.c