Re: KGDB panics on p2020 target

2014-01-20 Thread tiejun.chen
On 01/21/2014 02:04 PM, Arun Chandran wrote: On Mon, Jan 20, 2014 at 1:55 PM, "�tiejun.chen�" wrote: On 01/17/2014 03:52 PM, Arun Chandran wrote: Hi, I am testing kgdb on freescale p2020 target. In target 1) root@freescale-p2020ds:~# uname -a Linux freescale-p2020

Re: KGDB panics on p2020 target

2014-01-20 Thread tiejun.chen
On 01/17/2014 03:52 PM, Arun Chandran wrote: Hi, I am testing kgdb on freescale p2020 target. In target 1) root@freescale-p2020ds:~# uname -a Linux freescale-p2020ds 3.10.20-rt14+ #9 SMP Thu Jan 16 16:32:15 IST 2014 ppc GNU/Linux 2) root@freescale-p2020ds:~# cat /proc/cpuinfo pro

Re: powerpc/hugetlb: BUG: using smp_processor_id() in preemptible

2014-01-17 Thread tiejun.chen
On 01/17/2014 05:23 PM, Nikita Yushchenko wrote: Hi While running LTP hugeltb tests on freescale powerpc board, I'm getting [ 7253.637591] BUG: using smp_processor_id() in preemptible [ ] code: hugemmap01/9048 [ 7253.637601] caller is free_hugepd_range.constprop.25+0x88/0x1a8 [

Re: [RFC][PATCH] powerpc/CoreNet64: compile with CONFIG_E{5, 6}500_CPU well

2013-11-21 Thread tiejun.chen
On 11/21/2013 12:41 AM, Scott Wood wrote: On Wed, 2013-11-20 at 16:35 +0800, Tiejun Chen wrote: CONFIG_ALTIVEC is always enabled for CoreNet64. In the defconfig perhaps, but this isn't a generally true statement. Yes, but I think we should avoid this probable scenario :) And if we select

Re: [v6][PATCH 0/5] powerpc/book3e: powerpc/book3e: make kgdb to work well

2013-11-18 Thread tiejun.chen
On 10/23/2013 05:31 PM, Tiejun Chen wrote: Scott, Tested on fsl-p5040 DS. Scott, Any comments to this version? Tiejun v6: * rebase * change the C code to initialize the exception stack addresses in the PACA instead. * Clear the PACA_IRQ_HARD_DIS force to exit directly from this debug ex

Re: [v5][PATCH 1/6] powerpc/book3e: load critical/machine/debug exception stack

2013-10-23 Thread tiejun.chen
On 10/19/2013 07:55 AM, Scott Wood wrote: On Thu, 2013-06-20 at 18:28 +0800, Tiejun Chen wrote: We always alloc critical/machine/debug check exceptions. This is different from the normal exception. So we should load these exception stack properly like we did for booke. Signed-off-by: Tiejun Che

Re: [v5][PATCH 6/6] book3e/kgdb: Fix a single stgep case of lazy IRQ

2013-10-23 Thread tiejun.chen
On 10/19/2013 07:32 AM, Scott Wood wrote: On Thu, 2013-06-20 at 18:28 +0800, Tiejun Chen wrote: When we're in kgdb_singlestep(), we have to work around to get thread_info by copying from the kernel stack before calling kgdb_handle_exception(), then copying it back afterwards. But for PPC64, we

Re: [v5][PATCH 4/6] powerpc/book3e: support kgdb for kernel space

2013-10-23 Thread tiejun.chen
On 10/19/2013 06:58 AM, Scott Wood wrote: On Thu, 2013-06-20 at 18:28 +0800, Tiejun Chen wrote: Currently we need to skip this for supporting KGDB. Does it need to depend on CONFIG_KGDB? Either you've fixed the "can't quite save properly" part, or you haven't. I'm not 100% sure if my change

Re: [v5][PATCH 3/6] book3e/kgdb: update thread's dbcr0

2013-10-23 Thread tiejun.chen
On 10/19/2013 06:57 AM, Scott Wood wrote: On Thu, 2013-06-20 at 18:28 +0800, Tiejun Chen wrote: gdb always need to generate a single step properly to invoke a kgdb state. But with lazy interrupt, book3e can't always trigger a debug exception with a single step since the current is blocked for ha

Re: [v5][PATCH 1/6] powerpc/book3e: load critical/machine/debug exception stack

2013-10-23 Thread tiejun.chen
On 10/19/2013 06:37 AM, Scott Wood wrote: On Thu, 2013-06-20 at 18:28 +0800, Tiejun Chen wrote: We always alloc critical/machine/debug check exceptions. This is different from the normal exception. So we should load these exception stack properly like we did for booke. This is "booke". Do you

Re: [v5][PATCH 2/6] powerpc/book3e: store critical/machine/debug exception thread info

2013-10-23 Thread tiejun.chen
On 10/19/2013 06:43 AM, Scott Wood wrote: On Thu, 2013-06-20 at 18:28 +0800, Tiejun Chen wrote: We need to store thread info to these exception thread info like something we already did for PPC32. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S | 15 +++ 1

