Re: [PATCH v5 04/13] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-08-15 Thread Balbir Singh
On 16/08/16 09:25, Thiago Jung Bauermann wrote: > Am Montag, 15 August 2016, 17:46:34 schrieb Balbir Singh: >> On Thu, Aug 11, 2016 at 08:08:09PM -0300, Thiago Jung Bauermann wrote: >>> +/** >>> + * elf64_apply_relocate_add - apply 64 bit RELA relocations >>> + * @elf_info: Support i

[PATCH v2] soc: fsl/qe: fix Oops on CPM1 (and likely CPM2)

2016-08-15 Thread Christophe Leroy
Commit 0e6e01ff694ee ("CPM/QE: use genalloc to manage CPM/QE muram") has changed the way muram is managed. genalloc uses kmalloc(), hence requires the SLAB to be up and running. On powerpc 8xx, cpm_reset() is called early during startup. cpm_reset() then calls cpm_muram_init() before SLAB is avail

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

2016-08-15 Thread Balbir Singh
On 16/08/16 00:49, Thiago Jung Bauermann wrote: > Am Montag, 15 August 2016, 17:30:49 schrieb Balbir Singh: >> On Thu, Aug 11, 2016 at 08:08:07PM -0300, Thiago Jung Bauermann wrote: >>> Adapt all callers to the new function prototype. >> >> Could you please expand on this? > > Is the following b

Re: [PATCH] perf/core: Fix the mask in perf_output_sample_regs

2016-08-15 Thread Madhavan Srinivasan
On Thursday 11 August 2016 05:57 PM, Peter Zijlstra wrote: Sorry, found it in my inbox while clearing out backlog.. On Sun, Jul 03, 2016 at 11:31:58PM +0530, Madhavan Srinivasan wrote: When decoding the perf_regs mask in perf_output_sample_regs(), we loop through the mask using find_first_bit

Re: [PATCH] powerpc/powernv: Initialise nest mmu

2016-08-15 Thread Balbir Singh
On 16/08/16 10:37, Alistair Popple wrote: > Balbir, > > > >>> + /* Update partition table control register on all Nest MMUs */ >>> + opal_nmmu_set_ptcr(-1UL, __pa(partition_tb) | (PATB_SIZE_SHIFT - 12)); >>> + >> >> Just wondering if >> >> 1. Instead of using -1 for all cpus, we should do

Re: [PATCH] powerpc/powernv: Initialise nest mmu

