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

Commit bc2d968f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull parisc updates from Helge Deller:
 "Main fixes and updates in this patch series are:
   - we faced kernel stack corruptions because of multiple delivery of
     interrupts
   - added kernel stack overflow checks
   - added possibility to use dedicated stacks for irq processing
   - initial support for page sizes > 4k
   - more information in /proc/interrupts (e.g.  TLB flushes and number
     of IPI calls)
   - documented how the parisc gateway page works
   - and of course quite some other smaller cleanups and fixes."

* 'parisc-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: tlb flush counting fix for SMP and UP
  parisc: more irq statistics in /proc/interrupts
  parisc: implement irq stacks
  parisc: add kernel stack overflow check
  parisc: only re-enable interrupts if we need to schedule or deliver signals when returning to userspace
  parisc: implement atomic64_dec_if_positive()
  parisc: use long branch in fork_like macro
  parisc: fix NATIVE set up in build
  parisc: document the parisc gateway page
  parisc: fix partly 16/64k PAGE_SIZE boot
  parisc: Provide default implementation for dma_{alloc, free}_attrs
  parisc: fix whitespace errors in arch/parisc/kernel/traps.c
  parisc: remove the second argument of kmap_atomic
parents d75e2f90 0fc537d1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ config PARISC
	select BUG
	select HAVE_PERF_EVENTS
	select GENERIC_ATOMIC64 if !64BIT
	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
	select HAVE_GENERIC_HARDIRQS
	select BROKEN_RODATA
	select GENERIC_IRQ_PROBE
@@ -242,6 +243,14 @@ config SMP

	  If you don't know what to do here, say N.

config IRQSTACKS
	bool "Use separate kernel stacks when processing interrupts"
	default n
	help
	  If you say Y here the kernel will use separate kernel stacks
	  for handling hard and soft interrupts.  This can help avoid
	  overflowing the process kernel stacks.

config HOTPLUG_CPU
	bool
	default y if SMP
+11 −0
Original line number Diff line number Diff line
@@ -13,3 +13,14 @@ config DEBUG_RODATA
         If in doubt, say "N".

endmenu

config DEBUG_STACKOVERFLOW
	bool "Check for stack overflows"
	default y
	depends on DEBUG_KERNEL
	---help---
	  Say Y here if you want to check the overflows of kernel, IRQ
	  and exception stacks. This option will cause messages of the
	  stacks in detail when free stack space drops below a certain
	  limit.
	  If in doubt, say "N".
+1 −3
Original line number Diff line number Diff line
@@ -24,9 +24,7 @@ CHECKFLAGS += -D__hppa__=1
LIBGCC		= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

MACHINE		:= $(shell uname -m)
ifeq ($(MACHINE),parisc*)
NATIVE		:= 1
endif
NATIVE		:= $(if $(filter parisc%,$(MACHINE)),1,0)

ifdef CONFIG_64BIT
UTS_MACHINE	:= parisc64
+23 −0
Original line number Diff line number Diff line
@@ -229,6 +229,29 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)

#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)

/*
 * atomic64_dec_if_positive - decrement by 1 if old value positive
 * @v: pointer of type atomic_t
 *
 * The function returns the old value of *v minus 1, even if
 * the atomic variable, v, was not decremented.
 */
static inline long atomic64_dec_if_positive(atomic64_t *v)
{
	long c, old, dec;
	c = atomic64_read(v);
	for (;;) {
		dec = c - 1;
		if (unlikely(dec < 0))
			break;
		old = atomic64_cmpxchg((v), c, dec);
		if (likely(old == c))
			break;
		c = old;
	}
	return dec;
}

#endif /* !CONFIG_64BIT */


+3 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ extern struct hppa_dma_ops pcx_dma_ops;

extern struct hppa_dma_ops *hppa_dma_ops;

#define dma_alloc_attrs(d, s, h, f, a) dma_alloc_coherent(d, s, h, f)
#define dma_free_attrs(d, s, h, f, a) dma_free_coherent(d, s, h, f)

static inline void *
dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
		   gfp_t flag)
Loading