All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/3] MIPS: Reserve nosave data for hibernation
@ 2016-03-07  1:31 Huacai Chen
  2016-03-07  1:31 ` [PATCH V2 2/3] MIPS: Loongson-3: Fix build error after ld-version.sh modification Huacai Chen
  2016-03-07  1:31 ` [PATCH V2 3/3] MIPS: Loongson-3: Adjust irq dispatch to speedup processing Huacai Chen
  0 siblings, 2 replies; 3+ messages in thread
From: Huacai Chen @ 2016-03-07  1:31 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Aurelien Jarno, Steven J . Hill, linux-mips, Fuxin Zhang,
	Zhangjin Wu, Huacai Chen, stable

After commit 92923ca3aacef63c92d ("mm: meminit: only set page reserved
in the memblock region"), the MIPS hibernation is broken. Because pages
in nosave data section should be "reserved", but currently they aren't
set to "reserved" at initialization. This patch makes hibernation work
again.

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 arch/mips/kernel/setup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 5fdaf8b..6f68cdd 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -706,6 +706,9 @@ static void __init arch_mem_init(char **cmdline_p)
 	for_each_memblock(reserved, reg)
 		if (reg->size != 0)
 			reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT);
+
+	reserve_bootmem_region(__pa_symbol(&__nosave_begin),
+			__pa_symbol(&__nosave_end)); /* Reserve for hibernation */
 }
 
 static void __init resource_init(void)
-- 
2.7.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH V2 2/3] MIPS: Loongson-3: Fix build error after ld-version.sh modification
  2016-03-07  1:31 [PATCH V2 1/3] MIPS: Reserve nosave data for hibernation Huacai Chen
@ 2016-03-07  1:31 ` Huacai Chen
  2016-03-07  1:31 ` [PATCH V2 3/3] MIPS: Loongson-3: Adjust irq dispatch to speedup processing Huacai Chen
  1 sibling, 0 replies; 3+ messages in thread
From: Huacai Chen @ 2016-03-07  1:31 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Aurelien Jarno, Steven J . Hill, linux-mips, Fuxin Zhang,
	Zhangjin Wu, Huacai Chen, stable

Commit d5ece1cb074b2c ("Fix ld-version.sh to handle large 3rd version
part") modifies the ld version description. This causes a build error
on Loongson-3, so fix it.

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 arch/mips/loongson64/Platform | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/loongson64/Platform b/arch/mips/loongson64/Platform
index 85d8089..0fce460 100644
--- a/arch/mips/loongson64/Platform
+++ b/arch/mips/loongson64/Platform
@@ -31,7 +31,7 @@ cflags-$(CONFIG_CPU_LOONGSON3)	+= -Wa,--trap
 # can't easily be used safely within the kbuild framework.
 #
 ifeq ($(call cc-ifversion, -ge, 0409, y), y)
-  ifeq ($(call ld-ifversion, -ge, 22500000, y), y)
+  ifeq ($(call ld-ifversion, -ge, 225000000, y), y)
     cflags-$(CONFIG_CPU_LOONGSON3)  += \
       $(call cc-option,-march=loongson3a -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64)
   else
-- 
2.7.0




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH V2 3/3] MIPS: Loongson-3: Adjust irq dispatch to speedup processing
  2016-03-07  1:31 [PATCH V2 1/3] MIPS: Reserve nosave data for hibernation Huacai Chen
  2016-03-07  1:31 ` [PATCH V2 2/3] MIPS: Loongson-3: Fix build error after ld-version.sh modification Huacai Chen
@ 2016-03-07  1:31 ` Huacai Chen
  1 sibling, 0 replies; 3+ messages in thread
From: Huacai Chen @ 2016-03-07  1:31 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Aurelien Jarno, Steven J . Hill, linux-mips, Fuxin Zhang,
	Zhangjin Wu, Huacai Chen

This patch adjust the logic in mach_irq_dispatch(), allow multiple IPs
handled in the same dispatching. This can speedup interrupt processing.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 arch/mips/loongson64/loongson-3/irq.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/mips/loongson64/loongson-3/irq.c b/arch/mips/loongson64/loongson-3/irq.c
index 0f75b6b..8e76490 100644
--- a/arch/mips/loongson64/loongson-3/irq.c
+++ b/arch/mips/loongson64/loongson-3/irq.c
@@ -24,19 +24,21 @@ static void ht_irqdispatch(void)
 	}
 }
 
+#define UNUSED_IPS (CAUSEF_IP5 | CAUSEF_IP4 | CAUSEF_IP1 | CAUSEF_IP0)
+
 void mach_irq_dispatch(unsigned int pending)
 {
 	if (pending & CAUSEF_IP7)
 		do_IRQ(LOONGSON_TIMER_IRQ);
 #if defined(CONFIG_SMP)
-	else if (pending & CAUSEF_IP6)
+	if (pending & CAUSEF_IP6)
 		loongson3_ipi_interrupt(NULL);
 #endif
-	else if (pending & CAUSEF_IP3)
+	if (pending & CAUSEF_IP3)
 		ht_irqdispatch();
-	else if (pending & CAUSEF_IP2)
+	if (pending & CAUSEF_IP2)
 		do_IRQ(LOONGSON_UART_IRQ);
-	else {
+	if (pending & UNUSED_IPS) {
 		pr_err("%s : spurious interrupt\n", __func__);
 		spurious_interrupt();
 	}
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-07  1:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-07  1:31 [PATCH V2 1/3] MIPS: Reserve nosave data for hibernation Huacai Chen
2016-03-07  1:31 ` [PATCH V2 2/3] MIPS: Loongson-3: Fix build error after ld-version.sh modification Huacai Chen
2016-03-07  1:31 ` [PATCH V2 3/3] MIPS: Loongson-3: Adjust irq dispatch to speedup processing Huacai Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.