Author: jim
Date: 2005-11-17 23:56:02 -0700 (Thu, 17 Nov 2005)
New Revision: 1265

Modified:
   trunk/
   trunk/linux/linux-2.6.14-cobalt_x86-1.patch
Log:
 [EMAIL PROTECTED]:  jim | 2005-11-17 22:55:38 -0800
 Fixes for linux*-cobalt_x86 patch



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - cc2644d5-6cf8-0310-b111-c40428001e49:/patches:1519
   + cc2644d5-6cf8-0310-b111-c40428001e49:/patches:1521

Modified: trunk/linux/linux-2.6.14-cobalt_x86-1.patch
===================================================================
--- trunk/linux/linux-2.6.14-cobalt_x86-1.patch 2005-11-18 06:47:15 UTC (rev 
1264)
+++ trunk/linux/linux-2.6.14-cobalt_x86-1.patch 2005-11-18 06:56:02 UTC (rev 
1265)
@@ -367,59 +367,63 @@
  /*
   * Power off function, if any
   */
-@@ -271,6 +276,29 @@
-                               :
-                               : "i" ((void *) (0x1000 - sizeof 
(real_mode_switch) - 100)));
+@@ -277,6 +282,11 @@ EXPORT_SYMBOL(machine_real_restart);
+ 
+ void machine_shutdown(void)
+ {
++#ifdef CONFIG_COBALT_RAQ
++      wait_for_flush();
++      cobalt_halt();
++#endif
++
+ #ifdef CONFIG_SMP
+       int reboot_cpu_id;
+ 
+@@ -313,6 +323,9 @@ void machine_shutdown(void)
+ 
+ void machine_emergency_restart(void)
+ {
++#ifdef CONFIG_COBALT_RAQ
++      cobalt_restart();
++#endif
+       if (!reboot_thru_bios) {
+               if (efi_enabled) {
+                       efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
+@@ -335,8 +348,34 @@ void machine_emergency_restart(void)
+       machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
  }
-+
+ 
 +/* kill some time at halt/reboot to allow drives with large cache to sync */
 +void wait_for_flush(void)
 +{
-+      int i;
-+      static int flushed;
++      int i;
++      static int flushed;
 +
-+      if (flushed)
-+              return;
-+      flushed = 1;
++      if (flushed)
++              return;
++      flushed = 1;
 +
-+      printk("waiting for devices to flush");
-+      for (i = 0 ; i < 10; i++) {
-+              printk(".");
-+              mdelay(500);
++      printk("waiting for devices to flush");
++      for (i = 0 ; i < 10; i++) {
++              printk(".");
++              mdelay(500);
 +#ifdef CONFIG_COBALT_LCD
-+              if (i == 8)
-+                      cobalt_lcd_off();
++              if (i == 8)
++                      cobalt_lcd_off();
 +#endif
-+      }
-+      printk("done\n");
++      }
++      printk("done\n");
 +}
 +
- #ifdef CONFIG_APM_MODULE
- EXPORT_SYMBOL(machine_real_restart);
- #endif
-@@ -304,6 +332,11 @@
-       smp_send_stop();
- #endif /* CONFIG_SMP */
- 
+ void machine_restart(char * __unused)
+ {
 +#ifdef CONFIG_COBALT_RAQ
-+     wait_for_flush();
-+     cobalt_halt();
++      wait_for_flush();
++      cobalt_restart();
 +#endif
-+
-       lapic_shutdown();
- 
- #ifdef CONFIG_X86_IO_APIC
-@@ -313,6 +346,10 @@
- 
- void machine_emergency_restart(void)
- {
-+      #ifdef CONFIG_COBALT_RAQ
-+              wait_for_flush();
-+              cobalt_restart();
-+      #endif
-       if (!reboot_thru_bios) {
-               if (efi_enabled) {
-                       efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
+       machine_shutdown();
+       machine_emergency_restart();
+ }
 diff -Naur linux-2.6.14.orig/arch/i386/kernel/traps.c 
linux-2.6.14/arch/i386/kernel/traps.c
 --- linux-2.6.14.orig/arch/i386/kernel/traps.c 2005-10-28 00:02:08.000000000 
+0000
 +++ linux-2.6.14/arch/i386/kernel/traps.c      2005-10-28 15:27:23.000000000 
+0000
@@ -8737,8 +8741,8 @@
   *
   * Now we can finally start doing some real work..
   */
-+#ifdef CONFIG_COBALT_RAQ
-+extern int cobalt_init(void);
++#ifdef CONFIG_COBALT_RAQ
++extern int cobalt_init(void);
 +#endif
 +
  static void __init do_basic_setup(void)
@@ -8749,8 +8753,8 @@
  
        do_initcalls();
 +      
-+#ifdef CONFIG_COBALT_RAQ
-+    cobalt_init();
++#ifdef CONFIG_COBALT_RAQ
++    cobalt_init();
 +#endif
  }
  

-- 
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to