Re: [v3] powerpc/fsl-booke: Add T1040D4RDB/T1042D4RDB board support

2015-08-07 Thread Scott Wood
On Thu, Jul 30, 2015 at 10:33:55AM +0530, Priyanka Jain wrote: > T1040D4RDB/T1042D4RDB are Freescale Reference Design Board > which can support T1040/T1042 QorIQ Power > Architectureâ„¢ processor respectively What is the actual name of this board? http://patchwork.ozlabs.org/patch/504944/ changes t

Re: powerpc/fsl_book3e: fix the relocatable bug in debug interrupt handler

2015-08-07 Thread Scott Wood
[Please wrap commit messages at around 74 columns] On Fri, Aug 07, 2015 at 02:58:10PM +0800, Yuanjie Huang wrote: > PowerPC Book3E processor features hardware-supported single instruction > execution, and it is used for ptrace(PTRACE_SINGLESTEP, ...). When a > debugger loads a debuggee, it typica

[PATCH 15/16] Add TPM firmware API call get-state

2015-08-07 Thread Stefan Berger
This patch adds support for the TPM firmware API call get-state. Signed-off-by: Stefan Berger --- board-qemu/slof/vio-vtpm-cdriver.fs | 8 board-qemu/slof/vtpm-sml.fs | 7 +++ lib/libtpm/tcgbios.c| 12 lib/libtpm/tcgbios.h| 1 +

[PATCH 16/16] Add TPM firmware API call get-failure-reason

2015-08-07 Thread Stefan Berger
This patch adds support for the TPM firmware API call get-failure-reason. Signed-off-by: Stefan Berger --- board-qemu/slof/vio-vtpm-cdriver.fs | 8 board-qemu/slof/vtpm-sml.fs | 7 +++ lib/libtpm/tcgbios.c| 16 lib/libtpm/tcgbios.h

[PATCH 10/16] Implement measurements of the master boot record

2015-08-07 Thread Stefan Berger
This patch adds support for measuring the boot block of the MBR and logging the measurement. Signed-off-by: Stefan Berger --- board-js2x/slof/OF.fs | 2 ++ slof/fs/packages/disk-label.fs | 6 +- slof/fs/tpm/tpm-static.fs | 13 + 3 files changed, 20 insertions(+),

[PATCH 14/16] Add TPM firmware API call pass-through-to-tpm

2015-08-07 Thread Stefan Berger
This patch adds support for the firmware API call pass-through-to-tpm. Signed-off-by: Stefan Berger --- board-qemu/slof/vio-vtpm-cdriver.fs | 8 board-qemu/slof/vtpm-sml.fs | 7 +++ lib/libtpm/tcgbios.c| 28 lib/libtpm/tcgbios.h

[PATCH 08/16] Add support for controlling the states of the TPM

2015-08-07 Thread Stefan Berger
This patch adds support for controlling the various states of the TPM, such as enabling and disabling the TPM, deactivating and activating it, and clearing ownership. The TPM menu implementation will call these functions by calling tpm_process_opcode with an opcode indicating as to how the state o

[PATCH 04/16] Add initial support for logging

2015-08-07 Thread Stefan Berger
This patch adds initial support for the logging that will be done following measurements done by further code added to SLOF. Signed-off-by: Stefan Berger Reviewed-by: Nikunj A Dadhania --- board-qemu/slof/vtpm-sml.fs | 3 +++ lib/libtpm/tcgbios.c| 30 ++ lib

[PATCH 09/16] Add support for a TPM menu to control the state of the TPM

2015-08-07 Thread Stefan Berger
This patch provides an addtional menu that enables the user to control certain aspects of the TPM's state. If a working TPM has been detected, the menu will look like this: The TPM is enabled, active, does not have an owner but one can be installed. To configure the TPM, choose one of the follow

[PATCH 06/16] Return value of actual log in sml-get-handover-size

2015-08-07 Thread Stefan Berger
With the functions for calculating the actual size of the log in place, use them to determine the exact size of the log that the firmware API call sml-get-handover-size now returns. Signed-off-by: Stefan Berger --- board-qemu/slof/vtpm-sml.fs | 4 ++-- lib/libtpm/tcgbios.c| 15 +

