[Xenomai-git] Philippe Gerum : powerpc: upgrade I-pipe support to 2.6.34-powerpc-2.9-01

2010-06-19 Thread GIT version control
Module: xenomai-head
Branch: master
Commit: a85eb493aad1dd9712be657cd397833f2ae8e9e4
URL:
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=a85eb493aad1dd9712be657cd397833f2ae8e9e4

Author: Philippe Gerum 
Date:   Wed May 26 18:54:53 2010 +0200

powerpc: upgrade I-pipe support to 2.6.34-powerpc-2.9-01

---

 ...tch => adeos-ipipe-2.6.34-powerpc-2.9-01.patch} |  218 +++-
 1 files changed, 125 insertions(+), 93 deletions(-)

diff --git 
a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch 
b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
similarity index 98%
rename from 
ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch
rename to ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
index 3658c33..45bd252 100644
--- a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch
+++ b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
@@ -51,6 +51,16 @@ index 2e19500..64449b7 100644
  config HIGHMEM
bool "High memory support"
depends on PPC32
+diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
+index 1a54a3b..21788aa 100644
+--- a/arch/powerpc/Makefile
 b/arch/powerpc/Makefile
+@@ -250,3 +250,5 @@ checkbin:
+ 
+ CLEAN_FILES += $(TOUT)
+ 
++
++drivers-$(CONFIG_XENOMAI) += arch/powerpc/xenomai/
 diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
 index bb2465b..3e33b21 100644
 --- a/arch/powerpc/boot/Makefile
@@ -237,7 +247,7 @@ index dde1296..8865751 100644
stw r5, 20(r1); \
stw r6, 24(r1); \
 diff --git a/arch/powerpc/include/asm/hw_irq.h 
b/arch/powerpc/include/asm/hw_irq.h
-index 9f4c9d4..ce168bf 100644
+index bd100fc..8fa1901 100644
 --- a/arch/powerpc/include/asm/hw_irq.h
 +++ b/arch/powerpc/include/asm/hw_irq.h
 @@ -13,6 +13,10 @@
@@ -1233,7 +1243,7 @@ index 8773263..aafe4c0 100644
  obj-$(CONFIG_PPC_OF)  += of_device.o of_platform.o prom_parse.o
  obj-$(CONFIG_PPC_CLOCK)   += clock.o
 diff --git a/arch/powerpc/kernel/asm-offsets.c 
b/arch/powerpc/kernel/asm-offsets.c
-index 957ceb7..5e75c5b 100644
+index c09138d..d725dd6 100644
 --- a/arch/powerpc/kernel/asm-offsets.c
 +++ b/arch/powerpc/kernel/asm-offsets.c
 @@ -131,8 +131,12 @@ int main(void)
@@ -1246,10 +1256,10 @@ index 957ceb7..5e75c5b 100644
 +#elif CONFIG_IPIPE
 +  DEFINE(PACAROOTPCPU, offsetof(struct paca_struct, root_percpu));
 +#endif
-   DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_event_pending));
DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id));
  #ifdef CONFIG_PPC_MM_SLICES
