Re: [Powerpc/SLQB] Next June 06 : BUG during scsi initialization

2009-06-07 Thread Pekka J Enberg
Hi Sachin,

On Fri, 5 Jun 2009, Sachin Sant wrote:
 I can still recreate this bug on a Power 6 hardware with today's next tree.
 I can recreate this problem at will.
 Let me know if i can help in debugging this problem.

Can you please reproduce the issue with this debugging patch applied and 
post the result?

Pekka

From 27189e1e1d2890e98cb029bd1121c86b8c53ecd9 Mon Sep 17 00:00:00 2001
From: Pekka Enberg penb...@cs.helsinki.fi
Date: Sun, 7 Jun 2009 11:03:50 +0300
Subject: [PATCH] slqb: debugging

Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi
---
 mm/slqb.c |   13 -
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/mm/slqb.c b/mm/slqb.c
index 29bb005..dce39d4 100644
--- a/mm/slqb.c
+++ b/mm/slqb.c
@@ -1382,6 +1382,8 @@ static noinline void *__slab_alloc_page(struct kmem_cache 
*s,
l = c-list;
page-list = l;
 
+   printk(KERN_INFO %s: cpu=%d, cache_cpu=%p, cache_list=%p\n, 
__func__, cpu, c, l);
+
spin_lock(l-page_lock);
l-nr_slabs++;
l-nr_partial++;
@@ -1393,11 +1395,15 @@ static noinline void *__slab_alloc_page(struct 
kmem_cache *s,
} else {
 #ifdef CONFIG_NUMA
struct kmem_cache_node *n;
+   int nid;
 
-   n = s-node_slab[slqb_page_to_nid(page)];
+   nid = slqb_page_to_nid(page);
+   n = s-node_slab[nid];
l = n-list;
page-list = l;
 
+   printk(KERN_INFO %s: nid=%d, cache_node=%p, cache_list=%p\n, 
__func__, nid, n, l);
+
spin_lock(n-list_lock);
spin_lock(l-page_lock);
l-nr_slabs++;
@@ -2028,6 +2034,8 @@ static void free_kmem_cache_nodes(struct kmem_cache *s)
for_each_node_state(node, N_NORMAL_MEMORY) {
struct kmem_cache_node *n;
 
+   printk(KERN_INFO %s: cache=%s, node=%d\n, __func__, s-name, 
node);
+
n = s-node_slab[node];
if (n) {
kmem_cache_free(kmem_node_cache, n);
@@ -2043,8 +2051,11 @@ static int alloc_kmem_cache_nodes(struct kmem_cache *s)
for_each_node_state(node, N_NORMAL_MEMORY) {
struct kmem_cache_node *n;
 
+   printk(KERN_INFO %s: cache=%s, node=%d\n, __func__, s-name, 
node);
+
n = kmem_cache_alloc_node(kmem_node_cache, GFP_KERNEL, node);
if (!n) {
+   printk(KERN_INFO %s: %s: kmem_cache_alloc_node() 
failed for node %d\n, __func__, s-name, node);
free_kmem_cache_nodes(s);
return 0;
}
-- 
1.5.6.4

 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 05/04] *** NOT FOR RELEASE *** HACK *** Work around MII clock issue ***

2009-06-07 Thread Wolfram Sang
My best guess is still that it is ips clock.  I think I stated in a

I fully agree.

a) Table 16-18 in the manual mentions ips and the values given there look much
   more like ips than ppc_proc_freq (25MHz?)

b) the excerpt from clock.c Wolfgang posted mentions ips as parent

c) I cannot imagine a divider wrapping around at a frequency which is inside the
   range of what the processor is capable of. MII only up to 300MHz seems like a
   show-stopper to me :)

d) According to the MPC5200B-manual, ipb _is_ used there (and the linux-driver
   adheres to that). I'd guess those two CPUs are related enough to assume it is
   ips here.

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [BUILD FAILURE 01/04] Next June 04:PPC64 randconfig [drivers/staging/comedi/drivers.o]

2009-06-07 Thread Subrata Modak
On Sat, 2009-06-06 at 09:36 -0400, Frank Mori Hess wrote:
 On Saturday 06 June 2009, Greg KH wrote:
  Frank and Ian, any thoughts about the vmap call in the
  comedi_buf_alloc() call?  Why is it using PAGE_KERNEL_NOCACHE, and what
  is the prealloc_buf buffer used for?
 
 It is a circular buffer used to hold data streaming either to or from a 
 board (for example when producing an analog output waveform).  Reads and 
 writes to the device files read/write to the circular buffer, plus a few 
 drivers do dma directly to/from it.  I personally don't have a problem 
 with requiring drivers to have their own dma buffers and making them copy 
 data between their private dma buffers and the main circular buffer.  I 
 guess the original design wanted to support zero-copy dma.

Great to hear that. How about a patch that solves my build problem on
PPC64(the problem seems to be existing for long) ? 

Regards--
Subrata

 

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 05/04] *** NOT FOR RELEASE *** HACK *** Work around MII clock issue ***

2009-06-07 Thread Wolfgang Denk
Dear John,

in message 4b73d43f0906061708o763409d0u10a344dfc30e3...@mail.gmail.com you 
wrote:

  The big question seems to be what the RefMan means when talking about
  the system clock frequency. Obiously it is NOT  the  CPU  clock  as
...
  But which one is it?
 
 My best guess is still that it is ips clock.  I think I stated in a previous
 email ipb, but I meant ips.  5200 has ibp and 5121 has ips.  Have you looked
 at he MII clock on a scope to see how the calculated values compare to
 actual?

Yes, it seems very much as if you were right again.

When using ips/ibp everything makes sense, and works.

Hm... so that means on MPC512x we should use mpc512x_find_ips_freq(),
while on MPC5200 we should use  mpc52xx_find_ipb_freq()  -  but  hey,
apart from the name these two functions are identical.

Grant - how would you like to see this handled? Should we merge these
two code-wise identical functions into one?  What should be the name,
and in which file should we put it?

[We need this clock thing for drivers/net/fs_enet/mii-fec.c...]

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Don't think; let the machine do it for you!- E. C. Berkeley
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev