Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2313297pxb; Fri, 5 Feb 2021 14:46:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk1NxGHCefCf8jVMTp++hz58YPUX9RVEKiT3bAqf8kPmNkxx7VUMkBaDHXMQQXwA814ryK X-Received: by 2002:a05:6402:402:: with SMTP id q2mr5805636edv.116.1612565211393; Fri, 05 Feb 2021 14:46:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612565211; cv=none; d=google.com; s=arc-20160816; b=wwOXYMYG5rKkpRYo6ZZ6fydb99VlHDfs4mXZPOFUC5ltwbnRtrGDstHtZ4UloxtGH1 vFCyOgZ+sv3bzYxpMqskGToFciPLGp5itgoLFfvJezl03AIZ1mHotRkkr4/ljS7m2zvl snM0+aMoEYjt63UtS/pLpEO/ViPrTabUUOsz9hLLrUfM36HU2WmvsWypNn8u/ZZmADz2 +C7eLI69BkcgiylKg73SIIryNuU7U078cCxQlp6YrgdNgxW+xNFOf/MnFOhw4BLOd1mH QRvAHCO+9oN3kY0I60Q+ZOy6zEBcxG75GbIdpLJxtVW5Qq1HwdgwsszV6BydPtblLtu4 f2xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TCP9cMD0et/0xECT5GSYiJxsHqwYluPWbzotPNFvcDs=; b=04wGpVoD420HNZjOYp98LuM8bNJ67xiKH8HfV2DJwHB0TR8Z5EHnwMrC8M/tLewDoZ UcBw8jiM3cVIJCh/mlzgZBSXGyjrEr9hRHpmuYXdWPYpCHBrFqaq+tCdim23sgLmz6pH XBVPf2p2xfcQySUGjT/159I+x3S8soBycQKf4cUyFOHA0rDjcXJeF/y09AgbePTxnJyY 6UVTBJP4nH2ulTIsXv7nRaXhG14D3ANZrJoGPP+UTfq7xJ/C6WjgcJqOiLIJ955r0Adl Sy3P/8KayBV3O1N+31B+j/YyS8DD/0M2HQeq1ADKWJEDJx/EL+4WAW6zpD3JZOSP8kpE ssoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="aa/y1+JY"; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si6219096ejb.1.2021.02.05.14.46.26; Fri, 05 Feb 2021 14:46:51 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b="aa/y1+JY"; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232397AbhBEWon (ORCPT + 99 others); Fri, 5 Feb 2021 17:44:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:44452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232834AbhBEOwM (ORCPT ); Fri, 5 Feb 2021 09:52:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A2AE565023; Fri, 5 Feb 2021 14:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612534279; bh=FKVHPlqgWZf6FB0yq4aTtFJ9KHS1p/HLMiToBk7OHlw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aa/y1+JYuFiKfivfmjtQlG0FF7GWSyZynqQns+bHpQdIiAoiieicVEwh0PVNQX+Eb i5hxUIRDKBGAZVt8N5Utz6ikf6L2vPXC8+KK65yJrHy/5C+1YjB6IzZzMM2f6hB/hX xNsCMUxIoetpMyG2Ax/FsIUB1RP1TSCjfqKpVGWE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oded Gabbay , Sasha Levin Subject: [PATCH 5.10 52/57] habanalabs: fix backward compatibility of idle check Date: Fri, 5 Feb 2021 15:07:18 +0100 Message-Id: <20210205140658.214219970@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205140655.982616732@linuxfoundation.org> References: <20210205140655.982616732@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oded Gabbay [ Upstream commit f8abaf379bfe19600f96ae79a6759eb37039ae05 ] Need to take the lower 32 bits of the driver's 64-bit idle mask and put it in the legacy 32-bit variable that the userspace reads to know the idle mask. Signed-off-by: Oded Gabbay Signed-off-by: Sasha Levin --- drivers/misc/habanalabs/common/habanalabs_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/habanalabs/common/habanalabs_ioctl.c b/drivers/misc/habanalabs/common/habanalabs_ioctl.c index 07317ea491295..35401148969f5 100644 --- a/drivers/misc/habanalabs/common/habanalabs_ioctl.c +++ b/drivers/misc/habanalabs/common/habanalabs_ioctl.c @@ -133,6 +133,8 @@ static int hw_idle(struct hl_device *hdev, struct hl_info_args *args) hw_idle.is_idle = hdev->asic_funcs->is_device_idle(hdev, &hw_idle.busy_engines_mask_ext, NULL); + hw_idle.busy_engines_mask = + lower_32_bits(hw_idle.busy_engines_mask_ext); return copy_to_user(out, &hw_idle, min((size_t) max_size, sizeof(hw_idle))) ? -EFAULT : 0; -- 2.27.0