OSDN Git Service

Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS"
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 14 Dec 2020 17:33:51 +0000 (12:33 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 14 Dec 2020 17:33:51 +0000 (12:33 -0500)
commitadab66b71abfe206a020f11e561f4df41f0b2aba
tree2d75030a38696fe426cd7d2fbb58b60f1aad2e2a
parent74e2afc6df5782ea34bc7ac350aeb206c3666f9a
Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS"

It was believed that metag was the only architecture that required the ring
buffer to keep 8 byte words aligned on 8 byte architectures, and with its
removal, it was assumed that the ring buffer code did not need to handle
this case. It appears that sparc64 also requires this.

The following was reported on a sparc64 boot up:

   kernel: futex hash table entries: 65536 (order: 9, 4194304 bytes, linear)
   kernel: Running postponed tracer tests:
   kernel: Testing tracer function:
   kernel: Kernel unaligned access at TPC[552a20] trace_function+0x40/0x140
   kernel: Kernel unaligned access at TPC[552a24] trace_function+0x44/0x140
   kernel: Kernel unaligned access at TPC[552a20] trace_function+0x40/0x140
   kernel: Kernel unaligned access at TPC[552a24] trace_function+0x44/0x140
   kernel: Kernel unaligned access at TPC[552a20] trace_function+0x40/0x140
   kernel: PASSED

Need to put back the 64BIT aligned code for the ring buffer.

Link: https://lore.kernel.org/r/CADxRZqzXQRYgKc=y-KV=S_yHL+Y8Ay2mh5ezeZUnpRvg+syWKw@mail.gmail.com
Cc: stable@vger.kernel.org
Fixes: 86b3de60a0b6 ("ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS")
Reported-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/Kconfig
kernel/trace/ring_buffer.c