LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 07/12] Consolidate of_find_node_by routines
From: David Miller @ 2007-07-20  3:12 UTC (permalink / raw)
  To: sfr; +Cc: sparclinux, linuxppc-dev, paulus, wli
In-Reply-To: <20070720011450.d0b97300.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Jul 2007 01:14:50 +1000

> This consolidates the routines of_find_node_by_path, of_find_node_by_name,
> of_find_node_by_type and of_find_compatible_device.  Again, the comparison
> of strings are done differently by Sparc and PowerPC and also these add
> read_locks around the iterations.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

Tested on SunBlade1500.

^ permalink raw reply

* Re: Fix ARCH=ppc builds
From: Kumar Gala @ 2007-07-20  3:10 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070720031110.GP3925@crusty.rchland.ibm.com>


On Jul 19, 2007, at 10:11 PM, Josh Boyer wrote:

> The recent signal rework broke ARCH=3Dppc builds with the following =20=

> error:
>
> CC      arch/powerpc/kernel/signal.o
> arch/powerpc/kernel/signal.c: In function =91do_signal=92:
> arch/powerpc/kernel/signal.c:142: error: implicit declaration of =20
> function =91set_dabr=92
> make[1]: *** [arch/powerpc/kernel/signal.o] Error 1
>
> The patch below fixes it by including a function prototype in
> asm-ppc/system.h
>
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

Acked-by: Kumar Gala <galak@kernel.crashing.org>

(Bet me to posting this :)

> diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h
> index f1311a8..cc45780 100644
> --- a/include/asm-ppc/system.h
> +++ b/include/asm-ppc/system.h
> @@ -54,6 +54,7 @@ extern void show_regs(struct pt_regs * regs);
>  extern void flush_instruction_cache(void);
>  extern void hard_reset_now(void);
>  extern void poweroff_now(void);
> +extern int set_dabr(unsigned long dabr);
>  #ifdef CONFIG_6xx
>  extern long _get_L2CR(void);
>  extern long _get_L3CR(void);
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Possible eHEA performance issue
From: Michael Neuling @ 2007-07-20  3:02 UTC (permalink / raw)
  To: Thomas Klein, Jan-Bernd Themann, netdev, Christoph Raisch,
	Stefan Roscher, linux-ppc
  Cc: anton

>From ehea_start_xmit in ehea_main.c we have:

    if (unlikely(atomic_read(&pr->swqe_avail) <= 1)) {
	    spin_lock_irqsave(&pr->netif_queue, flags);
	    if (unlikely(atomic_read(&pr->swqe_avail) <= 1)) {
		    pr->p_stats.queue_stopped++;
		    netif_stop_queue(dev);
		    pr->queue_stopped = 1;
	    }
	    spin_unlock_irqrestore(&pr->netif_queue, flags);
    }

Since the conditions are the same, isn't it likely that the second 'if'
is going to be taken.  Hence, shouldn't the second 'unlikely' hint be
removed or even changed to likely?

Either way, some documentation here as to why it's done this way would
be useful.  I assume the atomic_read is cheap compared to the
spin_unlock_irqsave, so we quickly check swqe_avail before we check it
again properly with the lock on so we can change some stuff.

Mikey

^ permalink raw reply

* Fix ARCH=ppc builds
From: Josh Boyer @ 2007-07-20  3:11 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

The recent signal rework broke ARCH=ppc builds with the following error:

CC      arch/powerpc/kernel/signal.o
arch/powerpc/kernel/signal.c: In function ‘do_signal’:
arch/powerpc/kernel/signal.c:142: error: implicit declaration of function ‘set_dabr’
make[1]: *** [arch/powerpc/kernel/signal.o] Error 1

The patch below fixes it by including a function prototype in
asm-ppc/system.h

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h
index f1311a8..cc45780 100644
--- a/include/asm-ppc/system.h
+++ b/include/asm-ppc/system.h
@@ -54,6 +54,7 @@ extern void show_regs(struct pt_regs * regs);
 extern void flush_instruction_cache(void);
 extern void hard_reset_now(void);
 extern void poweroff_now(void);
+extern int set_dabr(unsigned long dabr);
 #ifdef CONFIG_6xx
 extern long _get_L2CR(void);
 extern long _get_L3CR(void);

^ permalink raw reply related

* Re: [PATCH 3/4] mpc8349emitx: Add chosen node for default stdout path
From: Jerry Van Baren @ 2007-07-20  2:00 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <469FDB3B.5000901@freescale.com>

