Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1808167ybk; Mon, 11 May 2020 04:55:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaVZAYM/5znrpp2/nVUSE2oskkVEQumbAuTscfO9wZQKTtGTRLqkFWgOWkffw0DEV0ITCm X-Received: by 2002:aa7:c243:: with SMTP id y3mr2039342edo.54.1589198137284; Mon, 11 May 2020 04:55:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589198137; cv=none; d=google.com; s=arc-20160816; b=y/xwo5P0UWlaTNo+uT7H6MKOO4OorwhnHaKDMgT6lw40Gljb5b9FN+jrL+WALMJ/Fk f1G84hNyIh/53mPr4/sydsn0gxweenDRlh112DzgJ0DKPrjJ984r28lKeh9GlK6OtjFU 94rXi0HdFPs5vsMnw19AQH+4aYQbDX3ZvisAX5wjReFcIZm/r8U5nOMR4vwG0eAGajtE o84AFcwyX3EDBGMt+D38h2xQphOSfIkyc7KIgf/bM9xY+aAuheRAewm9gXLNB0p9a0zU 7b1LG9pwJivpAaBvNkPeg0ewA5SCN3Xs5xStToYSUqpvmrX8/p85gFGzsCXBIRtzNPih zYZA== 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=NeHRpybSf1hZUCecDPTXMsxHP/0MCclV9yk5G+Y9ElM=; b=WeflAxBW2paCggCcQH7zMfmxyxkvD7u714kSGg0tGI/wlBwqL+KI6rNWxyYjQDbJ2O 16TUHv1QfbXRDh4PQFPMbmgDG8hGlpLYyUky0yC6c8OKul+h+uMSO/MY8uowXMldtpkE sZYGwOiT21mKnHc3MgMQSmLrHsu6cxYAJlG+xWMaujZKK3ZLkuGFxSlGDnbq5357d+Xb JBLQgw6f5G31vNOCtRqAwE/UdZsZwCoF97xn4qtz55/hYjRvWOMyP30bv1B7BBUyCv+0 QsoE0mD2f4jJBD2xMOx2ux9+kDhHzWwj7/FQO4WkRMgro2E79QJyOcZgpZOeBB7sx2Yc 6MwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FvCTwObS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id v12si944994ejq.534.2020.05.11.04.55.14; Mon, 11 May 2020 04:55:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FvCTwObS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729453AbgEKLv0 (ORCPT + 99 others); Mon, 11 May 2020 07:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727019AbgEKLvZ (ORCPT ); Mon, 11 May 2020 07:51:25 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A04A4C061A0C for ; Mon, 11 May 2020 04:51:25 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id m13so7270502otf.6 for ; Mon, 11 May 2020 04:51:25 -0700 (PDT) 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=NeHRpybSf1hZUCecDPTXMsxHP/0MCclV9yk5G+Y9ElM=; b=FvCTwObSUK/MSdWWjp6LdXPWvXftuK25+1iJJPGIDFcuzADJ1lqKsneCun9PQlUILM IbHxRU/2/UxYvP86NguZ6KvjiOasgPyzGxY+Wl/0kttIzOpE0s/lCVm7xk0H20W/xuwR 5fMs/5LZRiZ7F53MqB3Eyakhbw3Xe/Xc2eOSVenLMLbvMUdE8sa2B8SB4geRaRjMMvPW BT9ihGf+3XwjsG/o62/6vsF8MyqF60zAy93GRzu/pQAH/SbZeInVVMY1gqk6oZAgbUmF 36d0FVFknNDNXbJ3LwO76AZHx5FpSR7essMlz83xi3MGSyEPQZPavQ7E6NvJsheFFrIS eSQA== 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=NeHRpybSf1hZUCecDPTXMsxHP/0MCclV9yk5G+Y9ElM=; b=LkRK/mX3ZEORU2pLb0GG8wyoKqHjVWeId24ZhdjuRQyXD+/pJ8yNFSTJRoOToetEsd goerErbj4KV8vd3Coi0sQTd6Y7omcIM24UrSEQUs/4SKC+Ls/LX5ZSo6OKhazzqxofm+ N9Oh+mzVwR2HSJaGSO8CS50/GQtTdBwDymwysDnNLWZLesy/kCwsEoMGVjpnqY0YmScF nwk0t4y1tVOFPyxrp5EOKtEG+vGiGEBg7CZzRVEtlKw5br0x7zjSR2hRAphXTKZeS++u SeysXn85wmhyT+Ijb9emnokhcS0yTzBpZ0Ys+IR8W8X9ua9iJn6Y3bSreVfaQf3oBPYO F6cA== X-Gm-Message-State: AGi0PuZLSAbYWCzFzpimdMYHR/D5yK3YdKUORtKw7+Il2ypkmHWaZUk+ /DNXBgQmjCoqB6EmVfz7jVbc+mXOlm4OLMFwcHM= X-Received: by 2002:a9d:7990:: with SMTP id h16mr11948575otm.145.1589197884912; Mon, 11 May 2020 04:51:24 -0700 (PDT) MIME-Version: 1.0 References: <20200510111015.20134-1-oshpigelman@habana.ai> In-Reply-To: <20200510111015.20134-1-oshpigelman@habana.ai> From: Oded Gabbay Date: Mon, 11 May 2020 14:50:40 +0300 Message-ID: Subject: Re: [PATCH] habanalabs: check if CoreSight is supported 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, May 10, 2020 at 2:10 PM Omer Shpigelman wrote: > > Coresight is not supported on simulator, therefore add a boolean for > checking that (currently used by un-upstreamed code). > > Signed-off-by: Omer Shpigelman > --- > drivers/misc/habanalabs/goya/goya.c | 1 + > drivers/misc/habanalabs/habanalabs.h | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c > index b3e2354aaca2..fb2ff82e0db5 100644 > --- a/drivers/misc/habanalabs/goya/goya.c > +++ b/drivers/misc/habanalabs/goya/goya.c > @@ -751,6 +751,7 @@ static int goya_sw_init(struct hl_device *hdev) > } > > spin_lock_init(&goya->hw_queues_lock); > + hdev->supports_coresight = true; > > return 0; > > diff --git a/drivers/misc/habanalabs/habanalabs.h b/drivers/misc/habanalabs/habanalabs.h > index a68df32094f1..cfb306daa8d4 100644 > --- a/drivers/misc/habanalabs/habanalabs.h > +++ b/drivers/misc/habanalabs/habanalabs.h > @@ -1415,6 +1415,7 @@ struct hl_device_idle_busy_ts { > * @cdev_sysfs_created: were char devices and sysfs nodes created. > * @stop_on_err: true if engines should stop on error. > * @supports_sync_stream: is sync stream supported. > + * @supports_coresight: is CoreSight supported. > */ > struct hl_device { > struct pci_dev *pdev; > @@ -1498,6 +1499,7 @@ struct hl_device { > u8 cdev_sysfs_created; > u8 stop_on_err; > u8 supports_sync_stream; > + u8 supports_coresight; > > /* Parameters for bring-up */ > u8 mmu_enable; > -- > 2.17.1 > This patch is: Reviewed-by: Oded Gabbay