LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Gerhard Pircher @ 2007-06-22 13:12 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1182468169.24740.15.camel@localhost.localdomain>


-------- Original-Nachricht --------
Datum: Fri, 22 Jun 2007 09:22:49 +1000
Von: Benjamin Herrenschmidt <benh@kernel.crashing.org>
An: Gerhard Pircher <gerhard_pircher@gmx.net>
CC: linuxppc-dev@ozlabs.org
Betreff: Re: [RFC] Device tree for new desktop platform in arch/powerpc

> Do you have the recommended practice "interrupt mapping" standard ?
Yes, downloaded it right now.

> It also allowed to make it optional to have nodes for the PCI devices in
> slots, you can provide the mapping of all 4 INT# lines in the bridge
> node and linux can use it when probing for devices, so your bootwrapper
> doesn't have to know what's in the slots and doesn't have to create
> device nodes for those.
I would like to have PCI nodes only for the PCI host and PCI2ISA bridge.
The interrupt mapping of the INT# lines can be configured within U-boot,
thus I would avoid to specify it somewhere in the device tree, if it isn't
really necessary.

Gerhard
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

^ permalink raw reply

* RFC: Add indirect variants to pci indirect
From: Kumar Gala @ 2007-06-22 13:40 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Wei.Zhang

Ben,

I wanted to get your feedback on this approach for handling the variants
of pci indirect that we have on Freescale parts.

The idea is hose->indirect_type is a bit mask of 'features'.  I'm not sure
if PPC_INDIRECT_TYPE_PHB_IS_ZERO is the best name and if we could get ride
of bus_offset all together.

It was pointed out that a system that doesn't care about X that has
multiple PHBs may assign PCI bus # as hose0: bus0-4, hose1: 0-3.

- k

diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index e4f6c67..b18fa53 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -33,6 +33,7 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
 	struct pci_controller *hose = bus->sysdata;
 	volatile void __iomem *cfg_data;
 	u8 cfg_type = 0;
+	u32 bus_no, reg;

 	if (ppc_md.pci_exclude_device)
 		if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
@@ -42,9 +43,18 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
 		if (bus->number != hose->first_busno)
 			cfg_type = 1;

-	PCI_CFG_OUT(hose->cfg_addr,
-		 (0x80000000 | ((bus->number - hose->bus_offset) << 16)
-		  | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
+	if (hose->indirect_type & PPC_INDIRECT_TYPE_PHB_IS_ZERO)
+		bus_no = bus->number == hose->first_busno ? 0 : bus->number;
+	else
+		bus_no = bus->number - hose->bus_offset;
+
+	if (hose->set_cfg_type & PPC_INDIRECT_TYPE_EXT_REG)
+		reg = ((offset & 0xf00) << 16) | (offset & 0xfc);
+	else
+		reg = offset & 0xfc;
+
+	PCI_CFG_OUT(hose->cfg_addr,
+                 (0x80000000 | bus_no | (devfn << 8) | reg | cfg_type));

 	/*
 	 * Note: the caller has already checked that offset is
@@ -72,6 +82,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
 	struct pci_controller *hose = bus->sysdata;
 	volatile void __iomem *cfg_data;
 	u8 cfg_type = 0;
+	u32 bus_no, reg;

 	if (ppc_md.pci_exclude_device)
 		if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
@@ -81,9 +92,23 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
 		if (bus->number != hose->first_busno)
 			cfg_type = 1;

-	PCI_CFG_OUT(hose->cfg_addr,
-		 (0x80000000 | ((bus->number - hose->bus_offset) << 16)
-		  | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
+	if (hose->indirect_type & PPC_INDIRECT_TYPE_PHB_IS_ZERO)
+		bus_no = bus->number == hose->first_busno ? 0 : bus->number;
+	else
+		bus_no = bus->number - hose->bus_offset;
+
+	if (hose->set_cfg_type & PPC_INDIRECT_TYPE_EXT_REG)
+		reg = ((offset & 0xf00) << 16) | (offset & 0xfc);
+	else
+		reg = offset & 0xfc;
+
+	PCI_CFG_OUT(hose->cfg_addr,
+                 (0x80000000 | bus_no | (devfn << 8) | reg | cfg_type));
+
+	if (hose->indirect_type & PPC_INDIRECT_TYPE_FSL_PCIE_HACK)
+		if ((offset == PCI_PRIMARY_BUS) &&
+			(bus->number == hose->first_busno))
+		val &= 0xffffff00;

 	/*
 	 * Note: the caller has already checked that offset is
diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h
index 4d35b84..2f6651d 100644
--- a/include/asm-ppc/pci-bridge.h
+++ b/include/asm-ppc/pci-bridge.h
@@ -66,6 +66,15 @@ struct pci_controller {
 	 */
 	int set_cfg_type;

+	/*
+	 * If set, indirect method will set the cfg_type bit as
+	 * needed to generate type 1 configuration transactions.
+	 */
+#define PPC_INDIRECT_TYPE_PHB_IS_ZERO		(0x00000001)
+#define PPC_INDIRECT_TYPE_EXT_REG		(0x00000002)
+#define PPC_INDIRECT_TYPE_FSL_PCIE_HACK		(0x00000004)
+	u32 indirect_type;
+
 	/* Currently, we limit ourselves to 1 IO range and 3 mem
 	 * ranges since the common pci_bus structure can't handle more
 	 */

^ permalink raw reply related

* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Benjamin Herrenschmidt @ 2007-06-22 13:40 UTC (permalink / raw)
  To: Gerhard Pircher; +Cc: linuxppc-dev
In-Reply-To: <20070622131201.313400@gmx.net>

On Fri, 2007-06-22 at 15:12 +0200, Gerhard Pircher wrote:
> I would like to have PCI nodes only for the PCI host and PCI2ISA
> bridge.
> The interrupt mapping of the INT# lines can be configured within
> U-boot,
> thus I would avoid to specify it somewhere in the device tree, if it
> isn't
> really necessary.

You still need to provide the IRQ mapping for the PCI slots, but you can
do that from the interrupt-map property of the PCI host bridge node.

Ben.

^ permalink raw reply

* Re: [PATCH v2 0/9] Add Generic PCI-E support to 8641HPCN
From: Kumar Gala @ 2007-06-22 13:44 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <BE8C03AC-BA36-4A65-AFC6-A548E04A0359@kernel.crashing.org>


On Jun 21, 2007, at 5:29 PM, Kumar Gala wrote:

>
> On Jun 21, 2007, at 4:23 PM, Jon Loeliger wrote:
>
>> On Mon, 2007-06-04 at 17:29, Jon Loeliger wrote:
>>> Paul,
>>>
>>> This 8-part patch set combines the two previous patch
>>> sets, 5 from Zheng Wei, and 3 from me, along with one
>>> from Wade Farnsworth into one nice-n-happy set, all
>>> designed to re-enable PCI-Express on the MPC8641HPCN board.
>>>
>>> This is version 2 of the patch set and incorporates
>>> improvements suggested by list reviewers.
>>
>>
>> Paul,
>>
>> I hadn't seen any further comment on this series of
>> patches for PCI on 8641.  Any chance we could get them
>> applied to your repo?
>
> I've got a "cleaner" version of the float bus patch that I need to
> post and will apply the others to my tree.

I've posted a RFC for a change to pci indirect that should address  
our float bus problem.

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

- k

^ permalink raw reply

* Re: [PATCH v2 3/9] 8641HPCN: Add PCI-Express link training status check
From: Kumar Gala @ 2007-06-22 13:48 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org list
In-Reply-To: <1180996203.9632.71.camel@ld0161-tx32>


On Jun 4, 2007, at 5:30 PM, Jon Loeliger wrote:

> From: Zhang Wei <wei.zhang@freescale.com>
>
> Avoid system halt while the link training is fault.
>
> Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
> Acked-by: Roy Zang <tie-fei.zang@freescale.com>
> Signed-off-by: Jon Loeliger <jdl@freescale.com>
> ---
>  arch/powerpc/platforms/86xx/pci.c |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/ 
> platforms/86xx/pci.c
> index 7efae7c..07ff52c 100644
> --- a/arch/powerpc/platforms/86xx/pci.c
> +++ b/arch/powerpc/platforms/86xx/pci.c
> @@ -122,7 +122,6 @@ static void __init
>  mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset,  
> u32 pcie_size)
>  {
>  	u16 cmd;
> -	unsigned int temps;
>
>  	DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n",
>  			pcie_offset, pcie_size);
> @@ -140,6 +139,9 @@ int mpc86xx_exclude_device(u_char bus, u_char  
> devfn)
>  	return PCIBIOS_SUCCESSFUL;
>  }
>
> +#define PCIE_LTSSM	0x04000004	/* PCIe Link Training and Status */
> +#define PCIE_LTSSM_L0	0x16		/* L0 state */
> +
>  int __init add_bridge(struct device_node *dev)
>  {
>  	int len;
> @@ -148,12 +150,20 @@ int __init add_bridge(struct device_node *dev)
>  	const int *bus_range;
>  	int has_address = 0;
>  	int primary = 0;
> +	void *pcicfg_addr;
>
>  	DBG("Adding PCIE host bridge %s\n", dev->full_name);
>
>  	/* Fetch host bridge registers address */
>  	has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
>
> +	/* Probe the hose link training status */
> +	pcicfg_addr = ioremap(rsrc.start, 0x1000);
> +	out_be32(pcicfg_addr, 0x80000000 | PCIE_LTSSM);
> +	if (in_le16(pcicfg_addr + 4) < PCIE_LTSSM_L0)
> +		return -ENXIO;
> +	iounmap(pcicfg_addr);

Is there a reason we don't do this with early_read_config_word, while  
it requires we alloc the hose, it seems cleaner.  If this fails, I  
think the memory wasted on the hose is a minor concern.  (assuming my  
other patch to support extended regs in pci indirect).

- k

^ permalink raw reply

* Re: [PATCH v2 9/9] Created quirk_mpc8641_transparent() to initialize bridge resources.
From: Kumar Gala @ 2007-06-22 13:50 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org list
In-Reply-To: <1180996227.9632.77.camel@ld0161-tx32>


On Jun 4, 2007, at 5:30 PM, Jon Loeliger wrote:

> The 8641 RC poses as a transparent bridge, but does not implement the
> IO_BASE or IO_LIMIT registers in the config space.  This means that
> the code which initializes the bridge resources ends up setting the
> IO resources erroneously.
>
> This change sets RC of mpc8641 to be a transparent bridge
> for legacy I/O access and initializes the RC bridge resources
> from the device tree.
>
> Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
> Signed-off-by: Andy Fleming <afleming@freescale.com>
> Signed-off-by: Jon Loeliger <jdl@freescale.com>
> ---
>
> Incorporates review suggestions from Milton.
>
>  arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |   76 +++++++++++++++++ 
> +++++++++++
>  1 files changed, 76 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/ 
> powerpc/platforms/86xx/mpc86xx_hpcn.c
> index a82da4b..83a2c28 100644
> --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> @@ -318,6 +318,7 @@ static void __devinit quirk_uli5288(struct  
> pci_dev *dev)
>  static void __devinit quirk_uli5229(struct pci_dev *dev)
>  {
>  	unsigned short temp;
> +
>  	pci_write_config_word(dev, 0x04, 0x0405);
>  	dev->class &= ~0x5;
>  	pci_read_config_word(dev, 0x4a, &temp);
> @@ -325,6 +326,75 @@ static void __devinit quirk_uli5229(struct  
> pci_dev *dev)
>  	pci_write_config_word(dev, 0x4a, temp);
>  }
>
> +static void __devinit quirk_mpc8641_transparent(struct pci_dev *dev)
> +{

Shouldn't we put this in fsl_pcie.c since it will be need by everyone  
using an 85xx/86xx pci-e controller?

[snip]
> +}

- k

^ permalink raw reply

* Re: [Cbe-oss-dev] [patch 1/5] cell: pmi remove support for mutiple devices.
From: Christian Krafft @ 2007-06-22 14:10 UTC (permalink / raw)
  To: Akinobu Mita; +Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org
In-Reply-To: <20070621140731.GA24496@ps3linux.grid.fixstars.com>

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

Hi,

On Thu, 21 Jun 2007 23:07:31 +0900
Akinobu Mita <mita@fixstars.com> wrote:

> >  
> > -	kfree(dev->dev.driver_data);
> > +	kfree(data);
> 
> Shouldn't it set data = NULL here?
> 
> I guess we will get "pmi: driver has already been initialized" message
> and -EBUSY on reloading pmi driver.
> 
> >  
> >  	return 0;
> >  }