Scott Wood wrote:
> Kim Phillips wrote:
>> the old FLAT_TREE u-boot fdt fixup code renames any existing chosen
>> node out of the way, and adds its fixed up version as /chosen.

Not in my experience.  My experience is that it blindly created a second 
/chosen node.

>> The LIBFDT implementation replaces any existing /chosen with its fixed
>> up version.

Sort of.  If /chosen doesn't exist, it creates it.

If /chosen exists and "force" parameter is false, it doesn't touch it. 
If "force"  is true, it creates or fixes up properties.  The "bootm" 
command passes in force == false.  The "fdt" command passes in force == 
true.

The "force" parameter was added to sort of emulate the previous bootm 
command behavior (but behave better in the case where /chosen already 
existed).

Such is the price for not totally breaking user expectations.  Hopefully 
we recalibrate user expectations in the future and improve this.

> Could you point out the code that does this?  I don't see it in either 
> the old code or the new.
> 
> -Scott

Old code - I don't think so.

New code...
u-boot-fdt repo:
<http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-fdt.git;a=blob;f=common/fdt_support.c;h=259bd42cc62c55d11370579a7af0d6519fc34c8d;hb=01f771763ed822145b54819abb9c4516c8216d48#l96>

u-boot repo:
<http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=common/fdt_support.c;h=69099c4275ccb925cce7b7c69afc5ab4f76cfe6f;hb=HEAD#l92>

Hope this makes sense,
gvb

^ permalink raw reply

* Re: [PATCH 06/12] Consolidate of_get_next_child
From: David Miller @ 2007-07-20  1:07 UTC (permalink / raw)
  To: sfr; +Cc: sparclinux, linuxppc-dev, paulus, wli
In-Reply-To: <20070720011348.3071f52a.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Jul 2007 01:13:48 +1000

> This adds a read_lock around the child/next accesses on Sparc.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

Tested on SunBlade1500.

^ permalink raw reply

* Re: [PATCH 05/12] Consolidate of_get_parent
From: David Miller @ 2007-07-20  1:01 UTC (permalink / raw)
  To: sfr; +Cc: sparclinux, linuxppc-dev, paulus, wli
In-Reply-To: <20070720011235.8199eca2.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Jul 2007 01:12:35 +1000

> This requires creating dummy of_node_{get,put} routines for sparc and
> sparc64.  It also adds a read_lock around the parent accesses.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

Tested on SunBlade1500.

^ permalink raw reply

* Re: [PATCH 04/12] Consolidate of_find_property
From: David Miller @ 2007-07-20  0:45 UTC (permalink / raw)
  To: sfr; +Cc: sparclinux, linuxppc-dev, paulus, wli
In-Reply-To: <20070720011127.8c700e59.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Jul 2007 01:11:27 +1000

> The only change here is that a readlock is taken while the property list
> is being traversed on Sparc where it was not taken previously.
> 
> Also, Sparc uses strcasecmp to compare property names while PowerPC
> uses strcmp.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

Tested on SunBlade1500.

^ permalink raw reply

* Re: [PATCH 03/12] Consolidate of_device_is_compatible
From: David Miller @ 2007-07-20  0:24 UTC (permalink / raw)
  To: sfr; +Cc: sparclinux, linuxppc-dev, paulus, wli
In-Reply-To: <20070720011012.4eca281d.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Jul 2007 01:10:12 +1000

> The only difference here is that Sparc uses strncmp to match compatibility
> names while PowerPC uses strncasecmp.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

Tested on SunBlade1500.

^ permalink raw reply

* Re: [PATCH 02/12] Start split out of common open firmware code
From: David Miller @ 2007-07-19 23:48 UTC (permalink / raw)
  To: sfr; +Cc: sparclinux, linuxppc-dev, paulus, wli
In-Reply-To: <20070720010911.01402add.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Jul 2007 01:09:11 +1000

> This creates drivers/of/base.c (depending on CONFIG_OF) and puts
> the first trivially common bits from the prom.c files into it.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

Tested on SunBlade1500.

^ permalink raw reply

* Re: [PATCH] Treat ISI faults as read faults on classic 32-bit PowerPC
From: Paul Mackerras @ 2007-07-19 23:40 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Johannes Berg
In-Reply-To: <FB9F7C22-8598-4E72-B663-130A7989925D@kernel.crashing.org>

Segher Boessenkool writes:

> Should you really be testing VM_READ|VM_WRITE, or should it just
> be VM_READ?

