Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21155368ybl; Sun, 5 Jan 2020 21:54:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxNdG3jd6WOf+JQn+7AYdXWmaMpQ89qAMALOHRUT+9UCAPn1kH0SdjoAVC04Q6Mzk52Xuvf X-Received: by 2002:a9d:7593:: with SMTP id s19mr107378242otk.219.1578290094644; Sun, 05 Jan 2020 21:54:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578290094; cv=none; d=google.com; s=arc-20160816; b=S17jIsjWu18CRFhJ/P6cYPagvA6QuCAPgA/heBMLH2ceNJWqV0QKbZuiDK51oXDRcV n9tSVATMLCTgLfXPYodyL5dzFj8HCpx92PQXFUi359vBNCCQceI3PnQUfMG6oFMLoxXH xpfgPP04WPYBJtIiCi2HyQgxL6q3zUq7zp+tYr0DTLI1P5jbYRP9IwRF/x83WiTKo70Z EsoHh2Xli8wu0NJgX/YqAfUwknZafiheWsbbZr/jPINPKxskhPVsrHY4VhREIMgnMf7w ZKuOZDLoFwKRjWzlgrzEQmWzfWNNEg+h74QwQTeiVMosLdIqbdI/TEJDVxMHpRmnglsb /8Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BQszsIlQqsooj5gDAGmY6RU64iOnhfI7B772izNBsYM=; b=lygBdDiTg013Aw5KeaYOhc7wTKBedlizQOMxlYcr+h70VXLHWPNzPCR0RaePRuU9d6 dsSgCsgHIjm734eqd5CIF4JfXc6ljWlmOz5eMy7ovWAB+KQ3v2pD/J6Bryt3LGIliZ64 aj08a+L4MMdYRGQPwHEyn4z4ItUQ5rFwVq4zY5rMTYKvLs32ZxcypWu8F2qJsJ79Vx/B Q5BapDMSnP53IdrzmhNbzBuzfiwRt9OrOoc0cI3JVq1Tn5fRwaPD5yCBdc9d1CslkEt+ t2/aiaVcXs+oDesqpKzLHTNEuo4RhbgFr/x63sL868oXOCZbsXBaF3WiiS/wIo9a4WZR G1Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ee8gnuGL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si34528008otn.216.2020.01.05.21.54.41; Sun, 05 Jan 2020 21:54:54 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=ee8gnuGL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726681AbgAFFxw (ORCPT + 99 others); Mon, 6 Jan 2020 00:53:52 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:37263 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgAFFxv (ORCPT ); Mon, 6 Jan 2020 00:53:51 -0500 Received: by mail-ot1-f67.google.com with SMTP id k14so70202421otn.4 for ; Sun, 05 Jan 2020 21:53:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BQszsIlQqsooj5gDAGmY6RU64iOnhfI7B772izNBsYM=; b=ee8gnuGL69ozRuwZUJpSr4P6/DsEbehVpg4t432EFwemYqGGmlTb0iEdTOJmBVFpqp hFp1pQTG5THio9gam+tEfphxOt7f07ndimYZ2YwRz/ZmY3sg/pApil4/ADDJeo8ldFcR ZjcNeHD2cwIMauayBpfJOLip/orBSkK1pItTPLQIFIzaiCrPVbQG7TJyiqcvoV9Ndo0W KHHbbmsHkoA/jg+Aakp6SGBlkhLiRmq17t11KZb4Q12IjoSmBxBD7tAWhVYgOfe9MUQS ZSEipdwYIyfI7+fO/xa2fEZw3tWIRFIFGZc1c7tG0MGzCMiCdoJmOPJseJlEmHxZuY5b /MnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BQszsIlQqsooj5gDAGmY6RU64iOnhfI7B772izNBsYM=; b=HNdSaxxSuim0awDDfF+xA+EAZYJoq7yiZuIe8Orv48QxtxHC8B8gsuyso8lqeRCznp zsr1D2APi5i1+diLl0jan9RODpXTOqlXmi42aIqtzVEsU+IAiqc1uIwAk5s/2gA7zc/E cvjTUUD7hllAPE45bq5BoqLr5EYrJMsV8FtEbGGdjVhzrYCz6M63GlDLqHfWHK6GbBr6 2PweocJCh2Npj/CUjSQ5cEB9rnz+lKYZOKsL0Bk6zUUdSPwfMiK1frkFUjc/3SELR+3y 5LCFk6IJxStCNq8fiWfreU2kt9fQe3ohGfqF8wlgkD7kOxtRU24wC2xo/IKG83kA8Dml vhRQ== X-Gm-Message-State: APjAAAVnPl2loPgx2t7RWZNL7IMStx32fjLrBAKw6bJRcqi3PSJ8foBC uUHud4BajwemuFfXdJJtrXKy4rVuQ/+nEe7Dz1IcHLrA X-Received: by 2002:a05:6830:2009:: with SMTP id e9mr62849528otp.160.1578290030741; Sun, 05 Jan 2020 21:53:50 -0800 (PST) MIME-Version: 1.0 References: <20200105090537.19979-1-oshpigelman@habana.ai> <20200105090537.19979-2-oshpigelman@habana.ai> In-Reply-To: <20200105090537.19979-2-oshpigelman@habana.ai> From: Oded Gabbay Date: Mon, 6 Jan 2020 07:53:43 +0200 Message-ID: Subject: Re: [PATCH 2/2] habanalabs: do not halt Coresight during hard reset To: Omer Shpigelman Cc: "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 5, 2020 at 11:05 AM Omer Shpigelman wrote: > > During hard reset we must not write to the device. > Hence avoid halting Coresight during user context close if it is done > during hard reset. > In addition, we must not reenable clock gating afterwards as it was > deliberately disabled in the beginning of the hard reset flow. > > Signed-off-by: Omer Shpigelman > --- > drivers/misc/habanalabs/device.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c > index 166883b64725..b680b0caa69b 100644 > --- a/drivers/misc/habanalabs/device.c > +++ b/drivers/misc/habanalabs/device.c > @@ -598,7 +598,9 @@ int hl_device_set_debug_mode(struct hl_device *hdev, bool enable) > goto out; > } > > - hdev->asic_funcs->halt_coresight(hdev); > + if (!hdev->hard_reset_pending) > + hdev->asic_funcs->halt_coresight(hdev); > + > hdev->in_debug = 0; > > goto out; > -- > 2.17.1 > Both patches are: Reviewed-by: Oded Gabbay Applied to -next Thanks, Oded