[PATCH 12/16] Add TPM firmware API calls hash-all, log-event, hash-log-extend-event

2015-08-07 Thread Stefan Berger
Add the TPM firmware API calls hash-all, log-event, and hash-log-extend-event. These firmware calls are implemented in /vdevice/vtpm and /ibm,vtpm but the former merely forwards the calls to the latter. The implementation follows the Virtual TPM firmware documentation. These particular 3 API calls

[PATCH 11/16] Measure the static core root of trust for measurements

2015-08-07 Thread Stefan Berger
This patch adds support for measuring the static core root of trust (S-CRTM) and logging the measurements. Signed-off-by: Stefan Berger --- board-qemu/slof/vio-vtpm-cdriver.fs | 2 ++ lib/libtpm/tcgbios.c| 37 + lib/libtpm/tcgbios.h

[PATCH 07/16] Perform some initial measurements

2015-08-07 Thread Stefan Berger
This patch puts an 'event' separator into the log that can then be seen in Linux's /sys/kernel/security/tpm0/ascii_bios_measurements. More low-level C functions are added for measuring and logging of disk related data, along with their FORTH-level counterparts. These functions will be called in sub

[PATCH 01/16] Add a TPM driver implementation

2015-08-07 Thread Stefan Berger
This patch adds a TPM driver for the CRQ interface as used by the QEMU PAPR implementation. Signed-off-by: Stefan Berger --- include/helpers.h| 1 + lib/libtpm/Makefile | 51 ++ lib/libtpm/tpm_drivers.c | 456 +++ lib/libtpm/tpm_dri

[PATCH 03/16] Add sha1 implementation

2015-08-07 Thread Stefan Berger
The following patch adds a SHA1 implementation based on the algorithm description in NIST FIPS PUB 180-4. Signed-off-by: Stefan Berger --- lib/libtpm/Makefile | 2 +- lib/libtpm/sha1.c | 197 lib/libtpm/sha1.h | 20 ++ 3 files chang

[PATCH 05/16] Extend internal firmware API

2015-08-07 Thread Stefan Berger
Extend the internal API of the TPM firmware support with additional functions for hashing data, extending the TPM's platform configuration registers with a hash, and appending to the log that is recording what was hashed. Signed-off-by: Stefan Berger --- lib/libtpm/tcgbios.c | 276 ++

[PATCH 13/16] Add TPM firmware API call get-maximum-cmd-size

2015-08-07 Thread Stefan Berger
This patch adds support for the firmware API call get-maximum-cmd-size. Signed-off-by: Stefan Berger --- board-qemu/slof/vio-vtpm-cdriver.fs | 7 ++ board-qemu/slof/vtpm-sml.fs | 6 + lib/libtpm/tcgbios.c| 44 + lib/libtpm/tcg

[PATCH 02/16] Add TPM initialization support

2015-08-07 Thread Stefan Berger
This patch implements the main part of the fimrmware extensions. It provides the following functionality: - initialization of the TPM by sending a sequence of commands to it - proper setup of the TPM before the firmware hands over control to the bootloader Structures that are needed in subsequen

[PATCH 00/16] Add vTPM support to SLOF

