RE: [PATCH 1/2] ARM: imx: drop uneccessary of_platform_default_populate

2019-03-17 Thread Peng Fan
> -Original Message- > From: Aisheng Dong > Sent: 2019年3月15日 21:39 > To: Peng Fan ; shawn...@kernel.org; > s.ha...@pengutronix.de; ker...@pengutronix.de; feste...@gmail.com; > dl-linux-imx ; Anson Huang ; > a...@arndb.de; linux-arm-ker...@lists.infradea

RE: [PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail

2019-03-15 Thread Peng Fan
> -Original Message- > From: Aisheng Dong > Sent: 2019年3月15日 18:22 > To: Peng Fan ; shawn...@kernel.org; > s.ha...@pengutronix.de; ker...@pengutronix.de; feste...@gmail.com; > dl-linux-imx ; Anson Huang ; > a...@arndb.de; linux-arm-ker...@lists.infradea

RE: [PATCH 1/2] ARM: imx: drop uneccessary of_platform_default_populate

2019-03-15 Thread Peng Fan
Hi Aisheng, > -Original Message- > From: Aisheng Dong > Sent: 2019年3月15日 18:17 > To: Peng Fan ; shawn...@kernel.org; > s.ha...@pengutronix.de; ker...@pengutronix.de; feste...@gmail.com; > dl-linux-imx ; Anson Huang ; > a...@arndb.de; linux-arm-ker...@lists.infradea

[PATCH] arm64: dts: imx8qxp: add lsio_mu2 node

2019-03-13 Thread Peng Fan
Add lsio_mu2 node which could be used communicate with SCU. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index

[PATCH] arm64: dts: imx8qxp: fix mbox-cells

2019-03-13 Thread Peng Fan
Currently lsio_mu1 is used by Linux Kernel with mbox-cells as 2, but actually mu0-4 could be used to communicate with SCU. So fix the mbox-cells. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail

2019-03-13 Thread Peng Fan
Follow other i.MX6/7 machince code to check return value of imx_soc_device_init and warn when fail. Also drop of_platform_default_populate, because "arch_initcall_sync(of_platform_default_populate_init);" could be used to populate the device tree. Signed-off-by: Peng Fan --- arch/ar

[PATCH 1/2] ARM: imx: drop uneccessary of_platform_default_populate

2019-03-13 Thread Peng Fan
"arch_initcall_sync(of_platform_default_populate_init);" could be used to populate the device tree, there is no need to call of_platform_default_populate in machine code. Tested on i.MX6Q-SDB i.MX6SL-EVK i.MX6UL-EVK board. Signed-off-by: Peng Fan --- arch/arm/mach-imx/mach-im

RE: [PATCH 1/2] perpcu: correct pcpu_find_block_fit comments

2019-03-04 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月5日 3:14 > To: Peng Fan > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [PATCH 1/2] perpcu: correc

RE: [PATCH 2/2] percpu: pcpu_next_md_free_region: inclusive check for PCPU_BITMAP_BLOCK_BITS

2019-03-04 Thread Peng Fan
> -Original Message- > From: den...@kernel.org [mailto:den...@kernel.org] > Sent: 2019年3月5日 2:57 > To: Peng Fan > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [PATCH 2/2] percpu: pcp

[PATCH 2/2] percpu: pcpu_next_md_free_region: inclusive check for PCPU_BITMAP_BLOCK_BITS

2019-03-04 Thread Peng Fan
If the block [contig_hint_start, contig_hint_start + contig_hint) matches block->right_free area, need use "<=", not "<". Signed-off-by: Peng Fan --- V1: Based on https://patchwork.kernel.org/cover/10832459/ applied linux-next boot test on qemu aarch64 mm/per

[PATCH 1/2] perpcu: correct pcpu_find_block_fit comments

2019-03-04 Thread Peng Fan
pcpu_find_block_fit is not find block index, it is to find the bitmap off in a chunk. Signed-off-by: Peng Fan --- V1: Based on https://patchwork.kernel.org/cover/10832459/ applied linux-next mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm

RE: [PATCH 07/12] percpu: add block level scan_hint

2019-03-04 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月4日 4:23 > To: Peng Fan > Cc: Tejun Heo ; Christoph Lameter ; Vlad > Buslov ; kernel-t...@fb.com; linux...@kvack.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH 07/12]

RE: [PATCH 11/12] percpu: convert chunk hints to be based on pcpu_block_md

2019-03-03 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月4日 4:22 > To: Peng Fan > Cc: Dennis Zhou ; Tejun Heo ; Christoph > Lameter ; Vlad Buslov ; > kernel-t...@fb.com; linux...@kvack.org; linux-kernel@vger.kernel.org > Subject:

RE: [PATCH 1/2] percpu: km: remove SMP check

2019-03-03 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年2月28日 0:41 > To: Peng Fan > Cc: Dennis Zhou ; Christopher Lameter ; > t...@kernel.org; linux...@kvack.org; linux-kernel@vger.kernel.org; > van.free...@gmail.com > Subject: Re: [PATCH

RE: [PATCH 04/12] percpu: manage chunks based on contig_bits instead of free_bytes

2019-03-03 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月3日 6:32 > To: Peng Fan > Cc: Tejun Heo ; Christoph Lameter ; Vlad > Buslov ; kernel-t...@fb.com; linux...@kvack.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH 04/12] per

RE: [PATCH 02/12] percpu: do not search past bitmap when allocating an area

2019-03-03 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月3日 6:24 > To: Peng Fan > Cc: Tejun Heo ; Christoph Lameter ; Vlad > Buslov ; kernel-t...@fb.com; linux...@kvack.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH 02/12] pe

RE: [PATCH 12/12] percpu: use chunk scan_hint to skip some scanning

2019-03-03 Thread Peng Fan
pcpu_block_off_to_off(s_index, start), @@ > -1078,7 > +1096,7 @@ static int pcpu_find_block_fit(struct pcpu_chunk *chunk, int > alloc_bits, > if (bit_off + alloc_bits > chunk_md->contig_hint) > return -1; > > - bit_off = chunk_md->first_free; > + bit_off = pcpu_next_hint(chunk_md, alloc_bits); > bits = 0; > pcpu_for_each_fit_region(chunk, alloc_bits, align, bit_off, bits) { > if (!pop_only || pcpu_is_populated(chunk, bit_off, bits, Reviewed-by: Peng Fan > -- > 2.17.1

RE: [PATCH 11/12] percpu: convert chunk hints to be based on pcpu_block_md

2019-03-03 Thread Peng Fan
e(chunk, bit_off, bits); > > @@ -1285,6 +1270,9 @@ static void pcpu_init_md_blocks(struct pcpu_chunk > *chunk) { > struct pcpu_block_md *md_block; > > + /* init the chunk's block */ > + pcpu_init_md_block(>chunk_md, > pcpu_chunk_map_bits(chunk)); >

RE: [PATCH 10/12] percpu: make pcpu_block_md generic

2019-03-02 Thread Peng Fan
for (md_block = chunk->md_blocks; >md_block != chunk->md_blocks + pcpu_chunk_nr_blocks(chunk); > - md_block++) { > - md_block->scan_hint = 0; > - md_block->contig_hint = PCPU_BITMAP_BLOCK_BITS; > - md_block->left_free = PCPU_BITMAP_BLOCK_BITS; > - md_block->right_free = PCPU_BITMAP_BLOCK_BITS; > - } > + md_block++) > + pcpu_init_md_block(md_block, PCPU_BITMAP_BLOCK_BITS); > } Reviewed-by: Peng Fan > > /** > -- > 2.17.1

RE: [PATCH 07/12] percpu: add block level scan_hint

2019-03-02 Thread Peng Fan
x - 1); > for (block = s_block + 1; block < e_block; block++) { > + block->scan_hint = 0; > block->contig_hint = 0; > block->left_free = 0; > block->right_free = 0; > @@ -873,6 +958,7 @@ static void pcpu_block_update_hint_free(struct > pcpu_chunk *chunk, int bit_off, > nr_empty_pages += (e_index - s_index - 1); > for (block = s_block + 1; block < e_block; block++) { > block->first_free = 0; > + block->scan_hint = 0; > block->contig_hint_start = 0; > block->contig_hint = PCPU_BITMAP_BLOCK_BITS; > block->left_free = PCPU_BITMAP_BLOCK_BITS; @@ -1084,6 > +1170,7 @@ static void pcpu_init_md_blocks(struct pcpu_chunk *chunk) > for (md_block = chunk->md_blocks; >md_block != chunk->md_blocks + pcpu_chunk_nr_blocks(chunk); >md_block++) { > + md_block->scan_hint = 0; > md_block->contig_hint = PCPU_BITMAP_BLOCK_BITS; > md_block->left_free = PCPU_BITMAP_BLOCK_BITS; > md_block->right_free = PCPU_BITMAP_BLOCK_BITS; Reviewed-by: Peng Fan > -- > 2.17.1

RE: [PATCH 06/12] percpu: set PCPU_BITMAP_BLOCK_SIZE to PAGE_SIZE

2019-03-02 Thread Peng Fan
gt; - chunk->nr_empty_pop_pages -= nr; > - pcpu_nr_empty_pop_pages -= nr; > pcpu_nr_populated -= nr; > + > + pcpu_update_empty_pages(chunk, -1 * nr); > } > > /* > @@ -1523,7 +1502,7 @@ static void __percpu *pcpu_alloc(size_t size, size_t > align, bool reserved, > err = "failed to populate"; > goto fail_unlock; > } > - pcpu_chunk_populated(chunk, rs, re, true); > + pcpu_chunk_populated(chunk, rs, re); > spin_unlock_irqrestore(_lock, flags); > } > > @@ -1722,7 +1701,7 @@ static void pcpu_balance_workfn(struct > work_struct *work) > if (!ret) { > nr_to_pop -= nr; > spin_lock_irq(_lock); > - pcpu_chunk_populated(chunk, rs, rs + nr, false); > + pcpu_chunk_populated(chunk, rs, rs + nr); > spin_unlock_irq(_lock); > } else { > nr_to_pop = 0; > -- Reviewed-by: Peng Fan > 2.17.1

RE: [PATCH 05/12] percpu: relegate chunks unusable when failing small allocations

2019-03-02 Thread Peng Fan
f (off < 0) > + if (off < 0) { > + if (slot < PCPU_SLOT_FAIL_THRESHOLD) > + pcpu_chunk_move(chunk, 0); > continue; > + } > > off = pcpu_alloc_area(chunk, bits, bit_align, off); > if (off >= 0) For the code: Reviewed-by: Peng Fan But I did not understand well why choose 32B? If there are more information, better put in commit log. Thanks, Peng. > -- > 2.17.1

RE: [PATCH 04/12] percpu: manage chunks based on contig_bits instead of free_bytes

2019-03-02 Thread Peng Fan
hunk->contig_bits > == 0) > return 0; > > - return pcpu_size_to_slot(chunk->free_bytes); > + return pcpu_size_to_slot(chunk->contig_bits * PCPU_MIN_ALLOC_SIZE); > } > > /* set the pointer to a chunk in a page struct */ Reviewed-by: Peng Fan Not

RE: [PATCH 03/12] percpu: introduce helper to determine if two regions overlap

2019-03-02 Thread Peng Fan
Hi Dennis, > -Original Message- > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On > Behalf Of Dennis Zhou > Sent: 2019年2月28日 10:19 > To: Dennis Zhou ; Tejun Heo ; Christoph > Lameter > Cc: Vlad Buslov ; kernel-t...@fb.com; > linux...@kvack.org;

RE: [PATCH 02/12] percpu: do not search past bitmap when allocating an area

2019-03-02 Thread Peng Fan
gt; + pcpu_chunk_map_bits(chunk)); > bit_off = bitmap_find_next_zero_area(chunk->alloc_map, end, start, >alloc_bits, align_mask); > if (bit_off >= end) > -- From pcpu_alloc_area itself, I think this is corre

RE: [PATCH 01/12] percpu: update free path with correct new free region

2019-03-02 Thread Peng Fan
chunk *chunk, int bit_off, > pcpu_chunk_refresh_hint(chunk); > else > pcpu_chunk_update(chunk, pcpu_block_off_to_off(s_index, start), > - s_block->contig_hint); > + end - start); > } Reviewed-by: Peng Fan > > /** > -- > 2.17.1

[PATCH V2] mm/cma: cma_declare_contiguous: correct err handling

2019-02-27 Thread Peng Fan
() as a memblock_alloc() implementation detail. It is, however, tolerant to memblock_free() being called on a sub-range or just a different range from a previous memblock_alloc(). So the original patch looks fine to me. FWIW: Signed-off-by: Peng Fan Reviewed-by: Catalin Marinas --- V2: Per Mike's comments, add

RE: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-27 Thread Peng Fan
Hi Dennis, > -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年2月27日 1:33 > To: Peng Fan > Cc: den...@kernel.org; t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [

RE: [PATCH 1/2] percpu: km: remove SMP check

2019-02-27 Thread Peng Fan
Hi Dennis > -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年2月27日 1:04 > To: Christopher Lameter > Cc: Peng Fan ; t...@kernel.org; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [PATCH 1/2] p

RE: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-25 Thread Peng Fan
Hi Dennis, > -Original Message- > From: den...@kernel.org [mailto:den...@kernel.org] > Sent: 2019年2月25日 23:24 > To: Peng Fan > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [

RE: [PATCH 2/2] percpu: km: no need to consider pcpu_group_offsets[0]

2019-02-25 Thread Peng Fan
Hi Dennis, > -Original Message- > From: den...@kernel.org [mailto:den...@kernel.org] > Sent: 2019年2月25日 23:16 > To: Peng Fan > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [PATCH 2/2

RE: [PATCH 1/2] percpu: km: remove SMP check

2019-02-25 Thread Peng Fan
Hi Dennis, > -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年2月25日 23:14 > To: Peng Fan > Cc: den...@kernel.org; t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [

[PATCH 1/2] percpu: km: remove SMP check

2019-02-24 Thread Peng Fan
percpu-km could only be selected by NEED_PER_CPU_KM which depends on !SMP, so CONFIG_SMP will be false when choose percpu-km. Signed-off-by: Peng Fan --- mm/percpu-km.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu-km.c b/mm/percpu-km.c index 0f643dc2dc65

[PATCH 2/2] percpu: km: no need to consider pcpu_group_offsets[0]

2019-02-24 Thread Peng Fan
percpu-km is used on UP systems which only has one group, so the group offset will be always 0, there is no need to subtract pcpu_group_offsets[0] when assigning chunk->base_addr Signed-off-by: Peng Fan --- mm/percpu-km.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-24 Thread Peng Fan
ing pcpu_nr_slots to avoid waste one slot and let [PCPU_MIN_ALLOC_SIZE, 31) really share the same slot. Signed-off-by: Peng Fan --- V1: Not very sure about whether it is intended to leave the slot there. mm/percpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/percpu.

RE: [PATCH] mm/cma: cma_declare_contiguous: correct err handling

2019-02-22 Thread Peng Fan
> -Original Message- > From: Mike Rapoport [mailto:r...@linux.ibm.com] > Sent: 2019年2月20日 1:46 > To: Vlastimil Babka > Cc: Andrew Morton ; Peng Fan > ; labb...@redhat.com; mho...@suse.com; > iamjoonsoo@lge.com; r...@linux.vnet.ibm.com; > m.szyp

[RFC] percpu: use nr_groups as check condition

2019-02-20 Thread Peng Fan
eck. In case we do have nr_groups equals with NR_CPUS, we could also avoid memory access out of bounds. Signed-off-by: Peng Fan --- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index db86282fd024..c5c750781628 100644 --- a/mm/percpu.c +++ b

RE: [PATCH] mm/cma: cma_declare_contiguous: correct err handling

2019-02-14 Thread Peng Fan
Hi Andrew > -Original Message- > From: Andrew Morton [mailto:a...@linux-foundation.org] > Sent: 2019年2月15日 4:38 > To: Peng Fan > Cc: labb...@redhat.com; mho...@suse.com; vba...@suse.cz; > iamjoonsoo@lge.com; r...@linux.vnet.ibm.com; > m.szyprow...@samsung.com;

[PATCH] mm/cma: cma_declare_contiguous: correct err handling

2019-02-14 Thread Peng Fan
In case cma_init_reserved_mem failed, need to free the memblock allocated by memblock_reserve or memblock_alloc_range. Signed-off-by: Peng Fan --- V1: code inspection, I do not met failure in cma_init_reserved_mem. mm/cma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH V2] arm64: mmu: drop paging_init comments

2019-02-13 Thread Peng Fan
The comments could not reflect the code, and it is easy to get what this function does from a straight-line reading of the code. So let's drop the comments Signed-off-by: Peng Fan Acked-by: Mark Rutland --- V2: Drop comments. Add a-b update commit log. V1: https://www.mail-archive.com

RE: [PATCH 3/3] arm64: mmu: pgd_pgtable_alloc: drop barrier

2019-02-13 Thread Peng Fan
Hi Mark, > -Original Message- > From: Mark Rutland [mailto:mark.rutl...@arm.com] > Sent: 2019年2月13日 19:31 > To: Peng Fan > Cc: catalin.mari...@arm.com; will.dea...@arm.com; > ard.biesheu...@linaro.org; yaojun8558...@gmail.com; > cpan...@codeaurora.org; robin.mur...

RE: [PATCH 2/3] arm64: mmu: early_pgtable_alloc: remove unnecessary comments

2019-02-13 Thread Peng Fan
Hi Mark, > -Original Message- > From: Mark Rutland [mailto:mark.rutl...@arm.com] > Sent: 2019年2月13日 19:22 > To: Peng Fan > Cc: catalin.mari...@arm.com; will.dea...@arm.com; > ard.biesheu...@linaro.org; yaojun8558...@gmail.com; > cpan...@codeaurora.org; robin.mur...

RE: [PATCH 1/3] arm64: mmu: update paging_init comments

2019-02-13 Thread Peng Fan
Hi Mark, > -Original Message- > From: Mark Rutland [mailto:mark.rutl...@arm.com] > Sent: 2019年2月13日 19:19 > To: Peng Fan > Cc: catalin.mari...@arm.com; will.dea...@arm.com; > ard.biesheu...@linaro.org; yaojun8558...@gmail.com; > cpan...@codeaurora.org; robin.mur...

[PATCH 3/3] arm64: mmu: pgd_pgtable_alloc: drop barrier

2019-02-13 Thread Peng Fan
alloc is only called by __create_pgd_mapping, and there are implicit barriers in __create_pgd_mapping, so we could remove the barrier pgd_pgtable_alloc Signed-off-by: Peng Fan --- Note: this patch tested on qemu-system-aarch64, not real hardware. arch/arm64/mm/mmu.c | 2 -- 1 file changed, 2 dele

[PATCH 1/3] arm64: mmu: update paging_init comments

2019-02-13 Thread Peng Fan
The comments has not been changed since the function introduced, but the function has been changed dramatically, so update the comments to reflect the code. Signed-off-by: Peng Fan --- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm

[PATCH 2/3] arm64: mmu: early_pgtable_alloc: remove unnecessary comments

2019-02-13 Thread Peng Fan
The empty zero page has been moved to bss area by commit 5227cfa71f9e ("arm64: mm: place empty_zero_page in bss"), and it alreay added "dsb ishst" in head.S to make sure the empty zero page visible to PTW. There is no code to reflect the comment, so remove it. Sig

[PATCH] arm: use memblocks_present

2019-02-11 Thread Peng Fan
arm_memory_present is doing same thing as memblocks_present, so let's use common code memblocks_present instead of platform specific arm_memory_present. Signed-off-by: Peng Fan --- arch/arm/mm/init.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/arch/arm

RE: [PATCH] arm64: use memblocks_present

2019-02-11 Thread Peng Fan
> -Original Message- > From: Catalin Marinas [mailto:catalin.mari...@arm.com] > Sent: 2019年2月11日 20:21 > To: Peng Fan > Cc: will.dea...@arm.com; a...@linux-foundation.org; > r...@linux.vnet.ibm.com; ard.biesheu...@linaro.org; f.faine...@gmail.com; > robin.mur

[PATCH] arm64: use memblocks_present

2019-02-10 Thread Peng Fan
arm64_memory_present is doing same thing as memblocks_present, so let's use common code memblocks_present instead of platform specific arm64_memory_present. Signed-off-by: Peng Fan --- arch/arm64/mm/init.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-29 Thread Peng Fan
> -Original Message- > From: h...@infradead.org [mailto:h...@infradead.org] > Sent: 2019年1月28日 16:00 > To: Peng Fan > Cc: h...@infradead.org; Stefano Stabellini ; > m...@redhat.com; jasow...@redhat.com; xen-de...@lists.xenproject.org; > linux-remotep...@vger.ker

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-25 Thread Peng Fan
Hi, > -Original Message- > From: h...@infradead.org [mailto:h...@infradead.org] > Sent: 2019年1月24日 5:14 > To: Stefano Stabellini > Cc: h...@infradead.org; Peng Fan ; m...@redhat.com; > jasow...@redhat.com; xen-de...@lists.xenproject.org; > linux-remotep...@vger.ker

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-23 Thread Peng Fan
Hi stefano, > -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 2019年1月24日 7:44 > To: h...@infradead.org > Cc: Stefano Stabellini ; Peng Fan > ; m...@redhat.com; jasow...@redhat.com; > xen-de...@lists.xenproject.org; linux-remot

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-23 Thread Peng Fan
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 2019年1月23日 4:00 > To: Peng Fan > Cc: m...@redhat.com; jasow...@redhat.com; sstabell...@kernel.org; > h...@infradead.org; xen-de...@lists.xenproject.org; > linux-remotep...@v

RE: [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-21 Thread Peng Fan
Hi > -Original Message- > From: h...@infradead.org [mailto:h...@infradead.org] > Sent: 2019年1月21日 16:29 > To: Peng Fan > Cc: m...@redhat.com; jasow...@redhat.com; sstabell...@kernel.org; > h...@infradead.org; virtualizat...@lists.linux-foundation.org; > xen-de...

[RFC] virtio_ring: check dma_mem for xen_domain

2019-01-20 Thread Peng Fan
en kernel panic. With this patch, vring_use_dma_api will return false, and vring_map_one_sg will return sg_phys(sg) which is the correct phys address in the predefined memory region. vring_map_one_sg -> vring_use_dma_api -> sg_phys(sg) Signed-off-by: Peng Fan --- drivers/virtio/virt

tee/optee driver pm question

2018-12-18 Thread Peng Fan
Hi Jens, Ulf We met an issue is OP-TEE is actively doing some DMA operations, such as CAAM DMA, while Linux is doing some ddr freq change and will let ddr into self-refresh state, this will cause issues. On ARMv8 i.MX, we have code request_bus_freq/release_bus_freq to ask ATF to make ddr

[PATCH] irqchip: gic-v3: remove dead code in gic_iterate_rdists

2018-12-16 Thread Peng Fan
In gic_iterate_rdists, ret will never be 0 when `ret ? -ENODEV : 0` at the end of function, so let's directly return -ENODEV. Signed-off-by: Peng Fan --- drivers/irqchip/irq-gic-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers

RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array

2018-08-12 Thread Peng Fan
Hi Anson, > > > -Original Message- > > > From: Anson Huang > > > Sent: 2018年8月8日 12:39 > > > To: shawn...@kernel.org; s.ha...@pengutronix.de; > > > ker...@pengutronix.de; Fabio Estevam ; > > > mturque...@baylibre.com; sb...@kernel.org; > > > linux-arm-ker...@lists.infradead.org; > > >

RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array

2018-08-12 Thread Peng Fan
Hi Anson, > > > -Original Message- > > > From: Anson Huang > > > Sent: 2018年8月8日 12:39 > > > To: shawn...@kernel.org; s.ha...@pengutronix.de; > > > ker...@pengutronix.de; Fabio Estevam ; > > > mturque...@baylibre.com; sb...@kernel.org; > > > linux-arm-ker...@lists.infradead.org; > > >

RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array

2018-08-08 Thread Peng Fan
> -Original Message- > From: Anson Huang > Sent: 2018年8月8日 12:39 > To: shawn...@kernel.org; s.ha...@pengutronix.de; ker...@pengutronix.de; > Fabio Estevam ; mturque...@baylibre.com; > sb...@kernel.org; linux-arm-ker...@lists.infradead.org; > linux-...@vger.kernel.org;

RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array

2018-08-08 Thread Peng Fan
> -Original Message- > From: Anson Huang > Sent: 2018年8月8日 12:39 > To: shawn...@kernel.org; s.ha...@pengutronix.de; ker...@pengutronix.de; > Fabio Estevam ; mturque...@baylibre.com; > sb...@kernel.org; linux-arm-ker...@lists.infradead.org; > linux-...@vger.kernel.org;

RE: [PATCH V4 3/5] mailbox: imx: add imx mu support

2018-07-11 Thread Peng Fan
Hi A.S > -Original Message- > From: A.s. Dong > Sent: 2018年7月11日 15:30 > To: Sascha Hauer > Cc: linux-arm-ker...@lists.infradead.org; donga...@gmail.com; Jassi Brar > ; linux-kernel@vger.kernel.org; Oleksij Rempel > ; dl-linux-imx ; > ker...@pengutronix.de; Fabio Estevam ; >

RE: [PATCH V4 3/5] mailbox: imx: add imx mu support

2018-07-11 Thread Peng Fan
Hi A.S > -Original Message- > From: A.s. Dong > Sent: 2018年7月11日 15:30 > To: Sascha Hauer > Cc: linux-arm-ker...@lists.infradead.org; donga...@gmail.com; Jassi Brar > ; linux-kernel@vger.kernel.org; Oleksij Rempel > ; dl-linux-imx ; > ker...@pengutronix.de; Fabio Estevam ; >

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-29 Thread Peng Fan
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: 2018年5月28日 16:32 > To: Peng Fan > Cc: Rafael J. Wysocki ; Ulf Hansson > ; Rafael J. Wysocki ; > Fabio Estevam ; Greg Kroah-Hartman > ; Linux Kernel Mailing List > ; Linux PM

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-29 Thread Peng Fan
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: 2018年5月28日 16:32 > To: Peng Fan > Cc: Rafael J. Wysocki ; Ulf Hansson > ; Rafael J. Wysocki ; > Fabio Estevam ; Greg Kroah-Hartman > ; Linux Kernel Mailing List > ; Linux PM

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-28 Thread Peng Fan
Hi, Rafael & Uffe > -Original Message- > From: Peng Fan > Sent: 2018年5月18日 16:53 > To: Rafael J. Wysocki <r...@rjwysocki.net> > Cc: Rafael J. Wysocki <raf...@kernel.org>; Ulf Hansson > <ulf.hans...@linaro.org>; Rafael J. Wysocki <rafael.j.wyso

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-28 Thread Peng Fan
Hi, Rafael & Uffe > -Original Message- > From: Peng Fan > Sent: 2018年5月18日 16:53 > To: Rafael J. Wysocki > Cc: Rafael J. Wysocki ; Ulf Hansson > ; Rafael J. Wysocki ; > Fabio Estevam ; Greg Kroah-Hartman > ; Linux Kernel Mailing List > ; Linux PM ; >

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-18 Thread Peng Fan
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: 2018年5月18日 15:55 > To: Peng Fan <peng@nxp.com> > Cc: Rafael J. Wysocki <raf...@kernel.org>; Ulf Hansson > <ulf.hans...@linaro.org>; Rafael J. Wysocki <rafae

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-18 Thread Peng Fan
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: 2018年5月18日 15:55 > To: Peng Fan > Cc: Rafael J. Wysocki ; Ulf Hansson > ; Rafael J. Wysocki ; > Fabio Estevam ; Greg Kroah-Hartman > ; Linux Kernel Mailing List > ; Linux PM

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-17 Thread Peng Fan
> -Original Message- > From: rjwyso...@gmail.com [mailto:rjwyso...@gmail.com] On Behalf Of Rafael > J. Wysocki > Sent: 2018年5月17日 16:01 > To: Peng Fan <peng@nxp.com> > Cc: Rafael J. Wysocki <raf...@kernel.org>; Ulf Hansson > <ulf.hans...@linaro.or

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-17 Thread Peng Fan
> -Original Message- > From: rjwyso...@gmail.com [mailto:rjwyso...@gmail.com] On Behalf Of Rafael > J. Wysocki > Sent: 2018年5月17日 16:01 > To: Peng Fan > Cc: Rafael J. Wysocki ; Ulf Hansson > ; Rafael J. Wysocki ; > Fabio Estevam ; Greg Kroah-Hartman >

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-16 Thread Peng Fan
> -Original Message- > From: rjwyso...@gmail.com [mailto:rjwyso...@gmail.com] On Behalf Of Rafael > J. Wysocki > Sent: 2018年5月17日 5:35 > To: Ulf Hansson <ulf.hans...@linaro.org> > Cc: Peng Fan <peng@nxp.com>; Rafael J. Wysocki > <rafael.j.wyso...@i

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-16 Thread Peng Fan
> -Original Message- > From: rjwyso...@gmail.com [mailto:rjwyso...@gmail.com] On Behalf Of Rafael > J. Wysocki > Sent: 2018年5月17日 5:35 > To: Ulf Hansson > Cc: Peng Fan ; Rafael J. Wysocki > ; Fabio Estevam ; Greg > Kroah-Hartman ; Linux Kernel Mailing List >

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-16 Thread Peng Fan
Hi Uffe, > -Original Message- > From: Ulf Hansson [mailto:ulf.hans...@linaro.org] > Sent: 2018年5月16日 17:53 > To: Peng Fan <peng@nxp.com> > Cc: Rafael J. Wysocki <rafael.j.wyso...@intel.com>; Fabio Estevam > <fabio.este...@nxp.com>; Greg Kroah-H

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-16 Thread Peng Fan
Hi Uffe, > -Original Message- > From: Ulf Hansson [mailto:ulf.hans...@linaro.org] > Sent: 2018年5月16日 17:53 > To: Peng Fan > Cc: Rafael J. Wysocki ; Fabio Estevam > ; Greg Kroah-Hartman > ; Linux Kernel Mailing List > ; Linux PM ; > dl-linux-imx > Subject: R

[RFC] platform: detach from PM domains on shutdown

2018-05-15 Thread Peng Fan
ing. So let's detach the power domain to shutdown PM domains after driver shutdown. Signed-off-by: Peng Fan <peng@nxp.com> --- I do not find a better place to shutdown power domain when reboot Linux, so add back the line that commit 2d30bb0b3889 removes, because it is a false alarm warn

[RFC] platform: detach from PM domains on shutdown

2018-05-15 Thread Peng Fan
ing. So let's detach the power domain to shutdown PM domains after driver shutdown. Signed-off-by: Peng Fan --- I do not find a better place to shutdown power domain when reboot Linux, so add back the line that commit 2d30bb0b3889 removes, because it is a false alarm warning as commit e7

RE: [Xen-devel] [PATCH v6 0/1] drm/xen-front: Add support for Xen PV display frontend

2018-04-11 Thread Peng Fan
Hi Oleksandr, Just have a question, is this drm/xen-front stuff orthogonal to xen shared coprocessor framework for gpu, or are they exclusive? Thanks, Peng. > Subject: [Xen-devel] [PATCH v6 0/1] drm/xen-front: Add support for Xen PV > display frontend > > From: Oleksandr Andrushchenko

RE: [Xen-devel] [PATCH v6 0/1] drm/xen-front: Add support for Xen PV display frontend

2018-04-11 Thread Peng Fan
Hi Oleksandr, Just have a question, is this drm/xen-front stuff orthogonal to xen shared coprocessor framework for gpu, or are they exclusive? Thanks, Peng. > Subject: [Xen-devel] [PATCH v6 0/1] drm/xen-front: Add support for Xen PV > display frontend > > From: Oleksandr Andrushchenko > >

[PATCH] regmap: debugfs: check pointer before access

2018-03-29 Thread Peng Fan
00906d728 [ 26.696342] x1 : 1000 x0 : 8008f72d2000 [ 26.701667] So add check here. When the driver pointer is NULL, return -EIO. Signed-off-by: Peng Fan <peng@nxp.com> --- drivers/base/regmap/regmap-debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bas

[PATCH] regmap: debugfs: check pointer before access

2018-03-29 Thread Peng Fan
00906d728 [ 26.696342] x1 : 1000 x0 : 8008f72d2000 [ 26.701667] So add check here. When the driver pointer is NULL, return -EIO. Signed-off-by: Peng Fan --- drivers/base/regmap/regmap-debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/base/regmap/regmap-debugfs.c

Re: [PATCH] tee: correct max value for id allocation

2018-02-22 Thread Peng Fan
Hi Jens, Any comments on this patch? Thanks, Peng On Mon, Jan 15, 2018 at 05:27:35PM +0800, Peng Fan wrote: >The privileged dev id range is [TEE_NUM_DEVICES / 2, TEE_NUM_DEVICES). >The non-privileged dev id range is [0, TEE_NUM_DEVICES / 2). > >So when finding a slot for them,

Re: [PATCH] tee: correct max value for id allocation

2018-02-22 Thread Peng Fan
Hi Jens, Any comments on this patch? Thanks, Peng On Mon, Jan 15, 2018 at 05:27:35PM +0800, Peng Fan wrote: >The privileged dev id range is [TEE_NUM_DEVICES / 2, TEE_NUM_DEVICES). >The non-privileged dev id range is [0, TEE_NUM_DEVICES / 2). > >So when finding a slot for them,

Re: [PATCH 2/2] ARM: imx: cpuidle-imx6q: configure CCM to RUN mode when CPU is active

2018-01-24 Thread Peng Fan
Hi Lucas, On Wed, Jan 24, 2018 at 12:16:25PM +0100, Lucas Stach wrote: >Hi Peng, > >Am Samstag, den 30.12.2017, 21:53 +0800 schrieb Peng Fan: >> There are two states in i.MX6Q cpuidle driver. >> state[1]: ARM WFI mode >> state[2]: i.MX6Q WAIT mode >> >

Re: [PATCH 2/2] ARM: imx: cpuidle-imx6q: configure CCM to RUN mode when CPU is active

2018-01-24 Thread Peng Fan
Hi Lucas, On Wed, Jan 24, 2018 at 12:16:25PM +0100, Lucas Stach wrote: >Hi Peng, > >Am Samstag, den 30.12.2017, 21:53 +0800 schrieb Peng Fan: >> There are two states in i.MX6Q cpuidle driver. >> state[1]: ARM WFI mode >> state[2]: i.MX6Q WAIT mode >> >

Re: [PATCH 2/2] ARM: imx: cpuidle-imx6q: configure CCM to RUN mode when CPU is active

2018-01-23 Thread Peng Fan
Hi, For the two patch, ping.. On Sat, Dec 30, 2017 at 09:53:19PM +0800, Peng Fan wrote: >There are two states in i.MX6Q cpuidle driver. >state[1]: ARM WFI mode >state[2]: i.MX6Q WAIT mode > >Take i.MX6DL as example, think out such a case: >1. CPU0/1 both run at normal mode >

Re: [PATCH 2/2] ARM: imx: cpuidle-imx6q: configure CCM to RUN mode when CPU is active

2018-01-23 Thread Peng Fan
Hi, For the two patch, ping.. On Sat, Dec 30, 2017 at 09:53:19PM +0800, Peng Fan wrote: >There are two states in i.MX6Q cpuidle driver. >state[1]: ARM WFI mode >state[2]: i.MX6Q WAIT mode > >Take i.MX6DL as example, think out such a case: >1. CPU0/1 both run at normal mode >

Re: [PATCH] ARM: imx_v6_v7_defconfig: enable OP-TEE

2018-01-23 Thread Peng Fan
Hi, On Fri, Jan 05, 2018 at 05:40:35PM +0800, Peng Fan wrote: >This patch enables configs for Trusted Execution Environment(TEE) and >Open Portable Trusted Execution Environment(OP-TEE). > >With Linux running in Trustzone non-secure world, OP-TEE OS runs in >secure world, linux c

Re: [PATCH] ARM: imx_v6_v7_defconfig: enable OP-TEE

2018-01-23 Thread Peng Fan
Hi, On Fri, Jan 05, 2018 at 05:40:35PM +0800, Peng Fan wrote: >This patch enables configs for Trusted Execution Environment(TEE) and >Open Portable Trusted Execution Environment(OP-TEE). > >With Linux running in Trustzone non-secure world, OP-TEE OS runs in >secure world, linux c

[PATCH] tee: correct max value for id allocation

2018-01-15 Thread Peng Fan
The privileged dev id range is [TEE_NUM_DEVICES / 2, TEE_NUM_DEVICES). The non-privileged dev id range is [0, TEE_NUM_DEVICES / 2). So when finding a slot for them, need to use different max value. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Jens Wiklander <jens.wiklan...@l

[PATCH] tee: correct max value for id allocation

2018-01-15 Thread Peng Fan
The privileged dev id range is [TEE_NUM_DEVICES / 2, TEE_NUM_DEVICES). The non-privileged dev id range is [0, TEE_NUM_DEVICES / 2). So when finding a slot for them, need to use different max value. Signed-off-by: Peng Fan Cc: Jens Wiklander --- drivers/tee/tee_core.c | 14 +- 1

[PATCH] ARM: imx_v6_v7_defconfig: enable OP-TEE

2018-01-05 Thread Peng Fan
the bindings in Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt to let the driver probe work. On i.MX6/7, now the bootflow is U-Boot->OP-TEE->Linux, OP-TEE will automatically create that node. Signed-off-by: Peng Fan <peng@nxp.com> --- V1: Tested on i.MX7D-SDB

[PATCH] ARM: imx_v6_v7_defconfig: enable OP-TEE

2018-01-05 Thread Peng Fan
the bindings in Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt to let the driver probe work. On i.MX6/7, now the bootflow is U-Boot->OP-TEE->Linux, OP-TEE will automatically create that node. Signed-off-by: Peng Fan --- V1: Tested on i.MX7D-SDB with/without OP-TEE OS.

RE: [PATCH V3] ARM: imx: use outer_disable/resume for low power

2018-01-02 Thread Peng Fan
> -Original Message- > From: Peng Fan > Sent: Thursday, December 28, 2017 5:09 PM > To: shawn...@kernel.org > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...@gmail.com; Peng Fan <peng@nxp.com>; Sascha Hauer > <

RE: [PATCH V3] ARM: imx: use outer_disable/resume for low power

2018-01-02 Thread Peng Fan
> -Original Message- > From: Peng Fan > Sent: Thursday, December 28, 2017 5:09 PM > To: shawn...@kernel.org > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...@gmail.com; Peng Fan ; Sascha Hauer > ; Fabio Estevam ; A.s. > Dong ;

RE: [PATCH V2] ARM: imx: introduce imx_l2c310_write_sec

2017-12-30 Thread Peng Fan
> -Original Message- > From: Philippe Ombredanne [mailto:pombreda...@nexb.com] > Sent: Saturday, December 30, 2017 10:17 PM > To: Peng Fan <peng@nxp.com> > Cc: Shawn Guo <shawn...@kernel.org>; moderated list:ARM/FREESCALE IMX > / MXC A

RE: [PATCH V2] ARM: imx: introduce imx_l2c310_write_sec

2017-12-30 Thread Peng Fan
> -Original Message- > From: Philippe Ombredanne [mailto:pombreda...@nexb.com] > Sent: Saturday, December 30, 2017 10:17 PM > To: Peng Fan > Cc: Shawn Guo ; moderated list:ARM/FREESCALE IMX > / MXC ARM ARCHITECTURE ; LKML > ; Peng Fan ; Sascha > Hauer ; Fab

[PATCH 1/2] ARM: imx: no unmask/mask GINT for WAIT_CLOCKED

2017-12-30 Thread Peng Fan
WAIT_CLOCKED is for RUN mode, there is no need to unmask/mask IRQ32 in GPC. Signed-off-by: Peng Fan <peng@nxp.com> --- V1: This is to upstream patch: http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/commit/?h=imx_4.9.11_1.0.0_ga=0d980646ee068b92db71fd5e4e4efcbc33749cbd ar

[PATCH 1/2] ARM: imx: no unmask/mask GINT for WAIT_CLOCKED

2017-12-30 Thread Peng Fan
WAIT_CLOCKED is for RUN mode, there is no need to unmask/mask IRQ32 in GPC. Signed-off-by: Peng Fan --- V1: This is to upstream patch: http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/commit/?h=imx_4.9.11_1.0.0_ga=0d980646ee068b92db71fd5e4e4efcbc33749cbd arch/arm/mach-imx/pm-imx6.c

[PATCH 2/2] ARM: imx: cpuidle-imx6q: configure CCM to RUN mode when CPU is active

2017-12-30 Thread Peng Fan
mode when any cpu exit state[2]. In this patch, When CPU exits state[2], it configures CCM to RUN mode. When all CPUs enters state[2], the last CPU needs to check whether it's ok to configure CCM to WAIT mode or not. Signed-off-by: Peng Fan <peng@nxp.com> --- V1: This is to upstream

<    2   3   4   5   6   7   8   9   10   >