Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp44951pja; Fri, 22 Nov 2019 03:14:43 -0800 (PST) X-Google-Smtp-Source: APXvYqytk1Z6t5eMLey2jKhO6dDrJWDHYU7Mi/kmKkfsi/puknlq79gcSHX7ssA4KbBW+W+exm+l X-Received: by 2002:a17:906:6dcf:: with SMTP id j15mr21816801ejt.104.1574421283602; Fri, 22 Nov 2019 03:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421283; cv=none; d=google.com; s=arc-20160816; b=e0tBOdFYDGrFBObl6fiTBDD5/OR43Yon+DyHthzmFpl4uokS4RKzlFy9Yw8x+HvE4I oqnhHIkti706fYEHS+3z4mRv9qEzGFEnmE/t5CKtGk/E1SJMtCFOmLxpBD8+POWuZIsV Pu89Jm6sQ9GZyINh8zlTzJO5sXfyj65IvwGKz6zwdQOtWvj27xNCMSGiIPkBiAMnx/3x 01elhRuKxwR512czEYx+AuwDe6aZ9jMsTONYPcbtvE6dSjAyhU7nYCqigoVjydxhkr0F lTH2acm3cKtvyvCn02rHm12MOn6p4Wl5WhzJDrVkTzDa/Z8gqlimobwayvzRszG/rpMN DbkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dO0jdxIjjiF/9aDysUPPvG/VNX/A+N+1xfxSGETAG0E=; b=YViEAJikiR9bHaIRpAIXtAqq4+Nz1pJpV+kH0o4qwrsD65fKmaWjRZirsbLzR0AGCE X3uCLJyyb37M9bpB4wgmhSmqjMXCBeO9PAZQBMEt2Ly8oYiL87JozQJLspyTuX7cXSgC 1CrP2BPXFDnURt4hnwavm8JxIXM/3fngasblLcSOXs9xJW8cXUkObdHqQl1JXLLzL58O 6D/YBcDuSjKze0qes7rQjo6ZBVAzPKo5M21l63Y3IVxq6zuOnEojgscoiZddrr9llcwL K5fwMgDkt/kZcYDTxBMulBZZbVZCQJHHaFXxmLNod2wc+dvHAA+7pQBl05IGLUkBu6wA EmxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="xU/UcWS0"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id si11si4006960ejb.71.2019.11.22.03.14.20; Fri, 22 Nov 2019 03:14:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="xU/UcWS0"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729958AbfKVLMA (ORCPT + 99 others); Fri, 22 Nov 2019 06:12:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:49220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730314AbfKVK6r (ORCPT ); Fri, 22 Nov 2019 05:58:47 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C914320706; Fri, 22 Nov 2019 10:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420327; bh=6r+JJYD0lQTpwxkp1+u+3SUOZCOH5567WtYs3wa8vqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xU/UcWS0crExJMfFuESPLJyUNsyJaPOFX2YsN97KUcvoHslzHwSICNcp9jy83nbcw qv/zB0gh0gyXeSq0Jp4lJ6h8RVw1bD7oyL1c5xdlDiC+YGmQxchR/ONjQHyH8IcxdK ww6/C7GVWeb2grMcDbW2qJWVyUM6H4nU0L9UWFAk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Naveen N. Rao" , Michael Ellerman , Sasha Levin Subject: [PATCH 4.19 067/220] powerpc/pseries: Fix DTL buffer registration Date: Fri, 22 Nov 2019 11:27:12 +0100 Message-Id: <20191122100916.956196923@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Naveen N. Rao [ Upstream commit db787af1b8a6b4be428ee2ea7d409dafcaa4a43c ] 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: 7c105b63bd98 ("powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/platforms/pseries/dtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c index 18014cdeb590a..c762689e0eb33 100644 --- a/arch/powerpc/platforms/pseries/dtl.c +++ b/arch/powerpc/platforms/pseries/dtl.c @@ -149,7 +149,7 @@ static int dtl_start(struct dtl *dtl) /* Register our dtl buffer with the hypervisor. The HV expects the * buffer size to be passed in the second word of the buffer */ - ((u32 *)dtl->buf)[1] = DISPATCH_LOG_BYTES; + ((u32 *)dtl->buf)[1] = cpu_to_be32(DISPATCH_LOG_BYTES); hwcpu = get_hard_smp_processor_id(dtl->cpu); addr = __pa(dtl->buf); -- 2.20.1