1 diff -Nur c3000_pre/linux/arch/arm/config.in c3000_work/linux/arch/arm/config.in
2 --- c3000_pre/linux/arch/arm/config.in 2004-12-05 22:17:18.000000000 +0900
3 +++ c3000_work/linux/arch/arm/config.in 2004-12-06 01:13:03.000000000 +0900
5 if [ "$CONFIG_SL_CCCR_CHANGE" = "y" ]; then
6 bool 'Core voltage change enable (EXPERIMENTAL)' CONFIG_CHANGE_CORE_VOLT
8 + bool 'Fix send SIGSTOP to all tasks at suspend (EXPERIMENTAL)' CONFIG_SL_SIGSTOP_FIX
9 if [ "$CONFIG_ARCH_SHARP_SL" = "y" ]; then
10 define_bool CONFIG_BATT y
12 diff -Nur c3000_pre/linux/arch/arm/mach-pxa/sharpsl_apm.c c3000_work/linux/arch/arm/mach-pxa/sharpsl_apm.c
13 --- c3000_pre/linux/arch/arm/mach-pxa/sharpsl_apm.c 2004-12-05 22:17:18.000000000 +0900
14 +++ c3000_work/linux/arch/arm/mach-pxa/sharpsl_apm.c 2004-12-06 23:48:35.000000000 +0900
16 #include <asm/system.h>
17 #include <asm/hardware.h>
20 +// unistd.h is included for the configuration ioctl stuff
21 +#define __KERNEL_SYSCALLS__ 1
22 +#include <asm/unistd.h>
24 #ifdef CONFIG_ARCH_SHARP_SL
26 #include <asm/arch/irqs.h>
29 #define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t))
31 +#define APP_NAME_LIST "/etc/suspend.lst"
37 struct task_struct* p = NULL;
38 struct task_struct* tsk = current;
40 +#if defined(CONFIG_SL_SIGSTOP_FIX)
42 + mm_segment_t old_fs = get_fs ();
43 + char line_buffer[256];
45 if (! spin_trylock(&lock))
48 + // Try opening the send sig application name list
51 + fd = open(APP_NAME_LIST, O_RDONLY, 0);
54 /* send signal to all procs except for kernel-threads */
55 read_lock(&tasklist_lock);
61 + if (p->pid == 1 || p->pid == tsk->pid || is_kernel_thread(p))
63 + if (!strcmp(p->comm,"cardmgr")) { //Send sig to cardmgr
64 + si.si_signo = signo;
66 + si.si_code = SI_KERNEL;
67 + si.si_pid = tsk->pid;
68 + si.si_uid = tsk->uid;
69 + send_sig_info(signo, &si, p);
75 + memset(line_buffer, '\0', 256);
77 + for (x = 0; x < 256; x++) {
78 + if (!read(fd, &line_buffer[x], 1))
80 + if (line_buffer[x] == '\n' || line_buffer[x] == '\r')
88 + if (p->pid == 1 || p->pid == tsk->pid || is_kernel_thread(p))
90 + if (!strncmp(p->comm,line_buffer,strlen(p->comm))) { //Send sig to cardmgr
91 +// printk ("Send SIG to application\n");
92 + si.si_signo = signo;
94 + si.si_code = SI_KERNEL;
95 + si.si_pid = tsk->pid;
96 + si.si_uid = tsk->uid;
97 + send_sig_info(signo, &si, p);
107 + if (! spin_trylock(&lock))
110 + /* send signal to all procs except for kernel-threads */
111 + read_lock(&tasklist_lock);
116 if (p->pid == 1 || p->pid == tsk->pid || is_kernel_thread(p))
120 si.si_pid = tsk->pid;
121 si.si_uid = tsk->uid;
122 send_sig_info(signo, &si, p);
126 read_unlock(&tasklist_lock);
128 if (signo == SIGSTOP) {
131 set_current_state(state);
133 +#if defined(CONFIG_SL_SIGSTOP_FIX)
135 + fd = open(APP_NAME_LIST, O_RDONLY, 0);
138 + read_lock(&tasklist_lock);
141 + if (p->pid == 1 || p->pid == tsk->pid || is_kernel_thread(p))
143 + if (!strcmp(p->comm,"cardmgr")) {
144 +// printk ("Check application stopped\n");
146 + if (p->state != TASK_STOPPED) {
147 + read_unlock(&tasklist_lock);
155 + memset(line_buffer, '\0', 256);
158 + for (x = 0; x < 256; x++) {
159 + if (!read(fd, &line_buffer[x], 1))
160 + goto sig_stop_done;
161 + if (line_buffer[x] == '\n' || line_buffer[x] == '\r')
167 + if (p->pid == 1 || p->pid == tsk->pid || is_kernel_thread(p))
169 + if (!strncmp(p->comm,line_buffer,strlen(p->comm))) {
171 + if (p->state != TASK_STOPPED) {
172 + read_unlock(&tasklist_lock);
182 + read_unlock(&tasklist_lock);
185 read_lock(&tasklist_lock);
187 if (p->pid == 1 || p->pid == tsk->pid || is_kernel_thread(p))
190 read_unlock(&tasklist_lock);