Hello community,
here is the log from the commit of package crash
checked in at Thu Jan 10 15:04:37 CET 2008.
--------
--- crash/crash.changes 2007-12-21 12:19:27.000000000 +0100
+++ /mounts/work_src_done/STABLE/crash/crash.changes 2008-01-10 08:28:50.000000000 +0100
@@ -1,0 +2,5 @@
+Wed Jan 9 16:25:50 CET 2008 - bwalle@suse.de
+
+- fix different initialisation of jiffies on SLES9 (352836)
+
+-------------------------------------------------------------------
New:
----
crash-sles9-time.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ crash.spec ++++++
--- /var/tmp/diff_new_pack.L19638/_old 2008-01-10 15:02:55.000000000 +0100
+++ /var/tmp/diff_new_pack.L19638/_new 2008-01-10 15:02:55.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package crash (Version 4.0.4.12)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -19,7 +19,7 @@
Url: http://people.redhat.com/anderson/
Summary: Crash utility for live systems; netdump, diskdump, LKCD or mcore dumpfiles
Version: 4.0.4.12
-Release: 4
+Release: 7
%define crash_version %(echo %{version} | cut -d . -f 1-2)
%define crash_subversion %(echo %{version} | cut -d . -f 3-4)
%define whitepaper_version 2003
@@ -38,7 +38,8 @@
Patch3: crash-search-also-in-lib-crash
Patch4: crash-fixed-uninitialised
Patch5: crash-detect-wrong-arch.diff
-Patch6: crash-sial-fix-files-script
+Patch6: crash-sles9-time.patch
+Patch7: crash-sial-fix-files-script
BuildRequires: bison flex ncurses-devel zlib-devel
%description
@@ -116,8 +117,9 @@
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
cd sial-scripts-%{scripts_version}
-%patch6
+%patch7
cd -
cp %{S:3} .
@@ -177,6 +179,8 @@
%endif
%changelog
+* Wed Jan 09 2008 - bwalle@suse.de
+- fix different initialisation of jiffies on SLES9 (352836)
* Fri Dec 21 2007 - bwalle@suse.de
- improve error handling when target architecture doesn't match
host architecture (345517)
++++++ crash-sles9-time.patch ++++++
From: Alan Tyson
Subject: [PATCH] Fix "uptime" and "ps -t" for SLES9
References: 352836
This patch adds a quirk for SLES9 jiffies initialisation and corrects the time
data in "uptime" and "ps -t" command.
Acked-by: Bernhard Walle
---
defs.h | 8 ++++++++
kernel.c | 9 ++++++++-
task.c | 11 +++++++++++
3 files changed, 27 insertions(+), 1 deletion(-)
--- a/defs.h
+++ b/defs.h
@@ -532,6 +532,7 @@ struct kernel_table {
ulong p2m_mfn_cache_hits;
ulong p2m_page_cache_hits;
ulong relocate;
+ int is_suse_kernel;
};
/*
@@ -4394,6 +4395,13 @@ extern struct lkcd_environment *lkcd;
#endif /* LKCD_COMMON */
+
+/*
+ * SUSE specific
+ */
+#define is_SLES9() \
+ ((THIS_KERNEL_VERSION == LINUX(2,6,5)) && kt->is_suse_kernel)
+
/*
* gdb_interface.c
*/
--- a/kernel.c
+++ b/kernel.c
@@ -164,6 +164,12 @@ kernel_init()
verify_version();
+ /*
+ * check if we have a suse kernel (this is the module supported
+ * patch of agruen@suse.de
+ */
+ kt->is_suse_kernel = symbol_exists("unsupported");
+
if (symbol_exists("__per_cpu_offset")) {
if (LKCD_KERNTYPES())
i = get_cpus_possible();
@@ -3468,7 +3474,7 @@ get_uptime(char *buf, ulonglong *j64p)
if (symbol_exists("jiffies_64")) {
get_symbol_data("jiffies_64", sizeof(ulonglong), &jiffies_64);
- if (THIS_KERNEL_VERSION >= LINUX(2,6,0)) {
+ if (THIS_KERNEL_VERSION >= LINUX(2,6,0) && !is_SLES9()) {
wrapped = (jiffies_64 & 0xffffffff00000000ULL);
if (wrapped) {
wrapped -= 0x100000000ULL;
@@ -3870,6 +3876,7 @@ dump_kernel_table(int verbose)
fprintf(fp, "(%ld%%)\n", kt->p2m_page_cache_hits * 100 / kt->p2m_pages_searched);
else
fprintf(fp, "\n");
+ fprintf(fp, " is_suse_kernel: %ld\n", kt->is_suse_kernel);
}
/*
--- a/task.c
+++ b/task.c
@@ -3197,6 +3197,12 @@ start_time_timespec(void)
default:
break;
}
+ /* SLES9 stores start_time in nanoseconds, so set TIMESPEC in order */
+ /* to do the right calculations in convert_start_time */
+ if (is_SLES9()) {
+ tt->flags |= TIMESPEC;
+ return TRUE;
+ }
tt->flags |= NO_TIMESPEC;
@@ -3229,6 +3235,11 @@ convert_start_time(ulonglong start_time,
ulong tmp1, tmp2;
ulonglong wrapped;
+ /* SLES9's start_time is neither jiffies nor a timespec. It's ns */
+ if (is_SLES9()) {
+ start_time = start_time / 1000000000;
+ }
+
switch(tt->flags & (TIMESPEC | NO_TIMESPEC))
{
case TIMESPEC:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org