Message ID | 20141018.142335.1935310766779155342.davem@davemloft.net |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
> > I don't want to define the array size of the fpregs save area > > explicitly and thereby placing an artificial limit there. > > Nevermind, it seems we have a hard limit of 7 FPU save areas anyways. > > Meelis, please try this patch: Works fine with 3.17.0-09670-g0429fbc + fault patch. Will try current git next to find any new problems :)
On Sat, Oct 18, 2014 at 02:23:35PM -0400, David Miller wrote: > From: David Miller <davem@davemloft.net> > Date: Sat, 18 Oct 2014 13:59:07 -0400 (EDT) > > > I don't want to define the array size of the fpregs save area > > explicitly and thereby placing an artificial limit there. > > Nevermind, it seems we have a hard limit of 7 FPU save areas anyways. > > Meelis, please try this patch: > > diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h > index f85dc85..cc6275c 100644 > --- a/arch/sparc/include/asm/thread_info_64.h > +++ b/arch/sparc/include/asm/thread_info_64.h > @@ -63,7 +63,8 @@ struct thread_info { > struct pt_regs *kern_una_regs; > unsigned int kern_una_insn; > > - unsigned long fpregs[0] __attribute__ ((aligned(64))); > + unsigned long fpregs[(7 * 256) / sizeof(unsigned long)] This part: > + __attribute__ ((aligned(64))); Could be written as __aligned(64) Sam -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > I don't want to define the array size of the fpregs save area > > > explicitly and thereby placing an artificial limit there. > > > > Nevermind, it seems we have a hard limit of 7 FPU save areas anyways. > > > > Meelis, please try this patch: > > Works fine with 3.17.0-09670-g0429fbc + fault patch. > > Will try current git next to find any new problems :) Works on all 3 machines, with latest git (only had to apply the no-ipv6 patch on one of them). Thank you for the good work!
From: Meelis Roos <mroos@linux.ee> Date: Sun, 19 Oct 2014 20:12:43 +0300 (EEST) >> > > I don't want to define the array size of the fpregs save area >> > > explicitly and thereby placing an artificial limit there. >> > >> > Nevermind, it seems we have a hard limit of 7 FPU save areas anyways. >> > >> > Meelis, please try this patch: >> >> Works fine with 3.17.0-09670-g0429fbc + fault patch. >> >> Will try current git next to find any new problems :) > > Works on all 3 machines, with latest git (only had to apply the no-ipv6 > patch on one of them). Thank you for the good work! Thanks for testing. Hopefully we can kill the gcc-4.9 bug next, and then see if that exit_mmap() crash is still happening. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Sam Ravnborg <sam@ravnborg.org> Date: Sun, 19 Oct 2014 17:32:20 +0200 > This part: > >> + __attribute__ ((aligned(64))); > > Could be written as __aligned(64) I'll try to remember to sweep this up in sparc-next, thanks Sam. We probably use this long-hand form in a lot of other places in the sparc code too, so I'll try to do a full sweep. Thanks again. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Oct 19, 2014 at 01:27:37PM -0400, David Miller wrote: > From: Sam Ravnborg <sam@ravnborg.org> > Date: Sun, 19 Oct 2014 17:32:20 +0200 > > > This part: > > > >> + __attribute__ ((aligned(64))); > > > > Could be written as __aligned(64) > > I'll try to remember to sweep this up in sparc-next, thanks Sam. > > We probably use this long-hand form in a lot of other places in > the sparc code too, so I'll try to do a full sweep. Another related one would be a full sweep of "__asm__ __volatile__" to the shorter version "asm volatile". The latter is used in a few places in sparc already - so toolchain supports it. I got hits in: include/asm/irqflags_32.h: asm volatile("rd %%psr, %0" : "=r" (flags)); include/asm/processor_64.h:#define cpu_relax() asm volatile("\n99:\n\t" \ kernel/kprobes.c: asm volatile(".global kretprobe_trampoline\n" But this would touch 93 files. Thats too much crunch :-( Sam -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index f85dc85..cc6275c 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h @@ -63,7 +63,8 @@ struct thread_info { struct pt_regs *kern_una_regs; unsigned int kern_una_insn; - unsigned long fpregs[0] __attribute__ ((aligned(64))); + unsigned long fpregs[(7 * 256) / sizeof(unsigned long)] + __attribute__ ((aligned(64))); }; #endif /* !(__ASSEMBLY__) */