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

Commit f589e9bf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sparc updates from David Miller:

 1) Hibernation support, as well as removal of excess interrupt
    twiddling in MMU context allocation on sparc64 from Kirill Tkhai.

 2) Kill references to __ARCH_WANT_UNLOCKED_CTXSW.

 3) Sparc32 LEON bug fixes from Daniel Hellstrom and Andreas Larsson.

 4) Provide cmpxchg64(), from Geert Uytterhoeven.

 5) Device refcount and registry bug fixes from Federico Vaga and Wei
    Yongjun.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next:
  serial: sunsu: add missing platform_driver_unregister() when module exit
  sparc32, leon: Do not overwrite previously set irq flow handlers
  sparc/kernel/vio.c: add put_device() after device_find_child()
  sparc64: Do not save/restore interrupts in get_new_mmu_context()
  sparc: Consistently use 'wr' and 'rd' instructions for ASRs.
  sparc64: Kill __ARCH_WANT_UNLOCKED_CTXSW
  sparc64: Provide cmpxchg64()
  sparc64: Do not change num_physpages during initmem freeing
  sparc64: Hibernation support
  sparc,leon: updated GRPCI2 config name
  sparc,leon: support for GRPCI1 PCI host bridge controller
  sparc32,leon: add support for PCI busn resource for GRPCI2
parents 17319295 048c9acc
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -99,6 +99,9 @@ config HAVE_LATENCYTOP_SUPPORT
	bool
	default y if SPARC64

config ARCH_HIBERNATION_POSSIBLE
	def_bool y if SPARC64

config AUDIT_ARCH
	bool
	default y
@@ -303,6 +306,10 @@ config ARCH_SPARSEMEM_DEFAULT

source "mm/Kconfig"

if SPARC64
source "kernel/power/Kconfig"
endif

config SCHED_SMT
	bool "SMT (Hyperthreading) scheduler support"
	depends on SPARC64 && SMP
@@ -472,7 +479,18 @@ config LEON_PCI
	depends on PCI && SPARC_LEON
	default y

config GRPCI2
config SPARC_GRPCI1
	bool "GRPCI Host Bridge Support"
	depends on LEON_PCI
	default y
	help
	  Say Y here to include the GRPCI Host Bridge Driver. The GRPCI
	  PCI host controller is typically found in GRLIB SPARC32/LEON
	  systems. The driver has one property (all_pci_errors) controlled
	  from the bootloader that makes the GRPCI to generate interrupts
	  on detected PCI Parity and System errors.

config SPARC_GRPCI2
	bool "GRPCI2 Host Bridge Support"
	depends on LEON_PCI
	default y
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ core-y += arch/sparc/
libs-y                 += arch/sparc/prom/
libs-y                 += arch/sparc/lib/

drivers-$(CONFIG_PM) += arch/sparc/power/
drivers-$(CONFIG_OPROFILE)	+= arch/sparc/oprofile/

boot := arch/sparc/boot
+1 −0
Original line number Diff line number Diff line
@@ -141,5 +141,6 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr,
	BUILD_BUG_ON(sizeof(*(ptr)) != 8);				\
	cmpxchg_local((ptr), (o), (n));					\
  })
#define cmpxchg64(ptr, o, n)	cmpxchg64_local((ptr), (o), (n))

#endif /* __ARCH_SPARC64_CMPXCHG__ */
+3 −3
Original line number Diff line number Diff line
@@ -55,15 +55,15 @@

/* The Get Condition Codes software trap for userland. */
#define GETCC_TRAP \
        b getcc_trap_handler; mov %psr, %l0; nop; nop;
        b getcc_trap_handler; rd %psr, %l0; nop; nop;

/* The Set Condition Codes software trap for userland. */
#define SETCC_TRAP \
        b setcc_trap_handler; mov %psr, %l0; nop; nop;
        b setcc_trap_handler; rd %psr, %l0; nop; nop;

/* The Get PSR software trap for userland. */
#define GETPSR_TRAP \
	mov %psr, %i0; jmp %l2; rett %l2 + 4; nop;
	rd %psr, %i0; jmp %l2; rett %l2 + 4; nop;

/* This is for hard interrupts from level 1-14, 15 is non-maskable (nmi) and
 * gets handled with another macro.
+23 −0
Original line number Diff line number Diff line
/*
 * hibernate.h:  Hibernaton support specific for sparc64.
 *
 * Copyright (C) 2013 Kirill V Tkhai (tkhai@yandex.ru)
 */

#ifndef ___SPARC_HIBERNATE_H
#define ___SPARC_HIBERNATE_H

struct saved_context {
	unsigned long fp;
	unsigned long cwp;
	unsigned long wstate;

	unsigned long tick;
	unsigned long pstate;

	unsigned long g4;
	unsigned long g5;
	unsigned long g6;
};

#endif
Loading