From patchwork Mon Jun 19 17:15:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 9797021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 805846020B for ; Mon, 19 Jun 2017 17:16:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EF0926247 for ; Mon, 19 Jun 2017 17:16:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53C7C27F92; Mon, 19 Jun 2017 17:16:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CC7F26247 for ; Mon, 19 Jun 2017 17:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752495AbdFSRPz (ORCPT ); Mon, 19 Jun 2017 13:15:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38898 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820AbdFSRPx (ORCPT ); Mon, 19 Jun 2017 13:15:53 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 12F3E81247; Mon, 19 Jun 2017 17:15:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 12F3E81247 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=alex.williamson@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 12F3E81247 Received: from gimli.home (ovpn-116-67.phx2.redhat.com [10.3.116.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2FE8189521; Mon, 19 Jun 2017 17:15:39 +0000 (UTC) Subject: [PATCH v2 9/9] vfio: Add AMBA driver_override support From: Alex Williamson To: kvm@vger.kernel.org Cc: eric.auger@redhat.com, alex.williamson@redhat.com, linux-kernel@vger.kernel.org Date: Mon, 19 Jun 2017 11:15:39 -0600 Message-ID: <20170619171539.14047.65171.stgit@gimli.home> In-Reply-To: <20170619170323.14047.26504.stgit@gimli.home> References: <20170619170323.14047.26504.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 19 Jun 2017 17:15:43 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP AMBA also supports driver_override, but amba_bustype was not exported to be able to identify an amba device. Signed-off-by: Alex Williamson --- drivers/vfio/vfio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index 20e57fecf652..36f0fcfded0b 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -36,6 +36,7 @@ #include #include #include +#include #define DRIVER_VERSION "0.3" #define DRIVER_AUTHOR "Alex Williamson " @@ -743,6 +744,11 @@ static char **vfio_find_driver_override(struct device *dev) } else if (dev->bus == &platform_bus_type) { struct platform_device *pdev = to_platform_device(dev); return &pdev->driver_override; +#ifdef CONFIG_ARM_AMBA + } else if (dev->bus == &amba_bustype) { + struct amba_device *adev = to_amba_device(dev); + return &adev->driver_override; +#endif } return NULL;