Re: [PATCH 3/6 v2] kvm: powerpc: allow guest control "G" attribute in mas2

2013-08-01 Thread tiejun.chen
On 08/01/2013 07:12 PM, Bharat Bhushan wrote: "G" bit in MAS2 indicates whether the page is Guarded. There is no reason to stop guest setting "E", so allow him. Could we merge patch 2 and 3 into only one. Tiejun Signed-off-by: Bharat Bhushan --- v1->v2 - no change arch/powerpc/kvm/e5

Re: [PATCH 5/6 v2] kvm: powerpc: booke: Add linux pte lookup like booke3s

2013-08-01 Thread tiejun.chen
On 08/01/2013 07:12 PM, Bharat Bhushan wrote: KVM need to lookup linux pte for getting TLB attributes (WIMGE). This is similar to how book3s does. This will be used in follow-up patches. Signed-off-by: Bharat Bhushan --- v1->v2 - This is a new change in this version arch/powerpc/include/as

Re: [PATCH 6/6 v2] kvm: powerpc: use caching attributes as per linux pte

2013-08-01 Thread tiejun.chen
On 08/01/2013 07:12 PM, Bharat Bhushan wrote: KVM uses same WIM tlb attributes as the corresponding qemu pte. For this we now search the linux pte for the requested page and get these cache caching/coherency attributes from pte. Signed-off-by: Bharat Bhushan --- v1->v2 - Use Linux pte for wim

Re: [v1][PATCH 1/1] KVM: PPC: disable preemption when using hard_irq_disable()

2013-07-10 Thread tiejun.chen
On 07/11/2013 03:15 AM, Scott Wood wrote: On 07/10/2013 01:02:19 AM, Tiejun Chen wrote: We should ensure the preemption cannot occur while calling get_paca() insdide hard_irq_disable(), otherwise the paca_struct may be the wrong one just after. And btw, we may update timing stats in this case.

Re: BUG: 32 Bit Kernel kexec hangs on P2020

2013-07-10 Thread tiejun.chen
On 07/10/2013 06:00 PM, Stefani Seibold wrote: Am Mittwoch, den 10.07.2013, 16:48 +0800 schrieb tiejun.chen: On 07/10/2013 04:39 PM, Stefani Seibold wrote: Hi, i have tried to kexec a 32 bit kernel on a Freescale P2020 dual core CPU (e500v2, revison 5.1 - pvr 8021 1051), but Kexec will hang

Re: [v3][PATCH 7/8] book3e/kexec/kdump: redefine VIRT_PHYS_OFFSET

2013-07-09 Thread tiejun.chen
On 07/10/2013 01:20 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Tiejun Chen Sent: Tuesday, July 09, 2013 1:33 PM To: b...@kernel.crashing.org Cc: linuxppc-dev@lists.ozla

Re: [v3][PATCH 1/8] powerpc/book3e: rename interrupt_end_book3e with __end_interrupts

2013-07-09 Thread tiejun.chen
On 07/10/2013 01:17 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Tiejun Chen Sent: Tuesday, July 09, 2013 1:33 PM To: b...@kernel.crashing.org Cc: linuxppc-dev@lists.ozla

Re: [v2][PATCH 1/7] powerpc/book3e: support CONFIG_RELOCATABLE

2013-07-09 Thread tiejun.chen
On 07/03/2013 07:52 PM, Sethi Varun-B16395 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+varun.sethi=freescale@lists.ozlabs.org] On Behalf Of Tiejun Chen Sent: Thursday, June 20, 2013 1:23 PM To: b...@kernel.crashing.org Cc: linuxppc-dev@lists.ozlabs.or

Re: [v2][PATCH 4/7] book3e/kexec/kdump: introduce a kexec kernel flag

2013-07-09 Thread tiejun.chen
On 07/02/2013 01:37 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Tiejun Chen Sent: Thursday, June 20, 2013 1:23 PM To: b...@kernel.crashing.org Cc: linuxppc-dev@lists.ozl

Re: [v2][PATCH 2/7] book3e/kexec/kdump: enable kexec for kernel

2013-07-09 Thread tiejun.chen
On 07/02/2013 01:17 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Tiejun Chen Sent: Thursday, June 20, 2013 1:23 PM To: b...@kernel.crashing.org Cc: linuxppc-dev@lists.ozl

Re: [v2][PATCH 1/7] powerpc/book3e: support CONFIG_RELOCATABLE

2013-07-09 Thread tiejun.chen
On 07/02/2013 01:00 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Tiejun Chen Sent: Thursday, June 20, 2013 1:23 PM To: b...@kernel.crashing.org Cc: linuxppc-dev@lists.ozl

Re: [PATCH 4/6 v5] KVM: PPC: exit to user space on "ehpriv" instruction

2013-06-26 Thread tiejun.chen
On 06/26/2013 04:44 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: tiejun.chen [mailto:tiejun.c...@windriver.com] Sent: Wednesday, June 26, 2013 12:25 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; k...@vger.kernel.org; ag...@suse.de; Wood Scott- B07421; b

Re: [PATCH 4/6 v5] KVM: PPC: exit to user space on "ehpriv" instruction

