RE: [ANNOUNCE] 4.14.63-rt40

2018-08-23 Thread Tiejun Chen
Steven, commit 7f11a591bbdb111792298144c3476506aa7f1ca8 (HEAD -> v4.14.63-rt40-rebase, tag: v4.14.63-rt40-rebase, origin/v4.14-rt-rebase) Author: Steven Rostedt (VMware) Date: Wed May 16 09:33:00 2018 -0400 Linux 4.14.63-rt40 REBASE diff --git a/localversion-rt b/localversion-rt index 90

[[PATCH 2/2] kvm: enable preemption to register/unregister preempt notifier

2015-07-03 Thread Tiejun Chen
/0x150 [] SyS_ioctl+0xad/0xe0 [] entry_SYSCALL_64_fastpath+0x12/0x6f CC: Gleb Natapov CC: Paolo Bonzini Signed-off-by: Tiejun Chen --- virt/kvm/kvm_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 848af90..bde5f66f 100644 --- a/virt

[[PATCH 1/2] kvm: make preempt_notifier free out CONFIG_PREEMPT_NOTIFIERS

2015-07-03 Thread Tiejun Chen
In any cases CONFIG_KVM always means CONFIG_PREEMPT_NOTIFIERS is enabled unconditionally so its really pointless. CC: Gleb Natapov CC: Paolo Bonzini Signed-off-by: Tiejun Chen --- include/linux/kvm_host.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/kvm_host.h b/include

[PATCH 1/1] x86:kvm: fix one typo in comment

2014-08-25 Thread Tiejun Chen
s/drity/dirty Signed-off-by: Tiejun Chen --- arch/x86/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9314678..09b9f05 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1180,7 +1180,7 @@ static void

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-19 Thread Tiejun Chen
rough support into qemu upstream, and with some discussion, we wouldn't set the bridge class type and just expose this devfn. So we just go back to check devfn to make life normal. Signed-off-by: Tiejun Chen --- drivers/gpu/drm/i915/i915_drv.c | 19 +++ 1 file changed, 3

[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 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 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 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 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 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. ------

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

2013-08-25 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

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

2013-08-25 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

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

2013-08-25 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

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

2013-08-25 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 fa74d20..001b112 100644 --- a

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

2013-08-25 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 549948a..137ad10

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

2013-08-25 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

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

2013-08-25 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 --

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

2013-08-25 Thread Tiejun Chen
next branch with patch 7 ---- Tiejun Chen (8): powerpc/book3e: rename interrupt_end_book3e with __end_interrupts powerpc/book3e: support CONFIG_RELOCATABLE book3e/kexec/kdump: enable kexec for kernel book3e/kexec/kdump: create a 1:1 TLB mapping book3e/kexec

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

2013-08-25 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 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 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 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

[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 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 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 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

[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

[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 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 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 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

[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 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 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 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

[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 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 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 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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

[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 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

[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 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 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 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 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

[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 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

[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 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 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

[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 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 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 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 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

[PATCH 1/6] powerpc/book3e: support CONFIG_RELOCATABLE

2012-11-15 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

[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 0/6] powerpc/book3e: support kexec and kdump

2012-11-15 Thread Tiejun Chen
This patchset is used to support kexec and kdump on book3e. Tested on fsl-p5040 DS. Tiejun Chen (6): powerpc/book3e: support CONFIG_RELOCATABLE book3e/kexec/kdump: enable kexec for kernel book3e/kexec/kdump: create a 1:1 TLB mapping book3e/kexec/kdump: introduce a kexec

[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 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 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 1/1] powerpc/book3e: store critical/machine/debug exception thread info

2012-10-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 --- This patch is followed on my three patches I send recently: [PATCH 1/3] powerpc/book3e: load critical/machine/debug exception stack [PATCH 2/3] powerpc/book3e

[PATCH 3/3] kgdb/kgdbts: support ppc64

2012-10-24 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

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

2012-10-24 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 | 27 +++ 1 file changed

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

2012-10-24 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 43b654a..c5564d4

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

2012-08-22 Thread Tiejun Chen
afterwards. But actually we don't do this properly. We should backup current_thread_info then restore that when exit. Signed-off-by: Tiejun Chen --- v2: fix a typo in patch head description. arch/powerpc/kernel/kgdb.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff

[v2][PATCH 1/3] kgdb,ppc: do not set kgdb_single_step on ppc

2012-08-22 Thread Tiejun Chen
The kgdb_single_step flag has the possibility to indefinitely hang the system on an SMP system. The x86 arch have the same problem, and that problem was fixed by commit 8097551d9ab9b9e3630(kgdb,x86: do not set kgdb_single_step on x86). This patch does the same behaviors as x86's patch. Signed-off

  1   2   >