All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] ARM SMC Calling Convention interface
@ 2015-11-25 11:04 Jens Wiklander
  2015-11-25 11:04 ` [PATCH v3 1/4] arm/arm64: add arm-smccc Jens Wiklander
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Jens Wiklander @ 2015-11-25 11:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This patch set is based on the Generic TEE subsystem v6 patchset
(https://lwn.net/Articles/662495/) sent out a few weeks ago. By isolating
the ARM SMC Calling Convention patches that are useful for other purposes
than to support the Generic TEE subsystem some complexity is removed from
that patch set.

This patch set adds a common interface to do an SMC or HVC following ARM
SMC Calling Convention. The interface is implemented for both the arm and
arm64 architectures and updates the PSCI driver to use this interface
instead for firmware communication.

v3:
* Moved the export of arm_smccc_{smc,hvc} to armksyms.c for both arm and arm64
* arm: add implementation for arm-smccc
  Reviewed-by: Lars Persson <lars.persson@axis.com>
* arm64: add implementation for arm-smccc
  drivers: psci: replace psci firmware calls
  Acked-by: Will Deacon <will.deacon@arm.com>

v2:
* Added unwinding support in the assembly functions

Thanks,
Jens

Jens Wiklander (4):
  arm/arm64: add arm-smccc
  arm: add implementation for arm-smccc
  arm64: add implementation for arm-smccc
  drivers: psci: replace psci firmware calls

 arch/arm/Kconfig                |  1 +
 arch/arm/kernel/Makefile        |  3 +-
 arch/arm/kernel/armksyms.c      |  6 +++
 arch/arm/kernel/psci-call.S     | 31 -------------
 arch/arm/kernel/smccc-call.S    | 50 +++++++++++++++++++++
 arch/arm64/Kconfig              |  1 +
 arch/arm64/kernel/Makefile      |  4 +-
 arch/arm64/kernel/arm64ksyms.c  |  5 +++
 arch/arm64/kernel/asm-offsets.c |  3 ++
 arch/arm64/kernel/psci-call.S   | 28 ------------
 arch/arm64/kernel/smccc-call.S  | 43 ++++++++++++++++++
 drivers/firmware/psci.c         | 23 +++++++++-
 include/linux/arm-smccc.h       | 98 +++++++++++++++++++++++++++++++++++++++++
 init/Kconfig                    |  3 ++
 14 files changed, 235 insertions(+), 64 deletions(-)
 delete mode 100644 arch/arm/kernel/psci-call.S
 create mode 100644 arch/arm/kernel/smccc-call.S
 delete mode 100644 arch/arm64/kernel/psci-call.S
 create mode 100644 arch/arm64/kernel/smccc-call.S
 create mode 100644 include/linux/arm-smccc.h

-- 
1.9.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 1/4] arm/arm64: add arm-smccc
  2015-11-25 11:04 [PATCH v3 0/4] ARM SMC Calling Convention interface Jens Wiklander
@ 2015-11-25 11:04 ` Jens Wiklander
  2015-11-25 11:04 ` [PATCH v3 2/4] arm: add implementation for arm-smccc Jens Wiklander
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Jens Wiklander @ 2015-11-25 11:04 UTC (permalink / raw)
  To: linux-arm-kernel

Adds helpers to do SMC and HVC based on ARM SMC Calling Convention.
CONFIG_HAVE_ARM_SMCCC is enabled for architectures that may support the
SMC or HVC instruction. It's the responsibility of the caller to know if
the SMC instruction is supported by the platform.

This patch doesn't provide an implementation of the declared functions.
Later patches will bring in implementations and set
CONFIG_HAVE_ARM_SMCCC for ARM and ARM64 respectively.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
---
 include/linux/arm-smccc.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++
 init/Kconfig              |  3 ++
 2 files changed, 101 insertions(+)
 create mode 100644 include/linux/arm-smccc.h

diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
new file mode 100644
index 0000000..dea68a9
--- /dev/null
+++ b/include/linux/arm-smccc.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2015, Linaro Limited
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+#ifndef __LINUX_ARM_SMCCC_H
+#define __LINUX_ARM_SMCCC_H
+
+#include <linux/types.h>
+#include <linux/linkage.h>
+
+/*
+ * This file provides common defines for ARM SMC Calling Convention as
+ * specified in
+ * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html
+ */
+
+#define ARM_SMCCC_SMC_32		(0 << 30)
+#define ARM_SMCCC_SMC_64		(1 << 30)
+#define ARM_SMCCC_FAST_CALL		(1 << 31)
+#define ARM_SMCCC_STD_CALL		(0 << 31)
+
+#define ARM_SMCCC_OWNER_MASK		0x3F
+#define ARM_SMCCC_OWNER_SHIFT		24
+
+#define ARM_SMCCC_FUNC_MASK		0xFFFF
+
+#define ARM_SMCCC_IS_FAST_CALL(smc_val)	((smc_val) & ARM_SMCCC_FAST_CALL)
+#define ARM_SMCCC_IS_64(smc_val)	((smc_val) & ARM_SMCCC_SMC_64)
+#define ARM_SMCCC_FUNC_NUM(smc_val)	((smc_val) & ARM_SMCCC_FUNC_MASK)
+#define ARM_SMCCC_OWNER_NUM(smc_val) \
+	(((smc_val) >> ARM_SMCCC_OWNER_SHIFT) & ARM_SMCCC_OWNER_MASK)
+
+#define ARM_SMCCC_CALL_VAL(type, calling_convention, owner, func_num) \
+	((type) | (calling_convention) | \
+	(((owner) & ARM_SMCCC_OWNER_MASK) << ARM_SMCCC_OWNER_SHIFT) | \
+	((func_num) & ARM_SMCCC_FUNC_MASK))
+
+#define ARM_SMCCC_OWNER_ARCH		0
+#define ARM_SMCCC_OWNER_CPU		1
+#define ARM_SMCCC_OWNER_SIP		2
+#define ARM_SMCCC_OWNER_OEM		3
+#define ARM_SMCCC_OWNER_STANDARD	4
+#define ARM_SMCCC_OWNER_TRUSTED_APP	48
+#define ARM_SMCCC_OWNER_TRUSTED_APP_END	49
+#define ARM_SMCCC_OWNER_TRUSTED_OS	50
+#define ARM_SMCCC_OWNER_TRUSTED_OS_END	63
+
+/**
+ * struct arm_smccc_res - Result from SMC/HVC call
+ * @a0-a3 result values from registers 0 to 3
+ */
+struct arm_smccc_res {
+	unsigned long a0;
+	unsigned long a1;
+	unsigned long a2;
+	unsigned long a3;
+};
+
+/**
+ * arm_smccc_smc() - make SMC calls
+ * @a0-a7: arguments passed in registers 0 to 7
+ * @res: result values from registers 0 to 3
+ *
+ * This function is used to make SMC calls following SMC Calling Convention.
+ * The content of the supplied param are copied to registers 0 to 7 prior
+ * to the SMC instruction. The return values are updated with the content
+ * from register 0 to 3 on return from the SMC instruction.
+ */
+asmlinkage void arm_smccc_smc(unsigned long a0, unsigned long a1,
+			unsigned long a2, unsigned long a3, unsigned long a4,
+			unsigned long a5, unsigned long a6, unsigned long a7,
+			struct arm_smccc_res *res);
+
+/**
+ * arm_smccc_hvc() - make HVC calls
+ * @a0-a7: arguments passed in registers 0 to 7
+ * @res: result values from registers 0 to 3
+ *
+ * This function is used to make HVC calls following SMC Calling
+ * Convention.  The content of the supplied param are copied to registers 0
+ * to 7 prior to the HVC instruction. The return values are updated with
+ * the content from register 0 to 3 on return from the HVC instruction.
+ */
+asmlinkage void arm_smccc_hvc(unsigned long a0, unsigned long a1,
+			unsigned long a2, unsigned long a3, unsigned long a4,
+			unsigned long a5, unsigned long a6, unsigned long a7,
+			struct arm_smccc_res *res);
+
+#endif /*__LINUX_ARM_SMCCC_H*/
diff --git a/init/Kconfig b/init/Kconfig
index c24b6f7..8d5a7b0 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -2061,3 +2061,6 @@ config ASN1
 	  functions to call on what tags.
 
 source "kernel/Kconfig.locks"
+
+config HAVE_ARM_SMCCC
+	bool
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 2/4] arm: add implementation for arm-smccc
  2015-11-25 11:04 [PATCH v3 0/4] ARM SMC Calling Convention interface Jens Wiklander
  2015-11-25 11:04 ` [PATCH v3 1/4] arm/arm64: add arm-smccc Jens Wiklander
@ 2015-11-25 11:04 ` Jens Wiklander
  2015-11-25 11:04 ` [PATCH v3 3/4] arm64: " Jens Wiklander
  2015-11-25 11:04 ` [PATCH v3 4/4] drivers: psci: replace psci firmware calls Jens Wiklander
  3 siblings, 0 replies; 13+ messages in thread
From: Jens Wiklander @ 2015-11-25 11:04 UTC (permalink / raw)
  To: linux-arm-kernel

Adds implementation for arm-smccc and enables CONFIG_HAVE_SMCCC for
architectures that may support arm-smccc. It's the responsibility of the
caller to know if the SMC instruction is supported by the platform.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Lars Persson <lars.persson@axis.com>
---
 arch/arm/Kconfig             |  1 +
 arch/arm/kernel/Makefile     |  2 ++
 arch/arm/kernel/armksyms.c   |  6 ++++++
 arch/arm/kernel/smccc-call.S | 50 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 59 insertions(+)
 create mode 100644 arch/arm/kernel/smccc-call.S

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 639411f..d394727 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -325,6 +325,7 @@ config ARCH_MULTIPLATFORM
 	select CLKSRC_OF
 	select COMMON_CLK
 	select GENERIC_CLOCKEVENTS
+	select HAVE_ARM_SMCCC if CPU_V7
 	select MIGHT_HAVE_PCI
 	select MULTI_IRQ_HANDLER
 	select SPARSE_IRQ
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index af9e59b..d2d0042 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -92,4 +92,6 @@ obj-y				+= psci-call.o
 obj-$(CONFIG_SMP)		+= psci_smp.o
 endif
 
+obj-$(CONFIG_HAVE_ARM_SMCCC)	+= smccc-call.o
+
 extra-y := $(head-y) vmlinux.lds
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index f89811f..7e45f69 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -16,6 +16,7 @@
 #include <linux/syscalls.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
+#include <linux/arm-smccc.h>
 
 #include <asm/checksum.h>
 #include <asm/ftrace.h>
@@ -175,3 +176,8 @@ EXPORT_SYMBOL(__gnu_mcount_nc);
 EXPORT_SYMBOL(__pv_phys_pfn_offset);
 EXPORT_SYMBOL(__pv_offset);
 #endif
+
+#ifdef CONFIG_HAVE_ARM_SMCCC
+EXPORT_SYMBOL(arm_smccc_smc);
+EXPORT_SYMBOL(arm_smccc_hvc);
+#endif
diff --git a/arch/arm/kernel/smccc-call.S b/arch/arm/kernel/smccc-call.S
new file mode 100644
index 0000000..8621e06
--- /dev/null
+++ b/arch/arm/kernel/smccc-call.S
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2015, Linaro Limited
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+#include <linux/linkage.h>
+
+#include <asm/opcodes-sec.h>
+#include <asm/opcodes-virt.h>
+#include <asm/unwind.h>
+
+	.macro SMCCC instr
+UNWIND(	.fnstart)
+	mov	r12, sp
+	push	{r4-r7}
+UNWIND(	.save	{r4-r7})
+	ldm	r12, {r4-r7}
+	\instr
+	pop	{r4-r7}
+	ldr	r12, [sp, #(4 * 4)]
+	stm	r12, {r0-r3}
+	bx	lr
+UNWIND(	.fnend)
+	.endm
+
+/*
+ * void smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
+ *		  unsigned long a3, unsigned long a4, unsigned long a5,
+ *		  unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
+ */
+ENTRY(arm_smccc_smc)
+	SMCCC __SMC(0)
+ENDPROC(arm_smccc_smc)
+
+/*
+ * void smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
+ *		  unsigned long a3, unsigned long a4, unsigned long a5,
+ *		  unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
+ */
+ENTRY(arm_smccc_hvc)
+	SMCCC __HVC(0)
+ENDPROC(arm_smccc_hvc)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 3/4] arm64: add implementation for arm-smccc
  2015-11-25 11:04 [PATCH v3 0/4] ARM SMC Calling Convention interface Jens Wiklander
  2015-11-25 11:04 ` [PATCH v3 1/4] arm/arm64: add arm-smccc Jens Wiklander
  2015-11-25 11:04 ` [PATCH v3 2/4] arm: add implementation for arm-smccc Jens Wiklander
@ 2015-11-25 11:04 ` Jens Wiklander
  2015-11-25 11:04 ` [PATCH v3 4/4] drivers: psci: replace psci firmware calls Jens Wiklander
  3 siblings, 0 replies; 13+ messages in thread
From: Jens Wiklander @ 2015-11-25 11:04 UTC (permalink / raw)
  To: linux-arm-kernel

Adds implementation for arm-smccc and enables CONFIG_HAVE_SMCCC.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm64/Kconfig              |  1 +
 arch/arm64/kernel/Makefile      |  2 +-
 arch/arm64/kernel/arm64ksyms.c  |  5 +++++
 arch/arm64/kernel/asm-offsets.c |  3 +++
 arch/arm64/kernel/smccc-call.S  | 43 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/kernel/smccc-call.S

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 07d1811..a7332ca 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -89,6 +89,7 @@ config ARM64
 	select SPARSE_IRQ
 	select SYSCTL_EXCEPTION_TRACE
 	select HAVE_CONTEXT_TRACKING
+	select HAVE_ARM_SMCCC
 	help
 	  ARM 64-bit (AArch64) Linux support.
 
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index 22dc9bc..16d24a4 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -18,7 +18,7 @@ arm64-obj-y		:= debug-monitors.o entry.o irq.o fpsimd.o		\
 			   hyp-stub.o psci.o psci-call.o cpu_ops.o insn.o	\
 			   return_address.o cpuinfo.o cpu_errata.o		\
 			   cpufeature.o alternative.o cacheinfo.o		\
-			   smp.o smp_spin_table.o topology.o
+			   smp.o smp_spin_table.o topology.o smccc-call.o
 
 arm64-obj-$(CONFIG_COMPAT)		+= sys32.o kuser32.o signal32.o 	\
 					   sys_compat.o entry32.o		\
diff --git a/arch/arm64/kernel/arm64ksyms.c b/arch/arm64/kernel/arm64ksyms.c
index a85843d..b3c072b 100644
--- a/arch/arm64/kernel/arm64ksyms.c
+++ b/arch/arm64/kernel/arm64ksyms.c
@@ -26,6 +26,7 @@
 #include <linux/syscalls.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
+#include <linux/arm-smccc.h>
 
 #include <asm/checksum.h>
 
@@ -65,3 +66,7 @@ EXPORT_SYMBOL(test_and_change_bit);
 #ifdef CONFIG_FUNCTION_TRACER
 EXPORT_SYMBOL(_mcount);
 #endif
+
+	/* arm-smccc */
+EXPORT_SYMBOL(arm_smccc_smc);
+EXPORT_SYMBOL(arm_smccc_hvc);
diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
index 8d89cf8..cfa0885 100644
--- a/arch/arm64/kernel/asm-offsets.c
+++ b/arch/arm64/kernel/asm-offsets.c
@@ -28,6 +28,7 @@
 #include <asm/suspend.h>
 #include <asm/vdso_datapage.h>
 #include <linux/kbuild.h>
+#include <linux/arm-smccc.h>
 
 int main(void)
 {
@@ -161,5 +162,7 @@ int main(void)
   DEFINE(SLEEP_SAVE_SP_PHYS,	offsetof(struct sleep_save_sp, save_ptr_stash_phys));
   DEFINE(SLEEP_SAVE_SP_VIRT,	offsetof(struct sleep_save_sp, save_ptr_stash));
 #endif
+  DEFINE(ARM_SMCCC_RES_X0_OFFS,	offsetof(struct arm_smccc_res, a0));
+  DEFINE(ARM_SMCCC_RES_X2_OFFS,	offsetof(struct arm_smccc_res, a2));
   return 0;
 }
diff --git a/arch/arm64/kernel/smccc-call.S b/arch/arm64/kernel/smccc-call.S
new file mode 100644
index 0000000..ae0496f
--- /dev/null
+++ b/arch/arm64/kernel/smccc-call.S
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+#include <linux/linkage.h>
+#include <asm/asm-offsets.h>
+
+	.macro SMCCC instr
+	.cfi_startproc
+	\instr	#0
+	ldr	x4, [sp]
+	stp	x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
+	stp	x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
+	ret
+	.cfi_endproc
+	.endm
+
+/*
+ * void arm_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
+ *		  unsigned long a3, unsigned long a4, unsigned long a5,
+ *		  unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
+ */
+ENTRY(arm_smccc_smc)
+	SMCCC	smc
+ENDPROC(arm_smccc_smc)
+
+/*
+ * void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
+ *		  unsigned long a3, unsigned long a4, unsigned long a5,
+ *		  unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
+ */
+ENTRY(arm_smccc_hvc)
+	SMCCC	hvc
+ENDPROC(arm_smccc_hvc)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-11-25 11:04 [PATCH v3 0/4] ARM SMC Calling Convention interface Jens Wiklander
                   ` (2 preceding siblings ...)
  2015-11-25 11:04 ` [PATCH v3 3/4] arm64: " Jens Wiklander
@ 2015-11-25 11:04 ` Jens Wiklander
  2015-12-01  8:46   ` Jens Wiklander
  2015-12-01 18:47   ` Mark Rutland
  3 siblings, 2 replies; 13+ messages in thread
From: Jens Wiklander @ 2015-11-25 11:04 UTC (permalink / raw)
  To: linux-arm-kernel

Switch to use a generic interface for issuing SMC/HVC based on ARM SMC
Calling Convention. Removes now the now unused psci-call.S.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm/kernel/Makefile      |  1 -
 arch/arm/kernel/psci-call.S   | 31 -------------------------------
 arch/arm64/kernel/Makefile    |  2 +-
 arch/arm64/kernel/psci-call.S | 28 ----------------------------
 drivers/firmware/psci.c       | 23 +++++++++++++++++++++--
 5 files changed, 22 insertions(+), 63 deletions(-)
 delete mode 100644 arch/arm/kernel/psci-call.S
 delete mode 100644 arch/arm64/kernel/psci-call.S

diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index d2d0042..80856de 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -88,7 +88,6 @@ obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
 obj-$(CONFIG_ARM_VIRT_EXT)	+= hyp-stub.o
 ifeq ($(CONFIG_ARM_PSCI),y)
-obj-y				+= psci-call.o
 obj-$(CONFIG_SMP)		+= psci_smp.o
 endif
 
diff --git a/arch/arm/kernel/psci-call.S b/arch/arm/kernel/psci-call.S
deleted file mode 100644
index a78e9e1..0000000
--- a/arch/arm/kernel/psci-call.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * Copyright (C) 2015 ARM Limited
- *
- * Author: Mark Rutland <mark.rutland@arm.com>
- */
-
-#include <linux/linkage.h>
-
-#include <asm/opcodes-sec.h>
-#include <asm/opcodes-virt.h>
-
-/* int __invoke_psci_fn_hvc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */
-ENTRY(__invoke_psci_fn_hvc)
-	__HVC(0)
-	bx	lr
-ENDPROC(__invoke_psci_fn_hvc)
-
-/* int __invoke_psci_fn_smc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */
-ENTRY(__invoke_psci_fn_smc)
-	__SMC(0)
-	bx	lr
-ENDPROC(__invoke_psci_fn_smc)
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index 16d24a4..02893fa 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -15,7 +15,7 @@ CFLAGS_REMOVE_return_address.o = -pg
 arm64-obj-y		:= debug-monitors.o entry.o irq.o fpsimd.o		\
 			   entry-fpsimd.o process.o ptrace.o setup.o signal.o	\
 			   sys.o stacktrace.o time.o traps.o io.o vdso.o	\
-			   hyp-stub.o psci.o psci-call.o cpu_ops.o insn.o	\
+			   hyp-stub.o psci.o cpu_ops.o insn.o	\
 			   return_address.o cpuinfo.o cpu_errata.o		\
 			   cpufeature.o alternative.o cacheinfo.o		\
 			   smp.o smp_spin_table.o topology.o smccc-call.o
diff --git a/arch/arm64/kernel/psci-call.S b/arch/arm64/kernel/psci-call.S
deleted file mode 100644
index cf83e61..0000000
--- a/arch/arm64/kernel/psci-call.S
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * Copyright (C) 2015 ARM Limited
- *
- * Author: Will Deacon <will.deacon@arm.com>
- */
-
-#include <linux/linkage.h>
-
-/* int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1, u64 arg2) */
-ENTRY(__invoke_psci_fn_hvc)
-	hvc	#0
-	ret
-ENDPROC(__invoke_psci_fn_hvc)
-
-/* int __invoke_psci_fn_smc(u64 function_id, u64 arg0, u64 arg1, u64 arg2) */
-ENTRY(__invoke_psci_fn_smc)
-	smc	#0
-	ret
-ENDPROC(__invoke_psci_fn_smc)
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 42700f0..9c55d11 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -19,6 +19,7 @@
 #include <linux/pm.h>
 #include <linux/printk.h>
 #include <linux/psci.h>
+#include <linux/arm-smccc.h>
 #include <linux/reboot.h>
 
 #include <uapi/linux/psci.h>
@@ -56,8 +57,6 @@ struct psci_operations psci_ops;
 
 typedef unsigned long (psci_fn)(unsigned long, unsigned long,
 				unsigned long, unsigned long);
-asmlinkage psci_fn __invoke_psci_fn_hvc;
-asmlinkage psci_fn __invoke_psci_fn_smc;
 static psci_fn *invoke_psci_fn;
 
 enum psci_function {
@@ -70,6 +69,26 @@ enum psci_function {
 
 static u32 psci_function_id[PSCI_FN_MAX];
 
+static unsigned long __invoke_psci_fn_hvc(unsigned long function_id,
+			unsigned long arg0, unsigned long arg1,
+			unsigned long arg2)
+{
+	struct arm_smccc_res res;
+
+	arm_smccc_hvc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
+	return res.a0;
+}
+
+static unsigned long __invoke_psci_fn_smc(unsigned long function_id,
+			unsigned long arg0, unsigned long arg1,
+			unsigned long arg2)
+{
+	struct arm_smccc_res res;
+
+	arm_smccc_smc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
+	return res.a0;
+}
+
 static int psci_to_linux_errno(int errno)
 {
 	switch (errno) {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-11-25 11:04 ` [PATCH v3 4/4] drivers: psci: replace psci firmware calls Jens Wiklander
@ 2015-12-01  8:46   ` Jens Wiklander
  2015-12-01 18:47   ` Mark Rutland
  1 sibling, 0 replies; 13+ messages in thread
From: Jens Wiklander @ 2015-12-01  8:46 UTC (permalink / raw)
  To: linux-arm-kernel

+lorenzo.pieralisi at arm.com

On Wed, Nov 25, 2015 at 12:04:21PM +0100, Jens Wiklander wrote:
> Switch to use a generic interface for issuing SMC/HVC based on ARM SMC
> Calling Convention. Removes now the now unused psci-call.S.
> 
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> Acked-by: Will Deacon <will.deacon@arm.com>
> ---
>  arch/arm/kernel/Makefile      |  1 -
>  arch/arm/kernel/psci-call.S   | 31 -------------------------------
>  arch/arm64/kernel/Makefile    |  2 +-
>  arch/arm64/kernel/psci-call.S | 28 ----------------------------
>  drivers/firmware/psci.c       | 23 +++++++++++++++++++++--
>  5 files changed, 22 insertions(+), 63 deletions(-)
>  delete mode 100644 arch/arm/kernel/psci-call.S
>  delete mode 100644 arch/arm64/kernel/psci-call.S
> 
> diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
> index d2d0042..80856de 100644
> --- a/arch/arm/kernel/Makefile
> +++ b/arch/arm/kernel/Makefile
> @@ -88,7 +88,6 @@ obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
>  
>  obj-$(CONFIG_ARM_VIRT_EXT)	+= hyp-stub.o
>  ifeq ($(CONFIG_ARM_PSCI),y)
> -obj-y				+= psci-call.o
>  obj-$(CONFIG_SMP)		+= psci_smp.o
>  endif
>  
> diff --git a/arch/arm/kernel/psci-call.S b/arch/arm/kernel/psci-call.S
> deleted file mode 100644
> index a78e9e1..0000000
> --- a/arch/arm/kernel/psci-call.S
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -/*
> - * 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.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * Copyright (C) 2015 ARM Limited
> - *
> - * Author: Mark Rutland <mark.rutland@arm.com>
> - */
> -
> -#include <linux/linkage.h>
> -
> -#include <asm/opcodes-sec.h>
> -#include <asm/opcodes-virt.h>
> -
> -/* int __invoke_psci_fn_hvc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */
> -ENTRY(__invoke_psci_fn_hvc)
> -	__HVC(0)
> -	bx	lr
> -ENDPROC(__invoke_psci_fn_hvc)
> -
> -/* int __invoke_psci_fn_smc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */
> -ENTRY(__invoke_psci_fn_smc)
> -	__SMC(0)
> -	bx	lr
> -ENDPROC(__invoke_psci_fn_smc)
> diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
> index 16d24a4..02893fa 100644
> --- a/arch/arm64/kernel/Makefile
> +++ b/arch/arm64/kernel/Makefile
> @@ -15,7 +15,7 @@ CFLAGS_REMOVE_return_address.o = -pg
>  arm64-obj-y		:= debug-monitors.o entry.o irq.o fpsimd.o		\
>  			   entry-fpsimd.o process.o ptrace.o setup.o signal.o	\
>  			   sys.o stacktrace.o time.o traps.o io.o vdso.o	\
> -			   hyp-stub.o psci.o psci-call.o cpu_ops.o insn.o	\
> +			   hyp-stub.o psci.o cpu_ops.o insn.o	\
>  			   return_address.o cpuinfo.o cpu_errata.o		\
>  			   cpufeature.o alternative.o cacheinfo.o		\
>  			   smp.o smp_spin_table.o topology.o smccc-call.o
> diff --git a/arch/arm64/kernel/psci-call.S b/arch/arm64/kernel/psci-call.S
> deleted file mode 100644
> index cf83e61..0000000
> --- a/arch/arm64/kernel/psci-call.S
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -/*
> - * 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.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * Copyright (C) 2015 ARM Limited
> - *
> - * Author: Will Deacon <will.deacon@arm.com>
> - */
> -
> -#include <linux/linkage.h>
> -
> -/* int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1, u64 arg2) */
> -ENTRY(__invoke_psci_fn_hvc)
> -	hvc	#0
> -	ret
> -ENDPROC(__invoke_psci_fn_hvc)
> -
> -/* int __invoke_psci_fn_smc(u64 function_id, u64 arg0, u64 arg1, u64 arg2) */
> -ENTRY(__invoke_psci_fn_smc)
> -	smc	#0
> -	ret
> -ENDPROC(__invoke_psci_fn_smc)
> diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> index 42700f0..9c55d11 100644
> --- a/drivers/firmware/psci.c
> +++ b/drivers/firmware/psci.c
> @@ -19,6 +19,7 @@
>  #include <linux/pm.h>
>  #include <linux/printk.h>
>  #include <linux/psci.h>
> +#include <linux/arm-smccc.h>
>  #include <linux/reboot.h>
>  
>  #include <uapi/linux/psci.h>
> @@ -56,8 +57,6 @@ struct psci_operations psci_ops;
>  
>  typedef unsigned long (psci_fn)(unsigned long, unsigned long,
>  				unsigned long, unsigned long);
> -asmlinkage psci_fn __invoke_psci_fn_hvc;
> -asmlinkage psci_fn __invoke_psci_fn_smc;
>  static psci_fn *invoke_psci_fn;
>  
>  enum psci_function {
> @@ -70,6 +69,26 @@ enum psci_function {
>  
>  static u32 psci_function_id[PSCI_FN_MAX];
>  
> +static unsigned long __invoke_psci_fn_hvc(unsigned long function_id,
> +			unsigned long arg0, unsigned long arg1,
> +			unsigned long arg2)
> +{
> +	struct arm_smccc_res res;
> +
> +	arm_smccc_hvc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
> +	return res.a0;
> +}
> +
> +static unsigned long __invoke_psci_fn_smc(unsigned long function_id,
> +			unsigned long arg0, unsigned long arg1,
> +			unsigned long arg2)
> +{
> +	struct arm_smccc_res res;
> +
> +	arm_smccc_smc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
> +	return res.a0;
> +}
> +
>  static int psci_to_linux_errno(int errno)
>  {
>  	switch (errno) {
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-11-25 11:04 ` [PATCH v3 4/4] drivers: psci: replace psci firmware calls Jens Wiklander
  2015-12-01  8:46   ` Jens Wiklander
@ 2015-12-01 18:47   ` Mark Rutland
  2015-12-01 19:44     ` Jens Wiklander
  1 sibling, 1 reply; 13+ messages in thread
From: Mark Rutland @ 2015-12-01 18:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Jens,

On Wed, Nov 25, 2015 at 12:04:21PM +0100, Jens Wiklander wrote:
> Switch to use a generic interface for issuing SMC/HVC based on ARM SMC
> Calling Convention. Removes now the now unused psci-call.S.
> 
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> Acked-by: Will Deacon <will.deacon@arm.com>
> ---
>  arch/arm/kernel/Makefile      |  1 -
>  arch/arm/kernel/psci-call.S   | 31 -------------------------------
>  arch/arm64/kernel/Makefile    |  2 +-
>  arch/arm64/kernel/psci-call.S | 28 ----------------------------
>  drivers/firmware/psci.c       | 23 +++++++++++++++++++++--
>  5 files changed, 22 insertions(+), 63 deletions(-)
>  delete mode 100644 arch/arm/kernel/psci-call.S
>  delete mode 100644 arch/arm64/kernel/psci-call.S

As a heads-up, this conflicts with changes in drivers/firmware/psci.c
that appeared in for v4.4-rc1.

The conflict is trivial (upstream some functions were added to the same
location as the invocation functions), but even git am -3 doesn't seem
to be able to fix that up automatically, so it would be good if you
could rebase this to v4.4-rc1 so as to avoid that conflict.

> diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> index 42700f0..9c55d11 100644
> --- a/drivers/firmware/psci.c
> +++ b/drivers/firmware/psci.c
> @@ -19,6 +19,7 @@
>  #include <linux/pm.h>
>  #include <linux/printk.h>
>  #include <linux/psci.h>
> +#include <linux/arm-smccc.h>
>  #include <linux/reboot.h>

Nit: please move the arm-smccc.h include to the start of the list to
keep this ordered alphabetically.

> +static unsigned long __invoke_psci_fn_hvc(unsigned long function_id,
> +			unsigned long arg0, unsigned long arg1,
> +			unsigned long arg2)
> +{
> +	struct arm_smccc_res res;
> +
> +	arm_smccc_hvc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
> +	return res.a0;
> +}
> +
> +static unsigned long __invoke_psci_fn_smc(unsigned long function_id,
> +			unsigned long arg0, unsigned long arg1,
> +			unsigned long arg2)
> +{
> +	struct arm_smccc_res res;
> +
> +	arm_smccc_smc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
> +	return res.a0;
> +}
> +

As mentioned above, this part needs to be rebased to v4.4-rc1 to avoid
conflicts.

I've given this a spin on arm64 (native and virtual) and arm (virtual).
SMP bringup, hotplug, and reboot worked as expected in all cases.

Assuming you apply the fixes requested above, for the PSCI parts:

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>

What's the plan for merging this? I assume this'll go via arm-soc?

Thanks,
Mark.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-12-01 18:47   ` Mark Rutland
@ 2015-12-01 19:44     ` Jens Wiklander
  2015-12-16 10:55       ` Lorenzo Pieralisi
  0 siblings, 1 reply; 13+ messages in thread
From: Jens Wiklander @ 2015-12-01 19:44 UTC (permalink / raw)
  To: linux-arm-kernel

+Lorenzo

On Tue, Dec 01, 2015 at 06:47:42PM +0000, Mark Rutland wrote:
> Hi Jens,
> 
> On Wed, Nov 25, 2015 at 12:04:21PM +0100, Jens Wiklander wrote:
> > Switch to use a generic interface for issuing SMC/HVC based on ARM SMC
> > Calling Convention. Removes now the now unused psci-call.S.
> > 
> > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> > Acked-by: Will Deacon <will.deacon@arm.com>
> > ---
> >  arch/arm/kernel/Makefile      |  1 -
> >  arch/arm/kernel/psci-call.S   | 31 -------------------------------
> >  arch/arm64/kernel/Makefile    |  2 +-
> >  arch/arm64/kernel/psci-call.S | 28 ----------------------------
> >  drivers/firmware/psci.c       | 23 +++++++++++++++++++++--
> >  5 files changed, 22 insertions(+), 63 deletions(-)
> >  delete mode 100644 arch/arm/kernel/psci-call.S
> >  delete mode 100644 arch/arm64/kernel/psci-call.S
> 
> As a heads-up, this conflicts with changes in drivers/firmware/psci.c
> that appeared in for v4.4-rc1.
> 
> The conflict is trivial (upstream some functions were added to the same
> location as the invocation functions), but even git am -3 doesn't seem
> to be able to fix that up automatically, so it would be good if you
> could rebase this to v4.4-rc1 so as to avoid that conflict.
> 
> > diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> > index 42700f0..9c55d11 100644
> > --- a/drivers/firmware/psci.c
> > +++ b/drivers/firmware/psci.c
> > @@ -19,6 +19,7 @@
> >  #include <linux/pm.h>
> >  #include <linux/printk.h>
> >  #include <linux/psci.h>
> > +#include <linux/arm-smccc.h>
> >  #include <linux/reboot.h>
> 
> Nit: please move the arm-smccc.h include to the start of the list to
> keep this ordered alphabetically.
> 
> > +static unsigned long __invoke_psci_fn_hvc(unsigned long function_id,
> > +			unsigned long arg0, unsigned long arg1,
> > +			unsigned long arg2)
> > +{
> > +	struct arm_smccc_res res;
> > +
> > +	arm_smccc_hvc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
> > +	return res.a0;
> > +}
> > +
> > +static unsigned long __invoke_psci_fn_smc(unsigned long function_id,
> > +			unsigned long arg0, unsigned long arg1,
> > +			unsigned long arg2)
> > +{
> > +	struct arm_smccc_res res;
> > +
> > +	arm_smccc_smc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
> > +	return res.a0;
> > +}
> > +
> 
> As mentioned above, this part needs to be rebased to v4.4-rc1 to avoid
> conflicts.
> 
> I've given this a spin on arm64 (native and virtual) and arm (virtual).
> SMP bringup, hotplug, and reboot worked as expected in all cases.
> 
> Assuming you apply the fixes requested above, for the PSCI parts:
> 
> Reviewed-by: Mark Rutland <mark.rutland@arm.com>
> Tested-by: Mark Rutland <mark.rutland@arm.com>

Thanks for the feeback and heads up, I'll fix.

> 
> What's the plan for merging this? I assume this'll go via arm-soc?

I talked to Arnd about this and he suggested to go via Russel.

Thanks,
Jens

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-12-01 19:44     ` Jens Wiklander
@ 2015-12-16 10:55       ` Lorenzo Pieralisi
  2015-12-16 12:55         ` Jens Wiklander
  0 siblings, 1 reply; 13+ messages in thread
From: Lorenzo Pieralisi @ 2015-12-16 10:55 UTC (permalink / raw)
  To: linux-arm-kernel

[CC'ed Daniel]

On Tue, Dec 01, 2015 at 08:44:22PM +0100, Jens Wiklander wrote:

[...]

> > What's the plan for merging this? I assume this'll go via arm-soc?
> 
> I talked to Arnd about this and he suggested to go via Russel.

Heads-up, this patch will conflict with:

https://patchwork.kernel.org/patch/7418351/

that goes via linux-pm tree, please let me and Daniel know how
you want us to sort this out.

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-12-16 10:55       ` Lorenzo Pieralisi
@ 2015-12-16 12:55         ` Jens Wiklander
  2015-12-16 13:47           ` Lorenzo Pieralisi
  0 siblings, 1 reply; 13+ messages in thread
From: Jens Wiklander @ 2015-12-16 12:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 16, 2015 at 10:55:29AM +0000, Lorenzo Pieralisi wrote:
> [CC'ed Daniel]
> 
> On Tue, Dec 01, 2015 at 08:44:22PM +0100, Jens Wiklander wrote:
> 
> [...]
> 
> > > What's the plan for merging this? I assume this'll go via arm-soc?
> > 
> > I talked to Arnd about this and he suggested to go via Russel.
> 
> Heads-up, this patch will conflict with:
> 
> https://patchwork.kernel.org/patch/7418351/
> 
> that goes via linux-pm tree, please let me and Daniel know how
> you want us to sort this out.

I guess this arm-smccc patchset need to go together with that patch in
some way. I've just uploaded my patches in Russels patch system, but I
can stop that and try to go via the linux-pm tree instead if you think
the maintainer would accept that. I'll need to ask Russel if he can ack
the patches "arm/arm64: add arm-smccc" and
"arm: add implementation for arm-smccc" first though.

Would that work or do you have another idea? I'm of course happy either
way as long as the patches get through. I'm new to this so any advice is
appreciated.

Thanks,
Jens

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-12-16 12:55         ` Jens Wiklander
@ 2015-12-16 13:47           ` Lorenzo Pieralisi
  2015-12-17  7:07             ` Jens Wiklander
  2015-12-21  9:11             ` Russell King - ARM Linux
  0 siblings, 2 replies; 13+ messages in thread
From: Lorenzo Pieralisi @ 2015-12-16 13:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 16, 2015 at 01:55:11PM +0100, Jens Wiklander wrote:
> On Wed, Dec 16, 2015 at 10:55:29AM +0000, Lorenzo Pieralisi wrote:
> > [CC'ed Daniel]
> > 
> > On Tue, Dec 01, 2015 at 08:44:22PM +0100, Jens Wiklander wrote:
> > 
> > [...]
> > 
> > > > What's the plan for merging this? I assume this'll go via arm-soc?
> > > 
> > > I talked to Arnd about this and he suggested to go via Russel.
> > 
> > Heads-up, this patch will conflict with:
> > 
> > https://patchwork.kernel.org/patch/7418351/
> > 
> > that goes via linux-pm tree, please let me and Daniel know how
> > you want us to sort this out.
> 
> I guess this arm-smccc patchset need to go together with that patch in
> some way. I've just uploaded my patches in Russels patch system, but I
> can stop that and try to go via the linux-pm tree instead if you think
> the maintainer would accept that. I'll need to ask Russel if he can ack
> the patches "arm/arm64: add arm-smccc" and
> "arm: add implementation for arm-smccc" first though.
> 
> Would that work or do you have another idea? I'm of course happy either
> way as long as the patches get through. I'm new to this so any advice is
> appreciated.

It is really up to Daniel and Russell. If Daniel acks:

https://patchwork.kernel.org/patch/7418351/

I can easily rebase it and send it to RMK patch system (as things stand
it seems the easier option), otherwise the merge conflict (which will show
up in -next anyway) has to be sorted out, I am open to suggestions.

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-12-16 13:47           ` Lorenzo Pieralisi
@ 2015-12-17  7:07             ` Jens Wiklander
  2015-12-21  9:11             ` Russell King - ARM Linux
  1 sibling, 0 replies; 13+ messages in thread
From: Jens Wiklander @ 2015-12-17  7:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 16, 2015 at 01:47:40PM +0000, Lorenzo Pieralisi wrote:
> On Wed, Dec 16, 2015 at 01:55:11PM +0100, Jens Wiklander wrote:
> > On Wed, Dec 16, 2015 at 10:55:29AM +0000, Lorenzo Pieralisi wrote:
> > > [CC'ed Daniel]
> > > 
> > > On Tue, Dec 01, 2015 at 08:44:22PM +0100, Jens Wiklander wrote:
> > > 
> > > [...]
> > > 
> > > > > What's the plan for merging this? I assume this'll go via arm-soc?
> > > > 
> > > > I talked to Arnd about this and he suggested to go via Russel.
> > > 
> > > Heads-up, this patch will conflict with:
> > > 
> > > https://patchwork.kernel.org/patch/7418351/
> > > 
> > > that goes via linux-pm tree, please let me and Daniel know how
> > > you want us to sort this out.
> > 
> > I guess this arm-smccc patchset need to go together with that patch in
> > some way. I've just uploaded my patches in Russels patch system, but I
> > can stop that and try to go via the linux-pm tree instead if you think
> > the maintainer would accept that. I'll need to ask Russel if he can ack
> > the patches "arm/arm64: add arm-smccc" and
> > "arm: add implementation for arm-smccc" first though.
> > 
> > Would that work or do you have another idea? I'm of course happy either
> > way as long as the patches get through. I'm new to this so any advice is
> > appreciated.
> 
> It is really up to Daniel and Russell. If Daniel acks:
> 
> https://patchwork.kernel.org/patch/7418351/
> 
> I can easily rebase it and send it to RMK patch system (as things stand
> it seems the easier option), otherwise the merge conflict (which will show
> up in -next anyway) has to be sorted out, I am open to suggestions.

What you're suggesting sounds good to me.

Thanks,
Jens

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 4/4] drivers: psci: replace psci firmware calls
  2015-12-16 13:47           ` Lorenzo Pieralisi
  2015-12-17  7:07             ` Jens Wiklander
@ 2015-12-21  9:11             ` Russell King - ARM Linux
  1 sibling, 0 replies; 13+ messages in thread
From: Russell King - ARM Linux @ 2015-12-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 16, 2015 at 01:47:40PM +0000, Lorenzo Pieralisi wrote:
> It is really up to Daniel and Russell. If Daniel acks:
> 
> https://patchwork.kernel.org/patch/7418351/
> 
> I can easily rebase it and send it to RMK patch system (as things stand
> it seems the easier option), otherwise the merge conflict (which will show
> up in -next anyway) has to be sorted out, I am open to suggestions.

I notice that no one has acked or apparently reviewd the first patch at
all.  It would be good to get something on that.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-12-21  9:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 11:04 [PATCH v3 0/4] ARM SMC Calling Convention interface Jens Wiklander
2015-11-25 11:04 ` [PATCH v3 1/4] arm/arm64: add arm-smccc Jens Wiklander
2015-11-25 11:04 ` [PATCH v3 2/4] arm: add implementation for arm-smccc Jens Wiklander
2015-11-25 11:04 ` [PATCH v3 3/4] arm64: " Jens Wiklander
2015-11-25 11:04 ` [PATCH v3 4/4] drivers: psci: replace psci firmware calls Jens Wiklander
2015-12-01  8:46   ` Jens Wiklander
2015-12-01 18:47   ` Mark Rutland
2015-12-01 19:44     ` Jens Wiklander
2015-12-16 10:55       ` Lorenzo Pieralisi
2015-12-16 12:55         ` Jens Wiklander
2015-12-16 13:47           ` Lorenzo Pieralisi
2015-12-17  7:07             ` Jens Wiklander
2015-12-21  9:11             ` Russell King - ARM Linux

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.