[v2 PATCH] powerpc: hugetlb: replace __get_cpu_var with get_cpu_var

2014-01-20 Thread Tiejun Chen
[ 7253.637682] [cb049f40] [c000ef88] ret_from_syscall+0x0/0x3c [ 7253.637686] --- Exception: c01 at 0xff16004 Signed-off-by: Tiejun Chen --- v2: Just fix some style problems. arch/powerpc/mm/hugetlbpage.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm

[PATCH] powerpc: 85xx: EDAC PCI: request irq as IRQF_SHARED

2014-01-20 Thread Tiejun Chen
fb14c] aer_service_init+0x28/0x38 [ee063e90] [c0002468] do_one_initcall+0x158/0x1b0 [ee063f00] [c06e291c] kernel_init_freeable+0x128/0x1d4 [ee063f30] [c0002ac4] kernel_init+0x14/0x130 [ee063f40] [c000f84c] ret_from_kernel_thread+0x5c/0x64 aer: probe of 0001:02:00.0:pcie02 failed with error -16 Signed-off-by: Tiejun

[PATCH] powerpc: 85xx: EDAC PCI: request irq as IRQF_SHARED

2014-01-20 Thread Tiejun Chen
fb14c] aer_service_init+0x28/0x38 [ee063e90] [c0002468] do_one_initcall+0x158/0x1b0 [ee063f00] [c06e291c] kernel_init_freeable+0x128/0x1d4 [ee063f30] [c0002ac4] kernel_init+0x14/0x130 [ee063f40] [c000f84c] ret_from_kernel_thread+0x5c/0x64 aer: probe of 0001:02:00.0:pcie02 failed with error -16 Signed-off-by: Tiejun

[PATCH] powerpc: hugetlb: replace __get_cpu_var with get_cpu_var

2014-01-20 Thread Tiejun Chen
[ 7253.637682] [cb049f40] [c000ef88] ret_from_syscall+0x0/0x3c [ 7253.637686] --- Exception: c01 at 0xff16004 Signed-off-by: Tiejun Chen --- arch/powerpc/mm/hugetlbpage.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm

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

2013-11-21 Thread Tiejun Chen
:1:0: error: AltiVec not supported in this target make[1]: *** [arch/powerpc/lib/xor_vmx.o] Error 1 make: *** [arch/powerpc/lib] Error 2 So we should restrict e500mc64 in altivec scenario. Signed-off-by: Tiejun Chen --- arch/powerpc/Makefile |5 + 1 file changed, 5 insertions

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

2013-11-20 Thread Tiejun Chen
this target make[1]: *** [arch/powerpc/lib/xor_vmx.o] Error 1 make: *** [arch/powerpc/lib] Error 2 Signed-off-by: Tiejun Chen --- arch/powerpc/lib/Makefile |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index 95a20e1..641a77d 100644

[v6][PATCH 5/5] powerpc/book3e/kgdb: Fix a single stgep case of lazy IRQ

2013-10-23 Thread Tiejun Chen
In lazy EE magic, we may have a lazy interrupt occured while entering kgdb, but we really don't want to replay that interrupt for kgdb, so we have to clear the PACA_IRQ_HARD_DIS force to make sure we can exit directly from this debug exception. Signed-off-by: Tiejun Chen --- arch/powerpc/k

[v6][PATCH 4/5] powerpc/kgdb: use DEFINE_PER_CPU to allocate kgdb's thread_info

2013-10-23 Thread Tiejun Chen
Use DEFINE_PER_CPU to allocate thread_info statically instead of kmalloc(). This can avoid introducing more memory check codes. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/kgdb.c b/arch

[v6][PATCH 3/5] powerpc/book3e: support kgdb for kernel space

2013-10-23 Thread Tiejun Chen
Currently we need to skip this for supporting KGDB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index a55cf62..0b750c6

[v6][PATCH 2/5] powerpc/book3e: store crit/mc/dbg exception thread info

2013-10-23 Thread Tiejun Chen
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 | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/exceptions

[v6][PATCH 1/5] powerpc/book3e: initialize crit/mc/dbg kernel stack pointers

2013-10-23 Thread Tiejun Chen
We already allocated critical/machine/debug check exceptions, but we also should initialize those associated kernel stack pointers for use by special exceptions in the PACA. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/setup_64.c | 18 -- 1 file changed, 12 insertions

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

