[PATCH] cpu.h: remove 3 obsolete macros

2017-10-24 Thread yanjiang.jin
From: Yanjiang Jin commit 530e9b76ae8f ("cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions")' removes the below macros: - #define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */ - #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v

[PATCH] cpu.h: remove 3 obsolete macros

2017-10-24 Thread yanjiang.jin
From: Yanjiang Jin commit 530e9b76ae8f ("cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions")' removes the below macros: - #define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */ - #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */ - #define

[PATCH] watchdog: imx2_wdt: use new_timeout value to override the old

2017-07-19 Thread yanjiang.jin
From: Yanjiang Jin Without this patch we couldn't change the timeout value of imx2_wdt. Signed-off-by: Yanjiang Jin --- drivers/watchdog/imx2_wdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/watchdog/imx2_wdt.c

[PATCH] watchdog: imx2_wdt: use new_timeout value to override the old

2017-07-19 Thread yanjiang.jin
From: Yanjiang Jin Without this patch we couldn't change the timeout value of imx2_wdt. Signed-off-by: Yanjiang Jin --- drivers/watchdog/imx2_wdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 4874b0f..6cfeee6 100644

[PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread yanjiang.jin
From: Yanjiang Jin socfpga_cpu_die() just puts CPU in WFI, not actually off. So that Kexec's second kernel goes wrong since the kerenl text gets ovewritten. Now reset CPU1 in cpu_kill() to avoid this error. Also add flush_cache_all() to prevent data from being lost in

[PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread yanjiang.jin
From: Yanjiang Jin socfpga_cpu_die() just puts CPU in WFI, not actually off. So that Kexec's second kernel goes wrong since the kerenl text gets ovewritten. Now reset CPU1 in cpu_kill() to avoid this error. Also add flush_cache_all() to prevent data from being lost in cpu_die(). Signed-off-by:

[V2 PATCH] socfpga_a10: fix a kexec boot issue

2017-05-15 Thread yanjiang.jin
From: Yanjiang Jin V1->V2: 1. Add flush_cache_all() in cpu_die(); 2. Add more descriptive on the commit log; Also validate kexec and CPU_HOTPLUG as before. I guess socfpga's other boards may need this patch, but I have Arria10 board only. So add a new function

[V2 PATCH] socfpga_a10: fix a kexec boot issue

2017-05-15 Thread yanjiang.jin
From: Yanjiang Jin V1->V2: 1. Add flush_cache_all() in cpu_die(); 2. Add more descriptive on the commit log; Also validate kexec and CPU_HOTPLUG as before. I guess socfpga's other boards may need this patch, but I have Arria10 board only. So add a new function socfpga_a10_cpu_kill(), keep the

[PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-09 Thread yanjiang.jin
From: Yanjiang Jin Kexec's second kernel would hang if CPU1 isn't reset. Signed-off-by: Yanjiang Jin --- arch/arm/mach-socfpga/platsmp.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-09 Thread yanjiang.jin
From: Yanjiang Jin Kexec's second kernel would hang if CPU1 isn't reset. Signed-off-by: Yanjiang Jin --- arch/arm/mach-socfpga/platsmp.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c index

[PATCH] socfpga_a10: fix a kexec boot issue

2017-05-09 Thread yanjiang.jin
From: Yanjiang Jin I guess socfpga's other boards may need this patch, but I have Arria10 board only. So add a new function socfpga_a10_cpu_kill(), keep the old function socfpga_cpu_kill() for other boards. I also verified CPU_HOTPLUG after applying this patch,

[PATCH] socfpga_a10: fix a kexec boot issue

2017-05-09 Thread yanjiang.jin
From: Yanjiang Jin I guess socfpga's other boards may need this patch, but I have Arria10 board only. So add a new function socfpga_a10_cpu_kill(), keep the old function socfpga_cpu_kill() for other boards. I also verified CPU_HOTPLUG after applying this patch, everything seems well. Test

[PATCH] kdump test comments:

2017-05-02 Thread yanjiang.jin
From: Yanjiang Jin 1. Execute a kdump test on a "Freescale LayerScape LS1021E, Version: 2.0 board"; 2. I think may all "proc-v7-3level" CPUs need this patch, but I only validated it on LS1021, so still use #ifdef CONFIG_SOC_LS1021A to wrap this change; 3.

[PATCH] kdump test comments:

2017-05-02 Thread yanjiang.jin
From: Yanjiang Jin 1. Execute a kdump test on a "Freescale LayerScape LS1021E, Version: 2.0 board"; 2. I think may all "proc-v7-3level" CPUs need this patch, but I only validated it on LS1021, so still use #ifdef CONFIG_SOC_LS1021A to wrap this change; 3. Append "crashkernel=128M@2560M"

[PATCH] arm: proc-v7-3level.S: SOC_LS1021A: clear TTBCR.T1SZ

2017-05-02 Thread yanjiang.jin
From: Yanjiang Jin The macro "v7_ttb_setup" will set "TTBCR.T1SZ" only when "PHYS_OFFSET <= PAGE_OFFSET". But if we load the second kernel during kdump boot, PHYS_OFFSET may be greater than PAGE_OFFSET, we don't want to set this bit, but TTBCR.T1SZ is still not zero

[PATCH] arm: proc-v7-3level.S: SOC_LS1021A: clear TTBCR.T1SZ

2017-05-02 Thread yanjiang.jin
From: Yanjiang Jin The macro "v7_ttb_setup" will set "TTBCR.T1SZ" only when "PHYS_OFFSET <= PAGE_OFFSET". But if we load the second kernel during kdump boot, PHYS_OFFSET may be greater than PAGE_OFFSET, we don't want to set this bit, but TTBCR.T1SZ is still not zero since the first kernel's

[PATCH] powerpc: cputime: fix a compile warning

2016-11-20 Thread yanjiang.jin
From: Yanjiang Jin This patch is to avoid the below warning: kernel/sched/cpuacct.c:298:25: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'long unsigned int' [-Wformat=] Signed-off-by: Yanjiang Jin

[PATCH] powerpc: cputime: fix a compile warning

2016-11-20 Thread yanjiang.jin
From: Yanjiang Jin This patch is to avoid the below warning: kernel/sched/cpuacct.c:298:25: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'long unsigned int' [-Wformat=] Signed-off-by: Yanjiang Jin --- arch/powerpc/include/asm/cputime.h | 3 ++- 1

[PATCH] fsldma: t4240qds: drop "SG" CAP for DMA3

2016-11-20 Thread yanjiang.jin
From: Yanjiang Jin T4240QDS DMA controller uses the external DMA control signals to start or restart a paused DMA transfer, acknowledge a DMA transfer in progress and also indicates a transfer completion. "scatterlist copy" depends on these signals. But as "T4240

[PATCH] fsldma: t4240qds: drop "SG" CAP for DMA3

2016-11-20 Thread yanjiang.jin
From: Yanjiang Jin T4240QDS DMA controller uses the external DMA control signals to start or restart a paused DMA transfer, acknowledge a DMA transfer in progress and also indicates a transfer completion. "scatterlist copy" depends on these signals. But as "T4240 Reference Manual" shown: "The

[V2 PATCH] edac: mpc85xx: implement "remove" for mpc85xx_pci_err_driver

2016-11-16 Thread yanjiang.jin
From: Yanjiang Jin Tested on a T4240QDS board. V1->V2: According to Boris's suggestion, remove all hex addresses and offsets in Call Trace messages, so that it is recognizable by others. Yanjiang Jin (1): edac: mpc85xx: implement "remove" for

[PATCH] edac: mpc85xx: implement "remove" for mpc85xx_pci_err_driver

2016-11-16 Thread yanjiang.jin
From: Yanjiang Jin Tested on a T4240QDS board. If we execute the below steps without this patch: 1. modprobe mpc85xx_edac [The first insmod, everything is well.] 2. modprobe -r mpc85xx_edac 3. modprobe mpc85xx_edac [insmod again, error happens.] We would get the

[V2 PATCH] edac: mpc85xx: implement "remove" for mpc85xx_pci_err_driver

2016-11-16 Thread yanjiang.jin
From: Yanjiang Jin Tested on a T4240QDS board. V1->V2: According to Boris's suggestion, remove all hex addresses and offsets in Call Trace messages, so that it is recognizable by others. Yanjiang Jin (1): edac: mpc85xx: implement "remove" for mpc85xx_pci_err_driver

[PATCH] edac: mpc85xx: implement "remove" for mpc85xx_pci_err_driver

2016-11-16 Thread yanjiang.jin
From: Yanjiang Jin Tested on a T4240QDS board. If we execute the below steps without this patch: 1. modprobe mpc85xx_edac [The first insmod, everything is well.] 2. modprobe -r mpc85xx_edac 3. modprobe mpc85xx_edac [insmod again, error happens.] We would get the error messages as below: BUG:

[PATCH] edac: mpc85xx: implement "remove" for mpc85xx_pci_err_driver

2016-11-15 Thread yanjiang.jin
From: Yanjiang Jin Tested on a T4240QDS board. If we execute the below steps without this patch: 1. modprobe mpc85xx_edac [The first insmod, everything is well.] 2. modprobe -r mpc85xx_edac 3. modprobe mpc85xx_edac [insmod again, error happens.] We would get the

[PATCH] edac: mpc85xx: implement "remove" for mpc85xx_pci_err_driver

2016-11-15 Thread yanjiang.jin
From: Yanjiang Jin Tested on a T4240QDS board. If we execute the below steps without this patch: 1. modprobe mpc85xx_edac [The first insmod, everything is well.] 2. modprobe -r mpc85xx_edac 3. modprobe mpc85xx_edac [insmod again, error happens.] We would get the below error: BUG: recent

[PATCH] crypto: rsa: rename two rsa key files

2016-11-04 Thread yanjiang.jin
From: Yanjiang Jin This is to eliminate the below compile error: crypto/rsa_helper.c:19:29: fatal error: rsaprivkey-asn1.h: No such file or directory #include "rsaprivkey-asn1.h" ^ compilation terminated. Signed-off-by: Yanjiang Jin

[PATCH] crypto: rsa: rename two rsa key files

2016-11-04 Thread yanjiang.jin
From: Yanjiang Jin This is to eliminate the below compile error: crypto/rsa_helper.c:19:29: fatal error: rsaprivkey-asn1.h: No such file or directory #include "rsaprivkey-asn1.h" ^ compilation terminated. Signed-off-by: Yanjiang Jin --- crypto/{rsaprivkey.asn1

[PATCH] crypto/testmgr.c: fix !x==y confusion

2016-07-29 Thread yanjiang.jin
From: Yanjiang Jin "if (!ret == template[i].fail)" is confusing to compilers (gcc5): crypto/testmgr.c: In function '__test_aead': crypto/testmgr.c:531:12: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!ret

[PATCH] crypto/testmgr.c: fix !x==y confusion

2016-07-29 Thread yanjiang.jin
From: Yanjiang Jin "if (!ret == template[i].fail)" is confusing to compilers (gcc5): crypto/testmgr.c: In function '__test_aead': crypto/testmgr.c:531:12: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!ret == template[i].fail) {

[PATCH] MIPS: oprofile: Fix a preemption issue

2015-12-08 Thread yanjiang.jin
From: Yanjiang Jin Use boot_cpu_type() instead of current_cpu_type() in oprofile_arch_init() to avoid the below warning, cpu_type is consistent in a MIPS SMP system. BUG: using smp_processor_id() in preemptible [] code: insmod/952 caller is oprofile_arch_init+0x30/0x194 [oprofile] CPU:

[PATCH] MIPS: oprofile: Fix a preemption issue

2015-12-08 Thread yanjiang.jin
From: Yanjiang Jin Reproduction steps: 1. Build a MIPS BSP with CONFIG_OPROFILE=m, I am using Cavium's CN78XX board to test; 2. Boot the board; 3. modprobe oprofile in shell. Yanjiang Jin (1): MIPS: oprofile: Fix a preemption issue arch/mips/oprofile/common.c | 2 +- 1 file changed, 1

[PATCH] MIPS: oprofile: Fix a preemption issue

2015-12-08 Thread yanjiang.jin
From: Yanjiang Jin Use boot_cpu_type() instead of current_cpu_type() in oprofile_arch_init() to avoid the below warning, cpu_type is consistent in a MIPS SMP system. BUG: using smp_processor_id() in preemptible [] code: insmod/952 caller is

[PATCH] MIPS: oprofile: Fix a preemption issue

2015-12-08 Thread yanjiang.jin
From: Yanjiang Jin Reproduction steps: 1. Build a MIPS BSP with CONFIG_OPROFILE=m, I am using Cavium's CN78XX board to test; 2. Boot the board; 3. modprobe oprofile in shell. Yanjiang Jin (1): MIPS: oprofile: Fix a preemption issue arch/mips/oprofile/common.c |

[RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func

2015-11-13 Thread yanjiang.jin
From: Yanjiang Jin This can only happen in RT kernel due to run_timer_softirq() calls irq_work_tick() when CONFIG_PREEMPT_RT_FULL is enabled as below: static void run_timer_softirq(struct softirq_action *h) { if defined(CONFIG_IRQ_WORK) && defined(CONFIG_PREEMPT_RT_FULL)

[RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func

2015-11-13 Thread yanjiang.jin
From: Yanjiang Jin This can only happen in RT kernel due to run_timer_softirq() calls irq_work_tick() when CONFIG_PREEMPT_RT_FULL is enabled as below: static void run_timer_softirq(struct softirq_action *h) { if defined(CONFIG_IRQ_WORK) &&

[PATCH] mips: vmcore: forced convert 'hdr' in elf_check_arch()

2015-09-18 Thread yanjiang.jin
From: Yanjiang Jin elf_check_arch() will be called both in parse_crash_elf64_headers() and parse_crash_elf32_headers(). But in these two functions, the type of the parameter ehdr is different: Elf32_Ehdr and Elf64_Ehdr. Function parse_crash_elf_headers() reads e_ident[EI_CLASS] then decides to

[V2 PATCH] mips: vmcore: forced convert 'hdr' in elf_check_arch()

2015-09-18 Thread yanjiang.jin
From: Yanjiang Jin V1->V2: According to Minfei's suggestion, coverting in the Macro rather than in vmcore.c. Already verified this patch on a MIPS64 cavium octeon board: CN78XX. This patch is to eliminate the compile warning only, has no side effect in run-time. Yanjiang Jin (1): mips:

[PATCH] mips: vmcore: forced convert 'hdr' in elf_check_arch()

2015-09-18 Thread yanjiang.jin
From: Yanjiang Jin elf_check_arch() will be called both in parse_crash_elf64_headers() and parse_crash_elf32_headers(). But in these two functions, the type of the parameter ehdr is different: Elf32_Ehdr and Elf64_Ehdr. Function parse_crash_elf_headers() reads

[V2 PATCH] mips: vmcore: forced convert 'hdr' in elf_check_arch()

2015-09-18 Thread yanjiang.jin
From: Yanjiang Jin V1->V2: According to Minfei's suggestion, coverting in the Macro rather than in vmcore.c. Already verified this patch on a MIPS64 cavium octeon board: CN78XX. This patch is to eliminate the compile warning only, has no side effect in run-time.

[PATCH] vmcore: replace Elf64_Ehdr/Elf32_Ehdr with elfhdr

2015-09-15 Thread yanjiang.jin
From: Yanjiang Jin Function parse_crash_elf_headers() reads e_ident[EI_CLASS] then decides to call parse_crash_elf64_headers() or parse_crash_elf32_headers(). But this happens in run time, not compile time. So compiler will report the below warning: In file included from

[PATCH] vmcore: replace Elf64_Ehdr/Elf32_Ehdr with elfhdr

2015-09-15 Thread yanjiang.jin
From: Yanjiang Jin Already verified this patch on a MIPS64 cavium octeon board: CN78XX. This patch is to eliminate the compile warning only, has no side effect in run-time. Yanjiang Jin (1): vmcore: replace Elf64_Ehdr/Elf32_Ehdr with elfhdr fs/proc/vmcore.c | 4 ++-- 1 file changed, 2

[PATCH] vmcore: replace Elf64_Ehdr/Elf32_Ehdr with elfhdr

2015-09-15 Thread yanjiang.jin
From: Yanjiang Jin Function parse_crash_elf_headers() reads e_ident[EI_CLASS] then decides to call parse_crash_elf64_headers() or parse_crash_elf32_headers(). But this happens in run time, not compile time. So compiler will report the below warning: In file included

[PATCH] vmcore: replace Elf64_Ehdr/Elf32_Ehdr with elfhdr

2015-09-15 Thread yanjiang.jin
From: Yanjiang Jin Already verified this patch on a MIPS64 cavium octeon board: CN78XX. This patch is to eliminate the compile warning only, has no side effect in run-time. Yanjiang Jin (1): vmcore: replace Elf64_Ehdr/Elf32_Ehdr with elfhdr fs/proc/vmcore.c | 4

[PATCH] ethernet: e1000e: define lat_ns as u64 instead of s64

2015-04-03 Thread yanjiang.jin
From: Yanjiang Jin do_div() expects the type of "n" to be uint64_t, define "lat_ns" as u64 to avoid the below warning, also update its correlative operations and data. In file included from ./arch/powerpc/include/asm/div64.h:1:0, from include/linux/kernel.h:124,

[PATCH] ethernet: e1000e: define lat_ns as u64 instead of s64

2015-04-03 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com do_div() expects the type of n to be uint64_t, define lat_ns as u64 to avoid the below warning, also update its correlative operations and data. In file included from ./arch/powerpc/include/asm/div64.h:1:0, from

[PATCH 1/2] crypto: caamhash: - fix uninitialized edesc->sec4_sg_bytes field

2015-03-05 Thread yanjiang.jin
From: Yanjiang Jin sec4_sg_bytes not being properly initialized causes ahash_done to try to free unallocated DMA memory: caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0xdeadbeefdeadbeef] [size=3735928559 bytes] [ cut here

[V3 PATCH 0/2] fix some CAAM warnings.

2015-03-05 Thread yanjiang.jin
From: Yanjiang Jin Hi, This patch series fix some CAAM compile and runtime warnings. I have tested this on fsl-p5020ds board using upstream 4.0.0-rc2 with the below configs: CONFIG_DMA_API_DEBUG=y # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set Change log: v3:

[PATCH 2/2] crypto: caam_rng: fix rng_unmap_ctx's DMA_UNMAP size problem

2015-03-05 Thread yanjiang.jin
From: Yanjiang Jin Fix rng_unmap_ctx's DMA_UNMAP size problem for caam_rng, else system would report the below calltrace during cleanup caam_rng. Since rng_create_sh_desc() creates a fixed descriptor of exactly 4 command-lengths now, also update DESC_RNG_LEN to (4 * CAAM_CMD_SZ). caam_jr

[PATCH 1/2] crypto: caamhash: - fix uninitialized edesc-sec4_sg_bytes field

2015-03-05 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com sec4_sg_bytes not being properly initialized causes ahash_done to try to free unallocated DMA memory: caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0xdeadbeefdeadbeef] [size=3735928559

[V3 PATCH 0/2] fix some CAAM warnings.

2015-03-05 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com Hi, This patch series fix some CAAM compile and runtime warnings. I have tested this on fsl-p5020ds board using upstream 4.0.0-rc2 with the below configs: CONFIG_DMA_API_DEBUG=y # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set Change log: v3:

[PATCH 2/2] crypto: caam_rng: fix rng_unmap_ctx's DMA_UNMAP size problem

2015-03-05 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com Fix rng_unmap_ctx's DMA_UNMAP size problem for caam_rng, else system would report the below calltrace during cleanup caam_rng. Since rng_create_sh_desc() creates a fixed descriptor of exactly 4 command-lengths now, also update DESC_RNG_LEN to (4 *

[PATCH 3/3] crypto: caamhash: - fix uninitialized edesc->sec4_sg_bytes field

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin sec4_sg_bytes not being properly initialized causes ahash_done to try to free unallocated DMA memory: caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0xdeadbeefdeadbeef] [size=3735928559 bytes] [ cut here

[PATCH 1/3] crypto: caam: fix some compile warnings

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin This commit is to avoid the below warnings: drivers/crypto/caam/sg_sw_sec4.h:88:12: warning: 'dma_map_sg_chained' defined but not used [-Wunused-function] static int dma_map_sg_chained(struct device *dev, struct scatterlist *sg, ^

[PATCH 2/3] crypto: caam_rng: fix rng_unmap_ctx's DMA_UNMAP size problem

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin Fix rng_unmap_ctx's DMA_UNMAP size problem for caam_rng, else system would report the below calltrace during kexec boot: caam_jr ffe301000.jr: DMA-API: device driver frees DMA memory with different size [device address=0x7f080010] [map size=16 bytes] [unmap size=40

[PATCH 0/3] fix some CAAM warnings.

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin Hi, This patch series fix some CAAM compile and runtime warnings. The patches 0001 and 0002 are same as V1. I have tested this on fsl-p5020ds board using upstream 4.0.0-rc1+ with the below configs: CONFIG_DMA_API_DEBUG=y # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set

[PATCH] fsl: mpc85xx: call k(un)map_atomic other than k(un)map

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin The k(un)map function may be called in atomic context in the function map_and_flush(), so use k(un)map_atomic to replace it, else we would get the below warning during kdump: BUG: sleeping function called from invalid context at include/linux/highmem.h:58 in_atomic(): 1,

[PATCH 2/3] crypto: caam_rng: fix rng_unmap_ctx's DMA_UNMAP size problem

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com Fix rng_unmap_ctx's DMA_UNMAP size problem for caam_rng, else system would report the below calltrace during kexec boot: caam_jr ffe301000.jr: DMA-API: device driver frees DMA memory with different size [device address=0x7f080010] [map

[PATCH 0/3] fix some CAAM warnings.

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com Hi, This patch series fix some CAAM compile and runtime warnings. The patches 0001 and 0002 are same as V1. I have tested this on fsl-p5020ds board using upstream 4.0.0-rc1+ with the below configs: CONFIG_DMA_API_DEBUG=y #

[PATCH 3/3] crypto: caamhash: - fix uninitialized edesc-sec4_sg_bytes field

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com sec4_sg_bytes not being properly initialized causes ahash_done to try to free unallocated DMA memory: caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0xdeadbeefdeadbeef] [size=3735928559

[PATCH 1/3] crypto: caam: fix some compile warnings

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com This commit is to avoid the below warnings: drivers/crypto/caam/sg_sw_sec4.h:88:12: warning: 'dma_map_sg_chained' defined but not used [-Wunused-function] static int dma_map_sg_chained(struct device *dev, struct scatterlist *sg, ^

[PATCH] fsl: mpc85xx: call k(un)map_atomic other than k(un)map

2015-03-02 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com The k(un)map function may be called in atomic context in the function map_and_flush(), so use k(un)map_atomic to replace it, else we would get the below warning during kdump: BUG: sleeping function called from invalid context at

[PATCH 2/4] crypto: caam_rng: fix rng_unmap_ctx's DMA_UNMAP size problem

2015-02-27 Thread yanjiang.jin
From: Yanjiang Jin Fix rng_unmap_ctx's DMA_UNMAP size problem for caam_rng, else system would report the below calltrace during kexec boot: caam_jr ffe301000.jr: DMA-API: device driver frees DMA memory with different size [device address=0x7f080010] [map size=16 bytes] [unmap size=40

[PATCH 4/4] crypto: caamhash: replace kmalloc with kzalloc

2015-02-27 Thread yanjiang.jin
From: Yanjiang Jin This can make sure we get a clean memory, else system would report the below warning: caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0xdeadbeefdeadbeef] [size=18446744073150512879 bytes] [ cut here

[PATCH 3/4] crypto: caamhash: add two missed dma_mapping_error

2015-02-27 Thread yanjiang.jin
From: Yanjiang Jin Add two missed dma_mapping_error() after dma_map_single(). Signed-off-by: Yanjiang Jin --- drivers/crypto/caam/caamhash.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index f347ab7..f6ad322

[PATCH 1/4] crypto: caam: fix some compile warnings

2015-02-27 Thread yanjiang.jin
From: Yanjiang Jin This commit is to avoid the below warnings: drivers/crypto/caam/sg_sw_sec4.h:88:12: warning: 'dma_map_sg_chained' defined but not used [-Wunused-function] static int dma_map_sg_chained(struct device *dev, struct scatterlist *sg, ^

[PATCH 4/4] crypto: caamhash: replace kmalloc with kzalloc

2015-02-27 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com This can make sure we get a clean memory, else system would report the below warning: caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0xdeadbeefdeadbeef] [size=18446744073150512879 bytes]

[PATCH 2/4] crypto: caam_rng: fix rng_unmap_ctx's DMA_UNMAP size problem

2015-02-27 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com Fix rng_unmap_ctx's DMA_UNMAP size problem for caam_rng, else system would report the below calltrace during kexec boot: caam_jr ffe301000.jr: DMA-API: device driver frees DMA memory with different size [device address=0x7f080010] [map

[PATCH 3/4] crypto: caamhash: add two missed dma_mapping_error

2015-02-27 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com Add two missed dma_mapping_error() after dma_map_single(). Signed-off-by: Yanjiang Jin yanjiang@windriver.com --- drivers/crypto/caam/caamhash.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/crypto/caam/caamhash.c

[PATCH 1/4] crypto: caam: fix some compile warnings

2015-02-27 Thread yanjiang.jin
From: Yanjiang Jin yanjiang@windriver.com This commit is to avoid the below warnings: drivers/crypto/caam/sg_sw_sec4.h:88:12: warning: 'dma_map_sg_chained' defined but not used [-Wunused-function] static int dma_map_sg_chained(struct device *dev, struct scatterlist *sg, ^