From: Matthew Wilcox Date: Wed, 29 Jul 2009 22:02:03 +0000 (-0700) Subject: markup_oops: fix it with 32-bit userspace on a 64-bit kernel X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=51fbb4bab6c8710eb897ab3fb06efbbc921f3a8d;p=openwrt%2Fstaging%2Fblogic.git markup_oops: fix it with 32-bit userspace on a 64-bit kernel A 32-bit perl can't handle 64-bit addresses without using the BigInt package. Signed-off-by: Matthew Wilcox Acked-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl index 528492bcba5b..89774011965d 100644 --- a/scripts/markup_oops.pl +++ b/scripts/markup_oops.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use File::Basename; +use Math::BigInt; # Copyright 2008, Intel Corporation # @@ -172,8 +173,8 @@ while () { parse_x86_regs($line); } -my $decodestart = hex($target) - hex($func_offset); -my $decodestop = hex($target) + 8192; +my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset"); +my $decodestop = Math::BigInt->from_hex("0x$target") + 8192; if ($target eq "0") { print "No oops found!\n"; print "Usage: \n";