From patchwork Wed Sep 23 09:39:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7248651 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 857A0BEEC1 for ; Wed, 23 Sep 2015 09:39:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A23512083C for ; Wed, 23 Sep 2015 09:39:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7161020822 for ; Wed, 23 Sep 2015 09:39:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881AbbIWJje (ORCPT ); Wed, 23 Sep 2015 05:39:34 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:64679 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbbIWJjc (ORCPT ); Wed, 23 Sep 2015 05:39:32 -0400 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0Le960-1aUTsu0HMa-00py7J; Wed, 23 Sep 2015 11:39:24 +0200 From: Arnd Bergmann To: linaro-kernel@lists.linaro.org Cc: Sudeep Holla , Viresh Kumar , "gregkh@linuxfoundation.org" , Rafael Wysocki , "sboyd@codeaurora.org" , open list , "stable@vger.kernel.org" , "open list:ACPI" , "Zheng, Lv" , Len Brown Subject: Re: [PATCH V3 1/2] ACPI / EC: Fix broken big-endian 64bit platforms using 'global_lock' Date: Wed, 23 Sep 2015 11:39:14 +0200 Message-ID: <3821285.7cLYDZsCsX@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <56026DBE.3090603@arm.com> References: <9b705747a138c96c26faee5218f7b47403195b28.1442305897.git.viresh.kumar@linaro.org> <56026DBE.3090603@arm.com> MIME-Version: 1.0 X-Provags-ID: V03:K0:DsbGsY3ovYiyP0qQICYK1QhCKjQEJokbOnLzDdLjQi2t3SqDhUI 9wbp3xp+Afmb10gPzCTD3qD2qGFvB0KiyG3exhUZp/2FcwhjBHGyTW6NWt/FfLJqaS8VewE vOugswqgsUIECluFNxqYetGwdruGi2YEKaaqRZFWNCx+TR3Cx29wWEGYEuUHDcbE5En/4zw 7GjfknPKuHPBC/6OLi/Pw== X-UI-Out-Filterresults: notjunk:1; V01:K0:cy5H1sARq7A=:KNDZMz5XGh/xZsGnT4RRD/ SGV1Cr368kVCc3Og32D05GeMXPoyIwvkFtq0/LQmY1N0Kb+D4Zm7CX6+o6URRmQM4ywES/+b6 nnBDz8V/umTy/i+F7BQKjXcgEVuloJN34hJ3lcMXcBtwk/uhhM9dqRHk1jD1yraGW3jUX1dMm t624cZBOBGccDKUw7D7djfSRcb6gB0ggiMXBGjbW327ZjaXbtIMV03AFl6o1OjnSZC7UnA9Sl 2qmcT4KgjfRpCKNYzQj4okuzQO32sjX/6SkNgOyu1KY2NyJ4QViNj7c+b7ltnE9yt3y8rLcMv vxv7xxLadUEUWm9cnwdtEjVglJ1kw32uSLOUevFuMr6oUYZCSNwUIdhEx3+4VF/nWSTCPmEwT F609xkW1/9ltnvCUfKoUPKNOYO7bzGLkt7zgb+s9mqfiIlWk9TIvWXw6snq/2FUaqssUSsS5t 8CV2X0ms0tbBduvCpko4YVhks2UHlnMH5KPzoqtKs8okIwk/9bopaN6B0CXROgcGSykbqngzq borcT9SL0rOPXYwtb5NYxlrKAevEVNhl6ENB9RrKRbqGUX2qkCoBRpUo//Xwz3oKzjjruR/Zr QhDQYc7fJG/GqL79aZ/sWmATy+WYiv1rzE2ItmDQxnGbzW98rsGGGUu5KVj1d9JPod8smHNkQ GcVliz2cplXU5kf4myaaQforZyV9s1XPgFEXPvFvxZVQ4MgGI/S8TxNNxwOHohez1DGw1X7g5 eLDb2QjJPirtsvmp Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wednesday 23 September 2015 10:15:42 Sudeep Holla wrote: > On 15/09/15 09:34, Viresh Kumar wrote: > > global_lock is defined as an unsigned long and accessing only its lower > > 32 bits from sysfs is incorrect, as we need to consider other 32 bits > > for big endian 64 bit systems. > > > > Fix that by making global_lock an u32 instead. > > > > Cc: # v4.1+ > > Signed-off-by: Viresh Kumar > > > > --- > > Its marked just for # v4.1+, because arm64 has the first 64 big-endian > > platform with ACPI. And ACPI support for that is mainlined recently > > only (Arnd Bergmann). > > > > Just to clarify, we don't support big-endian with ACPI on ARM64. > We mandate use of EFI for ACPI on ARM64 and EFI spec mandates only > little endian. > EFI doesn't care what endianess the kernel has, as long as the data structures are interpreted in the same way that the firmware defines them, and I thought that at least UEFI on ARM64 with big-endian is working in principle (if not, that is a bug that should be fixed). If ACPI is broken with big-endian kernels, we should probably add a Kconfig statement to forbid it, like this: Arnd --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" 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/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 5d1015c26ff4..06cacc13e3d2 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -6,6 +6,7 @@ menuconfig ACPI bool "ACPI (Advanced Configuration and Power Interface) Support" depends on !IA64_HP_SIM depends on IA64 || X86 || (ARM64 && EXPERT) + depends on !ARM64 || !CPU_BIG_ENDIAN || BROKEN depends on PCI select PNP default y