Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6897115ybh; Thu, 8 Aug 2019 07:20:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAmfgt9E67P/Rl7BFNjMSorcRXjeHHg66kkSpO9eAZlTjHEitpc5Pj3ObUD7asSMLgxsRc X-Received: by 2002:a17:90a:898e:: with SMTP id v14mr4323495pjn.119.1565274029141; Thu, 08 Aug 2019 07:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565274029; cv=none; d=google.com; s=arc-20160816; b=FB1ptwE43RwDB3YWYijp7l2RmsuKO7hiljN6uYsn3a+pLYuu3DEY9F24hHPN2owu5M WONMHDegwXUz+kCtTC6JFaeJMnyL/HDH47y0zytN1X1kv6vpmf/fVMiLmAuH+ITNmnfg gSD11YT46IXd6B6DicRuQh2KwjXAgV6+l3xQp99R+iW+2z7yIs4l4x8l3zrVInxD6Kdu TIYU6NCxr8ChwncXNBrSf9uvsi5DcI0XApCD/iZQc/xCO2FYESqzuoAYsrZrHs315yAz 2m9IBla/4j2GyTUVWhABhH/VUvz2t8CcvYJc+lZNRoMm5omqubrx9Lba8jIJgkIcubu9 r9cg== 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 :dkim-signature; bh=GW4A3C1/4qWDt5LBlXwXuni4NJquarin7tqfcXTVjvA=; b=CNWJnhErKps0NL2TW5wQyuMmALbUC3EebnZTP28xJjfH3xLyCsAf9nMWDMjdak7cTw mOePNRdWfiKkmyBXp5JYAfC4Ul14jwt9g9isHg78MIHC6RkzY2uyaJQRDgdhz4t+3GDk hcr42dl9Qgi2H2kaPLeszjRybWY+gYaHSw9eD6AqcmsnXQ4IA35rvD99lzo7hfSHg8b3 nRHS+qK9rdqsiO/aljTKrnggbAmDzan4ruXFKQY1owC3ztAsN32GYgWFMwfN+hXi2kWF OVgRexFFUkTjCAMQ9Il8NBl2sV5zhZI8MWRKp2omo6MkMpapmWOo0pjOo9E7J9xEKTQh SQpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lfH0Guq7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si22835483pgl.252.2019.08.08.07.20.12; Thu, 08 Aug 2019 07:20:29 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=lfH0Guq7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732680AbfHHMyK (ORCPT + 99 others); Thu, 8 Aug 2019 08:54:10 -0400 Received: from mail-ua1-f66.google.com ([209.85.222.66]:39138 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbfHHMyJ (ORCPT ); Thu, 8 Aug 2019 08:54:09 -0400 Received: by mail-ua1-f66.google.com with SMTP id j8so36333514uan.6 for ; Thu, 08 Aug 2019 05:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GW4A3C1/4qWDt5LBlXwXuni4NJquarin7tqfcXTVjvA=; b=lfH0Guq7PuuNdAstn4QvxA1WDWXEF3ZxoZMxUurXLdQB0K1b8QuLdXm2RUBdqBkzjw nbHOEKeJ9d2HszCaaGiYFnL67LCAcQQUu1X41qjlxyKlZEUkINo2nyce8/wG5u/eXAEh KoITeRYbzKBbwlBtfBNxPixbvmO3FEDl6fu+uZepjSR+VHrgZZ0ikN9zeDm3uC7Q/+xg 5kOLVIOwx+rBBafuahCEcDUrg7fzRmu0ba9qOPREpDwEFYUqfw7e1i5PO/dcm8O7vfYl +Nbkeg991B9T7Fibad/cb1gjMXj2lYJe1eCam3pzY8q/qUq5SRKA01XEeXCdfg3WhtNH m/hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GW4A3C1/4qWDt5LBlXwXuni4NJquarin7tqfcXTVjvA=; b=G2O44yUYy2VsrcMPbFp8/VVdM5lJkdUcgn/w8pM8vUc2iWt7RdF/d8prEPjHdTSaBW ghPRYEhg/Cxqo+3KtiCSkDGnfoxUEvl7B9bIzKiiY/X7F2yHqP9vNCT4jWS62B90NU7z dvk6yeEpfAst8Bz5MUO7S6t7P8L7WRKoFdhXkd6zX1XEgTpglMJtlsuyai7z+SACLAHp W46gmpjW3Rgp08jh52FJWjhixlESfZgwMQSwx3pWzHnaFcsdmRQxd1bdmKZhRcngS1my 7OfYD9hvfvofHFYuIAGVBMaz8vKm//Esyr6zJ5YREPtfD86I/nQuc5f3XzZXpZD660zR ThUw== X-Gm-Message-State: APjAAAUz6hgWwdDnX/ZMJE8eaaaGubR3Bm3FKuXSrODm5WMLaXJCy+rB SGE2Yv5TckGduQCOdfdIwls= X-Received: by 2002:ab0:2906:: with SMTP id v6mr9065083uap.96.1565268848111; Thu, 08 Aug 2019 05:54:08 -0700 (PDT) Received: from asus-S451LA.lan ([190.22.21.218]) by smtp.gmail.com with ESMTPSA id r190sm26961692vkr.8.2019.08.08.05.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2019 05:54:07 -0700 (PDT) From: Luis Araneda To: linux@armlinux.org.uk, michal.simek@xilinx.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Luis Araneda Subject: [PATCH v2 1/2] ARM: zynq: support smp in thumb mode Date: Thu, 8 Aug 2019 08:52:42 -0400 Message-Id: <20190808125243.31046-2-luaraneda@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190808125243.31046-1-luaraneda@gmail.com> References: <20190808125243.31046-1-luaraneda@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add .arm directive to headsmp.S to ensure that the CPU starts in 32-bit ARM mode and the correct code size is copied on smp bring-up. This is related to the fix applied to SoCFPGA by commit 5616f36713ea ("ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel") Additionally, start secondary CPUs on secondary_startup_arm to automatically switch from ARM to thumb on a thumb kernel Signed-off-by: Luis Araneda Suggested-by: Michal Simek --- Changes: v1 -> v2: - Reword commit message to include related commits --- arch/arm/mach-zynq/headsmp.S | 2 ++ arch/arm/mach-zynq/platsmp.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-zynq/headsmp.S b/arch/arm/mach-zynq/headsmp.S index ab85003cf9ad..3449e0d1f990 100644 --- a/arch/arm/mach-zynq/headsmp.S +++ b/arch/arm/mach-zynq/headsmp.S @@ -7,6 +7,8 @@ #include #include + .arm + ENTRY(zynq_secondary_trampoline) ARM_BE8(setend be) @ ensure we are in BE8 mode ldr r0, zynq_secondary_trampoline_jump diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c index a7cfe07156f4..38728badabd4 100644 --- a/arch/arm/mach-zynq/platsmp.c +++ b/arch/arm/mach-zynq/platsmp.c @@ -81,7 +81,7 @@ EXPORT_SYMBOL(zynq_cpun_start); static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle) { - return zynq_cpun_start(__pa_symbol(secondary_startup), cpu); + return zynq_cpun_start(__pa_symbol(secondary_startup_arm), cpu); } /* -- 2.22.0