2013-10-23 Thread Tiejun Chen
we need to replay an interrupt, we shouldn't restore that previous backup thread info to make sure we can replay an interrupt lately with a proper thread info. * rebase latest powerpc git tree v0: This patchset is used to support kgdb for book3e. ------

[v1][PATCH 1/1] powerpc/ppc64: rename SOFT_DISABLE_INTS with RECONCILE_IRQ_STATE

2013-07-15 Thread Tiejun Chen
The SOFT_DISABLE_INTS seems an odd name for something that updates the software state to be consistent with interrupts being hard disabled, so rename SOFT_DISABLE_INTS with RECONCILE_IRQ_STATE to avoid this confusion. Signed-off-by: Tiejun Chen --- Ben, Looks currently RECONCILE_IRQ_STATE is

[v1][PATCH 1/1] powerpc: to access local paca after hard irq disabled

2013-07-14 Thread Tiejun Chen
We can access paca directly after hard interrupt disabled, and this can avoid accessing wrong paca when using get_paca() in preempt case. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/hw_irq.h |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc

[v3][PATCH 8/8] book3e/kexec/kdump: recover "r4 = 0" to create the initial TLB

2013-07-09 Thread Tiejun Chen
ore already exists so we still should set r4 with 0 to create that initial TLB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/head_64.S |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 0b46c9d..d546c5e 100644 --- a

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

2013-07-09 Thread Tiejun Chen
Book3e is always aligned 1GB to create TLB so we should use (KERNELBASE - MEMORY_START) as VIRT_PHYS_OFFSET to get __pa/__va properly while boot kdump. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/page.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include

[v3][PATCH 6/8] book3e/kexec/kdump: implement ppc64 kexec specfic

2013-07-09 Thread Tiejun Chen
ppc64 kexec mechanism has a different implementation with ppc32. Signed-off-by: Tiejun Chen --- arch/powerpc/platforms/85xx/smp.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index 14d461b..d862808

[v3][PATCH 5/8] book3e/kexec/kdump: introduce a kexec kernel flag

2013-07-09 Thread Tiejun Chen
ned-off-by: Tiejun Chen --- arch/powerpc/include/asm/smp.h|1 + arch/powerpc/kernel/head_64.S | 10 ++ arch/powerpc/kernel/misc_64.S |6 ++ arch/powerpc/platforms/85xx/smp.c | 20 +++- 4 files changed, 32 insertions(+), 5 deletions(-) diff --

[v3][PATCH 4/8] book3e/kexec/kdump: create a 1:1 TLB mapping

2013-07-09 Thread Tiejun Chen
book3e have no real MMU mode so we have to create a 1:1 TLB mapping to make sure we can access the real physical address. And correct something to support this pseudo real mode on book3e. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/head_64.S |9 --- arch/powerpc/kernel/misc_64.S

[v3][PATCH 3/8] book3e/kexec/kdump: enable kexec for kernel

2013-07-09 Thread Tiejun Chen
We need to active KEXEC for book3e and bypass or convert non-book3e stuff in kexec coverage. Signed-off-by: Tiejun Chen --- arch/powerpc/Kconfig |2 +- arch/powerpc/kernel/machine_kexec_64.c | 148 ++-- arch/powerpc/kernel/misc_64.S

[v3][PATCH 2/8] powerpc/book3e: support CONFIG_RELOCATABLE

2013-07-09 Thread Tiejun Chen
after .relocate. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/exception-64e.h | 11 +++ arch/powerpc/kernel/exceptions-64e.S | 18 +- arch/powerpc/kernel/head_64.S| 25 + 3 files changed, 53 insertions(+), 1 deletion

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

2013-07-09 Thread Tiejun Chen
We can rename 'interrupt_end_book3e' with '__end_interrupts' then book3s/book3e can share this unique label to make sure we can use this conveniently. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S |8 1 file changed, 4 insertions(+), 4 dele

[v3][PATCH 0/8] powerpc/book3e: support kexec and kdump

2013-07-09 Thread Tiejun Chen
t; * clean "book3e/kexec/kdump: introduce a kexec kernel flag" v2: * rebase on merge branch v1: * improve some patch head * rebase on next branch with patch 7 ---- Tiejun Chen (8): powerpc/book3e: rename inter

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

2013-06-20 Thread Tiejun Chen
need to replay an interrupt, we shouldn't restore that previous backup thread info to make sure we can replay an interrupt lately with a proper thread info. This patch use __check_irq_replay() to guarantee this process. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/irq.c | 10 ++

[v5][PATCH 5/6] powerpc/kgdb: use DEFINE_PER_CPU to allocate kgdb's thread_info

2013-06-20 Thread Tiejun Chen
Use DEFINE_PER_CPU to allocate thread_info statically instead of kmalloc(). This can avoid introducing more memory check codes. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/kgdb.c b/arch

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

2013-06-20 Thread Tiejun Chen
Currently we need to skip this for supporting KGDB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 07cf657..a286b51

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

2013-06-20 Thread Tiejun Chen
erate a debug exception. So here we also update thread's dbcr0 to make sure the current can go back with that missed dbcr0 configuration. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powe

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

2013-06-20 Thread Tiejun Chen
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 Chen --- arch/powerpc/kernel/exceptions-64e.S | 49 +++--- 1 file

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

2013-06-20 Thread Tiejun Chen
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 file changed, 15 insertions(+) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc

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

2013-06-20 Thread Tiejun Chen
tree v0: This patchset is used to support kgdb for book3e. -- Tiejun Chen (6): powerpc/book3e: load critical/machine/debug exception stack powerpc/book3e: store critical/machine/debug exception thread info book3e/kgdb: update thread's dbcr0 powerpc/book3e: support

[v2][PATCH 7/7] book3e/kexec/kdump: recover "r4 = 0" to create the initial TLB

2013-06-20 Thread Tiejun Chen
ore already exists so we still should set r4 with 0 to create that initial TLB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/head_64.S |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index ffa4b18..63ed1c3 100644 --- a

[v2][PATCH 6/7] book3e/kexec/kdump: redefine VIRT_PHYS_OFFSET

2013-06-20 Thread Tiejun Chen
Book3e is always aligned 1GB to create TLB so we should use (KERNELBASE - MEMORY_START) as VIRT_PHYS_OFFSET to get __pa/__va properly while boot kdump. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/page.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include

[v2][PATCH 5/7] book3e/kexec/kdump: implement ppc64 kexec specfic

2013-06-20 Thread Tiejun Chen
ppc64 kexec mechanism has a different implementation with ppc32. Signed-off-by: Tiejun Chen --- arch/powerpc/platforms/85xx/smp.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index b308373..18a5f8a

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

2013-06-20 Thread Tiejun Chen
ned-off-by: Tiejun Chen --- arch/powerpc/include/asm/smp.h|3 +++ arch/powerpc/kernel/head_64.S | 12 arch/powerpc/kernel/misc_64.S |6 ++ arch/powerpc/platforms/85xx/smp.c | 14 ++ 4 files changed, 35 insertions(+) diff --git a/arch/powerpc/i

[v2][PATCH 3/7] book3e/kexec/kdump: create a 1:1 TLB mapping

2013-06-20 Thread Tiejun Chen
book3e have no real MMU mode so we have to create a 1:1 TLB mapping to make sure we can access the real physical address. And correct something to support this pseudo real mode on book3e. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/head_64.S |9 --- arch/powerpc/kernel/misc_64.S

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

2013-06-20 Thread Tiejun Chen
We need to active KEXEC for book3e and bypass or convert non-book3e stuff in kexec coverage. Signed-off-by: Tiejun Chen --- arch/powerpc/Kconfig |2 +- arch/powerpc/kernel/machine_kexec_64.c |6 ++ arch/powerpc/kernel/misc_64.S |6 ++ 3 files

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

2013-06-20 Thread Tiejun Chen
after .relocate. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/exception-64e.h |8 arch/powerpc/kernel/exceptions-64e.S | 15 ++- arch/powerpc/kernel/head_64.S| 22 ++ arch/powerpc/lib/feature-fixups.c|7

[v2][PATCH 0/7] powerpc/book3e: support kexec and kdump

2013-06-20 Thread Tiejun Chen
This patchset is used to support kexec and kdump on book3e. Tested on fsl-p5040 DS. v2: * rebase on merge branch as Ben mention now. v1: * improve some patch head * rebase on next branch with patch 7 Tiejun Chen

[v3][KVM][PATCH 1/1] kvm:ppc: control doorbell exception with CONFIG_PPC_DOORBELL

