All of lore.kernel.org
 help / color / mirror / Atom feed
From: Soren Brinkmann <soren.brinkmann@xilinx.com>
To: Michal Simek <michal.simek@xilinx.com>,
	Russell King <linux@arm.linux.org.uk>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pm@vger.kernel.org, "Pawel Moll" <pawel.moll@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	"Kumar Gala" <galak@codeaurora.org>
Subject: [PATCH 5/9] ARM: zynq: Remove invalidate cache for cpu die
Date: Wed, 20 Aug 2014 13:41:51 -0700	[thread overview]
Message-ID: <1408567315-28479-6-git-send-email-soren.brinkmann@xilinx.com> (raw)
In-Reply-To: <1408567315-28479-1-git-send-email-soren.brinkmann@xilinx.com>

From: Daniel Lezcano <daniel.lezcano@linaro.org>

As there is no Power management unit on this board, it is not possible to power
down a core, just WFI is allowed. There is no point to invalidate the cache and
exit coherency.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-and-tested-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
 arch/arm/mach-zynq/hotplug.c | 32 +-------------------------------
 1 file changed, 1 insertion(+), 31 deletions(-)

diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c
index 5052c70326e4..366f46c91365 100644
--- a/arch/arm/mach-zynq/hotplug.c
+++ b/arch/arm/mach-zynq/hotplug.c
@@ -10,35 +10,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/smp.h>
-
-#include <asm/cacheflush.h>
-#include <asm/cp15.h>
-#include "common.h"
-
-static inline void zynq_cpu_enter_lowpower(void)
-{
-	unsigned int v;
-
-	flush_cache_all();
-	asm volatile(
-	"	mcr	p15, 0, %1, c7, c5, 0\n"
-	"	dsb\n"
-	/*
-	 * Turn off coherency
-	 */
-	"	mrc	p15, 0, %0, c1, c0, 1\n"
-	"	bic	%0, %0, #0x40\n"
-	"	mcr	p15, 0, %0, c1, c0, 1\n"
-	"	mrc	p15, 0, %0, c1, c0, 0\n"
-	"	bic	%0, %0, %2\n"
-	"	mcr	p15, 0, %0, c1, c0, 0\n"
-	  : "=&r" (v)
-	  : "r" (0), "Ir" (CR_C)
-	  : "cc");
-}
+#include <asm/proc-fns.h>
 
 /*
  * platform-specific code to shutdown a CPU
@@ -47,8 +19,6 @@ static inline void zynq_cpu_enter_lowpower(void)
  */
 void zynq_platform_cpu_die(unsigned int cpu)
 {
-	zynq_cpu_enter_lowpower();
-
 	/*
 	 * there is no power-control hardware on this platform, so all
 	 * we can do is put the core into WFI; this is safe as the calling
-- 
2.0.1.1.gfbfc394


WARNING: multiple messages have this Message-ID (diff)
From: soren.brinkmann@xilinx.com (Soren Brinkmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/9] ARM: zynq: Remove invalidate cache for cpu die
Date: Wed, 20 Aug 2014 13:41:51 -0700	[thread overview]
Message-ID: <1408567315-28479-6-git-send-email-soren.brinkmann@xilinx.com> (raw)
In-Reply-To: <1408567315-28479-1-git-send-email-soren.brinkmann@xilinx.com>

From: Daniel Lezcano <daniel.lezcano@linaro.org>

As there is no Power management unit on this board, it is not possible to power
down a core, just WFI is allowed. There is no point to invalidate the cache and
exit coherency.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-and-tested-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
 arch/arm/mach-zynq/hotplug.c | 32 +-------------------------------
 1 file changed, 1 insertion(+), 31 deletions(-)

diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c
index 5052c70326e4..366f46c91365 100644
--- a/arch/arm/mach-zynq/hotplug.c
+++ b/arch/arm/mach-zynq/hotplug.c
@@ -10,35 +10,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/smp.h>
-
-#include <asm/cacheflush.h>
-#include <asm/cp15.h>
-#include "common.h"
-
-static inline void zynq_cpu_enter_lowpower(void)
-{
-	unsigned int v;
-
-	flush_cache_all();
-	asm volatile(
-	"	mcr	p15, 0, %1, c7, c5, 0\n"
-	"	dsb\n"
-	/*
-	 * Turn off coherency
-	 */
-	"	mrc	p15, 0, %0, c1, c0, 1\n"
-	"	bic	%0, %0, #0x40\n"
-	"	mcr	p15, 0, %0, c1, c0, 1\n"
-	"	mrc	p15, 0, %0, c1, c0, 0\n"
-	"	bic	%0, %0, %2\n"
-	"	mcr	p15, 0, %0, c1, c0, 0\n"
-	  : "=&r" (v)
-	  : "r" (0), "Ir" (CR_C)
-	  : "cc");
-}
+#include <asm/proc-fns.h>
 
 /*
  * platform-specific code to shutdown a CPU
@@ -47,8 +19,6 @@ static inline void zynq_cpu_enter_lowpower(void)
  */
 void zynq_platform_cpu_die(unsigned int cpu)
 {
-	zynq_cpu_enter_lowpower();
-
 	/*
 	 * there is no power-control hardware on this platform, so all
 	 * we can do is put the core into WFI; this is safe as the calling
-- 
2.0.1.1.gfbfc394

  parent reply	other threads:[~2014-08-20 20:42 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 20:41 [PATCH 0/9] Zynq PM updates Soren Brinkmann
2014-08-20 20:41 ` Soren Brinkmann
2014-08-20 20:41 ` [PATCH 1/9] ARM: zynq: PM: Enable A9 internal clock gating feature Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-21 12:19   ` Michal Simek
2014-08-21 12:19     ` Michal Simek
2014-08-21 12:19     ` Michal Simek
2014-08-21 17:20     ` Sören Brinkmann
2014-08-21 17:20       ` Sören Brinkmann
2014-08-21 17:20       ` Sören Brinkmann
2014-08-20 20:41 ` [PATCH 2/9] Documentation: devicetree: Add binding for Synopsys DDR controller Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-20 20:41 ` [PATCH 3/9] ARM: zynq: DT: Add DDRC node Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-20 20:41 ` [PATCH 4/9] ARM: zynq: PM: Enable DDR self-refresh and clock stop Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-21 12:25   ` Michal Simek
2014-08-21 12:25     ` Michal Simek
2014-08-21 12:25     ` Michal Simek
2014-08-21 18:59     ` Sören Brinkmann
2014-08-21 18:59       ` Sören Brinkmann
2014-08-21 18:59       ` Sören Brinkmann
2014-08-20 20:41 ` Soren Brinkmann [this message]
2014-08-20 20:41   ` [PATCH 5/9] ARM: zynq: Remove invalidate cache for cpu die Soren Brinkmann
2014-08-20 20:41 ` [PATCH 6/9] ARM: zynq: cpuidle: Remove pointless code Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-20 20:41 ` [PATCH 7/9] ARM: zynq: Synchronise zynq_cpu_die/kill Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-20 20:41 ` [PATCH 8/9] ARM: zynq: Remove hotplug.c Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-21  1:32   ` Daniel Lezcano
2014-08-21  1:32     ` Daniel Lezcano
2014-08-21 23:38     ` Sören Brinkmann
2014-08-21 23:38       ` Sören Brinkmann
2014-08-21 23:38       ` Sören Brinkmann
2014-08-20 20:41 ` [PATCH 9/9] ARM: zynq: Rename 'zynq_platform_cpu_die' Soren Brinkmann
2014-08-20 20:41   ` Soren Brinkmann
2014-08-21 12:28   ` Michal Simek
2014-08-21 12:28     ` Michal Simek
2014-08-21 12:28     ` Michal Simek
2014-08-21 19:02     ` Sören Brinkmann
2014-08-21 19:02       ` Sören Brinkmann
2014-08-21 19:02       ` Sören Brinkmann
2014-08-22  5:52       ` Michal Simek
2014-08-22  5:52         ` Michal Simek

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=1408567315-28479-6-git-send-email-soren.brinkmann@xilinx.com \
    --to=soren.brinkmann@xilinx.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=pawel.moll@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=robh+dt@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.