From patchwork Wed Mar 22 14:48:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 95725 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp224672obz; Wed, 22 Mar 2017 06:50:06 -0700 (PDT) X-Received: by 10.200.47.161 with SMTP id l30mr38185458qta.248.1490190606213; Wed, 22 Mar 2017 06:50:06 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m47si1131991qta.154.2017.03.22.06.50.05; Wed, 22 Mar 2017 06:50:06 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id CE547642F2; Wed, 22 Mar 2017 13:50:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2D30F642C1; Wed, 22 Mar 2017 13:49:25 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 771B6642B5; Wed, 22 Mar 2017 13:49:18 +0000 (UTC) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by lists.linaro.org (Postfix) with ESMTPS id 4C55F62D78 for ; Wed, 22 Mar 2017 13:49:12 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id u132so37315323wmg.0 for ; Wed, 22 Mar 2017 06:49:12 -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; bh=08hkq/ut3MDxn5qUCRL4+HHqEY7wNqIwWaOgbnRCEf8=; b=MiRo9xGye8qfsnUzPUZIUBMSoDwQc79IAOkh3E8KbPFzKAOnzZaIoLUt/nJKWU4oeu ItJkdhIcvFry8bFP6d4SfzmqzAwLq8KSo1cF9TQgptrq1wwMaf+m2E/GyroeM9qu/N/s Ube47HuFPrDHBfTmXjSYkliJcXUqUt944bAfi7lKpiME/fuQHB+a8uqvxGBJcwP2h5fT u1BZw5g/B0ge1vJlr5X6UC5sJuH+wPhNvbHv2+VvYWZzkVHpBHgZXh7qvWTJBs+UMXUR EnjikShATXCulqCWJ8Vu4by8Gd88l9ZOczeEToDBuAdEeM6sr9+A7go8BvCD8f3K4RT6 l1Qg== X-Gm-Message-State: AFeK/H3Wtb15Ibe4osKwTgiUIbFB91feIsvkmcJzKleGSo3kQMQSzzaMpvDkqZJ2TTYQjK/mxPM= X-Received: by 10.25.41.209 with SMTP id p200mr11110931lfp.55.1490190550645; Wed, 22 Mar 2017 06:49:10 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id l23sm522305lfk.27.2017.03.22.06.49.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Mar 2017 06:49:09 -0700 (PDT) From: Christophe Milard To: yi.he@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Wed, 22 Mar 2017 15:48:07 +0100 Message-Id: <1490194110-40168-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [lng-odp] [API-NEXT PATCHv2 00/23] driver items registration and probing X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" This patch series can be pulled from: https://git.linaro.org/people/christophe.milard/odp.git/log/?h=drv_framework_v2 Since V1: Fixes following Bill's comments. Note: I am not really sure this is still in phase with what was discussed at connect, since I couldn't attend. But, at least I did the changes following the comments I recieved. Hope that still makes sence. Also, I am aware that patch 1 generates a warning: I copied this part from the north API so I assume this is an agreed decision. This patch series implements the driver interface, i.e. enumerator class, enumerator, devio and drivers registration and probing. This interface is depicted in: https://docs.google.com/document/d/1eCKPJF6uSlOllXi_sKDvRwUD2BXm-ZzxZoKT0nVEsl4/edit The associated tests are testing these mechanisms. Note that these tests are testing staticaly linked modules only (hence avoiding the module/platform/test debate). Also note that these tests are gathering all the elements (enumerators, enumerator classes, devio, drivers) making up the driver interface so as their interactions can be checked. Real elements (pci enumerators, drivers...) will likely be written in a much more stand-alone way. Christophe Milard (23): drv: adding compiler hints in the driver interface linux-gen: adding compiler hints in the driver interface drv: making parameter strings dynamically computable linux-gen: drv: enumerator_class registration test: drv: enumerator_class registration tests linux-gen: drv: enumerator registration test: drv: enumerator registration tests drv: driver: change drv unbind function name and pass correct parameter drv: driver: add callback function for device destruction linux-gen: drv: device creation and deletion drv: driver: adding device query function linux-gen: drv: driver: adding device querry function test: drv: device creation and destruction drv: driver: adding a probe and remove callback for devio linux-gen: drv: devio registration test: drv: devio creation and destruction drv: adding driver remove function drv: complement parameters to the driver probe() function linux-gen: driver registration and probing test: drv: driver registration and probing drv: driver: adding functions to attach driver's data to the device linux-gen: adding functions to attach driver's data to the device test: drv: test for setting and retrieving driver's data include/odp/drv/spec/driver.h | 132 ++- include/odp/drv/spec/hints.h | 119 +++ include/odp_drv.h | 1 + platform/Makefile.inc | 1 + platform/linux-generic/Makefile.am | 1 + platform/linux-generic/_modules.c | 4 + platform/linux-generic/drv_driver.c | 1051 +++++++++++++++++++- .../linux-generic/include/drv_driver_internal.h | 22 + platform/linux-generic/include/odp/drv/hints.h | 34 + platform/linux-generic/include/odp_internal.h | 5 + platform/linux-generic/odp_init.c | 21 +- test/common_plat/m4/configure.m4 | 1 + test/common_plat/validation/drv/Makefile.am | 1 + .../validation/drv/drvdriver/.gitignore | 5 + .../validation/drv/drvdriver/Makefile.am | 60 ++ .../validation/drv/drvdriver/drvdriver_device.c | 218 ++++ .../validation/drv/drvdriver/drvdriver_device.h | 24 + .../drv/drvdriver/drvdriver_device_main.c | 12 + .../validation/drv/drvdriver/drvdriver_devio.c | 209 ++++ .../validation/drv/drvdriver/drvdriver_devio.h | 24 + .../drv/drvdriver/drvdriver_devio_main.c | 12 + .../validation/drv/drvdriver/drvdriver_driver.c | 518 ++++++++++ .../validation/drv/drvdriver/drvdriver_driver.h | 24 + .../drv/drvdriver/drvdriver_driver_main.c | 12 + .../validation/drv/drvdriver/drvdriver_enumr.c | 303 ++++++ .../validation/drv/drvdriver/drvdriver_enumr.h | 24 + .../drv/drvdriver/drvdriver_enumr_class.c | 174 ++++ .../drv/drvdriver/drvdriver_enumr_class.h | 24 + .../drv/drvdriver/drvdriver_enumr_class_main.c | 12 + .../drv/drvdriver/drvdriver_enumr_main.c | 12 + test/linux-generic/Makefile.am | 5 + 31 files changed, 3030 insertions(+), 35 deletions(-) create mode 100644 include/odp/drv/spec/hints.h create mode 100644 platform/linux-generic/include/drv_driver_internal.h create mode 100644 platform/linux-generic/include/odp/drv/hints.h create mode 100644 test/common_plat/validation/drv/drvdriver/.gitignore create mode 100644 test/common_plat/validation/drv/drvdriver/Makefile.am create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_device.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_device.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_device_main.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_devio.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_devio.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_devio_main.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_driver.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_driver.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_driver_main.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr_class.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr_class.h create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr_class_main.c create mode 100644 test/common_plat/validation/drv/drvdriver/drvdriver_enumr_main.c -- 2.7.4