+
+int
+sys_move_pages(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ unsigned long npages = tcp->u_arg[1];
+ tprintf("%ld, %lu, ", tcp->u_arg[0], npages);
+ if (tcp->u_arg[2] == 0)
+ tprintf("NULL, ");
+ else {
+ int i;
+ long puser = tcp->u_arg[2];
+ tprintf("{");
+ for (i = 0; i < npages; ++i) {
+ void *p;
+ if (i > 0)
+ tprintf(", ");
+ if (umove(tcp, puser, &p) < 0) {
+ tprintf("???");
+ break;
+ }
+ tprintf("%p", p);
+ puser += sizeof (void *);
+ }
+ tprintf("}, ");
+ }
+ if (tcp->u_arg[3] == 0)
+ tprintf("NULL, ");
+ else {
+ int i;
+ long nodeuser = tcp->u_arg[3];
+ tprintf("{");
+ for (i = 0; i < npages; ++i) {
+ int node;
+ if (i > 0)
+ tprintf(", ");
+ if (umove(tcp, nodeuser, &node) < 0) {
+ tprintf("???");
+ break;
+ }
+ tprintf("%#x", node);
+ nodeuser += sizeof (int);
+ }
+ tprintf("}, ");
+ }
+ }
+ if (exiting(tcp)) {
+ unsigned long npages = tcp->u_arg[1];
+ if (tcp->u_arg[4] == 0)
+ tprintf("NULL, ");
+ else {
+ int i;
+ long statususer = tcp->u_arg[4];
+ tprintf("{");
+ for (i = 0; i < npages; ++i) {
+ int status;
+ if (i > 0)
+ tprintf(", ");
+ if (umove(tcp, statususer, &status) < 0) {
+ tprintf("???");
+ break;
+ }
+ tprintf("%#x", status);
+ statususer += sizeof (int);
+ }
+ tprintf("}, ");
+ }
+ printflags(move_pages_flags, tcp->u_arg[5], "MPOL_???");
+ }
+ return 0;
+}
+#endif
+
+#if defined(LINUX) && defined(POWERPC)
+int
+sys_subpage_prot(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ unsigned long cur, end, abbrev_end, entries;
+ unsigned int entry;
+
+ tprintf("%#lx, %#lx, ", tcp->u_arg[0], tcp->u_arg[1]);
+ entries = tcp->u_arg[1] >> 16;
+ if (!entries || !tcp->u_arg[2]) {
+ tprintf("{}");
+ return 0;
+ }
+ cur = tcp->u_arg[2];
+ end = cur + (sizeof(int) * entries);
+ if (!verbose(tcp) || end < tcp->u_arg[2]) {
+ tprintf("%#lx", tcp->u_arg[2]);
+ return 0;
+ }
+ if (abbrev(tcp)) {
+ abbrev_end = cur + (sizeof(int) * max_strlen);
+ if (abbrev_end > end)
+ abbrev_end = end;
+ }
+ else
+ abbrev_end = end;
+ tprintf("{");
+ for (; cur < end; cur += sizeof(int)) {
+ if (cur > tcp->u_arg[2])
+ tprintf(", ");
+ if (cur >= abbrev_end) {
+ tprintf("...");
+ break;
+ }
+ if (umove(tcp, cur, &entry) < 0) {
+ tprintf("??? [%#lx]", cur);
+ break;
+ }
+ else
+ tprintf("%#08x", entry);
+ }
+ tprintf("}");
+ }
+
+ return 0;
+}