From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] arm64: Add big.LITTLE switcher stub
Date: Fri, 9 May 2014 17:40:30 +0100 [thread overview]
Message-ID: <1399653631-4938-2-git-send-email-broonie@kernel.org> (raw)
In-Reply-To: <1399653631-4938-1-git-send-email-broonie@kernel.org>
From: Mark Brown <broonie@linaro.org>
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 <broonie@linaro.org>
---
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 <linux/notifier.h>
+#include <linux/types.h>
+
+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
--
2.0.0.rc2
next prev parent reply other threads:[~2014-05-09 16:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 16:40 [PATCH 1/3] arm64: Enable OPP Mark Brown
2014-05-09 16:40 ` Mark Brown [this message]
2014-05-09 17:05 ` [PATCH 2/3] arm64: Add big.LITTLE switcher stub Sudeep Holla
2014-05-09 17:50 ` Mark Brown
2014-05-09 18:57 ` Sudeep Holla
2014-05-09 19:29 ` Mark Brown
2014-05-12 8:34 ` Sudeep Holla
2014-05-12 12:17 ` Mark Brown
2014-05-12 14:09 ` Mark Hambleton
2014-05-09 17:47 ` Catalin Marinas
2014-05-09 18:01 ` Mark Brown
2014-05-11 3:29 ` Nicolas Pitre
2014-05-09 16:40 ` [PATCH 3/3] cpufreq: Enable big.LITTLE cpufreq driver on arm64 Mark Brown
2014-05-12 4:16 ` Viresh Kumar
2014-05-19 23:19 ` Rafael J. Wysocki
2014-05-19 23:07 ` Mark Brown
2014-05-19 23:36 ` Rafael J. Wysocki
2014-06-05 10:04 ` Catalin Marinas
2014-06-05 12:10 ` Rafael J. Wysocki
2014-05-09 17:02 ` [PATCH 1/3] arm64: Enable OPP menon.nishanth at gmail.com
2014-05-09 17:11 ` Mark Brown
2014-05-09 17:17 ` menon.nishanth at gmail.com
2014-05-09 18:18 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399653631-4938-2-git-send-email-broonie@kernel.org \
--to=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).