LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v3] powerpc: add ioremap_early() for mapping IO regions before MMU_init()
From: Benjamin Herrenschmidt @ 2009-06-15  6:55 UTC (permalink / raw)
  To: Grant Likely; +Cc: scottwood, linuxppc-dev
In-Reply-To: <20090527185422.15186.46133.stgit@localhost.localdomain>

On Wed, 2009-05-27 at 12:55 -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
> 
> ioremap_early() is useful for things like mapping SoC internally registers
> and early debug output because it allows mappings to devices to be setup
> early in the boot process where they are needed.  It also give a
> performance boost since BAT mapped registers don't get flushed out of
> the TLB.
> 
> Without ioremap_early(), early mappings are set up in an ad-hoc manner
> and they get lost when the MMU is set up.  Drivers then have to perform
> hacky fixups to transition over to new mappings.
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---

Approach looks sane at first glance.

However, I'm reluctant to but that in until we have all MMU types
covered or we'll have "interesting" surprises. Also, the CPM patch
doesn't actually fix the massive bogon in there :-)

> +	/* Be loud and annoying if someone calls this too late.
> +	 * No need to crash the kernel though */
> +	WARN_ON(mem_init_done);
> +	if (mem_init_done)
> +		return NULL;

Can't we write

	if (WARN_ON(mem_init_done))
		return NULL;

nowadays ?

> +	/* Make sure request is sane */
> +	if (size == 0)
> +		return NULL;
> +
> +	/* If the region is already block mapped, then there is nothing
> +	 * to do; just return the mapped address */
> +	v = p_mapped_by_bats(addr);
> +	if (v)
> +		return (void __iomem *)v;

Should we check the size ?

> +	/* Align region size */
> +	for (bl = 128<<10; bl < (256<<20); bl <<= 1) {
> +		p = _ALIGN_DOWN(addr, bl); /* BATs align on 128k boundaries */
> +		size = ALIGN(addr - p + size, bl);
> +		if (bl >= size)
> +			break;
> +	}
> +
> +	/* Complain loudly if too much is requested */
> +	if (bl >= (256<<20)) {
> +		WARN_ON(1);
> +		return NULL;
> +	}

Do we avoid that running into the linear mapping ?

> +	/* Allocate the aligned virtual base address.  ALIGN_DOWN is used
> +	 * to ensure no overlaps occur with normal 4k ioremaps. */
> +	ioremap_bot = _ALIGN_DOWN(ioremap_bot, bl) - size;
> +
> +	/* Set up a BAT for this IO region */
> +	i = loadbat(ioremap_bot, p, size, PAGE_KERNEL_NCG);
> +	if (i < 0)
> +		return NULL;
> +
> +	return (void __iomem *) (ioremap_bot + (addr - p));
>  }
>  
>  /*
> diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
> index 8e3dd5a..2c49148 100644
> --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
> +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
> @@ -146,7 +146,20 @@ static struct of_device_id mpc52xx_cdm_ids[] __initdata = {
>  void __init
>  mpc52xx_map_common_devices(void)
>  {
> +	const struct of_device_id immr_ids[] = {
> +		{ .compatible = "fsl,mpc5200-immr", },
> +		{ .compatible = "fsl,mpc5200b-immr", },
> +		{ .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
> +		{ .type = "builtin", .compatible = "mpc5200", }, /* efika */
> +		{}
> +	};
>  	struct device_node *np;
> +	struct resource res;
> +
> +	/* Pre-map the whole register space using a BAT entry */
> +	np = of_find_matching_node(NULL, immr_ids);
> +	if (np && (of_address_to_resource(np, 0, &res) == 0))
> +		ioremap_early(res.start, res.end - res.start + 1);
>  
>  	/* mpc52xx_wdt is mapped here and used in mpc52xx_restart,
>  	 * possibly from a interrupt context. wdt is only implement
> diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c
> index e4b6d66..370723e 100644
> --- a/arch/powerpc/sysdev/cpm_common.c
> +++ b/arch/powerpc/sysdev/cpm_common.c
> @@ -56,7 +56,7 @@ void __init udbg_init_cpm(void)
>  {
>  	if (cpm_udbg_txdesc) {
>  #ifdef CONFIG_CPM2
> -		setbat(1, 0xf0000000, 0xf0000000, 1024*1024, PAGE_KERNEL_NCG);
> +		setbat(0xf0000000, 0xf0000000, 1024*1024, PAGE_KERNEL_NCG);
>  #endif
>  		udbg_putc = udbg_putc_cpm;
>  	}

That needs to be properly fixed ... maybe using ioremap_early() ? :-)

Also, make the initial call ioremap_early_init() just to make things
clear that one can't just call ioremap(), we are limited to a very
specific thing here.

For 8xx I'm not sure what the right approach is. For 40x, 440 and FSL
BookE we probably want to allow to bolt some TLB entries.

Cheers,
Ben.

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH][Resend 2][BUILD FAILURE 04/04] Next June 04:PPC64 randconfig [drivers/net/ucc_geth.o]
From: Subrata Modak @ 2009-06-15  6:51 UTC (permalink / raw)
  To: Tony Breeds, netdev, michael, Li Yang, Nathan Lynch
  Cc: Sachin P Sant, Stephen Rothwell, Linux-Kernel, Linuxppc-dev,
	Linux-Next, Balbir Singh
In-Reply-To: <20090611033705.20842.75501.sendpatchset@subratamodak.linux.ibm.com>

Hi Li/Nathan,

On Thu, 2009-06-11 at 09:07 +0530, Subrata Modak wrote: 
> Hi Nathan,
> 
> >On Wed, 2009-06-10 at 21:28 -0500, Nathan Lynch wrote:
> >Subrata Modak <subrata@linux.vnet.ibm.com> writes:
> > 
> > > On Thu, 2009-06-11 at 11:05 +1000, Stephen Rothwell wrote:
> > >> Hi Subrata,
> > >> 
> > >> On Wed, 10 Jun 2009 23:13:23 +0530 Subrata Modak <subrata@linux.vnet.ibm.com> wrote:
> > >> >
> > >> >  	/* Find the TBI PHY.  If it's not there, we don't support SGMII */
> > >> > -	ph = of_get_property(np, "tbi-handle", NULL);
> > >> > +	ph = (phandle *)of_get_property(np, "tbi-handle", NULL);
> > >> 
> > >> You don't need this cast because of_get_property() returns "void *".
> > >
> > > Stephen,
> > >
> > > True. But without this gcc complains:
> > >
> > > CC [M]  drivers/net/ucc_geth.o
> > > drivers/net/ucc_geth.c: In function b\x18ucc_geth_probeb\x19:
> > > drivers/net/ucc_geth.c:3824: warning: assignment discards qualifiers
> > > from pointer target type
> > 
> > ph should be declared const phandle *.  Look at other uses of
> > of_get_property.
> >
> 
> Ok fine. Here is a revised patch again.
> 
> Subject: [PATCH][Resend 2][BUILD FAILURE 04/04] Next June 04:PPC64 randconfig [drivers/net/ucc_geth.o]
> Reference(s):
> http://lkml.org/lkml/2009/6/4/241,
> http://lkml.org/lkml/2009/6/10/338,
> 
> Fix the following build error:
> 
> drivers/net/ucc_geth.c: In function bucc_geth_probeb:
> drivers/net/ucc_geth.c:3822: error: 'ph' undeclared (first use in this function)
> drivers/net/ucc_geth.c:3822: error: (Each undeclared identifier is reported only once
> drivers/net/ucc_geth.c:3822: error: for each function it appears in.)
> drivers/net/ucc_geth.c:3832: error: 'mdio' undeclared (first use in this function)
> make[2]: *** [drivers/net/ucc_geth.o] Error 1
> 
> Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
> ---

Is there anything else to be done in this patch. If this is OK, can this
be applied. I am not sure, but, i find Li Yang as the maintainer for
this in linux*/MAINTAINERS file. Kindly let me know if this patch needs
to be revisited for some other issue(s).

Regards--
Subrata