2013-06-25 Thread tiejun.chen
On 06/26/2013 01:42 PM, Bharat Bhushan wrote: "ehpriv" instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with "run->debug" have relevant information. As this is the first point we are using run->debug, also defined the run->debug st

Re: fsqrt

2013-06-07 Thread tiejun.chen
On 06/07/2013 04:53 PM, Benjamin Herrenschmidt wrote: On Fri, 2013-06-07 at 15:46 +0800, tiejun.chen wrote: On 06/07/2013 03:41 PM, Benjamin Herrenschmidt wrote: Another question... Do you guys happen to have a patch to emulate fsqrt in the kernel ? Seems this is already emulated: arch

Re: fsqrt

2013-06-07 Thread tiejun.chen
On 06/07/2013 03:41 PM, Benjamin Herrenschmidt wrote: Another question... Do you guys happen to have a patch to emulate fsqrt in the kernel ? Seems this is already emulated: arch/powerpc/math-emu/fsqrt.c You can enable CONFIG_MATH_EMULATION to try. Tiejun ___

Re: can't access PCIe card under sbc8548

2013-05-30 Thread tiejun.chen
On 05/31/2013 12:24 AM, Scott Wood wrote: On 05/30/2013 07:49:48 AM, wolfking wrote: tiejun.chen wrote > On 05/30/2013 03:32 PM, wolfking wrote: >> (continued) >>I traced the 8139too.c when it uses pci_iomap, the pci_iomap called >> the >> ioport_map. The differen

Re: can't access PCIe card under sbc8548

