From patchwork Fri Nov 8 20:34:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 178955 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3244781ilf; Fri, 8 Nov 2019 12:35:46 -0800 (PST) X-Google-Smtp-Source: APXvYqyUybODrNQ3zCHbss6Xz93D9bvanN1WBxJ3twYy4xIsV56/SOMH57daR3R4d6bFIAAzlLt9 X-Received: by 2002:a50:b6cb:: with SMTP id f11mr12466856ede.299.1573245346477; Fri, 08 Nov 2019 12:35:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573245346; cv=none; d=google.com; s=arc-20160816; b=OCwjjdK98IfRi7HAwtvAC+KHSx4E2PE3KNQuQfSzry45X1UdcZ5iLeGiUXU7Ex2XE7 zaZMogDcQED2XydbHUI7aadDzi2H/SAjzcWdVtBUljXB/srGArUsKY4uGza4+t2857np Ch/fQoa5t3qKJT0VQFg7qagYBnTi13tz4327ok5C/sAzeFFOBzYGyYdteu5f6liBKwzq N+MDsNb5rvUVxLl6tHmoJ9P9Lv/bixkXRjTR26cEiQ70+dtcOQL1c+EolOwUbVbWRE2J erQkoztTF8zBfOT2DgaQoqcKpYzlMPoC/t2AYKjyEm43jjbZ8mszm/yfcLThZgVtjSyh DlwA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=smx/IkQBHQp7WTqX8wEuunjBeJVo82++Y6rf+4uYjKM=; b=Il9lVQnFbGOjO0WxRJ9RTJi9Z+IJnuSo+LYccLNJAPHXQtJccso1aHOmzXfx6DnoQ1 QQcstyZbyB44ZdIZdpeHMnRKzIKuT0DQ8LCR6kw6mFm/9NCCLDoM9WiIUFYX4+x5SyBP l5r/pk+XoS+8GPOEpPFdyrgeNlcv8s60TmAB8AOfn6B/QueSjZlKVjmucEbMcHBpKpUR x1zqBp/MO+ks1r2NcLxlCVyqzzQDwY2ISX7zhcJYhKLUXp0+xlQBTXgwQTe1KXsNOtZQ qvn6oAaQZWz6ZpK5f0mzRk235R5hPjtTIcDbK7BdP/O1Sm7W3AUrq0fs6yLD7HJEihd3 onwg== ARC-Authentication-Results: i=1; mx.google.com; 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 oj22si4669364ejb.230.2019.11.08.12.35.46; Fri, 08 Nov 2019 12:35:46 -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; 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 S1732045AbfKHUfm (ORCPT + 26 others); Fri, 8 Nov 2019 15:35:42 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:37893 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727148AbfKHUfl (ORCPT ); Fri, 8 Nov 2019 15:35:41 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MK3mS-1iDApS0zHy-00LVEV; Fri, 08 Nov 2019 21:35:36 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/8] powerpc: fix vdso32 for ppc64le Date: Fri, 8 Nov 2019 21:34:26 +0100 Message-Id: <20191108203435.112759-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191108203435.112759-1-arnd@arndb.de> References: <20191108203435.112759-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Dqnz/eT1SOuWZ6Nsk7jZrA5JIgvW92857XvPyhhu/MApAgKJOA1 BSqzR9cR49iuc78Q1Wuwf0uc2LqdFCeF+GpSJDDSjMlUcug174u1+56gDh9aoAZMx1YjAwO T8m537fFb4GJkW3yVU2NiAIGc/zHBxrA4aQsCblV6As0b/E7RzWZwmp+Wb67zGD7CJn4a29 jQARD8KRNeNNsdWXsPuDw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:z9DAEWseD6Q=:XDnU256Cf828kWUYInolSf bjsDcH8IUWm6SRtKEzuDz1LNDsxNapd9Js8NqFeXQKodJibBTVt1CWq3I+eWNf5bEWjqg6Bmo GMRgQQ5xAisfdxwtgul9EA23xU+fhq5Xi5w9dj+iS1+k8UVSpB3aGo7foX+IPnXesLPuIsaVS Tbkhx7lFVDphXU3OjDCsgfpLKWJ3FZejSwj0JU02BnVeDUFVBGgt7OKzDZILi+NMzFLP4WKiB /n9rYAobaDLX01SFxoDZL6gZVkj3ukciNAr/Ctm3TPX9ZBkUK2OyqDEar647XxbJUKLTFu1Hb dO+rUeLw1GvDTkjCMJqWKCGY69Tun2ST/EpCSR4ZhHiyb3oFeYH2w4C6G4arYssqHhT/OB2kh P0J3cFD5fIwNZ4iqcXrcEI0ytM5HXkkzzrSI+/uzTVmBXuvetwPDzPXUWQ3BhgwYiFavMfkuT z+b46AtrRDtvbj0RDFRlkc3DFuutWONgCFmzxY9K5YJenzjYZ0u7LTxWE/xre4O6OLdkEaFFi laUvtad1/MwgCwkwsPih8PEvQMcfW3kZw3hISsye7koVjIxZ1wVKPJyaES1yt+yntwlE3qEJ6 r7AhhCO4cz4rDSDMnjefhHmeFJ9pU0Pb3l4VCVqRtBuUY4PbDibshG30vvhugGw3etkVvG3jI OovmDiBnYdLO9/0oE6Y3LFJGHdURs9hFRqdmaDbGDd/FqRCqY9CsuzUpoZpnb8lJEsSk2l3FU kDlE+IIQ1Y+GcegVCucCsFjPbmwGw7QN7AxkUc3csQoJue134oShcFM9CUmeUVJeQYKxm9Xcs UazpL9KIPfxjFxgJiJFG737jeYRHzVkMr+auvjQQ9FGwwPU0njhI40fbbvHhXLsryweDTofgV T+mGT+LC/mQ5+VZnB5kg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On little-endian 32-bit application running on 64-bit kernels, the current vdso would read the wrong half of the xtime seconds field. Change it to return the lower half like it does on big-endian. Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/vdso32/gettimeofday.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S index becd9f8767ed..4327665ad86f 100644 --- a/arch/powerpc/kernel/vdso32/gettimeofday.S +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S @@ -13,7 +13,7 @@ #include /* Offset for the low 32-bit part of a field of long type */ -#ifdef CONFIG_PPC64 +#if defined(CONFIG_PPC64) && defined(CONFIG_CPU_BIG_ENDIAN) #define LOPART 4 #define TSPEC_TV_SEC TSPC64_TV_SEC+LOPART #else