From owner-freebsd-arm@freebsd.org Wed Jul 29 19:35:32 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 281CF36A491 for ; Wed, 29 Jul 2020 19:35:32 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BH3fq2vgbz4B1N for ; Wed, 29 Jul 2020 19:35:31 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1596051330; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=ZIjiqcb38QjBuJkwKHH36X+6lxL8jRZvE3Eahcy356P22xWvDN3++rJpylg9XXo/M4fmhVGoSPTDa LJwzMi77PxB4xZIOzkSmzzewmaGDToA34ryQIgu5Xb7+frDGBoL++gdgxDMZtKSvn/KXhQ72N+yhwV UMzyWmriHiE3Ks2Z3yygYDP/D7+jN2zsIKa6K0j12RcKevYvHNsjAjW7Nc0YP7Sj272aps5zfpF8BE Sf8YYDjNQHI9oH4F9Ukd8qH5B122DLbp5wGp5jmbRPvKJvgOY9GS5NEvYLdj6dZNtNVCmA0+6DmPFQ 9a/9q195rU/piK/xAqK/A/xjar5Etgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=4t1Jtx3r43q3wGoqCu0vhEb8AJT5UgRIbWG1kVagBm8=; b=Eux1oRdzKhi/VcZ92ZfQL/U5Xtc7vu946MNUIz5+VUhJxGe+iPaIHmTJYsJR5SMnRErSHPU8+IWT+ E9b3y4euElaU/4a1sKRK/YEtQ5x1W/HfIH4X6uo2oPvO4wS7ZIZoJn+Z6TCmDLDDUp5TXR+PQDES3S 8WfZH1k7QwnHUtQd25WUoO5Yqt/ezDvmaKqQglg/gx438xHeYmATG4RljliHCFKjnzx7aQ9CrKFSNT VvR0uFlew7b3KDRV89y4REvTj02hCu8rZ2vVJUARdY4od8TCgS2SWow271XtPNYmf9YAoWVSAnqBS7 i4XtBA7imFM5wRtR0MtVNlwSJtRn1vg== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=4t1Jtx3r43q3wGoqCu0vhEb8AJT5UgRIbWG1kVagBm8=; b=JllLafgk0o2+PQe8TCmfKi+3BXxL767YtCT1l0POaOvOdqJTR7MJOEKKwojNBO7JETy6oEahMZKxG XH3N8B73FWZEGGz8ydUiStjlccPOaGgUzXPSEa6SwevI/9RsDBMNXFSBZ4pKFSMY/kDHa2i18KvFj/ Wbi8YgI83Ty5RCWyXconzjbVCzd5LvNSb8N6Hr3Ep6Hx+TVJkPURjRfC/n1n3MOOvV1Q3ztm7U+1QK e1LzW4BqOpDwNi6agsavP8Soi+0gnCR0jM6H977t1OeXd+akWSscfGuvdi4rievNa8j0vLt9iyeBab WivKtfqei9lWnURztslQfdlUxqZtq2g== X-MHO-RoutePath: aGlwcGll X-MHO-User: a7d588d1-d1d2-11ea-b630-6b8aa7872eb8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id a7d588d1-d1d2-11ea-b630-6b8aa7872eb8; Wed, 29 Jul 2020 19:35:28 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 06TJZR0V007184; Wed, 29 Jul 2020 13:35:27 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: mutexes From: Ian Lepore To: kamalp@acm.org, freebsd-arm@freebsd.org Date: Wed, 29 Jul 2020 13:35:27 -0600 In-Reply-To: References: Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BH3fq2vgbz4B1N X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2020 19:35:32 -0000 On Thu, 2020-07-30 at 00:56 +0530, Kamal R. Prasad wrote: > hello, > > i have 2 instances of an spi controller (pl022) on my setup. can someone > tell me :- > 1. is there any danger if we interleave spi io transfers between these 2 > controllers i.e spi transfer starts on controller 0 and before it can > finish, controller 1 starts spi transfer. the 2 controllers have different > spi slave devices. > 2. assuming there is an issue with that, how to setup a mutex in the code > path so that it is common to both instances of pl022 driver? > I have never encountered a system with multiple instances of a SPI controller where they interfered with each other in any way. Unless there is documentation to the contrary for your hardware, I think it is safe to assume that you can have two unrelated SPI transfers happening on the two different instances without any problems. -- Ian