> 
> --- linux-2.6.30-rc8/drivers/net/ucc_geth.c.orig	2009-06-10 11:58:39.000000000 -0500
> +++ linux-2.6.30-rc8/drivers/net/ucc_geth.c	2009-06-10 22:28:13.000000000 -0500
> @@ -3595,6 +3595,8 @@ static const struct net_device_ops ucc_g
> 
>  static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match)
>  {
> +	struct device_node *mdio;
> +	const phandle *ph;
>  	struct device *device = &ofdev->dev;
>  	struct device_node *np = ofdev->node;
>  	struct net_device *dev = NULL;
> 
> ---
> Regards--
> Subrata
> 

^ permalink raw reply

* Re: [PATCH][BUILD FAILURE 03/04] Next June 04:PPC64 randconfig [drivers/net/lance.o]
From: Subrata Modak @ 2009-06-15  6:51 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Sachin P Sant, Stephen Rothwell, netdev, Linux-Kernel,
	Linuxppc-dev, Linux-Next, Paul Mackerras, Balbir Singh
In-Reply-To: <20090611035046.22125.26641.sendpatchset@subratamodak.linux.ibm.com>


On Thu, 2009-06-11 at 09:20 +0530, Subrata Modak wrote: 
> Hi Benjamin/Paul,
> 
> >On Thu, 2009-06-04 at 19:02 +0530, Subrata Modak wrote:
> >CC      drivers/net/lance.o
> > drivers/net/lance.c: In function 'lance_probe1':
> > drivers/net/lance.c:575: error: implicit declaration of function 'isa_virt_to_bus'
> > drivers/net/lance.c: In function 'lance_rx':
> > drivers/net/lance.c:1197: error: implicit declaration of function 'isa_bus_to_virt'
> > make[2]: *** [drivers/net/lance.o] Error 1
> > make[1]: *** [drivers/net] Error 2
> > make: *** [drivers] Error 2
> 
> Reference: http://lkml.org/lkml/2009/6/4/240,
> To fix the following build error:
> 
> drivers/net/lance.c: In function 'lance_probe1':
> drivers/net/lance.c:575: error: implicit declaration of function 'isa_virt_to_bus'
> drivers/net/lance.c: In function 'lance_rx':
> drivers/net/lance.c:1197: error: implicit declaration of function 'isa_bus_to_virt'
> make[2]: *** [drivers/net/lance.o] Error 1
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2
> 
> I would like to propose the following patch. The prototypes for the functions:
> 'isa_virt_to_bus' & 'isa_virt_to_bus' are existing for some archs like the
> mips, x86, parisc, arm & alpha, but, is missing for powerpc. Is it safe to
> introduce the following soultion for powerpc ? It fixes the build problem
> i reported earlier.
> 
> Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
> ---

Benjamin,

I am not sure whether you liked the following patch to solve the above
problem. Do, you want me address some other issue(s)/fixes for this ?

Regards--
Subrata

> 
> --- linux-2.6.30-rc8/arch/powerpc/include/asm/io.h.orig	2009-06-10 21:56:49.000000000 -0500
> +++ linux-2.6.30-rc8/arch/powerpc/include/asm/io.h	2009-06-10 22:21:35.000000000 -0500
> @@ -680,6 +680,9 @@ extern void __iounmap_at(void *ea, unsig
>  #define mmio_outsw(addr, src, count)	writesw(addr, src, count)
>  #define mmio_outsl(addr, src, count)	writesl(addr, src, count)
> 
> +#define isa_virt_to_bus		virt_to_phys
> +#define isa_bus_to_virt		phys_to_virt
> +
>  /**
>   *	virt_to_phys	-	map virtual addresses to physical
>   *	@address: address to remap
> 
> ---
> Regards--
> Subrata
> 

^ permalink raw reply

* Re: [BUILD FAILURE 02/04] Next June 04:PPC64 randconfig [drivers/usb/host/ohci-hcd.o]
From: Subrata Modak @ 2009-06-15  6:51 UTC (permalink / raw)
  To: David Brownell
  Cc: Sachin P Sant, Randy Dunlap, Arnd Bergmann, Stephen Rothwell,
	linux-usb, Linux-Kernel, Linuxppc-dev, Linux-Next, kernel
In-Reply-To: <1244799348.5234.13.camel@subratamodak.linux.ibm.com>

On Fri, 2009-06-12 at 15:05 +0530, Subrata Modak wrote: 
> On Tue, 2009-06-09 at 17:38 -0700, David Brownell wrote:
> > On Friday 05 June 2009, Subrata Modak wrote:
> > > Correct, it fixes the issue. However, since few changes might have gone
> > > to the Kconfig, the patch does not apply cleanly. Below is the patch, just
> > > a retake of the earlier one, but on the latest code. 
> > 
> > And it got mangled a bit along the way.  Plus, the original one
> > goofed up Kconfig dependency displays ... both issues fixed in
> > this version, against current mainline GIT.
> > 
> > If someone can verify all four PPC/OF/OHCI configs build on
> > on PPC64, I'm OK with it.
> > 
> > - Dave
> 
> Dave,
> 
> Sorry for being late. The patch fixes the issue on the latest git for
> PPC64. Infact, the whole drivers/usb/host/ builds just fine:
> 
> linux-2.6 # make drivers/usb/host/
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   SYMLINK include/asm -> include/asm-powerpc
>   CALL    scripts/checksyscalls.sh
>   CC      drivers/usb/host/ohci-hcd.o
>   CC      drivers/usb/host/pci-quirks.o
>   CC      drivers/usb/host/uhci-hcd.o
>   LD      drivers/usb/host/built-in.o
>   CC [M]  drivers/usb/host/isp116x-hcd.o
>   CC [M]  drivers/usb/host/u132-hcd.o
> 
> You can check in the patch now.

Dave,

Have you checked in this patch ? Or, does it require some more
modification/updates from somebody´s side ?

Regards--
Subrata

> 
> Regards--
> Subrata
> 
> > 
> > 
> > ========== CUT HERE
> > From: Arnd Bergmann <arnd@arndb.de>
> > Subject: fix build failure for PPC64 randconfig [usb/ohci]
> > 
> > We could just make the USB_OHCI_HCD_PPC_OF option implicit
> > and selected only if at least one of USB_OHCI_HCD_PPC_OF_BE
> > and USB_OHCI_HCD_PPC_OF_LE are set.
> > 
> > [ dbrownell@users.sourceforge.net: fix patch manglation and dependencies ]
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Resent-by: Subrata Modak <subrata@linux.vnet.ibm.com>
> > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> > ---
> >  drivers/usb/host/Kconfig |   29 +++++++++++++++--------------
> >  1 file changed, 15 insertions(+), 14 deletions(-)
> > 
> > --- a/drivers/usb/host/Kconfig
> > +++ b/drivers/usb/host/Kconfig
> > @@ -180,26 +180,27 @@ config USB_OHCI_HCD_PPC_SOC
> >  	  Enables support for the USB controller on the MPC52xx or
> >  	  STB03xxx processor chip.  If unsure, say Y.
> > 
> > -config USB_OHCI_HCD_PPC_OF
> > -	bool "OHCI support for PPC USB controller on OF platform bus"
> > -	depends on USB_OHCI_HCD && PPC_OF
> > -	default y
> > -	---help---
> > -	  Enables support for the USB controller PowerPC present on the
> > -	  OpenFirmware platform bus.
> > -
> >  config USB_OHCI_HCD_PPC_OF_BE
> > -	bool "Support big endian HC"
> > -	depends on USB_OHCI_HCD_PPC_OF
> > -	default y
> > +	bool "OHCI support for OF platform bus (big endian)"
> > +	depends on USB_OHCI_HCD && PPC_OF
> >  	select USB_OHCI_BIG_ENDIAN_DESC
> >  	select USB_OHCI_BIG_ENDIAN_MMIO
> > +	---help---
> > +	  Enables support for big-endian USB controllers present on the
> > +	  OpenFirmware platform bus.
> > 
> >  config USB_OHCI_HCD_PPC_OF_LE
> > -	bool "Support little endian HC"
> > -	depends on USB_OHCI_HCD_PPC_OF
> > -	default n
> > +	bool "OHCI support for OF platform bus (little endian)"
> > +	depends on USB_OHCI_HCD && PPC_OF
> >  	select USB_OHCI_LITTLE_ENDIAN
> > +	---help---
> > +	  Enables support for little-endian USB controllers present on the
> > +	  OpenFirmware platform bus.
> > +
> > +config USB_OHCI_HCD_PPC_OF
> > +	bool
> > +	depends on USB_OHCI_HCD && PPC_OF
> > +	default USB_OHCI_HCD_PPC_OF_BE || USB_OHCI_HCD_PPC_OF_LE
> > 
> >  config USB_OHCI_HCD_PCI
> >  	bool "OHCI support for PCI-bus USB controllers"
> > 

^ permalink raw reply

* Re: [Patch 2/6] Introduce PPC64 specific Hardware Breakpoint interfaces
From: David Gibson @ 2009-06-15  6:40 UTC (permalink / raw)
  To: K.Prasad
  Cc: Michael Neuling, Benjamin Herrenschmidt, linuxppc-dev, paulus,
	Alan Stern, Roland McGrath
In-Reply-To: <20090610064349.GA6912@in.ibm.com>

On Wed, Jun 10, 2009 at 12:13:49PM +0530, K.Prasad wrote:
> On Fri, Jun 05, 2009 at 03:11:58PM +1000, David Gibson wrote:
> > On Wed, Jun 03, 2009 at 10:05:11PM +0530, K.Prasad wrote:
> 
> Hi David,
> 	Sorry for the delay in response below. In the meanwhile, I
> discovered an issue in detecting stray exceptions that affected
> user-space handling of breakpoints. I've made some changes to correct
> that behaviour which will be included in version VI of the patchset.

[snip]
> > > +	/*
> > > +	 * User-space requests will always have the address field populated
> > > +	 * For kernel-addresses, either the address or symbol name can be
> > > +	 * specified.
> > > +	 */
> > > +	if (bp->info.name)
> > > +		bp->info.address = (unsigned long)
> > > +					kallsyms_lookup_name(bp->info.name);
> > 
> > Archs don't have to implement this name lookup stuff, but it looks
> > like most of them would - so it looks like there ought to be a helper
> > function in generic code that will do the check / name lookup stuff.
> 
> It doesn't turn out to be very generic. The IO breakpoints in x86, the
> address-range (only) breakpoints in S390 and perhaps 4xx powerpc
> processors were what made me think that this should remain in
> arch-specific code. In these cases, we might have to deal only with
> breakpoint addresses and not names.

Hrm, ok.  I was suggesting a helper function that those archs which
can use it call at need, not moving the address lookup to generic code
in the sense of being used everywhere.  Whatever, it's not that
important at this stage.

> > > +	if (bp->info.address)
> > > +		return 0;
> > 
> > Hrm.. you realise there's no theoretical reason a userspace program
> > couldn't put a breakpoint at address 0...?
> 
> I agree. I think there must be parts of code that works based on this
> assumption. Will check and remove them.

Ok, good.

[snip]
> > > +	else {
> > > +		/*
> > > +		 * This exception is triggered not because of a memory access on
> > > +		 * the monitored variable but in the double-word address range
> > > +		 * in which it is contained. We will consume this exception,
> > > +		 * considering it as 'noise'.
> > > +		 */
> > > +		rc = NOTIFY_STOP;
> > > +		goto out;
> > > +	}
> > > +	is_one_shot = (bp->triggered == ptrace_triggered) ? 1 : 0;
> > 
> > Ouch, explicitly special-casing ptrace_triggered is pretty nasty.
> > Since the bp_info is already arch specific, maybe it should include a
> > flag to indicate whether the breakpoint is one-shot or not.
> > 
> 
> The reason to check for ptrace_triggered is to contain the one-shot
> behaviour only to ptrace (thus retaining the semantics) and not to extend
> them to all user-space requests through
> register_user_hw_breakpoint().

Right, but couldn't you implement that withing ptrace_triggered
itself, without a special test here, by having it cancel the
breakpoint.

> A one-shot behaviour for all user-space requests would create more work
> for the user-space programs (such as re-registration) and will leave open
> a small window of opportunity for debug register grabbing by kernel-space
> requests.
> 
> So, in effect a request through register_user_hw_breakpoint() interface
> will behave as under:
> - Single-step over the causative instruction that triggered the
>   breakpoint exception handler.
> - Deliver the SIGTRAP signal to user-space after executing the causative
>   instruction.
> 
> This behaviour is in consonance with that of kernel-space requests and
> those on x86 processors, and helps define a consistent behaviour across
> architectures for user-space.
> 
> Let me know what you think on the same.

I certainly see the value in consistent semantics across archs.
However, I can also see uses for the powerpc trap-before-execute
behaviour.  That's why I'm suggesting it might be worth having an
arch-specific flag.

[snip]
> > > +int __kprobes single_step_dabr_instruction(struct die_args *args)
> > > +{
> > > +	struct pt_regs *regs = args->regs;
> > > +	int cpu = get_cpu();
> > > +	int ret = NOTIFY_DONE;
> > > +	siginfo_t info;
> > > +	unsigned long this_dabr_data = per_cpu(dabr_data, cpu);
> > > +
> > > +	/*
> > > +	 * Check if we are single-stepping as a result of a
> > > +	 * previous HW Breakpoint exception
> > > +	 */
> > > +	if (this_dabr_data == 0)
> > > +		goto out;
> > > +
> > > +	regs->msr &= ~MSR_SE;
> > > +	/* Deliver signal to user-space */
> > > +	if (this_dabr_data < TASK_SIZE) {
> > > +		info.si_signo = SIGTRAP;
> > > +		info.si_errno = 0;
> > > +		info.si_code = TRAP_HWBKPT;
> > > +		info.si_addr = (void __user *)(per_cpu(dabr_data, cpu));
> > > +		force_sig_info(SIGTRAP, &info, current);
> > 
> > Uh.. I recall mentioning in my previous review that in order to match
> > previous behaviour we need to deliver the userspace signal *before*
> > stepping over the breakpointed instruction, rather than after (which
> > I guess is why breakpoints are one-shot in the old scheme).
> 
> This code would implement the behaviour as stated in the comment for
> user-space requests above.

And you're relying on the old trap-sending code in do_dabr for ptrace
requests?

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: [PATCH 24/33] usb/ps3: Add missing annotations
From: Benjamin Herrenschmidt @ 2009-06-15  6:31 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linuxppc-dev, cbe-oss-dev
In-Reply-To: <1244644748-24211-25-git-send-email-Geert.Uytterhoeven@sonycom.com>

On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> probe functions should be __devinit
> initialization functions should be __init

Please send to USB maintainers or get an ack from them.

Cheers,
Ben.

> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Cc: Geoff Levand <geoffrey.levand@am.sony.com>
> ---
>  drivers/usb/host/ehci-ps3.c |    4 ++--
>  drivers/usb/host/ohci-ps3.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
> index bb870b8..3e8844e 100644
> --- a/drivers/usb/host/ehci-ps3.c
> +++ b/drivers/usb/host/ehci-ps3.c
> @@ -76,7 +76,7 @@ static const struct hc_driver ps3_ehci_hc_driver = {
>  	.port_handed_over	= ehci_port_handed_over,
>  };
>  
> -static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
> +static int __devinit ps3_ehci_probe(struct ps3_system_bus_device *dev)
>  {
>  	int result;
>  	struct usb_hcd *hcd;
> @@ -224,7 +224,7 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev)
>  	return 0;
>  }
>  
> -static int ps3_ehci_driver_register(struct ps3_system_bus_driver *drv)
> +static int __init ps3_ehci_driver_register(struct ps3_system_bus_driver *drv)
>  {
>  	return firmware_has_feature(FW_FEATURE_PS3_LV1)
>  		? ps3_system_bus_driver_register(drv)
> diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
> index 1d56259..7009504 100644
> --- a/drivers/usb/host/ohci-ps3.c
> +++ b/drivers/usb/host/ohci-ps3.c
> @@ -75,7 +75,7 @@ static const struct hc_driver ps3_ohci_hc_driver = {
>  #endif
>  };
>  
> -static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
> +static int __devinit ps3_ohci_probe(struct ps3_system_bus_device *dev)
>  {
>  	int result;
>  	struct usb_hcd *hcd;
> @@ -224,7 +224,7 @@ static int ps3_ohci_remove(struct ps3_system_bus_device *dev)
>  	return 0;
>  }
>  
> -static int ps3_ohci_driver_register(struct ps3_system_bus_driver *drv)
> +static int __init ps3_ohci_driver_register(struct ps3_system_bus_driver *drv)
>  {
>  	return firmware_has_feature(FW_FEATURE_PS3_LV1)
>  		? ps3_system_bus_driver_register(drv)

^ permalink raw reply

* Re: [PATCH 23/33] net/ps3: gelic - Add missing annotations
From: Benjamin Herrenschmidt @ 2009-06-15  6:31 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linuxppc-dev, cbe-oss-dev
In-Reply-To: <1244644748-24211-24-git-send-email-Geert.Uytterhoeven@sonycom.com>

On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> probe functions should be __devinit
> 
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Cc: Geoff Levand <geoffrey.levand@am.sony.com>

Please send to netdev or get an ack from davem.

Cheers,
Ben.

> ---
>  drivers/net/ps3_gelic_net.c      |   22 ++++++++++++----------
>  drivers/net/ps3_gelic_wireless.c |    6 +++---
>  2 files changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
> index 2b38f39..d1a5fb4 100644
> --- a/drivers/net/ps3_gelic_net.c
> +++ b/drivers/net/ps3_gelic_net.c
> @@ -214,9 +214,10 @@ static void gelic_card_free_chain(struct gelic_card *card,
>   *
>   * returns 0 on success, <0 on failure
>   */
> -static int gelic_card_init_chain(struct gelic_card *card,
> -				 struct gelic_descr_chain *chain,
> -				 struct gelic_descr *start_descr, int no)
> +static int __devinit gelic_card_init_chain(struct gelic_card *card,
> +					   struct gelic_descr_chain *chain,
> +					   struct gelic_descr *start_descr,
> +					   int no)
>  {
>  	int i;
>  	struct gelic_descr *descr;
> @@ -407,7 +408,7 @@ rewind:
>   *
>   * returns 0 on success, < 0 on failure
>   */
> -static int gelic_card_alloc_rx_skbs(struct gelic_card *card)
> +static int __devinit gelic_card_alloc_rx_skbs(struct gelic_card *card)
>  {
>  	struct gelic_descr_chain *chain;
>  	int ret;
> @@ -1422,8 +1423,8 @@ static const struct net_device_ops gelic_netdevice_ops = {
>   *
>   * fills out function pointers in the net_device structure
>   */
> -static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
> -					 struct napi_struct *napi)
> +static void __devinit gelic_ether_setup_netdev_ops(struct net_device *netdev,
> +						   struct napi_struct *napi)
>  {
>  	netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT;
>  	/* NAPI */
> @@ -1443,7 +1444,8 @@ static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
>   * gelic_ether_setup_netdev initializes the net_device structure
>   * and register it.
>   **/
> -int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card)
> +int __devinit gelic_net_setup_netdev(struct net_device *netdev,
> +				     struct gelic_card *card)
>  {
>  	int status;
>  	u64 v1, v2;
> @@ -1491,7 +1493,7 @@ int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card)
>   * the card and net_device structures are linked to each other
>   */
>  #define GELIC_ALIGN (32)
> -static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev)
> +static struct gelic_card * __devinit gelic_alloc_card_net(struct net_device **netdev)
>  {
>  	struct gelic_card *card;
>  	struct gelic_port *port;
> @@ -1542,7 +1544,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev)
>  	return card;
>  }
>  
> -static void gelic_card_get_vlan_info(struct gelic_card *card)
> +static void __devinit gelic_card_get_vlan_info(struct gelic_card *card)
>  {
>  	u64 v1, v2;
>  	int status;
> @@ -1616,7 +1618,7 @@ static void gelic_card_get_vlan_info(struct gelic_card *card)
>  /**
>   * ps3_gelic_driver_probe - add a device to the control of this driver
>   */
> -static int ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
> +static int __devinit ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
>  {
>  	struct gelic_card *card;
>  	struct net_device *netdev;
> diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
> index 4f3ada6..b6b3ca9 100644
> --- a/drivers/net/ps3_gelic_wireless.c
> +++ b/drivers/net/ps3_gelic_wireless.c
> @@ -2442,7 +2442,7 @@ static const struct iw_handler_def gelic_wl_wext_handler_def = {
>  #endif
>  };
>  
> -static struct net_device *gelic_wl_alloc(struct gelic_card *card)
> +static struct net_device * __devinit gelic_wl_alloc(struct gelic_card *card)
>  {
>  	struct net_device *netdev;
>  	struct gelic_port *port;
> @@ -2722,7 +2722,7 @@ static struct ethtool_ops gelic_wl_ethtool_ops = {
>  	.set_rx_csum	= gelic_net_set_rx_csum,
>  };
>  
> -static void gelic_wl_setup_netdev_ops(struct net_device *netdev)
> +static void __devinit gelic_wl_setup_netdev_ops(struct net_device *netdev)
>  {
>  	struct gelic_wl_info *wl;
>  	wl = port_wl(netdev_priv(netdev));
> @@ -2738,7 +2738,7 @@ static void gelic_wl_setup_netdev_ops(struct net_device *netdev)
>  /*
>   * driver probe/remove
>   */
> -int gelic_wl_driver_probe(struct gelic_card *card)
> +int __devinit gelic_wl_driver_probe(struct gelic_card *card)
>  {
>  	int ret;
>  	struct net_device *netdev;

^ permalink raw reply

* Re: [PATCH 26/33] sound/ps3: Fix checkpatch issues
From: Takashi Iwai @ 2009-06-15  6:07 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Geert Uytterhoeven, linuxppc-dev, alsa-devel, cbe-oss-dev,
	James Bottomley
In-Reply-To: <1245045063.19217.38.camel@pasglop>

At Mon, 15 Jun 2009 15:51:03 +1000,
Benjamin Herrenschmidt wrote:
> 
> On Mon, 2009-06-15 at 07:43 +0200, Takashi Iwai wrote:
> > The alsa part also already reached to the upstream, so we have to give
> > revert patches if needed.  But, in the case of sound bits, I think
> > they can remain there as they are independent changes.
> > But, if you think it's better to revert for the whole maintainability,
> > I'll revert in the next pull request that'll be sent soon later.
> > 
> No, that's ok, I'll remove those from my pile.

OK, thanks!


Takashi

^ permalink raw reply

* Re: [PATCH 05/33] block: Add bio_list_peek()
From: Jens Axboe @ 2009-06-15  5:56 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev
In-Reply-To: <1245029952.19217.4.camel@pasglop>

On Mon, Jun 15 2009, Benjamin Herrenschmidt wrote:
> On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> > Introduce bio_list_peek(), to obtain a pointer to the first bio on the bio_list
> > without actually removing it from the list. This is needed when you want to
> > serialize based on the list being empty or not.
> 
> Leaving that one (and the next one) out for now until Jens Ack them.

You can add my acked-by, this one is trivial and a good addition.

> 
> Cheers,
> Ben.
> 
> > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> > Cc: Jens Axboe <axboe@kernel.dk>
> > ---
> >  include/linux/bio.h |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/linux/bio.h b/include/linux/bio.h
> > index 7b214fd..618bb7d 100644
> > --- a/include/linux/bio.h
> > +++ b/include/linux/bio.h
> > @@ -590,6 +590,11 @@ static inline void bio_list_merge_head(struct bio_list *bl,
> >  	bl->head = bl2->head;
> >  }
> >  
> > +static inline struct bio *bio_list_peek(struct bio_list *bl)
> > +{
> > +	return bl->head;
> > +}
> > +
> >  static inline struct bio *bio_list_pop(struct bio_list *bl)
> >  {
> >  	struct bio *bio = bl->head;
> 

-- 
Jens Axboe

^ permalink raw reply

* Re: [PATCH 26/33] sound/ps3: Fix checkpatch issues
From: Benjamin Herrenschmidt @ 2009-06-15  5:51 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Geert Uytterhoeven, linuxppc-dev, alsa-devel, cbe-oss-dev,
	James Bottomley
In-Reply-To: <s5hski2dpba.wl%tiwai@suse.de>

On Mon, 2009-06-15 at 07:43 +0200, Takashi Iwai wrote:
> The alsa part also already reached to the upstream, so we have to give
> revert patches if needed.  But, in the case of sound bits, I think
> they can remain there as they are independent changes.
> But, if you think it's better to revert for the whole maintainability,
> I'll revert in the next pull request that'll be sent soon later.
> 
No, that's ok, I'll remove those from my pile.

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH 26/33] sound/ps3: Fix checkpatch issues
From: Takashi Iwai @ 2009-06-15  5:43 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Geert Uytterhoeven, linuxppc-dev, alsa-devel, cbe-oss-dev,
	James Bottomley
In-Reply-To: <1245032528.19217.20.camel@pasglop>

At Mon, 15 Jun 2009 12:22:08 +1000,
Benjamin Herrenschmidt wrote:
> 
> On Wed, 2009-06-10 at 16:55 +0200, Takashi Iwai wrote:
> > At Wed, 10 Jun 2009 16:39:01 +0200,
> > Geert Uytterhoeven wrote:
> > > 
> > > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> > > Cc: alsa-devel@alsa-project.org
> > > Cc: Takashi Iwai <tiwai@suse.de>
> > 
> > Thanks, applied these three patches (26,27,28) to sound git tree.
> 
> Are you sure they don't depend on the previous patches ? We're already
> having fallover from the SCSI tree merging some of them while I haven't
> merge the previous ones yet...

These three patches are just trivial changes: coding-style fixes,
shuffle of function lines, and addition of __devinit/__devexit
notations.  So they should be fairly safe and independent (thus I
applied them).  At least, the test cross-build was OK.


> Geert, there are several "procedural" issues with your series here: In
> addition to the whole thing being submitted too late that is :-)
> 
> You don't have the same CC list on all patches. That is fine except that
> you also don't provide merge instructions after the signature, such as
> "this patch depends on XX from this series" etc...
> 
> A bunch of them do have such dependencies. In fact, there's even a patch
> that changes something in the block layer (it's not a big deal, just
> adding an accessor, but I still -need- an Ack from Jens to merge it) and
> so I have to block all patches that depend on this one. But then, we
> have indirect dependencies where some patch don't apply because they
> touch the same file that was patched by the patch who had the dependency
> etc...
> 
> I ended up stopping mid-way through the series. I'll push some of the
> patches to my -next branch tonight, and the rest once I get the Ack from
> Jens.
> 
> I recommend all maintainers (scsi, alsa) just drop these patches for now
> and instead give me Ack's so I can merge them via the powerpc tree along
> with their respective dependencies. James, feel free to do a revert if
> you don't want to rebase, that will break bisect on ps3 for a little
> while, but that's the price Geert will have to pay for his mistakes :-)

The alsa part also already reached to the upstream, so we have to give
revert patches if needed.  But, in the case of sound bits, I think
they can remain there as they are independent changes.
But, if you think it's better to revert for the whole maintainability,
I'll revert in the next pull request that'll be sent soon later.


thanks,

Takashi

^ permalink raw reply

* Re: [PATCH 1/2] lib: Provide generic atomic64_t implementation
From: Paul Mackerras @ 2009-06-15  4:30 UTC (permalink / raw)
  To: Roland Dreier
  Cc: linux-kernel, linuxppc-dev, Avi Kivity, akpm, Linus Torvalds
In-Reply-To: <ada4ouixlk2.fsf@cisco.com>

Roland Dreier writes:

> FWIW, Nehalem EX actually goes to 8 cores/16 threads per socket.  But
> worrying about 32-bit performance on Nehalem is a little silly -- this
> simplest solution is simply to run a 64-bit kernel.

I'm not worried about ANY x86 processor, 32-bit or 64-bit, in fact,
since x86 already has an atomic64_t implementation for both 32-bit and
64-bit.

It is interesting, though, that arch/x86/include/asm/atomic_32.h
unconditionally uses cmpxchg8b to implement atomic64_t, but I thought
that cmpxchg8b didn't exist in processors prior to the Pentium.
Presumably you can't use perf_counters on a 386 or 486.

Paul.

^ permalink raw reply

* Re: [PATCH 1/2] lib: Provide generic atomic64_t implementation
From: Roland Dreier @ 2009-06-15  2:44 UTC (permalink / raw)
  To: Avi Kivity
  Cc: linux-kernel, linuxppc-dev, Paul Mackerras, akpm, Linus Torvalds
In-Reply-To: <4A34F564.2010500@redhat.com>


 > The new Nehalems provide 8 logical threads in a single socket.  All
 > those threads share a cache, and they have cmpxchg8b anyway, so this
 > won't matter.

FWIW, Nehalem EX actually goes to 8 cores/16 threads per socket.  But
worrying about 32-bit performance on Nehalem is a little silly -- this
simplest solution is simply to run a 64-bit kernel.

 - R.

^ permalink raw reply

* Re: [PATCH v4] 83xx: add support for the kmeter1 board.
From: David Gibson @ 2009-06-15  2:42 UTC (permalink / raw)
  To: Heiko Schocher; +Cc: Scott Wood, linuxppc-dev
In-Reply-To: <4A31E74E.6090505@denx.de>

On Fri, Jun 12, 2009 at 07:27:42AM +0200, Heiko Schocher wrote:
> Hello David,
> 
> David Gibson wrote:
> > On Thu, Jun 11, 2009 at 08:10:41PM +0200, Heiko Schocher wrote:
> >> The following series implements basic board support for
> >> the kmeter1 board from keymile, based on a MPC8360.
> > 
> > [snip]
> >> +		par_io@1400 {
> >> +			reg = <0x1400 0x100>;
> >> +			device_type = "par_io";
> > 
> > This should have a compatible value instead of a device_type value.
> 
> compatible = "fsl,mpc8360-par_io"; ?

Sounds reasonable, if there isn't an existing precedent to follow.

> > [snip]
> > 
> >> +			num-ports = <7>;
> >> +
> >> +			pio_ucc1: ucc_pin@00 {
> > 
> > Since these nodes have addresses, they should also have reg
> > properties.  And the parent should have #address-cells and
> > #size-cells.
> 
> added "#address-cells" and "#size-cells", but couldn;t find what
> I should write in a "reg" entry ... I think something like that:
> 
> reg = <0x00 0x01>;

If you just want a plain index number, which is what it seems you have
here, then you'll want #address-cells = 1, #size-cells = 0 and reg
will then have one cell (i.e. 1 u32) with the index number

so 	subnode@0 {
		reg = <0>;
	}
	subnode@1 {
		reg = <1>;
	}

Note also that it's usual for the unit addresses (that's the bits
after the @ sign) to be formatted without leading zeroes.

> 
> ?
> 
> > [snip]
> >> +		qe@100000 {
> >> +			#address-cells = <1>;
> >> +			#size-cells = <1>;
> >> +			device_type = "qe";
> > 
> > This device_type should not be here.
> 
> deleted.

Ok.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: [PATCH 26/33] sound/ps3: Fix checkpatch issues
From: Benjamin Herrenschmidt @ 2009-06-15  2:22 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Geert Uytterhoeven, linuxppc-dev, alsa-devel, cbe-oss-dev,
	James Bottomley
In-Reply-To: <s5hk53kf89j.wl%tiwai@suse.de>

On Wed, 2009-06-10 at 16:55 +0200, Takashi Iwai wrote:
> At Wed, 10 Jun 2009 16:39:01 +0200,
> Geert Uytterhoeven wrote:
> > 
> > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> > Cc: alsa-devel@alsa-project.org
> > Cc: Takashi Iwai <tiwai@suse.de>
> 
> Thanks, applied these three patches (26,27,28) to sound git tree.

Are you sure they don't depend on the previous patches ? We're already
having fallover from the SCSI tree merging some of them while I haven't
merge the previous ones yet...

Geert, there are several "procedural" issues with your series here: In
addition to the whole thing being submitted too late that is :-)

You don't have the same CC list on all patches. That is fine except that
you also don't provide merge instructions after the signature, such as
"this patch depends on XX from this series" etc...

A bunch of them do have such dependencies. In fact, there's even a patch
that changes something in the block layer (it's not a big deal, just
adding an accessor, but I still -need- an Ack from Jens to merge it) and
so I have to block all patches that depend on this one. But then, we
have indirect dependencies where some patch don't apply because they
touch the same file that was patched by the patch who had the dependency
etc...

I ended up stopping mid-way through the series. I'll push some of the
patches to my -next branch tonight, and the rest once I get the Ack from
Jens.

I recommend all maintainers (scsi, alsa) just drop these patches for now
and instead give me Ack's so I can merge them via the powerpc tree along
with their respective dependencies. James, feel free to do a revert if
you don't want to rebase, that will break bisect on ps3 for a little
while, but that's the price Geert will have to pay for his mistakes :-)

Cheers,
Ben.

> Takashi
> 
> > ---
> >  sound/ppc/snd_ps3.c |   32 +++++++++++++++-----------------
> >  1 files changed, 15 insertions(+), 17 deletions(-)
> > 
> > diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
> > index f361c26..d660b0f 100644
> > --- a/sound/ppc/snd_ps3.c
> > +++ b/sound/ppc/snd_ps3.c
> > @@ -165,8 +165,7 @@ static const struct snd_pcm_hardware snd_ps3_pcm_hw = {
> >  	.fifo_size = PS3_AUDIO_FIFO_SIZE
> >  };
> >  
> > -static struct snd_pcm_ops snd_ps3_pcm_spdif_ops =
> > -{
> > +static struct snd_pcm_ops snd_ps3_pcm_spdif_ops = {
> >  	.open = snd_ps3_pcm_open,
> >  	.close = snd_ps3_pcm_close,
> >  	.prepare = snd_ps3_pcm_prepare,
> > @@ -183,7 +182,7 @@ static int snd_ps3_verify_dma_stop(struct snd_ps3_card_info *card,
> >  	int dma_ch, done, retries, stop_forced = 0;
> >  	uint32_t status;
> >  
> > -	for (dma_ch = 0; dma_ch < 8; dma_ch ++) {
> > +	for (dma_ch = 0; dma_ch < 8; dma_ch++) {
> >  		retries = count;
> >  		do {
> >  			status = read_reg(PS3_AUDIO_KICK(dma_ch)) &
> > @@ -259,9 +258,7 @@ static void snd_ps3_kick_dma(struct snd_ps3_card_info *card)
> >  /*
> >   * convert virtual addr to ioif bus addr.
> >   */
> > -static dma_addr_t v_to_bus(struct snd_ps3_card_info *card,
> > -			   void * paddr,
> > -			   int ch)
> > +static dma_addr_t v_to_bus(struct snd_ps3_card_info *card, void *paddr, int ch)
> >  {
> >  	return card->dma_start_bus_addr[ch] +
> >  		(paddr - card->dma_start_vaddr[ch]);
> > @@ -321,7 +318,7 @@ static int snd_ps3_program_dma(struct snd_ps3_card_info *card,
> >  	spin_lock_irqsave(&card->dma_lock, irqsave);
> >  	for (ch = 0; ch < 2; ch++) {
> >  		start_vaddr = card->dma_next_transfer_vaddr[0];
> > -		for (stage = 0; stage < fill_stages; stage ++) {
> > +		for (stage = 0; stage < fill_stages; stage++) {
> >  			dma_ch = stage * 2 + ch;
> >  			if (silent)
> >  				dma_addr = card->null_buffer_start_dma_addr;
> > @@ -619,7 +616,7 @@ static int snd_ps3_change_avsetting(struct snd_ps3_card_info *card)
> >  			  PS3_AUDIO_AO_3WMCTRL_ASOEN(2) |
> >  			  PS3_AUDIO_AO_3WMCTRL_ASOEN(3)),
> >  			0);
> > -	wmb(); 	/* ensure the hardware sees the change */
> > +	wmb();	/* ensure the hardware sees the change */
> >  	/* wait for actually stopped */
> >  	retries = 1000;
> >  	while ((read_reg(PS3_AUDIO_AO_3WMCTRL) &
> > @@ -798,20 +795,20 @@ static struct snd_kcontrol_new spdif_ctls[] = {
> >  	{
> >  		.access = SNDRV_CTL_ELEM_ACCESS_READ,
> >  		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
> > -		.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),
> > +		.name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, CON_MASK),
> >  		.info = snd_ps3_spdif_mask_info,
> >  		.get = snd_ps3_spdif_cmask_get,
> >  	},
> >  	{
> >  		.access = SNDRV_CTL_ELEM_ACCESS_READ,
> >  		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
> > -		.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK),
> > +		.name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, PRO_MASK),
> >  		.info = snd_ps3_spdif_mask_info,
> >  		.get = snd_ps3_spdif_pmask_get,
> >  	},
> >  	{
> >  		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
> > -		.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
> > +		.name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
> >  		.info = snd_ps3_spdif_mask_info,
> >  		.get = snd_ps3_spdif_default_get,
> >  		.put = snd_ps3_spdif_default_put,
> > @@ -1020,11 +1017,12 @@ static int __init snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
> >  	 * its size should be lager than PS3_AUDIO_FIFO_STAGE_SIZE * 2
> >  	 * PAGE_SIZE is enogh
> >  	 */
> > -	if (!(the_card.null_buffer_start_vaddr =
> > -	      dma_alloc_coherent(&the_card.ps3_dev->core,
> > -				 PAGE_SIZE,
> > -				 &the_card.null_buffer_start_dma_addr,
> > -				 GFP_KERNEL))) {
> > +	the_card.null_buffer_start_vaddr =
> > +		dma_alloc_coherent(&the_card.ps3_dev->core,
> > +				   PAGE_SIZE,
> > +				   &the_card.null_buffer_start_dma_addr,
> > +				   GFP_KERNEL);
> > +	if (!the_card.null_buffer_start_vaddr) {
> >  		pr_info("%s: nullbuffer alloc failed\n", __func__);
> >  		goto clean_preallocate;
> >  	}
> > @@ -1148,7 +1146,7 @@ static irqreturn_t snd_ps3_interrupt(int irq, void *dev_id)
> >  				SND_PS3_DMA_FILLTYPE_SILENT_FIRSTFILL :
> >  				SND_PS3_DMA_FILLTYPE_SILENT_RUNNING);
> >  			snd_ps3_kick_dma(card);
> > -			card->silent --;
> > +			card->silent--;
> >  		} else {
> >  			snd_ps3_program_dma(card,
> >  				(underflow_occured) ?
> > -- 
> > 1.6.2.4
> > 

^ permalink raw reply

* [PATCH] powerpc: Add memory clobber to mtspr()
From: Benjamin Herrenschmidt @ 2009-06-15  2:16 UTC (permalink / raw)
  To: linuxppc-dev

Without this clobber, mtspr can be re-ordered by gcc vs. surrounding
memory accesses. While this might be ok for some cases, it's not in
others and I'm not confident that all callers get it right (In fact
I'm sure some of them don't).

So for now, let's make mtspr() itself contain a memory clobber until
we can audit and fix everything, at which point we can remove it
if we think it's worth doing so.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 arch/powerpc/include/asm/reg.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-work.orig/arch/powerpc/include/asm/reg.h	2009-06-15 12:01:06.000000000 +1000
+++ linux-work/arch/powerpc/include/asm/reg.h	2009-06-15 12:01:17.000000000 +1000
@@ -755,7 +755,8 @@
 #define mfspr(rn)	({unsigned long rval; \
 			asm volatile("mfspr %0," __stringify(rn) \
 				: "=r" (rval)); rval;})
-#define mtspr(rn, v)	asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
+#define mtspr(rn, v)	asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v)\
+				     : "memory")
 
 #ifdef __powerpc64__
 #ifdef CONFIG_PPC_CELL

^ permalink raw reply

* [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2009-06-15  2:08 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linuxppc-dev list, Andrew Morton, Linux Kernel list

Hi Linus !

Here's the first half of the powerpc merge for 2.6.31. I'll have the
rest in a couple of days, just dealing with some of my own backlog here
plus some collisions.

The few things outside of arch/powerpc are powerpc-specific drivers (and
an addition to pci_ids.h). There's also a cleanup of
drivers/pci/Makefile removing another unused ppc specific bit.

No major highlight this time around. Lots of minor fixes, tweaks and
cleanups, swiotlb is now available on some crazy embedded platforms (not
something to be -that- happy about), some new embedded boards, ...

There's a rather big ps3 update queued up for the next batch, but it
didn't make it here. Pauls atomic64_t for 32-bit platforms is in the
next batch too. Hopefully I'll have it ready for you in a day or two (I
want to let it simmer in -next for a couple of days).

Cheers,
Ben.
  
The following changes since commit 45e3e1935e2857c54783291107d33323b3ef33c8:
  Linus Torvalds (1):
        Merge branch 'master' of git://git.kernel.org/.../sam/kbuild-next

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

Anton Blanchard (2):
      powerpc: Improve decrementer accuracy
      powerpc: Convert RTAS event scan from kernel thread to workqueue

Anton Vorontsov (6):
      powerpc/85xx: Add PCI IDs for MPC8569 family processors
      powerpc/85xx: Fix mpc8569emds crypto node to include SNOW unit
      powerpc/85xx: Fix reg & interrupts for mpc8569emds localbus added NAND
      powerpc/85xx: Add eSDHC support for MPC8569E-MDS boards
      powerpc/85xx: Enable Serial RapidIO for MPC85xx MDS boards
      powerpc/85xx: Add STMicro M25P40 serial flash support for MPC8569E-MDS

Becky Bruce (4):
      powerpc/86xx: Add 36-bit device tree for mpc8641hpcn
      powerpc: make dma_window_* in pci_controller struct avail on 32b
      powerpc: Use sg->dma_length in sg_dma_len() macro on 32-bit
      powerpc: Add support for swiotlb on 32-bit

Benjamin Herrenschmidt (12):
      Merge branch 'merge' into next
      powerpc/mm: Fix some SMP issues with MMU context handling
      powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock
      powerpc: Set init_bootmem_done on NUMA platforms as well
      powerpc: Move VMX and VSX asm code to vector.S
      powerpc: Introduce CONFIG_PPC_BOOK3S
      powerpc: Split exception handling out of head_64.S
      powerpc: Separate PACA fields for server CPUs
      powerpc: Shield code specific to 64-bit server processors
      Merge commit 'jwb/next' into next
      powerpc: Fix bug in move of altivec code to vector.S
      Merge commit 'origin/master' into next

Geert Uytterhoeven (1):
      powerpc: Keep track of emulated instructions

Geoff Levand (1):
      powerpc/ps3: Use smp_request_message_ipi

Grant Likely (1):
      powerpc/virtex: refactor intc driver and add support for i8259 cascading

Haiying Wang (7):
      powerpc/85xx: clean up for mpc8568_mds name
      powerpc/qe: update risc allocation for QE
      net/ucc_geth: update riscTx and riscRx in ucc_geth
      powerpc/qe: update QE Serial Number
      net/ucc_geth: Assign six threads to Rx for UEC
      powerpc/85xx: Add MPC8569MDS board support
      powerpc/qe: add new qe properties for QE based chips

Jan Blunck (1):
      powerpc/spufs: Remove double check for non-negative dentry

John Linn (1):
      fbdev: Add PLB support and cleanup DCR in xilinxfb driver.

Josh Boyer (3):
      powerpc/4xx: Disable PCI_LEGACY
      powerpc/40x: Convert AMCC Makalu board to ppc40x_simple
      powerpc/40x: Convert AMCC Kilauea/Halekala boards to ppc40x_simple

Kumar Gala (32):
      powerpc/fsl: Remove cell-index from PCI nodes
      powerpc: Refactor board check for PCI quirks on FSL boards with uli1575
      powerpc/fsl: use of_iomap() for rstcr mapping
      powerpc/85xx: Add binding for LAWs and ECM
      powerpc/85xx: Add new LAW & ECM device tree nodes for all 85xx systems
      powerpc/86xx: Add binding for LAWs and MCM
      powerpc/86xx: Add new LAW & MCM device tree nodes for all 86xx systems
      powerpc/cpm: Remove some cruft code and defines
      powerpc/86xx: clean up smp init code
      powerpc/fsl: Removed reg property from 85xx/86xx soc node
      fsldma: Fix compile warnings
      powerpc/85xx: Add MSI nodes for MPC8568/9 MDS systems
      powerpc/fsl: Support unique MSI addresses per PCIe Root Complex
      powerpc/8xxx: Update PCI outbound window addresses for 36-bit configs
      powerpc/fsl_rio: Fix compile warnings
      powerpc/fsl: Update FSL esdhc binding
      powerpc/85xx: Add P2020DS board support
      powerpc/fsl: Setup PCI inbound window based on actual amount of memory
      powerpc: Fix up elf_read_implies_exec() usage
      powerpc/pci: Clean up direct access to sysdata by indirect ops
      powerpc/pci: Clean up direct access to sysdata by FSL platforms
      powerpc/pci: Clean up direct access to sysdata by 52xx platforms
      powerpc/pci: Clean up direct access to sysdata by 4xx platforms
      powerpc/pci: Clean up direct access to sysdata by CHRP platforms
      powerpc/pci: Clean up direct access to sysdata on tsi108 platforms
      powerpc/pci: Clean up direct access to sysdata by powermac platforms
      powerpc/pci: Clean up direct access to sysdata by RTAS
      powerpc/pci: Clean up direct access to sysdata by celleb platforms
      powerpc/pci: Move pseries code into pseries platform specific area
      powerpc/pci: Cleanup some minor cruft
      powerpc/pci: Remove redundant pcnet32 fixup
      powerpc/pci: clean up direct access to sysdata by iseries platform

Li Yang (2):
      powerpc/fsl_rio: use LAW address from device tree
      rapidio: fix section mismatch warnings

Michael Ellerman (10):
      powerpc/oprofile: Remove unused dump_pmcs() in FSL oprofile
      powerpc/irq: Move #ifdef'ed body of do_IRQ() into a separate function
      powerpc/irq: Move stack overflow check into a separate function
      powerpc/irq: Move get_irq() comment into header
      powerpc/irq: Remove fallback to __do_IRQ()
      powerpc/powermac: Use generic_handle_irq() in gatwick_action()
      powerpc/irq: We don't need __do_IRQ() anymore
      powerpc/ftrace: Use ppc_function_entry() instead of GET_ADDR
      powerpc/ftrace: Remove unused macros
      powerpc/ftrace: Use PPC_INST_NOP directly

Michael Neuling (3):
      powerpc: Cleanup macros in ppc-opcode.h
      powerpc: Move VSX load/stores into ppc-opcode.h
      powerpc: Make the NR_CPUS max 8192

Michel Dänzer (1):
      therm_adt746x: Always clear hardware bit which inverts fan speed range.

Milton Miller (2):
      powerpc: Enable MMU feature sections for inline asm
      powerpc: Add 2.06 tlbie mnemonics

Nathan Fontenot (1):
      powerpc: Display processor virtualization resource allocs in lparcfg

Robert Jennings (1):
      powerpc/pseries: CMO unused page hinting

Roderick Colenbrander (3):
      powerpc/virtex: Add support for Xilinx PCI host bridge
      powerpc/virtex: Add Xilinx ML510 reference design support
      powerpc/virtex: Add ml510 reference design device tree

Roland McGrath (1):
      powerpc: Add PTRACE_SINGLEBLOCK support

Sean MacLennan (2):
      powerpc: Update Warp to use leds-gpio driver
      i2c: Fix confusing i2c-ibm_iic message

Stefan Roese (1):
      powerpc/4xx: Sequoia: Enable NAND support

Stephen Rothwell (5):
      powerpc/pci: Fix annotation of pcibios_claim_one_bus
      powerpc/pseries: Fix warnings when printing resource_size_t
      powerpc/xmon: Remove unused variable in xmon.c
      powerpc: Fix warning when printing a resource_size_t
      powerpc/spufs: Remove unused error path

Tony Breeds (1):
      powerpc/mpic: Cleanup mpic_find() implementation

Vinay Sridhar (1):
      powerpc/xmon: Add dl command to dump contents of __log_buf

roel kluin (1):
      tape: beyond ARRAY_SIZE of viocd_diskinfo

 Documentation/kernel-parameters.txt                |    7 +
 Documentation/powerpc/dts-bindings/ecm.txt         |   64 ++
 .../powerpc/dts-bindings/fsl/cpm_qe/qe.txt         |    3 +
 Documentation/powerpc/dts-bindings/fsl/esdhc.txt   |    5 +-
 Documentation/powerpc/dts-bindings/fsl/mcm.txt     |   64 ++
 arch/powerpc/Kconfig                               |   16 +-
 arch/powerpc/Kconfig.debug                         |   13 +
 arch/powerpc/Makefile                              |    1 +
 arch/powerpc/boot/dts/gef_ppc9a.dts                |   14 +-
 arch/powerpc/boot/dts/gef_sbc310.dts               |   14 +-
 arch/powerpc/boot/dts/gef_sbc610.dts               |   14 +-
 arch/powerpc/boot/dts/ksi8560.dts                  |   13 +
 arch/powerpc/boot/dts/mpc832x_mds.dts              |    3 +-
 arch/powerpc/boot/dts/mpc832x_rdb.dts              |    3 +-
 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              |    3 +-
 arch/powerpc/boot/dts/mpc836x_rdk.dts              |    2 +
 arch/powerpc/boot/dts/mpc8377_mds.dts              |    1 -
 arch/powerpc/boot/dts/mpc8378_mds.dts              |    1 -
 arch/powerpc/boot/dts/mpc8379_mds.dts              |    1 -
 arch/powerpc/boot/dts/mpc8536ds.dts                |   18 +-
 arch/powerpc/boot/dts/mpc8540ads.dts               |   15 +-
 arch/powerpc/boot/dts/mpc8541cds.dts               |   16 +-
 arch/powerpc/boot/dts/mpc8544ds.dts                |   18 +-
 arch/powerpc/boot/dts/mpc8548cds.dts               |   17 +-
 arch/powerpc/boot/dts/mpc8555cds.dts               |   16 +-
 arch/powerpc/boot/dts/mpc8560ads.dts               |   15 +-
 arch/powerpc/boot/dts/mpc8568mds.dts               |   51 +-
 arch/powerpc/boot/dts/mpc8569mds.dts               |  583 +++++++++++
 arch/powerpc/boot/dts/mpc8572ds.dts                |   17 +-
 arch/powerpc/boot/dts/mpc8572ds_36b.dts            |   39 +-
 arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts     |   16 +-
 arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts     |    2 -
 arch/powerpc/boot/dts/mpc8610_hpcd.dts             |   16 +-
 arch/powerpc/boot/dts/mpc8641_hpcn.dts             |   16 +-
 arch/powerpc/boot/dts/mpc8641_hpcn_36b.dts         |  609 +++++++++++
 arch/powerpc/boot/dts/p2020ds.dts                  |  704 +++++++++++++
 arch/powerpc/boot/dts/sbc8349.dts                  |    1 -
 arch/powerpc/boot/dts/sbc8548.dts                  |   16 +-
 arch/powerpc/boot/dts/sbc8560.dts                  |   15 +-
 arch/powerpc/boot/dts/sbc8641d.dts                 |   16 +-
 arch/powerpc/boot/dts/sequoia.dts                  |   22 +
 arch/powerpc/boot/dts/socrates.dts                 |   15 +-
 arch/powerpc/boot/dts/stx_gp3_8560.dts             |   15 +-
 arch/powerpc/boot/dts/tqm8540.dts                  |   15 +-
 arch/powerpc/boot/dts/tqm8541.dts                  |   15 +-
 arch/powerpc/boot/dts/tqm8548-bigflash.dts         |   16 +-
 arch/powerpc/boot/dts/tqm8548.dts                  |   16 +-
 arch/powerpc/boot/dts/tqm8555.dts                  |   15 +-
 arch/powerpc/boot/dts/tqm8560.dts                  |   15 +-
 arch/powerpc/boot/dts/virtex440-ml510.dts          |  465 +++++++++
 arch/powerpc/boot/dts/warp.dts                     |   27 +-
 arch/powerpc/configs/40x/acadia_defconfig          |    2 +-
 arch/powerpc/configs/40x/ep405_defconfig           |    2 +-
 arch/powerpc/configs/40x/kilauea_defconfig         |   81 ++-
 arch/powerpc/configs/40x/makalu_defconfig          |   81 ++-
 arch/powerpc/configs/40x/virtex_defconfig          |    2 +-
 arch/powerpc/configs/44x/arches_defconfig          |    2 +-
 arch/powerpc/configs/44x/bamboo_defconfig          |    2 +-
 arch/powerpc/configs/44x/canyonlands_defconfig     |    6 +-
 arch/powerpc/configs/44x/ebony_defconfig           |    2 +-
 arch/powerpc/configs/44x/katmai_defconfig          |    2 +-
 arch/powerpc/configs/44x/rainier_defconfig         |    2 +-
 arch/powerpc/configs/44x/redwood_defconfig         |    2 +-
 arch/powerpc/configs/44x/sam440ep_defconfig        |    2 +-
 arch/powerpc/configs/44x/sequoia_defconfig         |  111 ++-
 arch/powerpc/configs/44x/taishan_defconfig         |    2 +-
 arch/powerpc/configs/44x/virtex5_defconfig         |    2 +-
 arch/powerpc/include/asm/cpm2.h                    |    4 -
 arch/powerpc/include/asm/dma-mapping.h             |   11 +
 arch/powerpc/include/asm/elf.h                     |    4 +-
 arch/powerpc/include/asm/emulated_ops.h            |   73 ++
 arch/powerpc/include/asm/feature-fixups.h          |   25 +-
 arch/powerpc/include/asm/lppaca.h                  |    6 +
 arch/powerpc/include/asm/machdep.h                 |    4 +
 arch/powerpc/include/asm/mmu.h                     |    9 +-
 arch/powerpc/include/asm/mpc86xx.h                 |   33 -
 arch/powerpc/include/asm/paca.h                    |   12 +-
 arch/powerpc/include/asm/page.h                    |    5 +
 arch/powerpc/include/asm/pci-bridge.h              |   13 +-
 arch/powerpc/include/asm/pgtable-ppc64.h           |    5 +
 arch/powerpc/include/asm/ppc-opcode.h              |   25 +-
 arch/powerpc/include/asm/ppc_asm.h                 |   10 -
 arch/powerpc/include/asm/ptrace.h                  |    4 +
 arch/powerpc/include/asm/qe.h                      |   21 +-
 arch/powerpc/include/asm/scatterlist.h             |    6 +-
 arch/powerpc/include/asm/swiotlb.h                 |   27 +
 arch/powerpc/include/asm/system.h                  |    2 +-
 arch/powerpc/include/asm/xilinx_pci.h              |   21 +
 arch/powerpc/kernel/Makefile                       |    4 +-
 arch/powerpc/kernel/align.c                        |   20 +-
 arch/powerpc/kernel/asm-offsets.c                  |   32 +-
 arch/powerpc/kernel/cputable.c                     |    6 +-
 arch/powerpc/kernel/dma-swiotlb.c                  |  163 +++
 arch/powerpc/kernel/dma.c                          |    2 +-
 arch/powerpc/kernel/exceptions-64s.S               |  978 +++++++++++++++++
 arch/powerpc/kernel/ftrace.c                       |   29 +-
 arch/powerpc/kernel/head_32.S                      |  101 +--
 arch/powerpc/kernel/head_64.S                      | 1095 +-------------------
 arch/powerpc/kernel/head_booke.h                   |   10 +-
 arch/powerpc/kernel/irq.c                          |  127 ++--
 arch/powerpc/kernel/lparcfg.c                      |   40 +-
 arch/powerpc/kernel/misc_64.S                      |   92 --
 arch/powerpc/kernel/paca.c                         |   14 +-
 arch/powerpc/kernel/pci-common.c                   |    3 +-
 arch/powerpc/kernel/pci_32.c                       |   19 -
 arch/powerpc/kernel/pci_64.c                       |   17 +-
 arch/powerpc/kernel/pci_dn.c                       |   28 +-
 arch/powerpc/kernel/process.c                      |    2 +-
 arch/powerpc/kernel/prom.c                         |    2 +-
 arch/powerpc/kernel/ptrace.c                       |   23 +-
 arch/powerpc/kernel/rtas_pci.c                     |   10 +-
 arch/powerpc/kernel/setup_32.c                     |    6 +
 arch/powerpc/kernel/setup_64.c                     |   11 +-
 arch/powerpc/kernel/time.c                         |   21 +-
 arch/powerpc/kernel/traps.c                        |  130 +++-
 arch/powerpc/kernel/vector.S                       |  210 ++++
 arch/powerpc/mm/Makefile                           |    7 +-
 arch/powerpc/mm/hash_native_64.c                   |   13 +-
 arch/powerpc/mm/init_64.c                          |    2 +
 arch/powerpc/mm/mmu_context_nohash.c               |   19 +-
 arch/powerpc/mm/numa.c                             |    2 +
 arch/powerpc/oprofile/op_model_fsl_emb.c           |   14 -
 arch/powerpc/platforms/40x/Kconfig                 |    2 +
 arch/powerpc/platforms/40x/Makefile                |    2 -
 arch/powerpc/platforms/40x/kilauea.c               |   60 --
 arch/powerpc/platforms/40x/makalu.c                |   60 --
 arch/powerpc/platforms/40x/ppc40x_simple.c         |    5 +-
 arch/powerpc/platforms/40x/virtex.c                |    2 +
 arch/powerpc/platforms/44x/Kconfig                 |   13 +-
 arch/powerpc/platforms/44x/Makefile                |    1 +
 arch/powerpc/platforms/44x/virtex.c                |    2 +
 arch/powerpc/platforms/44x/virtex_ml510.c          |   29 +
 arch/powerpc/platforms/44x/warp.c                  |   76 +-
 arch/powerpc/platforms/52xx/efika.c                |    4 +-
 arch/powerpc/platforms/52xx/mpc52xx_pci.c          |    4 +-
 arch/powerpc/platforms/82xx/pq2ads.h               |   13 -
 arch/powerpc/platforms/85xx/Kconfig                |    1 +
 arch/powerpc/platforms/85xx/mpc85xx_ds.c           |   43 +-
 arch/powerpc/platforms/85xx/mpc85xx_mds.c          |   52 +-
 arch/powerpc/platforms/86xx/gef_ppc9a.c            |    1 -
 arch/powerpc/platforms/86xx/gef_sbc310.c           |    1 -
 arch/powerpc/platforms/86xx/gef_sbc610.c           |    1 -
 arch/powerpc/platforms/86xx/mpc8610_hpcd.c         |    1 -
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c         |    1 -
 arch/powerpc/platforms/86xx/mpc86xx_smp.c          |    8 +-
 arch/powerpc/platforms/86xx/sbc8641d.c             |    1 -
 arch/powerpc/platforms/8xx/mpc885ads.h             |    4 -
 arch/powerpc/platforms/Kconfig                     |    4 +
 arch/powerpc/platforms/Kconfig.cputype             |   26 +-
 arch/powerpc/platforms/cell/celleb_pci.c           |   10 +-
 arch/powerpc/platforms/cell/celleb_scc_epci.c      |   13 +-
 arch/powerpc/platforms/cell/celleb_scc_pciex.c     |   12 +-
 arch/powerpc/platforms/cell/spufs/inode.c          |    6 -
 arch/powerpc/platforms/chrp/pci.c                  |    8 +-
 arch/powerpc/platforms/fsl_uli1575.c               |   24 +-
 arch/powerpc/platforms/iseries/iommu.c             |    2 +-
 arch/powerpc/platforms/iseries/pci.c               |    8 +-
 arch/powerpc/platforms/powermac/pic.c              |    2 +-
 arch/powerpc/platforms/powermac/setup.c            |    2 +-
 arch/powerpc/platforms/ps3/smp.c                   |   16 +-
 arch/powerpc/platforms/pseries/iommu.c             |    4 +-
 arch/powerpc/platforms/pseries/lpar.c              |   52 +
 arch/powerpc/platforms/pseries/rtasd.c             |   76 +-
 arch/powerpc/platforms/pseries/setup.c             |   25 +
 arch/powerpc/sysdev/Makefile                       |    1 +
 arch/powerpc/sysdev/cpm2.c                         |    2 +-
 arch/powerpc/sysdev/fsl_msi.c                      |    9 +-
 arch/powerpc/sysdev/fsl_pci.c                      |  138 +++-
 arch/powerpc/sysdev/fsl_pci.h                      |    6 +-
 arch/powerpc/sysdev/fsl_rio.c                      |   15 +-
 arch/powerpc/sysdev/fsl_soc.c                      |   14 +-
 arch/powerpc/sysdev/indirect_pci.c                 |    4 +-
 arch/powerpc/sysdev/mpic.c                         |   23 +-
 arch/powerpc/sysdev/ppc4xx_pci.c                   |    4 +-
 arch/powerpc/sysdev/qe_lib/qe.c                    |   75 ++-
 arch/powerpc/sysdev/tsi108_pci.c                   |    4 +-
 arch/powerpc/sysdev/xilinx_intc.c                  |   81 ++-
 arch/powerpc/sysdev/xilinx_pci.c                   |  132 +++
 arch/powerpc/xmon/xmon.c                           |   47 +
 drivers/char/viotape.c                             |    2 +-
 drivers/i2c/busses/i2c-ibm_iic.c                   |    6 +-
 drivers/macintosh/therm_adt746x.c                  |    4 +-
 drivers/net/ucc_geth.c                             |   24 +-
 drivers/net/ucc_geth.h                             |    4 +-
 drivers/of/base.c                                  |    1 +
 drivers/pci/Makefile                               |    1 -
 drivers/rapidio/rio-scan.c                         |    6 +-
 drivers/video/xilinxfb.c                           |  290 +++---
 include/linux/pci_ids.h                            |    4 +
 192 files changed, 6191 insertions(+), 2357 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/ecm.txt
 create mode 100644 Documentation/powerpc/dts-bindings/fsl/mcm.txt
 create mode 100644 arch/powerpc/boot/dts/mpc8569mds.dts
 create mode 100644 arch/powerpc/boot/dts/mpc8641_hpcn_36b.dts
 create mode 100644 arch/powerpc/boot/dts/p2020ds.dts
 create mode 100644 arch/powerpc/boot/dts/virtex440-ml510.dts
 create mode 100644 arch/powerpc/include/asm/emulated_ops.h
 delete mode 100644 arch/powerpc/include/asm/mpc86xx.h
 create mode 100644 arch/powerpc/include/asm/swiotlb.h
 create mode 100644 arch/powerpc/include/asm/xilinx_pci.h
 create mode 100644 arch/powerpc/kernel/dma-swiotlb.c
 create mode 100644 arch/powerpc/kernel/exceptions-64s.S
 delete mode 100644 arch/powerpc/platforms/40x/kilauea.c
 delete mode 100644 arch/powerpc/platforms/40x/makalu.c
 create mode 100644 arch/powerpc/platforms/44x/virtex_ml510.c
 create mode 100644 arch/powerpc/sysdev/xilinx_pci.c

^ permalink raw reply

* Re: [PATCH] powerpc: Make RTAS instantiation depend on CONFIG_PPC_RTAS
From: Benjamin Herrenschmidt @ 2009-06-15  1:49 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <56982642b8954ea193ae48c5d02e8dbd84d72f17.1244779685.git.michael@ellerman.id.au>

On Fri, 2009-06-12 at 14:08 +1000, Michael Ellerman wrote:
> Currently prom_init.c always instantiates RTAS, even if the kernel
> is built without RTAS support - that seems wrong.

Nak :-)

We want to always instantiate it from prom_init.c because we can't do
it any more later. There's the vague possibility that you may want to
boot a non-RTAS kernel which then kexec's into an RTAS kernel, and that
isn't possible if the initial prom_init.c didn't instanciate RTAS and
put a reference to it in the flat device-tree.

Cheers,
Ben.

> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
>  arch/powerpc/kernel/prom_init.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> index 2f0e64b..6c2dc59 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -1052,6 +1052,7 @@ static void __init prom_init_mem(void)
>  }
>  
> 
> +#ifdef CONFIG_PPC_RTAS
>  /*
>   * Allocate room for and instantiate RTAS
>   */
> @@ -1109,6 +1110,9 @@ static void __init prom_instantiate_rtas(void)
>  
>  	prom_debug("prom_instantiate_rtas: end...\n");
>  }
> +#else
> +static inline void prom_instantiate_rtas(void) { }
> +#endif /* CONFIG_PPC_RTAS */
>  
>  #ifdef CONFIG_PPC64
>  /*

^ permalink raw reply

* Re: [PATCH 10/33] powerpc/cell: Extract duplicated IOPTE_* to <asm/iommu.h>
From: Benjamin Herrenschmidt @ 2009-06-15  1:41 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linuxppc-dev, cbe-oss-dev
In-Reply-To: <1244644748-24211-11-git-send-email-Geert.Uytterhoeven@sonycom.com>

On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> Both arch/powerpc/platforms/cell/iommu.c and arch/powerpc/platforms/ps3/mm.c
> contain the same Cell IOMMU page table entry definitions. Extract them and move
> them to <asm/iommu.h>, while adding a CBE_ prefix.
> This also allows them to be used by drivers.

Are we sure include/asm/iommu.h is the right place for that ?

I'm hesitating here...

Cheers,
Ben.

> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> ---
> v2: Add CBE_ prefix
> 
>  arch/powerpc/include/asm/iommu.h        |   10 ++++++++
>  arch/powerpc/platforms/cell/iommu.c     |   37 ++++++++++++------------------
>  arch/powerpc/platforms/ps3/mm.c         |    7 ++++-
>  arch/powerpc/platforms/ps3/platform.h   |   10 --------
>  arch/powerpc/platforms/ps3/system-bus.c |   15 +++++++-----
>  5 files changed, 39 insertions(+), 40 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
> index 7464c0d..7ead7c1 100644
> --- a/arch/powerpc/include/asm/iommu.h
> +++ b/arch/powerpc/include/asm/iommu.h
> @@ -35,6 +35,16 @@
>  #define IOMMU_PAGE_MASK       (~((1 << IOMMU_PAGE_SHIFT) - 1))
>  #define IOMMU_PAGE_ALIGN(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE)
>  
> +/* Cell page table entries */
> +#define CBE_IOPTE_PP_W		0x8000000000000000ul /* protection: write */
> +#define CBE_IOPTE_PP_R		0x4000000000000000ul /* protection: read */
> +#define CBE_IOPTE_M		0x2000000000000000ul /* coherency required */
> +#define CBE_IOPTE_SO_R		0x1000000000000000ul /* ordering: writes */
> +#define CBE_IOPTE_SO_RW		0x1800000000000000ul /* ordering: r & w */
> +#define CBE_IOPTE_RPN_Mask	0x07fffffffffff000ul /* RPN */
> +#define CBE_IOPTE_H		0x0000000000000800ul /* cache hint */
> +#define CBE_IOPTE_IOID_Mask	0x00000000000007fful /* ioid */
> +
>  /* Boot time flags */
>  extern int iommu_is_off;
>  extern int iommu_force_on;
> diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
> index bed4690..5b34fc2 100644
> --- a/arch/powerpc/platforms/cell/iommu.c
> +++ b/arch/powerpc/platforms/cell/iommu.c
> @@ -100,16 +100,6 @@
>  #define IOSTE_PS_1M		0x0000000000000005ul /*   - 1MB  */
>  #define IOSTE_PS_16M		0x0000000000000007ul /*   - 16MB */
>  
> -/* Page table entries */
> -#define IOPTE_PP_W		0x8000000000000000ul /* protection: write */
> -#define IOPTE_PP_R		0x4000000000000000ul /* protection: read */
> -#define IOPTE_M			0x2000000000000000ul /* coherency required */
> -#define IOPTE_SO_R		0x1000000000000000ul /* ordering: writes */
> -#define IOPTE_SO_RW             0x1800000000000000ul /* ordering: r & w */
> -#define IOPTE_RPN_Mask		0x07fffffffffff000ul /* RPN */
> -#define IOPTE_H			0x0000000000000800ul /* cache hint */
> -#define IOPTE_IOID_Mask		0x00000000000007fful /* ioid */
> -
>  
>  /* IOMMU sizing */
>  #define IO_SEGMENT_SHIFT	28
> @@ -193,19 +183,21 @@ static int tce_build_cell(struct iommu_table *tbl, long index, long npages,
>  	 */
>  	const unsigned long prot = 0xc48;
>  	base_pte =
> -		((prot << (52 + 4 * direction)) & (IOPTE_PP_W | IOPTE_PP_R))
> -		| IOPTE_M | IOPTE_SO_RW | (window->ioid & IOPTE_IOID_Mask);
> +		((prot << (52 + 4 * direction)) &
> +		 (CBE_IOPTE_PP_W | CBE_IOPTE_PP_R)) |
> +		CBE_IOPTE_M | CBE_IOPTE_SO_RW |
> +		(window->ioid & CBE_IOPTE_IOID_Mask);
>  #else
> -	base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW |
> -		(window->ioid & IOPTE_IOID_Mask);
> +	base_pte = CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_M |
> +		CBE_IOPTE_SO_RW | (window->ioid & CBE_IOPTE_IOID_Mask);
>  #endif
>  	if (unlikely(dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)))
> -		base_pte &= ~IOPTE_SO_RW;
> +		base_pte &= ~CBE_IOPTE_SO_RW;
>  
>  	io_pte = (unsigned long *)tbl->it_base + (index - tbl->it_offset);
>  
>  	for (i = 0; i < npages; i++, uaddr += IOMMU_PAGE_SIZE)
> -		io_pte[i] = base_pte | (__pa(uaddr) & IOPTE_RPN_Mask);
> +		io_pte[i] = base_pte | (__pa(uaddr) & CBE_IOPTE_RPN_Mask);
>  
>  	mb();
>  
> @@ -231,8 +223,9 @@ static void tce_free_cell(struct iommu_table *tbl, long index, long npages)
>  #else
>  	/* spider bridge does PCI reads after freeing - insert a mapping
>  	 * to a scratch page instead of an invalid entry */
> -	pte = IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW | __pa(window->iommu->pad_page)
> -		| (window->ioid & IOPTE_IOID_Mask);
> +	pte = CBE_IOPTE_PP_R | CBE_IOPTE_M | CBE_IOPTE_SO_RW |
> +		__pa(window->iommu->pad_page) |
> +		(window->ioid & CBE_IOPTE_IOID_Mask);
>  #endif
>  
>  	io_pte = (unsigned long *)tbl->it_base + (index - tbl->it_offset);
> @@ -1001,7 +994,7 @@ static void insert_16M_pte(unsigned long addr, unsigned long *ptab,
>  	pr_debug("iommu: addr %lx ptab %p segment %lx offset %lx\n",
>  		  addr, ptab, segment, offset);
>  
> -	ptab[offset] = base_pte | (__pa(addr) & IOPTE_RPN_Mask);
> +	ptab[offset] = base_pte | (__pa(addr) & CBE_IOPTE_RPN_Mask);
>  }
>  
>  static void cell_iommu_setup_fixed_ptab(struct cbe_iommu *iommu,
> @@ -1016,14 +1009,14 @@ static void cell_iommu_setup_fixed_ptab(struct cbe_iommu *iommu,
>  
>  	pr_debug("iommu: mapping 0x%lx pages from 0x%lx\n", fsize, fbase);
>  
> -	base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M
> -		    | (cell_iommu_get_ioid(np) & IOPTE_IOID_Mask);
> +	base_pte = CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_M |
> +		(cell_iommu_get_ioid(np) & CBE_IOPTE_IOID_Mask);
>  
>  	if (iommu_fixed_is_weak)
>  		pr_info("IOMMU: Using weak ordering for fixed mapping\n");
>  	else {
>  		pr_info("IOMMU: Using strong ordering for fixed mapping\n");
> -		base_pte |= IOPTE_SO_RW;
> +		base_pte |= CBE_IOPTE_SO_RW;
>  	}
>  
>  	for (uaddr = 0; uaddr < fsize; uaddr += (1 << 24)) {
> diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
> index 9a2b6d9..017b614 100644
> --- a/arch/powerpc/platforms/ps3/mm.c
> +++ b/arch/powerpc/platforms/ps3/mm.c
> @@ -24,6 +24,7 @@
>  #include <linux/lmb.h>
>  
>  #include <asm/firmware.h>
> +#include <asm/iommu.h>
>  #include <asm/prom.h>
>  #include <asm/udbg.h>
>  #include <asm/lv1call.h>
> @@ -1001,7 +1002,8 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r)
>  		if (len > r->len)
>  			len = r->len;
>  		result = dma_sb_map_area(r, virt_addr, len, &tmp,
> -			IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
> +			CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_SO_RW |
> +			CBE_IOPTE_M);
>  		BUG_ON(result);
>  	}
>  
> @@ -1014,7 +1016,8 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r)
>  		else
>  			len -= map.rm.size - r->offset;
>  		result = dma_sb_map_area(r, virt_addr, len, &tmp,
> -			IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
> +			CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_SO_RW |
> +			CBE_IOPTE_M);
>  		BUG_ON(result);
>  	}
>  
> diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
> index 136aa06..9a196a8 100644
> --- a/arch/powerpc/platforms/ps3/platform.h
> +++ b/arch/powerpc/platforms/ps3/platform.h
> @@ -232,14 +232,4 @@ int ps3_repository_read_spu_resource_id(unsigned int res_index,
>  int ps3_repository_read_vuart_av_port(unsigned int *port);
>  int ps3_repository_read_vuart_sysmgr_port(unsigned int *port);
>  
> -/* Page table entries */
> -#define IOPTE_PP_W		0x8000000000000000ul /* protection: write */
> -#define IOPTE_PP_R		0x4000000000000000ul /* protection: read */
> -#define IOPTE_M			0x2000000000000000ul /* coherency required */
> -#define IOPTE_SO_R		0x1000000000000000ul /* ordering: writes */
> -#define IOPTE_SO_RW             0x1800000000000000ul /* ordering: r & w */
> -#define IOPTE_RPN_Mask		0x07fffffffffff000ul /* RPN */
> -#define IOPTE_H			0x0000000000000800ul /* cache hint */
> -#define IOPTE_IOID_Mask		0x00000000000007fful /* ioid */
> -
>  #endif
> diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
> index 9a73d02..9fead0f 100644
> --- a/arch/powerpc/platforms/ps3/system-bus.c
> +++ b/arch/powerpc/platforms/ps3/system-bus.c
> @@ -27,6 +27,7 @@
>  #include <asm/udbg.h>
>  #include <asm/lv1call.h>
>  #include <asm/firmware.h>
> +#include <asm/iommu.h>
>  
>  #include "platform.h"
>  
> @@ -531,7 +532,8 @@ static void * ps3_alloc_coherent(struct device *_dev, size_t size,
>  	}
>  
>  	result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle,
> -			     IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
> +			     CBE_IOPTE_PP_W | CBE_IOPTE_PP_R |
> +			     CBE_IOPTE_SO_RW | CBE_IOPTE_M);
>  
>  	if (result) {
>  		pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
> @@ -575,7 +577,8 @@ static dma_addr_t ps3_sb_map_page(struct device *_dev, struct page *page,
>  
>  	result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
>  			     &bus_addr,
> -			     IOPTE_PP_R | IOPTE_PP_W | IOPTE_SO_RW | IOPTE_M);
> +			     CBE_IOPTE_PP_R | CBE_IOPTE_PP_W |
> +			     CBE_IOPTE_SO_RW | CBE_IOPTE_M);
>  
>  	if (result) {
>  		pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
> @@ -596,16 +599,16 @@ static dma_addr_t ps3_ioc0_map_page(struct device *_dev, struct page *page,
>  	u64 iopte_flag;
>  	void *ptr = page_address(page) + offset;
>  
> -	iopte_flag = IOPTE_M;
> +	iopte_flag = CBE_IOPTE_M;
>  	switch (direction) {
>  	case DMA_BIDIRECTIONAL:
> -		iopte_flag |= IOPTE_PP_R | IOPTE_PP_W | IOPTE_SO_RW;
> +		iopte_flag |= CBE_IOPTE_PP_R | CBE_IOPTE_PP_W | CBE_IOPTE_SO_RW;
>  		break;
>  	case DMA_TO_DEVICE:
> -		iopte_flag |= IOPTE_PP_R | IOPTE_SO_R;
> +		iopte_flag |= CBE_IOPTE_PP_R | CBE_IOPTE_SO_R;
>  		break;
>  	case DMA_FROM_DEVICE:
> -		iopte_flag |= IOPTE_PP_W | IOPTE_SO_RW;
> +		iopte_flag |= CBE_IOPTE_PP_W | CBE_IOPTE_SO_RW;
>  		break;
>  	default:
>  		/* not happned */

^ permalink raw reply

* Re: [PATCH 05/33] block: Add bio_list_peek()
From: Benjamin Herrenschmidt @ 2009-06-15  1:39 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Jens Axboe, linuxppc-dev, cbe-oss-dev
In-Reply-To: <1244644748-24211-6-git-send-email-Geert.Uytterhoeven@sonycom.com>

On Wed, 2009-06-10 at 16:38 +0200, Geert Uytterhoeven wrote:
> Introduce bio_list_peek(), to obtain a pointer to the first bio on the bio_list
> without actually removing it from the list. This is needed when you want to
> serialize based on the list being empty or not.

Leaving that one (and the next one) out for now until Jens Ack them.

Cheers,
Ben.

> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> ---
>  include/linux/bio.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/bio.h b/include/linux/bio.h
> index 7b214fd..618bb7d 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -590,6 +590,11 @@ static inline void bio_list_merge_head(struct bio_list *bl,
>  	bl->head = bl2->head;
>  }
>  
> +static inline struct bio *bio_list_peek(struct bio_list *bl)
> +{
> +	return bl->head;
> +}
> +
>  static inline struct bio *bio_list_pop(struct bio_list *bl)
>  {
>  	struct bio *bio = bl->head;

^ permalink raw reply

* Re: [OOPS] hugetlbfs tests with 2.6.30-rc8-git1
From: Stephen Rothwell @ 2009-06-15  1:38 UTC (permalink / raw)
  To: michael; +Cc: Mel Gorman, linuxppc-dev
In-Reply-To: <1245027396.7705.23.camel@concordia>

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

Hi Michael,

On Mon, 15 Jun 2009 10:56:36 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
>
> Rather than "-git7" can you tell us the actual SHA, I don't know what
> git7 is.

$ cat tools/get_gitid 
#!/bin/sh

wget -q -O - http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-$1.id

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* Re: [OOPS] hugetlbfs tests with 2.6.30-rc8-git1
From: Michael Ellerman @ 2009-06-15  0:56 UTC (permalink / raw)
  To: Sachin Sant; +Cc: Mel Gorman, linuxppc-dev
In-Reply-To: <4A34E12B.4010000@in.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

On Sun, 2009-06-14 at 17:08 +0530, Sachin Sant wrote:
> Benjamin Herrenschmidt wrote:
> > On Fri, 2009-06-05 at 16:59 +0530, Sachin Sant wrote:
> >   
> >> While executing Hugetlbfs tests against 2.6.30-rc8-git1 on a
> >> Power 6 box observed the following OOPS message.
> I was able to recreate this with 2.6.30-git7.

Hi Sachin,

Rather than "-git7" can you tell us the actual SHA, I don't know what
git7 is.

> Here is the supporting data.
> 
>  cpu 0x1: Vector: 300 (Data Access) at [c0000000fe9b3220]
>     pc: c00000000003d620: .hpte_need_flush+0x1bc/0x2d8
>     lr: c00000000003d4d0: .hpte_need_flush+0x6c/0x2d8
>     sp: c0000000fe9b34a0
>    msr: 8000000000009032
>    dar: c0000000283b0d78

This address looks pretty innocuous, but I notice you have
DEBUG_PAGEALLOC=y, so presumably that's why it's triggering.

I can't see from the snippet of disassembly you posted where in the C
code we are, can you work it out?

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* [PATCH] powerpc: Fix invalid construct in our CPU selection Kconfig
From: Benjamin Herrenschmidt @ 2009-06-15  0:45 UTC (permalink / raw)
  To: linuxppc-dev

commit 5b7c3c918c9c26c50d220b2b50359208cb5a1dbe introduced an invalid
construct in our CPU selection. This caused warnings, though it still
appeared to do the right thing.

This fixes it properly by having separate formal definitions of
PPC_BOOK3S_32 and PPC_BOOK3S_64 and one statement defining
PPC_BOOK3S based on the two above.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 arch/powerpc/platforms/Kconfig.cputype |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- linux-work.orig/arch/powerpc/platforms/Kconfig.cputype	2009-06-15 10:39:54.000000000 +1000
+++ linux-work/arch/powerpc/platforms/Kconfig.cputype	2009-06-15 10:41:48.000000000 +1000
@@ -21,7 +21,7 @@ choice
 
 	  If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx.
 
-config PPC_BOOK3S
+config PPC_BOOK3S_32
 	bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx"
 	select PPC_FPU
 
@@ -57,11 +57,14 @@ config E200
 
 endchoice
 
-config PPC_BOOK3S
-	default y
+config PPC_BOOK3S_64
+	def_bool y
 	depends on PPC64
 	select PPC_FPU
 
+config PPC_BOOK3S
+	def_bool y
+	depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
 
 config POWER4_ONLY
 	bool "Optimize for POWER4"

^ permalink raw reply

* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Hans J. Koch @ 2009-06-14 23:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: devicetree-discuss, Hans J. Koch, linux-kernel, linuxppc-dev,
	Greg KH
In-Reply-To: <20090614234643.GA17791@pengutronix.de>

On Mon, Jun 15, 2009 at 01:46:43AM +0200, Wolfram Sang wrote:
> 
> > driver. A user _has_ to setup irq, if there is none, he still has to set
> > irq=UIO_IRQ_NONE. For that matter, 'not specified' and 'not found' is both
> > the same bad thing.
> 
> Hmm, what should I do?
> 
> A typical interrupts-property in a device-tree is specified as:
> 
> 	interrupts = <&irq_controller_node irq_number irq_sense>;
> 
> Something like UIO_IRQ_NONE does not fit into this scheme, even more as it is
> Linux-specific and device trees need to be OS independant.
> 
> I'm pretty sure the correct way to state that you don't need an interrupt in
> the device-tree is to simply not specify the above interrupt property.
> 
> Well, yes, that means you can't distinguish between 'forgotten' and
> 'intentionally left out'. I wonder if it is really that bad? If something does
> not work (= one is missing interrupts), the first place to look at is the
> device tree. If one does not see an interrupt-property, voila, problem solved.
> 
> (Note that with my latest suggestion, a _wrong_ interrupt is handled the same
> way as with platform_data. request_irq() should equally fail if the
> return-value from irq_of_parse_and_map() is simply forwarded.)

I agree. And assuming Alan is right, forget what I said about IRQ 0 being a
valid interrupt number.

Thanks,
Hans

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

^ permalink raw reply

* Re: [PATCH 2/2] uio: add an of_genirq driver
From: Wolfram Sang @ 2009-06-14 23:46 UTC (permalink / raw)
  To: Hans J. Koch; +Cc: devicetree-discuss, Greg KH, linux-kernel, linuxppc-dev
In-Reply-To: <20090614230135.GI3639@local>

[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]


> driver. A user _has_ to setup irq, if there is none, he still has to set
> irq=UIO_IRQ_NONE. For that matter, 'not specified' and 'not found' is both
> the same bad thing.

Hmm, what should I do?

A typical interrupts-property in a device-tree is specified as:

	interrupts = <&irq_controller_node irq_number irq_sense>;

Something like UIO_IRQ_NONE does not fit into this scheme, even more as it is
Linux-specific and device trees need to be OS independant.

I'm pretty sure the correct way to state that you don't need an interrupt in
the device-tree is to simply not specify the above interrupt property.

Well, yes, that means you can't distinguish between 'forgotten' and
'intentionally left out'. I wonder if it is really that bad? If something does
not work (= one is missing interrupts), the first place to look at is the
device tree. If one does not see an interrupt-property, voila, problem solved.

(Note that with my latest suggestion, a _wrong_ interrupt is handled the same
way as with platform_data. request_irq() should equally fail if the
return-value from irq_of_parse_and_map() is simply forwarded.)

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ 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