First, the trap number for 32-bit syscalls is 0x10.
Also, only negate the return value when syscall error is indicated by
the carry bit being set.
Signed-off-by: David S. Miller <davem@davemloft.net>
 #define        TICK_PRIV_BIT   (1ULL << 63)
 #endif
 
+#ifdef CONFIG_SPARC64
 #define SYSCALL_STRING                                                 \
        "ta     0x6d;"                                                  \
-       "sub    %%g0, %%o0, %%o0;"                                      \
+       "bcs,a  1f;"                                                    \
+       " sub   %%g0, %%o0, %%o0;"                                      \
+       "1:"
+#else
+#define SYSCALL_STRING                                                 \
+       "ta     0x10;"                                                  \
+       "bcs,a  1f;"                                                    \
+       " sub   %%g0, %%o0, %%o0;"                                      \
+       "1:"
+#endif
 
 #define SYSCALL_CLOBBERS                                               \
        "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",                 \
 
        }
 
        *size += sizeof(struct cpu_map_data);
+       *size = PERF_ALIGN(*size, sizeof(u64));
        return zalloc(*size);
 }
 
 
                return NULL;
        }
+#if 0
 try_again:
+#endif
        al->map = map_groups__find(mg, al->addr);
        if (al->map == NULL) {
                /*
                 * "[vdso]" dso, but for now lets use the old trick of looking
                 * in the whole kernel symbol list.
                 */
+#if 0
                if (cpumode == PERF_RECORD_MISC_USER && machine &&
                    mg != &machine->kmaps &&
                    machine__kernel_ip(machine, al->addr)) {
                        load_map = true;
                        goto try_again;
                }
+#endif
        } else {
                /*
                 * Kernel maps might be changed when loading symbols so loading