-@@ -300,7 +304,9 @@ int main(void)
+   DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct,
+@@ -299,7 +303,9 @@ int main(void)
DEFINE(_DEAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar));
DEFINE(_ESR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
  #else /* CONFIG_PPC64 */
@@ -1409,7 +1419,7 @@ index 1175a85..d559ae1 100644
   * PROM code for specific machines follows.  Put it
   * here so it's easy to add arch-specific sections later.
 diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
-index 07109d8..67a3674 100644
+index 42e9d90..22595e7 100644
 --- a/arch/powerpc/kernel/entry_64.S
 +++ b/arch/powerpc/kernel/entry_64.S
 @@ -33,6 +33,11 @@
@@ -1577,28 +1587,12 @@ index 07109d8..67a3674 100644
  BEGIN_FW_FTR_SECTION
ld  r5,SOFTE(r1)
  FW_FTR_SECTION_ELSE
-@@ -564,12 +654,38 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
-   bl  .perf_event_do_pending
- 27:
- #endif /* CONFIG_PERF_EVENTS */
--
-   /* extract EE bit and use it to restore paca->hard_enabled */
-   ld  r3,_MSR(r1)
+@@ -561,6 +651,23 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
rldicl  r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */
stb r4,PACAHARDIRQEN(r13)
  
 +#else /* !CONFIG_SOFTDISABLE */
 +#ifdef CONFIG_IPIPE
-+#ifdef CONFIG_PERF_EVENTS
-+  /* check paca->perf_event_pending if we're enabling ints */
-+  ld  r5,_MSR(r1)
-+  rldicl  r5,r5,49,63 /* r0 = (r3 >> 15) & 1 */
-+  lbz r3,PACAPERFPEND(r13)
-+  and.r3,r3,r5
-+  beq 27f
-+  bl  .perf_event_do_pending
-+27:
-+#endif /* CONFIG_PERF_EVENTS */
 +#ifdef CONFIG_IPIPE_TRACE_IRQSOFF
 +  ld  r3,_MSR(r1)
 +  rldicl  r3,r3,49,63 /* r0 = (r3 >> 15) & 1 */
@@ -1617,7 +1611,7 @@ index 07109d8..67a3674 100644
  #ifdef CONFIG_PPC_BOOK3E
b   .exception_return_book3e
  #else
-@@ -659,6 +775,7 @@ do_work:
+@@ -650,6 +757,7 @@ do_work:
crandc  eq,cr1*4+eq,eq
bne restore
  
@@ -1625,7 +1619,7 @@ index 07109d8..67a3674 100644
/* Here we are preempting the current task.
 *
 * Ensure interrupts are soft-disabled. We also properly mark
-@@ -669,9 +786,14 @@ do_work:
+@@ -660,9 +768,14 @@ do_work:
stb r0,PACA

[Xenomai-git] Philippe Gerum : powerpc: upgrade I-pipe support to 2.6.34-powerpc-2.9-01

2010-06-09 Thread GIT version control
Module: xenomai-rpm
Branch: queue/mayday
Commit: 04a14ea651a000ad3d238071921eafd5e0300783
URL:
http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=04a14ea651a000ad3d238071921eafd5e0300783

Author: Philippe Gerum 
Date:   Wed May 26 18:54:53 2010 +0200

powerpc: upgrade I-pipe support to 2.6.34-powerpc-2.9-01

---

 ...tch => adeos-ipipe-2.6.34-powerpc-2.9-01.patch} |  218 +++-
 1 files changed, 125 insertions(+), 93 deletions(-)

diff --git 
a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch 
b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
similarity index 98%
rename from 
ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch
rename to ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
index 3658c33..45bd252 100644
--- a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch
+++ b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
@@ -51,6 +51,16 @@ index 2e19500..64449b7 100644
  config HIGHMEM
bool "High memory support"
depends on PPC32
+diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
+index 1a54a3b..21788aa 100644
+--- a/arch/powerpc/Makefile
 b/arch/powerpc/Makefile
+@@ -250,3 +250,5 @@ checkbin:
+ 
+ CLEAN_FILES += $(TOUT)
+ 
++
++drivers-$(CONFIG_XENOMAI) += arch/powerpc/xenomai/
 diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
 index bb2465b..3e33b21 100644
 --- a/arch/powerpc/boot/Makefile
@@ -237,7 +247,7 @@ index dde1296..8865751 100644
stw r5, 20(r1); \
stw r6, 24(r1); \
 diff --git a/arch/powerpc/include/asm/hw_irq.h 
b/arch/powerpc/include/asm/hw_irq.h
-index 9f4c9d4..ce168bf 100644
+index bd100fc..8fa1901 100644
 --- a/arch/powerpc/include/asm/hw_irq.h
 +++ b/arch/powerpc/include/asm/hw_irq.h
 @@ -13,6 +13,10 @@
@@ -1233,7 +1243,7 @@ index 8773263..aafe4c0 100644
  obj-$(CONFIG_PPC_OF)  += of_device.o of_platform.o prom_parse.o
  obj-$(CONFIG_PPC_CLOCK)   += clock.o
 diff --git a/arch/powerpc/kernel/asm-offsets.c 
b/arch/powerpc/kernel/asm-offsets.c
-index 957ceb7..5e75c5b 100644
+index c09138d..d725dd6 100644
 --- a/arch/powerpc/kernel/asm-offsets.c
 +++ b/arch/powerpc/kernel/asm-offsets.c
 @@ -131,8 +131,12 @@ int main(void)
@@ -1246,10 +1256,10 @@ index 957ceb7..5e75c5b 100644
 +#elif CONFIG_IPIPE
 +  DEFINE(PACAROOTPCPU, offsetof(struct paca_struct, root_percpu));
 +#endif
-   DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_event_pending));
DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id));
  #ifdef CONFIG_PPC_MM_SLICES
-@@ -300,7 +304,9 @@ int main(void)
+   DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct,
+@@ -299,7 +303,9 @@ int main(void)
DEFINE(_DEAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar));
DEFINE(_ESR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
  #else /* CONFIG_PPC64 */
@@ -1409,7 +1419,7 @@ index 1175a85..d559ae1 100644
   * PROM code for specific machines follows.  Put it
   * here so it's easy to add arch-specific sections later.
 diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
-index 07109d8..67a3674 100644
+index 42e9d90..22595e7 100644
 --- a/arch/powerpc/kernel/entry_64.S
 +++ b/arch/powerpc/kernel/entry_64.S
 @@ -33,6 +33,11 @@
@@ -1577,28 +1587,12 @@ index 07109d8..67a3674 100644
  BEGIN_FW_FTR_SECTION
ld  r5,SOFTE(r1)
  FW_FTR_SECTION_ELSE
-@@ -564,12 +654,38 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
-   bl  .perf_event_do_pending
- 27:
- #endif /* CONFIG_PERF_EVENTS */
--
-   /* extract EE bit and use it to restore paca->hard_enabled */
-   ld  r3,_MSR(r1)
+@@ -561,6 +651,23 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
rldicl  r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */
stb r4,PACAHARDIRQEN(r13)
  
 +#else /* !CONFIG_SOFTDISABLE */
 +#ifdef CONFIG_IPIPE
-+#ifdef CONFIG_PERF_EVENTS
-+  /* check paca->perf_event_pending if we're enabling ints */
-+  ld  r5,_MSR(r1)
-+  rldicl  r5,r5,49,63 /* r0 = (r3 >> 15) & 1 */
-+  lbz r3,PACAPERFPEND(r13)
-+  and.r3,r3,r5
-+  beq 27f
-+  bl  .perf_event_do_pending
-+27:
-+#endif /* CONFIG_PERF_EVENTS */
 +#ifdef CONFIG_IPIPE_TRACE_IRQSOFF
 +  ld  r3,_MSR(r1)
 +  rldicl  r3,r3,49,63 /* r0 = (r3 >> 15) & 1 */
@@ -1617,7 +1611,7 @@ index 07109d8..67a3674 100644
  #ifdef CONFIG_PPC_BOOK3E
b   .exception_return_book3e
  #else
-@@ -659,6 +775,7 @@ do_work:
+@@ -650,6 +757,7 @@ do_work:
crandc  eq,cr1*4+eq,eq
bne restore
  
@@ -1625,7 +1619,7 @@ index 07109d8..67a3674 100644
/* Here we are preempting the current task.
 *
 * Ensure interrupts are soft-disabled. We also properly mark
-@@ -669,9 +786,14 @@ do_work:
+@@ -660,9 +768,14 @@ do_work:
stb r0,

[Xenomai-git] Philippe Gerum : powerpc: upgrade I-pipe support to 2.6.34-powerpc-2.9-01

2010-05-30 Thread GIT version control
Module: xenomai-2.5
Branch: master
Commit: a85eb493aad1dd9712be657cd397833f2ae8e9e4
URL:
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=a85eb493aad1dd9712be657cd397833f2ae8e9e4

Author: Philippe Gerum 
Date:   Wed May 26 18:54:53 2010 +0200

powerpc: upgrade I-pipe support to 2.6.34-powerpc-2.9-01

---

 ...tch => adeos-ipipe-2.6.34-powerpc-2.9-01.patch} |  218 +++-
 1 files changed, 125 insertions(+), 93 deletions(-)

diff --git 
a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch 
b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
similarity index 98%
rename from 
ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch
rename to ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
index 3658c33..45bd252 100644
--- a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch
+++ b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
@@ -51,6 +51,16 @@ index 2e19500..64449b7 100644
  config HIGHMEM
bool "High memory support"
depends on PPC32
+diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
+index 1a54a3b..21788aa 100644
+--- a/arch/powerpc/Makefile
 b/arch/powerpc/Makefile
+@@ -250,3 +250,5 @@ checkbin:
+ 
+ CLEAN_FILES += $(TOUT)
+ 
++
++drivers-$(CONFIG_XENOMAI) += arch/powerpc/xenomai/
 diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
 index bb2465b..3e33b21 100644
 --- a/arch/powerpc/boot/Makefile
@@ -237,7 +247,7 @@ index dde1296..8865751 100644
stw r5, 20(r1); \
stw r6, 24(r1); \
 diff --git a/arch/powerpc/include/asm/hw_irq.h 
b/arch/powerpc/include/asm/hw_irq.h
-index 9f4c9d4..ce168bf 100644
+index bd100fc..8fa1901 100644
 --- a/arch/powerpc/include/asm/hw_irq.h
 +++ b/arch/powerpc/include/asm/hw_irq.h
 @@ -13,6 +13,10 @@
@@ -1233,7 +1243,7 @@ index 8773263..aafe4c0 100644
  obj-$(CONFIG_PPC_OF)  += of_device.o of_platform.o prom_parse.o
  obj-$(CONFIG_PPC_CLOCK)   += clock.o
 diff --git a/arch/powerpc/kernel/asm-offsets.c 
b/arch/powerpc/kernel/asm-offsets.c
-index 957ceb7..5e75c5b 100644
+index c09138d..d725dd6 100644
 --- a/arch/powerpc/kernel/asm-offsets.c
 +++ b/arch/powerpc/kernel/asm-offsets.c
 @@ -131,8 +131,12 @@ int main(void)
@@ -1246,10 +1256,10 @@ index 957ceb7..5e75c5b 100644
 +#elif CONFIG_IPIPE
 +  DEFINE(PACAROOTPCPU, offsetof(struct paca_struct, root_percpu));
 +#endif
-   DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_event_pending));
DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id));
  #ifdef CONFIG_PPC_MM_SLICES
-@@ -300,7 +304,9 @@ int main(void)
+   DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct,
+@@ -299,7 +303,9 @@ int main(void)
DEFINE(_DEAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar));
DEFINE(_ESR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
  #else /* CONFIG_PPC64 */
@@ -1409,7 +1419,7 @@ index 1175a85..d559ae1 100644
   * PROM code for specific machines follows.  Put it
   * here so it's easy to add arch-specific sections later.
 diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
-index 07109d8..67a3674 100644
+index 42e9d90..22595e7 100644
 --- a/arch/powerpc/kernel/entry_64.S
 +++ b/arch/powerpc/kernel/entry_64.S
 @@ -33,6 +33,11 @@
@@ -1577,28 +1587,12 @@ index 07109d8..67a3674 100644
  BEGIN_FW_FTR_SECTION
ld  r5,SOFTE(r1)
  FW_FTR_SECTION_ELSE
-@@ -564,12 +654,38 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
-   bl  .perf_event_do_pending
- 27:
- #endif /* CONFIG_PERF_EVENTS */
--
-   /* extract EE bit and use it to restore paca->hard_enabled */
-   ld  r3,_MSR(r1)
+@@ -561,6 +651,23 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
rldicl  r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */
stb r4,PACAHARDIRQEN(r13)
  
 +#else /* !CONFIG_SOFTDISABLE */
 +#ifdef CONFIG_IPIPE
-+#ifdef CONFIG_PERF_EVENTS
-+  /* check paca->perf_event_pending if we're enabling ints */
-+  ld  r5,_MSR(r1)
-+  rldicl  r5,r5,49,63 /* r0 = (r3 >> 15) & 1 */
-+  lbz r3,PACAPERFPEND(r13)
-+  and.r3,r3,r5
-+  beq 27f
-+  bl  .perf_event_do_pending
-+27:
-+#endif /* CONFIG_PERF_EVENTS */
 +#ifdef CONFIG_IPIPE_TRACE_IRQSOFF
 +  ld  r3,_MSR(r1)
 +  rldicl  r3,r3,49,63 /* r0 = (r3 >> 15) & 1 */
@@ -1617,7 +1611,7 @@ index 07109d8..67a3674 100644
  #ifdef CONFIG_PPC_BOOK3E
b   .exception_return_book3e
  #else
-@@ -659,6 +775,7 @@ do_work:
+@@ -650,6 +757,7 @@ do_work:
crandc  eq,cr1*4+eq,eq
bne restore
  
@@ -1625,7 +1619,7 @@ index 07109d8..67a3674 100644
/* Here we are preempting the current task.
 *
 * Ensure interrupts are soft-disabled. We also properly mark
-@@ -669,9 +786,14 @@ do_work:
+@@ -660,9 +768,14 @@ do_work:
stb r0,PACASO

[Xenomai-git] Philippe Gerum : powerpc: upgrade I-pipe support to 2.6.34-powerpc-2.9-01

2010-05-26 Thread GIT version control
Module: xenomai-rpm
Branch: for-upstream
Commit: a85eb493aad1dd9712be657cd397833f2ae8e9e4
URL:
http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=a85eb493aad1dd9712be657cd397833f2ae8e9e4

Author: Philippe Gerum 
Date:   Wed May 26 18:54:53 2010 +0200

powerpc: upgrade I-pipe support to 2.6.34-powerpc-2.9-01

---

 ...tch => adeos-ipipe-2.6.34-powerpc-2.9-01.patch} |  218 +++-
 1 files changed, 125 insertions(+), 93 deletions(-)

diff --git 
a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch 
b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
similarity index 98%
rename from 
ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch
rename to ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
index 3658c33..45bd252 100644
--- a/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-rc5-powerpc-2.9-01.patch
+++ b/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.34-powerpc-2.9-01.patch
@@ -51,6 +51,16 @@ index 2e19500..64449b7 100644
  config HIGHMEM
bool "High memory support"
depends on PPC32
+diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
+index 1a54a3b..21788aa 100644
+--- a/arch/powerpc/Makefile
 b/arch/powerpc/Makefile
+@@ -250,3 +250,5 @@ checkbin:
+ 
+ CLEAN_FILES += $(TOUT)
+ 
++
++drivers-$(CONFIG_XENOMAI) += arch/powerpc/xenomai/
 diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
 index bb2465b..3e33b21 100644
 --- a/arch/powerpc/boot/Makefile
@@ -237,7 +247,7 @@ index dde1296..8865751 100644
stw r5, 20(r1); \
stw r6, 24(r1); \
 diff --git a/arch/powerpc/include/asm/hw_irq.h 
b/arch/powerpc/include/asm/hw_irq.h
-index 9f4c9d4..ce168bf 100644
+index bd100fc..8fa1901 100644
 --- a/arch/powerpc/include/asm/hw_irq.h
 +++ b/arch/powerpc/include/asm/hw_irq.h
 @@ -13,6 +13,10 @@
@@ -1233,7 +1243,7 @@ index 8773263..aafe4c0 100644
  obj-$(CONFIG_PPC_OF)  += of_device.o of_platform.o prom_parse.o
  obj-$(CONFIG_PPC_CLOCK)   += clock.o
 diff --git a/arch/powerpc/kernel/asm-offsets.c 
b/arch/powerpc/kernel/asm-offsets.c
-index 957ceb7..5e75c5b 100644
+index c09138d..d725dd6 100644
 --- a/arch/powerpc/kernel/asm-offsets.c
 +++ b/arch/powerpc/kernel/asm-offsets.c
 @@ -131,8 +131,12 @@ int main(void)
@@ -1246,10 +1256,10 @@ index 957ceb7..5e75c5b 100644
 +#elif CONFIG_IPIPE
 +  DEFINE(PACAROOTPCPU, offsetof(struct paca_struct, root_percpu));
 +#endif
-   DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_event_pending));
DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id));
  #ifdef CONFIG_PPC_MM_SLICES
-@@ -300,7 +304,9 @@ int main(void)
+   DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct,
+@@ -299,7 +303,9 @@ int main(void)
DEFINE(_DEAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar));
DEFINE(_ESR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
  #else /* CONFIG_PPC64 */
@@ -1409,7 +1419,7 @@ index 1175a85..d559ae1 100644
   * PROM code for specific machines follows.  Put it
   * here so it's easy to add arch-specific sections later.
 diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
-index 07109d8..67a3674 100644
+index 42e9d90..22595e7 100644
 --- a/arch/powerpc/kernel/entry_64.S
 +++ b/arch/powerpc/kernel/entry_64.S
 @@ -33,6 +33,11 @@
@@ -1577,28 +1587,12 @@ index 07109d8..67a3674 100644
  BEGIN_FW_FTR_SECTION
ld  r5,SOFTE(r1)
  FW_FTR_SECTION_ELSE
-@@ -564,12 +654,38 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
-   bl  .perf_event_do_pending
- 27:
- #endif /* CONFIG_PERF_EVENTS */
--
-   /* extract EE bit and use it to restore paca->hard_enabled */
-   ld  r3,_MSR(r1)
+@@ -561,6 +651,23 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
rldicl  r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */
stb r4,PACAHARDIRQEN(r13)
  
 +#else /* !CONFIG_SOFTDISABLE */
 +#ifdef CONFIG_IPIPE
-+#ifdef CONFIG_PERF_EVENTS
-+  /* check paca->perf_event_pending if we're enabling ints */
-+  ld  r5,_MSR(r1)
-+  rldicl  r5,r5,49,63 /* r0 = (r3 >> 15) & 1 */
-+  lbz r3,PACAPERFPEND(r13)
-+  and.r3,r3,r5
-+  beq 27f
-+  bl  .perf_event_do_pending
-+27:
-+#endif /* CONFIG_PERF_EVENTS */
 +#ifdef CONFIG_IPIPE_TRACE_IRQSOFF
 +  ld  r3,_MSR(r1)
 +  rldicl  r3,r3,49,63 /* r0 = (r3 >> 15) & 1 */
@@ -1617,7 +1611,7 @@ index 07109d8..67a3674 100644
  #ifdef CONFIG_PPC_BOOK3E
b   .exception_return_book3e
  #else
-@@ -659,6 +775,7 @@ do_work:
+@@ -650,6 +757,7 @@ do_work:
crandc  eq,cr1*4+eq,eq
bne restore
  
@@ -1625,7 +1619,7 @@ index 07109d8..67a3674 100644
/* Here we are preempting the current task.
 *
 * Ensure interrupts are soft-disabled. We also properly mark
-@@ -669,9 +786,14 @@ do_work:
+@@ -660,9 +768,14 @@ do_work:
stb r0,