From patchwork Wed Apr 12 18:56:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 82637 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp545325vqo; Wed, 12 Apr 2023 12:06:45 -0700 (PDT) X-Google-Smtp-Source: AKy350aPd3rgvTNSuOgIOKOPgRY46dcflUuRqYpR80835kYL8POi6nHPdNp0DvmVo/vpQp1LJJTL X-Received: by 2002:a17:902:e887:b0:1a6:3b04:92bb with SMTP id w7-20020a170902e88700b001a63b0492bbmr4859507plg.18.1681326405180; Wed, 12 Apr 2023 12:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681326405; cv=none; d=google.com; s=arc-20160816; b=N8OdpFgoiMf73UYwbVrwXh6ocRn16kHOdlyzgyq2YK6NplcL8YEc7CwNcOJ9KwovI7 XPkEDHvAq8SXx48xnj+ikw9CkrGAjj2vRlTsO/ZjNQmPu0vF+7GkBYi6zqNZlzZjmn0j SUznVJtU2Br7pWe6fnVdFuwmPkFhBRNak765yqvzztuncDVv/awe5OloJnWUkm5UpRLI Twwob8KFz4H2hbSuuNyVKL8JXhTAoN+TCkFU73YoZ0dudUN3PcLWamxdnycljgZVVusM oK+YFC38xDgFlu3bevyJ57I+2LLxwzQLRZdiheQ2VXpGp8tBHiWLz5p3wuA2Ta0qV312 pAcg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lR3MrlronEpgXpGIZkzM44/5qUvZENCA31eOhQI2jc8=; b=iyWnmBP36URequRrEEKkboWlO+QxAsUjvePqcBkOWwiBKIARaELH7BSN5n8GHDq5vz G/BotaC0ngnPcwXvPUG2nKVzEWpEulMjGPxJl2feq8NUhch92AO3jTfKFHgIMCANKl95 EJOBFdGYFJQa1B/z779rpERQRmTsFNjAlTyUorI5jcGVgECMieB9YtmSROwTQwGAL+Bf x++d5M6BKkO0FmBMrWLq2U8+txPOi7XhHB9IUIKhKpCRZt3SqPPMwEwn4NkqzZR3SI1S mx0xwWmOP73Kty0RJla9t5HGamG8kq1i1O6RDYjJkB7M6nspKA/dktO9cOlC/CQBgP0S 7kJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="bwLC9j/G"; 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=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k186-20020a6384c3000000b005194496616bsi9538022pgd.348.2023.04.12.12.06.32; Wed, 12 Apr 2023 12:06:45 -0700 (PDT) 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; dkim=pass header.i=@ibm.com header.s=pp1 header.b="bwLC9j/G"; 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=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229679AbjDLS4W (ORCPT + 99 others); Wed, 12 Apr 2023 14:56:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbjDLS4S (ORCPT ); Wed, 12 Apr 2023 14:56:18 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FE6330EE for ; Wed, 12 Apr 2023 11:56:18 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33CIiXPc002905; Wed, 12 Apr 2023 18:56:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=lR3MrlronEpgXpGIZkzM44/5qUvZENCA31eOhQI2jc8=; b=bwLC9j/GRU9s8SFKrE3gEt1Kz8+UK60yP7gYKn67Ifw6aGpFUvDLbvZD5NqORtqLierf qEJnnleUjNs8mM8vlJ0UGoWr44whmagNAAZXKz0eCkRZKAjWt+zJdKTGLKBM2JCXDUZX ebqknFfGxbQg4Kc/0/FPQTA5NWstct00XVvNiXZTNUi/kzso3lVo2INnvfms657CZTNR 1cJ+nSEhljFg4Hj4JK/gQdKN+kjWjLypLD92Uq2ktUIPhdctzIum3McoD/Z8dNh87z6P W9sSzAy5QUZXOofUXw2E6XGxEpaaPowN2T4uBT048WeKltLGKN5lMXkIst9OHfXApmUZ Aw== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3px0aamxb1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Apr 2023 18:56:11 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33CGwRXV013526; Wed, 12 Apr 2023 18:56:10 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([9.208.129.119]) by ppma01wdc.us.ibm.com (PPS) with ESMTPS id 3pu0m6qnqg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Apr 2023 18:56:10 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33CIu91d35521254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Apr 2023 18:56:09 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E99BC5805F; Wed, 12 Apr 2023 18:56:08 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E077958065; Wed, 12 Apr 2023 18:56:07 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.16.129]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 12 Apr 2023 18:56:07 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, joel@jms.id.au, jk@ozlabs.org, alistair@popple.id.au, Eddie James Subject: [PATCH 1/2] fsi: core: Lock scan mutex for master index removal Date: Wed, 12 Apr 2023 13:56:01 -0500 Message-Id: <20230412185602.1592629-2-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230412185602.1592629-1-eajames@linux.ibm.com> References: <20230412185602.1592629-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: fwItIhmNL4A7cirOU_J2x14QFlvSWnSx X-Proofpoint-ORIG-GUID: fwItIhmNL4A7cirOU_J2x14QFlvSWnSx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-12_08,2023-04-12_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304120160 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762998388734370355?= X-GMAIL-MSGID: =?utf-8?q?1762998516954575760?= If a master scan occurs while the master is being unregistered, the devicecs may end up with incorrect and possibly duplicate names, resulting in kernel warnings. Ensure the master index isn't changed outside of the scan mutex. Signed-off-by: Eddie James --- drivers/fsi/fsi-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index fcbf0469ce3f..18d4d68482d7 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -1354,12 +1354,12 @@ EXPORT_SYMBOL_GPL(fsi_master_register); void fsi_master_unregister(struct fsi_master *master) { + mutex_lock(&master->scan_lock); if (master->idx >= 0) { ida_simple_remove(&master_ida, master->idx); master->idx = -1; } - mutex_lock(&master->scan_lock); fsi_master_unscan(master); mutex_unlock(&master->scan_lock); device_unregister(&master->dev); From patchwork Wed Apr 12 18:56:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 82647 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp561602vqo; Wed, 12 Apr 2023 12:39:24 -0700 (PDT) X-Google-Smtp-Source: AKy350a5rTyPl+L/RLbD3rkDDkPOlOYN3IYBiCtlkTEao/NAvafZPGuIAVsoL3/iGWKvJ7U6+By1 X-Received: by 2002:a62:7b49:0:b0:632:c041:270c with SMTP id w70-20020a627b49000000b00632c041270cmr17456315pfc.28.1681328364438; Wed, 12 Apr 2023 12:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681328364; cv=none; d=google.com; s=arc-20160816; b=l0teLavahHDqaliaKAnhtBqG3jieES+k+m3Ib4aCS1j+dGDmv25znBNqWSyG7z+IQ+ 3b6Kts5EQb1FkIeSx58ssfgQ2bpAiLjd/6PyGcc8FCHoV3zhNkOw9AHBY3076/mV+TWM YYgdYwKQhrTiasit/J117CSpwl5/XKhpxJRQxJUFG52fPgF/RMoGmD/hv1ncgcJ7NI4i oMTv3X1r1y7AB3ROF0gMsMN5gK29FLKMCSDGQ3l50yTAju28FxRQEEbYR7EE5YXNzXL3 /mgykH5tUx7Q6tW0LdftWllFCUIDaNSDhk4I/B/1eXqg6Wlms9L93TqI3ZjcJ7NfornO zcaA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=A+AQ0VkVoNK1ioW6jyr48kGGbCTamlovvFjQCS+ekE4=; b=tw4hp5eVCH0tLVAeaK9ezj+wyLodkPoJnuXUE63Ij4N9QpySc+qLu6VdnOZnKRGVMR ouUsGBekne9I+qJIMLtApaKMo2SHzfv7jDRk3FNi+HNPvddzgitmRcsEor+Uk/s4zzA+ gSNeRbF4FHbCFo4Tq6vI8oRTzMKXf5Kiym0JOzAsonEF4SjlWCl93+iUq4X+kS42Zm8w IE45NAWeuUSI/NYREWiJj3g43caAxxR6r5qqL5CtdBfhpdCOIjvdLL455ZwZhsHypUEy T+k9qJActmxtqH66wbDTZ7pRjclaAicFjZYudnzo3Aq6w7dTQUUyjfoc9HGO/aQVTSlW nbww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JfebaIP6; 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=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w26-20020aa7955a000000b0062b90348402si1557606pfq.106.2023.04.12.12.39.03; Wed, 12 Apr 2023 12:39:24 -0700 (PDT) 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; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JfebaIP6; 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=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230223AbjDLS40 (ORCPT + 99 others); Wed, 12 Apr 2023 14:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230155AbjDLS4U (ORCPT ); Wed, 12 Apr 2023 14:56:20 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 191A19D for ; Wed, 12 Apr 2023 11:56:19 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33CIiX8U002876; Wed, 12 Apr 2023 18:56:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=A+AQ0VkVoNK1ioW6jyr48kGGbCTamlovvFjQCS+ekE4=; b=JfebaIP6gUvCDTgUIcAB2TLzRtMpSvMmURMt+Z0mjpHJRF9aAngkTr8gOI/Nny7vZsBY y8A5++36vfAYjuSSRvV4T45i0AhOeqWTEAiJqvLY0KJfMzAOpMnYXGkfrdtJGzFHInrG 7FAsoH7ax/xqVnPLsekBi5GmThnyLVkRSmECM7quwzO2aiLRHv34dSRu4HTP5WnSivFN xRx/NU3HdX4lbQEdWlNTZikum19X4If7rM4GLhju9EI0wsT1XYp3HDpALhoKGlAf8P4X mFleYTf/1UoTnMhxxmAR4kIeq+I9G3tGFUMOL9Ercv+CttP8LrY0bK1OxZFkvVYwKAwi dQ== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3px0aamxbr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Apr 2023 18:56:12 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33CG0Zkk027951; Wed, 12 Apr 2023 18:56:11 GMT Received: from smtprelay02.wdc07v.mail.ibm.com ([9.208.129.120]) by ppma01dal.us.ibm.com (PPS) with ESMTPS id 3pu0jjdjyv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Apr 2023 18:56:11 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33CIuAHP17105498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Apr 2023 18:56:10 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 29CBE58061; Wed, 12 Apr 2023 18:56:10 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2FA2D58066; Wed, 12 Apr 2023 18:56:09 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.16.129]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 12 Apr 2023 18:56:09 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, joel@jms.id.au, jk@ozlabs.org, alistair@popple.id.au, Eddie James Subject: [PATCH 2/2] fsi: core: Add trace events for scan and unregister Date: Wed, 12 Apr 2023 13:56:02 -0500 Message-Id: <20230412185602.1592629-3-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230412185602.1592629-1-eajames@linux.ibm.com> References: <20230412185602.1592629-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 4eydNhc6ZZzjaM04BpqFSyPGVLoI2OoS X-Proofpoint-ORIG-GUID: 4eydNhc6ZZzjaM04BpqFSyPGVLoI2OoS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-12_08,2023-04-12_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304120160 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763000570876372789?= X-GMAIL-MSGID: =?utf-8?q?1763000570876372789?= Add more trace events for the scanning and unregistration functions for debug purposes. Signed-off-by: Eddie James Reviewed-by: Joel Stanley --- drivers/fsi/fsi-core.c | 4 ++++ include/trace/events/fsi.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index 18d4d68482d7..2dc119ab073c 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -1220,6 +1220,7 @@ static int fsi_master_scan(struct fsi_master *master) { int link, rc; + trace_fsi_master_scan(master, true); for (link = 0; link < master->n_links; link++) { rc = fsi_master_link_enable(master, link); if (rc) { @@ -1261,6 +1262,7 @@ static int fsi_master_remove_slave(struct device *dev, void *arg) static void fsi_master_unscan(struct fsi_master *master) { + trace_fsi_master_scan(master, false); device_for_each_child(&master->dev, NULL, fsi_master_remove_slave); } @@ -1355,6 +1357,8 @@ EXPORT_SYMBOL_GPL(fsi_master_register); void fsi_master_unregister(struct fsi_master *master) { mutex_lock(&master->scan_lock); + trace_fsi_master_unregister(master); + if (master->idx >= 0) { ida_simple_remove(&master_ida, master->idx); master->idx = -1; diff --git a/include/trace/events/fsi.h b/include/trace/events/fsi.h index c9a72e8432b8..5ff15126ad9d 100644 --- a/include/trace/events/fsi.h +++ b/include/trace/events/fsi.h @@ -122,6 +122,37 @@ TRACE_EVENT(fsi_master_break, ) ); +TRACE_EVENT(fsi_master_scan, + TP_PROTO(const struct fsi_master *master, bool scan), + TP_ARGS(master, scan), + TP_STRUCT__entry( + __field(int, master_idx) + __field(int, n_links) + __field(bool, scan) + ), + TP_fast_assign( + __entry->master_idx = master->idx; + __entry->n_links = master->n_links; + __entry->scan = scan; + ), + TP_printk("fsi%d (%d links) %s", __entry->master_idx, __entry->n_links, + __entry->scan ? "scan" : "unscan") +); + +TRACE_EVENT(fsi_master_unregister, + TP_PROTO(const struct fsi_master *master), + TP_ARGS(master), + TP_STRUCT__entry( + __field(int, master_idx) + __field(int, n_links) + ), + TP_fast_assign( + __entry->master_idx = master->idx; + __entry->n_links = master->n_links; + ), + TP_printk("fsi%d (%d links)", __entry->master_idx, __entry->n_links) +); + TRACE_EVENT(fsi_slave_init, TP_PROTO(const struct fsi_slave *slave), TP_ARGS(slave),