Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3036527pxb; Fri, 12 Feb 2021 07:41:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJziV8nIlX2U1nh9mp5evB4Xif59ZuRutCnuzOCHzys6rHN0+3qafvlQXoXGz8WixUJ/CXKC X-Received: by 2002:a05:600c:4857:: with SMTP id j23mr3306521wmo.31.1613144502306; Fri, 12 Feb 2021 07:41:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613144502; cv=pass; d=google.com; s=arc-20160816; b=BlH0qBJTdPyeEX+KlqrFC7GM0EP4bgkWg1aB9n8urkWjeL+72+tK8iyeG3rSE4kIuJ /3bvXc1C/JPJUHNnPXSzsehHhSdm0mKPgG1YUZE58Wc6tsExcxHrtXrGAwJWAg+79CLq F/B5N/YXU4iVkbRRzc31NZG0NIdQXQ7ej2e/6B7aTkKAegHQwvpVjkL4f5jNNZKzHsJw uTwRD2LhFTaA12YT5rBKFaqWMk8ezHg49lEhaYpUZcBlJWTKmUShhMIzcdyqExFyLqme UEqvOihwQ9r+BHTyEZdY55CemfsiaNMBCcqv9LGrOacjdqlO3pYCzGK8dIacp5Ji2d3Q 2gew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=sfNC+4g6LQisBKLiz9qzXbUvPjJ8oNLtTVDRtO6OXvA=; b=rSj3o/NY0kKoAeaOjz76RF63koO03Ewuyb4pD00CC+6YyO6iIBdHJ42eS4b3J8OqGY /FUGVq4vx961oofGrypVb188Nk/KsBk1aN7OMq8jXuFoZvOw0za9A5cRZ0Ux8kSuytkQ a/CFUVu16oOTsWDAFPaBy5eAQvQSBwNIxNQpzzzzt/Q7WoepIN2qlK7iVsEUWvgcTubz cGEEnaqw3WJOkh7VIqGlGrFi0VUdqrt3KLP92bCxRbobMcI/GfX9hEgc5Gm+zodbI4wd XLzz8rnsug6xbGMd+K3mOMJYRtXXeZ2G/Kei1kfPF9nDee+vERRNcHxsBHVfp+QkfZYM X+Lg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@renesasgroup.onmicrosoft.com header.s=selector2-renesasgroup-onmicrosoft-com header.b="ZTLs/ZEf"; arc=pass (i=1 spf=pass spfdomain=renesas.com dkim=pass dkdomain=renesas.com dmarc=pass fromdomain=renesas.com); 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y91si2069113ede.244.2021.02.12.07.41.18; Fri, 12 Feb 2021 07:41:42 -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=@renesasgroup.onmicrosoft.com header.s=selector2-renesasgroup-onmicrosoft-com header.b="ZTLs/ZEf"; arc=pass (i=1 spf=pass spfdomain=renesas.com dkim=pass dkdomain=renesas.com dmarc=pass fromdomain=renesas.com); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbhBLPjy (ORCPT + 99 others); Fri, 12 Feb 2021 10:39:54 -0500 Received: from mail-eopbgr1410100.outbound.protection.outlook.com ([40.107.141.100]:56560 "EHLO JPN01-OS2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229974AbhBLPjw (ORCPT ); Fri, 12 Feb 2021 10:39:52 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfvP4EfMgG0I9kS20gopACUFIY/PjX9y3/4rFd0kQhaI21Akzf9li5i7g7ydjL1bG8apvgjOhy7TDkZ7jm2CgIuwk5FvX6i/RCTmbW3+AGEXCmdmIaLFCk1kQ7mMN/+WAI9msO+lQR4Bv9miObe6rN0ygoZTO2tPivEUDy1d1n7Pa2Sxf7GdURgB/WZ1RXe7eUQ4p/oLPenll0UoHEwLvqRDzaIE+aMLJ6z0D6uk35L6/i+9aTiXWUYXwG8h+sVSPAg3YyyXaGq965K+A8fSsk9M4NvopOZFhQefd+IUcMounAo3ObUNRfj5kRmlFzSh8juj+/2X36Jb1SnelVIQiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sfNC+4g6LQisBKLiz9qzXbUvPjJ8oNLtTVDRtO6OXvA=; b=lqJFYfJbC7yzkECB37qq6KBBb863/fsxLVjDuFDsQdle+M3Zqgdd5BqG7/X5LEZPReRdAAcbUw9GeNU/Dcodel5Gz4vaRMc3oieEw+kYyMtyRZRNAUt9CLpuyDZ1++UdBF71QWQgldhLwiCNWutclV79BBIt+mFmiOyblgxQmIhOKeZkApsaUNMPs/CnCj4a86TtjyNr+I0oVaCT0UV+f5IvYc8dDX2EM7j7c76gS0mYPEne18Wa9jGv8e/cJq6dMiNZPYchDk0l0kVs/jXWALqOpBMC/uV0FHPED9VnOKCkc7iKrBnrxkhUEUlaLPwVfZkmLMVJetr65NvPSG0jLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector2-renesasgroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sfNC+4g6LQisBKLiz9qzXbUvPjJ8oNLtTVDRtO6OXvA=; b=ZTLs/ZEfVLQ+iZDHHRvQPsVhzBar1Qtzk4LON7ns6ADMYus950oyJG7aUW5GYpljmAlJjm9cHRv6Ao9CPMxHZWxfvAJuBfI4AEKOjtp3TXla0XbDxcx3A+Z0A5dYXB6luYqJ9i7QagoXsbknqSthUZSA0RLQr7Yudrg9GTvD9W0= Received: from OSBPR01MB4773.jpnprd01.prod.outlook.com (2603:1096:604:7a::23) by OSBPR01MB4599.jpnprd01.prod.outlook.com (2603:1096:604:77::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.19; Fri, 12 Feb 2021 15:39:03 +0000 Received: from OSBPR01MB4773.jpnprd01.prod.outlook.com ([fe80::1971:336c:e4c0:8c5]) by OSBPR01MB4773.jpnprd01.prod.outlook.com ([fe80::1971:336c:e4c0:8c5%3]) with mapi id 15.20.3846.029; Fri, 12 Feb 2021 15:39:03 +0000 From: Min Li To: Greg KH CC: "derek.kiernan@xilinx.com" , "dragan.cvetic@xilinx.com" , "arnd@arndb.de" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support Thread-Topic: [PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support Thread-Index: AQHXANy3Kc3xxVsbt0Wl/bCSqSMNqapUIqQAgACD5GA= Date: Fri, 12 Feb 2021 15:39:03 +0000 Message-ID: References: <1613092575-17311-1-git-send-email-min.li.xe@renesas.com> In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linuxfoundation.org; dkim=none (message not signed) header.d=none;linuxfoundation.org; dmarc=none action=none header.from=renesas.com; x-originating-ip: [72.140.114.230] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 0410dc21-e381-4d13-a393-08d8cf6c538c x-ms-traffictypediagnostic: OSBPR01MB4599: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lldDybsY/KIoOv90orjhhVtcZLCJUmpRaQ3urSPuWNOyufXJSpkzPSs/hZE2ljJNjruNv5lgJVHemxImdRhCgePqU+dhXIITaQsASPPxMd/VVQxuH3CZvPuYl1qz5nhWSaIbkSVijnf7HZbs9umKqiJ6CoPGMDyo8QWdF64KPjZ1rGigiQJqwthSySGIi/PMM7vEU5PxYRblJ3SG7wyVFrpzA1KxmKRoDKZ1trtxYymNhuO8TvqWwUQXAv9PQwt/zIFMbB2kLLph/jp1j6fnY0iQy8q9QlZqOz/rBlYh2Ti+hH5ewSx3lopHLHRRaObqzy3sYzs2evi3NC3/+W4dbduGq13Hmk9+fnUKZrSifwWVNyTNna8MXchZEeVeRBJhSk8aWzlvLdXk3l4sA1R86HkkW6NqgBjoGsykUg7PikH+MiPzdL8pGZwvY9AZGy5oU1+VeoUFfUosUhoJ2WdhGasmAZGLYdzm67RgmJx+SEN0f4fD6xL/P0qGUlxGkVuqHYGUWEiw6ZA5xJWZZvtYEQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OSBPR01MB4773.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(376002)(396003)(366004)(346002)(39850400004)(33656002)(64756008)(52536014)(6506007)(316002)(66476007)(76116006)(71200400001)(66556008)(54906003)(66446008)(86362001)(7696005)(6916009)(55016002)(4744005)(9686003)(186003)(5660300002)(8676002)(478600001)(8936002)(4326008)(2906002)(66946007)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?gGYzyTtZAXVZBbqhpCjC2d0MWRks6/cN4ch67YBv12fLJXavqcwZ9SZZ0ufI?= =?us-ascii?Q?mzAUnWsvX3PN5zgQp7N2YWWYqZ2LreuhO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?RbzwiRgVtuCXxDQjx7Vatry8izFMtJO4DqkBZ0FWFjQKHgagGv+6bCfA7JMt?= =?us-ascii?Q?5WX4zCDz2X8OS7MnT/rnX0olp2SskWdNHovWotfpGnn3Xlj534C7DnVcV1Fz?= =?us-ascii?Q?fxLhf384EBEiV2ne++Xckd0NYPmI1pvDBorX4iLRzjazvNz7zKULK9dOK86I?= =?us-ascii?Q?l9XNWYZriaQ8Kn6Cgu7EzFBDP97keEoc6unesJ40DYyjJLyRw/2Mms6iNeMd?= =?us-ascii?Q?X+O4Tzb35Xk4fuv66/edQAgSUpHgF9TvZVF5ZzoM0DQr3SS05LnVsow9Qt8B?= =?us-ascii?Q?KODRk9CT8AuBqCGL13W384zTd3t20gjhedSaBH63wUbUOckcW8ibh6OwYSIW?= =?us-ascii?Q?PpVxFW+XnUQu3URc0eqzw9h3?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: OSBPR01MB4773.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0410dc21-e381-4d13-a393-08d8cf6c538c X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Feb 2021 15:39:03.7229 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UxwyEGFtElRopiaWSh+GlCn6dkYDAgz1WtLLmTytUwNyfrYsW9HHhQaJ7lUm2ytUVoZM3FEQvzQDLEwKxO2cyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB4599 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > + > > + /* Only one open per device at a time */ > > + if (!atomic_dec_and_test(&rsmu->open_count)) { > > + atomic_inc(&rsmu->open_count); > > + return -EBUSY; >=20 > This does not do what you think it does, and does not prevent multiple > applications from talking to your device at the same time. >=20 > There is no need for this at all, as it does not work, sorry. If multipl= e apps > talk to your device, it's their fault, not the kernel's fault, that thing= s go > wrong. >=20 > And I thought that Arnd already told you to fix this? >=20 Hi Greg Sorry for not replying to the list, I am new so not very familiar with the = process. Can you elaborate why it doesn't work? I kind of borrow the idea from xilin= x_sdfec.c and I don't see why it doesn't work. I mean if an application failed at opening the device, how can it proceed t= o talk the device without a file descriptor? Thanks Min