linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] arm64: preempt: Add NEED_RESCHED to the preempt_count()
@ 2022-09-05 14:18 wonder_rock
  2022-09-05 15:50 ` wonder_rock
  0 siblings, 1 reply; 3+ messages in thread
From: wonder_rock @ 2022-09-05 14:18 UTC (permalink / raw)
  To: catalin.marinas, will
  Cc: frederic, ardb, wonder_rock, mark.rutland, linux-arm-kernel,
	linux-kernel

From: Deyan Wang <wonder_rock@126.com>

preempt_count() will be checked in preempt_schedule_irq(),
we need check if NEED_RESCHED in preempt point.

Signed-off-by: Deyan Wang <wonder_rock@126.com>
---
 arch/arm64/include/asm/preempt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/preempt.h b/arch/arm64/include/asm/preempt.h
index 0159b625cc7f..083b0fd3c52a 100644
--- a/arch/arm64/include/asm/preempt.h
+++ b/arch/arm64/include/asm/preempt.h
@@ -10,7 +10,7 @@
 
 static inline int preempt_count(void)
 {
-	return READ_ONCE(current_thread_info()->preempt.count);
+	return READ_ONCE(current_thread_info()->preempt_count);
 }
 
 static inline void preempt_count_set(u64 pc)
-- 
2.25.1


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

* Re: [PATCH 1/1] arm64: preempt: Add NEED_RESCHED to the preempt_count()
  2022-09-05 14:18 [PATCH 1/1] arm64: preempt: Add NEED_RESCHED to the preempt_count() wonder_rock
@ 2022-09-05 15:50 ` wonder_rock
  2022-09-06 12:11   ` Will Deacon
  0 siblings, 1 reply; 3+ messages in thread
From: wonder_rock @ 2022-09-05 15:50 UTC (permalink / raw)
  To: catalin.marinas, will
  Cc: ardb, frederic, linux-arm-kernel, linux-kernel, mark.rutland

I know it is wrong. I just want to say I think preempt_count() need include NEED_RESCHED


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

* Re: [PATCH 1/1] arm64: preempt: Add NEED_RESCHED to the preempt_count()
  2022-09-05 15:50 ` wonder_rock
@ 2022-09-06 12:11   ` Will Deacon
  0 siblings, 0 replies; 3+ messages in thread
From: Will Deacon @ 2022-09-06 12:11 UTC (permalink / raw)
  To: wonder_rock
  Cc: catalin.marinas, ardb, frederic, linux-arm-kernel, linux-kernel,
	mark.rutland

On Mon, Sep 05, 2022 at 11:50:13PM +0800, wonder_rock@126.com wrote:
> I know it is wrong. I just want to say I think preempt_count() need include NEED_RESCHED

Won't that break everybody expecting a count? I'm not sure what you're
asking from us here.

Will

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

end of thread, other threads:[~2022-09-06 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 14:18 [PATCH 1/1] arm64: preempt: Add NEED_RESCHED to the preempt_count() wonder_rock
2022-09-05 15:50 ` wonder_rock
2022-09-06 12:11   ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).