From patchwork Sat May 24 17:24:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30891 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3F4362066E for ; Sat, 24 May 2014 17:24:09 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf26060159pab.7 for ; Sat, 24 May 2014 10:24:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=6/e+fGIVhMfNVJOGjXXIcgK/sXHSsXQfAeNLfIq6v/I=; b=EZ8HqAEawwq1U++acTyYV/AVn6kTfJEJtyYNQot8AC80Kl+S8vRcLoEWTQGsCoaXDw WJmJzRmBT/aZlKDZ2OQJ1zoJmw/JGyV+SUs9XD+ijyCDfuADv+0eUX9a8ll1oGP6FnOD yHtmZBwmBDzPKvGSyHff0K37qzJESUNq0ScNA5X+LkFcCEAqfBLfwdLo833rtuJu4WkX 4/yv6OgIwm3NwqaDnP6G437tPnIgADonOCNq3Bk3WgilsSMUbYJMnPmmOfxDtuMmQdnc AZ4Y5AFwB6TwsUnuwpcpJhhMn/9+ODM1oprPMoi/x6luul3FKtThQvhmmQAAPnKNR+R4 DCxw== X-Gm-Message-State: ALoCoQnihaOEW3Dst3zhxmymdcHInbftpGZ+sB5xLHvEoZGCGtQzhjgjgwHem76Fo0bpCPZTAwOW X-Received: by 10.66.137.105 with SMTP id qh9mr6011511pab.30.1400952248178; Sat, 24 May 2014 10:24:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.87 with SMTP id v81ls2192358qge.0.gmail; Sat, 24 May 2014 10:24:08 -0700 (PDT) X-Received: by 10.52.153.229 with SMTP id vj5mr8807127vdb.34.1400952248027; Sat, 24 May 2014 10:24:08 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id cl9si3664499vdd.81.2014.05.24.10.24.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 May 2014 10:24:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.173 as permitted sender) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id pa12so7743020veb.32 for ; Sat, 24 May 2014 10:24:07 -0700 (PDT) X-Received: by 10.58.83.69 with SMTP id o5mr66197vey.58.1400952247874; Sat, 24 May 2014 10:24:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp131428vcb; Sat, 24 May 2014 10:24:07 -0700 (PDT) X-Received: by 10.68.253.73 with SMTP id zy9mr15665849pbc.114.1400952246915; Sat, 24 May 2014 10:24:06 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sy6si8542095pab.158.2014.05.24.10.24.05; Sat, 24 May 2014 10:24:05 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751133AbaEXRYE (ORCPT + 9 others); Sat, 24 May 2014 13:24:04 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:53640 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbaEXRYD (ORCPT ); Sat, 24 May 2014 13:24:03 -0400 Received: by mail-wi0-f170.google.com with SMTP id bs8so2475371wib.3 for ; Sat, 24 May 2014 10:24:01 -0700 (PDT) X-Received: by 10.180.221.229 with SMTP id qh5mr12430828wic.33.1400952241329; Sat, 24 May 2014 10:24:01 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-404-187.w82-125.abo.wanadoo.fr. [82.125.3.187]) by mx.google.com with ESMTPSA id gr6sm11623320wib.8.2014.05.24.10.23.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 May 2014 10:24:00 -0700 (PDT) From: Daniel Lezcano To: kgene.kim@samsung.com, tomasz.figa@gmail.com Cc: linux-samsung-soc@vger.kernel.org, rjw@rjwysocki.net, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, arnd.bergmann@linaro.org, sachin.kamat@linaro.org, heiko@sntech.de Subject: [PATCH] ARM: exynos: Fix kernel panic when unplugging CPU1 on 4210 Date: Sat, 24 May 2014 19:24:15 +0200 Message-Id: <1400952255-13750-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <537FBE42.7050608@gmail.com> References: <537FBE42.7050608@gmail.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , A look at the code reveals use of S5P_VA_SYSRAM macro, in case of certain SoC revisions, which is not valid any longer, after SYSRAM started to be mapped dynamically. The new dynamic mapping is stored in sysram_base_addr variable, which is declared static in platsmp.c This fix makes sysram_base_addr non-static, declared it in common.h and used in pm.c instead of S5P_VA_SYSRAM. Signed-off-by: Daniel Lezcano Suggested-by: Tomasz Figa Reviewed-by: Tomasz Figa --- arch/arm/mach-exynos/common.h | 1 + arch/arm/mach-exynos/platsmp.c | 2 +- arch/arm/mach-exynos/pm.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index e2d0954..a012bc1 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -88,6 +88,7 @@ void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); struct map_desc; extern void __iomem *sysram_ns_base_addr; +extern void __iomem *sysram_base_addr; void exynos_init_io(void); void exynos_restart(enum reboot_mode mode, const char *cmd); void exynos_cpuidle_init(void); diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 9c16da2..f2bea78 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -32,7 +32,7 @@ extern void exynos4_secondary_startup(void); -static void __iomem *sysram_base_addr; +void __iomem *sysram_base_addr; void __iomem *sysram_ns_base_addr; static void __init exynos_smp_prepare_sysram(void) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index d10c351..87c0d34 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -168,10 +168,10 @@ int exynos_cluster_power_state(int cluster) #define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ - (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0)) + (sysram_base_addr + 0x24) : S5P_INFORM0)) #define EXYNOS_BOOT_VECTOR_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ - (S5P_VA_SYSRAM + 0x20) : S5P_INFORM1)) + (sysram_base_addr + 0x20) : S5P_INFORM1)) #define S5P_CHECK_AFTR 0xFCBA0D10 #define S5P_CHECK_SLEEP 0x00000BAD