We test VM_READ | VM_WRITE | VM_EXEC in the read case below, and that
is because we have no HPTE encoding to say "writable but not readable"
or "executable but not readable".  Similarly we have no encoding to
say "writable but not executable" on classic processors, so if you
have just VM_WRITE set, you get a page that is readable, writable and
executable.

Paul.

^ permalink raw reply

* Re: [PATCH 01/12] Split out common parts of prom.h
From: Paul Mackerras @ 2007-07-19 23:27 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: sparclinux, ppc-dev, David S. Miller, wli
In-Reply-To: <20070720010742.e60c67a7.sfr@canb.auug.org.au>

Stephen Rothwell writes:

> This creates linux/of.h and includes asm/prom.h from it.
> 
> We also include linux/of.h from asm/prom.h while we transition.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: Paul Mackerras <paulus@samba.org>

for all 12 of the series.

^ permalink raw reply

* Re: 2.6.22-git* regression: Kconfig prompts without help text
From: Geert Uytterhoeven @ 2007-07-19 21:05 UTC (permalink / raw)
  To: Stefan Richter
  Cc: Randy Dunlap, Linux/m68k, Michal Piotrowski,
	Linux Kernel Mailing List, Linux/PPC Development, Jan Engelhardt,
	Andrew Morton
In-Reply-To: <469FCE5E.80803@s5r6.in-berlin.de>

On Thu, 19 Jul 2007, Stefan Richter wrote:
> Geert Uytterhoeven wrote:
> > On Wed, 18 Jul 2007, Jan Engelhardt wrote:
> >> Add some help texts to recently-introduced kconfig items
> >>
> >> Index: linux-2.6.23/drivers/macintosh/Kconfig
> >> ===================================================================
> >> --- linux-2.6.23.orig/drivers/macintosh/Kconfig
> >> +++ linux-2.6.23/drivers/macintosh/Kconfig
> >> @@ -3,6 +3,12 @@ menuconfig MACINTOSH_DRIVERS
> >>  	bool "Macintosh device drivers"
> >>  	depends on PPC || MAC || X86
> >>  	default y if (PPC_PMAC || MAC)
> >> +	---help---
> >> +	  Say Y here to get to see options for devices used with Macintosh
> >> +	  computers, both PPC and Intel based. This option alone does not add
> >                                   ^^^^^
> >> +	  any kernel code.
> >> +
> >> +	  If you say N, all options in this submenu will be skipped and disabled.
> > 
> > `MAC' is the symbol for m68k Macs.
> 
> OK, then this should read
> 
> 	  Say Y here to get to see options for devices used with Macintosh
> 	  computers. This option alone does not add any kernel code.
> 
> 	  If you say N, all options in this submenu will be skipped and disabled.
> 
> > From a quick look at drivers/macintosh/Kconfig, all of the entries are for m68k
> > and PPC Macs only.  The only thing that depends on X86 is the main menu...
> 
> There is one entry for all sorts of Macs, MAC_EMUMOUSEBTN.

You're right, I missed that one, as I used `grep depends' ;-)

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply

* Re: [PATCH 01/12] Split out common parts of prom.h
From: David Miller @ 2007-07-19 22:55 UTC (permalink / raw)
  To: sfr; +Cc: sparclinux, linuxppc-dev, paulus, wli
In-Reply-To: <20070720010742.e60c67a7.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 20 Jul 2007 01:07:42 +1000

> This creates linux/of.h and includes asm/prom.h from it.
> 
> We also include linux/of.h from asm/prom.h while we transition.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: Powerpc - Include pagemap.h in asm/powerpc/tlb.h
From: Kumar Gala @ 2007-07-19 22:46 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linuxppc-dev, Mathieu Desnoyers, linux-kernel, Paul Mackerras
In-Reply-To: <20070719143020.5e0b7474.akpm@linux-foundation.org>


On Jul 19, 2007, at 4:30 PM, Andrew Morton wrote:

> On Thu, 19 Jul 2007 16:04:38 -0500
> Kumar Gala <galak@kernel.crashing.org> wrote:
>
>>>> Andrew,
>>>>
>>>> Are you sending this to linus directly or should this go via  
>>>> paul and
>>>> me?
>>>>
>>>
>>> I queued it up for Paul.  I can send it over to Linus today if we
>>> have a
>>> reason for that.  It's just that I dont understand the patch: does
>>> it fix
>>> -mm-only breakage?  Does it fix something which already got fixed,
>>> or what?
>>
>> I'm seeing the same breakage in my tree.
>
> Oh, OK.  Let's just merge it.

