fix ppc64 device-tree and bootargs alignment

This commit is contained in:
David Woodhouse 2007-04-10 19:47:22 +00:00
parent 59f09c8004
commit cb277fb745
3 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,12 @@
--- kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c~ 2006-04-27 15:01:55.000000000 +0900
+++ kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c 2006-05-08 14:15:50.571330714 +0900
@@ -61,7 +61,8 @@
struct stat statbuf[1];
char pathname[MAXPATH], *pathstart;
char propnames[NAMESPACE];
-dvt dtstruct[TREEWORDS], *dt;
+dvt dtstruct[TREEWORDS] __attribute((aligned(8)));
+dvt *dt;
unsigned long long mem_rsrv[2*MEMRESERVE];
static int initrd_found = 0;

View File

@ -0,0 +1,11 @@
--- kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c.org 2006-04-26 13:12:55.515946645 +0900
+++ kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c 2006-04-26 13:50:00.665270758 +0900
@@ -275,6 +275,8 @@
strcat(local_cmdline, " ");
cmd_len = strlen(local_cmdline);
cmd_len = cmd_len + 1;
+ if ((cmd_len >= 8) && ((unsigned long)dt & 0x4))
+ dt++;
memcpy(dt,local_cmdline,cmd_len);
len = cmd_len;
*dt_len = cmd_len;

View File

@ -1,6 +1,6 @@
Name: kexec-tools
Version: 1.101
Release: 67%{?dist}
Release: 68%{?dist}
License: GPL
Group: Applications/System
Summary: The kexec/kdump userspace component.
@ -66,6 +66,8 @@ Patch305: kexec-tools-1.101-ppc64-64k-pages.patch
Patch306: kexec-tools-1.101-ppc64-memory_regions.patch
Patch307: kexec-tools-1.101-ppc64_rmo_top.patch
Patch308: kexec-tools-1.101-ppc-boots-ppc64.patch
Patch309: kexec-tools-1.101-ppc64-align-dtstruct.patch
Patch310: kexec-tools-1.101-ppc64-bootargs-align.patch
#
# Patches 401 through 500 are meant for s390 kexec-tools enablement
@ -121,6 +123,8 @@ rm -f ../kexec-tools-1.101.spec
%patch306 -p1
%patch307 -p1
%patch308 -p1
%patch309 -p1
%patch310 -p1
%patch401 -p1
%patch501 -p1
%patch601 -p1
@ -247,6 +251,9 @@ rm -f %{_datadir}/firstboot/modules/firstboot_kdump.py
%doc kexec-kdump-howto.txt
%changelog
* Tue Apr 10 2007 Neil Horman <nhorman@redhat.com> - 1.101-68%{dist}
- Fix alignment of bootargs and device-tree structures on ppc64
* Tue Apr 10 2007 Neil Horman <nhorman@redhat.com> - 1.101-67%{dist}
- Allow ppc to boot ppc64 kernels (bz 235608)