From patchwork Thu Jun 5 05:15:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4303011 Return-Path: X-Original-To: patchwork-linux-sh@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 7D4CFBEEA7 for ; Thu, 5 Jun 2014 05:13:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A45CE201F7 for ; Thu, 5 Jun 2014 05:13:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8EF020179 for ; Thu, 5 Jun 2014 05:13:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754782AbaFEFNL (ORCPT ); Thu, 5 Jun 2014 01:13:11 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:59375 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752831AbaFEFNJ (ORCPT ); Thu, 5 Jun 2014 01:13:09 -0400 Received: by mail-pd0-f173.google.com with SMTP id v10so554778pde.4 for ; Wed, 04 Jun 2014 22:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=LQcTqU66HC21yjALHpo3pA+tui8RS8QnKAUoUA7HvXw=; b=XwUPvosGXEPsUYWAShm9/FYx3LGn48rrTJR5GPjmLNSlGrJAvcbxALPUhnEGNUOPjS qBxX3CBhsPeTFFjLTiMdLM+HGjYDwyTZv9bh2uxmb0xvn0ObU/tHX5vRzMMnwKdIfYvs tl1zot6/tr6LX3SDJF9PggnS9ERkO5FOpWSjEmxXcZtmdjwEvMVpvfSoZ0Sxk0gcKEEl KtICXKieayUpxG7ISJgHDY7/EOUeoqd+fdPmQgxpa4LtE1tThqIqFOLSNHyQxp9Nu7Ex 45oK3o9ZHatIe0bQ+hl8pAKRqznH2CterQu8AbesOjXNq7/wh0xlVXSa6UU+WvzrGTcI vBDg== X-Received: by 10.68.225.74 with SMTP id ri10mr72730994pbc.116.1401945189092; Wed, 04 Jun 2014 22:13:09 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id io8sm17596915pbc.96.2014.06.04.22.13.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jun 2014 22:13:08 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , horms@verge.net.au, keita.kobayashi.ym@renesas.com Date: Thu, 05 Jun 2014 14:15:13 +0900 Message-Id: <20140605051513.18075.82876.sendpatchset@w520> In-Reply-To: <20140605051505.18075.76727.sendpatchset@w520> References: <20140605051505.18075.76727.sendpatchset@w520> Subject: [PATCH 01/08] ARM: shmobile: Allow use of boot code for non-SMP case Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Magnus Damm Allow build of platsmp.c and headsmp.S even though SMP is disabled in the kernel configuration. With this in place it is possible to share the reset vector setup code with power management code that needs to be built even though SMP is disabled. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/Makefile | 11 +++++++---- arch/arm/mach-shmobile/headsmp.S | 13 ++++++++----- 2 files changed, 15 insertions(+), 9 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/arm/mach-shmobile/Makefile +++ work/arch/arm/mach-shmobile/Makefile 2014-06-05 10:49:20.000000000 +0900 @@ -34,17 +34,17 @@ obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7 obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o endif +# CPU reset vector handling objects +cpu-y := platsmp.o headsmp.o + # SMP objects -smp-y := platsmp.o headsmp.o +smp-y := $(cpu-y) smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o -# IRQ objects -obj-$(CONFIG_ARCH_SH7372) += entry-intc.o - # PM objects obj-$(CONFIG_SUSPEND) += suspend.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o @@ -56,6 +56,9 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779 obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o +# IRQ objects +obj-$(CONFIG_ARCH_SH7372) += entry-intc.o + # Board objects ifdef CONFIG_ARCH_SHMOBILE_MULTI obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o --- 0001/arch/arm/mach-shmobile/headsmp.S +++ work/arch/arm/mach-shmobile/headsmp.S 2014-06-05 10:48:14.000000000 +0900 @@ -10,14 +10,17 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include #include +#include +#include #include +#ifdef CONFIG_SMP ENTRY(shmobile_invalidate_start) bl v7_invalidate_l1 b secondary_startup ENDPROC(shmobile_invalidate_start) +#endif /* * Reset vector for secondary CPUs. @@ -68,7 +71,7 @@ shmobile_smp_boot_find_mpidr: shmobile_smp_boot_next: add r1, r1, #1 - cmp r1, #CONFIG_NR_CPUS + cmp r1, #NR_CPUS blo shmobile_smp_boot_find_mpidr b shmobile_smp_sleep @@ -85,10 +88,10 @@ ENDPROC(shmobile_smp_sleep) .globl shmobile_smp_mpidr shmobile_smp_mpidr: -1: .space CONFIG_NR_CPUS * 4 +1: .space NR_CPUS * 4 .globl shmobile_smp_fn shmobile_smp_fn: -2: .space CONFIG_NR_CPUS * 4 +2: .space NR_CPUS * 4 .globl shmobile_smp_arg shmobile_smp_arg: -3: .space CONFIG_NR_CPUS * 4 +3: .space NR_CPUS * 4