2013-05-30 Thread tiejun.chen
On 05/30/2013 03:32 PM, wolfking wrote: (continued) I traced the 8139too.c when it uses pci_iomap, the pci_iomap called the ioport_map. The difference between 8139 and my PCIe card lies in the "port" value : void __iomem *ioport_map(unsigned long port, unsigned int len) { return (void

Re: can't access PCIe card under sbc8548

2013-05-30 Thread tiejun.chen
On 05/30/2013 06:02 PM, wolfking wrote: I tried several R/W functions: inb/outb and ioread8/iowrite8. The inb/outb What about out_be32/in_be32? Tiejun ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linux

Re: can't access PCIe card under sbc8548

2013-05-30 Thread tiejun.chen
On 05/30/2013 05:15 PM, wolfking wrote: hi, tiejun.chen: When I use ioremap, the card seems to work fine. That is, I can access Yes, ioremap() should work for MMIO. part of all register. My PCIe card is a rs232 expand card, it has some standard UART register, for example the SCR(scratch

Re: can't access PCIe card under sbc8548

2013-05-30 Thread tiejun.chen
On 05/30/2013 03:19 PM, wolfking wrote: hi, tiejun.chen: Thanks for replying. I tried to use ioremap too, but it doesn't work. The ioport_map method What happened? Tiejun ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

Re: can't access PCIe card under sbc8548

2013-05-29 Thread tiejun.chen
On 05/30/2013 11:42 AM, wolfking wrote: hi, all I'm doing some developing on the windriver's sbc8548 board. The kernel I use is 3.6.10 and the u-boot version is 2012-10. I changed the board's configuration: the board now boot from the 64MB SODIMM Flash (not the default 8MB on-board Flash memor

Re: [PATCH] powerpc/32bit, PREEMPT:Load TI_FLAGS to check NEED_RESCHED

2013-05-27 Thread tiejun.chen
On 05/27/2013 02:55 PM, Jain Priyanka-B32167 wrote: If we go some more lines up in the same file, the code is resume_kernel: /* check current_thread_info, _TIF_EMULATE_STACK_STORE */ CURRENT_THREAD_INFO(r9, r1) lwz r8,TI_FLAGS(r9) andis. r8,r8,_TIF_EMULA

Re: [PATCH] powerpc/32bit, PREEMPT:Load TI_FLAGS to check NEED_RESCHED

2013-05-26 Thread tiejun.chen
On 05/27/2013 02:27 PM, Priyanka Jain wrote: Add instruction to load TI_FLAGS in r8 While returning from exception handling in case of PREEMPT enabled, _TIF_NEED_RESCHED bit is checked in TI_FLAGS (thread_info flag) of current task. Only if this bit is set, it should continue with the process of

Re: [PATCH v4 06/12] ARM: dove: add gigabit ethernet and mvmdio device tree nodes

2013-05-22 Thread tiejun.chen
On 05/22/2013 05:43 PM, Sebastian Hesselbarth wrote: On 05/21/2013 07:48 PM, Andrew Lunn wrote: On Tue, May 21, 2013 at 06:41:44PM +0200, Sebastian Hesselbarth wrote: This patch adds orion-eth and mvmdio device tree nodes for DT enabled Dove boards. As there is only one ethernet controller on D

Re: SATA FSL and upstreaming

2013-05-15 Thread tiejun.chen
On 05/16/2013 02:53 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-16 at 06:49 +, Zang Roy-R61911 wrote: Please also provide a RCW binary to Ben, if your guys insist updating the RCW. right, I just noticed it's ascii :-) That isn't going to work well... Ben, I already send my wo

Re: SATA FSL and upstreaming

2013-05-15 Thread tiejun.chen
On 05/16/2013 02:40 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-16 at 14:35 +0800, tiejun.chen wrote: On 05/16/2013 02:21 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-16 at 14:17 +0800, tiejun.chen wrote: I think you can use Bharat's RCW, which seems RR_HXAPNSP_0x36, then p

Re: SATA FSL and upstreaming

2013-05-15 Thread tiejun.chen
On 05/16/2013 02:37 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-16 at 06:33 +, Bhushan Bharat-R65777 wrote: protect off 0xec00 +$filesize; erase 0xec00 +$filesize; cp.b 0x100 0xec00 $filesize BTW, is it normal that the network in uboot is *extremely* unreliable ? We

Re: SATA FSL and upstreaming

2013-05-15 Thread tiejun.chen
On 05/16/2013 02:21 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-16 at 14:17 +0800, tiejun.chen wrote: I think you can use Bharat's RCW, which seems RR_HXAPNSP_0x36, then please take a look at this: Ok, how do I update my RCW to bse Bharat's ? Firstly please check which fla

Re: SATA FSL and upstreaming

2013-05-15 Thread tiejun.chen
On 05/16/2013 02:20 PM, Zang Roy-R61911 wrote: -Original Message- From: tiejun.chen [mailto:tiejun.c...@windriver.com] Sent: Thursday, May 16, 2013 2:18 PM To: Benjamin Herrenschmidt Cc: Zang Roy-R61911; Liu Qiang-B32616; Fleming Andy-AFLEMING; linuxppc- d...@lists.ozlabs.org; Xie

Re: SATA FSL and upstreaming

2013-05-15 Thread tiejun.chen
On 05/16/2013 02:09 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-16 at 06:05 +, Zang Roy-R61911 wrote: I do not suggest changing the RCW. If the RCW is broken on Ben's side, it is not easy to recover for him. Let's check the U-boot output first. U-Boot 2013.01-9-g7bcd7f4 (Mar 14 2

Re: SATA FSL and upstreaming

2013-05-15 Thread tiejun.chen
On 05/16/2013 01:45 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-16 at 14:47 +1000, Benjamin Herrenschmidt wrote: Hi folks ! So I was trying to use my 5020ds to test some stuff today. Since I hadn't used it in a while, I decided to "upgrade" it to the latest NOR etc... On another note, I

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-12 Thread tiejun.chen
On 05/11/2013 03:39 AM, Alexander Graf wrote: Am 10.05.2013 um 21:22 schrieb Scott Wood : On 05/10/2013 12:57:33 PM, Alexander Graf wrote: Could you guys please collect performance data during the next weeks on both guest-directed ISIs as well as VF MMIOs (preferably with in-kernel MMIO), s

Re: [PATCH v2 4/4] kvm/ppc: IRQ disabling cleanup

2013-05-09 Thread tiejun.chen
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 4e05f8c..f8659aa 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -64,12 +64,14 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) { int r = 1; - WARN_ON_ONCE(!irqs_disabled())

Re: [PATCH v2 3/4] kvm/ppc: Call trace_hardirqs_on before entry

2013-05-09 Thread tiejun.chen
On 05/10/2013 11:34 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Scott Wood Sent: Friday, May 10, 2013 8:40 AM To: Alexander Graf; Benjamin Herrenschmidt Cc: kvm-...@vger.kernel.org; k...@vger.kernel

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-09 Thread tiejun.chen
On 05/09/2013 07:34 PM, Caraman Mihai Claudiu-B02008 wrote: VF stands for virtualization fault see MAS8[VF] and we may use it for virtualized Looks KVM PPC have no this mechanism currently since I don't find MAS8_VF is used in kernel, right? Yes but 'we may use it' in the feature, I have a fu

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 07:21 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: tiejun.chen [mailto:tiejun.c...@windriver.com] Sent: Thursday, May 09, 2013 3:48 PM To: Bhushan Bharat-R65777 Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- d...@lists.ozlabs.org; ag

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-09 Thread tiejun.chen
On 05/08/2013 05:28 PM, tiejun.chen wrote: On 05/08/2013 05:20 PM, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of tiejun.chen Sent: Wednesday, May 08, 2013 4:54 AM To: Wood Scott-B07421 Cc: ag

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 06:00 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: tiejun.chen [mailto:tiejun.c...@windriver.com] Sent: Thursday, May 09, 2013 3:15 PM To: Bhushan Bharat-R65777 Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- d...@lists.ozlabs.org; ag

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 04:23 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Caraman Mihai Claudiu-B02008 Sent: Wednesday, May 08, 2013 6:44 PM To: Wood Scott-B07421; tiejun.chen Cc

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 04:12 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Kevin Hao [mailto:haoke...@gmail.com] Sent: Thursday, May 09, 2013 1:38 PM To: Bhushan Bharat-R65777 Cc: tiejun.chen; Caraman Mihai Claudiu-B02008; k...@vger.kernel.org; Wood Scott- B07421; ag...@suse.de

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 03:51 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: tiejun.chen [mailto:tiejun.c...@windriver.com] Sent: Thursday, May 09, 2013 1:18 PM To: Bhushan Bharat-R65777 Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- d...@lists.ozlabs.org; ag

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 03:33 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Caraman Mihai Claudiu-B02008 Sent: Wednesday, May 08, 2013 6:44 PM To: Wood Scott-B07421; tiejun.chen Cc

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-08 Thread tiejun.chen
On 05/08/2013 05:20 PM, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of tiejun.chen Sent: Wednesday, May 08, 2013 4:54 AM To: Wood Scott-B07421 Cc: ag...@suse.de; kvm-...@vger.kernel.org; k

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-07 Thread tiejun.chen
On 05/08/2013 07:40 AM, Scott Wood wrote: On 05/07/2013 06:06:30 AM, Tiejun Chen wrote: We also can direct ISI exception to Guest like DSI. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke_emulate.c |3 +++ arch/powerpc/kvm/e500mc.c|3 ++- 2 files changed, 5 insertions(+)

Re: [v1][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with E500MC

2013-05-07 Thread tiejun.chen
On 05/07/2013 09:33 AM, tiejun.chen wrote: On 05/06/2013 10:58 PM, Alexander Graf wrote: On 05/06/2013 04:53 AM, Tiejun Chen wrote: Actually E500MC also support doorbell exception, and CONFIG_PPC_E500MC can cover BOOK3E/BOOK3E_64 as well. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm

Re: [PATCH] powerpc: Make hard_irq_disable() do the right thing vs. irq tracing

2013-05-07 Thread tiejun.chen
On 05/07/2013 03:04 PM, Benjamin Herrenschmidt wrote: If hard_irq_disable() is called while interrupts are already soft-disabled (which is the most common case) all is already well. However you can (and in some cases want) to call it while everything is enabled (to make sure you don't get a lazy

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-06 Thread tiejun.chen
On 05/07/2013 10:06 AM, Scott Wood wrote: On 05/06/2013 08:56:25 PM, tiejun.chen wrote: On 05/07/2013 07:50 AM, Scott Wood wrote: On 05/05/2013 10:13:17 PM, tiejun.chen wrote: On 05/06/2013 11:10 AM, Tiejun Chen wrote: For the external interrupt, the decrementer exception and the doorbell

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-06 Thread tiejun.chen
On 05/07/2013 07:50 AM, Scott Wood wrote: On 05/05/2013 10:13:17 PM, tiejun.chen wrote: On 05/06/2013 11:10 AM, Tiejun Chen wrote: For the external interrupt, the decrementer exception and the doorbell excpetion, we also need to soft-disable interrupts while doing as host interrupt handlers

Re: [v1][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with E500MC

2013-05-06 Thread tiejun.chen
On 05/06/2013 10:58 PM, Alexander Graf wrote: On 05/06/2013 04:53 AM, Tiejun Chen wrote: Actually E500MC also support doorbell exception, and CONFIG_PPC_E500MC can cover BOOK3E/BOOK3E_64 as well. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke.c |2 +- 1 file changed, 1 insertion(+

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-05 Thread tiejun.chen
On 05/06/2013 11:10 AM, Tiejun Chen wrote: For the external interrupt, the decrementer exception and the doorbell excpetion, we also need to soft-disable interrupts while doing as host interrupt handlers since the DO_KVM hook is always performed to skip EXCEPTION_COMMON then miss this original ch

Re: [PATCH 1/1] kvm:book3e: Fix a build error

2013-04-25 Thread tiejun.chen
On 04/25/2013 08:11 PM, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Tiejun Chen Sent: Thursday, April 25, 2013 2:46 PM To: ga...@kernel.crashing.org Cc: linuxppc-dev@lists.ozlabs.org; kvm-.

Re: [PATCH 1/1] usb: ehci-fsl: set INCR8 mode only on MPC512x

2013-04-23 Thread tiejun.chen
On 04/24/2013 01:55 PM, Anatolij Gustschin wrote: On Wed, 24 Apr 2013 10:55:10 +0800 Tiejun Chen wrote: commit 761bbcb7, "usb: ehci-fsl: set INCR8 mode for system bus interface on MPC512x", introduced to fix one MPC5121e (M36P) Errata by setting INCR8 mode for system bus interface on MPC512x,

Re: [PATCH 1/1] usb: ehci-fsl: set INCR8 mode only on MPC512x

2013-04-23 Thread tiejun.chen
Sorry, please ignore this temporarily since looks this is already covered in tree. I will look further into this to send another version. Tiejun On 04/24/2013 10:55 AM, Tiejun Chen wrote: commit 761bbcb7, "usb: ehci-fsl: set INCR8 mode for system bus interface on MPC512x", introduced to fix o

Re: [PATCH] powerpc: add a missing label in resume_kernel

2013-04-10 Thread tiejun.chen
On 04/10/2013 04:31 PM, Kevin Hao wrote: A label 0 was missed in the patch a9c4e541 (powerpc/kprobe: Complete kprobe and migrate exception frame). This will cause the kernel branch to an undetermined address if there really has a conflict when updating the thread flags. Signed-off-by: Kevin Hao

Re: [PATCH]->[PATCH v2] kgdb: Removed kmalloc returned value cast

2013-03-11 Thread tiejun.chen
On 03/11/2013 09:33 AM, tiejun.chen wrote: On 03/11/2013 06:39 AM, Alex Grad wrote: While at it, check kmalloc return value. Signed-off-by: Alex Grad --- arch/powerpc/kernel/kgdb.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/kgdb.c b/arch

Re: [PATCH]->[PATCH v2] kgdb: Removed kmalloc returned value cast

2013-03-10 Thread tiejun.chen
On 03/11/2013 06:39 AM, Alex Grad wrote: While at it, check kmalloc return value. Signed-off-by: Alex Grad --- arch/powerpc/kernel/kgdb.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index 5ca82cd..9e81dd8

Re: [v3][PATCH 0/6] powerpc/book3e: make kgdb to work well

2013-02-26 Thread tiejun.chen
On 02/27/2013 11:04 AM, Tiejun Chen wrote: This patchset is used to support kgdb/gdb on book3e. Validated on p4080ds and p5040ds with test single step and breakpoint Please ignore this thread since looks I'm missing to CC Jason :( Tiejun v3: * make work when enable CONFIG_RELOCATABLE * fi

Re: [PATCH] powerpc: kernel/kgdb.c: fix memory leakage

2013-02-26 Thread tiejun.chen
On 02/08/2013 10:41 AM, Benjamin Herrenschmidt wrote: On Thu, 2013-01-31 at 20:04 -0600, Jason Wessel wrote: diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index 8747447..5ca82cd 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c @@ -154,12 +154,12 @@

Re: [RFC][v0][PATCH 1/1] ppc64: ignore interrupts while offline

2013-01-15 Thread tiejun.chen
Please ignore this to check next version. Tiejun On 01/15/2013 06:31 PM, Tiejun Chen wrote: With lazy interrupt, some implementations of hotplug will get some interrupts even while offline, just ignore these. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/irq.c |6 ++ 1 file ch

Re: [v1][PATCH 3/6] book3e/kgdb: update thread's dbcr0

2012-12-20 Thread tiejun.chen
On 12/21/2012 02:41 AM, Kumar Gala wrote: On Dec 20, 2012, at 3:08 AM, Tiejun Chen wrote: gdb always need to generate a single step properly to invoke a kgdb state. But with lazy interrupt, book3e can't always trigger a debug exception with a single step since the current is blocked for handli

Re: [PATCH 1/3] powerpc/book3e: load critical/machine/debug exception stack

2012-12-20 Thread tiejun.chen
On 12/19/2012 06:10 AM, Tabi Timur-B04825 wrote: On Thu, Oct 25, 2012 at 1:43 AM, Tiejun Chen wrote: We always alloc critical/machine/debug check exceptions. This is different from the normal exception. So we should load these exception stack properly like we did for booke. Tiejun, I'm a lit

Re: [v2][PATCH 1/2] powerpc/kgdb: Fix a single stgep case of lazy IRQ

2012-10-23 Thread tiejun.chen
Please ignore v2 temporarily since I have to correct something lately. Sorry for any inconvenience. Tiejun On 10/18/2012 10:47 AM, Tiejun Chen wrote: When we're in kgdb_singlestep(), we have to work around to get thread_info by copying from the kernel stack before calling kgdb_handle_exceptio

Re: [PATCH 2/2] PPC_BOOK3E/KGDB: support kgdb kernel space

2012-10-17 Thread tiejun.chen
On 10/17/2012 08:07 PM, Andreas Schwab wrote: Tiejun Chen writes: diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 4684e33..ed5862d 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S @@ -539,11 +539,15 @@

Re: [v5][PATCH 2/3] powerpc/kprobe: complete kprobe and migrate exception frame

2012-09-17 Thread tiejun.chen
On 09/18/2012 01:09 PM, Benjamin Herrenschmidt wrote: On Tue, 2012-09-18 at 15:05 +1000, Benjamin Herrenschmidt wrote: On Mon, 2012-09-17 at 17:54 +0800, Tiejun Chen wrote: -#ifdef CONFIG_PREEMPT b restore /* N.B. the only way to get here is from the beq following ret_from_exce

Re: [v5][PATCH 2/3] powerpc/kprobe: complete kprobe and migrate exception frame

2012-09-17 Thread tiejun.chen
On 09/17/2012 06:02 PM, David Laight wrote: /* N.B. the only way to get here is from the beq following ret_from_except. */ resume_kernel: - /* check current_thread_info->preempt_count */ + /* check current_thread_info, _TIF_EMULATE_STACK_STORE */ CURRENT_THREAD_INFO(r9, r1

Re: [v3][PATCH 2/3] ppc/kprobe: complete kprobe and migrate exception frame

2012-09-13 Thread tiejun.chen
On 09/12/2012 06:38 PM, Benjamin Herrenschmidt wrote: On Wed, 2012-09-12 at 16:55 +0800, tiejun.chen wrote: to worry about nor stack frame to create etc... If you don't like this v4, let me know and then I can go back memcpy for next version. Just open code the whole copy. It should be

Re: [v3][PATCH 2/3] ppc/kprobe: complete kprobe and migrate exception frame

2012-09-12 Thread tiejun.chen
On 09/12/2012 04:43 PM, Benjamin Herrenschmidt wrote: On Wed, 2012-09-12 at 16:38 +0800, tiejun.chen wrote: So you need to store that old r1 somewhere fist then retrieve it after the memcpy call. That or open-code the memcpy to avoid all the clobbering problems. Maybe we can use

Re: [v3][PATCH 2/3] ppc/kprobe: complete kprobe and migrate exception frame

2012-09-12 Thread tiejun.chen
On 09/11/2012 01:51 PM, Benjamin Herrenschmidt wrote: On Tue, 2012-09-11 at 10:20 +0800, Tiejun Chen wrote: We can't emulate stwu since that may corrupt current exception stack. So we will have to do real store operation in the exception return code. Firstly we'll allocate a trampoline exceptio

Re: [v2][PATCH 3/3] powerpc/kgdb: restore current_thread_info properly

2012-08-22 Thread tiejun.chen
On 08/23/2012 11:14 AM, Nicholas A. Bellinger wrote: > On Thu, 2012-08-23 at 10:10 +0800, Tiejun Chen wrote: >> For powerpc BooKE and e200, singlestep is handled on the critical/dbg >> exception stack. This causes current_thread_info() to fail for kgdb >> internal, so previously We work around this

Re: [PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered

2012-08-22 Thread tiejun.chen
On 08/22/2012 11:07 PM, Tabi Timur-B04825 wrote: > On Wed, Aug 22, 2012 at 5:43 AM, Tiejun Chen > wrote: > >> +int kgdb_skipexception(int exception, struct pt_regs *regs) >> +{ >> + if (kgdb_isremovedbreak(regs->nip)) >> + return 1; >> + >> + return 0; >> +} > > int kg

Re: [PATCH 1/1] booke/wdt: fix incorrect WDIOC_GETSUPPORT return path

2012-08-06 Thread tiejun.chen
On 08/07/2012 09:19 AM, Tabi Timur-B04825 wrote: > On Mon, Aug 6, 2012 at 2:12 PM, Tabi Timur-B04825 > wrote: >> On Mon, Jul 30, 2012 at 3:15 AM, Tiejun Chen >> wrote: >>> We miss that correct WDIOC_GETSUPPORT return path when perform >>> copy_to_user() properly. >> >> Thanks for catching this.

Re: [PATCH 1/1] booke/wdt: fix incorrect WDIOC_GETSUPPORT return path

2012-08-05 Thread tiejun.chen
On 07/30/2012 04:15 PM, Tiejun Chen wrote: > We miss that correct WDIOC_GETSUPPORT return path when perform > copy_to_user() properly. Any comments? Thanks Tiejun > > Signed-off-by: Tiejun Chen > --- > drivers/watchdog/booke_wdt.c |7 --- > 1 files changed, 4 insertions(+), 3 deletion

Re: [PATCH 1/1] powerpc: add "memory" attribute for mfmsr()

2012-07-10 Thread tiejun.chen
On 07/10/2012 04:22 PM, tiejun.chen wrote: > On 07/10/2012 04:19 PM, Benjamin Herrenschmidt wrote: >> On Tue, 2012-07-10 at 15:59 +0800, Tiejun Chen wrote: >>> Add "memory" attribute in inline assembly language as a compiler >>> barrier to make sure 4.6.x GC

Re: [PATCH 1/1] powerpc: add "memory" attribute for mfmsr()

2012-07-10 Thread tiejun.chen
On 07/10/2012 04:19 PM, Benjamin Herrenschmidt wrote: > On Tue, 2012-07-10 at 15:59 +0800, Tiejun Chen wrote: >> Add "memory" attribute in inline assembly language as a compiler >> barrier to make sure 4.6.x GCC don't reorder mfmsr(). > > Out of curiosity, did you see a case where it was re-ordere

Re: [v3 PATCH 3/3] ppc32/kprobe: don't emulate store when kprobe stwu r1

2012-06-03 Thread tiejun.chen
On 06/03/2012 02:59 PM, tiejun.chen wrote: > On 06/03/2012 01:07 PM, Tiejun Chen wrote: >> We don't do the real store operation for kprobing 'stwu Rx,(y)R1' >> since this may corrupt the exception frame, now we will do this >> operation safely in excepti

Re: [v3 PATCH 3/3] ppc32/kprobe: don't emulate store when kprobe stwu r1

2012-06-03 Thread tiejun.chen
On 06/03/2012 01:07 PM, Tiejun Chen wrote: > We don't do the real store operation for kprobing 'stwu Rx,(y)R1' > since this may corrupt the exception frame, now we will do this > operation safely in exception return code after migrate current > exception frame below the kprobed function stack. > >

Re: [v3 PATCH 0/3] ppc32/kprobe: Fix a bug for kprobe stwu r1

2012-06-02 Thread tiejun.chen
On 06/03/2012 01:07 PM, Tiejun Chen wrote: > Changes from V2: > > * populate those existed codes to reorganize codes > * add check if we'll trigger kernel stack over flow BTW, I always validate this on mpc8536ds(UP)/mpc8572ds(SMP) with/without CONFIG_PREEMPT. Tiejun > > Changes from V1: > > *

Re: [PATCH v2 2/3] ppc32/kprobe: complete kprobe and migrate exception frame

2012-06-02 Thread tiejun.chen
On 05/10/2012 11:50 AM, Benjamin Herrenschmidt wrote: > On Thu, 2011-12-15 at 19:00 +0800, Tiejun Chen wrote: >> We can't emulate stwu since that may corrupt current exception stack. >> So we will have to do real store operation in the exception return code. >> >> Firstly we'll allocate a trampolin

Re: How to make a memory region to be cache disabled ? Cpu is mpc82XX or mpc83XX.

2012-03-13 Thread tiejun.chen
hellohello wrote: > How to make a memory region to be cache disabled in linux? > I'm porting mpc83XX from vxworks to linux. Now meet a question: Cpu use a > memory region (GPCM mode of bus) to access peripherals, we need this memory > to be cache disabled. > Linux Kernel is 2.6.25. > Thanks ver

Re: [PATCH 13/38] KVM: PPC: booke: category E.HV (GS-mode) support

2012-03-05 Thread tiejun.chen
>> +/* >> + * Host interrupt handlers may have clobbered these guest-readable >> + * SPRGs, so we need to reload them here with the guest's values. >> + */ >> +lwz r3, VCPU_VRSAVE(r4) >> +lwz r5, VCPU_SHARED_SPRG4(r11) >> +mtspr SPRN_VRSAVE, r3 >> +lwz

Re: [PATCH v5 3/4] KVM: PPC: epapr: install ev_idle hcall for e500 guest

2012-02-21 Thread tiejun.chen
Liu Yu-B13201 wrote: > >> -Original Message- >> From: tiejun.chen [mailto:tiejun.c...@windriver.com] >> Sent: Tuesday, February 21, 2012 6:54 PM >> To: Liu Yu-B13201 >> Cc: ag...@suse.de; kvm-...@vger.kernel.org; k...@vger.kernel.org; >> lin

Re: [PATCH v5 3/4] KVM: PPC: epapr: install ev_idle hcall for e500 guest

2012-02-21 Thread tiejun.chen
Liu Yu wrote: > If the guest hypervisor node contains "has-idle" property. > > Signed-off-by: Liu Yu > --- > v5: no change > > arch/powerpc/kernel/epapr_hcalls.S | 29 + > arch/powerpc/kernel/epapr_paravirt.c | 11 ++- > 2 files changed, 39 insertions(+

Re: Problem in getting shared memory access on P1022RDK

2012-01-28 Thread tiejun.chen
f possible? And did you try this flag 'O_SYNC'? Tiejun > I have modified dump_tlb_book3e function (found in arch/powerpc/xmon/xmon.c) > function for BookE MMU to dump TLB entries. > > Regards, > Farrukh Arshad > > > -Original Message- > From: t

Re: Problem in getting shared memory access on P1022RDK

2012-01-12 Thread tiejun.chen
Arshad, Farrukh wrote: > Adding more it, > > I have removed the shared memory kernel driver dependency just to narrow down > the problem area and I have written a small piece of code in user space. A > writer & a reader application which access the shared memory and I got the > same behavior a

Re: [PATCH v2 0/3] ppc32/kprobe: Fix a bug for kprobe stwu r1

2012-01-10 Thread tiejun.chen
Tiejun Chen wrote: > Changes from V1: > > * use memcpy simply to withdraw copy_exc_stack > * add !(regs->msr & MSR_PR)) and > WARN_ON(test_thread_flag(TIF_EMULATE_STACK_STORE)); > to make sure we're in goot path. > * move this migration process inside 'restore' > * clear TIF flag atomicall

Re: Problem in getting shared memory access on P1022RDK

2012-01-04 Thread tiejun.chen
Arshad, Farrukh wrote: > How can I verify if the memory mapped is coherent on both cores. My memory > partitioning is given below > > Core Base AddressSize > Core 00x, 0x1000, --> > CONFIG_PHYSICAL_START = bootm_low = Base Address

Re: Kernel not booting when supplying boot parameter mem

2011-12-27 Thread tiejun.chen
Arshad, Farrukh wrote: > Hi Tiejun, > > Thanks for your response. Yes, I am running two kernels one on each core in > SAMP configuration on P1022RDK board. Given is my memory partitioning. Core 0 > is loading fine but Core 1 is not loading. CONFIG_RELOCATABLE is not set. > > ---

Re: Kernel not booting when supplying boot parameter mem

2011-12-27 Thread tiejun.chen
Arshad, Farrukh wrote: > Greetings All, > > I have a basic question. I have 512 MB memory. I want my kernel to use only > last 128 MB of memory starting from address 0x1000. I have configured the > kernel CONFIG_PHYSICAL_START=0x1000 and in kernel boot parameter I have > set mem=128M. I

Re: Linux port availability for p5010 processor

2011-12-15 Thread tiejun.chen
Vineeth wrote: > found p5020_ds.c in platforms/85xx; > why is it a part of 85xx directory ? the core of P5020 is E5500 where the > core of 85xx is e500; > e5500 is e500mc-64bit Power Architecture core. > Do we have the processor initialization code (start.S, head.S) files, port > available with

  1   2   >