2016-08-15 Thread Alistair Popple
Balbir, > > + /* Update partition table control register on all Nest MMUs */ > > + opal_nmmu_set_ptcr(-1UL, __pa(partition_tb) | (PATB_SIZE_SHIFT - 12)); > > + > > Just wondering if > > 1. Instead of using -1 for all cpus, we should do > for_each_online_cpu() { > opal_

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

2016-08-15 Thread Thiago Jung Bauermann
Here is a new version implementing your suggestions. I also changed it to kmalloc fdset instead of using the stack. What do you think? From: AKASHI Takahiro Device tree blob must be passed to a second kernel on DTB-capable archs, like powerpc and arm64, but the current kernel interface lacks th

[ANN] oldworld-deb: Debian Installer boot floppy for OldWorld PowerMacs

2016-08-15 Thread Ondrej Zary
Hello, I've just released oldworld-deb - a boot floppy that can boot Debian Installer from the CD on OldWorld PowerMacs, such as Power Macintosh 8200. It's based on miBoot, Linux kernel, kexec-tools, uClibc and a simple init program written in C. You can get the source and also a pre-built imag

Re: [PATCH v5 04/13] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-08-15 Thread Thiago Jung Bauermann
Am Montag, 15 August 2016, 17:46:34 schrieb Balbir Singh: > On Thu, Aug 11, 2016 at 08:08:09PM -0300, Thiago Jung Bauermann wrote: > > +/** > > + * elf64_apply_relocate_add - apply 64 bit RELA relocations > > + * @elf_info: Support information for the ELF binary being relocated. > > +

Re: [PATCH v2 18/20] powerpc: tm: Always use fp_state and vr_state to store live registers

2016-08-15 Thread Cyril Bur
On Mon, 2016-08-15 at 17:42 +0800, Simon Guo wrote: > Hi Cyril, > On Mon, Aug 15, 2016 at 05:25:53PM +1000, Cyril Bur wrote: > > > > > > > > There are 2 "giveall_all()" in above path: > > > __switch_to() > > > giveup_all()  // first time > > > __switch_to_tm() > > >   

Re: [PATCH v2 4/6] kexec_file: Add mechanism to update kexec segments.

2016-08-15 Thread Andrew Morton
On Sat, 13 Aug 2016 00:18:23 -0300 Thiago Jung Bauermann wrote: > 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. > > ... >

[PATCH] powerpc: mpc8349emitx: Delete unnecessary assignment for the field "owner"

2016-08-15 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 15 Aug 2016 22:36:05 +0200 The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring --- arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 1 - 1 fi

[PATCH] powerpc/512x: Delete unnecessary assignment for the field "owner"

2016-08-15 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 15 Aug 2016 22:07:54 +0200 The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring --- arch/powerpc/platforms/512x/mpc512x_lpbfifo.c | 1 - 1 fil

Re: debug problems on ppc 83xx target due to changed struct task_struct

2016-08-15 Thread Dave Hansen
On 08/15/2016 07:35 AM, Holger Brunck wrote: > I tried this but unfortunately the error only occurs while remote debugging. > Locally with gdb everything works fine. BTW we double-checked with a 85xx ppc > target which is also 32-bit and it ends up with the same behaviour. > > I was also investiga

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-15 Thread Alex Williamson
On Mon, 15 Aug 2016 13:59:47 +1000 Paul Mackerras wrote: > On Tue, Aug 09, 2016 at 06:16:30AM -0600, Alex Williamson wrote: > > On Tue, 9 Aug 2016 15:19:39 +1000 > > Alexey Kardashevskiy wrote: > > > > > On 09/08/16 02:43, Alex Williamson wrote: > > > > > > > > I think you need to take a c

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

2016-08-15 Thread Thiago Jung Bauermann
Am Montag, 15 August 2016, 17:30:49 schrieb Balbir Singh: > On Thu, Aug 11, 2016 at 08:08:07PM -0300, Thiago Jung Bauermann wrote: > > Adapt all callers to the new function prototype. > > Could you please expand on this? Is the following better? Adapt all callers to set up a kexec_buf to pass to

Re: debug problems on ppc 83xx target due to changed struct task_struct

2016-08-15 Thread Holger Brunck
On 12/08/16 18:09, Dave Hansen wrote: > On 08/12/2016 08:47 AM, Holger Brunck wrote: >> On 12/08/16 17:14, Dave Hansen wrote: >>> On 08/12/2016 07:50 AM, Holger Brunck wrote: When I try to debug our multithreaded userspace application with gdb I get stuck when trying to single step code.

Re: [PATCH kernel 05/15] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-08-15 Thread David Gibson
On Fri, Aug 12, 2016 at 02:56:59PM +1000, Alexey Kardashevskiy wrote: > On 12/08/16 12:57, David Gibson wrote: > > On Wed, Aug 03, 2016 at 06:40:46PM +1000, Alexey Kardashevskiy wrote: > >> In some situations the userspace memory context may live longer than > >> the userspace process itself so if

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-15 Thread David Gibson
On Fri, Aug 12, 2016 at 04:12:17PM +1000, Alexey Kardashevskiy wrote: > On 12/08/16 15:46, David Gibson wrote: > > On Wed, Aug 10, 2016 at 10:46:30AM -0600, Alex Williamson wrote: > >> On Wed, 10 Aug 2016 15:37:17 +1000 > >> Alexey Kardashevskiy wrote: > >> > >>> On 09/08/16 22:16, Alex Williamson

Re: [PATCH 0/6] powerpc/8xx: implementation of huge pages

2016-08-15 Thread Aneesh Kumar K.V
christophe leroy writes: > Le 14/08/2016 à 16:27, Aneesh Kumar K.V a écrit : >> Christophe Leroy writes: >> >>> This set provides implementation of huge pages on the 8xx >>> >>> Christophe Leroy (6): >>> powerpc: port 64 bits pgtable_cache to 32 bits >>> powerpc: fix usage of _PAGE_RO in hug

Re: [PATCH 6/6] powerpc/8xx: implementation of huge pages

2016-08-15 Thread Aneesh Kumar K.V
christophe leroy writes: > Le 14/08/2016 à 16:25, Aneesh Kumar K.V a écrit : >> Christophe Leroy writes: >> >>> The 8xx has 512k and 8M pages. This patch implements hugepages using >>> those sizes. >>> >>> On the 8xx, the size of pages is in the PGD entry, >>> using PS field (bits 28-29): >>> 00

Re: [PATCH 1/6] powerpc: port 64 bits pgtable_cache to 32 bits

2016-08-15 Thread Aneesh Kumar K.V
christophe leroy writes: > Le 14/08/2016 à 16:17, Aneesh Kumar K.V a écrit : >> Christophe Leroy writes: >> >>> Today powerpc64 uses a set of pgtable_caches while powerpc32 uses >>> standard pages when using 4k pages and a single pgtable_cache >>> if using other size pages. In addition powerpc32

Re: [PATCH v2 18/20] powerpc: tm: Always use fp_state and vr_state to store live registers

2016-08-15 Thread Simon Guo
Hi Cyril, On Mon, Aug 15, 2016 at 05:25:53PM +1000, Cyril Bur wrote: > > There are 2 "giveall_all()" in above path: > > __switch_to() > > giveup_all()  // first time > > __switch_to_tm() > > tm_reclaim_task() > > tm_reclaim_thread() > >   

Re: [PATCH kernel 01/15] Revert "iommu: Add a function to find an iommu group by id"

2016-08-15 Thread Paul Mackerras
On Wed, Aug 03, 2016 at 06:40:42PM +1000, Alexey Kardashevskiy wrote: > This reverts commit aa16bea929ae > ("iommu: Add a function to find an iommu group by id") > as the iommu_group_get_by_id() helper has never been used > and it is unlikely it will in foreseeable future. Dead code > is broken cod

Re: [PATCH v5 04/13] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-08-15 Thread Balbir Singh
On Thu, Aug 11, 2016 at 08:08:09PM -0300, Thiago Jung Bauermann wrote: > 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 e

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

2016-08-15 Thread Balbir Singh
On Thu, Aug 11, 2016 at 08:08:07PM -0300, Thiago Jung Bauermann wrote: > Adapt all callers to the new function prototype. > Could you please expand on this? > 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 ch

Re: [PATCH v2 18/20] powerpc: tm: Always use fp_state and vr_state to store live registers

2016-08-15 Thread Cyril Bur
On Sun, 2016-08-14 at 09:56 +0800, Simon Guo wrote: > On Fri, Aug 12, 2016 at 09:28:17AM +1000, Cyril Bur wrote: > > > > @@ -846,7 +834,9 @@ static void tm_reclaim_thread(struct > > thread_struct *thr, > >   if (!MSR_TM_SUSPENDED(mfmsr())) > >   return; > >   > > - tm_reclaim(thr, th

Re: [PATCH] powerpc/powernv: Initialise nest mmu

2016-08-15 Thread Balbir Singh
On Mon, Aug 15, 2016 at 04:51:59PM +1000, Alistair Popple wrote: > POWER9 contains an off core mmu called the nest mmu (NMMU). This is > used by other hardware units on the chip to translate virtual > addresses into real addresses. The unit attempting an address > translation provides the majority