Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5824707rwb; Tue, 22 Nov 2022 05:31:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf4z4dzJ5YEh186cJzDrws463ueuSxH7Ou10NDhTH4gB5rAR1QUSaE0zHPlTCToZkyNqt0PX X-Received: by 2002:aa7:84c3:0:b0:56d:60bc:7ec6 with SMTP id x3-20020aa784c3000000b0056d60bc7ec6mr10625274pfn.70.1669123879426; Tue, 22 Nov 2022 05:31:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669123879; cv=none; d=google.com; s=arc-20160816; b=Ap6RpH6UcoJTH1R1CCrNBEqFuQJ4D2tr80boR4R6FXbQW9MjwSFyH8C526TmIy/y1+ ZAPcFosrrCp1PapRe3h9e2zfuuRWOe5ulEdH5bQU8hfZaeXakMi9ilCAFw0F1fseSXIT GmQeYtZcOk5WM/dD5/leP47kwkRXXSt5utOgp4SXEf5xOnDvrz5YlCKvd7L4N0+r8RQJ NspNHr03cL+bPhorvsJujiU8JmURRNanb+lKbPwgbx6FQr/6Ue/yUh06CpPMDr5cjk2q wc+hdNXYy8yX3b/HA6QUw/t2o739zM5PQssqxlwnZxGBTXYwAEqf5rp5k2PqGIYgCe5P hPrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=Com1g3yFlCN6PTtMGsATGiNdC6Z5/qjUNPFdtPPkThk=; b=JMIBC5tgr8NhcnjFt+UTaexIg84cH72lzSUf6/0limXz2CIZ+3Vox4/c1jpHP3erTY SROaLOPZvqj+VnnJed+6/9sG9e0+jgzV1bJ6CqpNdkEeABhA3JQ9CnluLBFeRhydXIV7 YxQO31ixSZ8ZqbImuvkTKE9zqWC828wHNYGe9Md0/hNvLD8GJFw7HW7nam0r/1PDk9zS t/eVG8UEqSkDGgTHnh8W+9JOoecHcMrt/WixDgADozoQf6GMX3c8/j7dSyTwPK/oiEe2 exEiJajMSIGsOeGFdBq3y0vyFCG0567s0/RY6qO02RPoHNVh6ok5PRZqg16QbuRGJHfO jUTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a056a000a9400b0053e0d9dfee5si15476637pfl.217.2022.11.22.05.31.06; Tue, 22 Nov 2022 05:31:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233714AbiKVNX6 (ORCPT + 91 others); Tue, 22 Nov 2022 08:23:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233065AbiKVNXv (ORCPT ); Tue, 22 Nov 2022 08:23:51 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B719313EA8; Tue, 22 Nov 2022 05:23:46 -0800 (PST) Received: from dggpeml500025.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NGlGt4Mw9zqSLS; Tue, 22 Nov 2022 21:19:50 +0800 (CST) Received: from dggpeml500002.china.huawei.com (7.185.36.158) by dggpeml500025.china.huawei.com (7.185.36.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 22 Nov 2022 21:23:44 +0800 Received: from [10.67.103.44] (10.67.103.44) 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.2375.31; Tue, 22 Nov 2022 21:23:44 +0800 Subject: Re: [PATCH v13 1/2] drivers/coresight: Add UltraSoc System Memory Buffer driver To: Suzuki Kuruppassery Poulose , , , , , References: <20221114090316.63157-1-hejunhao3@huawei.com> <20221114090316.63157-2-hejunhao3@huawei.com> <92291cb2-859c-a994-b05d-806def431376@arm.com> <1c8da30c-d798-729d-c8e5-73a07f8b9f18@arm.com> CC: , , , , , , , , , From: hejunhao Message-ID: <95024107-94d2-6114-4c50-b152c4da362b@huawei.com> Date: Tue, 22 Nov 2022 21:23:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1c8da30c-d798-729d-c8e5-73a07f8b9f18@arm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.44] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500002.china.huawei.com (7.185.36.158) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/11/21 18:47, Suzuki Kuruppassery Poulose wrote: > On 18/11/2022 12:45, hejunhao wrote: >> Hi Suzuki , >> >> >> On 2022/11/15 19:06, Suzuki K Poulose wrote: >>> On 14/11/2022 09:03, Junhao He wrote: >>>> From: Qi Liu >>>> > >>>> +static void smb_init_hw(struct smb_drv_data *drvdata) >>>> +{ >>>> + /* First disable SMB and clear the status of SMB buffer */ >>>> + smb_reset_buffer_status(drvdata); >>>> + smb_disable_hw(drvdata); >>>> + smb_purge_data(drvdata); >>>> + >>>> + writel(SMB_LB_CFG_LO_DEFAULT, drvdata->base + SMB_LB_CFG_LO_REG); >>>> + writel(SMB_LB_CFG_HI_DEFAULT, drvdata->base + SMB_LB_CFG_HI_REG); >>>> + writel(SMB_GLB_CFG_DEFAULT, drvdata->base + SMB_GLB_CFG_REG); >>>> + writel(SMB_GLB_INT_CFG, drvdata->base + SMB_GLB_INT_REG); >>>> + writel(SMB_LB_INT_CTRL_CFG, drvdata->base + SMB_LB_INT_CTRL_REG); >>> >>> Does this come with interrupt on overflow ? Do we not use this ? >>> >> When the buffer overflow, no interrupt will come. >> Interrupt will upgrade SMB_LB_INT_STS_REG register status if start >> trace. >> Thanks. >>> Rest looks fine to me. > > What is the purpose of the "Interrupt" on the SMB ? It is not clear to > me. The SMB_LB_INT_CTRL_REG register control the validity of both real-time events and interrupts. When logical buffer status changes causes to issue an interrupt at the same time as it issues a real-time event. Real-time events are used in SMB driver, which needs to get the buffer status. Interrupts are used in debugger mode and cannot be registered in kernel. ..._BUF_NOTE_MASK control which events flags or interrupts are valid. Thanks. Best regards, Junhao. > Suzuki > > _______________________________________________ > CoreSight mailing list -- coresight@lists.linaro.org > To unsubscribe send an email to coresight-leave@lists.linaro.org