WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [patch] Added dev64.h file provided by linux include set but no

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [patch] Added dev64.h file provided by linux include set but not by gcc include set
From: Maria Butrico <butrico@xxxxxxxxxxxxxx>
Date: Wed, 08 Mar 2006 17:39:18 -0500
Delivery-date: Wed, 08 Mar 2006 23:43:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed off by Maria Butrico <butrico@xxxxxxxxxxxxxx>


summary:     Added dev64.h file provided by linux include set but not by gcc 
include set

diff -r 1cbaf860871a -r fd6aa34b87a2 xen/include/asm-ppc/div64.h
--- /dev/null   Thu Jan  1 00:00:00 1970 +0000
+++ b/xen/include/asm-ppc/div64.h       Wed Mar  8 17:37:05 2006 -0500
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2006 Maria Butrico <butrico@xxxxxxxxxx>, IBM Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+
+#ifndef _DIV64_H_
+#define _DIV64_H_
+
+#define do_div(num,base) ({                                            \
+               uint32_t _remainder = (uint64_t)(num) %                 \
+                                       (uint32_t)(base);               \
+               num = (uint64_t)(num) / (uint32_t)(base);               \
+               _remainder;                                             \
+       })      
+
+#endif /* #ifndef _DIV64_H_ */


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel