From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3CC470 for ; Wed, 21 Jul 2021 16:21:20 +0000 (UTC) Received: by mail-pf1-f171.google.com with SMTP id u126so2582485pfb.8 for ; Wed, 21 Jul 2021 09:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wfihw5vcbXFixYEyu3107hsiuCejF8uRx6y/SePajmw=; b=tbVCQwqRZb3xhEMcZ9kLY+1IVVouRY9tXs6Rl4ekyBejDdtSM0U6rjkPFY1iwP4e/c 5jthu5nvI2j3re94YzfiEFH2WlCz9Xie1Y160I+QFCGVKBh4QHifFpMQTZ5bKctPxVHI kvbyYH5ULKzkToxKnV4lt4/9gHp5rxseOP8+uVE6Jc2+3yEKmVsz4K8w3d9i5cZAfgFU Lzgn4oXWVAZukm/+FbXLwE2fwa8w3uSSyBr/Fx/EXFar1s70JG3DsCSaqS0JBGRW2vYe F5yTPfKmRb66HPX8z7BsARx1ndix8SaOgExCbhAIrRmiGK+gEfYQ606LjuRRcRG0A+Ll T1jw== 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=Wfihw5vcbXFixYEyu3107hsiuCejF8uRx6y/SePajmw=; b=Q0158JTB8gEQ2aGpOOckFtF4BqpRB6gFQOxv/P4r9EATH4A0Y66kL07e4ERgckhqCj UIFAL/uzcmoqQpNfn2Ad18OdceitnPYa9BnvIFUqIcnP0RBge1F5oTVACSfm8JQBWmr8 fCwceP7RwPjdDdgh1uE1pDLaZ4at0IowIKHErjh4UZk2UMmqf6ZAlPteY6jL+zewtmLo lHnP3x2bk2PGwwuW3kIl61PS77QmTr47FnfTumVf3+ELQsK1MFbAEW1AihGfWWsvGZLV gwdds8YVkugRd7hAWF1u2LMqxDn2cnCVVETZpqQ/Mf+MmiACDBKimvzON6mCBHxSsJL6 2g+A== X-Gm-Message-State: AOAM53102BH3CpbG94KELFippP7MQ5GldKkTIaK1EEw/+UwUCZ91vbGd 481e0rQwhqPGB9qrGGkj5Jk= X-Google-Smtp-Source: ABdhPJzUdZLTOl8wsS8QTCjlq7wqHJqyEdEigh67lI78uBVhYimW1o5Mr9SVnhi2jFdrHxMJBGyFvg== X-Received: by 2002:a63:df14:: with SMTP id u20mr36675457pgg.348.1626884480181; Wed, 21 Jul 2021 09:21:20 -0700 (PDT) Received: from localhost.localdomain ([122.161.48.33]) by smtp.googlemail.com with ESMTPSA id s21sm3013459pfw.69.2021.07.21.09.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 09:21:19 -0700 (PDT) From: Ojaswin Mujoo To: nsaenz@kernel.org Cc: Ojaswin Mujoo , gregkh@linuxfoundation.org, stefan.wahren@i2se.com, dan.carpenter@oracle.com, phil@raspberrypi.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/5] vchiq: Patch to separate platform and cdev code Date: Wed, 21 Jul 2021 21:50:48 +0530 Message-Id: X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello, This patchset adderesses the TODO item number 10 specified at: drivers/staging/vc04-services/interface/TODO For reference, the task is: 10) Reorganize file structure: Move char driver to it's own file and join both platform files The cdev is defined alongside with the platform code in vchiq_arm.c. It would be nice to completely decouple it from the actual core code. For instance to be able to use bcm2835-audio without having /dev/vchiq created. One could argue it's better for security reasons or general cleanliness. It could even be interesting to create two different kernel modules, something the likes of vchiq-core.ko and vchiq-dev.ko. This would also ease the upstreaming process. A summary of the patches is as follows: - Patch 1: Move cdev init code into a function - Patch 2: Shift some devlarations from vchiq_arm.c to vchiq_arm.h for sharing - Patch 3: Move vchiq cdev init code from vchiq_arm.c into vchiq_dev.c - Patch 4: Decouple cdev code by defining a Kconfig entry to allow optional compilation of it. - Patch 5: Merge code in vchiq_2835_arm.c to vchiq_arm.c Changes since v3 [2]: * In Patch 5, replace forward declarations of some of the functions with function definition Changes since v2 [1]: * In Patch 1, as suggested, I have added error handling code back to ensure the driver exits when there is an error in creating vchiq cdev * I have built this patch against the right kernel (gregkh/staging, staging-next branch) to avoid introducing any unwanted inconsistencies like whitespace changes I have tested the patch using vchiq_test utility on RPi 3B+. Regards, Ojaswin [1] v2: https://lore.kernel.org/patchwork/cover/1449117/ [2] v3: https://lore.kernel.org/patchwork/cover/1453915/ Ojaswin Mujoo (5): staging: vchiq: Refactor vchiq cdev code staging: vchiq: Move certain declarations to vchiq_arm.h staging: vchiq: Move vchiq char driver to its own file staging: vchiq: Make creation of vchiq cdev optional staging: vchiq: Combine vchiq platform code into single file drivers/staging/vc04_services/Kconfig | 10 + drivers/staging/vc04_services/Makefile | 5 +- .../interface/vchiq_arm/vchiq_2835_arm.c | 564 ---- .../interface/vchiq_arm/vchiq_arm.c | 2330 +++++------------ .../interface/vchiq_arm/vchiq_arm.h | 82 + .../interface/vchiq_arm/vchiq_dev.c | 1440 ++++++++++ 6 files changed, 2251 insertions(+), 2180 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c create mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-8.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 D1C6BC12002 for ; Wed, 21 Jul 2021 16:23:07 +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 8D8FD60FF3 for ; Wed, 21 Jul 2021 16:23:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D8FD60FF3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=IZVK3Y9FW7v2PxmqVhQmD4snp2ys2e26Jq20Gexy0WM=; b=UCR6u3pEPezIRZ gF6jdF7mNk2dVNUrsI9SdAymsfzu8gOyrAqdNXeN84bkpfs3RW5bNC+f9c+HSivpkyIfP+eQNIXw4 paAefHya7AhVo8j5oq4JE5n2255NIYGIarTtsA+zQN5UmNfnKqm+2nNN/neU1JmoND5d2bKhViJJ7 TSBuPS7jtScweMjvyXkdJVVn9c71bxNJTpXW+HSB2UKIZzIyuB2ceWQUfFgQi2UM8iEgZTQfrd03b 1RD/H7bavlsJ32u13J6xUA77UkvIrbuD7rBKNB/drLAibBKn60UGm7NsB6dvbDsbs2op3tTaAtK+0 +w2TbLwijUWfNicKACxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6EyL-00GWsm-Pi; Wed, 21 Jul 2021 16:21:25 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6EyH-00GWrg-PN for linux-arm-kernel@lists.infradead.org; Wed, 21 Jul 2021 16:21:23 +0000 Received: by mail-pf1-x429.google.com with SMTP id a127so2571420pfa.10 for ; Wed, 21 Jul 2021 09:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wfihw5vcbXFixYEyu3107hsiuCejF8uRx6y/SePajmw=; b=tbVCQwqRZb3xhEMcZ9kLY+1IVVouRY9tXs6Rl4ekyBejDdtSM0U6rjkPFY1iwP4e/c 5jthu5nvI2j3re94YzfiEFH2WlCz9Xie1Y160I+QFCGVKBh4QHifFpMQTZ5bKctPxVHI kvbyYH5ULKzkToxKnV4lt4/9gHp5rxseOP8+uVE6Jc2+3yEKmVsz4K8w3d9i5cZAfgFU Lzgn4oXWVAZukm/+FbXLwE2fwa8w3uSSyBr/Fx/EXFar1s70JG3DsCSaqS0JBGRW2vYe F5yTPfKmRb66HPX8z7BsARx1ndix8SaOgExCbhAIrRmiGK+gEfYQ606LjuRRcRG0A+Ll T1jw== 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=Wfihw5vcbXFixYEyu3107hsiuCejF8uRx6y/SePajmw=; b=HzatwFqxXtAI6rhgNg6Yt0elzchTtlUravVShGapwk1YMzE+3MgHbESg6CXCtpPUq1 TeVto6Wkg8DJw1pFPDjs047WEtX5s80VuxSwyoDwU1nsBoOFkbrHSK3/tk3OZt3tJVDa UIVbt1vm+y48LifJGNYTGRyGsfD8M0ecwVTfW1lO7pAn7diSiZ+LVtA2ZfaMQei+1vxS lspCSLKqluggt+EB+5d0YXSqTT9e/ulyfnEhGVfYmGFc6dukrjKOcj+73fJozZ4RNDmq 6Uj8VeYd5pTP7VXz1lvKwmUlo7BemdW8pJw/8wpdeS02gFxcPTQ78c0Zu5UmMvLC9kvD qFaw== X-Gm-Message-State: AOAM533/iLBfWX6rjVySbDBh9l2s3bkwz7gNruQFFOEkOAoRt1nQGUbz AgWywv8e7Pa0CtIk76cS2v0= X-Google-Smtp-Source: ABdhPJzUdZLTOl8wsS8QTCjlq7wqHJqyEdEigh67lI78uBVhYimW1o5Mr9SVnhi2jFdrHxMJBGyFvg== X-Received: by 2002:a63:df14:: with SMTP id u20mr36675457pgg.348.1626884480181; Wed, 21 Jul 2021 09:21:20 -0700 (PDT) Received: from localhost.localdomain ([122.161.48.33]) by smtp.googlemail.com with ESMTPSA id s21sm3013459pfw.69.2021.07.21.09.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 09:21:19 -0700 (PDT) From: Ojaswin Mujoo To: nsaenz@kernel.org Cc: Ojaswin Mujoo , gregkh@linuxfoundation.org, stefan.wahren@i2se.com, dan.carpenter@oracle.com, phil@raspberrypi.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/5] vchiq: Patch to separate platform and cdev code Date: Wed, 21 Jul 2021 21:50:48 +0530 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210721_092121_886152_525AFEC9 X-CRM114-Status: GOOD ( 19.42 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This patchset adderesses the TODO item number 10 specified at: drivers/staging/vc04-services/interface/TODO For reference, the task is: 10) Reorganize file structure: Move char driver to it's own file and join both platform files The cdev is defined alongside with the platform code in vchiq_arm.c. It would be nice to completely decouple it from the actual core code. For instance to be able to use bcm2835-audio without having /dev/vchiq created. One could argue it's better for security reasons or general cleanliness. It could even be interesting to create two different kernel modules, something the likes of vchiq-core.ko and vchiq-dev.ko. This would also ease the upstreaming process. A summary of the patches is as follows: - Patch 1: Move cdev init code into a function - Patch 2: Shift some devlarations from vchiq_arm.c to vchiq_arm.h for sharing - Patch 3: Move vchiq cdev init code from vchiq_arm.c into vchiq_dev.c - Patch 4: Decouple cdev code by defining a Kconfig entry to allow optional compilation of it. - Patch 5: Merge code in vchiq_2835_arm.c to vchiq_arm.c Changes since v3 [2]: * In Patch 5, replace forward declarations of some of the functions with function definition Changes since v2 [1]: * In Patch 1, as suggested, I have added error handling code back to ensure the driver exits when there is an error in creating vchiq cdev * I have built this patch against the right kernel (gregkh/staging, staging-next branch) to avoid introducing any unwanted inconsistencies like whitespace changes I have tested the patch using vchiq_test utility on RPi 3B+. Regards, Ojaswin [1] v2: https://lore.kernel.org/patchwork/cover/1449117/ [2] v3: https://lore.kernel.org/patchwork/cover/1453915/ Ojaswin Mujoo (5): staging: vchiq: Refactor vchiq cdev code staging: vchiq: Move certain declarations to vchiq_arm.h staging: vchiq: Move vchiq char driver to its own file staging: vchiq: Make creation of vchiq cdev optional staging: vchiq: Combine vchiq platform code into single file drivers/staging/vc04_services/Kconfig | 10 + drivers/staging/vc04_services/Makefile | 5 +- .../interface/vchiq_arm/vchiq_2835_arm.c | 564 ---- .../interface/vchiq_arm/vchiq_arm.c | 2330 +++++------------ .../interface/vchiq_arm/vchiq_arm.h | 82 + .../interface/vchiq_arm/vchiq_dev.c | 1440 ++++++++++ 6 files changed, 2251 insertions(+), 2180 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c create mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel