More ppc fixes.
This commit is contained in:
parent
fe507e9b64
commit
ad980577a2
89
grub-2.00-ppc-usb-quiesce.patch
Normal file
89
grub-2.00-ppc-usb-quiesce.patch
Normal file
@ -0,0 +1,89 @@
|
||||
From a2bf9168b1a0e964b9db4bd2887aafdcf400d772 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@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
|
||||
|
@ -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@redhat.com> - 2.0-0.35.beta6
|
||||
- More ppc fixes.
|
||||
|
||||
* Wed Jun 06 2012 Peter Jones <pjones@redhat.com> - 2.0-0.34.beta6
|
||||
- Add IBM PPC fixes.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user