From 8749d6717f5fd96adbe21e0d841f50729e4fb417 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: May 08 2009 18:56:31 +0000 Subject: Resolves: bz 499633 --- diff --git a/.cvsignore b/.cvsignore index 0b82be9..d7d0407 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ numactl-2.0.2.tar.gz +numactl-2.0.3-rc3.tar.gz diff --git a/numactl-1.0.2-alpha-syscall.patch b/numactl-1.0.2-alpha-syscall.patch deleted file mode 100644 index 5d92b43..0000000 --- a/numactl-1.0.2-alpha-syscall.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up numactl-1.0.2/syscall.c.orig numactl-1.0.2/syscall.c ---- numactl-1.0.2/syscall.c.orig 2008-03-14 07:28:58.000000000 -0400 -+++ numactl-1.0.2/syscall.c 2008-03-14 07:29:31.000000000 -0400 -@@ -62,6 +62,13 @@ - #define __NR_set_mempolicy 261 - #define __NR_migrate_pages 258 - -+#elif defined(__alpha__) -+ -+#define __NR_mbind 429 -+#define __NR_get_mempolicy 430 -+#define __NR_set_mempolicy 431 -+#define __NR_migrate_pages 449 -+ - #elif !defined(DEPS_RUN) - #error "Add syscalls for your architecture or update kernel headers" - #endif diff --git a/numactl-1.0.2-cpumask.patch b/numactl-1.0.2-cpumask.patch deleted file mode 100644 index 1395558..0000000 --- a/numactl-1.0.2-cpumask.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -up numactl-1.0.2/numactl.c.orig numactl-1.0.2/numactl.c ---- numactl-1.0.2/numactl.c.orig 2007-09-21 06:23:51.000000000 -0400 -+++ numactl-1.0.2/numactl.c 2008-04-25 09:10:05.000000000 -0400 -@@ -355,14 +355,14 @@ int main(int ac, char **av) - break; - case 'C': /* --physcpubind */ - { -- int ncpus; -+ int bufsz; - unsigned long *cpubuf; - dontshm("-C/--physcpubind"); -- cpubuf = cpumask(optarg, &ncpus); -+ cpubuf = cpumask(optarg, &bufsz); - errno = 0; - check_cpubind(do_shm); - did_cpubind = 1; -- numa_sched_setaffinity(0, CPU_BYTES(ncpus), cpubuf); -+ numa_sched_setaffinity(0, bufsz, cpubuf); - checkerror("sched_setaffinity"); - free(cpubuf); - break; -diff -up numactl-1.0.2/util.h.orig numactl-1.0.2/util.h ---- numactl-1.0.2/util.h.orig 2007-08-16 10:36:23.000000000 -0400 -+++ numactl-1.0.2/util.h 2008-04-25 09:10:05.000000000 -0400 -@@ -1,7 +1,7 @@ - extern void printmask(char *name, nodemask_t *mask); - extern void printcpumask(char *name, unsigned long *mask, int len); - extern nodemask_t nodemask(char *s); --extern unsigned long *cpumask(char *s, int *ncpus); -+extern unsigned long *cpumask(char *s, int *bufsz); - extern int read_sysctl(char *name); - extern void complain(char *fmt, ...); - extern void nerror(char *fmt, ...); -diff -up numactl-1.0.2/util.c.orig numactl-1.0.2/util.c ---- numactl-1.0.2/util.c.orig 2007-08-16 10:36:23.000000000 -0400 -+++ numactl-1.0.2/util.c 2008-04-25 09:10:45.000000000 -0400 -@@ -52,7 +52,7 @@ void printmask(char *name, nodemask_t *m - int numcpus; - - /* caller must free buffer */ --unsigned long *cpumask(char *s, int *ncpus) -+unsigned long *cpumask(char *s, int *bufsz) - { - int invert = 0; - char *end; -@@ -92,7 +92,7 @@ unsigned long *cpumask(char *s, int *ncp - unsigned long arg2 = strtoul(++s, &end2, 0); - if (end2 == s) - complain("missing cpu argument %s\n", s); -- if (arg > numcpus) -+ if (arg >= numcpus) - complain("cpu argument %d out of range\n", arg); - while (++arg <= arg2) - set_bit(arg, cpubuf); -@@ -110,7 +110,7 @@ unsigned long *cpumask(char *s, int *ncp - set_bit(i, cpubuf); - } - } -- *ncpus = cpubufsize; -+ *bufsz = cpubufsize; - return cpubuf; - } - diff --git a/numactl-1.0.2-get_mempolicy-const.patch b/numactl-1.0.2-get_mempolicy-const.patch deleted file mode 100644 index 8532160..0000000 --- a/numactl-1.0.2-get_mempolicy-const.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up numactl-1.0.2/syscall.c.orig numactl-1.0.2/syscall.c ---- numactl-1.0.2/syscall.c.orig 2007-08-16 10:36:23.000000000 -0400 -+++ numactl-1.0.2/syscall.c 2007-12-20 10:33:27.000000000 -0500 -@@ -127,7 +127,7 @@ long syscall6(long call, long a, long b, - #endif - - long WEAK get_mempolicy(int *policy, -- const unsigned long *nmask, unsigned long maxnode, -+ unsigned long *nmask, unsigned long maxnode, - void *addr, int flags) - { - return syscall(__NR_get_mempolicy, policy, nmask, maxnode, addr, flags); -diff -up numactl-1.0.2/numaint.h.orig numactl-1.0.2/numaint.h ---- numactl-1.0.2/numaint.h.orig 2007-12-20 10:33:53.000000000 -0500 -+++ numactl-1.0.2/numaint.h 2007-12-20 10:33:58.000000000 -0500 -@@ -5,7 +5,7 @@ extern int numa_sched_setaffinity(pid_t - extern int numa_sched_getaffinity(pid_t pid, unsigned len, const unsigned long *mask); - extern int numa_sched_setaffinity_int(pid_t pid, unsigned len,const unsigned long *mask); - extern int numa_sched_getaffinity_int(pid_t pid, unsigned len,const unsigned long *mask); --extern long get_mempolicy_int(int *policy, const unsigned long *nmask, -+extern long get_mempolicy_int(int *policy, unsigned long *nmask, - unsigned long maxnode, void *addr, int flags); - extern long mbind_int(void *start, unsigned long len, int mode, - const unsigned long *nmask, unsigned long maxnode, unsigned flags); -diff -up numactl-1.0.2/numaif.h.orig numactl-1.0.2/numaif.h ---- numactl-1.0.2/numaif.h.orig 2007-08-16 10:36:23.000000000 -0400 -+++ numactl-1.0.2/numaif.h 2007-12-20 10:33:27.000000000 -0500 -@@ -9,7 +9,7 @@ extern "C" { - - /* System calls */ - extern long get_mempolicy(int *policy, -- const unsigned long *nmask, unsigned long maxnode, -+ unsigned long *nmask, unsigned long maxnode, - void *addr, int flags); - extern long mbind(void *start, unsigned long len, int mode, - const unsigned long *nmask, unsigned long maxnode, unsigned flags); diff --git a/numactl-2.0.3-rc3-distance_parsing.patch b/numactl-2.0.3-rc3-distance_parsing.patch new file mode 100644 index 0000000..6fac843 --- /dev/null +++ b/numactl-2.0.3-rc3-distance_parsing.patch @@ -0,0 +1,38 @@ +diff -up numactl-2.0.3-rc3/distance.c.orig numactl-2.0.3-rc3/distance.c +--- numactl-2.0.3-rc3/distance.c.orig 2009-05-08 10:10:06.000000000 -0400 ++++ numactl-2.0.3-rc3/distance.c 2009-05-08 10:13:01.000000000 -0400 +@@ -50,6 +50,7 @@ static int read_distance_table(void) + int numnodes = 0; + int *table = NULL; + int err = -1; ++ int found_nodes = 0; + + for (nd = 0;; nd++) { + char fn[100]; +@@ -57,7 +58,7 @@ static int read_distance_table(void) + sprintf(fn, "/sys/devices/system/node/node%d/distance", nd); + dfh = fopen(fn, "r"); + if (!dfh) { +- if (errno == ENOENT && nd > 0) ++ if (errno == ENOENT) + err = 0; + if (!err && nd +- Update to 2.0.3-rc3 (bz 499633) + * Wed Mar 25 2009 Mark McLoughlin - 2.0.2-4 - Remove warning from libnuma (bz 484552) diff --git a/sources b/sources index bd923de..2350e8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -82fe5bba94368850c8f5ffd0752b500b numactl-2.0.2.tar.gz +4d7ab06668024a1d59cf7a4997a9acd2 numactl-2.0.3-rc3.tar.gz