2015-08-07 Thread Stefan Berger
The following series of patches adds TPM support to SLOF. In particular it adds the following: - TPM drivers for hardware interface and CRQ interface - TPM initialization - TPM logging area and firmware API to transfer it to the OS (measurements are visible in sysfs) - Some measurement code (Sta

Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations

2015-08-07 Thread Scott Wood
On Fri, 2015-08-07 at 11:19 +0800, Chenhui Zhao wrote: > On Fri, Aug 7, 2015 at 2:02 AM, Scott Wood > wrote: > > On Thu, 2015-08-06 at 13:54 +0800, Chenhui Zhao wrote: > > > On Thu, Aug 6, 2015 at 1:46 PM, Scott Wood > > > wrote: > > > > On Thu, 2015-08-06 at 12:20 +0800, Chenhui Zhao wrote:

Re: [v2 8/9] dpaa_eth: add debugfs entries

2015-08-07 Thread David Miller
From: Madalin Bucur Date: Wed, 5 Aug 2015 18:41:28 +0300 > Export per CPU counters through debugfs. > > Signed-off-by: Madalin Bucur This is absolutely inappropriate. You can export these just fine via ethtool statistics. There is zero reason to add ugly debugfs crap for something like this.

Re: [PATCH 0/8] misc: remove boundary checks from bin attr users

2015-08-07 Thread Wolfram Sang
> if we're talking about this particular series, you should have them in > your mailbox, since you have them applied in wsa/i2c/for-next: Those are already in linus tree. I mean all drivers which use struct i2c_driver. Or do you prefer they go via Greg? I am fine with both. signature.asc Descr

Re: [v4, 0/9] Freescale DPAA FMan

2015-08-07 Thread David Miller
From: Date: Wed, 5 Aug 2015 12:25:16 +0300 > The Freescale Data Path Acceleration Architecture (DPAA) > is a set of hardware components on specific QorIQ multicore processors. > This architecture provides the infrastructure to support simplified > sharing of networking interfaces and accelerators

Re: [PATCH 06/31] arch/powerpc/pseries: use kmemdup rather than duplicating its implementation

2015-08-07 Thread Nathan Fontenot
On 08/07/2015 02:59 AM, Andrzej Hajda wrote: > The patch was generated using fixed coccinelle semantic patch > scripts/coccinelle/api/memdup.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 > > Signed-off-by: Andrzej Hajda Reviewed-by: Nathan Fontenot

Re: [PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation

2015-08-07 Thread Nathan Fontenot
On 08/07/2015 02:59 AM, Andrzej Hajda wrote: > The patch was generated using fixed coccinelle semantic patch > scripts/coccinelle/api/memdup.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 > > Signed-off-by: Andrzej Hajda Reviewed-by: Nathan Fontenot

[PATCH v3 11/20] tty/hvc: xen: Use xen page definition

2015-08-07 Thread Julien Grall
The console ring is always based on the page granularity of Xen. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: David Vrabel Cc: Boris Ostrovsky Cc: linuxppc-dev@lists.ozlabs.org Changes in v3: - Some changes has been m

[PATCH v3 4/9] xen: Use correctly the Xen memory terminologies

2015-08-07 Thread Julien Grall
Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN is meant, I suspect this is because the first support for Xen was for PV. This resulted in some misimplementation of helpers on ARM and confused developers about the expected behavior. For instance, with pfn_to_mfn, we expect to

[PATCH v3 0/9] Use correctly the Xen memory terminologies

2015-08-07 Thread Julien Grall
Hi all, This patch series aims to use the memory terminologies described in include/xen/mm.h [1] for Linux xen code. The differences from v2 is minor but I resent it because my 64K series depends on this series. Linux is using mistakenly MFN when GFN is meant, I suspect this is because the first

[PATCH v3 7/9] hvc/xen: Further s/MFN/GFN clean-up

2015-08-07 Thread Julien Grall
HVM_PARAM_CONSOLE_PFN is used to retrieved the console PFN for HVM guest. It returns a PFN (aka GFN) and not a MFN. Furthermore, use directly virt_to_gfn for both PV and HVM domain rather than doing a special case for each of the them. Signed-off-by: Julien Grall Reviewed-by: David Vrabel ---

Re: [PATCH 0/8] misc: remove boundary checks from bin attr users

2015-08-07 Thread Wolfram Sang
Vladimir, On Mon, Jul 27, 2015 at 12:18:22AM +0300, Vladimir Zapolskiy wrote: > This change removes a number of redundant checks on bin attribute > client's side, the same checks are done by sysfs_kf_bin_read() or > sysfs_kf_bin_write() caller from fs/sysfs/file.c. > > Note, drivers/misc/pch_phub

Re: [PATCH 0/8] misc: remove boundary checks from bin attr users

2015-08-07 Thread Vladimir Zapolskiy
Hi Wolfram, On 07.08.2015 19:10, Wolfram Sang wrote: > Vladimir, > > On Mon, Jul 27, 2015 at 12:18:22AM +0300, Vladimir Zapolskiy wrote: >> This change removes a number of redundant checks on bin attribute >> client's side, the same checks are done by sysfs_kf_bin_read() or >> sysfs_kf_bin_write(

[PATCH] kvm:powerpc:Fix incorrect return statement in the function mpic_set_default_irq_routing

2015-08-07 Thread Nicholas Krause
This fixes the incorrect return statement in the function mpic_set_default_irq_routing from always returning zero to signal success to this function's caller to instead return the return value of kvm_set_irq_routing as this function can fail and we need to correctly signal the caller of mpic_set_de

Re: [PATCH] kvm:powerpc:Fix error handling in the function mpic_set_default_irq_routing

2015-08-07 Thread nick
On 2015-08-07 09:59 AM, Paolo Bonzini wrote: > > > On 07/08/2015 15:47, Nicholas Krause wrote: >> -kvm_set_irq_routing(opp->kvm, routing, 0, 0); >> +ret = kvm_set_irq_routing(opp->kvm, routing, 0, 0); >> +if (ret) { >> +kfree(routing); >> +return ret; >> +

Re: [PATCH] kvm:powerpc:Fix error handling in the function mpic_set_default_irq_routing

2015-08-07 Thread Paolo Bonzini
On 07/08/2015 15:47, Nicholas Krause wrote: > - kvm_set_irq_routing(opp->kvm, routing, 0, 0); > + ret = kvm_set_irq_routing(opp->kvm, routing, 0, 0); > + if (ret) { > + kfree(routing); > + return ret; > + } > > kfree(routing); > return 0; You

[PATCH] kvm:powerpc:Fix error handling in the function mpic_set_default_irq_routing

2015-08-07 Thread Nicholas Krause
This fixes error handling in the function mpic_set_default_irq_routing by checking if the call to the function kvm_set_irq_routing has failed and if so exit immediately to the caller by first freeing the structure pointer routing in order to avoid a memory leak before returning the error code retur

Re: 4.1-rc6: ATA link is slow to respond, please be patient

2015-08-07 Thread Denis Kirjanov
On 8/7/15, Christian Kujau wrote: > Hi, > > this PowerBook G4 was running 3.16 for a while but now I wanted to upgrade > to latest mainline. However, during bootup the following happens: > > === > [2.237102] ata1: PATA max UDMA/100 irq 39 > [2.401708] ata1.00: A

Re: [PATCH V6 4/6] mm: mlock: Add mlock flags to enable VM_LOCKONFAULT usage

2015-08-07 Thread Vlastimil Babka
On 07/29/2015 05:42 PM, Eric B Munson wrote: The previous patch introduced a flag that specified pages in a VMA should be placed on the unevictable LRU, but they should not be made present when the area is created. This patch adds the ability to set this state via the new mlock system calls. We

4.1-rc6: ATA link is slow to respond, please be patient

2015-08-07 Thread Christian Kujau
Hi, this PowerBook G4 was running 3.16 for a while but now I wanted to upgrade to latest mainline. However, during bootup the following happens: === [2.237102] ata1: PATA max UDMA/100 irq 39 [2.401708] ata1.00: ATA-8: SAMSUNG HM061GC, LR100-10, max UDMA/100 [

Re: [PATCH] kvm:powerpc:Fix error handling in the function mpic_set_default_irq_routing

2015-08-07 Thread Paolo Bonzini
On 06/08/2015 19:13, Nicholas Krause wrote: > diff --git a/arch/powerpc/kvm/mpic.c b/arch/powerpc/kvm/mpic.c > index 6249cdc..5a18859 100644 > --- a/arch/powerpc/kvm/mpic.c > +++ b/arch/powerpc/kvm/mpic.c > @@ -1641,13 +1641,16 @@ static void mpic_destroy(struct kvm_device *dev) > static int mpi

Re: [PATCH V2 6/6] powerpc/powernv: allocate discrete PE# when using M64 BAR in Single PE mode

2015-08-07 Thread Alexey Kardashevskiy
On 08/07/2015 03:54 PM, Gavin Shan wrote: On Fri, Aug 07, 2015 at 01:44:33PM +0800, Wei Yang wrote: On Fri, Aug 07, 2015 at 01:43:01PM +1000, Gavin Shan wrote: On Fri, Aug 07, 2015 at 10:33:33AM +0800, Wei Yang wrote: On Fri, Aug 07, 2015 at 11:36:56AM +1000, Gavin Shan wrote: On Thu, Aug 06,

Re: [PATCH V2 4/6] powerpc/powernv: replace the hard coded boundary with gate

2015-08-07 Thread Alexey Kardashevskiy
On 08/06/2015 03:26 PM, Gavin Shan wrote: On Wed, Aug 05, 2015 at 09:25:01AM +0800, Wei Yang wrote: Based on the limitation of M64 Window size, when VF BAR size is bigger than 64MB, IOV BAR just round up power of 2 of the total_vfs. While the 64MB is a magic boundary in code, which is hard to ma

Re: [PATCH V2 3/6] powerpc/powernv: use one M64 BAR in Single PE mode for one VF BAR

2015-08-07 Thread Alexey Kardashevskiy
On 08/07/2015 12:01 PM, Wei Yang wrote: On Thu, Aug 06, 2015 at 08:04:58PM +1000, Alexey Kardashevskiy wrote: On 08/05/2015 11:25 AM, Wei Yang wrote: In current implementation, when VF BAR is bigger than 64MB, it uses 4 M64 BAR in Single PE mode to cover the number of VFs required to be enabled

RE: [PATCH V2] QorIQ/TMU: add thermal management support based on TMU

2015-08-07 Thread Hongtao Jia
Thanks for your comments. Please see my questions inline. Thanks. --- Best Regards, Hongtao > -Original Message- > From: Eduardo Valentin [mailto:edubez...@gmail.com] > Sent: Thursday, August 06, 2015 3:43 AM > To: Jia Hongtao-B38951 > Cc: linux...@vger.kernel.org; linuxppc-dev@lists.ozl

Re: [PATCH V2 3/6] powerpc/powernv: use one M64 BAR in Single PE mode for one VF BAR

2015-08-07 Thread Alexey Kardashevskiy
On 08/07/2015 11:48 AM, Wei Yang wrote: On Thu, Aug 06, 2015 at 08:07:01PM +1000, Gavin Shan wrote: On Thu, Aug 06, 2015 at 05:36:02PM +0800, Wei Yang wrote: On Thu, Aug 06, 2015 at 03:20:25PM +1000, Gavin Shan wrote: On Wed, Aug 05, 2015 at 09:25:00AM +0800, Wei Yang wrote: In current implem

[PATCH 06/31] arch/powerpc/pseries: use kmemdup rather than duplicating its implementation

2015-08-07 Thread Andrzej Hajda
The patch was generated using fixed coccinelle semantic patch scripts/coccinelle/api/memdup.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 Signed-off-by: Andrzej Hajda --- arch/powerpc/platforms/pseries/hotplug-memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation

2015-08-07 Thread Andrzej Hajda
The patch was generated using fixed coccinelle semantic patch scripts/coccinelle/api/memdup.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 Signed-off-by: Andrzej Hajda --- arch/powerpc/kernel/nvram_64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH] powerpc/fsl_book3e: fix the relocatable bug in debug interrupt handler

2015-08-07 Thread Yuanjie Huang
PowerPC Book3E processor features hardware-supported single instruction execution, and it is used for ptrace(PTRACE_SINGLESTEP, ...). When a debugger loads a debuggee, it typically sets the CPU to yield debug interrupt on first instruction complete or branch taken. However, the newly-forked child p

Re: [PATCH V2 1/6] powerpc/powernv: don't enable SRIOV when VF BAR contains non M64 BAR

2015-08-07 Thread Alexey Kardashevskiy
On 08/07/2015 12:24 PM, Wei Yang wrote: On Fri, Aug 07, 2015 at 11:20:10AM +1000, Gavin Shan wrote: On Thu, Aug 06, 2015 at 10:10:10PM +0800, Wei Yang wrote: On Thu, Aug 06, 2015 at 02:35:57PM +1000, Gavin Shan wrote: On Wed, Aug 05, 2015 at 09:24:58AM +0800, Wei Yang wrote: On PHB_IODA2, we