diff options
| -rw-r--r-- | arch/sparc/Kconfig | 20 | ||||
| -rw-r--r-- | arch/sparc/Makefile | 1 | ||||
| -rw-r--r-- | arch/sparc/include/asm/cmpxchg_64.h | 1 | ||||
| -rw-r--r-- | arch/sparc/include/asm/head_32.h | 6 | ||||
| -rw-r--r-- | arch/sparc/include/asm/hibernate.h | 23 | ||||
| -rw-r--r-- | arch/sparc/include/asm/leon_pci.h | 1 | ||||
| -rw-r--r-- | arch/sparc/include/asm/mmu_context_64.h | 2 | ||||
| -rw-r--r-- | arch/sparc/include/asm/processor_64.h | 3 | ||||
| -rw-r--r-- | arch/sparc/kernel/Makefile | 3 | ||||
| -rw-r--r-- | arch/sparc/kernel/asm-offsets.c | 15 | ||||
| -rw-r--r-- | arch/sparc/kernel/leon_kernel.c | 10 | ||||
| -rw-r--r-- | arch/sparc/kernel/leon_pci.c | 2 | ||||
| -rw-r--r-- | arch/sparc/kernel/leon_pci_grpci1.c | 724 | ||||
| -rw-r--r-- | arch/sparc/kernel/leon_pci_grpci2.c | 5 | ||||
| -rw-r--r-- | arch/sparc/kernel/leon_pmc.c | 4 | ||||
| -rw-r--r-- | arch/sparc/kernel/vio.c | 1 | ||||
| -rw-r--r-- | arch/sparc/mm/init_64.c | 7 | ||||
| -rw-r--r-- | arch/sparc/power/Makefile | 3 | ||||
| -rw-r--r-- | arch/sparc/power/hibernate.c | 42 | ||||
| -rw-r--r-- | arch/sparc/power/hibernate_asm.S | 131 | ||||
| -rw-r--r-- | drivers/tty/serial/sunsu.c | 1 |
21 files changed, 986 insertions, 19 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index f5041d741dea..a639c0d07b8b 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
| @@ -99,6 +99,9 @@ config HAVE_LATENCYTOP_SUPPORT | |||
| 99 | bool | 99 | bool |
| 100 | default y if SPARC64 | 100 | default y if SPARC64 |
| 101 | 101 | ||
| 102 | config ARCH_HIBERNATION_POSSIBLE | ||
| 103 | def_bool y if SPARC64 | ||
| 104 | |||
| 102 | config AUDIT_ARCH | 105 | config AUDIT_ARCH |
| 103 | bool | 106 | bool |
| 104 | default y | 107 | default y |
| @@ -303,6 +306,10 @@ config ARCH_SPARSEMEM_DEFAULT | |||
| 303 | 306 | ||
| 304 | source "mm/Kconfig" | 307 | source "mm/Kconfig" |
| 305 | 308 | ||
| 309 | if SPARC64 | ||
| 310 | source "kernel/power/Kconfig" | ||
| 311 | endif | ||
| 312 | |||
| 306 | config SCHED_SMT | 313 | config SCHED_SMT |
| 307 | bool "SMT (Hyperthreading) scheduler support" | 314 | bool "SMT (Hyperthreading) scheduler support" |
| 308 | depends on SPARC64 && SMP | 315 | depends on SPARC64 && SMP |
| @@ -472,7 +479,18 @@ config LEON_PCI | |||
| 472 | depends on PCI && SPARC_LEON | 479 | depends on PCI && SPARC_LEON |
| 473 | default y | 480 | default y |
| 474 | 481 | ||
| 475 | config GRPCI2 | 482 | config SPARC_GRPCI1 |
| 483 | bool "GRPCI Host Bridge Support" | ||
| 484 | depends on LEON_PCI | ||
| 485 | default y | ||
| 486 | help | ||
| 487 | Say Y here to include the GRPCI Host Bridge Driver. The GRPCI | ||
| 488 | PCI host controller is typically found in GRLIB SPARC32/LEON | ||
| 489 | systems. The driver has one property (all_pci_errors) controlled | ||
| 490 | from the bootloader that makes the GRPCI to generate interrupts | ||
| 491 | on detected PCI Parity and System errors. | ||
| 492 | |||
| 493 | config SPARC_GRPCI2 | ||
| 476 | bool "GRPCI2 Host Bridge Support" | 494 | bool "GRPCI2 Host Bridge Support" |
| 477 | depends on LEON_PCI | 495 | depends on LEON_PCI |
| 478 | default y | 496 | default y |
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 541b8b075c7d..9ff423678cbc 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile | |||
| @@ -57,6 +57,7 @@ core-y += arch/sparc/ | |||
| 57 | libs-y += arch/sparc/prom/ | 57 | libs-y += arch/sparc/prom/ |
| 58 | libs-y += arch/sparc/lib/ | 58 | libs-y += arch/sparc/lib/ |
| 59 | 59 | ||
| 60 | drivers-$(CONFIG_PM) += arch/sparc/power/ | ||
| 60 | drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/ | 61 | drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/ |
| 61 | 62 | ||
| 62 | boot := arch/sparc/boot | 63 | boot := arch/sparc/boot |
diff --git a/arch/sparc/include/asm/cmpxchg_64.h b/arch/sparc/include/asm/cmpxchg_64.h index b30eb37294c5..4adefe8e2885 100644 --- a/arch/sparc/include/asm/cmpxchg_64.h +++ b/arch/sparc/include/asm/cmpxchg_64.h | |||
| @@ -141,5 +141,6 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, | |||
| 141 | BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ | 141 | BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ |
| 142 | cmpxchg_local((ptr), (o), (n)); \ | 142 | cmpxchg_local((ptr), (o), (n)); \ |
| 143 | }) | 143 | }) |
| 144 | #define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n)) | ||
| 144 | 145 | ||
| 145 | #endif /* __ARCH_SPARC64_CMPXCHG__ */ | 146 | #endif /* __ARCH_SPARC64_CMPXCHG__ */ |
diff --git a/arch/sparc/include/asm/head_32.h b/arch/sparc/include/asm/head_32.h index a76874838f61..5f1dbe315bc8 100644 --- a/arch/sparc/include/asm/head_32.h +++ b/arch/sparc/include/asm/head_32.h | |||
| @@ -55,15 +55,15 @@ | |||
| 55 | 55 | ||
| 56 | /* The Get Condition Codes software trap for userland. */ | 56 | /* The Get Condition Codes software trap for userland. */ |
| 57 | #define GETCC_TRAP \ | 57 | #define GETCC_TRAP \ |
| 58 | b getcc_trap_handler; mov %psr, %l0; nop; nop; | 58 | b getcc_trap_handler; rd %psr, %l0; nop; nop; |
| 59 | 59 | ||
| 60 | /* The Set Condition Codes software trap for userland. */ | 60 | /* The Set Condition Codes software trap for userland. */ |
| 61 | #define SETCC_TRAP \ | 61 | #define SETCC_TRAP \ |
| 62 | b setcc_trap_handler; mov %psr, %l0; nop; nop; | 62 | b setcc_trap_handler; rd %psr, %l0; nop; nop; |
| 63 | 63 | ||
| 64 | /* The Get PSR software trap for userland. */ | 64 | /* The Get PSR software trap for userland. */ |
| 65 | #define GETPSR_TRAP \ | 65 | #define GETPSR_TRAP \ |
| 66 | mov %psr, %i0; jmp %l2; rett %l2 + 4; nop; | 66 | rd %psr, %i0; jmp %l2; rett %l2 + 4; nop; |
| 67 | 67 | ||
| 68 | /* This is for hard interrupts from level 1-14, 15 is non-maskable (nmi) and | 68 | /* This is for hard interrupts from level 1-14, 15 is non-maskable (nmi) and |
| 69 | * gets handled with another macro. | 69 | * gets handled with another macro. |
diff --git a/arch/sparc/include/asm/hibernate.h b/arch/sparc/include/asm/hibernate.h new file mode 100644 index 000000000000..2ec34f842249 --- /dev/null +++ b/arch/sparc/include/asm/hibernate.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * hibernate.h: Hibernaton support specific for sparc64. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Kirill V Tkhai (tkhai@yandex.ru) | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef ___SPARC_HIBERNATE_H | ||
| 8 | #define ___SPARC_HIBERNATE_H | ||
| 9 | |||
| 10 | struct saved_context { | ||
| 11 | unsigned long fp; | ||
| 12 | unsigned long cwp; | ||
| 13 | unsigned long wstate; | ||
| 14 | |||
| 15 | unsigned long tick; | ||
| 16 | unsigned long pstate; | ||
| 17 | |||
| 18 | unsigned long g4; | ||
| 19 | unsigned long g5; | ||
| 20 | unsigned long g6; | ||
| 21 | }; | ||
| 22 | |||
| 23 | #endif | ||
diff --git a/arch/sparc/include/asm/leon_pci.h b/arch/sparc/include/asm/leon_pci.h index f48527ebdd8f..bfd3ab3092b5 100644 --- a/arch/sparc/include/asm/leon_pci.h +++ b/arch/sparc/include/asm/leon_pci.h | |||
| @@ -12,6 +12,7 @@ struct leon_pci_info { | |||
| 12 | struct pci_ops *ops; | 12 | struct pci_ops *ops; |
| 13 | struct resource io_space; | 13 | struct resource io_space; |
| 14 | struct resource mem_space; | 14 | struct resource mem_space; |
| 15 | struct resource busn; | ||
| 15 | int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin); | 16 | int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin); |
| 16 | }; | 17 | }; |
| 17 | 18 | ||
diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h index 9191ca62ed9c..3d528f06e4b0 100644 --- a/arch/sparc/include/asm/mmu_context_64.h +++ b/arch/sparc/include/asm/mmu_context_64.h | |||
| @@ -68,7 +68,7 @@ extern void smp_tsb_sync(struct mm_struct *mm); | |||
| 68 | 68 | ||
| 69 | extern void __flush_tlb_mm(unsigned long, unsigned long); | 69 | extern void __flush_tlb_mm(unsigned long, unsigned long); |
| 70 | 70 | ||
| 71 | /* Switch the current MM context. Interrupts are disabled. */ | 71 | /* Switch the current MM context. */ |
| 72 | static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) | 72 | static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) |
| 73 | { | 73 | { |
| 74 | unsigned long ctx_valid, flags; | 74 | unsigned long ctx_valid, flags; |
diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h index cce72ce4c334..4c3f7f01c709 100644 --- a/arch/sparc/include/asm/processor_64.h +++ b/arch/sparc/include/asm/processor_64.h | |||
| @@ -18,9 +18,6 @@ | |||
| 18 | #include <asm/ptrace.h> | 18 | #include <asm/ptrace.h> |
| 19 | #include <asm/page.h> | 19 | #include <asm/page.h> |
| 20 | 20 | ||
| 21 | /* Don't hold the runqueue lock over context switch */ | ||
| 22 | #define __ARCH_WANT_UNLOCKED_CTXSW | ||
| 23 | |||
| 24 | /* The sparc has no problems with write protection */ | 21 | /* The sparc has no problems with write protection */ |
| 25 | #define wp_works_ok 1 | 22 | #define wp_works_ok 1 |
| 26 | #define wp_works_ok__is_a_macro /* for versions in ksyms.c */ | 23 | #define wp_works_ok__is_a_macro /* for versions in ksyms.c */ |
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 5276fd4e9d03..d432fb20358e 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
| @@ -74,7 +74,8 @@ obj-y += dma.o | |||
| 74 | 74 | ||
| 75 | obj-$(CONFIG_PCIC_PCI) += pcic.o | ||
