Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2092201ybp; Thu, 10 Oct 2019 02:03:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyP78vYqE3EuPvwquRzBLyIrtvM6HpcPyyRALtPH24rlMIv+Xfi7VB+OgdbcF6TvX7Mf0+l X-Received: by 2002:a17:906:66d2:: with SMTP id k18mr7117710ejp.100.1570698204854; Thu, 10 Oct 2019 02:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570698204; cv=none; d=google.com; s=arc-20160816; b=wl88dE1dmmZm4OnCw9mTrdRX48S2Od7llXjbMYj267htJ1yhOU163HAbucbf3xoGBy GFo22JiPglT77Q19vMPh3zZJQtonBnr8wAfH6X8cyv28QcbF5qShHCpSry/9Pj9+J27G VfE0MmpX1Ry0xtWcW+oltz776Y4u4Wfssgn/4HZNSUlWTNQ/rTz5apNZKxrFJJnFw3+9 SeEOQhJaK0gArr55LQNK9dINimvVu5Ar/R+XoDgjUk92t4+jV/F3xc2sr76G6vZ0xehJ JBnAPf8gXWW24Bp3i9GDG8DwMGqQO6oGmqdp8pMbWUMMLS8zeLHRo0PE534/F4aLVMmg kq2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VtVS1PzxmmSWGlwacu/HmcMHTJR1dzt2cZdDh2/0qHY=; b=efZUzOvfrGTUS+g61rq+2jk+Uv1k4R+JRb4bkLpQpRRUn5R8O9De1VLg7on+QElGwz 6uj5Nt5bL/kEFbTkeLC9cCqOrLsaUusCWnpJduyMj6CLlO9GCy+fFGayERFh68yLvN99 IEKBwIvirEkbPXy0839shRDbPJEaoqgesJbYS7RU6VQluKtTgdFYYX2FhRzPJ5/5QPhJ proJuQBRAhqjN5RX1RRHboRqbg8G3ul4N+16XAwB0iuNGc2xdhD18Hsg7L618PsGzjzY OmJkeJhCkGY8zuTQYszUkJ/RzNZ+E5+61uAueHGQEqizReVAdiOFogiZe8BOTaUOiWzN cYqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XUY3j8Mz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id me23si2700196ejb.344.2019.10.10.02.03.01; Thu, 10 Oct 2019 02:03:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XUY3j8Mz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388489AbfJJImK (ORCPT + 99 others); Thu, 10 Oct 2019 04:42:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:46682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388481AbfJJImI (ORCPT ); Thu, 10 Oct 2019 04:42:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D25A721A4C; Thu, 10 Oct 2019 08:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696928; bh=WtMBOunqzYjl4jozG6r1PE63VrycBMI8XpYf9CAn4oA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XUY3j8Mzm+Xc3kO/xDGJadtj6RzS193Mjj/y/UREr75eacxEoSGKw5iQDByM9v3X0 VGzrwvwBUeViOMSX+dBt4kMszXiAOYooDyznQTUmDy3ApSxaeCrTzLigDSmWAxkd9K WkWy9co/ASMmkEf2pemdVmZOIWW80bbnKoYjlfhc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felix Kuehling , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Sasha Levin Subject: [PATCH 5.3 104/148] drm/amdgpu: Fix KFD-related kernel oops on Hawaii Date: Thu, 10 Oct 2019 10:36:05 +0200 Message-Id: <20191010083617.506295681@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felix Kuehling [ Upstream commit dcafbd50f2e4d5cc964aae409fb5691b743fba23 ] Hawaii needs to flush caches explicitly, submitting an IB in a user VMID from kernel mode. There is no s_fence in this case. Fixes: eb3961a57424 ("drm/amdgpu: remove fence context from the job") Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 7850084a05e3a..60655834d6498 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -143,7 +143,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, /* ring tests don't use a job */ if (job) { vm = job->vm; - fence_ctx = job->base.s_fence->scheduled.context; + fence_ctx = job->base.s_fence ? + job->base.s_fence->scheduled.context : 0; } else { vm = NULL; fence_ctx = 0; -- 2.20.1