Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932931AbbLCLHg (ORCPT ); Thu, 3 Dec 2015 06:07:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:42879 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759871AbbLCLH1 (ORCPT ); Thu, 3 Dec 2015 06:07:27 -0500 Date: Thu, 03 Dec 2015 12:07:26 +0100 Message-ID: From: Takashi Iwai To: Mark Brown Cc: Koro Chen , lgirdwood@gmail.com, alsa-devel@alsa-project.org, srv_heupstream@mediatek.com, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [alsa-devel] [PATCH] ASoC: mediatek: Use current HW pointer for pointer callback In-Reply-To: <20151203110158.GD5727@sirena.org.uk> References: <1449129208-63615-1-git-send-email-koro.chen@mediatek.com> <20151203110158.GD5727@sirena.org.uk> 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/24.5 (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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 769 Lines: 21 On Thu, 03 Dec 2015 12:01:58 +0100, Mark Brown wrote: > > On Thu, Dec 03, 2015 at 10:41:38AM +0100, Takashi Iwai wrote: > > > While reading this patch, I wondered how regmap can be used safely in > > an irq-disabled context. Mark, do we have any API for that? > > We can use user supplied locks or spin_lock_irqsave(). I meant how to guarantee to make regmap_read() working in an already spin-locked context, typically in an irq handler? regmap_read() involves with the regcache and it may invoke kmalloc(). Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/