From patchwork Fri May 9 16:40:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 29915 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E588420534 for ; Fri, 9 May 2014 16:41:13 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id oz11sf13818899veb.6 for ; Fri, 09 May 2014 09:41:13 -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:date :message-id:in-reply-to:references:subject:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ezl3uvlTnQMgkDaiA/YHS79Q+G7hvhCGme4gkZ6oIEY=; b=IulldlHQVfhM19CMzL6SzrgIIVPCtYdrqXsIGjdwl/DBqwdyCCM38so2H/nxj6G8yq x5Jb8idBtD/eqx5HlW1Cwnl7kR+mWhIlvjPHm6PIfuvZUghpKldPwysam3yPlD/BXHyd 8pOoYw4et/bpllcRvTIcKh9O8rS60rJPezt/bKiDmOx2FTND1U71RzVhYxH4zPutqI3W RYwWsorUfuAKiKHCTQbfjruUiNRq/P9gizNgDkgs9mVq2+mezEg4YPGuScsv40yEXO26 Nn+sPUBHfBhXciJDjakywSktJ4fft0q38e60VsUvhsIpS6eeuIYQpqcV1B5DddA2P1ol d62A== X-Gm-Message-State: ALoCoQkIEBBaaSZuKSlIU+h3/8bnKc0MfqYwoUwi/EycRloTlExm106/4Muc6snWhfOeq8YDm/NK X-Received: by 10.236.93.38 with SMTP id k26mr4938128yhf.20.1399653673697; Fri, 09 May 2014 09:41:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.118 with SMTP id f109ls413726qge.8.gmail; Fri, 09 May 2014 09:41:13 -0700 (PDT) X-Received: by 10.52.74.196 with SMTP id w4mr5472629vdv.19.1399653673561; Fri, 09 May 2014 09:41:13 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id tj4si807679vdc.105.2014.05.09.09.41.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 May 2014 09:41:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so5428278veb.25 for ; Fri, 09 May 2014 09:41:13 -0700 (PDT) X-Received: by 10.53.1.69 with SMTP id be5mr7729044vdd.27.1399653673494; Fri, 09 May 2014 09:41:13 -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 ib8csp95472vcb; Fri, 9 May 2014 09:41:13 -0700 (PDT) X-Received: by 10.66.139.38 with SMTP id qv6mr22139544pab.123.1399653672707; Fri, 09 May 2014 09:41:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sy6si2369079pab.158.2014.05.09.09.41.12; Fri, 09 May 2014 09:41:12 -0700 (PDT) Received-SPF: none (google.com: linux-pm-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 S1753864AbaEIQlH (ORCPT + 12 others); Fri, 9 May 2014 12:41:07 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:39431 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756558AbaEIQlG (ORCPT ); Fri, 9 May 2014 12:41:06 -0400 Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante.sirena.org.uk) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Winqq-0006Ho-4q; Fri, 09 May 2014 16:40:53 +0000 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.82) (envelope-from ) id 1Winqh-0001IW-FG; Fri, 09 May 2014 17:40:39 +0100 From: Mark Brown To: Catalin Marinas , Will Deacon , "Rafael J. Wysocki" , Viresh Kumar Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linaro-kernel@lists.linaro.org, Mark Brown Date: Fri, 9 May 2014 17:40:30 +0100 Message-Id: <1399653631-4938-2-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1399653631-4938-1-git-send-email-broonie@kernel.org> References: <1399653631-4938-1-git-send-email-broonie@kernel.org> X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: [PATCH 2/3] arm64: Add big.LITTLE switcher stub X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.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.180 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: , From: Mark Brown The big.LITTLE cpufreq driver is useful on arm64 big.LITTLE systems even without IKS support since it implements support for clusters with shared clocks (a common big.LITTLE configuration). In order to allow it to be built provide the non-IKS stubs for arm64, enabling cpufreq with all the cores available. It may make sense to make an asm-generic version of these stubs instead but given that there's only likely to be these two architectures using the code and asm-generic stubs also need per architecture updates it's probably more trouble than it's worth. Signed-off-by: Mark Brown --- arch/arm64/include/asm/bL_switcher.h | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 arch/arm64/include/asm/bL_switcher.h diff --git a/arch/arm64/include/asm/bL_switcher.h b/arch/arm64/include/asm/bL_switcher.h new file mode 100644 index 000000000000..2bee500b7f54 --- /dev/null +++ b/arch/arm64/include/asm/bL_switcher.h @@ -0,0 +1,54 @@ +/* + * Based on the stubs for the ARM implementation which is: + * + * Created by: Nicolas Pitre, April 2012 + * Copyright: (C) 2012-2013 Linaro Limited + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef ASM_BL_SWITCHER_H +#define ASM_BL_SWITCHER_H + +#include +#include + +typedef void (*bL_switch_completion_handler)(void *cookie); + +static inline int bL_switch_request(unsigned int cpu, + unsigned int new_cluster_id) +{ + return -ENOTSUPP; +} + +/* + * Register here to be notified about runtime enabling/disabling of + * the switcher. + * + * The notifier chain is called with the switcher activation lock held: + * the switcher will not be enabled or disabled during callbacks. + * Callbacks must not call bL_switcher_{get,put}_enabled(). + */ +#define BL_NOTIFY_PRE_ENABLE 0 +#define BL_NOTIFY_POST_ENABLE 1 +#define BL_NOTIFY_PRE_DISABLE 2 +#define BL_NOTIFY_POST_DISABLE 3 + +static inline int bL_switcher_register_notifier(struct notifier_block *nb) +{ + return 0; +} + +static inline int bL_switcher_unregister_notifier(struct notifier_block *nb) +{ + return 0; +} + +static inline bool bL_switcher_get_enabled(void) { return false; } +static inline void bL_switcher_put_enabled(void) { } +static inline int bL_switcher_trace_trigger(void) { return 0; } +static inline int bL_switcher_get_logical_index(u32 mpidr) { return -EUNATCH; } + +#endif