[grub2/f17] More ppc fixes.

Peter Jones pjones at fedoraproject.org
Wed Jun 6 16:24:09 UTC 2012


commit ad980577a2a2bd13d9251df58c30f0598a10806d
Author: Peter Jones <pjones at redhat.com>
Date:   Wed Jun 6 12:23:56 2012 -0400

    More ppc fixes.

 grub-2.00-ppc-usb-quiesce.patch |   89 +++++++++++++++++++++++++++++++++++++++
 grub2.spec                      |    6 ++-
 2 files changed, 94 insertions(+), 1 deletions(-)
---
diff --git a/grub-2.00-ppc-usb-quiesce.patch b/grub-2.00-ppc-usb-quiesce.patch
new file mode 100644
index 0000000..5357811
--- /dev/null
+++ b/grub-2.00-ppc-usb-quiesce.patch
@@ -0,0 +1,89 @@
+From a2bf9168b1a0e964b9db4bd2887aafdcf400d772 Mon Sep 17 00:00:00 2001
+From: Vladimir Serbinenko <phcoder at gmail.com>
+Date: Wed, 6 Jun 2012 12:14:19 -0400
+Subject: [PATCH] Quiesce USB transactions on ppc.
+
+---
+ grub-core/disk/ieee1275/ofdisk.c          |   32 +++++++++++++++++++++++++++++
+ grub-core/loader/powerpc/ieee1275/linux.c |    2 ++
+ 2 files changed, 34 insertions(+)
+
+diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c
+index 7266af6..b5bb713 100644
+--- a/grub-core/disk/ieee1275/ofdisk.c
++++ b/grub-core/disk/ieee1275/ofdisk.c
+@@ -23,6 +23,7 @@
+ #include <grub/ieee1275/ieee1275.h>
+ #include <grub/ieee1275/ofdisk.h>
+ #include <grub/i18n.h>
++#include <grub/time.h>
+ 
+ static char *last_devpath;
+ static grub_ieee1275_ihandle_t last_ihandle;
+@@ -475,6 +476,34 @@ grub_ofdisk_init (void)
+   grub_disk_dev_register (&grub_ofdisk_dev);
+ }
+ 
++static int quiesce (struct grub_ieee1275_devalias *alias)
++{
++  static grub_ieee1275_ihandle_t ihandle;
++  struct set_color_args
++  {
++    struct grub_ieee1275_common_hdr common;
++    grub_ieee1275_cell_t method;
++    grub_ieee1275_cell_t ihandle;
++    grub_ieee1275_cell_t catch_result;
++  }
++  args;
++
++  if (grub_strcmp (alias->type, "usb") != 0)
++    return 0;
++
++
++  if (grub_ieee1275_open (alias->path, &ihandle))
++    return 0;
++    
++  INIT_IEEE1275_COMMON (&args.common, "call-method", 2, 1);
++  args.method = (grub_ieee1275_cell_t) "usb-quiesce";
++  args.ihandle = ihandle;
++
++  IEEE1275_CALL_ENTRY_FN (&args);
++  grub_ieee1275_close (ihandle);
++  return 0;
++}
++
+ void
+ grub_ofdisk_fini (void)
+ {
+@@ -483,5 +512,8 @@ grub_ofdisk_fini (void)
+   last_ihandle = 0;
+   last_devpath = NULL;
+ 
++  grub_ieee1275_devices_iterate (quiesce);
++  grub_millisleep (10);
++
+   grub_disk_dev_unregister (&grub_ofdisk_dev);
+ }
+diff --git a/grub-core/loader/powerpc/ieee1275/linux.c b/grub-core/loader/powerpc/ieee1275/linux.c
+index 5cfa988..a1abc2a 100644
+--- a/grub-core/loader/powerpc/ieee1275/linux.c
++++ b/grub-core/loader/powerpc/ieee1275/linux.c
+@@ -28,6 +28,7 @@
+ #include <grub/i18n.h>
+ #include <grub/memory.h>
+ #include <grub/lib/cmdline.h>
++#include <grub/cache.h>
+ 
+ GRUB_MOD_LICENSE ("GPLv3+");
+ 
+@@ -102,6 +103,7 @@ grub_linux_boot (void)
+   kernel_entry_t linuxmain;
+   grub_ssize_t actual;
+ 
++  grub_arch_sync_caches ((void *) linux_addr, linux_size);
+   /* Set the command line arguments.  */
+   grub_ieee1275_set_property (grub_ieee1275_chosen, "bootargs", linux_args,
+ 			      grub_strlen (linux_args) + 1, &actual);
+-- 
+1.7.10.2
+
diff --git a/grub2.spec b/grub2.spec
index a3c5a6d..7ef1d65 100644
--- a/grub2.spec
+++ b/grub2.spec
@@ -39,7 +39,7 @@
 Name:           grub2
 Epoch:          1
 Version:        2.0
-Release:        0.34.beta6%{?dist}
+Release:        0.35.beta6%{?dist}
 Summary:        Bootloader with support for Linux, Multiboot and more
 
 Group:          System Environment/Base
@@ -62,6 +62,7 @@ Patch15:	grub-2.00-linux-mbr.patch
 Patch16:	grub-2.00-no-huge-video.patch
 Patch17:	grub-2.00-ppc-hints.patch
 Patch18:	grub-2.00-support-vscsi-on-ibm-ppc.patch
+Patch19:	grub-2.00-ppc-usb-quiesce.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -387,6 +388,9 @@ fi
 %doc grub-%{tarversion}/themes/starfield/COPYING.CC-BY-SA-3.0
 
 %changelog
+* Wed Jun 06 2012 Peter Jones <pjones at redhat.com> - 2.0-0.35.beta6
+- More ppc fixes.
+
 * Wed Jun 06 2012 Peter Jones <pjones at redhat.com> - 2.0-0.34.beta6
 - Add IBM PPC fixes.
 


More information about the scm-commits mailing list