mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
Merge branch 'core/irq_work' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into irq/core
irq_work fixes and cleanups, in preparation for full dyntics support. Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
786133f6e8
16 changed files with 15 additions and 24 deletions
|
@ -5,7 +5,6 @@ config ALPHA
|
||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select HAVE_OPROFILE
|
select HAVE_OPROFILE
|
||||||
select HAVE_SYSCALL_WRAPPERS
|
select HAVE_SYSCALL_WRAPPERS
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_PCSPKR_PLATFORM
|
select HAVE_PCSPKR_PLATFORM
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select HAVE_DMA_ATTRS
|
select HAVE_DMA_ATTRS
|
||||||
|
|
|
@ -36,7 +36,6 @@ config ARM
|
||||||
select HAVE_GENERIC_HARDIRQS
|
select HAVE_GENERIC_HARDIRQS
|
||||||
select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7))
|
select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7))
|
||||||
select HAVE_IDE if PCI || ISA || PCMCIA
|
select HAVE_IDE if PCI || ISA || PCMCIA
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_KERNEL_GZIP
|
select HAVE_KERNEL_GZIP
|
||||||
select HAVE_KERNEL_LZMA
|
select HAVE_KERNEL_LZMA
|
||||||
select HAVE_KERNEL_LZO
|
select HAVE_KERNEL_LZO
|
||||||
|
|
|
@ -21,7 +21,6 @@ config ARM64
|
||||||
select HAVE_GENERIC_DMA_COHERENT
|
select HAVE_GENERIC_DMA_COHERENT
|
||||||
select HAVE_GENERIC_HARDIRQS
|
select HAVE_GENERIC_HARDIRQS
|
||||||
select HAVE_HW_BREAKPOINT if PERF_EVENTS
|
select HAVE_HW_BREAKPOINT if PERF_EVENTS
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_MEMBLOCK
|
select HAVE_MEMBLOCK
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select IRQ_DOMAIN
|
select IRQ_DOMAIN
|
||||||
|
|
|
@ -24,7 +24,6 @@ config BLACKFIN
|
||||||
select HAVE_FUNCTION_TRACER
|
select HAVE_FUNCTION_TRACER
|
||||||
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
|
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
|
||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_KERNEL_GZIP if RAMKERNEL
|
select HAVE_KERNEL_GZIP if RAMKERNEL
|
||||||
select HAVE_KERNEL_BZIP2 if RAMKERNEL
|
select HAVE_KERNEL_BZIP2 if RAMKERNEL
|
||||||
select HAVE_KERNEL_LZMA if RAMKERNEL
|
select HAVE_KERNEL_LZMA if RAMKERNEL
|
||||||
|
|
|
@ -3,7 +3,6 @@ config FRV
|
||||||
default y
|
default y
|
||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select HAVE_ARCH_TRACEHOOK
|
select HAVE_ARCH_TRACEHOOK
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select HAVE_UID16
|
select HAVE_UID16
|
||||||
select HAVE_GENERIC_HARDIRQS
|
select HAVE_GENERIC_HARDIRQS
|
||||||
|
|
|
@ -14,7 +14,6 @@ config HEXAGON
|
||||||
# select HAVE_CLK
|
# select HAVE_CLK
|
||||||
# select IRQ_PER_CPU
|
# select IRQ_PER_CPU
|
||||||
# select GENERIC_PENDING_IRQ if SMP
|
# select GENERIC_PENDING_IRQ if SMP
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select GENERIC_ATOMIC64
|
select GENERIC_ATOMIC64
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select HAVE_GENERIC_HARDIRQS
|
select HAVE_GENERIC_HARDIRQS
|
||||||
|
|
|
@ -4,7 +4,6 @@ config MIPS
|
||||||
select HAVE_GENERIC_DMA_COHERENT
|
select HAVE_GENERIC_DMA_COHERENT
|
||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select HAVE_OPROFILE
|
select HAVE_OPROFILE
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select PERF_USE_VMALLOC
|
select PERF_USE_VMALLOC
|
||||||
select HAVE_ARCH_KGDB
|
select HAVE_ARCH_KGDB
|
||||||
|
|
|
@ -9,7 +9,6 @@ config PARISC
|
||||||
select RTC_DRV_GENERIC
|
select RTC_DRV_GENERIC
|
||||||
select INIT_ALL_POSSIBLE
|
select INIT_ALL_POSSIBLE
|
||||||
select BUG
|
select BUG
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select GENERIC_ATOMIC64 if !64BIT
|
select GENERIC_ATOMIC64 if !64BIT
|
||||||
select HAVE_GENERIC_HARDIRQS
|
select HAVE_GENERIC_HARDIRQS
|
||||||
|
|
|
@ -118,7 +118,6 @@ config PPC
|
||||||
select HAVE_SYSCALL_WRAPPERS if PPC64
|
select HAVE_SYSCALL_WRAPPERS if PPC64
|
||||||
select GENERIC_ATOMIC64 if PPC32
|
select GENERIC_ATOMIC64 if PPC32
|
||||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select HAVE_REGS_AND_STACK_ACCESS_API
|
select HAVE_REGS_AND_STACK_ACCESS_API
|
||||||
select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
|
select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
|
||||||
|
|
|
@ -78,7 +78,6 @@ config S390
|
||||||
select HAVE_KVM if 64BIT
|
select HAVE_KVM if 64BIT
|
||||||
select HAVE_ARCH_TRACEHOOK
|
select HAVE_ARCH_TRACEHOOK
|
||||||
select INIT_ALL_POSSIBLE
|
select INIT_ALL_POSSIBLE
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||||
select HAVE_DEBUG_KMEMLEAK
|
select HAVE_DEBUG_KMEMLEAK
|
||||||
|
|
|
@ -11,7 +11,6 @@ config SUPERH
|
||||||
select HAVE_ARCH_TRACEHOOK
|
select HAVE_ARCH_TRACEHOOK
|
||||||
select HAVE_DMA_API_DEBUG
|
select HAVE_DMA_API_DEBUG
|
||||||
select HAVE_DMA_ATTRS
|
select HAVE_DMA_ATTRS
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select HAVE_DEBUG_BUGVERBOSE
|
select HAVE_DEBUG_BUGVERBOSE
|
||||||
select ARCH_HAVE_CUSTOM_GPIO_H
|
select ARCH_HAVE_CUSTOM_GPIO_H
|
||||||
|
|
|
@ -23,7 +23,6 @@ config SPARC
|
||||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||||
select RTC_CLASS
|
select RTC_CLASS
|
||||||
select RTC_DRV_M48T59
|
select RTC_DRV_M48T59
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_DMA_ATTRS
|
select HAVE_DMA_ATTRS
|
||||||
select HAVE_DMA_API_DEBUG
|
select HAVE_DMA_API_DEBUG
|
||||||
select HAVE_ARCH_JUMP_LABEL
|
select HAVE_ARCH_JUMP_LABEL
|
||||||
|
|
|
@ -28,7 +28,6 @@ config X86
|
||||||
select HAVE_OPROFILE
|
select HAVE_OPROFILE
|
||||||
select HAVE_PCSPKR_PLATFORM
|
select HAVE_PCSPKR_PLATFORM
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select HAVE_IRQ_WORK
|
|
||||||
select HAVE_IOREMAP_PROT
|
select HAVE_IOREMAP_PROT
|
||||||
select HAVE_KPROBES
|
select HAVE_KPROBES
|
||||||
select HAVE_MEMBLOCK
|
select HAVE_MEMBLOCK
|
||||||
|
|
|
@ -21,7 +21,6 @@ config IIO_GPIO_TRIGGER
|
||||||
config IIO_SYSFS_TRIGGER
|
config IIO_SYSFS_TRIGGER
|
||||||
tristate "SYSFS trigger"
|
tristate "SYSFS trigger"
|
||||||
depends on SYSFS
|
depends on SYSFS
|
||||||
depends on HAVE_IRQ_WORK
|
|
||||||
select IRQ_WORK
|
select IRQ_WORK
|
||||||
help
|
help
|
||||||
Provides support for using SYSFS entry as IIO triggers.
|
Provides support for using SYSFS entry as IIO triggers.
|
||||||
|
|
|
@ -20,12 +20,8 @@ config CONSTRUCTORS
|
||||||
bool
|
bool
|
||||||
depends on !UML
|
depends on !UML
|
||||||
|
|
||||||
config HAVE_IRQ_WORK
|
|
||||||
bool
|
|
||||||
|
|
||||||
config IRQ_WORK
|
config IRQ_WORK
|
||||||
bool
|
bool
|
||||||
depends on HAVE_IRQ_WORK
|
|
||||||
|
|
||||||
config BUILDTIME_EXTABLE_SORT
|
config BUILDTIME_EXTABLE_SORT
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -34,15 +34,21 @@ static DEFINE_PER_CPU(struct llist_head, irq_work_list);
|
||||||
*/
|
*/
|
||||||
static bool irq_work_claim(struct irq_work *work)
|
static bool irq_work_claim(struct irq_work *work)
|
||||||
{
|
{
|
||||||
unsigned long flags, nflags;
|
unsigned long flags, oflags, nflags;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Start with our best wish as a premise but only trust any
|
||||||
|
* flag value after cmpxchg() result.
|
||||||
|
*/
|
||||||
|
flags = work->flags & ~IRQ_WORK_PENDING;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
flags = work->flags;
|
|
||||||
if (flags & IRQ_WORK_PENDING)
|
|
||||||
return false;
|
|
||||||
nflags = flags | IRQ_WORK_FLAGS;
|
nflags = flags | IRQ_WORK_FLAGS;
|
||||||
if (cmpxchg(&work->flags, flags, nflags) == flags)
|
oflags = cmpxchg(&work->flags, flags, nflags);
|
||||||
|
if (oflags == flags)
|
||||||
break;
|
break;
|
||||||
|
if (oflags & IRQ_WORK_PENDING)
|
||||||
|
return false;
|
||||||
|
flags = oflags;
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,8 +125,11 @@ void irq_work_run(void)
|
||||||
/*
|
/*
|
||||||
* Clear the PENDING bit, after this point the @work
|
* Clear the PENDING bit, after this point the @work
|
||||||
* can be re-used.
|
* can be re-used.
|
||||||
|
* Make it immediately visible so that other CPUs trying
|
||||||
|
* to claim that work don't rely on us to handle their data
|
||||||
|
* while we are in the middle of the func.
|
||||||
*/
|
*/
|
||||||
work->flags = IRQ_WORK_BUSY;
|
xchg(&work->flags, IRQ_WORK_BUSY);
|
||||||
work->func(work);
|
work->func(work);
|
||||||
/*
|
/*
|
||||||
* Clear the BUSY bit and return to the free state if
|
* Clear the BUSY bit and return to the free state if
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue