From patchwork Sat Oct 21 08:38:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hejunhao X-Patchwork-Id: 15714 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp184040vqx; Sat, 21 Oct 2023 01:38:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkWZiIKwSNXdonX0UivG1WxAwHc7E/bO/kYp0dw+qjG3tIU8Mm+KxF0yX/TFFmKzKE8i4q X-Received: by 2002:a17:90b:4f42:b0:27c:f8d4:a4ca with SMTP id pj2-20020a17090b4f4200b0027cf8d4a4camr3771298pjb.44.1697877494812; Sat, 21 Oct 2023 01:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697877494; cv=none; d=google.com; s=arc-20160816; b=IdgVT7NE0VG6DWEafZXbEHTtnOJxViXHtNkqsFy8XRIIWSiH4Z7hajf1FsgscSILDg vryfCNhHXX7oYhfXzcSg+y1LhTRLTbdjKAvyUOji8/9V4/v2U02AU+OfVEqYNKtRi2vG LajlWNMgqxIArcWmlIAbbrv7QlI2+PBTAOOq8Gwp/P6uDiwQgUth3S13AsHbGN9m2E1m d2KqMhhPvLfBj57ECmXoYdmFb3L4MfFu9OIaRgJfZNMGE7AvEpsE6ihvjst8nYaWj4lv BrZ9K3Ckp1yMuMkPT6DJBU0FhO22uVYdMhYQaTPUGrhshJaxIsG8KQ8U66ndSsJgraqy g46Q== 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 :message-id:date:subject:cc:to:from; bh=j8Deo5Z2AXKiZhsF9cJ+XX47lcb7aR5OfTkh0rEe6HQ=; fh=DAAgJLf4s0smpgJqxZKr7c0el7KScJ0FbfhkC9eFTa4=; b=Mgp6Phb8oLEAl6BNb3R7BsRG8PUWmphzX6kGxoOZG4Kzjw+x0nxAUM9JQDJsBwUEF9 1RRDOCGopqJuMC37w7QJfqX3QVyOHQyFaKAg046IqOy6kpE8jSSLdMLqBfoKDgcnSE/h dRKZMWa5PB+3UribZt2X6uJJFRPmkEWFT5I7VRl4LSPwUBhCw0k5yAN30jtJsf4+kM6w rcDkMVCa/oDu5B4LaXT27en5iottZyiPXP2s9ewei8iZDHQCVmX5hLmpafHrSqxiBd/0 auKFcAfNJ73gRd5ZlPrEqQhnT4zjPaq3thS2+wsV4xBvoBrE9+Ux/KQPbaOwwtUM5L5n rGkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f10-20020a17090ace0a00b0027d12ed9e08si5740275pju.106.2023.10.21.01.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 01:38:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B71ED801B99B; Sat, 21 Oct 2023 01:38:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbjJUIiA (ORCPT + 26 others); Sat, 21 Oct 2023 04:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjJUIh7 (ORCPT ); Sat, 21 Oct 2023 04:37:59 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E6CED55 for ; Sat, 21 Oct 2023 01:37:57 -0700 (PDT) Received: from dggpeml500002.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SCF9D52JxzNp0N; Sat, 21 Oct 2023 16:33:52 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggpeml500002.china.huawei.com (7.185.36.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sat, 21 Oct 2023 16:37:53 +0800 From: Junhao He To: , CC: , , , , , , , Subject: [PATCH v2 0/4] Fixed some issues and cleanup of ultrasoc-smb Date: Sat, 21 Oct 2023 16:38:18 +0800 Message-ID: <20231021083822.18239-1-hejunhao3@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500002.china.huawei.com (7.185.36.158) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 21 Oct 2023 01:38:11 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780353592302481249 X-GMAIL-MSGID: 1780353592302481249 Fix the Three issues listed below and use guards to cleanup a) Fixed the BUG of atomic-sleep b) Fixed uninitialized before use buf_hw_base c) Fixed use unreset SMB buffer Changes since V1: * Add comment for remove lock from smb_read() * Move reset buffer to before register sink * Remove patch "simplify the code for check to_copy valid" * Add two new patches Link to V1: https://lore.kernel.org/lkml/20231012094706.21565-1-hejunhao3@huawei.com/ Junhao He (4): coresight: ultrasoc-smb: Fix sleep while close preempt in enable_smb coresight: ultrasoc-smb: Config SMB buffer before register sink coresight: ultrasoc-smb: Fix uninitialized before use buf_hw_base coresight: ultrasoc-smb: Use guards to cleanup drivers/hwtracing/coresight/ultrasoc-smb.c | 108 +++++++-------------- drivers/hwtracing/coresight/ultrasoc-smb.h | 6 +- 2 files changed, 37 insertions(+), 77 deletions(-)