Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Browse files Browse the repository at this point in the history
Pull Sparc fixes from David Miller:
 "Sparc bug fixes, one of which was preventing successful SMP boots with
  mainline"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix pcr_ops initialization and usage bugs.
  sparc64: Do not disable interrupts in nmi_cpu_busy()
  sparc: Hook up seccomp and getrandom system calls.
  sparc: fix decimal printf format specifiers prefixed with 0x
  • Loading branch information
Linus Torvalds committed Aug 14, 2014
2 parents 81c02a2 + 8bccf5b commit 13b102b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 deletions.
4 changes: 3 additions & 1 deletion arch/sparc/include/uapi/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,10 @@
#define __NR_sched_setattr 343
#define __NR_sched_getattr 344
#define __NR_renameat2 345
#define __NR_seccomp 346
#define __NR_getrandom 347

#define NR_syscalls 346
#define NR_syscalls 348

/* Bitmask values returned from kern_features system call. */
#define KERN_FEATURE_MIXED_MODE_STACK 0x00000001
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ static inline unsigned int get_nmi_count(int cpu)

static __init void nmi_cpu_busy(void *data)
{
local_irq_enable_in_hardirq();
while (endflag == 0)
mb();
}
Expand Down
7 changes: 5 additions & 2 deletions arch/sparc/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1671,9 +1671,12 @@ static bool __init supported_pmu(void)

static int __init init_hw_perf_events(void)
{
int err;

pr_info("Performance events: ");

if (!supported_pmu()) {
err = pcr_arch_init();
if (err || !supported_pmu()) {
pr_cont("No support for PMU type '%s'\n", sparc_pmu_type);
return 0;
}
Expand All @@ -1685,7 +1688,7 @@ static int __init init_hw_perf_events(void)

return 0;
}
early_initcall(init_hw_perf_events);
pure_initcall(init_hw_perf_events);

void perf_callchain_kernel(struct perf_callchain_entry *entry,
struct pt_regs *regs)
Expand Down
3 changes: 3 additions & 0 deletions arch/sparc/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ static void __global_pmu_self(int this_cpu)
struct global_pmu_snapshot *pp;
int i, num;

if (!pcr_ops)
return;

pp = &global_cpu_snapshot[this_cpu].pmu;

num = 1;
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/smp_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void smp_store_cpu_info(int id)
mid = cpu_get_hwmid(cpu_node);

if (mid < 0) {
printk(KERN_NOTICE "No MID found for CPU%d at node 0x%08d", id, cpu_node);
printk(KERN_NOTICE "No MID found for CPU%d at node 0x%08x", id, cpu_node);
mid = 0;
}
cpu_data(id).mid = mid;
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/kernel/smp_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,6 @@ void __cpu_die(unsigned int cpu)

void __init smp_cpus_done(unsigned int max_cpus)
{
pcr_arch_init();
}

void smp_send_reschedule(int cpu)
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/systbls_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ sys_call_table:
/*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
/*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
/*340*/ .long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
/*345*/ .long sys_renameat2
/*345*/ .long sys_renameat2, sys_seccomp, sys_getrandom
4 changes: 2 additions & 2 deletions arch/sparc/kernel/systbls_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ sys_call_table32:
/*330*/ .word compat_sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime
.word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev
/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
.word sys32_renameat2
.word sys32_renameat2, sys_seccomp, sys_getrandom

#endif /* CONFIG_COMPAT */

Expand Down Expand Up @@ -166,4 +166,4 @@ sys_call_table:
/*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
.word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
.word sys_renameat2
.word sys_renameat2, sys_seccomp, sys_getrandom

0 comments on commit 13b102b

Please sign in to comment.