All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: firewire-lib: replace in_interrupt() with in_softirq()
@ 2021-06-11  8:34 Takashi Sakamoto
  2021-06-12  7:31 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Sakamoto @ 2021-06-11  8:34 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel, clemens

Tasklet is used to handle isochronous context of 1394 OHCI. The explicit
usage of in_softirq() may be preferable than in_interrupt().

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/amdtp-stream-trace.h | 2 +-
 sound/firewire/amdtp-stream.c       | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/firewire/amdtp-stream-trace.h b/sound/firewire/amdtp-stream-trace.h
index aa53c13b89d3..5fd2aeccdfc2 100644
--- a/sound/firewire/amdtp-stream-trace.h
+++ b/sound/firewire/amdtp-stream-trace.h
@@ -49,7 +49,7 @@ TRACE_EVENT(amdtp_packet,
 		__entry->data_blocks = data_blocks;
 		__entry->data_block_counter = data_block_counter,
 		__entry->packet_index = packet_index;
-		__entry->irq = !!in_interrupt();
+		__entry->irq = !!in_softirq();
 		__entry->index = index;
 	),
 	TP_printk(
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 1d9bc7b07df1..aad9778d1c4d 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -610,7 +610,7 @@ static void update_pcm_pointers(struct amdtp_stream *s,
 		// buffer associated to PCM substream to process PCM frames in the buffer, instead
 		// of receiving notification of period elapsed by poll wait.
 		if (!pcm->runtime->no_period_wakeup) {
-			if (in_interrupt()) {
+			if (in_softirq()) {
 				// In software IRQ context for 1394 OHCI.
 				snd_pcm_period_elapsed(pcm);
 			} else {
@@ -1026,7 +1026,7 @@ static void generate_pkt_descs(struct amdtp_stream *s, const __be32 *ctx_header,
 static inline void cancel_stream(struct amdtp_stream *s)
 {
 	s->packet_index = -1;
-	if (in_interrupt())
+	if (in_softirq())
 		amdtp_stream_pcm_abort(s);
 	WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
 }
@@ -1738,7 +1738,7 @@ unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d,
 	if (irq_target && amdtp_stream_running(irq_target)) {
 		// In software IRQ context, the call causes dead-lock to disable the tasklet
 		// synchronously.
-		if (!in_interrupt())
+		if (!in_softirq())
 			fw_iso_context_flush_completions(irq_target->context);
 	}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: firewire-lib: replace in_interrupt() with in_softirq()
  2021-06-11  8:34 [PATCH] ALSA: firewire-lib: replace in_interrupt() with in_softirq() Takashi Sakamoto
@ 2021-06-12  7:31 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-06-12  7:31 UTC (permalink / raw)
  To: Takashi Sakamoto; +Cc: alsa-devel, clemens

On Fri, 11 Jun 2021 10:34:25 +0200,
Takashi Sakamoto wrote:
> 
> Tasklet is used to handle isochronous context of 1394 OHCI. The explicit
> usage of in_softirq() may be preferable than in_interrupt().
> 
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-12  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11  8:34 [PATCH] ALSA: firewire-lib: replace in_interrupt() with in_softirq() Takashi Sakamoto
2021-06-12  7:31 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.