* Re: [PATCH/RFCv2] [POWERPC] Add support for freescale watchdog to CPM serial driver.
From: Stephen Rothwell @ 2008-01-18 0:38 UTC (permalink / raw)
To: Jochen Friedrich; +Cc: Scott Wood, linuxppc-dev, linux-kernel
In-Reply-To: <478F4AE3.5090803@scram.de>
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
On Thu, 17 Jan 2008 13:32:35 +0100 Jochen Friedrich <jochen@scram.de> wrote:
>
> If a freescale watchdog device node is present, reset the watchdog
> while waiting for serial input.
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
> arch/powerpc/boot/Makefile | 2 +-
> arch/powerpc/boot/cpm-serial.c | 6 ++++
> arch/powerpc/boot/cuboot-8xx.c | 1 +
> arch/powerpc/boot/ops.h | 2 +
> arch/powerpc/boot/watchdog.c | 65 ++++++++++++++++++++++++++++++++++++++++
I am just wondering if maybe that file name is to generic.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: 2.6.24-rc8-mm1: powerpc oopses
From: Matt Mackall @ 2008-01-18 0:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev, m.kozlowski, paulus, linux-kernel
In-Reply-To: <20080117162913.0323c517.akpm@linux-foundation.org>
On Thu, 2008-01-17 at 16:29 -0800, Andrew Morton wrote:
> Do we need `offset' at all?
Looks like no.
I wonder if there's a good argument for adding a pte_offset_val() which
would let us do:
pteval = pte_offset_val(pmd, addr);
and shrink the map/unmap window and overhead here and possibly
elsewhere?
Anyway, updated but still untested patch now with revealing comment:
diff -r 5595adaea70f fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.c Thu Jan 17 13:26:54 2008 -0600
+++ b/fs/proc/task_mmu.c Thu Jan 17 18:45:57 2008 -0600
@@ -584,18 +585,19 @@
pte_t *pte;
int err = 0;
- pte = pte_offset_map(pmd, addr);
- for (; addr != end; pte++, addr += PAGE_SIZE) {
+ for (; addr != end; addr += PAGE_SIZE) {
u64 pfn = PM_NOT_PRESENT;
+ pte = pte_offset_map(pmd, addr);
if (is_swap_pte(*pte))
pfn = swap_pte_to_pagemap_entry(*pte);
else if (pte_present(*pte))
pfn = pte_pfn(*pte);
+ /* unmap so we're not in atomic when we copy to userspace */
+ pte_unmap(pte);
err = add_to_pagemap(addr, pfn, pm);
if (err)
return err;
}
- pte_unmap(pte - 1);
cond_resched();
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply
* Re: Patches added to master/for-2.6.25 branch of powerpc.git
From: Stephen Rothwell @ 2008-01-18 0:56 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <478F6DCA.5020000@semihalf.com>
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
How about "[POWERPC] make ibmebus use of_(un)register_driver"
(http://patchwork.ozlabs.org/linuxppc/patch?id=16128)? It was acked by
Joachim.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* [PATCH] [POWERPC] Fix a couple of copyright symbols
From: Stephen Rothwell @ 2008-01-18 1:06 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/systbl_chk.c | 2 +-
arch/powerpc/kernel/systbl_chk.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Patchwork strikes again. :-(
diff --git a/arch/powerpc/kernel/systbl_chk.c b/arch/powerpc/kernel/systbl_chk.c
index 77824d1..238aa63 100644
--- a/arch/powerpc/kernel/systbl_chk.c
+++ b/arch/powerpc/kernel/systbl_chk.c
@@ -6,7 +6,7 @@
* Unfortunately, we cannot check for the correct ordering of entries
* using SYSX().
*
- * Copyright © IBM Corporation
+ * Copyright © IBM Corporation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/arch/powerpc/kernel/systbl_chk.sh b/arch/powerpc/kernel/systbl_chk.sh
index 367d208..19415e7 100644
--- a/arch/powerpc/kernel/systbl_chk.sh
+++ b/arch/powerpc/kernel/systbl_chk.sh
@@ -3,7 +3,7 @@
# Just process the CPP output from systbl_chk.c and complain
# if anything is out of order.
#
-# Copyright © 2008 IBM Corporation
+# Copyright © 2008 IBM Corporation
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
--
1.5.3.8
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply related
* Re: 2.6.24-rc8-mm1: powerpc oopses
From: Andrew Morton @ 2008-01-18 1:07 UTC (permalink / raw)
To: Matt Mackall; +Cc: linuxppc-dev, m.kozlowski, paulus, linux-kernel
In-Reply-To: <1200617237.3839.32.camel@cinder.waste.org>
On Thu, 17 Jan 2008 18:47:17 -0600
Matt Mackall <mpm@selenic.com> wrote:
>
> On Thu, 2008-01-17 at 16:29 -0800, Andrew Morton wrote:
> > Do we need `offset' at all?
>
> Looks like no.
>
> I wonder if there's a good argument for adding a pte_offset_val() which
> would let us do:
>
> pteval = pte_offset_val(pmd, addr);
>
> and shrink the map/unmap window and overhead here and possibly
> elsewhere?
>
> Anyway, updated but still untested patch now with revealing comment:
>
> diff -r 5595adaea70f fs/proc/task_mmu.c
> --- a/fs/proc/task_mmu.c Thu Jan 17 13:26:54 2008 -0600
> +++ b/fs/proc/task_mmu.c Thu Jan 17 18:45:57 2008 -0600
> @@ -584,18 +585,19 @@
> pte_t *pte;
> int err = 0;
>
> - pte = pte_offset_map(pmd, addr);
> - for (; addr != end; pte++, addr += PAGE_SIZE) {
> + for (; addr != end; addr += PAGE_SIZE) {
> u64 pfn = PM_NOT_PRESENT;
> + pte = pte_offset_map(pmd, addr);
> if (is_swap_pte(*pte))
> pfn = swap_pte_to_pagemap_entry(*pte);
> else if (pte_present(*pte))
> pfn = pte_pfn(*pte);
> + /* unmap so we're not in atomic when we copy to userspace */
> + pte_unmap(pte);
> err = add_to_pagemap(addr, pfn, pm);
> if (err)
> return err;
> }
> - pte_unmap(pte - 1);
>
> cond_resched();
That worked out nicely.
Wasn't the old code potentially pte_unmap()ping the wrong address? If we
enter with addr==end?
^ permalink raw reply
* Re: 2.6.24-rc8-mm1: powerpc oopses
From: Matt Mackall @ 2008-01-18 1:16 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev, m.kozlowski, paulus, linux-kernel
In-Reply-To: <20080117170754.b5dd139b.akpm@linux-foundation.org>
On Thu, 2008-01-17 at 17:07 -0800, Andrew Morton wrote:
> That worked out nicely.
Cool, feel free to add:
Signed-off-by: Matt Mackall <mpm@selenic.com>
> Wasn't the old code potentially pte_unmap()ping the wrong address? If we
> enter with addr==end?
Yes, that was busted.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply
* Re: ml310 kernel2.6 booting problems
From: Jean-Samuel Chenard @ 2008-01-18 2:49 UTC (permalink / raw)
To: Jogi95; +Cc: linuxppc-embedded
> Date: Thu, 17 Jan 2008 21:19:04 +0100
> From: Joachim Meyer
> Hmmm... I'm not really ready to invest that much time into the PCI for ML=
-310.
> -------------------------------------------------------------------------=
-------
> http://ozlabs.org/pipermail/linuxppc-embedded/2007-December/029211.html
>
> How much work would it be (approximated), and do you think I can success =
(I'm a novice, like you know)?
> Would you help me (Tell me where to start & what to do)?
Hi Joachim,
I was also interested in getting the PCI to run on the ML-310. I did
spend an evening trying to integrate a patch sent over by Stephen
Neuendorffer from Xilinx. I managed to get everything to compile
(basically I fixed a few missing macros and had to search a bit to
ensure that the memory mapping was correctly ported). Unfortunately,
when I tried the new kernel, I think that I must have messed something
up with the interrupt mappings (I am a newbie to PCI) and I had to
remove some interrupt mapping from Stephen's patch.
In any case, my ML-310 was booting the Linux kernel, but something was
not right and I did not get anymore printouts from the UART Lite.
Since I don't have the JTAG cable, I was stuck at this point with
little means to debug the system. One day I'll spoil myself with one
of those platform JTAG USB cables...
I used Z-modem to transfer files to/from my workstation to my CF card
on the ML-310 and this was an acceptable compromise.
I'd still be interested in having the PCI bus working on the ML-310,
but now that I got my BEE2 booting Linux 2.6, its not such a big
priority for me. Let me know if you have some success in that
direction.
Regards,
Jean-Samuel
--=20
Integrated Microsystems Laboratory
McGill University, Montr=E9al, QC, CANADA
Web Page: http://chaos.ece.mcgill.ca
^ permalink raw reply
* [PATCH] Fix carry bug in 128-bit unsigned integer adding
From: Liu Yu @ 2008-01-18 3:21 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Liu Yu
Synchronize it to the definition in include/math-emu/op-4.h for short term.
Signed-off-by: Liu Yu <Yu.Liu@freescale.com>
---
arch/powerpc/math-emu/op-4.h | 40 ++++++++++++++++++++++++++++++----------
1 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/math-emu/op-4.h b/arch/powerpc/math-emu/op-4.h
index fcdd6d0..c9ae626 100644
--- a/arch/powerpc/math-emu/op-4.h
+++ b/arch/powerpc/math-emu/op-4.h
@@ -194,19 +194,39 @@
(X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0)
#ifndef __FP_FRAC_ADD_4
-#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
- (r0 = x0 + y0, \
- r1 = x1 + y1 + (r0 < x0), \
- r2 = x2 + y2 + (r1 < x1), \
- r3 = x3 + y3 + (r2 < x2))
+#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
+ do { \
+ int _c1, _c2, _c3; \
+ r0 = x0 + y0; \
+ _c1 = r0 < x0; \
+ r1 = x1 + y1; \
+ _c2 = r1 < x1; \
+ r1 += _c1; \
+ _c2 |= r1 < _c1; \
+ r2 = x2 + y2; \
+ _c3 = r2 < x2; \
+ r2 += _c2; \
+ _c3 |= r2 < _c2; \
+ r3 = x3 + y3 + _c3; \
+ } while (0)
#endif
#ifndef __FP_FRAC_SUB_4
-#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
- (r0 = x0 - y0, \
- r1 = x1 - y1 - (r0 > x0), \
- r2 = x2 - y2 - (r1 > x1), \
- r3 = x3 - y3 - (r2 > x2))
+#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
+ do { \
+ int _c1, _c2, _c3; \
+ r0 = x0 - y0; \
+ _c1 = r0 > x0; \
+ r1 = x1 - y1; \
+ _c2 = r1 > x1; \
+ r1 -= _c1; \
+ _c2 |= r1 > _c1; \
+ r2 = x2 - y2; \
+ _c3 = r2 > x2; \
+ r2 -= _c2; \
+ _c3 |= r2 > _c2; \
+ r3 = x3 - y3 - _c3; \
+ } while (0)
#endif
#ifndef __FP_FRAC_ADDI_4
--
1.5.2
^ permalink raw reply related
* Re: [PATCH] [POWERPC] Update TQM5200, CM5200 and Motion-PRO _defconfig and .dts files
From: Olof Johansson @ 2008-01-18 3:41 UTC (permalink / raw)
To: Marian Balakowicz; +Cc: linuxppc-dev
In-Reply-To: <478FD118.8030407@semihalf.com>
On Thu, Jan 17, 2008 at 11:05:12PM +0100, Marian Balakowicz wrote:
> Grant Likely wrote:
> > On 1/17/08, Marian Balakowicz <m8@semihalf.com> wrote:
> >> Grant Likely wrote:
> >>> On 1/17/08, Marian Balakowicz <m8@semihalf.com> wrote:
> ...
> >>> Can you split the defconfig changes into a separate patch... That
> >>> being said, how do you feel about merging all the 5200 defconfigs into
> >>> a single defconfig? They are all multiplatform after all and it would
> >>> make maintenance easier.
> >> Ok, I'll split it into two patches.
> >>
> >> But merging defconfigs won't be a good option, boards differ in which
> >> devices they use, some have PCI, some have USB, etc. Having one
> >> defconfig, it would be necessary to manually customize kernel
> >> configuration and remember which options are to be set/disabled.
> >
> > That doesn't matter for defconfigs. That needs to be done when you're
> > tailoring a product regardless. defconfigs are simply a known good
> > configuration; they are not intended to be the deployed config. If
> > the defconfig enables all features used by any of the boards then it
> > should be okay.
>
> That's true, defconfigs are only reference configurations, but still,
> I would opt for a separate defconfigs as it is more clear which target
> given defconfig is meant for and it is more convenient for development
> and customer to have it separate. And IMHO it's actually easier to
> maintain, as you don't need to consider all three boards each time you
> update defconfig and don't need to test each defconfig change on three
> (right now) boards, etc.
I disagree, I have one defconfig for all our boards to date. It means I
only have one kernel to build to test on all boards, instead of having
to build a number of different kernels. Keeping it fairly generic also
means a customer can start out using the generic kernel in case they
want to, and later on add their own drivers and prune out what is not
needed.
-Olof
^ permalink raw reply
* Re: L3CR
From: Kumar Gala @ 2008-01-18 3:41 UTC (permalink / raw)
To: linuxppcdev; +Cc: Linuxppc-dev
In-Reply-To: <20080117222624.19372.qmail@kunk.qbjnet.com>
On Jan 17, 2008, at 4:26 PM, linuxppcdev@lists.qbjnet.com wrote:
> It there a l3cr parameter? It's not in the kernel documentation. I'm
> trying to enable L2 and L3 cache on a G4 cpu upgrade board in a
> powermac.
>
>> From OSX I was able to get the values of:
> l2cr = 0x80000000
> and
> l3cr = 0x9F020300
>
> from a cache config utility. I've seen references to l3cr setting on
> bsd lists but not for linux.
>
> Thanks...
have you looked in /proc/sys/kernel/l[2,3]cr?
(can't remember if we had a l3cr as well)
- k
^ permalink raw reply
* [PATCH] [POWERPC] Fix incorrect interrupt map on FSL reference boards
From: Kumar Gala @ 2008-01-18 4:33 UTC (permalink / raw)
To: linuxppc-dev
The ULI based boards had the interrupt maps for USB on the ULI incorrectly
set.
Also, the MPC8572DS was missing the interrupt-map-mask for the 3rd PCIe
controller.
---
arch/powerpc/boot/dts/mpc8544ds.dts | 6 +++---
arch/powerpc/boot/dts/mpc8572ds.dts | 7 ++++---
arch/powerpc/boot/dts/mpc8641_hpcn.dts | 6 +++---
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 54b3bdf..688af9d 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -304,9 +304,9 @@
interrupt-map = <
// IDSEL 0x1c USB
e000 0 0 1 &i8259 c 2
- e100 0 0 1 &i8259 9 2
- e200 0 0 1 &i8259 a 2
- e300 0 0 1 &i8259 b 2
+ e100 0 0 2 &i8259 9 2
+ e200 0 0 3 &i8259 a 2
+ e300 0 0 4 &i8259 b 2
// IDSEL 0x1d Audio
e800 0 0 1 &i8259 6 2
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts
index 233e0d5..813c259 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -334,9 +334,9 @@
// IDSEL 0x1c USB
e000 0 0 1 &i8259 c 2
- e100 0 0 1 &i8259 9 2
- e200 0 0 1 &i8259 a 2
- e300 0 0 1 &i8259 b 2
+ e100 0 0 2 &i8259 9 2
+ e200 0 0 3 &i8259 a 2
+ e300 0 0 4 &i8259 b 2
// IDSEL 0x1d Audio
e800 0 0 1 &i8259 6 2
@@ -481,6 +481,7 @@
clock-frequency = <1fca055>;
interrupt-parent = <&mpic>;
interrupts = <1b 2>;
+ interrupt-map-mask = <f800 0 0 7>;
interrupt-map = <
/* IDSEL 0x0 */
0000 0 0 1 &mpic 0 1
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 86fc228..a719179 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -326,9 +326,9 @@
// IDSEL 0x1c USB
e000 0 0 1 &i8259 c 2
- e100 0 0 1 &i8259 9 2
- e200 0 0 1 &i8259 a 2
- e300 0 0 1 &i8259 b 2
+ e100 0 0 2 &i8259 9 2
+ e200 0 0 3 &i8259 a 2
+ e300 0 0 4 &i8259 b 2
// IDSEL 0x1d Audio
e800 0 0 1 &i8259 6 2
--
1.5.3.7
^ permalink raw reply related
* Re: Patches added to master/for-2.6.25 branch of powerpc.git
From: Paul Mackerras @ 2008-01-18 4:36 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa40801170752j5e41b1cbs82cd21bf47c7d92e@mail.gmail.com>
Grant Likely writes:
> Paul, can you also please pull the following 52xx changes?
Could you please re-do your tree and make sure the headline for each
commit starts with "[POWERPC]" (unless it isn't powerpc-specific, in
which case it probably shouldn't be in your tree...).
Thanks,
Paul.
^ permalink raw reply
* [PATCH 0/2] Add crashdump shutdown hooks
From: Michael Neuling @ 2008-01-18 4:50 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <1200608167.508733.302962562869.qpush@coopers>
The following patches add crashdump shutdown hooks for POWERPC.
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
Sorry, last update didn't include both patches.
^ permalink raw reply
* [PATCH 1/2] Make setjmp/longjmp code generic
From: Michael Neuling @ 2008-01-18 4:50 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <1200631830.307661.474596673142.qpush@coopers>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 6605 bytes --]
This makes the setjmp/longjmp code used by xmon, generically available
to other code. It also removes the requirement for debugger hooks to
be only called on 0x300 (data storage) exception.
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
arch/powerpc/kernel/misc.S | 65 +++++++++++++++++++++++++++++++++++++++++++
arch/powerpc/mm/fault.c | 6 +--
arch/powerpc/xmon/setjmp.S | 61 ----------------------------------------
arch/powerpc/xmon/xmon.c | 6 ---
include/asm-powerpc/setjmp.h | 18 +++++++++++
5 files changed, 86 insertions(+), 70 deletions(-)
Index: linux-2.6-ozlabs/arch/powerpc/kernel/misc.S
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/misc.S
+++ linux-2.6-ozlabs/arch/powerpc/kernel/misc.S
@@ -8,6 +8,8 @@
* Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
* PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
*
+ * setjmp/longjmp code by Paul Mackerras.
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
@@ -15,6 +17,8 @@
*/
#include <asm/ppc_asm.h>
#include <asm/unistd.h>
+#include <asm/asm-compat.h>
+#include <asm/asm-offsets.h>
.text
@@ -51,3 +55,64 @@ _GLOBAL(kernel_execve)
bnslr
neg r3,r3
blr
+
+_GLOBAL(setjmp)
+ mflr r0
+ PPC_STL r0,0(r3)
+ PPC_STL r1,SZL(r3)
+ PPC_STL r2,2*SZL(r3)
+ mfcr r0
+ PPC_STL r0,3*SZL(r3)
+ PPC_STL r13,4*SZL(r3)
+ PPC_STL r14,5*SZL(r3)
+ PPC_STL r15,6*SZL(r3)
+ PPC_STL r16,7*SZL(r3)
+ PPC_STL r17,8*SZL(r3)
+ PPC_STL r18,9*SZL(r3)
+ PPC_STL r19,10*SZL(r3)
+ PPC_STL r20,11*SZL(r3)
+ PPC_STL r21,12*SZL(r3)
+ PPC_STL r22,13*SZL(r3)
+ PPC_STL r23,14*SZL(r3)
+ PPC_STL r24,15*SZL(r3)
+ PPC_STL r25,16*SZL(r3)
+ PPC_STL r26,17*SZL(r3)
+ PPC_STL r27,18*SZL(r3)
+ PPC_STL r28,19*SZL(r3)
+ PPC_STL r29,20*SZL(r3)
+ PPC_STL r30,21*SZL(r3)
+ PPC_STL r31,22*SZL(r3)
+ li r3,0
+ blr
+
+_GLOBAL(longjmp)
+ PPC_LCMPI r4,0
+ bne 1f
+ li r4,1
+1: PPC_LL r13,4*SZL(r3)
+ PPC_LL r14,5*SZL(r3)
+ PPC_LL r15,6*SZL(r3)
+ PPC_LL r16,7*SZL(r3)
+ PPC_LL r17,8*SZL(r3)
+ PPC_LL r18,9*SZL(r3)
+ PPC_LL r19,10*SZL(r3)
+ PPC_LL r20,11*SZL(r3)
+ PPC_LL r21,12*SZL(r3)
+ PPC_LL r22,13*SZL(r3)
+ PPC_LL r23,14*SZL(r3)
+ PPC_LL r24,15*SZL(r3)
+ PPC_LL r25,16*SZL(r3)
+ PPC_LL r26,17*SZL(r3)
+ PPC_LL r27,18*SZL(r3)
+ PPC_LL r28,19*SZL(r3)
+ PPC_LL r29,20*SZL(r3)
+ PPC_LL r30,21*SZL(r3)
+ PPC_LL r31,22*SZL(r3)
+ PPC_LL r0,3*SZL(r3)
+ mtcrf 0x38,r0
+ PPC_LL r0,0(r3)
+ PPC_LL r1,SZL(r3)
+ PPC_LL r2,2*SZL(r3)
+ mtlr r0
+ mr r3,r4
+ blr
Index: linux-2.6-ozlabs/arch/powerpc/mm/fault.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/mm/fault.c
+++ linux-2.6-ozlabs/arch/powerpc/mm/fault.c
@@ -167,10 +167,8 @@ int __kprobes do_page_fault(struct pt_re
if (notify_page_fault(regs))
return 0;
- if (trap == 0x300) {
- if (debugger_fault_handler(regs))
- return 0;
- }
+ if (unlikely(debugger_fault_handler(regs)))
+ return 0;
/* On a kernel SLB miss we can only check for a valid exception entry */
if (!user_mode(regs) && (address >= TASK_SIZE))
Index: linux-2.6-ozlabs/arch/powerpc/xmon/setjmp.S
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/xmon/setjmp.S
+++ linux-2.6-ozlabs/arch/powerpc/xmon/setjmp.S
@@ -12,67 +12,6 @@
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
-_GLOBAL(xmon_setjmp)
- mflr r0
- PPC_STL r0,0(r3)
- PPC_STL r1,SZL(r3)
- PPC_STL r2,2*SZL(r3)
- mfcr r0
- PPC_STL r0,3*SZL(r3)
- PPC_STL r13,4*SZL(r3)
- PPC_STL r14,5*SZL(r3)
- PPC_STL r15,6*SZL(r3)
- PPC_STL r16,7*SZL(r3)
- PPC_STL r17,8*SZL(r3)
- PPC_STL r18,9*SZL(r3)
- PPC_STL r19,10*SZL(r3)
- PPC_STL r20,11*SZL(r3)
- PPC_STL r21,12*SZL(r3)
- PPC_STL r22,13*SZL(r3)
- PPC_STL r23,14*SZL(r3)
- PPC_STL r24,15*SZL(r3)
- PPC_STL r25,16*SZL(r3)
- PPC_STL r26,17*SZL(r3)
- PPC_STL r27,18*SZL(r3)
- PPC_STL r28,19*SZL(r3)
- PPC_STL r29,20*SZL(r3)
- PPC_STL r30,21*SZL(r3)
- PPC_STL r31,22*SZL(r3)
- li r3,0
- blr
-
-_GLOBAL(xmon_longjmp)
- PPC_LCMPI r4,0
- bne 1f
- li r4,1
-1: PPC_LL r13,4*SZL(r3)
- PPC_LL r14,5*SZL(r3)
- PPC_LL r15,6*SZL(r3)
- PPC_LL r16,7*SZL(r3)
- PPC_LL r17,8*SZL(r3)
- PPC_LL r18,9*SZL(r3)
- PPC_LL r19,10*SZL(r3)
- PPC_LL r20,11*SZL(r3)
- PPC_LL r21,12*SZL(r3)
- PPC_LL r22,13*SZL(r3)
- PPC_LL r23,14*SZL(r3)
- PPC_LL r24,15*SZL(r3)
- PPC_LL r25,16*SZL(r3)
- PPC_LL r26,17*SZL(r3)
- PPC_LL r27,18*SZL(r3)
- PPC_LL r28,19*SZL(r3)
- PPC_LL r29,20*SZL(r3)
- PPC_LL r30,21*SZL(r3)
- PPC_LL r31,22*SZL(r3)
- PPC_LL r0,3*SZL(r3)
- mtcrf 0x38,r0
- PPC_LL r0,0(r3)
- PPC_LL r1,SZL(r3)
- PPC_LL r2,2*SZL(r3)
- mtlr r0
- mr r3,r4
- blr
-
/*
* Grab the register values as they are now.
* This won't do a particularily good job because we really
Index: linux-2.6-ozlabs/arch/powerpc/xmon/xmon.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/xmon/xmon.c
+++ linux-2.6-ozlabs/arch/powerpc/xmon/xmon.c
@@ -40,6 +40,7 @@
#include <asm/spu.h>
#include <asm/spu_priv1.h>
#include <asm/firmware.h>
+#include <asm/setjmp.h>
#ifdef CONFIG_PPC64
#include <asm/hvcall.h>
@@ -71,12 +72,9 @@ static unsigned long ncsum = 4096;
static int termch;
static char tmpstr[128];
-#define JMP_BUF_LEN 23
static long bus_error_jmp[JMP_BUF_LEN];
static int catch_memory_errors;
static long *xmon_fault_jmp[NR_CPUS];
-#define setjmp xmon_setjmp
-#define longjmp xmon_longjmp
/* Breakpoint stuff */
struct bpt {
@@ -162,8 +160,6 @@ int xmon_no_auto_backtrace;
extern void xmon_enter(void);
extern void xmon_leave(void);
-extern long setjmp(long *);
-extern void longjmp(long *, long);
extern void xmon_save_regs(struct pt_regs *);
#ifdef CONFIG_PPC64
Index: linux-2.6-ozlabs/include/asm-powerpc/setjmp.h
===================================================================
--- /dev/null
+++ linux-2.6-ozlabs/include/asm-powerpc/setjmp.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright © 2008 Michael Neuling IBM Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+#ifndef _ASM_POWERPC_SETJMP_H
+#define _ASM_POWERPC_SETJMP_H
+
+#define JMP_BUF_LEN 23
+
+extern long setjmp(long *);
+extern void longjmp(long *, long);
+
+#endif /* _ASM_POWERPC_SETJMP_H */
^ permalink raw reply
* [PATCH 2/2] kdump shutdown hook support
From: Michael Neuling @ 2008-01-18 4:50 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <1200631830.307661.474596673142.qpush@coopers>
This adds hooks into the default_machine_crash_shutdown so drivers can
register a function to be run in the first kernel before we hand off
to the second kernel. This should only be used in exceptional
circumstances, like where the device can't be reset in the second
kernel alone (as is the case with eHEA). To emphasize this, the
number of handles allowed to be registered is currently #def to 1.
This uses the setjmp/longjmp code to call out to the registered hooks,
so any bogus exceptions we encounter will hopefully be recoverable.
Tested with bogus data and instruction exceptions.
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
arch/powerpc/kernel/crash.c | 106 +++++++++++++++++++++++++++++++++++++++++---
include/asm-powerpc/kexec.h | 3 +
2 files changed, 104 insertions(+), 5 deletions(-)
Index: linux-2.6-ozlabs/arch/powerpc/kernel/crash.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/crash.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/crash.c
@@ -32,6 +32,8 @@
#include <asm/lmb.h>
#include <asm/firmware.h>
#include <asm/smp.h>
+#include <asm/system.h>
+#include <asm/setjmp.h>
#ifdef DEBUG
#include <asm/udbg.h>
@@ -45,6 +47,11 @@ int crashing_cpu = -1;
static cpumask_t cpus_in_crash = CPU_MASK_NONE;
cpumask_t cpus_in_sr = CPU_MASK_NONE;
+#define CRASH_HANDLER_MAX 1
+/* NULL terminated list of shutdown handles */
+static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1];
+static DEFINE_SPINLOCK(crash_handlers_lock);
+
#ifdef CONFIG_SMP
static atomic_t enter_on_soft_reset = ATOMIC_INIT(0);
@@ -285,9 +292,72 @@ static inline void crash_kexec_stop_spus
}
#endif /* CONFIG_SPU_BASE */
+/*
+ * Register a function to be called on shutdown. Only use this if you
+ * can't reset your device in the second kernel.
+ */
+int crash_shutdown_register(crash_shutdown_t handler)
+{
+ unsigned int i, rc;
+
+ spin_lock(&crash_handlers_lock);
+ for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
+ if (!crash_shutdown_handles[i]) {
+ /* Insert handle at first empty entry */
+ crash_shutdown_handles[i] = handler;
+ rc = 0;
+ break;
+ }
+
+ if (i == CRASH_HANDLER_MAX) {
+ printk(KERN_ERR "Crash shutdown handles full, "
+ "not registered.\n");
+ rc = 1;
+ }
+
+ spin_unlock(&crash_handlers_lock);
+ return rc;
+}
+EXPORT_SYMBOL(crash_shutdown_register);
+
+int crash_shutdown_unregister(crash_shutdown_t handler)
+{
+ unsigned int i, rc;
+
+ spin_lock(&crash_handlers_lock);
+ for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
+ if (crash_shutdown_handles[i] == handler)
+ break;
+
+ if (i == CRASH_HANDLER_MAX) {
+ printk(KERN_ERR "Crash shutdown handle not found\n");
+ rc = 1;
+ } else {
+ /* Shift handles down */
+ for (; crash_shutdown_handles[i]; i++)
+ crash_shutdown_handles[i] =
+ crash_shutdown_handles[i+1];
+ rc = 0;
+ }
+
+ spin_unlock(&crash_handlers_lock);
+ return rc;
+}
+EXPORT_SYMBOL(crash_shutdown_unregister);
+
+static unsigned long crash_shutdown_buf[JMP_BUF_LEN];
+
+static int handle_fault(struct pt_regs *regs)
+{
+ longjmp(crash_shutdown_buf, 1);
+ return 0;
+}
+
void default_machine_crash_shutdown(struct pt_regs *regs)
{
- unsigned int irq;
+ unsigned int i;
+ int (*old_handler)(struct pt_regs *regs);
+
/*
* This function is only called after the system
@@ -301,15 +371,41 @@ void default_machine_crash_shutdown(stru
*/
hard_irq_disable();
- for_each_irq(irq) {
- struct irq_desc *desc = irq_desc + irq;
+ for_each_irq(i) {
+ struct irq_desc *desc = irq_desc + i;
if (desc->status & IRQ_INPROGRESS)
- desc->chip->eoi(irq);
+ desc->chip->eoi(i);
if (!(desc->status & IRQ_DISABLED))
- desc->chip->disable(irq);
+ desc->chip->disable(i);
+ }
+
+ /*
+ * Call registered shutdown routines savely. Swap out
+ * __debugger_fault_handler, and replace on exit.
+ */
+ old_handler = __debugger_fault_handler;
+ __debugger_fault_handler = handle_fault;
+ for (i = 0; crash_shutdown_handles[i]; i++) {
+ if (setjmp(crash_shutdown_buf) == 0) {
+ /*
+ * Insert syncs and delay to ensure
+ * instructions in the dangerous region don't
+ * leak away from this protected region.
+ */
+ asm volatile("sync; isync");
+ /* dangerous region */
+ crash_shutdown_handles[i]();
+ asm volatile("sync; isync");
+ /*
+ * wait a little while to see if we get a
+ * machine check
+ */
+ __delay(200);
+ }
}
+ __debugger_fault_handler = old_handler;
/*
* Make a note of crashing cpu. Will be used in machine_kexec
Index: linux-2.6-ozlabs/include/asm-powerpc/kexec.h
===================================================================
--- linux-2.6-ozlabs.orig/include/asm-powerpc/kexec.h
+++ linux-2.6-ozlabs/include/asm-powerpc/kexec.h
@@ -123,6 +123,9 @@ struct pt_regs;
extern void default_machine_kexec(struct kimage *image);
extern int default_machine_kexec_prepare(struct kimage *image);
extern void default_machine_crash_shutdown(struct pt_regs *regs);
+typedef void (*crash_shutdown_t)(void);
+extern int crash_shutdown_register(crash_shutdown_t handler);
+extern int crash_shutdown_unregister(crash_shutdown_t handler);
extern void machine_kexec_simple(struct kimage *image);
extern void crash_kexec_secondary(struct pt_regs *regs);
^ permalink raw reply
* Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)
From: Michael Ellerman @ 2008-01-18 5:34 UTC (permalink / raw)
To: Balbir Singh; +Cc: linuxppc-dev, LKML
In-Reply-To: <20071207223714.11448.91386.sendpatchset@balbir-laptop>
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote:
> Changelog
>
> 1. Get rid of the constant 5 (based on comments from
> Geert.Uytterhoeven@sonycom.com)
> 2. Implement suggestions from Olof Johannson
> 3. Check if cmdline is NULL in fake_numa_create_new_node()
>
> Tested with additional parameters from Olof
>
> numa=debug,fake=
> numa=foo,fake=bar
I'm not sure why yet, but git bisect tells me it's this patch that's
causing the for-2.6.25 tree to explode on boot on cell machines.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)
From: Michael Ellerman @ 2008-01-18 5:44 UTC (permalink / raw)
To: Balbir Singh; +Cc: linuxppc-dev, Paul Mackerras, LKML
In-Reply-To: <1200634493.7806.0.camel@concordia.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]
On Fri, 2008-01-18 at 16:34 +1100, Michael Ellerman wrote:
> On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote:
> > Changelog
> >
> > 1. Get rid of the constant 5 (based on comments from
> > Geert.Uytterhoeven@sonycom.com)
> > 2. Implement suggestions from Olof Johannson
> > 3. Check if cmdline is NULL in fake_numa_create_new_node()
> >
> > Tested with additional parameters from Olof
> >
> > numa=debug,fake=
> > numa=foo,fake=bar
>
>
> I'm not sure why yet, but git bisect tells me it's this patch that's
> causing the for-2.6.25 tree to explode on boot on cell machines.
This fixes it, although I'm a little worried about some of the
removals/movings of node_set_online() in the patch.
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 1666e7d..dcedc26 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -49,7 +49,6 @@ static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn,
static unsigned int fake_nid = 0;
static unsigned long long curr_boundary = 0;
- *nid = fake_nid;
if (!p)
return 0;
@@ -60,6 +59,7 @@ static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn,
if (mem < curr_boundary)
return 0;
+ *nid = fake_nid;
curr_boundary = mem;
if ((end_pfn << PAGE_SHIFT) > mem) {
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related
* Re: Patches added to master/for-2.6.25 branch of powerpc.git
From: Grant Likely @ 2008-01-18 5:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18320.11472.758570.408071@cargo.ozlabs.ibm.com>
On 1/17/08, Paul Mackerras <paulus@samba.org> wrote:
> Grant Likely writes:
>
> > Paul, can you also please pull the following 52xx changes?
>
> Could you please re-do your tree and make sure the headline for each
> commit starts with "[POWERPC]" (unless it isn't powerpc-specific, in
> which case it probably shouldn't be in your tree...).
Oops, I thought I had done that. Sorry, I'll get that respun ASAP.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)
From: Michael Ellerman @ 2008-01-18 5:55 UTC (permalink / raw)
To: Balbir Singh; +Cc: linuxppc-dev, Paul Mackerras, LKML
In-Reply-To: <20071207223714.11448.91386.sendpatchset@balbir-laptop>
[-- Attachment #1: Type: text/plain, Size: 3288 bytes --]
On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote:
> Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake
> NUMA nodes can be specified using the following command line option
>
>
> Comments are as always welcome!
Here's some :)
> diff -puN arch/powerpc/mm/numa.c~ppc-fake-numa-easy arch/powerpc/mm/numa.c
> --- linux-2.6.24-rc4-mm1/arch/powerpc/mm/numa.c~ppc-fake-numa-easy 2007-12-07 21:25:55.000000000 +0530
> +++ linux-2.6.24-rc4-mm1-balbir/arch/powerpc/mm/numa.c 2007-12-08 03:19:46.000000000 +0530
> @@ -24,6 +24,8 @@
>
> static int numa_enabled = 1;
>
> +static char *cmdline __initdata;
Can you call this fake_numa_args or something, cmdline is a bit generic.
> @@ -39,6 +41,43 @@ static bootmem_data_t __initdata plat_no
> static int min_common_depth;
> static int n_mem_addr_cells, n_mem_size_cells;
>
> +static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn,
> + unsigned int *nid)
> +{
> + unsigned long long mem;
> + char *p = cmdline;
> + static unsigned int fake_nid = 0;
> + static unsigned long long curr_boundary = 0;
> +
> + *nid = fake_nid;
As I mentioned in my other email I think this is broken, you
unconditionally overwrite *nid, even if no fake numa was specified?
> + if (!p)
> + return 0;
> +
> + mem = memparse(p, &p);
> + if (!mem)
> + return 0;
> +
> + if (mem < curr_boundary)
> + return 0;
> +
> + curr_boundary = mem;
> +
> + if ((end_pfn << PAGE_SHIFT) > mem) {
> + /*
> + * Skip commas and spaces
> + */
> + while (*p == ',' || *p == ' ' || *p == '\t')
> + p++;
> +
> + cmdline = p;
> + fake_nid++;
> + *nid = fake_nid;
> + dbg("created new fake_node with id %d\n", fake_nid);
> + return 1;
> + }
> + return 0;
> +}
> +
> static void __cpuinit map_cpu_to_node(int cpu, int node)
> {
> numa_cpu_lookup_table[cpu] = node;
> @@ -344,12 +383,14 @@ static void __init parse_drconf_memory(s
> if (nid == 0xffff || nid >= MAX_NUMNODES)
> nid = default_nid;
> }
> - node_set_online(nid);
>
> size = numa_enforce_memory_limit(start, lmb_size);
> if (!size)
> continue;
>
> + fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid);
> + node_set_online(nid);
I can't convince myself that this is 100% ok, the moving of
node_set_online(). At the very least it's a change in behaviour,
previously we would online the node regardless of the memory limit.
> add_active_range(nid, start >> PAGE_SHIFT,
> (start >> PAGE_SHIFT) + (size >> PAGE_SHIFT));
> }
> @@ -429,7 +470,6 @@ new_range:
> nid = of_node_to_nid_single(memory);
> if (nid < 0)
> nid = default_nid;
> - node_set_online(nid);
>
> if (!(size = numa_enforce_memory_limit(start, size))) {
> if (--ranges)
> @@ -438,6 +478,9 @@ new_range:
> continue;
> }
>
> + fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid);
> + node_set_online(nid);
Ditto previous comment.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH v5] [POWERPC] Add LED driver for Promess Motion-PRO board.
From: Stephen Rothwell @ 2008-01-18 6:06 UTC (permalink / raw)
To: Marian Balakowicz; +Cc: linuxppc-dev
In-Reply-To: <20080117180805.18035.60818.stgit@hekate.izotz.org>
[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]
Hi Marian,
On Thu, 17 Jan 2008 19:09:17 +0100 Marian Balakowicz <m8@semihalf.com> wrote:
>
> +static int __devinit mpled_probe(struct of_device *op,
> + const struct of_device_id *match)
> +{
> + struct motionpro_led *mpled;
> + const unsigned int *of_blink_delay;
> + const char *label;
> + int err;
> +
> + dev_dbg(&op->dev, "mpled_probe: node=%s (op=%p, match=%p)\n",
> + op->node->name, op, match);
> +
> + mpled = kzalloc(sizeof(*mpled), GFP_KERNEL);
> + if (!mpled)
> + return -ENOMEM;
> +
> + mpled->gpt = of_iomap(op->node, 0);
> + if (!mpled->gpt) {
> + printk(KERN_ERR __FILE__ ": "
> + "Error mapping GPT registers for LED %s\n",
> + op->node->full_name);
> + err = -EIO;
> + goto err_free;
> + }
> +
> + /* initialize GPT for LED use */
> + mpled_init_led(&mpled->gpt->mode);
> +
> + spin_lock_init(&mpled->led_lock);
> + mpled->mode = LED_MODE_KERNEL;
> +
> + /* get LED label, used to register led classdev */
> + label = of_get_property(op->node, "label", NULL);
> + if (label == NULL) {
> + printk(KERN_ERR __FILE__ ": "
> + "No label property provided for LED %s\n",
> + op->node->full_name);
> + err = -EINVAL;
> + goto err_free;
goto err;
> +static struct of_device_id mpled_match[] = {
Make this const, please.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] Convert MPC837x device trees to dts-v1
From: Kumar Gala @ 2008-01-18 6:31 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev
In-Reply-To: <1199791957-5309-1-git-send-email-leoli@freescale.com>
On Jan 8, 2008, at 5:32 AM, Li Yang wrote:
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> arch/powerpc/boot/dts/mpc8377_mds.dts | 148 +++++++++++++++
> +---------------
> arch/powerpc/boot/dts/mpc8378_mds.dts | 140 ++++++++++++++
> +---------------
> arch/powerpc/boot/dts/mpc8379_mds.dts | 156 ++++++++++++++++
> +----------------
> 3 files changed, 225 insertions(+), 219 deletions(-)
applied.
- k
^ permalink raw reply
* Re: [PATCH 1/3] add default device trees for MPC837x MDS board
From: Kumar Gala @ 2008-01-18 6:31 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
In-Reply-To: <1199707400-23588-1-git-send-email-leoli@freescale.com>
On Jan 7, 2008, at 6:03 AM, Li Yang wrote:
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> address comments and use new dts spec.
>
> arch/powerpc/boot/dts/mpc8377_mds.dts | 277 ++++++++++++++++++++++++
> +++++++
> arch/powerpc/boot/dts/mpc8378_mds.dts | 263 ++++++++++++++++++++++++
> +++++
> arch/powerpc/boot/dts/mpc8379_mds.dts | 291 ++++++++++++++++++++++++
> +++++++++
> 3 files changed, 831 insertions(+), 0 deletions(-)
applied.
- k
^ permalink raw reply
* Re: [PATCH 2/3 v2] add MPC837x USB platform support
From: Kumar Gala @ 2008-01-18 6:37 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus, sfr
In-Reply-To: <1199776726-22963-1-git-send-email-leoli@freescale.com>
On Jan 8, 2008, at 1:18 AM, Li Yang wrote:
> Add chip specific and board specific initialization for MPC837x USB.
>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> arch/powerpc/platforms/83xx/mpc837x_mds.c | 51 ++++++++++++++++++++
> +++++++++
> arch/powerpc/platforms/83xx/mpc83xx.h | 3 ++
> arch/powerpc/platforms/83xx/usb.c | 40 ++++++++++++++++++++
> ++
> 3 files changed, 94 insertions(+), 0 deletions(-)
applied.
- k
^ permalink raw reply
* Re: [PATCH 3/3 v2] USB device tree cleanups
From: Kumar Gala @ 2008-01-18 6:38 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus, sfr
In-Reply-To: <1199776726-22963-2-git-send-email-leoli@freescale.com>
On Jan 8, 2008, at 1:18 AM, Li Yang wrote:
> Remove device_type = "usb"
>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> Documentation/powerpc/booting-without-of.txt | 4 ----
> arch/powerpc/boot/dts/mpc8313erdb.dts | 1 -
> arch/powerpc/boot/dts/mpc832x_mds.dts | 1 -
> arch/powerpc/boot/dts/mpc8349emitx.dts | 2 --
> arch/powerpc/boot/dts/mpc8349emitxgp.dts | 1 -
> arch/powerpc/boot/dts/mpc834x_mds.dts | 2 --
> arch/powerpc/boot/dts/mpc836x_mds.dts | 1 -
> arch/powerpc/platforms/83xx/usb.c | 8 ++++----
> arch/powerpc/sysdev/fsl_soc.c | 12 +++++-------
> 9 files changed, 9 insertions(+), 23 deletions(-)
applied.
- k
^ permalink raw reply
* Re: SCHED_FIFO & System()
From: Matias Sundman @ 2008-01-18 6:38 UTC (permalink / raw)
To: Scott Wood, Arnon Kaufman(Work); +Cc: linuxppc-embedded@ozlabs.org
In-Reply-To: <478FD3B7.2030105@freescale.com>
Hello,
/>>Are you running a preemptible kernel? [Scott]/
Yes the Kernel is configured as - Preemptible Kernel (Low-Latency Desktop)
/>>//what you actually need is a better kernel preemption such as using
Ingo Molnar 's PREEMPT_RT patch. (it may reduce performance a little)
[Arnon]
/
Ok - we can try to enable the PREEMPT_RT patches.
-------------------------------
I also tried with a sched_yield() before the call to system() in order
to see if the behavior changed somewhat but it didn't.
Cheers // Matias :-)
Scott Wood skrev:
> Matias Sundman wrote:
>
>> Hello,
>> I have some strange behavior in one of my systems.
>>
>> I have a real-time thread under SCHED_FIFO which is running every 10ms.
>> It is blocking on a semaphore and released by a timer interrupt every 10ms.
>> Generally this works really well.
>>
>> However, there is a module in the system that makes a / system() / call
>> from c-code ;
>>
>> system("run_my_script");
>>
>> By calling and running a bash script. Independent of how the actual
>> script looks like the real time thread does not get scheduled under 80ms
>> -- the time it takes
>> for the system() call to finish.
>>
>
> Are you running a preemptible kernel?
>
> -Scott
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[From : Arnon Kaufman(Work) <arnon.work@gmail.com>]
I've seen this kind of behavior. i may guess that you configure the
kernel with PREEMPT, assuming it will solve the problem for you.
I'll split the problem into two:
1. program loading stage is finished (+ reschedule)
2. thread execution time (delay)
when executing a new application it's involved with plenty of kernel
activity such as fetching the application from storage, loader
relocation,allocating and remapping pages, resolving dynamic linking
etc..., all the activity occurs under the hood of the kernel, suspending
most of the kernel activities, due to many spin locks on the way. that
delays other kernel threads as well, and even workqueues.
trying to bypass the symptom - re-running the exact external
application , should not be involved with a second delay, as it was
cached. so may be running the external application in advance may be
good enough for you.
what you actually need is a better kernel preemption such as using Ingo
Molnar 's PREEMPT_RT patch. (it may reduce performance a little).
the second part is that the scheduler delays the thread execution as it
think other kernel's entities has a higher priority such as softirqs,
workqueue, etc...
the PREEMPT_RT may solve this problem as well as it bring a better
priority control, with the addition of priority inheritance.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox