Currently the read[bwlq]_relaxed() family are implemented on every
architecture except blackfin, m68k[1], metag, openrisc, s390[2] and
score. Increasingly drivers are being optimized to exploit relaxed
reads putting these architectures at risk of compilation failures for
shared drivers.
This patch addresses this by providing implementations of
read[bwlq]_relaxed() that are identical to the equivalent read[bwlq]().
All the above architectures include asm-generic/io.h .
Note that currently only eight architectures (alpha, arm, arm64, avr32,
hexagon, microblaze, mips and sh) implement write[bwlq]_relaxed() meaning
these functions are deliberately not included in this patch.
[1] m68k includes the relaxed family only when configured *without* MMU.
[2] s390 requires CONFIG_PCI to include the relaxed family.
Signed-off-by: Daniel Thompson <daniel.thompson(a)linaro.org>
Cc: Will Deacon <will.deacon(a)arm.com>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: linux-arch(a)vger.kernel.org
---
include/asm-generic/io.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 975e1cc..85ea117 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -66,6 +66,16 @@ static inline u32 readl(const volatile void __iomem *addr)
return __le32_to_cpu(__raw_readl(addr));
}
+#ifndef readb_relaxed
+#define readb_relaxed __raw_readb
+#endif
+#ifndef readw_relaxed
+#define readw_relaxed readw
+#endif
+#ifndef readl_relaxed
+#define readl_relaxed readl
+#endif
+
#ifndef __raw_writeb
static inline void __raw_writeb(u8 b, volatile void __iomem *addr)
{
@@ -105,6 +115,10 @@ static inline u64 readq(const volatile void __iomem *addr)
return __le64_to_cpu(__raw_readq(addr));
}
+#ifndef readq_relaxed
+#define readq_relaxed readq
+#endif
+
#ifndef __raw_writeq
static inline void __raw_writeq(u64 b, volatile void __iomem *addr)
{
--
1.9.3
Hi Rafael,
I am sending this again, but without the controversial part this time. I have
dropped last two patches which were about detecting clock sharing among CPUs.
Would fix up that later once other Maintainers get in sync about the bindings.
So, what's left here ? These are mostly updates/reorders which can be applied
the patches which I have dropped now. These are all well reviewed and tested
by others. Getting them in shouldn't break anything, I believe. Its better
people start using the updates we already have, otherwise they will keep on
sending fixes they get (The way Pramod Gurav tried it today).
Can we please get them in 3.17 if its still allowed? Or -next otherwise.
V2: https://lkml.org/lkml/2014/7/1/358
Rebased over: 3.17-rc2
git://git.linaro.org/people/viresh.kumar/linux.git cpufreq/cpu0-updates-v3
V2->V3: Dropped few patches, nothing much.
--
Thanks
Viresh
Viresh Kumar (10):
cpufreq: Add support for per-policy driver data
cpufreq: cpu0: Update Module Author
cpufreq: cpu0: don't validate clock on clk_put()
cpufreq: cpu0: print relevant error when we defer probe
cpufreq: cpu0: use dev_{err|warn|dbg} instead of pr_{err|warn|debug}
cpufreq: cpu0: Move per-cluster initialization code to ->init()
cpufreq: cpu0: try regulators with name "cpu-supply"
cpufreq: cpu0: Make allocate_resources() work for any CPU
cpufreq: cpu0: rename driver and internals to 'cpufreq_generic'
cpufreq: generic: set platform_{driver|device} '.name' to
'cpufreq-generic'
.../{cpufreq-cpu0.txt => cpufreq-generic.txt} | 8 +-
arch/arm/mach-imx/imx27-dt.c | 2 +-
arch/arm/mach-imx/mach-imx51.c | 2 +-
arch/arm/mach-omap2/pm.c | 2 +-
arch/arm/mach-shmobile/board-ape6evm-reference.c | 2 +-
arch/arm/mach-shmobile/cpufreq.c | 2 +-
arch/arm/mach-shmobile/setup-sh73a0.c | 4 +-
arch/arm/mach-zynq/common.c | 2 +-
drivers/cpufreq/Kconfig | 10 +-
drivers/cpufreq/Kconfig.arm | 2 +-
drivers/cpufreq/Makefile | 2 +-
drivers/cpufreq/cpufreq-cpu0.c | 248 --------------
drivers/cpufreq/cpufreq-generic.c | 363 +++++++++++++++++++++
drivers/cpufreq/exynos4210-cpufreq.c | 2 +-
drivers/cpufreq/exynos4x12-cpufreq.c | 2 +-
drivers/cpufreq/exynos5250-cpufreq.c | 2 +-
drivers/cpufreq/highbank-cpufreq.c | 6 +-
drivers/cpufreq/s5pv210-cpufreq.c | 2 +-
include/linux/cpufreq.h | 3 +
19 files changed, 392 insertions(+), 274 deletions(-)
rename Documentation/devicetree/bindings/cpufreq/{cpufreq-cpu0.txt => cpufreq-generic.txt} (85%)
delete mode 100644 drivers/cpufreq/cpufreq-cpu0.c
create mode 100644 drivers/cpufreq/cpufreq-generic.c
--
2.0.3.693.g996b0fd
The architectures where this peripheral exists (ARM and SH) have expensive
implementations of writel(), reliant on spin locks and explicit L2 cache
management. These architectures provide a cheaper writel_relaxed() which
is much better suited to peripherals that do not perform DMA. The
situation with readl()/readl_relaxed()is similar although less acute.
This driver does not use DMA and will be more power efficient and more
robust (due to absense of spin locks during console I/O) if it uses the
relaxed variants.
This change means the driver is no longer portable and therefore no
longer suitable for compile testing.
Signed-off-by: Daniel Thompson <daniel.thompson(a)linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla(a)gmail.com>
Cc: Patrice Chotard <patrice.chotard(a)st.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Jiri Slaby <jslaby(a)suse.cz>
Cc: kernel(a)stlinux.com
Cc: linux-serial(a)vger.kernel.org
Acked-by: Maxime Coquelin <maxime.coquelin(a)st.com>
Acked-by: Peter Griffin <peter.griffin(a)linaro.org>
---
drivers/tty/serial/Kconfig | 2 +-
drivers/tty/serial/st-asc.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 26cec64d..e9b1735 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1527,7 +1527,7 @@ config SERIAL_FSL_LPUART_CONSOLE
config SERIAL_ST_ASC
tristate "ST ASC serial port support"
select SERIAL_CORE
- depends on ARM || COMPILE_TEST
+ depends on ARM
help
This driver is for the on-chip Asychronous Serial Controller on
STMicroelectronics STi SoCs.
diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index 8b2d735..adadbc1 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -151,12 +151,12 @@ static inline struct asc_port *to_asc_port(struct uart_port *port)
static inline u32 asc_in(struct uart_port *port, u32 offset)
{
- return readl(port->membase + offset);
+ return readl_relaxed(port->membase + offset);
}
static inline void asc_out(struct uart_port *port, u32 offset, u32 value)
{
- writel(value, port->membase + offset);
+ writel_relaxed(value, port->membase + offset);
}
/*
--
1.9.3
Tree/Branch: next-20140909
Git describe: next-20140909
Commit: ec86f34b25 Add linux-next specific files for 20140909
Build Time: 54 min 7 sec
Passed: 5 / 6 ( 83.33 %)
Failed: 1 / 6 ( 16.67 %)
Errors: 0
Warnings: 42
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
Errors:
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
14 warnings 0 mismatches : arm64-allnoconfig
18 warnings 0 mismatches : arm-allmodconfig
2 warnings 0 mismatches : arm-multi_v7_defconfig
8 warnings 0 mismatches : arm64-allmodconfig
-------------------------------------------------------------------------------
Warnings Summary: 42
1 arch/arm/configs/multi_v7_defconfig:417:warning: override: reassigning to symbol CPU_FREQ
1 ../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../lib/test-string_helpers.c:293:1: warning: the frame size of 1312 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/usb/renesas_usbhs/common.c:469:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/tty/isicom.c:1058:240: warning: integer overflow in expression [-Woverflow]
1 ../drivers/staging/vt6655/device_main.c:3007:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/staging/rtl8192ee/pci.c:879:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'sk_buff_data_t' [-Wformat=]
1 ../drivers/staging/rtl8192ee/pci.c:879:5: warning: format '%d' expects argument of type 'int', but argument 2 has type 'sk_buff_data_t' [-Wformat=]
1 ../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/pci/host/pci-mvebu.c:887:39: warning: 'rtype' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../drivers/net/wireless/hostap/hostap_proc.c:184:2: warning: field width specifier '*' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
1 ../drivers/net/ethernet/amd/nmclan_cs.c:624:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at ../include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
1 ../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/isdn/hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
1 ../drivers/isdn/hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
1 ../drivers/infiniband/hw/mlx5/mem.c:71:143: warning: comparison of distinct pointer types lacks a cast
1 ../drivers/iio/adc/rockchip_saradc.c:144:6: warning: unused variable 'rate' [-Wunused-variable]
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
1 ../arch/arm64/kernel/insn.c:921:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:861:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:824:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:778:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:735:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:689:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:642:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:599:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:568:18: warning: 'shift' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:552:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:480:2: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:422:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:393:2: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/kernel/insn.c:347:7: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm/mach-cns3xxx/pcie.c:311:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 14 warnings, 0 section mismatches
Warnings:
../arch/arm64/kernel/insn.c:393:2: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:422:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:480:2: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:347:7: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:568:18: warning: 'shift' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:552:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:599:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:642:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:689:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:735:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:778:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:824:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:861:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
../arch/arm64/kernel/insn.c:921:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm-allmodconfig : PASS, 0 errors, 18 warnings, 0 section mismatches
Warnings:
../arch/arm/mach-cns3xxx/pcie.c:311:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../lib/test-string_helpers.c:293:1: warning: the frame size of 1312 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/iio/adc/rockchip_saradc.c:144:6: warning: unused variable 'rate' [-Wunused-variable]
../drivers/infiniband/hw/mlx5/mem.c:71:143: warning: comparison of distinct pointer types lacks a cast
../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/isdn/hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
../drivers/isdn/hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/net/ethernet/amd/nmclan_cs.c:624:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at ../include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
../drivers/tty/isicom.c:1058:240: warning: integer overflow in expression [-Woverflow]
../drivers/staging/rtl8192ee/pci.c:879:5: warning: format '%d' expects argument of type 'int', but argument 2 has type 'sk_buff_data_t' [-Wformat=]
../drivers/staging/rtl8192ee/pci.c:879:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'sk_buff_data_t' [-Wformat=]
../drivers/staging/vt6655/device_main.c:3007:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
arch/arm/configs/multi_v7_defconfig:417:warning: override: reassigning to symbol CPU_FREQ
../drivers/pci/host/pci-mvebu.c:887:39: warning: 'rtype' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 0 errors, 8 warnings, 0 section mismatches
Warnings:
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/net/wireless/hostap/hostap_proc.c:184:2: warning: field width specifier '*' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]
../drivers/usb/renesas_usbhs/common.c:469:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm-allnoconfig
arm64-defconfig
BUG_ON() in audit_syscall_entry() will be hit if user issues syscall(-1)
while syscall auditing is enabled (that is, by starting auditd).
In fact, syscall(-1) just fails (not signaled despite the expectation,
this is another minor bug), but the succeeding syscall hits BUG_ON.
When auditing syscall(-1), audit_syscall_entry() is called anyway, but
audit_syscall_exit() is not called and then 'in_syscall' flag in thread's
audit context is kept on. In this way, audit_syscall_entry() against
the succeeding syscall will see BUG_ON(in_syscall).
This patch fixes this bug by
1) enforcing syscall exit tracing, including audit_syscall_exit(), to be
executed in all cases,
2) handling user-issued syscall(-1) with arm_syscall().
Signed-off-by: AKASHI Takahiro <takahiro.akashi(a)linaro.org>
---
arch/arm/kernel/entry-common.S | 4 ++--
arch/arm/kernel/ptrace.c | 10 +++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index e52fe5a..28d3931 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -426,7 +426,6 @@ ENTRY(vector_swi)
local_restart:
ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
stmdb sp!, {r4, r5} @ push fifth and sixth args
-
tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls?
bne __sys_trace
@@ -476,10 +475,11 @@ __sys_trace:
cmp scno, #-1 @ skip the syscall?
bne 2b
add sp, sp, #S_OFF @ restore stack
- b ret_slow_syscall
+ b __sys_trace_return_skipped
__sys_trace_return:
str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
+__sys_trace_return_skipped:
mov r0, sp
bl syscall_trace_exit
b ret_slow_syscall
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 0c27ed6..f3339c8 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -928,9 +928,13 @@ static void tracehook_report_syscall(struct pt_regs *regs,
regs->ARM_ip = ip;
}
+extern int arm_syscall(int, struct pt_regs *);
+
asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
{
- current_thread_info()->syscall = scno;
+ int orig_scno;
+
+ current_thread_info()->syscall = orig_scno = scno;
/* Do the secure computing check first; failures should be fast. */
if (secure_computing(scno) == -1)
@@ -947,6 +951,10 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1,
regs->ARM_r2, regs->ARM_r3);
+ /* user-issued syscall of -1 */
+ if (scno == -1 && orig_scno == -1)
+ arm_syscall(scno, regs);
+
return scno;
}
--
1.7.9.5
Hi,
This patch series adds support for AFTR idle mode on boards with
secure firmware enabled and allows EXYNOS cpuidle driver usage on
Exynos4x12 SoCs.
It has been tested on Trats2 board (using Exynos4412 SoC with secure
firmware enabled) on which AFTR mode reduces power consumption by ~12%
when EXYNOS cpuidle driver is enabled (in both cases the default
exynos_defconfig config is used and CPU1-3 are offlined).
Currently Exynos4412 SoC support is limited to Trats2 board.
Depends on:
- next-20140904 branch of linux-next kernel tree
- "irqchip: Properly fetch the per cpu offset" patch
(https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg716674.html)
- [PATCH v3 0/5] Firmware-assisted suspend/resume of Exynos SoCs
(https://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg35921.html)
Changes since v5:
- rebased on top of next-20140904 +
"irqchip: Properly fetch the per cpu offset" patch
(https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg716674.html)
[PATCH v3 0/5] Firmware-assisted suspend/resume of Exynos SoCs
(https://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg35921.html)
- limit Exynos4412 SoC support to Trats2 board for now
Changes since v4:
- rebased on top of next-20140804 +
[PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg35262.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg34282.html)
- call exynos_save_cp15() only on A9 type core (this is needed for the future
Exynos3250 SoC support)
Changes since v3:
- rebased on top of next-20140804 +
[PATCH v4][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg35192.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg34282.html)
- (re-)added patch fixing S5P_CENTRAL_SEQ_OPTION register setup
Changes since v2:
- rebased on top of next-20140708 +
[PATCH 5/6] ARM: EXYNOS: Fix suspend/resume sequencies
(http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg32809.html)
[with rejects fixed]
[PATCH 6/6] ARM: EXYNOS: Register cpuidle device only on Exynos4210 and 5250
(http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg32808.html)
[PATCH 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg32991.html)
[with rejects fixed in patch #2]
- addressed review comments from Tomasz Figa and Daniel Lezcano
Changes since v1:
- synced against next-20140602
- added missing Acked-by-s
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Bartlomiej Zolnierkiewicz (5):
ARM: EXYNOS: PM: replace EXYNOS_BOOT_VECTOR_* macros by static inlines
ARM: EXYNOS: add AFTR mode support to firmware do_idle method
ARM: EXYNOS: cpuidle: add secure firmware support to AFTR mode code
ARM: EXYNOS: PM: fix register setup for AFTR mode code
ARM: EXYNOS: cpuidle: allow driver usage on Exynos4x12 SoCs
arch/arm/include/asm/firmware.h | 2 +-
arch/arm/mach-exynos/common.h | 5 ++++
arch/arm/mach-exynos/exynos.c | 5 +++-
arch/arm/mach-exynos/firmware.c | 34 ++++++++++++++++-------
arch/arm/mach-exynos/pm.c | 60 ++++++++++++++++++++++++-----------------
5 files changed, 71 insertions(+), 35 deletions(-)
--
1.8.2.3
Tree/Branch: master
Git describe: v3.17-rc4-140-g8c68fac
Commit: 8c68face55 Merge branch 'for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Build Time: 21 min 37 sec
Passed: 6 / 6 (100.00 %)
Failed: 0 / 6 ( 0.00 %)
Errors: 0
Warnings: 28
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
2 warnings 0 mismatches : arm64-allnoconfig
18 warnings 0 mismatches : arm-allmodconfig
1 warnings 0 mismatches : arm-multi_v7_defconfig
7 warnings 0 mismatches : arm64-allmodconfig
-------------------------------------------------------------------------------
Warnings Summary: 28
1 ../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/tty/isicom.c:1058:240: warning: integer overflow in expression [-Woverflow]
1 ../drivers/staging/wlan-ng/prism2fw.c:792:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/staging/vt6655/device_main.c:3091:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/staging/rtl8192ee/pci.c:885:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'sk_buff_data_t' [-Wformat=]
1 ../drivers/staging/rtl8192ee/pci.c:885:5: warning: format '%d' expects argument of type 'int', but argument 2 has type 'sk_buff_data_t' [-Wformat=]
1 ../drivers/staging/dgnc/dgnc_tty.c:572:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
1 ../drivers/pci/host/pci-mvebu.c:887:39: warning: 'rtype' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
1 ../drivers/net/ethernet/amd/nmclan_cs.c:624:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at ../include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
1 ../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/isdn/hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
1 ../drivers/isdn/hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
1 ../drivers/irqchip/irq-gic-v3.c:203:12: warning: 'gic_peek_irq' defined but not used [-Wunused-function]
1 ../drivers/irqchip/irq-gic-v3.c:132:13: warning: 'gic_write_sgi1r' defined but not used [-Wunused-function]
1 ../drivers/infiniband/hw/mlx5/mem.c:71:143: warning: comparison of distinct pointer types lacks a cast
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
1 ../arch/arm/mach-cns3xxx/pcie.c:311:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../drivers/irqchip/irq-gic-v3.c:132:13: warning: 'gic_write_sgi1r' defined but not used [-Wunused-function]
../drivers/irqchip/irq-gic-v3.c:203:12: warning: 'gic_peek_irq' defined but not used [-Wunused-function]
-------------------------------------------------------------------------------
arm-allmodconfig : PASS, 0 errors, 18 warnings, 0 section mismatches
Warnings:
../arch/arm/mach-cns3xxx/pcie.c:311:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/infiniband/hw/mlx5/mem.c:71:143: warning: comparison of distinct pointer types lacks a cast
../drivers/isdn/hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
../drivers/isdn/hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
../drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/net/ethernet/amd/nmclan_cs.c:624:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at ../include/pcmcia/ds.h:213) [-Wdeprecated-declarations]
../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
../drivers/staging/dgnc/dgnc_tty.c:572:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/tty/isicom.c:1058:240: warning: integer overflow in expression [-Woverflow]
../drivers/staging/rtl8192ee/pci.c:885:5: warning: format '%d' expects argument of type 'int', but argument 2 has type 'sk_buff_data_t' [-Wformat=]
../drivers/staging/rtl8192ee/pci.c:885:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'sk_buff_data_t' [-Wformat=]
../drivers/staging/vt6655/device_main.c:3091:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/staging/wlan-ng/prism2fw.c:792:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../drivers/pci/host/pci-mvebu.c:887:39: warning: 'rtype' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 7 warnings, 0 section mismatches
Warnings:
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined [enabled by default]
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined [enabled by default]
../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type [enabled by default]
../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm-allnoconfig
arm64-defconfig