From patchwork Thu Oct 31 16:10:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 3121111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 96962C146B for ; Thu, 31 Oct 2013 16:12:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80BC320160 for ; Thu, 31 Oct 2013 16:12:20 +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 40BC220125 for ; Thu, 31 Oct 2013 16:12:19 +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 1VbuqO-0001gl-Cz; Thu, 31 Oct 2013 16:11:36 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbuqA-0004M8-Up; Thu, 31 Oct 2013 16:11:22 +0000 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vbupj-0004HV-T5 for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2013 16:10:57 +0000 Received: by mail-pd0-f171.google.com with SMTP id w10so2588725pde.30 for ; Thu, 31 Oct 2013 09:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=NVDUAfFm7swE7j/terVQsbQ5CBXsWTq3zH1oIUUI/VA=; b=Gvv0J3SSR4Qccyhtfcxtz/l5/l/pWnpYxHjRIyqIVXDj0EAK8UiqEwje09wX7JOdyE KQYuRtucsZE+sKsmWtfRNoSHnErM0GFIwfxnwy3JhPkBjiFZ9tESB/hOpY9nws0iGaiF V2GjD0WlA3Mbs0+OWKRQM6P0UKMf/5BjA2IsnMEOKSK/VBnaB6XhPrHM2w2E2NVSpj1P SEyjFd1LiOJ4rprn7uZx604TdOKKzvVZoqm0jqsnzGTQlySI1kSsw1ill0jnofuxixiU VGXVTadgilblOTjQ9DuYINTDcdI+GUCUveszP6xG1+/PFATXuZJnBL8lb+NGsayUv/v+ Lkrw== X-Received: by 10.67.11.103 with SMTP id eh7mr2747744pad.153.1383235834318; Thu, 31 Oct 2013 09:10:34 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id gg10sm5055982pbc.46.2013.10.31.09.10.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 31 Oct 2013 09:10:33 -0700 (PDT) From: Soren Brinkmann To: Michal Simek , Russell King Subject: [PATCH 2/6] arm: zynq: Invalidate L1 in secondary boot Date: Thu, 31 Oct 2013 09:10:15 -0700 Message-Id: <1383235819-2552-3-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 1.8.4.1 In-Reply-To: <1383235819-2552-1-git-send-email-soren.brinkmann@xilinx.com> References: <1383235819-2552-1-git-send-email-soren.brinkmann@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131031_121056_076504_4A7BFBA8 X-CRM114-Status: GOOD ( 11.96 ) X-Spam-Score: -1.9 (-) Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?q?S=C3=B6ren=20Brinkmann?= 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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 During boot, Linux initiates a clean-invalidate operation only, resulting in faulty data to be written to the memory system during resume. Therefore invalidate the L1 in the secondary boot path to avoid these issues. Signed-off-by: Soren Brinkmann Signed-off-by: Michal Simek --- arch/arm/mach-zynq/common.h | 2 ++ arch/arm/mach-zynq/headsmp.S | 6 +++++- arch/arm/mach-zynq/platsmp.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h index 3040d219570f..c22c92cea8cb 100644 --- a/arch/arm/mach-zynq/common.h +++ b/arch/arm/mach-zynq/common.h @@ -17,6 +17,8 @@ #ifndef __MACH_ZYNQ_COMMON_H__ #define __MACH_ZYNQ_COMMON_H__ +void zynq_secondary_startup(void); + extern int zynq_slcr_init(void); extern void zynq_slcr_system_reset(void); extern void zynq_slcr_cpu_stop(int cpu); diff --git a/arch/arm/mach-zynq/headsmp.S b/arch/arm/mach-zynq/headsmp.S index d4cd5f34fe5c..57a32869f0aa 100644 --- a/arch/arm/mach-zynq/headsmp.S +++ b/arch/arm/mach-zynq/headsmp.S @@ -18,5 +18,9 @@ zynq_secondary_trampoline_jump: .word /* cpu 1 */ .globl zynq_secondary_trampoline_end zynq_secondary_trampoline_end: - ENDPROC(zynq_secondary_trampoline) + +ENTRY(zynq_secondary_startup) + bl v7_invalidate_l1 + b secondary_startup +ENDPROC(zynq_secondary_startup) diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c index 2512624e657d..daed70682c54 100644 --- a/arch/arm/mach-zynq/platsmp.c +++ b/arch/arm/mach-zynq/platsmp.c @@ -95,7 +95,7 @@ EXPORT_SYMBOL(zynq_cpun_start); static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle) { - return zynq_cpun_start(virt_to_phys(secondary_startup), cpu); + return zynq_cpun_start(virt_to_phys(zynq_secondary_startup), cpu); } /*