2013-05-12 Thread Tiejun Chen
We can only use CONFIG_PPC_DOORBELL to control whether the doorbell exception should be enabled. Signed-off-by: Tiejun Chen --- v3: Just imporve the patch head. v2: Use CONFIG_PPC_DOORBELL to replace CONFIG_KVM_E500MC as that control condition. arch/powerpc/kvm/booke.c |2 +- 1 file

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

2013-05-07 Thread Tiejun Chen
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(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke_emulate.c b/arch/powerpc/kvm

[v2][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with CONFIG_PPC_DOORBELL

2013-05-07 Thread Tiejun Chen
CONFIG_PPC_DOORBELL is enough to cover all variants. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1020119..62d4ece 100644 --- a/arch/powerpc/kvm/booke.c

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

2013-05-05 Thread Tiejun Chen
). Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/bookehv_interrupts.S |9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index e8ed7d6..2fd62bf 100644 --- a/arch/powerpc/kvm/bookehv_interrupts.S +++ b/ar

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

2013-05-05 Thread Tiejun Chen
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(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index

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

2013-04-25 Thread Tiejun Chen
reference to `kvmppc_handler_42_0x01B' arch/powerpc/kernel/built-in.o: In function `exc_altivec_assist_book3e': arch/powerpc/kernel/exceptions-64e.S:424: undefined reference to `kvmppc_handler_43_0x01B' make: *** [vmlinux] Error 1 Looks we should add these altivec kvm handlers. S

[RFC][PATCH 1/1] USB/EHCI: work for different PHY_CLK_VALID detecting order

2013-04-23 Thread Tiejun Chen
valid once USB_CTRL_USB_EN is set. But since PHY_CLK_VALID is w1c, we can force clear USB_CTRL_USB_EN firstly after set PHY_CLK_SEL, then PHY_CLK_VALID status can be kept even we re-set USB_CTRL_USB_EN. Signed-off-by: Tiejun Chen --- drivers/usb/host/ehci-fsl.c | 15 --- 1 file change

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

2013-04-23 Thread Tiejun Chen
this would issue other platforms as abnormal without this similar Errata. Signed-off-by: Tiejun Chen --- drivers/usb/host/ehci-fsl.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index d81d2fc..f4f2a7b 10

[v4][PATCH 7/7] book3e/kgdb: Fix a single stgep case of lazy IRQ

2013-03-11 Thread Tiejun Chen
need to replay an interrupt, we shouldn't restore that previous backup thread info to make sure we can replay an interrupt lately with a proper thread info. This patch use __check_irq_replay() to guarantee this process. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/irq.c | 10 ++

[v4][PATCH 6/7] powerpc/kgdb: use DEFINE_PER_CPU to allocate kgdb's thread_info

2013-03-11 Thread Tiejun Chen
Use DEFINE_PER_CPU to allocate thread_info statically instead of kmalloc(). This can avoid introducing more memory check codes. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/kgdb.c b/arch

[v4][PATCH 5/7] kgdb/kgdbts: support ppc64

2013-03-11 Thread Tiejun Chen
without arched definition. Signed-off-by: Tiejun Chen --- drivers/misc/kgdbts.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 3aa9a96..4799e1f 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c @@ -103,6 +103,7 @@ #inc

[v4][PATCH 4/7] powerpc/book3e: support kgdb for kernel space

2013-03-11 Thread Tiejun Chen
Currently we need to skip this for supporting KGDB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 7df9a1f..fd5d61b

[v4][PATCH 3/7] book3e/kgdb: update thread's dbcr0

2013-03-11 Thread Tiejun Chen
erate a debug exception. So here we also update thread's dbcr0 to make sure the current can go back with that missed dbcr0 configuration. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powe

[v4][PATCH 2/7] powerpc/book3e: store critical/machine/debug exception thread info

2013-03-11 Thread Tiejun Chen
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 file changed, 15 insertions(+) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc

[v4][PATCH 1/7] powerpc/book3e: load critical/machine/debug exception stack

2013-03-11 Thread Tiejun Chen
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 Chen --- arch/powerpc/kernel/exceptions-64e.S | 49 +++--- 1 file

[v4][PATCH 0/7] powerpc/book3e: powerpc/book3e: make kgdb to work well

2013-03-11 Thread Tiejun Chen
ay an interrupt, we shouldn't restore that previous backup thread info to make sure we can replay an interrupt lately with a proper thread info. * rebase latest powerpc git tree v0: This patchset is used to support kgdb for book3e. -- Tiejun Chen (7): powerpc/book3e: load c

[PATCH 1/1] powerpc/kgdb: use DEFINE_PER_CPU to allocate kgdb's thread_info

2013-03-11 Thread Tiejun Chen
Use DEFINE_PER_CPU to allocate thread_info statically instead of kmalloc(). This can avoid introducing more memory check codes. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/kgdb.c b/arch

[v3][PATCH 6/6] powerpc/kgdb: remove copying the thread_info

2013-02-26 Thread Tiejun Chen
Currently BookE and Book3E always copy the thread_info from the kernel stack when we enter the debug exception, so we can remove these action here to avoid copying again. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 28 1 file changed, 28 deletions

[v3][PATCH 5/6] kgdb/kgdbts: support ppc64

2013-02-26 Thread Tiejun Chen
without arched definition. Signed-off-by: Tiejun Chen --- drivers/misc/kgdbts.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 3aa9a96..4799e1f 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c @@ -103,6 +103,7 @@ #inc

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

2013-02-26 Thread Tiejun Chen
Currently we need to skip this for supporting KGDB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 7df9a1f..800e2a3

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

2013-02-26 Thread Tiejun Chen
erate a debug exception. So here we also update thread's dbcr0 to make sure the current can go back with that missed dbcr0 configuration. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powe

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

2013-02-26 Thread Tiejun Chen
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 file changed, 15 insertions(+) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc

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

2013-02-26 Thread Tiejun Chen
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 Chen --- arch/powerpc/kernel/exceptions-64e.S | 49 +++--- 1 file

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

2013-02-26 Thread Tiejun Chen
b state. * add a patch to if we need to replay an interrupt, we shouldn't restore that previous backup thread info to make sure we can replay an interrupt lately with a proper thread info. * rebase latest powerpc git tree v0: This patchset is used to support kgdb for book3e. -- Tiej

[v3][PATCH 6/6] powerpc/kgdb: remove copying the thread_info

2013-02-26 Thread Tiejun Chen
Currently BookE and Book3E always copy the thread_info from the kernel stack when we enter the debug exception, so we can remove these action here to avoid copying again. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 28 1 file changed, 28 deletions

[v3][PATCH 5/6] kgdb/kgdbts: support ppc64

2013-02-26 Thread Tiejun Chen
without arched definition. Signed-off-by: Tiejun Chen --- drivers/misc/kgdbts.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 3aa9a96..4799e1f 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c @@ -103,6 +103,7 @@ #inc

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

2013-02-26 Thread Tiejun Chen
Currently we need to skip this for supporting KGDB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 7df9a1f..800e2a3

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

2013-02-26 Thread Tiejun Chen
erate a debug exception. So here we also update thread's dbcr0 to make sure the current can go back with that missed dbcr0 configuration. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powe

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

2013-02-26 Thread Tiejun Chen
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 file changed, 15 insertions(+) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc

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

2013-02-26 Thread Tiejun Chen
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 Chen --- arch/powerpc/kernel/exceptions-64e.S | 49 +++--- 1 file

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

2013-02-26 Thread Tiejun Chen
b state. * add a patch to if we need to replay an interrupt, we shouldn't restore that previous backup thread info to make sure we can replay an interrupt lately with a proper thread info. * rebase latest powerpc git tree v0: This patchset is used to support kgdb for book3e. -- Tiej

[PATCH 1/1] book3e/corenet64: increase CPU numbers by default

2013-02-26 Thread Tiejun Chen
Currently we already support p5040ds which has 4 e5500 cores, but twelve dual-threaded e6500 cores are also built on T4240, we can change CONFIG_NR_CPUS with this value now. Signed-off-by: Tiejun Chen --- arch/powerpc/configs/corenet64_smp_defconfig |2 +- 1 file changed, 1 insertion(+), 1

[v1][PATCH 7/7] book3e/kexec/kdump: recover "r4 = 0" to create the initial TLB

2013-02-26 Thread Tiejun Chen
ore already exists so we still should set r4 with 0 to create that initial TLB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/head_64.S |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 038e81d..e60f078 100644 --- a

[v1][PATCH 3/7] book3e/kexec/kdump: create a 1:1 TLB mapping

2013-02-26 Thread Tiejun Chen
book3e have no real MMU mode so we have to create a 1:1 TLB mapping to make sure we can access the real physical address. And correct something to support this pseudo real mode on book3e. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/head_64.S |9 --- arch/powerpc/kernel/misc_64.S

[v1][PATCH 6/7] book3e/kexec/kdump: redefine VIRT_PHYS_OFFSET

2013-02-26 Thread Tiejun Chen
Book3e is always aligned 1GB to create TLB so we should use (KERNELBASE - MEMORY_START) as VIRT_PHYS_OFFSET to get __pa/__va properly while boot kdump. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/page.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include

[v1][PATCH 5/7] book3e/kexec/kdump: implement ppc64 kexec specfic

2013-02-26 Thread Tiejun Chen
ppc64 kexec mechanism has a different implementation with ppc32. Signed-off-by: Tiejun Chen --- arch/powerpc/platforms/85xx/smp.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index 8beef93..af2a7e8

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

2013-02-26 Thread Tiejun Chen
ned-off-by: Tiejun Chen --- arch/powerpc/include/asm/smp.h|3 +++ arch/powerpc/kernel/head_64.S | 12 arch/powerpc/kernel/misc_64.S |6 ++ arch/powerpc/platforms/85xx/smp.c | 14 ++ 4 files changed, 35 insertions(+) diff --git a/arch/powerpc/i

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

2013-02-26 Thread Tiejun Chen
We need to active KEXEC for book3e and bypass or convert non-book3e stuff in kexec coverage. Signed-off-by: Tiejun Chen --- arch/powerpc/Kconfig |2 +- arch/powerpc/kernel/machine_kexec_64.c |6 ++ arch/powerpc/kernel/misc_64.S |6 ++ 3 files

[v1][PATCH 0/7] powerpc/book3e: support kexec and kdump

2013-02-26 Thread Tiejun Chen
This patchset is used to support kexec and kdump on book3e. Tested on fsl-p5040 DS. v1: -- * improve some patch head * rebase on next branch with patch 7 Tiejun Chen (7): powerpc/book3e: support CONFIG_RELOCATABLE book3e/kexec/kdump: enable kexec for kernel book3e/kexec

[v1][PATCH 1/7] powerpc/book3e: support CONFIG_RELOCATABLE

2013-02-26 Thread Tiejun Chen
after .relocate. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/exception-64e.h |8 arch/powerpc/kernel/exceptions-64e.S | 15 ++- arch/powerpc/kernel/head_64.S| 22 ++ arch/powerpc/lib/feature-fixups.c|7

[v2][PATCH 6/6] kgdb/kgdbts: support ppc64

2013-01-20 Thread Tiejun Chen
without arched definition. Signed-off-by: Tiejun Chen --- drivers/misc/kgdbts.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 3aa9a96..4799e1f 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c @@ -103,6 +103,7 @@ #inc

[v2][PATCH 5/6] powerpc/book3e: support kgdb for kernel space

2013-01-20 Thread Tiejun Chen
Currently we need to skip this for supporting KGDB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 423a936..6204681

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

2013-01-20 Thread Tiejun Chen
need to replay an interrupt, we shouldn't restore that previous backup thread info to make sure we can replay an interrupt lately with a proper thread info. This patch use __check_irq_replay() to guarantee this process. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/irq.c | 10 ++

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

2013-01-20 Thread Tiejun Chen
erate a debug exception. So here we also update thread's dbcr0 to make sure the current can go back with that missed dbcr0 configuration. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powe

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

2013-01-20 Thread Tiejun Chen
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 file changed, 15 insertions(+) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc

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

2013-01-20 Thread Tiejun Chen
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 Chen --- arch/powerpc/kernel/exceptions-64e.S | 40 +++--- 1 file

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

2013-01-20 Thread Tiejun Chen
owerpc git tree v0: This patchset is used to support kgdb for book3e. Tiejun Chen (6): powerpc/book3e: load critical/machine/debug exception stack powerpc/book3e: store critical/machine/debug exception thread info book3e/kgdb: update thread's dbcr0 book3e/kgdb: Fix

[v1][PATCH 1/1] ppc64: max next_tb to prevent from replaying timer interrupt

2013-01-15 Thread Tiejun Chen
rwise we'll trap here infinitely. Signed-off-by: Tiejun Chen --- v1: * In hotplug case we max decrementers_next_tb to prevent from replaying timer interrupt for any offline CPU. arch/powerpc/kernel/time.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ar

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

2013-01-15 Thread Tiejun Chen
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 changed, 6 insertions(+) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index

[v0][PATCH 1/1] powerpc/book3e: disable interrupt after preempt_schedule_irq

2013-01-06 Thread Tiejun Chen
In preempt case current arch_local_irq_restore() from preempt_schedule_irq() may enable hard interrupt but we really should disable interrupts when we return from the interrupt, and so that we don't get interrupted after loading SRR0/1. Signed-off-by: Tiejun Chen --- arch/powerpc/k

[v1][PATCH 6/6] kgdb/kgdbts: support ppc64

2012-12-20 Thread Tiejun Chen
without arched definition. Signed-off-by: Tiejun Chen --- drivers/misc/kgdbts.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 3aa9a96..4799e1f 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c @@ -103,6 +103,7 @@ #inc

[v1][PATCH 5/6] powerpc/book3e: support kgdb for kernel space

2012-12-20 Thread Tiejun Chen
Currently we need to skip this for supporting KGDB. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/exceptions-64e.S |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 9a99cba..a24baef

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

2012-12-20 Thread Tiejun Chen
need to replay an interrupt, we shouldn't restore that previous backup thread info to make sure we can replay an interrupt lately with a proper thread info. This patch use __check_irq_replay() to guarantee this process. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/irq.c | 10 ++

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

2012-12-20 Thread Tiejun Chen
erate a debug exception. So here we also update thread's dbcr0 to make sure the current can go back with that missed dbcr0 configuration. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/kgdb.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/kernel/kgd

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

2012-12-20 Thread Tiejun Chen
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 file changed, 15 insertions(+) diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc

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

2012-12-20 Thread Tiejun Chen
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 Chen --- arch/powerpc/kernel/exceptions-64e.S | 40 +++--- 1 file

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

2012-12-20 Thread Tiejun Chen
v0: This patchset is used to support kgdb for book3e. Tiejun Chen (6): powerpc/book3e: load critical/machine/debug exception stack powerpc/book3e: store critical/machine/debug exception thread info book3e/kgdb: update thread's dbcr0 book3e/kgdb: Fix a single stgep c

[PATCH 6/6] book3e/kexec/kdump: redefine VIRT_PHYS_OFFSET

2012-11-15 Thread Tiejun Chen
Book3e is always aligned 1GB to create TLB so we should use (KERNELBASE - MEMORY_START) as VIRT_PHYS_OFFSET to get __pa/__va properly while boot kdump. Signed-off-by: Tiejun Chen --- arch/powerpc/include/asm/page.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include

[PATCH 5/6] book3e/kexec/kdump: skip ppc32 kexec specfic

2012-11-15 Thread Tiejun Chen
ppc64 kexec mechanism has a different implementation with ppc32 so skipp those ppc32 specfic. Signed-off-by: Tiejun Chen --- arch/powerpc/platforms/85xx/smp.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx

[PATCH 2/6] book3e/kexec/kdump: enable kexec for kernel

2012-11-15 Thread Tiejun Chen
We need to active KEXEC for book3e and bypass or convert non-book3e stuff in kexec coverage. Signed-off-by: Tiejun Chen --- arch/powerpc/Kconfig |2 +- arch/powerpc/kernel/machine_kexec_64.c |6 ++ arch/powerpc/kernel/misc_64.S |6 ++ 3 files

[PATCH 4/6] book3e/kexec/kdump: introduce a kexec kernel flag

2012-11-15 Thread Tiejun Chen
ned-off-by: Tiejun Chen --- arch/powerpc/include/asm/smp.h|3 +++ arch/powerpc/kernel/head_64.S | 12 arch/powerpc/kernel/misc_64.S |6 ++ arch/powerpc/platforms/85xx/smp.c | 14 ++ 4 files changed, 35 insertions(+) diff --git a/arch/powerpc/i

[PATCH 3/6] book3e/kexec/kdump: create a 1:1 TLB mapping

2012-11-15 Thread Tiejun Chen
book3e have no real MMU mode so we have to create a 1:1 TLB mapping to make sure we can access the real physical address. And correct something to support this pseudo real mode on book3e. Signed-off-by: Tiejun Chen --- arch/powerpc/kernel/head_64.S |9 --- arch/powerpc/kernel/misc_64.S

  1   2   >