Skip to contentSkip to conversation

idle loop changes, take 2

RFC/PATCH Tom Rini 1 participant 2 messages Aug 1, 2002 Proc sysctl

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

The following is my next cut at changes to the idle loop. Since the last time, I've made two minor changes:
1) On CONFIG_6xx, we set pm_idle before the call to platform_init(). This means that every platform will have the option of changing pm_idle to something more board specific, if desired by that platform. This should hopefully will out Dan Malek's request (or as much as can be done in this part. Changing drivers for clock speeds is platform dependant. :)).

2) This makes the powersave-nap sysctl CONFIG_6xx-specific, as it's functionality is only currently useful there.

Any more comments?

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== arch/ppc/kernel/Makefile 1.107 vs edited =====

arch/ppc/kernel/Makefile +1 -1
@@ -41,7 +41,7 @@
 					process.o signal.o ptrace.o align.o \
 					semaphore.o syscalls.o setup.o \
 					cputable.o ppc_htab.o
-obj-$(CONFIG_6xx)		+= l2cr.o
+obj-$(CONFIG_6xx)		+= l2cr.o ppc6xx_idle.o
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_PCI)		+= pci.o
 ifneq ($(CONFIG_PPC_ISERIES),y)

===== arch/ppc/kernel/idle.c 1.32 vs edited =====

arch/ppc/kernel/idle.c +15 -33

83 lines not on this page · raw message

===== arch/ppc/kernel/setup.c 1.104 vs edited =====

arch/ppc/kernel/setup.c +7 -0
@@ -55,6 +55,9 @@
 extern void kgdb_map_scc(void);
 #endif
 
+extern void (*pm_idle)(void);
+extern void ppc6xx_pm_idle(void);
+
 extern boot_infos_t *boot_infos;
 char saved_command_line[512];
 extern char cmd_line[512];
@@ -509,6 +512,10 @@
 #ifdef CONFIG_CMDLINE
 	strcpy(cmd_line, CONFIG_CMDLINE);
 #endif /* CONFIG_CMDLINE */
+
+#ifdef CONFIG_6xx
+	pm_idle = ppc6xx_pm_idle;
+#endif
 
 	platform_init(r3, r4, r5, r6, r7);
 

===== kernel/sysctl.c 1.23 vs edited =====

kernel/sysctl.c +3 -2
@@ -87,8 +87,9 @@
 #endif
 
 #ifdef CONFIG_PPC32
-extern unsigned long zero_paged_on, powersave_nap;
+extern unsigned long zero_paged_on;
 #ifdef CONFIG_6xx
+extern unsigned long powersave_nap;
 int proc_dol2crvec(ctl_table *table, int write, struct file *filp,
 		  void *buffer, size_t *lenp);
 #endif
@@ -190,9 +191,9 @@
 #ifdef CONFIG_PPC32
 	{KERN_PPC_ZEROPAGED, "zero-paged", &zero_paged_on, sizeof(int),
 	 0644, NULL, &proc_dointvec},
+#ifdef CONFIG_6xx
 	{KERN_PPC_POWERSAVE_NAP, "powersave-nap", &powersave_nap, sizeof(int),
 	 0644, NULL, &proc_dointvec},
-#ifdef CONFIG_6xx
 	{KERN_PPC_L2CR, "l2cr", NULL, 0,
 	 0644, NULL, &proc_dol2crvec},
 #endif
arch/ppc/kernel/ppc6xx_idle.c +76 -0

76 lines not on this page · raw message

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/