Hmm, depending on the config it goes away.

Lets hold off on this for a little while so understand exactly what's  
going on.

>>> One might think "gee, it's trivial, just slam it in", but these  
>>> nested
>>> includes are often not-trivial and something else can explode as a
>>> result.
>>
>> I'll do a git-bisect and see if I can find the patch that causes this
>> breakage so we know what's going on.
>
> eh, don't bother.

I think I'll poke around a little since it clearly has some config  
dependancy.

- k

^ permalink raw reply

* Re: PS3: Fix build with 32-bit toolchains
From: Geoff Levand @ 2007-07-19 22:36 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras, Arnd Bergmann
In-Reply-To: <A127B558-BA1C-4F18-890B-7052F2DF7488@kernel.crashing.org>

Kumar Gala wrote:
> On Jul 19, 2007, at 4:47 PM, Geoff Levand wrote:
> 
>> The PS3 bootwrapper files use instructions only available on
>> 64-bit CPUs.  Add the code generation directive '.machine "ppc64"'
>> for toolchains configured for 32-bit CPUs.
>>
>> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
> 
> while this is a fix, why are we even building it Grant's case of  
> building 834x itx.

I originally had the makefile setup to conditionally build these
files on CONFIG_PPC_PS3, but during the review I was requested to
change it to build them unconditionally.  See:

  http://ozlabs.org/pipermail/linuxppc-dev/2007-June/038072.html

-Geoff

^ permalink raw reply

* Re: [PATCH] mv64x60 use mutex instead of semaphore
From: Mark A. Greer @ 2007-07-19 22:35 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linuxppc-dev
In-Reply-To: <20070719215049.GA4896@lst.de>

On Thu, Jul 19, 2007 at 11:50:49PM +0200, Christoph Hellwig wrote:
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Mark A. Greer <mgreer@mvista.com>

^ permalink raw reply

* Re: Powerpc - Include pagemap.h in asm/powerpc/tlb.h
From: Mathieu Desnoyers @ 2007-07-19 22:32 UTC (permalink / raw)
  To: Andrew Morton; +Cc: wli, linux-kernel, linuxppc-dev, Paul Mackerras, sparclinux
In-Reply-To: <20070719143020.5e0b7474.akpm@linux-foundation.org>

* Andrew Morton (akpm@linux-foundation.org) wrote:
> On Thu, 19 Jul 2007 16:04:38 -0500
> Kumar Gala <galak@kernel.crashing.org> wrote:
> 
> > >> Andrew,
> > >>
> > >> Are you sending this to linus directly or should this go via paul and
> > >> me?
> > >>
> > >
> > > I queued it up for Paul.  I can send it over to Linus today if we  
> > > have a
> > > reason for that.  It's just that I dont understand the patch: does  
> > > it fix
> > > -mm-only breakage?  Does it fix something which already got fixed,  
> > > or what?
> > 
> > I'm seeing the same breakage in my tree.
> 
> Oh, OK.  Let's just merge it.
> 
> > > One might think "gee, it's trivial, just slam it in", but these nested
> > > includes are often not-trivial and something else can explode as a  
> > > result.
> > 
> > I'll do a git-bisect and see if I can find the patch that causes this  
> > breakage so we know what's going on.
> 
> eh, don't bother.

Hrm, I still think it's kind of interesting to see what happens there.

So the sane way to make sure it's fixed would be to turn the macros
free_page_and_swap_cache() and free_pages_and_swap_cache() into an
inline function (just to make sure the compiler complains), but that
would require to include linux/pagemap.h from linux/swap.h. But let's
just see what happens on sparc if we include linux/pagemap.h from
swap.h.

I just tested compiling on sparc, here is the result:


  /opt/crosstool/gcc-4.1.1-glibc-2.3.6/sparc-unknown-linux-gnu/bin/sparc-unknown-linux-gnu-gcc -Wp,-MD,init/.main.o.d  -nostdinc -isystem /opt/crosstool/gcc-4.1.1-glibc-2.3.6/sparc-unknown-linux-gnu/lib/gcc/sparc-unknown-linux-gnu/4.1.1/include -D__KERNEL__ -Iinclude -Iinclude2 -I/home/compudj/git/linux-2.6-lttng/include -include include/linux/autoconf.h -I/home/compudj/git/linux-2.6-lttng/init -Iinit -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 -fomit-frame-pointer -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(main)"  -D"KBUILD_MODNAME=KBUILD_STR(main)" -c -o init/.tmp_main.o /home/compudj/git/linux-2.6-lttng/init/main.c