That problem did actually not occur.
Anyway, I added the line for completeness and consistency.

But while testing I found another bug that occurred when freeing the irq. The dev_id when requesting the irq was NULL,
but not when freeing the irq. I'm resending the patch as a reply to the first version.

-- 
Mit freundlichen Gruessen,
kind regards,

Christian Krafft
IBM Systems & Technology Group,
Linux Kernel Development
IT Specialist


Vorsitzender des Aufsichtsrats:	Martin Jetter
Geschaeftsfuehrung:		Herbert Kircher
Sitz der Gesellschaft:		Boeblingen
Registriergericht:		Amtsgericht Stuttgart, HRB 243294


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: Split out asm-ppc/mmu.h portions for PowerPC 8xx
From: Scott Wood @ 2007-06-22 14:56 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20070622045855.GA11775@localhost.localdomain>

On Fri, Jun 22, 2007 at 02:58:55PM +1000, David Gibson wrote:
> arch/powerpc still relies on asm-ppc/mmu.h for some 32-bit MMU types.
> This patch is another step towards fixing this.  It takes the portions
> of asm-ppc/mmu.h related to 8xx embedded CPUs which are still relevant
> in arch/powerpc and puts them in a new asm-powerpc/mmu-8xx.h,
> included when appropriate from asm-powerpc/mmu.h.
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> 
> This applies on top of my earlier patch splitting out the Freescale
> Book-E portions of mmu.h.  I've compiled this (with
> mpc866_ads_defconfig) but can someone with access to an 8xx system
> give it a whirl?

I tested it on an 885 board; it seems fine.

-Scott

^ permalink raw reply

* Re: [RFC/PATCH] powerpc: MPC7450 L2 HW cache flush feature utilization
From: Vladislav Buzov @ 2007-06-22 15:22 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list
In-Reply-To: <1182429443.24740.8.camel@localhost.localdomain>

Benjamin Herrenschmidt wrote:

>On Fri, 2007-06-15 at 14:20 -0700, Mark A. Greer wrote:
>  
>
>>On Fri, Jun 15, 2007 at 10:14:24AM +0200, Segher Boessenkool wrote:
>>
>>    
>>
>>>>I've double checked this. All processors considered 7450 in the kernel 
>>>>are covered by MPC7450 RISC Microprocessor Family Reference Manual 
>>>>where hardware cache flushing procedure is described.
>>>>        
>>>>
>>>Nice.  Now all that remains to be done is for the patch to
>>>be tested on actual hardware for at least a few of those
>>>other CPUs.  Any volunteers?
>>>      
>>>
>>I just booted & played around on a prpmc2800e (7447A, 512MB) with
>>this patch and it seemed to work fine.
>>
>>I *may* have some old sandpoint 745x modules that still work but
>>I'll have to get the sandpoint working in arch/powerpc again.
>>I'll try to get to that in a week or so.
>>    
>>
>
>The thing that needs torture is the powerbook sleep/wakeup code. That's
>where all the cache flushing issues have been biting in the past.
>
>Ben.
>  
>
Note that 745x processors have L3 cache installed and may have the same 
problem requiring similar code modifications to use L3 hardware flushing 
mechanism.
So, my patch may not cure the cache flushing problem at all on such 
processors.

Vlad.

>
>_______________________________________________
>Linuxppc-dev mailing list
>Linuxppc-dev@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-dev
>  
>

^ permalink raw reply

* Resend: [patch 1/5] cell: pmi remove support for mutiple devices.
From: Christian Krafft @ 2007-06-22 16:00 UTC (permalink / raw)
  To: Christian Krafft; +Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org
In-Reply-To: <20070621131644.03a8ec31@localhost>

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

Subject: cell: pmi remove support for mutiple devices.

From: Christian Krafft <krafft@de.ibm.com>

The pmi driver got simplified by removing support for multiple devices.
As there is no more than one pmi device per maschine, there is no need to
specify the device for listening and sending messages.

This way the caller (cbe_cpufreq) doesn't need to scan the device tree.
When registering the handler on a board without a pmi
interface, pmi.c will just return -ENODEV.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>

Index: linux-2.6.22-rc5/arch/powerpc/platforms/cell/cbe_cpufreq.c
===================================================================
--- linux-2.6.22-rc5.orig/arch/powerpc/platforms/cell/cbe_cpufreq.c
+++ linux-2.6.22-rc5/arch/powerpc/platforms/cell/cbe_cpufreq.c
@@ -68,12 +68,14 @@ static u64 MIC_Slow_Next_Timer_table[] =
 };
 
 static unsigned int pmi_frequency_limit = 0;
+
 /*
  * hardware specific functions
  */
 
-static struct of_device *pmi_dev;
+static bool cbe_cpufreq_has_pmi;
 
+#ifdef CONFIG_PPC_PMI
 static int set_pmode_pmi(int cpu, unsigned int pmode)
 {
 	int ret;
@@ -90,7 +92,7 @@ static int set_pmode_pmi(int cpu, unsign
 	time = (u64) get_cycles();
 #endif
 
-	pmi_send_message(pmi_dev, pmi_msg);
+	pmi_send_message(pmi_msg);
 	ret = pmi_msg.data2;
 
 	pr_debug("PMI returned slow mode %d\n", ret);
@@ -102,7 +104,7 @@ static int set_pmode_pmi(int cpu, unsign
 #endif
 	return ret;
 }
-
+#endif
 
 static int get_pmode(int cpu)
 {
@@ -156,14 +158,16 @@ static int set_pmode_reg(int cpu, unsign
 	return 0;
 }
 
-static int set_pmode(int cpu, unsigned int slow_mode) {
-	if (pmi_dev)
+static int set_pmode(int cpu, unsigned int slow_mode)
+{
+#ifdef CONFIG_PPC_PMI
+	if (cbe_cpufreq_has_pmi)
 		return set_pmode_pmi(cpu, slow_mode);
-	else
-		return set_pmode_reg(cpu, slow_mode);
+#endif
+	return set_pmode_reg(cpu, slow_mode);
 }
 
-static void cbe_cpufreq_handle_pmi(struct of_device *dev, pmi_message_t pmi_msg)
+static void cbe_cpufreq_handle_pmi(pmi_message_t pmi_msg)
 {
 	u8 cpu;
 	u8 cbe_pmode_new;
@@ -250,7 +254,7 @@ static int cbe_cpufreq_cpu_init(struct c
 
 	cpufreq_frequency_table_get_attr(cbe_freqs, policy->cpu);
 
-	if (pmi_dev) {
+	if (cbe_cpufreq_has_pmi) {
 		/* frequency might get limited later, initialize limit with max_freq */
 		pmi_frequency_limit = max_freq;
 		cpufreq_register_notifier(&pmi_notifier_block, CPUFREQ_POLICY_NOTIFIER);
@@ -262,7 +266,7 @@ static int cbe_cpufreq_cpu_init(struct c
 
 static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy)
 {
-	if (pmi_dev)
+	if (cbe_cpufreq_has_pmi)
 		cpufreq_unregister_notifier(&pmi_notifier_block, CPUFREQ_POLICY_NOTIFIER);
 
 	cpufreq_frequency_table_put_attr(policy->cpu);
@@ -323,27 +327,20 @@ static struct cpufreq_driver cbe_cpufreq
 
 static int __init cbe_cpufreq_init(void)
 {
-	struct device_node *np;
-
 	if (!machine_is(cell))
 		return -ENODEV;
 
-	np = of_find_node_by_type(NULL, "ibm,pmi");
-
-	pmi_dev = of_find_device_by_node(np);
-
-	if (pmi_dev)
-		pmi_register_handler(pmi_dev, &cbe_pmi_handler);
+	cbe_cpufreq_has_pmi = pmi_register_handler(&cbe_pmi_handler) == 0;
 
 	return cpufreq_register_driver(&cbe_cpufreq_driver);
 }
 
 static void __exit cbe_cpufreq_exit(void)
 {
-	if (pmi_dev)
-		pmi_unregister_handler(pmi_dev, &cbe_pmi_handler);
-
 	cpufreq_unregister_driver(&cbe_cpufreq_driver);
+
+	if (cbe_cpufreq_has_pmi)
+		pmi_unregister_handler(&cbe_pmi_handler);
 }
 
 module_init(cbe_cpufreq_init);
Index: linux-2.6.22-rc5/arch/powerpc/sysdev/pmi.c
===================================================================
--- linux-2.6.22-rc5.orig/arch/powerpc/sysdev/pmi.c
+++ linux-2.6.22-rc5/arch/powerpc/sysdev/pmi.c
@@ -48,15 +48,13 @@ struct pmi_data {
 	struct work_struct	work;
 };
 
+static struct pmi_data *data;
 
 static int pmi_irq_handler(int irq, void *dev_id)
 {
-	struct pmi_data *data;
 	u8 type;
 	int rc;
 
-	data = dev_id;
-
 	spin_lock(&data->pmi_spinlock);
 
 	type = ioread8(data->pmi_reg + PMI_READ_TYPE);
@@ -111,16 +109,13 @@ MODULE_DEVICE_TABLE(of, pmi_match);
 
 static void pmi_notify_handlers(struct work_struct *work)
 {
-	struct pmi_data *data;
 	struct pmi_handler *handler;
 
-	data = container_of(work, struct pmi_data, work);
-
 	spin_lock(&data->handler_spinlock);
 	list_for_each_entry(handler, &data->handler, node) {
 		pr_debug(KERN_INFO "pmi: notifying handler %p\n", handler);
 		if (handler->type == data->msg.type)
-			handler->handle_pmi_message(data->dev, data->msg);
+			handler->handle_pmi_message(data->msg);
 	}
 	spin_unlock(&data->handler_spinlock);
 }
@@ -129,9 +124,14 @@ static int pmi_of_probe(struct of_device
 			const struct of_device_id *match)
 {
 	struct device_node *np = dev->node;
-	struct pmi_data *data;
 	int rc;
 
+	if (data) {
+		printk(KERN_ERR "pmi: driver has already been initialized.\n");
+		rc = -EBUSY;
+		goto out;
+	}
+
 	data = kzalloc(sizeof(struct pmi_data), GFP_KERNEL);
 	if (!data) {
 		printk(KERN_ERR "pmi: could not allocate memory.\n");
@@ -154,7 +154,6 @@ static int pmi_of_probe(struct of_device
 
 	INIT_WORK(&data->work, pmi_notify_handlers);
 
-	dev->dev.driver_data = data;
 	data->dev = dev;
 
 	data->irq = irq_of_parse_and_map(np, 0);
@@ -164,7 +163,7 @@ static int pmi_of_probe(struct of_device
 		goto error_cleanup_iomap;
 	}
 
-	rc = request_irq(data->irq, pmi_irq_handler, 0, "pmi", data);
+	rc = request_irq(data->irq, pmi_irq_handler, 0, "pmi", NULL);
 	if (rc) {
 		printk(KERN_ERR "pmi: can't request IRQ %d: returned %d\n",
 				data->irq, rc);
@@ -187,12 +186,9 @@ out:
 
 static int pmi_of_remove(struct of_device *dev)
 {
-	struct pmi_data *data;
 	struct pmi_handler *handler, *tmp;
 
-	data = dev->dev.driver_data;
-
-	free_irq(data->irq, data);
+	free_irq(data->irq, NULL);
 	iounmap(data->pmi_reg);
 
 	spin_lock(&data->handler_spinlock);
@@ -202,7 +198,8 @@ static int pmi_of_remove(struct of_devic
 
 	spin_unlock(&data->handler_spinlock);
 
-	kfree(dev->dev.driver_data);
+	kfree(data);
+	data = NULL;
 
 	return 0;
 }
@@ -226,13 +223,13 @@ static void __exit pmi_module_exit(void)
 }
 module_exit(pmi_module_exit);
 
-void pmi_send_message(struct of_device *device, pmi_message_t msg)
+int pmi_send_message(pmi_message_t msg)
 {
-	struct pmi_data *data;
 	unsigned long flags;
 	DECLARE_COMPLETION_ONSTACK(completion);
 
-	data = device->dev.driver_data;
+	if (!data)
+		return -ENODEV;
 
 	mutex_lock(&data->msg_mutex);
 
@@ -256,30 +253,26 @@ void pmi_send_message(struct of_device *
 	data->completion = NULL;
 
 	mutex_unlock(&data->msg_mutex);
+
+	return 0;
 }
 EXPORT_SYMBOL_GPL(pmi_send_message);
 
-void pmi_register_handler(struct of_device *device,
-			  struct pmi_handler *handler)
+int pmi_register_handler(struct pmi_handler *handler)
 {
-	struct pmi_data *data;
-	data = device->dev.driver_data;
-
 	if (!data)
-		return;
+		return -ENODEV;
 
 	spin_lock(&data->handler_spinlock);
 	list_add_tail(&handler->node, &data->handler);
 	spin_unlock(&data->handler_spinlock);
+
+	return 0;
 }
 EXPORT_SYMBOL_GPL(pmi_register_handler);
 
-void pmi_unregister_handler(struct of_device *device,
-			    struct pmi_handler *handler)
+void pmi_unregister_handler(struct pmi_handler *handler)
 {
-	struct pmi_data *data;
-	data = device->dev.driver_data;
-
 	if (!data)
 		return;
 
Index: linux-2.6.22-rc5/include/asm-powerpc/pmi.h
===================================================================
--- linux-2.6.22-rc5.orig/include/asm-powerpc/pmi.h
+++ linux-2.6.22-rc5/include/asm-powerpc/pmi.h
@@ -55,13 +55,13 @@ typedef struct {
 struct pmi_handler {
 	struct list_head node;
 	u8 type;
-	void (*handle_pmi_message) (struct of_device *, pmi_message_t);
+	void (*handle_pmi_message) (pmi_message_t);
 };
 
-void pmi_register_handler(struct of_device *, struct pmi_handler *);
-void pmi_unregister_handler(struct of_device *, struct pmi_handler *);
+int pmi_register_handler(struct pmi_handler *);
+void pmi_unregister_handler(struct pmi_handler *);
 
-void pmi_send_message(struct of_device *, pmi_message_t);
+int pmi_send_message(pmi_message_t);
 
 #endif /* __KERNEL__ */
 #endif /* _POWERPC_PMI_H */


-- 
Mit freundlichen Gruessen,
kind regards,

Christian Krafft
IBM Systems & Technology Group,
Linux Kernel Development
IT Specialist


Vorsitzender des Aufsichtsrats:	Martin Jetter
Geschaeftsfuehrung:		Herbert Kircher
Sitz der Gesellschaft:		Boeblingen
Registriergericht:		Amtsgericht Stuttgart, HRB 243294


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH v2 9/9] Created quirk_mpc8641_transparent() to initialize bridge resources.
From: Jon Loeliger @ 2007-06-22 16:20 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org list, Wei Zhang
In-Reply-To: <062E6779-8D69-4700-896C-FE06A5F8947E@kernel.crashing.org>

On Fri, 2007-06-22 at 08:50, Kumar Gala wrote:

> Shouldn't we put this in fsl_pcie.c since it will be need by everyone  
> using an 85xx/86xx pci-e controller?

> - k

IIRC, Ww are trying to eliminate the need for fsl_pcie.c
and converge on the more generic code instead.
If we can ever get the PCI-E patches accepted, the
8641 boards won't use the fsl_pcie.c file at all. :-)

jdl

^ permalink raw reply

* Re: [PATCH v2 9/9] Created quirk_mpc8641_transparent() to initialize bridge resources.
From: Kumar Gala @ 2007-06-22 16:35 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org list, Wei Zhang
In-Reply-To: <1182529202.29873.7.camel@ld0161-tx32>


On Jun 22, 2007, at 11:20 AM, Jon Loeliger wrote:

> On Fri, 2007-06-22 at 08:50, Kumar Gala wrote:
>
>> Shouldn't we put this in fsl_pcie.c since it will be need by everyone
>> using an 85xx/86xx pci-e controller?
>
>> - k
>
> IIRC, Ww are trying to eliminate the need for fsl_pcie.c
> and converge on the more generic code instead.
> If we can ever get the PCI-E patches accepted, the
> 8641 boards won't use the fsl_pcie.c file at all. :-)

Where do we plan on putting the freescale generic pci code?

- k

^ permalink raw reply

* [PATCH v2] [2.6.23] edac: pasemi_edac backend driver
From: Olof Johansson @ 2007-06-22 17:11 UTC (permalink / raw)
  To: norsk5; +Cc: linuxppc-dev, egor, bluesmoke-devel
In-Reply-To: <20070425204309.GA19781@lixom.net>

EDAC driver for the memory controllers on PA Semi PA6T-1682M.

Signed-off-by: Egor Martovetsky <egor@pasemi.com>
Signed-off-by: Olof Johansson <olof@lixom.net>

---
Changes since last submission:

* Rebased on top of 2.6.22-rc4-mm2 with the EDAC changes merged there.
* Minor checkpatch.pl cleanups
* Renamed ctl_name
* Added dev_name
* edac_mc.h -> edac_core.h

Index: mm/drivers/edac/pasemi_edac.c
===================================================================
--- /dev/null
+++ mm/drivers/edac/pasemi_edac.c
@@ -0,0 +1,298 @@
+/*
+ * Copyright (C) 2006-2007 PA Semi, Inc
+ *
+ * Author: Egor Martovetsky <egor@pasemi.com>
+ * Maintained by: Olof Johansson <olof@lixom.net>
+ *
+ * Driver for the PWRficient onchip memory controllers
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/pci_ids.h>
+#include <linux/slab.h>
+#include "edac_core.h"
+
+#define MODULE_NAME "pasemi_edac"
+
+#define MCCFG_MCEN				0x300
+#define   MCCFG_MCEN_MMC_EN			0x00000001
+#define MCCFG_ERRCOR				0x388
+#define   MCCFG_ERRCOR_RNK_FAIL_DET_EN		0x00000100
+#define   MCCFG_ERRCOR_ECC_GEN_EN		0x00000010
+#define   MCCFG_ERRCOR_ECC_CRR_EN		0x00000001
+#define MCCFG_SCRUB				0x384
+#define   MCCFG_SCRUB_RGLR_SCRB_EN		0x00000001
+#define MCDEBUG_ERRCTL1				0x728
+#define   MCDEBUG_ERRCTL1_RFL_LOG_EN		0x00080000
+#define   MCDEBUG_ERRCTL1_MBE_LOG_EN		0x00040000
+#define   MCDEBUG_ERRCTL1_SBE_LOG_EN		0x00020000
+#define MCDEBUG_ERRSTA				0x730
+#define   MCDEBUG_ERRSTA_RFL_STATUS		0x00000004
+#define   MCDEBUG_ERRSTA_MBE_STATUS		0x00000002
+#define   MCDEBUG_ERRSTA_SBE_STATUS		0x00000001
+#define MCDEBUG_ERRCNT1				0x734
+#define   MCDEBUG_ERRCNT1_SBE_CNT_OVRFLO	0x00000080
+#define MCDEBUG_ERRLOG1A			0x738
+#define   MCDEBUG_ERRLOG1A_MERR_TYPE_M		0x30000000
+#define   MCDEBUG_ERRLOG1A_MERR_TYPE_NONE	0x00000000
+#define   MCDEBUG_ERRLOG1A_MERR_TYPE_SBE	0x10000000
+#define   MCDEBUG_ERRLOG1A_MERR_TYPE_MBE	0x20000000
+#define   MCDEBUG_ERRLOG1A_MERR_TYPE_RFL	0x30000000
+#define   MCDEBUG_ERRLOG1A_MERR_BA_M		0x00700000
+#define   MCDEBUG_ERRLOG1A_MERR_BA_S		20
+#define   MCDEBUG_ERRLOG1A_MERR_CS_M		0x00070000
+#define   MCDEBUG_ERRLOG1A_MERR_CS_S		16
+#define   MCDEBUG_ERRLOG1A_SYNDROME_M		0x0000ffff
+#define MCDRAM_RANKCFG				0x114
+#define   MCDRAM_RANKCFG_EN			0x00000001
+#define   MCDRAM_RANKCFG_TYPE_SIZE_M		0x000001c0
+#define   MCDRAM_RANKCFG_TYPE_SIZE_S		6
+
+#define PASEMI_EDAC_NR_CSROWS			8
+#define PASEMI_EDAC_NR_CHANS			1
+#define PASEMI_EDAC_ERROR_GRAIN			64
+
+static int last_page_in_mmc;
+static int system_mmc_id;
+
+
+static u32 pasemi_edac_get_error_info(struct mem_ctl_info *mci)
+{
+	struct pci_dev *pdev = to_pci_dev(mci->dev);
+	u32 tmp;
+
+	pci_read_config_dword(pdev, MCDEBUG_ERRSTA,
+			      &tmp);
+
+	tmp &= (MCDEBUG_ERRSTA_RFL_STATUS | MCDEBUG_ERRSTA_MBE_STATUS
+		| MCDEBUG_ERRSTA_SBE_STATUS);
+
+	if (tmp) {
+		if (tmp & MCDEBUG_ERRSTA_SBE_STATUS)
+			pci_write_config_dword(pdev, MCDEBUG_ERRCNT1,
+					       MCDEBUG_ERRCNT1_SBE_CNT_OVRFLO);
+		pci_write_config_dword(pdev, MCDEBUG_ERRSTA, tmp);
+	}
+
+	return tmp;
+}
+
+static void pasemi_edac_process_error_info(struct mem_ctl_info *mci, u32 errsta)
+{
+	struct pci_dev *pdev = to_pci_dev(mci->dev);
+	u32 errlog1a;
+	u32 cs;
+
+	if (!errsta)
+		return;
+
+	pci_read_config_dword(pdev, MCDEBUG_ERRLOG1A, &errlog1a);
+
+	cs = (errlog1a & MCDEBUG_ERRLOG1A_MERR_CS_M) >>
+		MCDEBUG_ERRLOG1A_MERR_CS_S;
+
+	/* uncorrectable/multi-bit errors */
+	if (errsta & (MCDEBUG_ERRSTA_MBE_STATUS |
+		      MCDEBUG_ERRSTA_RFL_STATUS)) {
+		edac_mc_handle_ue(mci, mci->csrows[cs].first_page, 0,
+				  cs, mci->ctl_name);
+	}
+
+	/* correctable/single-bit errors */
+	if (errsta & MCDEBUG_ERRSTA_SBE_STATUS) {
+		edac_mc_handle_ce(mci, mci->csrows[cs].first_page, 0,
+				  0, cs, 0, mci->ctl_name);
+	}
+}
+
+static void pasemi_edac_check(struct mem_ctl_info *mci)
+{
+	u32 errsta;
+
+	errsta = pasemi_edac_get_error_info(mci);
+	if (errsta)
+		pasemi_edac_process_error_info(mci, errsta);
+}
+
+static int pasemi_edac_init_csrows(struct mem_ctl_info *mci,
+				   struct pci_dev *pdev,
+				   enum edac_type edac_mode)
+{
+	struct csrow_info *csrow;
+	u32 rankcfg;
+	int index;
+
+	for (index = 0; index < mci->nr_csrows; index++) {
+		csrow = &mci->csrows[index];
+
+		pci_read_config_dword(pdev,
+				      MCDRAM_RANKCFG + (index * 12),
+				      &rankcfg);
+
+		if (!(rankcfg & MCDRAM_RANKCFG_EN))
+			continue;
+
+		switch ((rankcfg & MCDRAM_RANKCFG_TYPE_SIZE_M) >>
+			MCDRAM_RANKCFG_TYPE_SIZE_S) {
+		case 0:
+			csrow->nr_pages = 128 << (20 - PAGE_SHIFT);
+			break;
+		case 1:
+			csrow->nr_pages = 256 << (20 - PAGE_SHIFT);
+			break;
+		case 2:
+		case 3:
+			csrow->nr_pages = 512 << (20 - PAGE_SHIFT);
+			break;
+		case 4:
+			csrow->nr_pages = 1024 << (20 - PAGE_SHIFT);
+			break;
+		case 5:
+			csrow->nr_pages = 2048 << (20 - PAGE_SHIFT);
+			break;
+		default:
+			edac_mc_printk(mci, KERN_ERR,
+				       "Unrecognized Rank Config\n");
+			return -EINVAL;
+		}
+
+		csrow->first_page = last_page_in_mmc;
+		csrow->last_page = csrow->first_page + csrow->nr_pages - 1;
+		last_page_in_mmc += csrow->nr_pages;
+		csrow->page_mask = 0;
+		csrow->grain = PASEMI_EDAC_ERROR_GRAIN;
+		csrow->mtype = MEM_DDR;
+		csrow->dtype = DEV_UNKNOWN;
+		csrow->edac_mode = edac_mode;
+	}
+	return 0;
+}
+
+static int __devinit pasemi_edac_probe(struct pci_dev *pdev,
+		const struct pci_device_id *ent)
+{
+	struct mem_ctl_info *mci = NULL;
+	u32 errctl1, errcor, scrub, mcen;
+
+	pci_read_config_dword(pdev, MCCFG_MCEN, &mcen);
+	if (!(mcen & MCCFG_MCEN_MMC_EN))
+		return -ENODEV;
+
+	/*
+	 * We should think about enabling other error detection later on
+	 */
+
+	pci_read_config_dword(pdev, MCDEBUG_ERRCTL1, &errctl1);
+	errctl1 |= MCDEBUG_ERRCTL1_SBE_LOG_EN |
+		MCDEBUG_ERRCTL1_MBE_LOG_EN |
+		MCDEBUG_ERRCTL1_RFL_LOG_EN;
+	pci_write_config_dword(pdev, MCDEBUG_ERRCTL1, errctl1);
+
+	mci = edac_mc_alloc(0, PASEMI_EDAC_NR_CSROWS, PASEMI_EDAC_NR_CHANS);
+
+	if (mci == NULL)
+		return -ENOMEM;
+
+	pci_read_config_dword(pdev, MCCFG_ERRCOR, &errcor);
+	errcor |= MCCFG_ERRCOR_RNK_FAIL_DET_EN |
+		MCCFG_ERRCOR_ECC_GEN_EN |
+		MCCFG_ERRCOR_ECC_CRR_EN;
+
+	mci->dev = &pdev->dev;
+	mci->mtype_cap = MEM_FLAG_DDR | MEM_FLAG_RDDR;
+	mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED;
+	mci->edac_cap = (errcor & MCCFG_ERRCOR_ECC_GEN_EN) ?
+		((errcor & MCCFG_ERRCOR_ECC_CRR_EN) ?
+		 (EDAC_FLAG_EC | EDAC_FLAG_SECDED) : EDAC_FLAG_EC) :
+		EDAC_FLAG_NONE;
+	mci->mod_name = MODULE_NAME;
+	mci->dev_name = pci_name(pdev);
+	mci->ctl_name = "pasemi,1682m-mc";
+	mci->edac_check = pasemi_edac_check;
+	mci->ctl_page_to_phys = NULL;
+	pci_read_config_dword(pdev, MCCFG_SCRUB, &scrub);
+	mci->scrub_cap = SCRUB_FLAG_HW_PROG | SCRUB_FLAG_HW_SRC;
+	mci->scrub_mode =
+		((errcor & MCCFG_ERRCOR_ECC_CRR_EN) ? SCRUB_FLAG_HW_SRC : 0) |
+		((scrub & MCCFG_SCRUB_RGLR_SCRB_EN) ? SCRUB_FLAG_HW_PROG : 0);
+
+	if (pasemi_edac_init_csrows(mci, pdev,
+				    (mci->edac_cap & EDAC_FLAG_SECDED) ?
+				    EDAC_SECDED :
+				    ((mci->edac_cap & EDAC_FLAG_EC) ?
+				     EDAC_EC : EDAC_NONE)))
+		goto fail;
+
+	/*
+	 * Clear status
+	 */
+	pasemi_edac_get_error_info(mci);
+
+	if (edac_mc_add_mc(mci, system_mmc_id++)) {
+		goto fail;
+	}
+
+	/* get this far and it's successful */
+	return 0;
+
+fail:
+	edac_mc_free(mci);
+	return -ENODEV;
+}
+
+static void __devexit pasemi_edac_remove(struct pci_dev *pdev)
+{
+	struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev);
+
+	if (!mci)
+		return;
+
+	edac_mc_free(mci);
+}
+
+
+static const struct pci_device_id pasemi_edac_pci_tbl[] = {
+	{ PCI_DEVICE(PCI_VENDOR_ID_PASEMI, 0xa00a) },
+};
+
+MODULE_DEVICE_TABLE(pci, pasemi_edac_pci_tbl);
+
+static struct pci_driver pasemi_edac_driver = {
+	.name = MODULE_NAME,
+	.probe = pasemi_edac_probe,
+	.remove = __devexit_p(pasemi_edac_remove),
+	.id_table = pasemi_edac_pci_tbl,
+};
+
+static int __init pasemi_edac_init(void)
+{
+	return pci_register_driver(&pasemi_edac_driver);
+}
+
+static void __exit pasemi_edac_exit(void)
+{
+	pci_unregister_driver(&pasemi_edac_driver);
+}
+
+module_init(pasemi_edac_init);
+module_exit(pasemi_edac_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>");
+MODULE_DESCRIPTION("MC support for PA Semi PA6T-1682M memory controller");
Index: mm/drivers/edac/Kconfig
===================================================================
--- mm.orig/drivers/edac/Kconfig
+++ mm/drivers/edac/Kconfig
@@ -9,7 +9,7 @@
 menuconfig EDAC
 	tristate "EDAC - error detection and reporting (EXPERIMENTAL)"
 	depends on HAS_IOMEM
-	depends on X86 && EXPERIMENTAL
+	depends on (X86 || PPC) && EXPERIMENTAL
 	help
 	  EDAC is designed to report errors in the core system.
 	  These are low-level errors that are reported in the CPU or
@@ -116,4 +116,12 @@ config EDAC_I5000
 	  Support for error detection and correction the Intel
 	  Greekcreek/Blackford chipsets.
 
+config EDAC_PASEMI
+	tristate "PA Semi PWRficient"
+	depends on EDAC_MM_EDAC && PCI
+	help
+	  Support for error detection and correction on PA Semi
+	  PWRficient.
+
+
 endif # EDAC
Index: mm/drivers/edac/Makefile
===================================================================
--- mm.orig/drivers/edac/Makefile
+++ mm/drivers/edac/Makefile
@@ -26,4 +26,5 @@ obj-$(CONFIG_EDAC_I82875P)		+= i82875p_e
 obj-$(CONFIG_EDAC_I3000)		+= i3000_edac.o
 obj-$(CONFIG_EDAC_I82860)		+= i82860_edac.o
 obj-$(CONFIG_EDAC_R82600)		+= r82600_edac.o
+obj-$(CONFIG_EDAC_PASEMI)		+= pasemi_edac.o
 

^ permalink raw reply

* Re: version control for dts/dtb?
From: Jon Loeliger @ 2007-06-22 17:24 UTC (permalink / raw)
  To: marty; +Cc: linuxppc-embedded@ozlabs.org
In-Reply-To: <000301c7b03e$0e2a42a0$9700a8c0@hplaptop>

On Sat, 2007-06-16 at 12:44, marty wrote:
> Is there a  wy to figure out the version of the dtb file I'm  using?
> At a minimum, it would be useful to have a node with the conversion time 
> stuck somewhere...
> 
> I ran dtc to convert binary to source, but that isn't necessarily what I 
> wanted to look at -- just a single date
> code would be sufficient...
> 
> marty


There is currently no direct version stamp in the
DTS or DTB files.  You may be able to derive some
knowledge by running a DTB file through the DTC
with the input file as "dtb" and looking at an
output file of DTS, though.  That is, "-I dtb -O dts"
and looking at it.

HTH,
jdl

^ permalink raw reply

* [patch] powerpc: sysfs fix compiler warning
From: Christian Krafft @ 2007-06-22 17:48 UTC (permalink / raw)
  To: linuxppc-dev@ozlabs.org

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

From: Christian Krafft <krafft@de.ibm.com>

This patch fixes the following compiler warning:
arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of
`sysfs_create_group',

Signed-off-by: Christian Krafft <krafft@de.ibm.com>

Index: linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
===================================================================
--- linux-2.6.22-rc5.orig/arch/powerpc/kernel/sysfs.c
+++ linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
@@ -380,16 +380,23 @@ int cpu_add_sysdev_attr_group(struct att
 {
 	int cpu;
 	struct sys_device *sysdev;
+	int error;
 
 	mutex_lock(&cpu_mutex);
 
 	for_each_possible_cpu(cpu) {
 		sysdev = get_cpu_sysdev(cpu);
-		sysfs_create_group(&sysdev->kobj, attrs);
+		error |= sysfs_create_group(&sysdev->kobj, attrs);
 	}
 
+	if(error)
+		for_each_possible_cpu(cpu) {
+			sysdev = get_cpu_sysdev(cpu);
+			sysfs_remove_group(&sysdev->kobj, attrs);
+		}
+
 	mutex_unlock(&cpu_mutex);
-	return 0;
+	return error;
 }
 EXPORT_SYMBOL_GPL(cpu_add_sysdev_attr_group);
 


-- 
Mit freundlichen Gruessen,
kind regards,

Christian Krafft
IBM Systems & Technology Group,
Linux Kernel Development
IT Specialist


Vorsitzender des Aufsichtsrats:	Martin Jetter
Geschaeftsfuehrung:		Herbert Kircher
Sitz der Gesellschaft:		Boeblingen
Registriergericht:		Amtsgericht Stuttgart, HRB 243294


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Follow up on 4 Gig of DDR on  MPC8548E
From: Morrison, Tom @ 2007-06-22 17:49 UTC (permalink / raw)
  To: linuxppc-dev, ltib, linuxppc-embedded
In-Reply-To: <mailman.1956.1182519826.2671.linuxppc-dev@ozlabs.org>

All,

We are running into a very strange problem that I=20
am hoping someone here might have some insight upon.

Setup:
   1) 4 Gig of DDR RAM (at physical addresses 0-0xF_FFFF_FFFF)

   2) LTIB/Linux Kernel (2.6.11++) - I know we are behind the
	times, but it was too risky to go with latest/greatest.

   3) U-boot passes a Max MEM of 3 GIG to the kernel at boot...
	But, we are using on the bootcmd =3D=3D> mem=3D2 GIG + a few pages

Symptoms:
  a) 	Kernel boots - but fails / and hangs when it attempts to=20
	open the initial console:

>> EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
>> VFS: Mounted root (ext2 filesystem).
>>  316k init
>> EXT2-fs error (device sda1): ext2_check_page: bad entry in directory
#2: >> unaligned directory entry - offset=3D0, inode=3D128,
rec_len=3D8961,name_len=3D69
>> Warning: unable to open an initial console.

--- a little debugging indicates that it is trying to open the      ----
--- /dev/console device - and one of first physical pages allocated ----
--- is above the 2 GIG boundary (0x80000000)                        ----

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dfurther =
tests=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
  =20
   b) if we pass a 'mem=3D2GIG' or less (even though 4 GIG of DDR) -=20
	it works correctly, and we boot up normally...

   d) Further, If we do #b, and ioremap a physical address=20
	above the 2GIG and read/write those addresses - it works.....
	=3D=3D> This tells me the memory is working...

My gut tells me this might be something to do with the 2=20
Gig boundary and specifically a "signed" versus "unsigned"=20
address/offsets mismatch maybe somewhere in the file system??

We are debugging this - but it is painful and slow process=20
to narrow the root problem - I am hoping somebody around=20
here has some knowledge of this type of failure and can help us!

All the Best~!

Tom Morrison
Principal S/W Engineer
Empirix, Inc (www.empirix.com)
tmorrison@empirix.com
(781) 266 - 3567

^ permalink raw reply

* Memory coherency on MPC8272
From: Dmitri Petchkine @ 2007-06-22 17:28 UTC (permalink / raw)
  To: linuxppc-embedded

Hi All,

I am working on a user-space application interacting with the security 
engine on MPC8272, which runs Linux 2.6.10_mvl401 (Montavista Pro 
4.0.1). The driver (version 1.2 22-Feb-2006) for the security engine is 
written by Freescale.

The application calls the driver through ioctl() to perform a crypto 
operation. It is non-blocking call, so the app sits and waits for the 
result when it becomes available. Once the driver notifies the app via a 
signal, the latter does another ioctl() to get the result back to the 
user space from the kernel-space.

Sometimes the returned buffer is just all zeroes which is incorrect.

Here is the piece of code in the driver which copies the data back to 
the user space:

sec1_ioctl.c:
int SEC1_ioctl(struct inode  *nd,
                struct file   *fil,
                unsigned int   ioctlCode,
                unsigned long  param)
{
...
         case IOCTL_COPYTO:
             mem = (MALLOC_REQ *)param;
             mem->pid = current->pid;
             copy_to_user(mem->to, mem->from, mem->sz);
             status = SEC1_SUCCESS;
             break;
...
}

The definition of MALLOC_REQ (file Sec1.h):

typedef struct
{
     unsigned long sz;   /* Number of bytes to allocate
                            Zero means to use the default.  A value
                            of zero can be used to avoid fragmentation. */
     void         *ptr;  /* Pointer to the adress that is to
                            be returned by a call to KernelMalloc()
                            or a pointer to an address that is to
                            be freed when calling KernelFree()   */
     char         *to;   /* copy to pointer */
     char         *from; /* copy from pointer*/
     int           pid;  /* pid of requestor */
} MALLOC_REQ;


The problem goes away if I add printing of some buffer (it can be 
mem->to or mem->from, or even another, unrelated buffer) AFTER the call 
to copy_to_user(), i.e.:

         case IOCTL_COPYTO:
         {   char garbage[128]; /* new line */
             mem = (MALLOC_REQ *)param;
             mem->pid = current->pid;
             copy_to_user(mem->to, mem->from, mem->sz);

             PRINT_HEX( garbage, 128 ); /* new line */

             status = SEC1_SUCCESS;
             break;
          }

My understanding that the security hardware of MPC8272 uses DMA to write 
results into the memory which may cause a coherency problem.

My exposure to such hardware issues is very limited, so I appreciate any 
advice on how to fix it.

Thanks in advance,
Dmitri Pechkin

^ permalink raw reply

* RE: version control for dts/dtb?
From: Leisner, Martin @ 2007-06-22 18:08 UTC (permalink / raw)
  To: Jon Loeliger, marty; +Cc: Lund, Nathan, linuxppc-embedded
In-Reply-To: <1182533095.29873.30.camel@ld0161-tx32>

I made a node "revision" which was tied into rcs...

 ...
        compatible =3D "mpc74xx";
        revision =3D "$Revision: 1.7 $";
        #address-cells =3D <1>;
        #size-cells =3D <1>;
        linux,phandle =3D <100>;
...

This seems to do what I wanted, I can then see in /proc/device-tree what
dts I'm running...

marty
> -----Original Message-----
> From:=20
> linuxppc-embedded-bounces+martin.leisner=3Dxerox.com@ozlabs.org=20
> [mailto:linuxppc-embedded-bounces+martin.leisner=3Dxerox.com@ozl
> abs.org] On Behalf Of Jon Loeliger
> Sent: Friday, June 22, 2007 1:25 PM
> To: marty
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: version control for dts/dtb?
>=20
> On Sat, 2007-06-16 at 12:44, marty wrote:
> > Is there a  wy to figure out the version of the dtb file I'm  using?
> > At a minimum, it would be useful to have a node with the=20
> conversion time=20
> > stuck somewhere...
> >=20
> > I ran dtc to convert binary to source, but that isn't=20
> necessarily what I=20
> > wanted to look at -- just a single date
> > code would be sufficient...
> >=20
> > marty
>=20
>=20
> There is currently no direct version stamp in the
> DTS or DTB files.  You may be able to derive some
> knowledge by running a DTB file through the DTC
> with the input file as "dtb" and looking at an
> output file of DTS, though.  That is, "-I dtb -O dts"
> and looking at it.
>=20
> HTH,
> jdl
>=20
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20

^ permalink raw reply

* Re: [patch] powerpc: sysfs fix compiler warning
From: Josh Boyer @ 2007-06-22 18:38 UTC (permalink / raw)
  To: Christian Krafft; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <20070622194853.72fb652a@localhost>

On Fri, 2007-06-22 at 19:48 +0200, Christian Krafft wrote:
> From: Christian Krafft <krafft@de.ibm.com>
> 
> This patch fixes the following compiler warning:
> arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of
> `sysfs_create_group',
> 
> Signed-off-by: Christian Krafft <krafft@de.ibm.com>
> 
> Index: linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
> ===================================================================
> --- linux-2.6.22-rc5.orig/arch/powerpc/kernel/sysfs.c
> +++ linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
> @@ -380,16 +380,23 @@ int cpu_add_sysdev_attr_group(struct att
>  {
>  	int cpu;
>  	struct sys_device *sysdev;
> +	int error;
>  
>  	mutex_lock(&cpu_mutex);
>  
>  	for_each_possible_cpu(cpu) {
>  		sysdev = get_cpu_sysdev(cpu);
> -		sysfs_create_group(&sysdev->kobj, attrs);
> +		error |= sysfs_create_group(&sysdev->kobj, attrs);

Why are you or'ing the return value with whatever is in the
uninitialized variable?

josh

^ permalink raw reply

* Re: [patch] powerpc: sysfs fix compiler warning
From: Sergei Shtylyov @ 2007-06-22 18:57 UTC (permalink / raw)
  To: Christian Krafft; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <1182537519.1554.14.camel@weaponx.rchland.ibm.com>

Hello.

Josh Boyer wrote:

>>From: Christian Krafft <krafft@de.ibm.com>

>>This patch fixes the following compiler warning:
>>arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of
>>`sysfs_create_group',

>>Signed-off-by: Christian Krafft <krafft@de.ibm.com>

>>Index: linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
>>===================================================================
>>--- linux-2.6.22-rc5.orig/arch/powerpc/kernel/sysfs.c
>>+++ linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
>>@@ -380,16 +380,23 @@ int cpu_add_sysdev_attr_group(struct att
>> {
>> 	int cpu;
>> 	struct sys_device *sysdev;
>>+	int error;
>> 
>> 	mutex_lock(&cpu_mutex);
>> 
>> 	for_each_possible_cpu(cpu) {
>> 		sysdev = get_cpu_sysdev(cpu);
>>-		sysfs_create_group(&sysdev->kobj, attrs);
>>+		error |= sysfs_create_group(&sysdev->kobj, attrs);
> 
> 
> Why are you or'ing the return value with whatever is in the
> uninitialized variable?

    To make it always fail, no doubt. ;-)
    ISO accumulation error, it makes more sense to start cleanup created 
groups right after the first creation failure -- although with the callers opf 
this function ignoring the result anyway, who cares. :-)

> josh

WBR, Sergei

^ permalink raw reply

* Re: Virtex 4 Avnet Mini-Module Networking.
From: Glenn.G.Hart @ 2007-06-22 19:02 UTC (permalink / raw)
  To: linuxppc-embedded


Has anybody or know of anybody that has got the ethernet to work on the=

Avnet V4 Mini-Module with Linux?

My closest came with EDK 8.2iSP3 and Linux 2.6.19.  I was able to ping =
the
computers on the network, but I could not fully trasnfer data.  Capturn=
ing
the packets using Ethereal showed the TCP checksum was incorrect while =
the
IP checksum was correct.  I has a lot of trouble get the DMA to attempt=
 to
run with thei statement.

I have now tried upgrading to EDK 9.1iSP2 and Linux-2.6.21 from Grant's=
 git
server.  Now I do not see any packets using thernet evrything else seem=
s
the same.  When I try to ping another computer, I see activity on the
switch, but no packets are transmitted.  Samething happens using FIFO o=
r
DMA Below is the kernel output when booting.

[    4.186714] XTemac: using sgDMA mode.
[    4.230800] XTemac: using TxDRE mode
[    4.273829] XTemac: using RxDRE mode
[    4.316805] XTemac: buffer descriptor size: 32768 (0x8000)
[    4.383980] XTemac: (buffer_descriptor_init) phy: 0x5c8000, virt:
0xff100000, size: 0x8000
[    4.494600] eth%d: XTemac: PHY detected at address 4.
[    4.557994] eth0: Xilinx TEMAC #0 at 0x81200000 mapped to 0xC5000000=
,
irq=3D0
[    4.641808] eth0: XTemac id 1.0f, block id 5, type 8
[    4.703065] mice: PS/2 mouse device common for all mice
[    4.766425] TCP cubic registered
[    4.805581] NET: Registered protocol family 1
[    4.858089] NET: Registered protocol family 17
[    4.914484] RAMDISK: Compressed image found at block 0
[    7.190462] VFS: Mounted root (ext2 filesystem).
[    7.246742] Freeing unused kernel memory: 92k init
[    7.445413] eth0: XTemac: Options: 0xb8f2
[   12.986126] eth0: XTemac: We renegotiated the speed to: 1000
[   13.054001] eth0: XTemac: speed set to 1000Mb/s
[   13.120469] eth0: XTemac: Send Threshold =3D 16, Receive Threshold =3D=
 2
[   13.212064] eth0: XTemac: Send Wait bound =3D 1, Receive Wait bound =
=3D 1

Any ideas/comments.  It would be great to hear from somebody that this =
has
a chance of working because you got it wokrking.

Thanks,
Glenn


Mohammad Sadegh Sadri wrote:
>
> very interesting
>
> the provided xps project from xapp941 results 230Mbits but your custo=
me
system is 83.0Mbits, yes?

yes

> just, are you sure the ppc core has the same core clock frequency in =
both
designs? I mean may be the xapp941 is running at 300MHz but yours at
100MHz.

both run at 300MHz

> And what about a custom system with 9.1SP2? does that gives the same
performance?

haven't tried this yet

> Finally If possible please release the test results for TCP streams. =
(
9.1 no SP and 9.1 SP2 )

The TEMAC driver is from EDK 9.1.02 (IOW, SP2).

bitstream made by myself with EDK 9.1.00:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.119=
.1
-i 10, 2 -I 99,10 -t TCP_STREAM -- -m 32768 -s 262144
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.119.1
(192.168.119.1) port 0 AF_INET : =B15.0% @ 99% conf.
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

  87380 217088  32768    30.00      41.66

bitstream from XAPP941:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.119=
.1
-i 10, 2 -I 99,10 -t TCP_STREAM -- -m 32768 -s 262144
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.119.1
(192.168.119.1) port 0 AF_INET : =B15.0% @ 99% conf.
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

  87380 217088  32768    30.00     111.86

And I didn't test ML405 receive performance.

Thanks,
Andrei

> thanks
>
>
>
> ----------------------------------------
>> Date: Thu, 21 Jun 2007 18:53:49 +0400
>> From: akonovalov@ru.mvista.com
>> To: mamsadegh@hotmail.com
>> CC: linuxppc-embedded@ozlabs.org; kashiwagi@co-nss.co.jp;
glenn.g.hart@us.westinghouse.com
>> Subject: Re: Virtex 4 Avnet Mini-Module Networking.
>>
>> Mohammad Sadegh Sadri wrote:
>>> I'm wondering where are the original developers of TEMAC driver the=
se
days, I have not seen any posts from any of andrei
>>> nor grant in the recent weeks. may be they are involved in other
projects.
>> As for me - no, not until the end of this week..
>>
>> I am puzzled with the following:
>>
>> I've got ML405 recently. There is a prebuilt bitstream with TEMAC in=

SGDMA mode for this board made by Xilinx (XAPP941).
>> With the TEMAC driver from EDK 9.1SP2 and the XAPP941 bitstream I've=
 got
(no jumbo frames):
>>
>>    XTemac: using sgDMA mode.
>>    XTemac: using TxDRE mode
>>    XTemac: using RxDRE mode
>>    XTemac: buffer descriptor size: 32768 (0x8000)
>>    XTemac: (buffer_descriptor_init) phy: 0x3cf8000, virt: 0xff100000=
,
size: 0x8000
>>    eth%d: XTemac: PHY detected at address 7.
>>    eth0: Xilinx TEMAC #0 at 0x80000000 mapped to 0xC5060000, irq=3D0=

>>    eth0: XTemac id 1.0f, block id 5, type 8
>>
>>    eth0: XTemac: Options: 0xb8f2
>>    eth0: XTemac: We renegotiated the speed to: 1000
>>    eth0: XTemac: speed set to 1000Mb/s
>>    eth0: XTemac: Send Threshold =3D 16, Receive Threshold =3D 2
>>    eth0: XTemac: Send Wait bound =3D 1, Receive Wait bound =3D 1
>>
>>    root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H
192.168.119.1 -i 10,
>>    2 -I 99,10 -t UDP_STREAM -- -m 32768 -s 262144
>>    UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INE=
T to
192.168.11
>>    9.1 (192.168.119.1) port 0 AF_INET : =B15.0% @ 99% conf.
>>    Socket  Message  Elapsed      Messages
>>    Size    Size     Time         Okay Errors   Throughput
>>    bytes   bytes    secs            #      #   10^6bits/sec
>>
>>    217088   32768   30.00       26391      0     230.60
>>    107520           30.00       26377            230.48
>>
>> Not that bad for this setup.
>>
>> With xps (EDK 9.1 without any SPs) I've tried creating exact the sam=
e
design.
>> So that exact the same kernel etc could be used for the both bitstre=
ams.
>> And with the self-made one I see exact the same output with the only=

difference:
>>
>>    root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H
192.168.119.1 -i 10,
>>    2 -I 99,10 -t UDP_STREAM -- -m 32768 -s 262144
>>    UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INE=
T to
192.168.11
>>    9.1 (192.168.119.1) port 0 AF_INET : =B15.0% @ 99% conf.
>>    Socket  Message  Elapsed      Messages
>>    Size    Size     Time         Okay Errors   Throughput
>>    bytes   bytes    secs            #      #   10^6bits/sec
>>
>>    217088   32768   30.00        9593      0      83.82
>>    107520           30.00        9586             83.76
>>
>> :o(
>>
>> Rebuilding the XAPP941 project with EDK 9.1.00 still leaves 230Mb/se=
c.
>> I also pulled the additional timing constraints from XAPP941's
data/system.ucf
>> into the self-made data/system.ucf, but this haven't change anything=
.
>>
>> I've run out of ideas, and switched from TEMAC to other Xilinx stuff=
 for
a while.
>>
>>
>> Thanks,
>> Andrei
>
> _________________________________________________________________
> Connect to the next generation of MSN Messenger
>
http://imagine-msn.com/messenger/launch80/default.aspx?locale=3Den-us&s=
ource=3Dwlmailtagline

> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded






=

^ permalink raw reply

* Re: [patch] powerpc: sysfs fix compiler warning
From: Josh Boyer @ 2007-06-22 19:04 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Christian Krafft, linuxppc-dev@ozlabs.org
In-Reply-To: <467C1BB5.2040600@ru.mvista.com>

On Fri, 2007-06-22 at 22:57 +0400, Sergei Shtylyov wrote:
> Hello.
> 
> Josh Boyer wrote:
> 
> >>From: Christian Krafft <krafft@de.ibm.com>
> 
> >>This patch fixes the following compiler warning:
> >>arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of
> >>`sysfs_create_group',
> 
> >>Signed-off-by: Christian Krafft <krafft@de.ibm.com>
> 
> >>Index: linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
> >>===================================================================
> >>--- linux-2.6.22-rc5.orig/arch/powerpc/kernel/sysfs.c
> >>+++ linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
> >>@@ -380,16 +380,23 @@ int cpu_add_sysdev_attr_group(struct att
> >> {
> >> 	int cpu;
> >> 	struct sys_device *sysdev;
> >>+	int error;
> >> 
> >> 	mutex_lock(&cpu_mutex);
> >> 
> >> 	for_each_possible_cpu(cpu) {
> >> 		sysdev = get_cpu_sysdev(cpu);
> >>-		sysfs_create_group(&sysdev->kobj, attrs);
> >>+		error |= sysfs_create_group(&sysdev->kobj, attrs);
> > 
> > 
> > Why are you or'ing the return value with whatever is in the
> > uninitialized variable?
> 
>     To make it always fail, no doubt. ;-)
>     ISO accumulation error, it makes more sense to start cleanup created 
> groups right after the first creation failure -- although with the callers opf 
> this function ignoring the result anyway, who cares. :-)

I care because he does an if (error) below that.  Since error isn't
initialized, it could be some random value and or'ing a 0 return code
from sysfs_create_group would still trigger the error path.

Plus, it's bogus anyway and should be fixed.

josh

^ permalink raw reply

* Re: [patch] powerpc: sysfs fix compiler warning
From: Sergei Shtylyov @ 2007-06-22 19:09 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Christian Krafft, linuxppc-dev@ozlabs.org
In-Reply-To: <1182539095.1554.18.camel@weaponx.rchland.ibm.com>

Josh Boyer wrote:
> On Fri, 2007-06-22 at 22:57 +0400, Sergei Shtylyov wrote:
> 
>>Hello.
>>
>>Josh Boyer wrote:
>>
>>
>>>>From: Christian Krafft <krafft@de.ibm.com>
>>
>>>>This patch fixes the following compiler warning:
>>>>arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of
>>>>`sysfs_create_group',
>>
>>>>Signed-off-by: Christian Krafft <krafft@de.ibm.com>
>>
>>>>Index: linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
>>>>===================================================================
>>>>--- linux-2.6.22-rc5.orig/arch/powerpc/kernel/sysfs.c
>>>>+++ linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
>>>>@@ -380,16 +380,23 @@ int cpu_add_sysdev_attr_group(struct att
>>>>{
>>>>	int cpu;
>>>>	struct sys_device *sysdev;
>>>>+	int error;
>>>>
>>>>	mutex_lock(&cpu_mutex);
>>>>
>>>>	for_each_possible_cpu(cpu) {
>>>>		sysdev = get_cpu_sysdev(cpu);
>>>>-		sysfs_create_group(&sysdev->kobj, attrs);
>>>>+		error |= sysfs_create_group(&sysdev->kobj, attrs);

>>>Why are you or'ing the return value with whatever is in the
>>>uninitialized variable?

>>    To make it always fail, no doubt. ;-)
>>    ISO accumulation error, it makes more sense to start cleanup created 
>>groups right after the first creation failure -- although with the callers opf 
>>this function ignoring the result anyway, who cares. :-)

> I care because he does an if (error) below that.  Since error isn't
> initialized, it could be some random value and or'ing a 0 return code
> from sysfs_create_group would still trigger the error path.

> Plus, it's bogus anyway and should be fixed.

    You misunderstood: I didn't at all object to fixing the bogosity you've 
pointed out, just mused about how/if the error cleanup should be done.

> josh

WBR, Sergei

^ permalink raw reply

* Re: [patch] powerpc: sysfs fix compiler warning
From: Josh Boyer @ 2007-06-22 19:12 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Christian Krafft, linuxppc-dev@ozlabs.org
In-Reply-To: <467C1E58.6070702@ru.mvista.com>

On Fri, 2007-06-22 at 23:09 +0400, Sergei Shtylyov wrote:
> Josh Boyer wrote:
> > On Fri, 2007-06-22 at 22:57 +0400, Sergei Shtylyov wrote:
> > 
> >>Hello.
> >>
> >>Josh Boyer wrote:
> >>
> >>
> >>>>From: Christian Krafft <krafft@de.ibm.com>
> >>
> >>>>This patch fixes the following compiler warning:
> >>>>arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of
> >>>>`sysfs_create_group',
> >>
> >>>>Signed-off-by: Christian Krafft <krafft@de.ibm.com>
> >>
> >>>>Index: linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
> >>>>===================================================================
> >>>>--- linux-2.6.22-rc5.orig/arch/powerpc/kernel/sysfs.c
> >>>>+++ linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
> >>>>@@ -380,16 +380,23 @@ int cpu_add_sysdev_attr_group(struct att
> >>>>{
> >>>>	int cpu;
> >>>>	struct sys_device *sysdev;
> >>>>+	int error;
> >>>>
> >>>>	mutex_lock(&cpu_mutex);
> >>>>
> >>>>	for_each_possible_cpu(cpu) {
> >>>>		sysdev = get_cpu_sysdev(cpu);
> >>>>-		sysfs_create_group(&sysdev->kobj, attrs);
> >>>>+		error |= sysfs_create_group(&sysdev->kobj, attrs);
> 
> >>>Why are you or'ing the return value with whatever is in the
> >>>uninitialized variable?
> 
> >>    To make it always fail, no doubt. ;-)
> >>    ISO accumulation error, it makes more sense to start cleanup created 
> >>groups right after the first creation failure -- although with the callers opf 
> >>this function ignoring the result anyway, who cares. :-)
> 
> > I care because he does an if (error) below that.  Since error isn't
> > initialized, it could be some random value and or'ing a 0 return code
> > from sysfs_create_group would still trigger the error path.
> 
> > Plus, it's bogus anyway and should be fixed.
> 
>     You misunderstood: I didn't at all object to fixing the bogosity you've 
> pointed out, just mused about how/if the error cleanup should be done.

Ah, gotcha.  Sorry, it's Friday and I shouldn't be here ;)

josh

^ permalink raw reply

* Re: [PATCH] [POWERPC] update g5_defconfig
From: Will Schmidt @ 2007-06-22 15:24 UTC (permalink / raw)
  To: michael, ppc-dev, Paul Mackerras; +Cc: will_schmidt
In-Reply-To: <1182469329.13799.3.camel@concordia.ozlabs.ibm.com>


Update the g5_defconfig with default settings.  
This is to keep things up to date, and specifically to ensure that the
CONFIG_MACINTOSH_DRIVERS option is enabled.  This also turns on
CONFIG_MSI.

Signed-off-by Will Schmidt <will_schmidt@vnet.ibm.com>
cc: Michael Ellerman <michael@ellerman.id.au>

---
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 3ccf19d..1517852 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -1,9 +1,22 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20-rc5
-# Mon Jan 22 22:15:04 2007
+# Linux kernel version: 2.6.22-rc4
+# Fri Jun 22 08:45:59 2007
 #
 CONFIG_PPC64=y
+
+#
+# Processor support
+#
+CONFIG_POWER4_ONLY=y
+CONFIG_POWER4=y
+CONFIG_PPC_FPU=y
+CONFIG_ALTIVEC=y
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_MM_SLICES=y
+CONFIG_VIRT_CPU_ACCOUNTING=y
+CONFIG_SMP=y
+CONFIG_NR_CPUS=4
 CONFIG_64BIT=y
 CONFIG_PPC_MERGE=y
 CONFIG_MMU=y
@@ -27,21 +40,10 @@ CONFIG_GENERIC_TBSYNC=y
 CONFIG_AUDIT_ARCH=y
 CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
-
-#
-# Processor support
-#
-CONFIG_POWER4_ONLY=y
-CONFIG_POWER4=y
-CONFIG_PPC_FPU=y
+CONFIG_PPC64_SWSUSP=y
 # CONFIG_PPC_DCR_NATIVE is not set
 # CONFIG_PPC_DCR_MMIO is not set
 # CONFIG_PPC_OF_PLATFORM_PCI is not set
-CONFIG_ALTIVEC=y
-CONFIG_PPC_STD_MMU=y
-CONFIG_VIRT_CPU_ACCOUNTING=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=4
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
@@ -59,6 +61,7 @@ CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 # CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
@@ -66,9 +69,11 @@ CONFIG_POSIX_MQUEUE=y
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=17
 # CONFIG_CPUSETS is not set
 CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
@@ -83,14 +88,19 @@ CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -127,19 +137,24 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 CONFIG_PPC_MULTIPLATFORM=y
 # CONFIG_EMBEDDED6xx is not set
-# CONFIG_APUS is not set
 # CONFIG_PPC_PSERIES is not set
 # CONFIG_PPC_ISERIES is not set
 # CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_MPC5200 is not set
 CONFIG_PPC_PMAC=y
 CONFIG_PPC_PMAC64=y
 # CONFIG_PPC_MAPLE is not set
 # CONFIG_PPC_PASEMI is not set
+# CONFIG_PPC_CELLEB is not set
+# CONFIG_PPC_PS3 is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
 # CONFIG_PPC_IBM_CELL_BLADE is not set
-# CONFIG_PPC_PS3 is not set
+# CONFIG_PQ2ADS is not set
 CONFIG_PPC_NATIVE=y
+CONFIG_MPIC=y
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
 CONFIG_U3_DART=y
 # CONFIG_PPC_RTAS is not set
 # CONFIG_MMIO_NVRAM is not set
@@ -160,9 +175,12 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
 # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
 # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+
+#
+# CPU Frequency drivers
+#
 CONFIG_CPU_FREQ_PMAC64=y
-# CONFIG_WANT_EARLY_SERIAL is not set
-CONFIG_MPIC=y
+# CONFIG_CPM2 is not set
 
 #
 # Kernel options
@@ -199,34 +217,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+# CONFIG_PPC_HAS_HASH_64K is not set
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_SCHED_SMT is not set
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
 # CONFIG_PM is not set
 CONFIG_SECCOMP=y
+# CONFIG_WANT_DEVICE_TREE is not set
 CONFIG_ISA_DMA_API=y
 
 #
 # Bus options
 #
+CONFIG_ZONE_DMA=y
 CONFIG_GENERIC_ISA_DMA=y
-# CONFIG_MPIC_WEIRD is not set
-# CONFIG_PPC_I8259 is not set
 # CONFIG_PPC_INDIRECT_PCI is not set
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
 
 #
 # PCCARD (PCMCIA/CardBus) support
 #
 # CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
 # CONFIG_HOTPLUG_PCI is not set
 CONFIG_KERNEL_START=0xc000000000000000
 
@@ -238,14 +256,15 @@ CONFIG_NET=y
 #
 # Networking options
 #
-# CONFIG_NETDEBUG is not set
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 # CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
 CONFIG_NET_KEY=m
+# CONFIG_NET_KEY_MIGRATE is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -270,10 +289,6 @@ CONFIG_INET_TCP_DIAG=y
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-
-#
-# IP: Virtual Server Configuration
-#
 # CONFIG_IP_VS is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
@@ -287,8 +302,6 @@ CONFIG_NETFILTER=y
 #
 # CONFIG_NETFILTER_NETLINK is not set
 CONFIG_NF_CONNTRACK_ENABLED=m
-CONFIG_NF_CONNTRACK_SUPPORT=y
-# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
 CONFIG_NF_CONNTRACK=m
 # CONFIG_NF_CT_ACCT is not set
 CONFIG_NF_CONNTRACK_MARK=y
@@ -300,6 +313,7 @@ CONFIG_NF_CONNTRACK_FTP=m
 CONFIG_NF_CONNTRACK_IRC=m
 # CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
 # CONFIG_NF_CONNTRACK_PPTP is not set
+# CONFIG_NF_CONNTRACK_SANE is not set
 # CONFIG_NF_CONNTRACK_SIP is not set
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NETFILTER_XTABLES is not set
@@ -310,20 +324,10 @@ CONFIG_NF_CONNTRACK_TFTP=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
 # CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
@@ -350,7 +354,16 @@ CONFIG_LLC=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
 # CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
 
 #
 # Device Drivers
@@ -363,16 +376,13 @@ CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
 #
 # CONFIG_CONNECTOR is not set
-
-#
-# Memory Technology Devices (MTD)
-#
 # CONFIG_MTD is not set
 
 #
@@ -383,6 +393,7 @@ CONFIG_FW_LOADER=y
 #
 # Plug and Play support
 #
+# CONFIG_PNPACPI is not set
 
 #
 # Block devices
@@ -402,7 +413,6 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=65536
 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
-CONFIG_BLK_DEV_INITRD=y
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_CDROM_PKTCDVD_BUFFERS=8
 # CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -411,12 +421,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
 #
 # Misc devices
 #
+# CONFIG_PHANTOM is not set
 # CONFIG_SGI_IOC4 is not set
 # CONFIG_TIFM_CORE is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
+# CONFIG_BLINK is not set
 CONFIG_IDE=y
 CONFIG_BLK_DEV_IDE=y
 
@@ -431,6 +439,7 @@ CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
 
 #
 # IDE chipset support/bugfixes
@@ -438,12 +447,12 @@ CONFIG_BLK_DEV_IDECD=y
 CONFIG_IDE_GENERIC=y
 CONFIG_BLK_DEV_IDEPCI=y
 # CONFIG_IDEPCI_SHARE_IRQ is not set
+CONFIG_IDEPCI_PCIBUS_ORDER=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
 # CONFIG_BLK_DEV_GENERIC is not set
 # CONFIG_BLK_DEV_OPTI621 is not set
 CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_IDEDMA_ONLYDISK is not set
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
@@ -458,6 +467,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT8213 is not set
 # CONFIG_BLK_DEV_IT821X is not set
 # CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -468,13 +478,13 @@ CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
 CONFIG_BLK_DEV_IDE_PMAC=y
 CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
 CONFIG_BLK_DEV_IDEDMA_PMAC=y
 # CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
 # CONFIG_BLK_DEV_HD is not set
 
 #
@@ -504,6 +514,7 @@ CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 # CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
 
 #
 # SCSI Transports
@@ -550,11 +561,8 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
 CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
 # CONFIG_SATA_AHCI is not set
 CONFIG_SATA_SVW=y
 # CONFIG_ATA_PIIX is not set
@@ -570,10 +578,12 @@ CONFIG_SATA_SVW=y
 # CONFIG_SATA_ULI is not set
 # CONFIG_SATA_VIA is not set
 # CONFIG_SATA_VITESSE is not set
+# CONFIG_SATA_INIC162X is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
 # CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD640_PCI is not set
 # CONFIG_PATA_CMD64X is not set
 # CONFIG_PATA_CS5520 is not set
 # CONFIG_PATA_CS5530 is not set
@@ -585,6 +595,7 @@ CONFIG_SATA_SVW=y
 # CONFIG_PATA_HPT3X2N is not set
 # CONFIG_PATA_HPT3X3 is not set
 # CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_IT8213 is not set
 # CONFIG_PATA_JMICRON is not set
 # CONFIG_PATA_TRIFLEX is not set
 # CONFIG_PATA_MARVELL is not set
@@ -624,6 +635,7 @@ CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
 CONFIG_DM_ZERO=m
 # CONFIG_DM_MULTIPATH is not set
+# CONFIG_DM_DELAY is not set
 
 #
 # Fusion MPT device support
@@ -636,28 +648,26 @@ CONFIG_DM_ZERO=m
 #
 # IEEE 1394 (FireWire) support
 #
+# CONFIG_FIREWIRE is not set
 CONFIG_IEEE1394=y
 
 #
 # Subsystem Options
 #
 # CONFIG_IEEE1394_VERBOSEDEBUG is not set
-CONFIG_IEEE1394_OUI_DB=y
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-# CONFIG_IEEE1394_EXPORT_FULL_API is not set
 
 #
-# Device Drivers
+# Controllers
 #
 # CONFIG_IEEE1394_PCILYNX is not set
 CONFIG_IEEE1394_OHCI1394=y
 
 #
-# Protocol Drivers
+# Protocols
 #
 CONFIG_IEEE1394_VIDEO1394=m
 CONFIG_IEEE1394_SBP2=m
+CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
 CONFIG_IEEE1394_ETH1394=m
 CONFIG_IEEE1394_DV1394=m
 CONFIG_IEEE1394_RAWIO=y
@@ -666,10 +676,7 @@ CONFIG_IEEE1394_RAWIO=y
 # I2O device support
 #
 # CONFIG_I2O is not set
-
-#
-# Macintosh device drivers
-#
+CONFIG_MACINTOSH_DRIVERS=y
 CONFIG_ADB_PMU=y
 # CONFIG_ADB_PMU_LED is not set
 CONFIG_PMAC_SMU=y
@@ -689,15 +696,7 @@ CONFIG_DUMMY=m
 CONFIG_BONDING=m
 # CONFIG_EQUALIZER is not set
 CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
 # CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
 # CONFIG_PHYLIB is not set
 
 #
@@ -716,10 +715,7 @@ CONFIG_SUNGEM=y
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
 # CONFIG_NET_PCI is not set
-
-#
-# Ethernet (1000 Mbit)
-#
+CONFIG_NETDEV_1000=y
 CONFIG_ACENIC=y
 CONFIG_ACENIC_OMIT_TIGON_I=y
 # CONFIG_DL2K is not set
@@ -734,35 +730,50 @@ CONFIG_E1000=y
 # CONFIG_SKGE is not set
 # CONFIG_SKY2 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=y
 # CONFIG_BNX2 is not set
 # CONFIG_QLA3XXX is not set
-
-#
-# Ethernet (10000 Mbit)
-#
+# CONFIG_ATL1 is not set
+CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
-
-#
-# Token Ring devices
-#
+# CONFIG_PASEMI_MAC is not set
+# CONFIG_MLX4_CORE is not set
 CONFIG_TR=y
 CONFIG_IBMOL=y
 # CONFIG_3C359 is not set
 # CONFIG_TMS380TR is not set
 
 #
-# Wireless LAN (non-hamradio)
+# Wireless LAN
 #
-# CONFIG_NET_RADIO is not set
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
 
 #
-# Wan interfaces
+# USB Network Adapters
 #
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+# CONFIG_USB_USBNET_MII is not set
+CONFIG_USB_USBNET=m
+# CONFIG_USB_NET_AX8817X is not set
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+# CONFIG_USB_NET_NET1080 is not set
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+# CONFIG_USB_NET_ZAURUS is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
@@ -798,6 +809,7 @@ CONFIG_SLHC=m
 #
 CONFIG_INPUT=y
 CONFIG_INPUT_FF_MEMLESS=y
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -824,8 +836,10 @@ CONFIG_INPUT_KEYBOARD=y
 CONFIG_INPUT_MOUSE=y
 # CONFIG_MOUSE_PS2 is not set
 # CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
 # CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
@@ -866,15 +880,10 @@ CONFIG_LEGACY_PTY_COUNT=256
 # IPMI
 #
 # CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
 # CONFIG_WATCHDOG is not set
 # CONFIG_HW_RANDOM is not set
 CONFIG_GEN_RTC=y
 # CONFIG_GEN_RTC_X is not set
-# CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
 CONFIG_AGP=m
@@ -888,11 +897,9 @@ CONFIG_MAX_RAW_DEVS=256
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-
-#
-# I2C support
-#
+CONFIG_DEVPORT=y
 CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
 
 #
@@ -919,14 +926,15 @@ CONFIG_I2C_POWERMAC=y
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_PROSAVAGE is not set
 # CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_I2C_SIMTEC is not set
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
 # CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
 # CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
 
 #
 # Miscellaneous I2C Chip support
@@ -953,37 +961,53 @@ CONFIG_I2C_POWERMAC=y
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
+# CONFIG_HWMON is not set
 
 #
-# Hardware Monitoring support
+# Multifunction device drivers
 #
-# CONFIG_HWMON is not set
-# CONFIG_HWMON_VID is not set
+# CONFIG_MFD_SM501 is not set
 
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
 
 #
-# Digital Video Broadcasting Devices
+# Graphics support
 #
-# CONFIG_DVB is not set
-# CONFIG_USB_DABUSB is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=m
 
 #
-# Graphics support
+# Display device support
 #
-CONFIG_FIRMWARE_EDID=y
+# CONFIG_DISPLAY_SUPPORT is not set
+CONFIG_VGASTATE=y
 CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
 CONFIG_FB_DDC=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
 CONFIG_FB_MACMODES=y
-# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_BACKLIGHT=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
 # CONFIG_FB_CIRRUS is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
@@ -994,20 +1018,27 @@ CONFIG_FB_OF=y
 # CONFIG_FB_S1D13XXX is not set
 CONFIG_FB_NVIDIA=y
 CONFIG_FB_NVIDIA_I2C=y
+# CONFIG_FB_NVIDIA_DEBUG is not set
+CONFIG_FB_NVIDIA_BACKLIGHT=y
 # CONFIG_FB_RIVA is not set
 # CONFIG_FB_MATROX is not set
 CONFIG_FB_RADEON=y
 CONFIG_FB_RADEON_I2C=y
+CONFIG_FB_RADEON_BACKLIGHT=y
 # CONFIG_FB_RADEON_DEBUG is not set
 # CONFIG_FB_ATY128 is not set
 # CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
 # CONFIG_FB_SAVAGE is not set
 # CONFIG_FB_SIS is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_KYRO is not set
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
 # CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
 # CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_FB_VIRTUAL is not set
 
@@ -1021,19 +1052,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
 CONFIG_LOGO=y
 CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
 
 #
 # Sound
@@ -1152,6 +1174,12 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
 #
 CONFIG_SND_USB_AUDIO=m
 # CONFIG_SND_USB_USX2Y is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+# CONFIG_SND_SOC is not set
 
 #
 # Open Sound System
@@ -1162,6 +1190,20 @@ CONFIG_SND_USB_AUDIO=m
 # HID Devices
 #
 CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_THRUSTMASTER_FF=y
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_HIDDEV=y
 
 #
 # USB support
@@ -1176,9 +1218,8 @@ CONFIG_USB=y
 # Miscellaneous USB options
 #
 CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
+CONFIG_USB_DEVICE_CLASS=y
 # CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -1188,9 +1229,15 @@ CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 # CONFIG_USB_EHCI_TT_NEWSCHED is not set
+# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
 # CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+CONFIG_USB_OHCI_HCD_PPC_OF=y
+CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
+# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
+CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 # CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
@@ -1224,53 +1271,10 @@ CONFIG_USB_STORAGE_JUMPSHOT=y
 # CONFIG_USB_LIBUSUAL is not set
 
 #
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-# CONFIG_ZEROPLUS_FF is not set
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_TOUCHSCREEN is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
 # USB Imaging devices
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-# CONFIG_USB_USBNET_MII is not set
-CONFIG_USB_USBNET=m
-# CONFIG_USB_NET_AX8817X is not set
-CONFIG_USB_NET_CDCETHER=m
-# CONFIG_USB_NET_GL620A is not set
-# CONFIG_USB_NET_NET1080 is not set
-# CONFIG_USB_NET_PLUSB is not set
-# CONFIG_USB_NET_MCS7830 is not set
-# CONFIG_USB_NET_RNDIS_HOST is not set
-# CONFIG_USB_NET_CDC_SUBSET is not set
-# CONFIG_USB_NET_ZAURUS is not set
 CONFIG_USB_MON=y
 
 #
@@ -1343,6 +1347,7 @@ CONFIG_USB_EZUSB=y
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
@@ -1353,6 +1358,7 @@ CONFIG_USB_APPLEDISPLAY=m
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -1363,10 +1369,6 @@ CONFIG_USB_APPLEDISPLAY=m
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
 # CONFIG_MMC is not set
 
 #
@@ -1410,10 +1412,6 @@ CONFIG_USB_APPLEDISPLAY=m
 #
 
 #
-# Virtualization
-#
-
-#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -1461,7 +1459,6 @@ CONFIG_AUTOFS_FS=m
 CONFIG_ISO9660_FS=y
 CONFIG_JOLIET=y
 CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
 CONFIG_UDF_FS=m
 CONFIG_UDF_NLS=y
 
@@ -1527,6 +1524,7 @@ CONFIG_NFS_ACL_SUPPORT=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1561,6 +1559,7 @@ CONFIG_MSDOS_PARTITION=y
 # CONFIG_SUN_PARTITION is not set
 # CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
 
 #
 # Native Language Support
@@ -1610,6 +1609,7 @@ CONFIG_NLS_UTF8=y
 # Distributed Lock Manager
 #
 # CONFIG_DLM is not set
+# CONFIG_UCC_SLOW is not set
 
 #
 # Library routines
@@ -1617,12 +1617,15 @@ CONFIG_NLS_UTF8=y
 CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=m
 CONFIG_PLIST=y
-CONFIG_IOMAP_COPY=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
 
 #
 # Instrumentation Support
@@ -1641,15 +1644,15 @@ CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
 # CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
+# CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 CONFIG_DEBUG_MUTEXES=y
-# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -1659,8 +1662,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_DEBUGGER is not set
 CONFIG_IRQSTACKS=y
 CONFIG_BOOTX_TEXT=y
@@ -1693,8 +1698,11 @@ CONFIG_CRYPTO_WP512=m
 # CONFIG_CRYPTO_GF128MUL is not set
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
 # CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1709,6 +1717,7 @@ CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_CAMELLIA is not set
 CONFIG_CRYPTO_TEST=m
 
 #

^ permalink raw reply related


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