From patchwork Thu Jan 10 10:16:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 1959291 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BE3B33FF0F for ; Thu, 10 Jan 2013 10:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753212Ab3AJKRF (ORCPT ); Thu, 10 Jan 2013 05:17:05 -0500 Received: from mail-wi0-f177.google.com ([209.85.212.177]:62765 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722Ab3AJKRE (ORCPT ); Thu, 10 Jan 2013 05:17:04 -0500 Received: by mail-wi0-f177.google.com with SMTP id hm2so190339wib.10 for ; Thu, 10 Jan 2013 02:17:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=utlcCZJxrKYNWG/DJ9pVNDltnCecK+RS3TCRUoBMxmc=; b=pJ1Uyl2tI6e2gH8r9RbJsYYAsxR0nt60V8uf8EPSIbLWP7S2w4YOM1hPRDswSjOsm9 avD2ddf2wfsaYuC+ANpXu+fMCN9Y8c9ZwTxoNpTSaCAu6K1tz2GPtIHZxW/Y5N0/TNh7 7aBCTKrBJbPtujfSROVoopcishUV00iU7RMDftJLoQbj21vswyqiGZYfkG/jbEP3UxL0 6YG8OZiU+wp49VLuTcA0iCq6aOhzX1CTNYOhjUmRm6PtaWA3p8kpxKzwHRMk9p5SihUR xb0wG3HDPwiSMwXMvbGlqJaihIEySlS5nY+2UJRrhnkqsiUNQwcEgt87Y0HCkZ7wqz8A KOaQ== X-Received: by 10.194.119.5 with SMTP id kq5mr113278311wjb.48.1357813022497; Thu, 10 Jan 2013 02:17:02 -0800 (PST) Received: from linux-6jlp.site (ppp-93-104-130-158.dynamic.mnet-online.de. [93.104.130.158]) by mx.google.com with ESMTPS id hu8sm7690165wib.6.2013.01.10.02.16.59 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Jan 2013 02:17:00 -0800 (PST) From: Ulrich Hecht To: linux-sh@vger.kernel.org Cc: Ulrich Hecht Subject: [PATCH 1/2] ARM: mach-shmobile: add shmobile_cpu_disable_any() Date: Thu, 10 Jan 2013 11:16:43 +0100 Message-Id: <1357813004-9549-2-git-send-email-ulrich.hecht@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1357813004-9549-1-git-send-email-ulrich.hecht@gmail.com> References: <1357813004-9549-1-git-send-email-ulrich.hecht@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Method to disable any core to be used on platforms where CPU0 does not need special treatment. Signed-off-by: Ulrich Hecht --- arch/arm/mach-shmobile/hotplug.c | 6 ++++++ arch/arm/mach-shmobile/include/mach/common.h | 1 + 2 files changed, 7 insertions(+) diff --git a/arch/arm/mach-shmobile/hotplug.c b/arch/arm/mach-shmobile/hotplug.c index b09a0bd..a1524e3 100644 --- a/arch/arm/mach-shmobile/hotplug.c +++ b/arch/arm/mach-shmobile/hotplug.c @@ -56,6 +56,12 @@ int shmobile_cpu_disable(unsigned int cpu) return cpu == 0 ? -EPERM : 0; } +int shmobile_cpu_disable_any(unsigned int cpu) +{ + cpumask_clear_cpu(cpu, &dead_cpus); + return 0; +} + int shmobile_cpu_is_dead(unsigned int cpu) { return cpumask_test_cpu(cpu, &dead_cpus); diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index dfeca79..d22ea86 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -73,6 +73,7 @@ static inline int shmobile_cpuidle_init(void) { return 0; } extern void shmobile_cpu_die(unsigned int cpu); extern int shmobile_cpu_disable(unsigned int cpu); +extern int shmobile_cpu_disable_any(unsigned int cpu); #ifdef CONFIG_HOTPLUG_CPU extern int shmobile_cpu_is_dead(unsigned int cpu);