In file included from /home/compudj/git/linux-2.6-lttng/include/linux/highmem.h:24,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:10,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/swap.h:9,
                 from include2/asm/pgtable.h:15,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/mm.h:38,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/rmap.h:9,
                 from /home/compudj/git/linux-2.6-lttng/init/main.c:49:
include2/asm/highmem.h: In function 'kmap':
include2/asm/highmem.h:60: error: implicit declaration of function 'PageHighMem'
include2/asm/highmem.h:61: error: implicit declaration of function 'page_address'
include2/asm/highmem.h:61: warning: return makes pointer from integer without a cast
In file included from /home/compudj/git/linux-2.6-lttng/include/linux/swap.h:9,
                 from include2/asm/pgtable.h:15,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/mm.h:38,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/rmap.h:9,
                 from /home/compudj/git/linux-2.6-lttng/init/main.c:49:
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h: In function 'linear_page_index':
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:153: error: dereferencing pointer to incomplete type
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:154: error: dereferencing pointer to incomplete type
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h: In function 'lock_page':
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:168: error: implicit declaration of function 'TestSetPageLocked'
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h: In function 'wait_on_page_locked':
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:198: error: implicit declaration of function 'PageLocked'
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:199: error: 'PG_locked' undeclared (first use in this function)
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:199: error: (Each undeclared identifier is reported only once
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:199: error: for each function it appears in.)
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h: In function 'wait_on_page_writeback':
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:207: error: implicit declaration of function 'PageWriteback'
/home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:208: error: 'PG_writeback' undeclared (first use in this function)
In file included from /home/compudj/git/linux-2.6-lttng/include/linux/rmap.h:9,
                 from /home/compudj/git/linux-2.6-lttng/init/main.c:49:
/home/compudj/git/linux-2.6-lttng/include/linux/mm.h: At top level:
/home/compudj/git/linux-2.6-lttng/include/linux/mm.h:605: error: conflicting types for 'page_address'
include2/asm/highmem.h:61: error: previous implicit declaration of 'page_address' was here

PageHighMem is declared in linux/page-flags.h, which is included in
linux/mm.h with the following comment:

/*
 * FIXME: take this include out, include page-flags.h in
 * files which need it (119 of them)
 */
#include <linux/page-flags.h>

(linux/mm.h is included from linux/highmem.h)

Actually, we get a circular inclusion there:

In file included from /home/compudj/git/linux-2.6-lttng/include/linux/highmem.h:24,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/pagemap.h:10,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/swap.h:9,
                 from include2/asm/pgtable.h:15,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/mm.h:38,
                 from /home/compudj/git/linux-2.6-lttng/include/linux/rmap.h:9,
                 from /home/compudj/git/linux-2.6-lttng/init/main.c:49:


mm.h includes asm-sparc/pgtable.h includes linux/swap.h includes
linux/pagemap.h (which I have added myself) includes linux/highmem.h
includes mm.h.....

