Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c7714ab authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()"

parents 48eb5781 9490a249
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2,9 +2,6 @@
#define _M68K_IRQFLAGS_H

#include <linux/types.h>
#ifdef CONFIG_MMU
#include <linux/preempt_mask.h>
#endif
#include <linux/preempt.h>
#include <asm/thread_info.h>
#include <asm/entry.h>
+2 −2
Original line number Diff line number Diff line
@@ -93,9 +93,9 @@ static __always_inline bool __preempt_count_dec_and_test(void)
/*
 * Returns true when we need to resched and can (barring IRQ state).
 */
static __always_inline bool should_resched(void)
static __always_inline bool should_resched(int preempt_offset)
{
	return unlikely(!raw_cpu_read_4(__preempt_count));
	return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
}

#ifdef CONFIG_PREEMPT
+3 −2
Original line number Diff line number Diff line
@@ -74,9 +74,10 @@ static __always_inline bool __preempt_count_dec_and_test(void)
/*
 * Returns true when we need to resched and can (barring IRQ state).
 */
static __always_inline bool should_resched(void)
static __always_inline bool should_resched(int preempt_offset)
{
	return unlikely(!preempt_count() && tif_need_resched());
	return unlikely(preempt_count() == preempt_offset &&
			tif_need_resched());
}

#ifdef CONFIG_PREEMPT
+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
#define _LINUX_BH_H

#include <linux/preempt.h>
#include <linux/preempt_mask.h>

#ifdef CONFIG_TRACE_IRQFLAGS
extern void __local_bh_disable_ip(unsigned long ip, unsigned int cnt);
+1 −1
Original line number Diff line number Diff line
#ifndef LINUX_HARDIRQ_H
#define LINUX_HARDIRQ_H

#include <linux/preempt_mask.h>
#include <linux/preempt.h>
#include <linux/lockdep.h>
#include <linux/ftrace_irq.h>
#include <linux/vtime.h>
Loading