From patchwork Fri Nov 21 08:47:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 5353501 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 440F0C11AC for ; Fri, 21 Nov 2014 08:49:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D5E020176 for ; Fri, 21 Nov 2014 08:49:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3DBAC2015D for ; Fri, 21 Nov 2014 08:49:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8168D6ED33; Fri, 21 Nov 2014 00:49:15 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0144.outbound.protection.outlook.com [157.56.110.144]) by gabe.freedesktop.org (Postfix) with ESMTP id 215AF6ED33 for ; Fri, 21 Nov 2014 00:49:14 -0800 (PST) Received: from BN1PR02CA0033.namprd02.prod.outlook.com (10.141.56.33) by BLUPR02MB194.namprd02.prod.outlook.com (10.242.189.152) with Microsoft SMTP Server (TLS) id 15.1.26.15; Fri, 21 Nov 2014 08:49:12 +0000 Received: from BL2FFO11FD053.protection.gbl (2a01:111:f400:7c09::186) by BN1PR02CA0033.outlook.office365.com (2a01:111:e400:2a::33) with Microsoft SMTP Server (TLS) id 15.1.26.15 via Frontend Transport; Fri, 21 Nov 2014 08:49:12 +0000 Received: from atltwp01.amd.com (165.204.84.221) by BL2FFO11FD053.mail.protection.outlook.com (10.173.161.181) with Microsoft SMTP Server id 15.1.6.13 via Frontend Transport; Fri, 21 Nov 2014 08:49:12 +0000 X-WSS-ID: 0NFDSHZ-07-FEW-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 27BFACAE610 for ; Fri, 21 Nov 2014 02:49:11 -0600 (CST) Received: from SATLEXDAG01.amd.com (10.181.40.3) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 21 Nov 2014 02:49:37 -0600 Received: from odedg-kaveri.amd.com (10.180.168.240) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 21 Nov 2014 03:49:09 -0500 From: Oded Gabbay To: Subject: [PATCH 08/12] amdkfd: add __iomem attribute to doorbell_ptr Date: Fri, 21 Nov 2014 10:47:16 +0200 Message-ID: <1416559640-7119-6-git-send-email-oded.gabbay@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1416559640-7119-1-git-send-email-oded.gabbay@amd.com> References: <1416559111-5900-1-git-send-email-oded.gabbay@amd.com> <1416559640-7119-1-git-send-email-oded.gabbay@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-EOPAttributedMessage: 0 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=Oded.Gabbay@amd.com; X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(189002)(199003)(31966008)(33646002)(48376002)(36756003)(107046002)(105586002)(229853001)(107886001)(77096003)(450100001)(62966003)(77156002)(110136001)(50226001)(46102003)(104166001)(76176999)(4396001)(21056001)(50986999)(106466001)(87286001)(89996001)(44976005)(20776003)(47776003)(86362001)(575784001)(19580405001)(19580395003)(93916002)(68736004)(97736003)(50466002)(88136002)(95666004)(87936001)(92566001)(92726001)(53416004)(2351001)(84676001)(102836001)(101416001)(99396003)(120916001)(64706001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR02MB194; H:atltwp01.amd.com; FPR:; SPF:None; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB194; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB194; X-Forefront-PRVS: 0402872DA1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB194; X-OriginatorOrg: amd4.onmicrosoft.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch was done due to sparse warning. It changes the definition of doorbell_ptr in queue_properties to be with __iomem attribute, so it would match the type which the doorbell module functions are returning. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 9 ++++----- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c index 424ddcc..5055fc9 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c @@ -66,8 +66,7 @@ static bool initialize(struct kernel_queue *kq, struct kfd_dev *dev, if (kq->mqd == NULL) return false; - prop.doorbell_ptr = - (uint32_t *)kfd_get_kernel_doorbell(dev, &prop.doorbell_off); + prop.doorbell_ptr = kfd_get_kernel_doorbell(dev, &prop.doorbell_off); if (prop.doorbell_ptr == NULL) goto err_get_kernel_doorbell; @@ -172,7 +171,7 @@ err_rptr_allocate_vidmem: kfd2kgd->free_mem(dev->kgd, (struct kgd_mem *) kq->pq); err_pq_allocate_vidmem: pr_err("kfd: error init pq\n"); - kfd_release_kernel_doorbell(dev, (u32 *)prop.doorbell_ptr); + kfd_release_kernel_doorbell(dev, prop.doorbell_ptr); err_get_kernel_doorbell: pr_err("kfd: error init doorbell"); return false; @@ -195,7 +194,7 @@ static void uninitialize(struct kernel_queue *kq) kfd2kgd->free_mem(kq->dev->kgd, (struct kgd_mem *) kq->wptr_mem); kfd2kgd->free_mem(kq->dev->kgd, (struct kgd_mem *) kq->pq); kfd_release_kernel_doorbell(kq->dev, - (u32 *)kq->queue->properties.doorbell_ptr); + kq->queue->properties.doorbell_ptr); uninit_queue(kq->queue); } @@ -255,7 +254,7 @@ static void submit_packet(struct kernel_queue *kq) #endif *kq->wptr_kernel = kq->pending_wptr; - write_kernel_doorbell((u32 *)kq->queue->properties.doorbell_ptr, + write_kernel_doorbell(kq->queue->properties.doorbell_ptr, kq->pending_wptr); } diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index 41e608d..d0bcafc 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h @@ -279,7 +279,7 @@ struct queue_properties { uint32_t queue_percent; uint32_t *read_ptr; uint32_t *write_ptr; - uint32_t *doorbell_ptr; + uint32_t __iomem *doorbell_ptr; uint32_t doorbell_off; bool is_interop; bool is_active;