Is it me or it all looks like a fubarish mess ? :(

Why is asm-sparc/pgtable.h including linux/swap.h ? Perharps the sparc
devs will be able to enlighten us...

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

^ permalink raw reply

* Re: [PATCH 3/4] mpc8349emitx: Add chosen node for default stdout path
From: Kim Phillips @ 2007-07-19 22:28 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <469FDB3B.5000901@freescale.com>

On Thu, 19 Jul 2007 16:44:27 -0500
Scott Wood <scottwood@freescale.com> wrote:

> Kim Phillips wrote:
> > the old FLAT_TREE u-boot fdt fixup code renames any existing chosen
> > node out of the way, and adds its fixed up version as /chosen.
> > 
> > The LIBFDT implementation replaces any existing /chosen with its fixed
> > up version.
> 
> Could you point out the code that does this?  I don't see it in either 
> the old code or the new.
> 

libfdt (new): do_fdt() calls fdt_chosen(..., force=1), where, in
fdt_chosen(), the check to not replace the existing node is governed by
the value of force.

[in gvb's fdt branch, where an 'fdt addr' command is no longer required
prior to bootm ing, do_bootm_linux() calls fdt_chosen(...,force=0),
so maybe it should be changed to force=1.]

about the old code, you're right, I don't see it either - I must have
been remembering running something else that did the rename.  Sorry for
the noise.

Kim



Kim

^ permalink raw reply

* Re: PS3: Fix build with 32-bit toolchains
From: Grant Likely @ 2007-07-19 22:16 UTC (permalink / raw)
  To: Geoff Levand; +Cc: linuxppc-dev, Paul Mackerras, Arnd Bergmann
In-Reply-To: <469FDBDC.5030700@am.sony.com>

On 7/19/07, Geoff Levand <geoffrey.levand@am.sony.com> wrote:
> The PS3 bootwrapper files use instructions only available on
> 64-bit CPUs.  Add the code generation directive '.machine "ppc64"'
> for toolchains configured for 32-bit CPUs.
>
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> Paul,
>
> Please apply for 2.6.23-rc1.
>
>  arch/powerpc/boot/ps3-head.S   |    2 ++
>  arch/powerpc/boot/ps3-hvcall.S |    2 ++
>  2 files changed, 4 insertions(+)
>
> --- a/arch/powerpc/boot/ps3-head.S
> +++ b/arch/powerpc/boot/ps3-head.S
> @@ -20,6 +20,8 @@
>
>  #include "ppc_asm.h"
>
> +       .machine "ppc64"
> +
>         .text
>
>  /*
> --- a/arch/powerpc/boot/ps3-hvcall.S
> +++ b/arch/powerpc/boot/ps3-hvcall.S
> @@ -20,6 +20,8 @@
>
>  #include "ppc_asm.h"
>
> +       .machine "ppc64"
> +
>  /*
>   * The PS3 hypervisor uses a 64 bit "C" language calling convention.
>   * The routines here marshal arguments between the 32 bit wrapper
>
>


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: [PATCH 3/4] mpc8349emitx: Add chosen node for default stdout path
From: Grant Likely @ 2007-07-19 22:12 UTC (permalink / raw)
  To: Kim Phillips; +Cc: linuxppc-dev
In-Reply-To: <20070719164036.f3d4c86d.kim.phillips@freescale.com>

On 7/19/07, Kim Phillips <kim.phillips@freescale.com> wrote:
> On Thu, 19 Jul 2007 13:43:17 -0600
> "Grant Likely" <grant.likely@secretlab.ca> wrote:
>
> > On 7/19/07, Scott Wood <scottwood@freescale.com> wrote:
> > > Grant Likely wrote:
> > > > From: Grant Likely <grant.likely@secretlab.ca>
> > > >
> > > > To boot from a cuImage requires the device tree to have a
> > > > linux,stdout-path property in the chosen node.  This patch adds it
> > > > to the .dts files.
> > >
> > > This will break many current u-boots, as they blindly add a /chosen node
> > > regardless of whether one already exists.
> >
> > That really should be fixed then.  In the meantime; I'll resubmit the
> > patch to add the chosen node; but with it commented out.
> >
>
> the old FLAT_TREE u-boot fdt fixup code renames any existing chosen
> node out of the way, and adds its fixed up version as /chosen.
>
> The LIBFDT implementation replaces any existing /chosen with its fixed
> up version.
>
> So it all works out.  Adding chosen/linux,stdout-path properties to the
> kernel dtses is fine.
>
> btw, why are these changes being limited to the ITX and GP?

Simply because I'm working on an itx-gp board.  If this is deemed to
be a good change, I can whip up a patch to fix all boards with my
'best guess' as to what stdout should be.

Cheers,
g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: [PATCH] powerpc: Add of_register_i2c_devices()
From: Guennadi Liakhovetski @ 2007-07-19 22:07 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <87DC7695-382B-4641-B9D9-75ACB49D41A4@kernel.crashing.org>

On Thu, 19 Jul 2007, Segher Boessenkool wrote:

> > > Your device is an rs5c372b.  So, that's what you put in
> > > your device tree.  Simple so far, right?
> > > 
> > > Now some OF I2C code goes looking for IIC devices in the
> > > device tree.  It finds this thing, and from a table or
> > > something it derives that it has to tell the kernel I2C
> > > layer this is an "rtc-rs5c372".  [It would be nicer if it
> > > could just instantiate the correct driver directly, but
> > > if that's how the Linux I2C layer works, so be it].
> > > 
> > > No change in the I2C "core" needed, just an OF "compatible"
> > > matching thing like is needed *everywhere else* too.
> > 
> > How about the patch below?
> 
> Looks good.  It should later be moved to a more generic
> I2C OF matching layer, but fine for now.  Thanks!
> 
> You might want to put vendor names in the "compatible"
> entries, dunno though, maybe these are "cross-vendor"
> ICs?

You mean like

	compatible = "ricoh,rs5c372a"

etc? With this change, plus __init(data) attributes for functions and the 
array, attached below is version 2 of the patch. Corresponding 
modifications to the kurobox*.dts will follow separately.

Thanks
Guennadi
---
Guennadi Liakhovetski

Scan the device tree for i2c devices, check their "compatible" property 
against a hard-coded table, and, if found, register with i2c boardinfo.

Signed-off-by: G. Liakhovetski <g.liakhovetski@gmx.de>

diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3289fab..e07d031 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -305,6 +305,62 @@ err:
 
 arch_initcall(gfar_of_init);
 
+#ifdef CONFIG_I2C_BOARDINFO
+#include <linux/i2c.h>
+struct i2c_driver_device {
+	char	*of_device;
+	char	*i2c_driver;
+	char	*i2c_type;
+};
+
+static struct i2c_driver_device i2c_devices[] __initdata = {
+	{"ricoh,rs5c372a", "rtc-rs5c372", "rs5c372a",},
+	{"ricoh,rs5c372b", "rtc-rs5c372", "rs5c372b",},
+	{"ricoh,rv5c386",  "rtc-rs5c372", "rv5c386",},
+	{"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",},
+};
+
+static int __init of_find_i2c_driver(struct device_node *node, struct i2c_board_info *info)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
+		if (!of_device_is_compatible(node, i2c_devices[i].of_device))
+			continue;
+		strncpy(info->driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN);
+		strncpy(info->type, i2c_devices[i].i2c_type, I2C_NAME_SIZE);
+		return 0;
+	}
+	return -ENODEV;
+}
+
+static void __init of_register_i2c_devices(struct device_node *adap_node, int bus_num)
+{
+	struct device_node *node = NULL;
+
+	while ((node = of_get_next_child(adap_node, node))) {
+		struct i2c_board_info info;
+		const u32 *addr;
+		int len;
+
+		addr = of_get_property(node, "reg", &len);
+		if (!addr || len < sizeof(int) || *addr > 0xffff)
+			continue;
+
+		info.irq = irq_of_parse_and_map(node, 0);
+		if (info.irq == NO_IRQ)
+			info.irq = -1;
+
+		if (of_find_i2c_driver(node, &info) < 0)
+			continue;
+
+		info.platform_data = NULL;
+		info.addr = *addr;
+
+		i2c_register_board_info(bus_num, &info, 1);
+	}
+}
+
 static int __init fsl_i2c_of_init(void)
 {
 	struct device_node *np;
@@ -349,6 +405,8 @@ static int __init fsl_i2c_of_init(void)
 						    fsl_i2c_platform_data));
 		if (ret)
 			goto unreg;
+
+		of_register_i2c_devices(np, i);
 	}
 
 	return 0;
@@ -360,6 +418,7 @@ err:
 }
 
 arch_initcall(fsl_i2c_of_init);
+#endif
 
 #ifdef CONFIG_PPC_83xx
 static int __init mpc83xx_wdt_init(void)

^ permalink raw reply related

* Re: PS3: Fix build with 32-bit toolchains
From: Kumar Gala @ 2007-07-19 22:05 UTC (permalink / raw)
  To: Geoff Levand; +Cc: linuxppc-dev, Paul Mackerras, Arnd Bergmann
In-Reply-To: <469FDBDC.5030700@am.sony.com>


On Jul 19, 2007, at 4:47 PM, Geoff Levand wrote:

> The PS3 bootwrapper files use instructions only available on
> 64-bit CPUs.  Add the code generation directive '.machine "ppc64"'
> for toolchains configured for 32-bit CPUs.
>
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>

while this is a fix, why are we even building it Grant's case of  
building 834x itx.

- k

^ permalink raw reply

* [PATCH] mv64x60 use mutex instead of semaphore
From: Christoph Hellwig @ 2007-07-19 21:50 UTC (permalink / raw)
  To: mgreer; +Cc: linuxppc-dev


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/arch/ppc/syslib/mv64x60.c
===================================================================
--- linux-2.6.orig/arch/ppc/syslib/mv64x60.c	2007-07-19 22:47:07.000000000 +0200
+++ linux-2.6/arch/ppc/syslib/mv64x60.c	2007-07-19 22:48:29.000000000 +0200
@@ -14,6 +14,7 @@
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/string.h>
 #include <linux/spinlock.h>
 #include <linux/mv643xx.h>
@@ -2359,7 +2360,7 @@ mv64460_chip_specific_init(struct mv64x6
 /* Export the hotswap register via sysfs for enum event monitoring */
 #define	VAL_LEN_MAX	11 /* 32-bit hex or dec stringified number + '\n' */
 
-DECLARE_MUTEX(mv64xxx_hs_lock);
+static DEFINE_MUTEX(mv64xxx_hs_lock);
 
 static ssize_t
 mv64xxx_hs_reg_read(struct kobject *kobj, char *buf, loff_t off, size_t count)
@@ -2372,14 +2373,14 @@ mv64xxx_hs_reg_read(struct kobject *kobj
 	if (count < VAL_LEN_MAX)
 		return -EINVAL;
 
-	if (down_interruptible(&mv64xxx_hs_lock))
+	if (mutex_lock_interruptible(&mv64xxx_hs_lock))
 		return -ERESTARTSYS;
 	save_exclude = mv64x60_pci_exclude_bridge;
 	mv64x60_pci_exclude_bridge = 0;
 	early_read_config_dword(&sysfs_hose_a, 0, PCI_DEVFN(0, 0),
 			MV64360_PCICFG_CPCI_HOTSWAP, &v);
 	mv64x60_pci_exclude_bridge = save_exclude;
-	up(&mv64xxx_hs_lock);
+	mutex_unlock(&mv64xxx_hs_lock);
 
 	return sprintf(buf, "0x%08x\n", v);
 }
@@ -2396,14 +2397,14 @@ mv64xxx_hs_reg_write(struct kobject *kob
 		return -EINVAL;
 
 	if (sscanf(buf, "%i", &v) == 1) {
-		if (down_interruptible(&mv64xxx_hs_lock))
+		if (mutex_lock_interruptible(&mv64xxx_hs_lock))
 			return -ERESTARTSYS;
 		save_exclude = mv64x60_pci_exclude_bridge;
 		mv64x60_pci_exclude_bridge = 0;
 		early_write_config_dword(&sysfs_hose_a, 0, PCI_DEVFN(0, 0),
 				MV64360_PCICFG_CPCI_HOTSWAP, v);
 		mv64x60_pci_exclude_bridge = save_exclude;
-		up(&mv64xxx_hs_lock);
+		mutex_unlock(&mv64xxx_hs_lock);
 	}
 	else
 		count = -EINVAL;
@@ -2433,10 +2434,10 @@ mv64xxx_hs_reg_valid_show(struct device 
 	pdev = container_of(dev, struct platform_device, dev);
 	pdp = (struct mv64xxx_pdata *)pdev->dev.platform_data;
 
-	if (down_interruptible(&mv64xxx_hs_lock))
+	if (mutex_lock_interruptible(&mv64xxx_hs_lock))
 		return -ERESTARTSYS;
 	v = pdp->hs_reg_valid;
-	up(&mv64xxx_hs_lock);
+	mutex_unlock(&mv64xxx_hs_lock);
 
 	return sprintf(buf, "%i\n", v);
 }

^ permalink raw reply

* PS3: Fix build with 32-bit toolchains
From: Geoff Levand @ 2007-07-19 21:47 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, Arnd Bergmann
In-Reply-To: <fa686aa40707191249r1e73f6f7s7f2aa4502919e98a@mail.gmail.com>

The PS3 bootwrapper files use instructions only available on
64-bit CPUs.  Add the code generation directive '.machine "ppc64"'
for toolchains configured for 32-bit CPUs.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
Paul,

Please apply for 2.6.23-rc1.

 arch/powerpc/boot/ps3-head.S   |    2 ++
 arch/powerpc/boot/ps3-hvcall.S |    2 ++
 2 files changed, 4 insertions(+)

--- a/arch/powerpc/boot/ps3-head.S
+++ b/arch/powerpc/boot/ps3-head.S
@@ -20,6 +20,8 @@
 
 #include "ppc_asm.h"
 
+	.machine "ppc64"
+
 	.text
 
 /*
--- a/arch/powerpc/boot/ps3-hvcall.S
+++ b/arch/powerpc/boot/ps3-hvcall.S
@@ -20,6 +20,8 @@
 
 #include "ppc_asm.h"
 
+	.machine "ppc64"
+
 /*
  * The PS3 hypervisor uses a 64 bit "C" language calling convention.
  * The routines here marshal arguments between the 32 bit wrapper

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox