Re: Setting some clocks back to DUMMY fixes spdif output on imx6q wandboard rev B1

2016-08-30 Thread Nicolin Chen
On Tue, Aug 30, 2016 at 01:14:14PM +0200, Xavi Drudis Ferran wrote: > linux-libre-4.7 without my patch, i.e. clocks defined like this : > arch/arm/boot/dts/imx6qdl.dtsi: > aips-bus@0200 { /* AIPS1 */ > [...] >spba-bus@0200 { > [...] >spdif: spdif@02004000 { > clocks

Re: [RESEND][v2][PATCH] KVM: PPC: Book3S HV: Migrate pinned pages out of CMA

2016-08-30 Thread Alexey Kardashevskiy
On 14/07/16 14:25, Balbir Singh wrote: > > From: Balbir Singh > Subject: [RESEND][v2][PATCH] KVM: PPC: Book3S HV: Migrate pinned pages out of > CMA > > When PCI Device pass-through is enabled via VFIO, KVM-PPC will > pin pages using get_user_pages_fast(). One of the

Re: [PATCH v2 2/2] kexec: extend kexec_file_load system call

2016-08-30 Thread Thiago Jung Bauermann
Hello Dave, Sorry for the delay, I was trying to get the other patch series ready as I mentioned in the other email. Am Donnerstag, 18 August 2016, 16:19:46 schrieb Dave Young: > Since Eric was objecting the extension, I think you should convince him, > but I will review from code point of

Re: [PATCH v2 0/2] extend kexec_file_load system call

2016-08-30 Thread Thiago Jung Bauermann
Hello Mark, Sorry for taking this long to respond. I've been focusing on getting my kexec_file_load and kexec buffer hand-over series in shape. Am Donnerstag, 18 August 2016, 11:21:13 schrieb Mark Rutland: > On Thu, Aug 11, 2016 at 08:03:56PM -0300, Thiago Jung Bauermann wrote: > > Device tree

[PATCH] ps3: Remove deprecated create_singlethread_workqueue

2016-08-30 Thread Bhaktipriya Shridhar
The workqueue "ps3av->wq" queues a single work item >work and hence doesn't require ordering. It is involved in waking up ps3avd to do the video mode setting and hence it's not being used on a memory reclaim path. Hence, it has been converted to use system_wq. System workqueues have been able to

RE: [PATCH 0/2] Support non-ssi cpu-dai for sgtl5000

2016-08-30 Thread Wente Wang
> -Original Message- > From: Fabio Estevam [mailto:feste...@gmail.com] > Subject: Re: [PATCH 0/2] Support non-ssi cpu-dai for sgtl5000 > > On Mon, Aug 29, 2016 at 7:51 AM, Winter Wang wrote: > > These patches support sgtl5000 to be attached to other non-ssi cpu-dais >

Re: Setting some clocks back to DUMMY fixes spdif output on imx6q wandboard rev B1

2016-08-30 Thread Xavi Drudis Ferran
El Mon, Aug 29, 2016 at 09:54:28PM +0200, Xavi Drudis Ferran deia: > El Mon, Aug 29, 2016 at 12:28:21PM -0700, Nicolin Chen deia: > > Would you > > please do a little debug using "#define DEBUG 1" and check printk > > from fsl_spdif_probe_txclk() to see the difference between before > > and after

[PATHC v2 9/9] ima: platform-independent hash value

2016-08-30 Thread Mimi Zohar
From: Andreas Steffen For remote attestion it is important for the ima measurement values to be platform-independent. Therefore integer fields to be hashed must be converted to canonical format. Changelog: - Define canonical format as little endian (Mimi)

[PATHC v2 8/9] ima: define a canonical binary_runtime_measurements list format

2016-08-30 Thread Mimi Zohar
The IMA binary_runtime_measurements list is currently in platform native format. To allow restoring a measurement list carried across kexec with a different endianness than the targeted kernel, this patch defines little-endian as the canonical format. For big endian systems wanting to

[PATHC v2 7/9] ima: support restoring multiple template formats

2016-08-30 Thread Mimi Zohar
The configured IMA measurement list template format can be replaced at runtime on the boot command line, including a custom template format. This patch adds support for restoring a measuremement list containing multiple builtin/custom template formats. Signed-off-by: Mimi Zohar

[PATHC v2 6/9] ima: store the builtin/custom template definitions in a list

2016-08-30 Thread Mimi Zohar
The builtin and single custom templates are currently stored in an array. In preparation for being able to restore a measurement list containing multiple builtin/custom templates, this patch stores the builtin and custom templates as a linked list. This will permit defining more than one custom

[PATHC v2 5/9] ima: on soft reboot, save the measurement list

2016-08-30 Thread Mimi Zohar
From: Thiago Jung Bauermann This patch uses the kexec buffer passing mechanism to pass the serialized IMA binary_runtime_measurements to the next kernel. Changelog v2: - Fix build issue by defining a stub ima_add_kexec_buffer and stub struct kimage when

[PATHC v2 4/9] ima: serialize the binary_runtime_measurements

2016-08-30 Thread Mimi Zohar
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and restored on boot. This patch serializes the IMA measurement list in the binary_runtime_measurements format.

[PATHC v2 3/9] ima: maintain memory size needed for serializing the measurement list

2016-08-30 Thread Mimi Zohar
In preparation for serializing the binary_runtime_measurements, this patch maintains the amount of memory required. Signed-off-by: Mimi Zohar --- security/integrity/ima/Kconfig | 12 ++ security/integrity/ima/ima.h | 1 +

[PATHC v2 2/9] ima: permit duplicate measurement list entries

2016-08-30 Thread Mimi Zohar
Measurements carried across kexec need to be added to the IMA measurement list, but should not prevent measurements of the newly booted kernel from being added to the measurement list. This patch adds support for allowing duplicate measurements. The "boot_aggregate" measurement entry is the

[PATHC v2 1/9] ima: on soft reboot, restore the measurement list

2016-08-30 Thread Mimi Zohar
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and restored on boot. This patch restores the measurement list. Changelog v2: - redefined ima_kexec_hdr to use types

[PATHC v2 0/9] ima: carry the measurement list across kexec

2016-08-30 Thread Mimi Zohar
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and then restored on the subsequent boot, possibly of a different architecture. The existing securityfs

[PATCH 2/2] arm64: don't select PERF_USE_VMALLOC by default

2016-08-30 Thread Kim Phillips
Any arm64 based parts that have cache aliasing issues can set it manually. Apparently dragged in from ARM(32) defaults in commit 8c2c3df "arm64: Build infrastructure". Signed-off-by: Kim Phillips Cc: Catalin Marinas --- arch/arm64/Kconfig | 1 -

[PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC

2016-08-30 Thread Kim Phillips
This 'DEBUG'-prefixed version of PERF_USE_VMALLOC is not used anywhere. It appears to be leftovers from commit 906010b "perf_event: Provide vmalloc() based mmap() backing" that introduced it. Not sure what commit cb30711 "perf_event: Don't allow vmalloc() backed perf on powerpc" was trying to do

[PATCH v7 06/13] powerpc: Generalize elf64_apply_relocate_add.

2016-08-30 Thread Thiago Jung Bauermann
When apply_relocate_add is called, modules are already loaded at their final location in memory so Elf64_Shdr.sh_addr can be used for accessing the section contents as well as the base address for relocations. This is not the case for kexec's purgatory, because it will only be copied to its final

[PATCH v7 07/13] powerpc: Adapt elf64_apply_relocate_add for kexec_file_load.

2016-08-30 Thread Thiago Jung Bauermann
Extend elf64_apply_relocate_add to support relative symbols. This is necessary because there is a difference between how the module loading mechanism and the kexec purgatory loading code use Elf64_Sym.st_value at relocation time: the former changes st_value to point to the absolute memory address

[PATCH v4 5/5] IMA: Demonstration code for kexec buffer passing.

2016-08-30 Thread Thiago Jung Bauermann
This shows how kernel code can use the kexec buffer passing mechanism to pass information to the next kernel. This patch is not intended to be committed. [a...@linux-foundation.org: coding-style fixes] Signed-off-by: Thiago Jung Bauermann Signed-off-by: Andrew

[PATCH v4 4/5] kexec_file: Add mechanism to update kexec segments.

2016-08-30 Thread Thiago Jung Bauermann
kexec_update_segment allows a given segment in kexec_image to have its contents updated. This is useful if the current kernel wants to send information to the next kernel that is up-to-date at the time of reboot. Signed-off-by: Thiago Jung Bauermann ---

[PATCH v4 3/5] kexec_file: Allow skipping checksum calculation for some segments.

2016-08-30 Thread Thiago Jung Bauermann
Add skip_checksum member to struct kexec_buf to specify whether the corresponding segment should be part of the checksum calculation. The next patch will add a way to update segments after a kimage is loaded. Segments that will be updated in this way should not be checksummed, otherwise they will

[PATCH v4 2/5] powerpc: kexec_file: Add buffer hand-over support for the next kernel

2016-08-30 Thread Thiago Jung Bauermann
The buffer hand-over mechanism allows the currently running kernel to pass data to kernel that will be kexec'd via a kexec segment. The second kernel can check whether the previous kernel sent data and retrieve it. This is the architecture-specific part. Signed-off-by: Thiago Jung Bauermann

[PATCH v4 0/5] kexec_file: Add buffer hand-over for the next kernel

2016-08-30 Thread Thiago Jung Bauermann
Hello, The purpose of this new version of the series is to fix a small issue that I found, which is that the kernel doesn't remove the memory reservation for the hand-over buffer it received from the previous kernel in the device tree it sets up for the next kernel. The result is that for each

[PATCH v4 1/5] kexec_file: Add buffer hand-over support for the next kernel

2016-08-30 Thread Thiago Jung Bauermann
The buffer hand-over mechanism allows the currently running kernel to pass data to kernel that will be kexec'd via a kexec segment. The second kernel can check whether the previous kernel sent data and retrieve it. This is the architecture-independent part of the feature. Signed-off-by: Thiago

[PATCH v7 12/13] powerpc: Add purgatory for kexec_file_load implementation.

2016-08-30 Thread Thiago Jung Bauermann
This purgatory implementation comes from kexec-tools, almost unchanged. The only changes were that the sha256_regions global variable was renamed to sha_regions to match what kexec_file_load expects, and to use the sha256.c file from x86's purgatory to avoid adding yet another SHA-256

[PATCH v7 13/13] powerpc: Enable CONFIG_KEXEC_FILE in powerpc server defconfigs.

2016-08-30 Thread Thiago Jung Bauermann
Enable CONFIG_KEXEC_FILE in powernv_defconfig, ppc64_defconfig and pseries_defconfig. It depends on CONFIG_CRYPTO_SHA256=y, so add that as well. Signed-off-by: Thiago Jung Bauermann --- arch/powerpc/configs/powernv_defconfig | 2 ++

[PATCH v7 11/13] powerpc: Add support for loading ELF kernels with kexec_file_load.

2016-08-30 Thread Thiago Jung Bauermann
This uses all the infrastructure built up by the previous patches in the series to load an ELF vmlinux file and an initrd. It uses the flattened device tree at initial_boot_params as a base and adjusts memory reservations and its /chosen node for the next kernel. Signed-off-by: Thiago Jung

[PATCH v7 10/13] powerpc: Add code to work with device trees in kexec_file_load.

2016-08-30 Thread Thiago Jung Bauermann
kexec_file_load needs to set up the device tree that will be used by the next kernel and check whether it provides a console that can be used by the purgatory. [a...@linux-foundation.org: coding-style fixes] Signed-off-by: Thiago Jung Bauermann Signed-off-by: Andrew

[PATCH v7 09/13] powerpc: Implement kexec_file_load.

2016-08-30 Thread Thiago Jung Bauermann
arch_kexec_walk_mem and arch_kexec_apply_relocations_add are used by generic kexec code, while setup_purgatory is powerpc-specific and sets runtime variables needed by the powerpc purgatory implementation. Signed-off-by: Josh Sklar Signed-off-by: Thiago Jung Bauermann

[PATCH v7 08/13] powerpc: Add functions to read ELF files of any endianness.

2016-08-30 Thread Thiago Jung Bauermann
A little endian kernel might need to kexec a big endian kernel (the opposite is less likely but could happen as well), so we can't just cast the buffer with the binary to ELF structs and use them as is done elsewhere. This patch adds functions which do byte-swapping as necessary when populating

[PATCH v7 05/13] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-08-30 Thread Thiago Jung Bauermann
The kexec_file_load system call needs to relocate the purgatory, so factor out the module relocation code so that it can be shared. This patch's purpose is to move the ELF relocation logic from apply_relocate_add to elf_util_64.c with as few changes as possible. The following changes were needed:

[PATCH v7 04/13] powerpc: Change places using CONFIG_KEXEC to use CONFIG_KEXEC_CORE instead.

2016-08-30 Thread Thiago Jung Bauermann
Commit 2965faa5e03d ("kexec: split kexec_load syscall from kexec core code") introduced CONFIG_KEXEC_CORE so that CONFIG_KEXEC means whether the kexec_load system call should be compiled-in and CONFIG_KEXEC_FILE means whether the kexec_file_load system call should be compiled-in. These options can

[PATCH v7 02/13] kexec_file: Change kexec_add_buffer to take kexec_buf as argument.

2016-08-30 Thread Thiago Jung Bauermann
This is done to simplify the kexec_add_buffer argument list. Adapt all callers to set up a kexec_buf to pass to kexec_add_buffer. In addition, change the type of kexec_buf.buffer from char * to void *. There is no particular reason for it to be a char *, and the change allows us to get rid of 3

[PATCH v7 03/13] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-08-30 Thread Thiago Jung Bauermann
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load implementation to find free memory for the purgatory stack. Signed-off-by: Thiago Jung Bauermann Acked-by: Dave Young --- include/linux/kexec.h | 1 + kernel/kexec_file.c | 25

[PATCH v7 00/13] kexec_file_load implementation for PowerPC

2016-08-30 Thread Thiago Jung Bauermann
The purpose of this new version of the series is to allow building with CONFIG_KEXEC=n and CONFIG_KEXEC_FILE=y. This is done by patch 4, which is new in v7. The other patches have very little changes, just to fix checkpatch warnings, as noted in the changelog. Note that at this moment the powerpc

[PATCH v7 01/13] kexec_file: Allow arch-specific memory walking for kexec_add_buffer

2016-08-30 Thread Thiago Jung Bauermann
Allow architectures to specify a different memory walking function for kexec_add_buffer. x86 uses iomem to track reserved memory ranges, but PowerPC uses the memblock subsystem. Signed-off-by: Thiago Jung Bauermann Acked-by: Dave Young Acked-by:

Re: [PATCH 04/13] perf/core: Extend perf_output_sample_regs() to include perf_arch_regs

2016-08-30 Thread Nilay Vaish
On 28 August 2016 at 16:00, Madhavan Srinivasan wrote: > diff --git a/kernel/events/core.c b/kernel/events/core.c > index 274288819829..e16bf4d057d1 100644 > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -5371,16 +5371,24 @@ u64 __attribute__((weak))

Re: [PATCH 00/13] Add support for perf_arch_regs

2016-08-30 Thread Nilay Vaish
On 28 August 2016 at 16:00, Madhavan Srinivasan wrote: > Patchset to extend PERF_SAMPLE_REGS_INTR to include > platform specific PMU registers. > > Patchset applies cleanly on tip:perf/core branch > > It's a perennial request from hardware folks to be able to > see the

Re: [PATCH 07/34] mm, vmscan: make kswapd reclaim in terms of nodes

2016-08-30 Thread Mel Gorman
On Tue, Aug 30, 2016 at 07:55:08PM +0530, Srikar Dronamraju wrote: > > > > > > This patch seems to hurt FA_DUMP functionality. This behaviour is not > > > seen on v4.7 but only after this patch. > > > > > > So when a kernel on a multinode machine with memblock_reserve() such > > > that most of

Re: [PATCH 07/34] mm, vmscan: make kswapd reclaim in terms of nodes

2016-08-30 Thread Srikar Dronamraju
> > > > This patch seems to hurt FA_DUMP functionality. This behaviour is not > > seen on v4.7 but only after this patch. > > > > So when a kernel on a multinode machine with memblock_reserve() such > > that most of the nodes have zero available memory, kswapd seems to be > > consuming 100% of

Re: [PATCH 07/34] mm, vmscan: make kswapd reclaim in terms of nodes

2016-08-30 Thread Mel Gorman
On Mon, Aug 29, 2016 at 03:08:44PM +0530, Srikar Dronamraju wrote: > > Patch "mm: vmscan: Begin reclaiming pages on a per-node basis" started > > thinking of reclaim in terms of nodes but kswapd is still zone-centric. This > > patch gets rid of many of the node-based versus zone-based decisions. >

[PATCH 6/6] powerpc/boot: Add support for XZ compression

2016-08-30 Thread Oliver O'Halloran
This patch adds an option to use XZ compression for the kernel image. Currently this is only enabled for PPC64 targets since the bulk of the 32bit platforms produce uboot images which do not use the wrapper. Signed-off-by: Oliver O'Halloran --- arch/powerpc/boot/Makefile

[PATCH 5/6] powerpc/boot: add xz support to the wrapper script

2016-08-30 Thread Oliver O'Halloran
This modifies the script so that the -Z option takes an argument to specify the compression type. It can either be 'gz', 'xz' or 'none'. The legazy --no-gzip and -z options are still supported and will set the compression to none and gzip respectively, but they are not documented. Signed-off-by:

[PATCH 4/6] powerpc/boot: remove legacy gzip wrapper

2016-08-30 Thread Oliver O'Halloran
This code is no longer used and can be removed. Signed-off-by: Oliver O'Halloran --- arch/powerpc/boot/gunzip_util.c | 204 arch/powerpc/boot/gunzip_util.h | 45 - 2 files changed, 249 deletions(-) delete mode 100644

[PATCH 3/6] powerpc/boot: use the preboot decompression API

2016-08-30 Thread Oliver O'Halloran
Currently the powerpc boot wrapper has its own wrapper around zlib to handle decompressing gzipped kernels. The kernel decompressor library functions now provide a generic interface that can be used in the pre-boot environment. This allows boot wrappers to easily support different compression

[PATCH 2/6] powerpc/boot: Use CONFIG_KERNEL_GZIP

2016-08-30 Thread Oliver O'Halloran
Most architectures allow the compression algorithm used to produced the vmlinuz image to be selected as a kernel config option. In preperation for supporting algorithms other than gzip in the powerpc boot wrapper the makefile needs to be modified to use these config options. Signed-off-by: Oliver

XZ compressed zImage support

2016-08-30 Thread Oliver O'Halloran
This series adds support for using XZ compression in addition to gzip in the kernel boot wrapper. Currently this is only enabled for 64bit Book3S processors since it seems that some embedded platforms rely on uBoot (or similar) to decompress the image rather than having the kernel decompress

[PATCH 1/6] powerpc/boot: add sed script

2016-08-30 Thread Oliver O'Halloran
The powerpc boot wrapper is compiled with a separate "bootcc" toolchain rather than the toolchain used for the rest of the kernel. The main problem with this is that the wrapper does not have access to the kernel headers (without a lot of gross hacks). To get around this the required headers are

Re: hwrng: pasemi_rng.c: Migrate to managed API

2016-08-30 Thread PrasannaKumar Muralidharan
Hi Darren, >> I wanted to use devm_ioremap_resource but could not find DT entry >> required for this driver in any of the .dts files. So did not change >> that. I could not find any dts/dtsi for this platform. So I assume >> that the dtb is not present in the kernel, dtb is supplied by the >>