Skip to contentSkip to conversation

make sort() generally available

PATCH New Jan Beulich 1 participant 1 message Dec 23, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 make sort() generally available

Rather than having this general library function only on ia64, move it into common code, to be used by x86 exception table sorting too.

xen/arch/ia64/linux-xen/Makefile +0 -1
@@ -12,7 +12,6 @@ obj-y += sal.o
 obj-y += setup.o
 obj-y += smpboot.o
 obj-y += smp.o
-obj-y += sort.o
 obj-y += time.o
 obj-y += tlb.o
 obj-y += unaligned.o
xen/arch/ia64/linux-xen/README.origin +0 -1
@@ -21,7 +21,6 @@ sal.c			-> linux/arch/ia64/kernel/sal.c
 setup.c			-> linux/arch/ia64/kernel/setup.c
 smp.c			-> linux/arch/ia64/kernel/smp.c
 smpboot.c		-> linux/arch/ia64/kernel/smpboot.c
-sort.c			-> linux/lib/sort.c
 time.c			-> linux/arch/ia64/kernel/time.c
 tlb.c			-> linux/arch/ia64/mm/tlb.c
 unaligned.c		-> linux/arch/ia64/kernel/unaligned.c
xen/arch/ia64/linux-xen/sort.c deleted +0 -122

122 lines not on this page · raw message

xen/common/Makefile +1 -0
@@ -22,6 +22,7 @@ obj-y += sched_arinc653.o
 obj-y += schedule.o
 obj-y += shutdown.o
 obj-y += softirq.o
+obj-y += sort.o
 obj-y += spinlock.o
 obj-y += stop_machine.o
 obj-y += string.o
xen/common/sort.c new file +78 -0

78 lines not on this page · raw message

xen/include/asm-ia64/linux/README.origin +0 -1
@@ -16,7 +16,6 @@ notifier.h		-> linux/include/linux/notif
 percpu.h		-> linux/include/linux/percpu.h
 preempt.h		-> linux/include/linux/preempt.h
 seqlock.h		-> linux/include/linux/seqlock.h
-sort.h			-> linux/include/linux/sort.h
 stddef.h		-> linux/include/linux/stddef.h
 thread_info.h		-> linux/include/linux/thread_info.h
 time.h			-> linux/include/linux/time.h
xen/include/asm-ia64/linux/sort.h deleted +0 -10
@@ -1,10 +0,0 @@
-#ifndef _LINUX_SORT_H
-#define _LINUX_SORT_H
-
-#include <linux/types.h>
-
-void sort(void *base, size_t num, size_t size,
-	  int (*cmp)(const void *, const void *),
-	  void (*swap)(void *, void *, int));
-
-#endif
xen/include/xen/sort.h new file +10 -0
@@ -0,0 +1,10 @@
+#ifndef __SORT_H__
+#define __SORT_H__
+
+#include <xen/types.h>
+
+void sort(void *base, size_t num, size_t size,
+	  int (*cmp)(const void *, const void *),
+	  void (*swap)(void *, void *, int));
+
+#endif /* __SORT_H__ */

Rather than having this general library function only on ia64, move it into common code, to be used by x86 exception table sorting too.

xen/arch/ia64/linux-xen/Makefile +0 -1
@@ -12,7 +12,6 @@ obj-y += sal.o
 obj-y += setup.o
 obj-y += smpboot.o
 obj-y += smp.o
-obj-y += sort.o
 obj-y += time.o
 obj-y += tlb.o
 obj-y += unaligned.o
xen/arch/ia64/linux-xen/README.origin +0 -1
@@ -21,7 +21,6 @@ sal.c			-> linux/arch/ia64/kernel/sal.c
 setup.c			-> linux/arch/ia64/kernel/setup.c
 smp.c			-> linux/arch/ia64/kernel/smp.c
 smpboot.c		-> linux/arch/ia64/kernel/smpboot.c
-sort.c			-> linux/lib/sort.c
 time.c			-> linux/arch/ia64/kernel/time.c
 tlb.c			-> linux/arch/ia64/mm/tlb.c
 unaligned.c		-> linux/arch/ia64/kernel/unaligned.c
xen/arch/ia64/linux-xen/sort.c deleted +0 -122

122 lines not on this page · raw message

xen/common/Makefile +1 -0
@@ -22,6 +22,7 @@ obj-y += sched_arinc653.o
 obj-y += schedule.o
 obj-y += shutdown.o
 obj-y += softirq.o
+obj-y += sort.o
 obj-y += spinlock.o
 obj-y += stop_machine.o
 obj-y += string.o
xen/common/sort.c new file +78 -0

78 lines not on this page · raw message

xen/include/asm-ia64/linux/README.origin +0 -1
@@ -16,7 +16,6 @@ notifier.h		-> linux/include/linux/notif
 percpu.h		-> linux/include/linux/percpu.h
 preempt.h		-> linux/include/linux/preempt.h
 seqlock.h		-> linux/include/linux/seqlock.h
-sort.h			-> linux/include/linux/sort.h
 stddef.h		-> linux/include/linux/stddef.h
 thread_info.h		-> linux/include/linux/thread_info.h
 time.h			-> linux/include/linux/time.h
xen/include/asm-ia64/linux/sort.h deleted +0 -10
@@ -1,10 +0,0 @@
-#ifndef _LINUX_SORT_H
-#define _LINUX_SORT_H
-
-#include <linux/types.h>
-
-void sort(void *base, size_t num, size_t size,
-	  int (*cmp)(const void *, const void *),
-	  void (*swap)(void *, void *, int));
-
-#endif
xen/include/xen/sort.h new file +10 -0
@@ -0,0 +1,10 @@
+#ifndef __SORT_H__
+#define __SORT_H__
+
+#include <xen/types.h>
+
+void sort(void *base, size_t num, size_t size,
+	  int (*cmp)(const void *, const void *),
+	  void (*swap)(void *, void *, int));
+
+#endif /* __SORT_H__ */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel