What's going on here ?
Subsystems (4)
Hi just see that the whole stack of pmac SWSUSP patches went in, without any notice nor CC nor anything from any of the PPC maintainers ! That is a bit annoying don't you think ?
Paulus and I wrote most of those patches, granted, and they've been hanging around for some time, but I had good reasons not to submit them in their current state.
And regardless, I'm pretty pissed off by the fact that such invasive changes to the architecture and the platform support were submitted and merged without any notice nor ack from any of the arch or platform maintainers (basically paulus and me).
Ben.
Hi!
Quoted 4 lines
Hi just see that the whole stack of pmac SWSUSP patches went in, without any notice nor CC nor anything from any of the PPC maintainers ! That is a bit annoying don't you think ?
Quoted 8 lines
Paulus and I wrote most of those patches, granted, and they've been hanging around for some time, but I had good reasons not to submit them in their current state.
And regardless, I'm pretty pissed off by the fact that such invasive changes to the architecture and the platform support were submitted and merged without any notice nor ack from any of the arch or platform maintainers (basically paulus and me).
Sorry, that's probably my fault.
rjw and hugang did (pretty neccessary) changes to base swsusp (pagedir table -> pagedir linklist), that unfortunately needed update to all the assembly parts. It was series 1/3 update core, i386 and x86-64, 2/3 update ppc, 3/3 introduce initramfs.
This is the offending patch I believe (but the version that was merged was From: me, without code changes).
I realized that patch does more than changing from table to linklist, but it looked mostly okay, so I forwarded it. Sorry.
So, what to do now?
a) just revert it
or
b) revert pmac_setup.c and via-pmu parts and Kconfig part
or
c) just disable Kconfig part and fix it up with incremental patches
?
Pavel
From: "Rafael J. Wysocki" <[email protected]>
To: Andrew Morton <[email protected]>
Subject: [PATCH][3/3] swsusp: use non-contiguous memory
Cc: Hu Gang <[email protected]>,
LKML <[email protected]>, Pavel Machek <[email protected]>
Lines: 686
From: Hu Gang <[email protected]>
Subject: swsusp: use non-contiguous memory on resume - ppc support
This patch contains the architecture-dependent changes for ppc required for using a linklist instead of an array of page backup entries during resume.
arch/ppc/Kconfig +2 -0
@@ -1046,6 +1046,8 @@ source "drivers/zorro/Kconfig" +source kernel/power/Kconfig + endmenu menu "Bus options"
arch/ppc/kernel/asm-offsets.c +5 -0
@@ -16,6 +16,7 @@#include <linux/string.h> #include <linux/types.h> #include <linux/ptrace.h> +#include <linux/suspend.h> #include <linux/mman.h> #include <linux/mm.h> #include <asm/io.h>
@@ -136,6 +137,10 @@DEFINE (TI_CPU , offsetof(struct thread_info , cpu));DEFINE (TI_PREEMPT , offsetof(struct thread_info , preempt_count)); +DEFINE (pbe_address, offsetof(struct pbe , address)); +DEFINE (pbe_orig_address, offsetof(struct pbe , orig_address)); +DEFINE (pbe_next, offsetof(struct pbe , next)); +DEFINE (NUM_USER_SEGMENTS ,TASK_SIZE >>28 );return 0 ; }
arch/ppc/kernel/Makefile +1 -0
@@ -16,6 +16,7 @@ semaphore.o syscalls.o setup.o \ cputable.o ppc_htab.o perfmon.o obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o +obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o obj-$(CONFIG_POWER4) += cpu_setup_power4.o obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o
arch/ppc/kernel/signal.c +10 -0
@@ -28,6 +28,7 @@#include <linux/elf.h> #include <linux/tty.h> #include <linux/binfmts.h> +#include <linux/suspend.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/pgtable.h>
@@ -704,6 +705,14 @@unsigned long frame, newsp;int signr, ret; +if (current->flags &PF_FREEZE ) { +refrigerator (PF_FREEZE ); + signr =0 ; + ret = regs->gpr[3 ]; +if (!signal_pending (current)) + goto no_signal; + } +if (!oldset) oldset = ¤t->blocked;
@@ -726,6 +735,7 @@ regs->gpr[3 ] =EINTR ;/* note that the cr0.SO bit is already set */ }else { +no_signal: regs->nip -=4 ;/* Back up & retry system call */ regs->result =0 ; regs->trap =0 ;
arch/ppc/kernel/swsusp.S +349 -0
349 lines not on this page · raw message
arch/ppc/kernel/vmlinux.lds.S +6 -0
@@ -74,6 +74,12 @@ CONSTRUCTORS } + . = ALIGN(4096); + __nosave_begin = .; + .data_nosave : { *(.data.nosave) } + . = ALIGN(4096); + __nosave_end = .; + . = ALIGN(32); .data.cacheline_aligned : { *(.data.cacheline_aligned) }
arch/ppc/platforms/pmac_setup.c +55 -0
77 lines not on this page · raw message
drivers/macintosh/via-pmu.c +84 -2
110 lines not on this page · raw message
include/asm-ppc/suspend.h +12 -0
@@ -0,0 +1,12 @@ +static inline int arch_prepare_suspend (void ) +{ +return 0 ; +} + +static inline void save_processor_state (void ) +{ +} + +static inline void restore_processor_state (void ) +{ +}
include/linux/suspend.h +1 -1
@@ -1,7 +1,7 @@#ifndef _LINUX_SWSUSP_H#define _LINUX_SWSUSP_H -#if defined(CONFIG_X86 ) || defined(CONFIG_FRV ) +#if defined(CONFIG_X86 ) || defined(CONFIG_FRV ) || defined(CONFIG_PPC32 )#include <asm/suspend.h> #endif #include <linux/swap.h>
Signature · 2 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
Quoted 11 lines
rjw and hugang did (pretty neccessary) changes to base swsusp (pagedir table -> pagedir linklist), that unfortunately needed update to all the assembly parts. It was series 1/3 update core, i386 and x86-64, 2/3 update ppc, 3/3 introduce initramfs.
This is the offending patch I believe (but the version that was merged was From: me, without code changes).
I realized that patch does more than changing from table to linklist, but it looked mostly okay, so I forwarded it. Sorry.
It does more than that ... it _adds_ swsusp to ppc ! swsusp wasn't in mainline at all for ppc because I consider it not ready. And even the asm change should go through me anyway since i wrote that code and I'm not sure they know all the possible "issues" with that code.
Quoted 11 lines
So, what to do now?
a) just revert it
or
b) revert
pmac_setup.cand via-pmu parts andKconfigpartor
c) just disable
Kconfigpart and fix it up with incremental patches
I'll decide later today. I may well keep it and do the cleanup I had in mind on top of this, which means merging the pmac suspend-to-ram with the common infrastructure. But that will need some changes & hooks to the core swsusp.
Ben.
Quoted 9 lines · Benjamin Herrenschmidt
Quoted 9 lines
rjw and hugang did (pretty neccessary) changes to base swsusp (pagedir table -> pagedir linklist), that unfortunately needed update to all the assembly parts. It was series 1/3 update core, i386 and x86-64, 2/3 update ppc, 3/3 introduce initramfs.
This is the offending patch I believe (but the version that was merged was From: me, without code changes).
Quoted 19 lines
Quoted 2 lines
I realized that patch does more than changing from table to linklist, but it looked mostly okay, so I forwarded it. Sorry.
It does more than that ... it _adds_ swsusp to ppc ! swsusp wasn't in mainline at all for ppc because I consider it not ready. And even the asm change should go through me anyway since i wrote that code and I'm not sure they know all the possible "issues" with that code.
Quoted 11 lines
So, what to do now?
a) just revert it
or
b) revert
pmac_setup.cand via-pmu parts andKconfigpartor
c) just disable
Kconfigpart and fix it up with incremental patches
I hope that's can merge into, It works fine in my PowerBook G4.
Quoted 7 lines
I'll decide later today. I may well keep it and do the cleanup I had in mind on top of this, which means merging the pmac suspend-to-ram with the common infrastructure. But that will need some changes & hooks to the core swsusp.
Ben.
Signature · 5 lines
Hu Gang .-.
/v\
// \\
Linux User /( )\ [204016]
GPG Key ID ^^-^^ http://soulinfo.com/~hugang/hugang.asc