Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4001171yba; Wed, 17 Apr 2019 02:24:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqynonaSLzFhonLiyNH0UEU+16WtCruUikA4jM2pfu+JahJJtqE4+2SPHYTiVrL++F5hNuDr X-Received: by 2002:a62:e710:: with SMTP id s16mr79965671pfh.74.1555493080810; Wed, 17 Apr 2019 02:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555493080; cv=none; d=google.com; s=arc-20160816; b=qmb1rakOtrjDu6e8UBmanzFIMSAVDHeWJTcJCJeztUGkPJLpW7np6GpaXsSh/QrUkL 5Q32sTJlg6NGztKyUEHtlU1GW5v01bEHSq02vzaBQPvsl/Z30HM+WTjnFoeTlvzLAjae Vzked4qp+hvpZrcn7xwokd+y9h3jyHamoMvgnk9YfGhE/gCZ4vfeqw0KDSPJFxQNFCuS AVliLJaG2Ar1OjSh34qOdQqvAxnwWP1nIbfoxYEiAx40R0Ymu27iv9LjWWmkXoK0LTc8 hAnIsFbkdGq5eKNEC2fWrP5SQZ3BWMkCMcAB+2dzLjmGSMce4rRgSpPh21scaqHrfyNO VTVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=ZNgkJ6OjhrLI9bmg+IF6CG+sfTIJQyZ37jZcHc2yZzo=; b=lnkePqGKG2iz9wOCukbAPteeGqenBWds6AeJoqla1MTJW+4i4mySnhjuw7JuEx5uZO iH0FHm8l6r681aUE7TIgmikUGW4IhNC14dCuvm7XesTVaWc/l26NLm7BRb6kvlcwSLp7 8P5PtxPsDE/X9y/F++WOcSLtD+1dqiR75dDsXtwQoqq/eSYIZuN84UFvARZ9n88p91bg cZ1xDvNM8GdoszXnAFT87RbTgKWUDtzgjt3i8zU/Q+oIxvMkgzwE8LVggDhjFRVzX0re rbsnLcjsYL5kIE0t8tocye8nufnpo+lXqwz69gkkMA1r0UMXE5YWQ2yji5jb9sIb3ZaD 4kRg== 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 o19si49751176pgh.409.2019.04.17.02.24.25; Wed, 17 Apr 2019 02:24:40 -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 S1731624AbfDQJVv (ORCPT + 99 others); Wed, 17 Apr 2019 05:21:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:49280 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731611AbfDQJVu (ORCPT ); Wed, 17 Apr 2019 05:21:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BC4E4B143; Wed, 17 Apr 2019 09:21:49 +0000 (UTC) Date: Wed, 17 Apr 2019 11:21:48 +0200 Message-ID: From: Takashi Iwai To: Cc: , , , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [ALSA patch] [PATCH] ALSA: pcm: Enable MMAP status and control for ARMv7 and ARMv8 In-Reply-To: <1555490771-13242-1-git-send-email-twischer@de.adit-jv.com> References: <1555490771-13242-1-git-send-email-twischer@de.adit-jv.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Apr 2019 10:46:11 +0200, wrote: > > From: Timo Wischer > > Since ARMv7 hardware cache coherence is supported. > "The SCU maintains coherency between the individual data caches in the > Cortex-A5 MPCore processor using a variation of the MOESI protocol" [1]. > > Therefore this patch enables the MMAP access to the status and control > structures. This avoids HWSYYNC ioctl calls and therefore lowers the CPU > usage. > > [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0434c/ > BABJECBF.html Interesting... I thought it would never work properly on ARM. If it really works like that, I'd happily apply the change. But I'd like to hear a confirmation from ARM people before merging such an intensive change. thanks, Takashi > > Signed-off-by: Timo Wischer > --- > sound/core/pcm_native.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c > index 1d84529..b8019ef 100644 > --- a/sound/core/pcm_native.c > +++ b/sound/core/pcm_native.c > @@ -3225,7 +3225,8 @@ static __poll_t snd_pcm_poll(struct file *file, poll_table *wait) > * Only on coherent architectures, we can mmap the status and the control records > * for effcient data transfer. On others, we have to use HWSYNC ioctl... > */ > -#if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_ALPHA) > +#if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_ALPHA) || \ > + (defined(CONFIG_ARM) && defined(CONFIG_CPU_V7)) || defined(CONFIG_ARM64) > /* > * mmap status record > */ > -- > 2.7.4 > > _______________________________________________ > Patch mailing list > Patch@alsa-project.org > https://mailman.alsa-project.org/mailman/listinfo/patch >