From patchwork Tue Nov 5 02:16:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 3138881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8A4BD9F432 for ; Tue, 5 Nov 2013 02:56:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A123D204D8 for ; Tue, 5 Nov 2013 02:56:16 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B938A203F7 for ; Tue, 5 Nov 2013 02:56:15 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VdWDr-0006TW-2f; Tue, 05 Nov 2013 02:18:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VdWCt-0004ju-1J; Tue, 05 Nov 2013 02:17:27 +0000 Received: from mail-pa0-f50.google.com ([209.85.220.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VdWCR-0004cd-9P for linux-arm-kernel@lists.infradead.org; Tue, 05 Nov 2013 02:17:00 +0000 Received: by mail-pa0-f50.google.com with SMTP id fb1so7779197pad.37 for ; Mon, 04 Nov 2013 18:16:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lJZgngRN/S0S+odhGfckrZgpYdvKnfqE2elOhQYwKJM=; b=fDHIwTkOV2EnaBhrWPB0+Be497Sei7B2IOFMaI3D/M5RUyaah+2WF/T17HIt2sgkuC hGoGpzMRQzsokKkgZtW/WBhLGt3ii3mOc/DN5vb2oUAQr1Tm5wwFG07GMoly9W2dENlN hascsZezx67ILVyi5m1NwW3XB0gU1x5aOhZirvGZWMuwh/HfSkezMaBMkqd8S5InTrZF yOc+O+VfM8iepjwzVLVz1GMUPf2Q2ln8cZl8oZ4oC/53I7vhRKPs5LPtpKngnbSbfK4E WPO7G+fylobZlbc8q3Me5MO9yr3hBRYzZWGu9Zb1zVey5H+Uf2/0ukVeUFT2nhMpLTk1 IL1w== X-Gm-Message-State: ALoCoQlxlRBvT1xc0/1d6EJd1Kv6TYMiy9x0LtwC8fl4l91kAomSlM0z/ZB/cbq3JdG7f77mERrF X-Received: by 10.68.106.65 with SMTP id gs1mr250990pbb.190.1383617793313; Mon, 04 Nov 2013 18:16:33 -0800 (PST) Received: from kamensky-w530.cisco.com.com (128-107-239-234.cisco.com. [128.107.239.234]) by mx.google.com with ESMTPSA id ry4sm36533776pab.4.2013.11.04.18.16.31 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Mon, 04 Nov 2013 18:16:32 -0800 (PST) From: Victor Kamensky To: linux-arm-kernel@lists.infradead.org, ben.dooks@codethink.co.uk, rmk@arm.linux.org.uk Subject: [PATCH 1/3] ARM: __fixup_smp read of SCU config should do byteswap in BE case Date: Mon, 4 Nov 2013 18:16:03 -0800 Message-Id: <1383617765-28052-2-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1383617765-28052-1-git-send-email-victor.kamensky@linaro.org> References: <1383617765-28052-1-git-send-email-victor.kamensky@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131104_211659_454672_F3FD83C1 X-CRM114-Status: UNSURE ( 8.50 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: nicolas.pitre@linaro.org, linaro-kernel@lists.linaro.org, patches@linaro.org, Victor Kamensky , r.sricharan@ti.com, santosh.shilimkar@ti.com, linaro-networking@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Commit "bc41b8724f24b9a27d1dcc6c974b8f686b38d554 ARM: 7846/1: Update SMP_ON_UP code to detect A9MPCore with 1 CPU devices" added read of SCU config register into __fixup_smp function. Such read should be followed by byteswap, if kernel runs in BE mode. Signed-off-by: Victor Kamensky Acked-by: Santosh Shilimkar --- arch/arm/kernel/head.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 7801866..cd788d5 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -508,6 +508,7 @@ __fixup_smp: teq r0, #0x0 @ '0' on actual UP A9 hardware beq __fixup_smp_on_up @ So its an A9 UP ldr r0, [r0, #4] @ read SCU Config +ARM_BE8(rev r0, r0) @ byteswap if big endian and r0, r0, #0x3 @ number of CPUs teq r0, #0x0 @ is 1? movne pc, lr