Skip to content

Commit db787af

Browse files
rnavmpe
authored andcommitted
powerpc/pseries: Fix DTL buffer registration
When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set, we register the DTL buffer for a cpu when the associated file under powerpc/dtl in debugfs is opened. When doing so, we need to set the size of the buffer being registered in the second u32 word of the buffer. This needs to be in big endian, but we are not doing the conversion resulting in the below error showing up in dmesg: dtl_start: DTL registration for cpu 0 (hw 0) failed with -4 Fix this in the obvious manner. Fixes: 7c105b6 ("powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.") Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 51423a9 commit db787af

File tree

1 file changed

+1
-1
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+1
-1
lines changed

arch/powerpc/platforms/pseries/dtl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int dtl_start(struct dtl *dtl)
149149

150150
/* Register our dtl buffer with the hypervisor. The HV expects the
151151
* buffer size to be passed in the second word of the buffer */
152-
((u32 *)dtl->buf)[1] = DISPATCH_LOG_BYTES;
152+
((u32 *)dtl->buf)[1] = cpu_to_be32(DISPATCH_LOG_BYTES);
153153

154154
hwcpu = get_hard_smp_processor_id(dtl->cpu);
155155
addr = __pa(dtl->buf);

0 commit comments

Comments
 (0)