Received: by 10.213.65.68 with SMTP id h4csp480863imn; Fri, 23 Mar 2018 08:41:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELso3TnlCHKvGqJEduv2AemKzXwmYd1AKTMlpFGWFKJbRlPP+hCIHI4R+VYy+8oV18OenoPU X-Received: by 10.98.13.211 with SMTP id 80mr24640568pfn.69.1521819684389; Fri, 23 Mar 2018 08:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521819684; cv=none; d=google.com; s=arc-20160816; b=QUMDg9391JZaG3mN3aKxP4TujMNpcL59VvcmT8F7x73vleQr2AgzuYYGJIW2I/3aON AyL6k0iGixb7J/pmMQP1Rceq7onJKDkzo49lJ8uP+nChcoI1vDBWZHF0M6O00okHziWV QHCibmStQCcVf4hYOElUs8ulpjzo0wKXPvMzuVBhFfUwVZNiHEZgibCAsT1apcGZpuax 3635nnyKwWIC+Tm2pWd3CaeU8mi1JUJmd4KvRLPWKuzd30DQ5FXJ3wqlEuYt5L034nd/ L8yA4s2DcybjnAQAxOENh/hh5s92d/DA3GZcvuekw+KZGNTxsvPXehpz4JGadAnOCk4L CCVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:arc-authentication-results; bh=lFVdu+Xf+tysj2ON2ebkWfGDy9IGad5+qNnimE7fGk8=; b=NY/hYNZZQALACLFglhQs1E3ICQib8b1F6glCxzEpYoEwA0D0XsgQlr1lFdC3Y8AdBB alDvsW1/XPOW4t+2w5aLHe2lQX5fgjRfBkgp0X2l5cH5ZZeV5QgwrnriKMuaIgzgoRQ1 uOqe9Rb0x4O21f0YxpzbPwoyUrXP6Opmrav+zOi4dmneACCjj5hG3bruuLDHbQ9kx4Xl zB3UrIeeBtNydOmc1+73WxMvQG82VjCiHzmbvQK30a7qp9njT2SOlZ9SxZYJXDuN4DQH BAHC191r8pzLZzuolxJvplw0ygIrugPEu8MQ0wbEv7Xe+pMHMme8FVUg/KCEx3AVDhQI 3LWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g132si6241332pgc.69.2018.03.23.08.41.09; Fri, 23 Mar 2018 08:41:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751811AbeCWPiy (ORCPT + 99 others); Fri, 23 Mar 2018 11:38:54 -0400 Received: from dd39320.kasserver.com ([85.13.155.146]:60250 "EHLO dd39320.kasserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbeCWPiy (ORCPT ); Fri, 23 Mar 2018 11:38:54 -0400 Received: from [192.168.0.32] (109.125.99.188.dynamic.cablesurf.de [109.125.99.188]) by dd39320.kasserver.com (Postfix) with ESMTPSA id A21782CE0691; Fri, 23 Mar 2018 16:38:51 +0100 (CET) Subject: Re: [PATCH] staging: pi433: add descriptions for mutex locks To: Valentin Vidic Cc: Greg Kroah-Hartman , =?UTF-8?Q?Simon_Sandstr=c3=b6m?= , Marcus Wolf , =?UTF-8?Q?Luca_S=c3=b6the?= , Marcin Ciupak , Michael Panzlaff , Derek Robson , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20180323094725.4904-1-Valentin.Vidic@CARNet.hr> <20180323114254.GL31333@gavran.carpriv.carnet.hr> From: Marcus Wolf Message-ID: <9442615c-5606-328a-f8cc-ad389af55ee3@smarthome-wolf.de> Date: Fri, 23 Mar 2018 16:38:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180323114254.GL31333@gavran.carpriv.carnet.hr> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Valentin, I had no time to work on the code for monthes now and the memorisation of my thoughts when I was programming that (approx. one year ago) is quite pale. As far as I remember, I read something, that the fifo has an integrated protection, so no external protection is needed. But absolutely unsure. If I will find some time within the next days, I'll have a look at the code and try to recall. But the most important thing already took place: We started thinking about it :-) Thanks, Marcus Am 23.03.2018 um 12:42 schrieb Valentin Vidic: > On Fri, Mar 23, 2018 at 11:22:39AM +0100, Marcus Wolf wrote: >> could you please decribe in short words, why you think, that hte lock >> isn't obsolete? >> >> I wasn't sure, but close to remove the lock. That's why I putted the >> comment. > > Sure, if pi433_tx_thread runs on one CPU it might be possible > to call pi433_write concurrently on another CPU and they would > both modify tx_fifo. But maybe there is some other protection > in place that would prevent this? > -- Smarthome-Wolf UG (haftungsbeschränkt) Helene-Lange-Weg 23 80637 München Amtsgericht München, HRB 223529 Umastzsteuer-ID: DE304719911 Geschäftsführer: Marcus Wolf