LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.
From: Michael Ellerman @ 2009-04-08  6:23 UTC (permalink / raw)
  To: Tony Breeds; +Cc: linuxppc-dev
In-Reply-To: <20090408061352.GH16602@bilbo.ozlabs.org>

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

On Wed, 2009-04-08 at 16:13 +1000, Tony Breeds wrote:
> On Wed, Apr 08, 2009 at 03:51:26PM +1000, Tony Breeds wrote:
>  
> > Hmm actually I think you're right.  I dont want to push my luck with the gcc
> > hackers though
> 
> Replying to myself.
> 
> Yes this is a gcc bug but one introduced by CONFIG_TRACE_ALL_BRANCHES (or
> whatever that's called).

CONFIG_MAKE_MY_KERNEL_SUCK I think it is.

In that case I don't blame gcc.

If people want to use that option I think they can just deal with the
warnings, we can make -Werror depend on !CONFIG_PROFILE_ALL_BRANCHES.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

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

^ permalink raw reply

* Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.
From: Tony Breeds @ 2009-04-08  6:13 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev, Segher Boessenkool
In-Reply-To: <20090408055126.GG16602@bilbo.ozlabs.org>

On Wed, Apr 08, 2009 at 03:51:26PM +1000, Tony Breeds wrote:
 
> Hmm actually I think you're right.  I dont want to push my luck with the gcc
> hackers though

Replying to myself.

Yes this is a gcc bug but one introduced by CONFIG_TRACE_ALL_BRANCHES (or
whatever that's called).

Yours Tony

^ permalink raw reply

* Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.
From: Tony Breeds @ 2009-04-08  5:51 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <1239167335.10104.26.camel@localhost>

On Wed, Apr 08, 2009 at 03:08:55PM +1000, Michael Ellerman wrote:

> The getter routines in here could really multiplex their return values
> with a negative error code, which I generally prefer, but this works I
> guess.

I was hoping someone would notice and suggest it.  tag you're it!

> Do you need a new spacebar? :D

nowhydoyouask?
 
> This one is a bug surely?

Hmm actually I think you're right.  I dont want to push my luck with the gcc
hackers though

> Gah, gcc sucks. It should just not warn in these cases where it doesn't
> know wth is going on.

I don't think you'll get any arguments.  it only there was a -Wnowarnunused!

Yours Tony

^ permalink raw reply

* Re: [PATCH v3 0/5] i2c: i2c-mpc: make I2C bus speed configurable
From: Grant Likely @ 2009-04-08  5:32 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, devicetree-discuss, Ben Dooks, linux-i2c
In-Reply-To: <5FDB097C-7D71-41DF-A4F4-2DE34FD710C5@kernel.crashing.org>

On Tue, Apr 7, 2009 at 10:22 PM, Kumar Gala <galak@kernel.crashing.org> wro=
te:
>
> On Apr 8, 2009, at 12:16 AM, Grant Likely wrote:
>
>> On Tue, Apr 7, 2009 at 10:11 PM, Kumar Gala <galak@kernel.crashing.org>
>> wrote:
>>>
>>> On Apr 7, 2009, at 3:20 AM, Wolfgang Grandegger wrote:
>>>
>>>> This patch series makes the I2C bus speed configurable by using the
>>>> I2C node property "clock-frequency". If the property is not defined,
>>>> the old fixed clock settings will be used for backward compatibility.
>>>> The property "fsl,preserve-clocking" allows to inherit the settings
>>>> from the bootloader. Furthermore, it does some cleanup and uses the
>>>> new bindings for the Socrates board:
>>>>
>>>> =A0i2c: i2c-mpc: various coding style fixes
>>>> =A0i2c: i2c-mpc: use dev based printout function
>>>> =A0i2c: i2c-mpc: make I2C bus speed configurable
>>>
>>> It looks like Ben picked up these patches.
>>>
>>>> =A0powerpc: i2c-mpc: document new FSL I2C bindings and cleanup
>>>> =A0powerpc/85xx: i2c-mpc: use new I2C bindings for the Socates board
>>>
>>> I would have preferred these two go via me, but it looks like the board
>>> one
>>> got picked up by Ben. =A0I'll deal with the doc/binding update.
>>
>> hrummm. =A0As I mentioned in my reply, I'm not convinced that the board
>> one is the right thing in this case. =A0I would have preferred it to be
>> deferred.
>
> which part? =A0I missed this whole thread as I had it forwarding to my
> devicetree-discuss folder which I don't normally look at.

Here you go:

On Tue, Apr 7, 2009 at 8:43 AM, Grant Likely <grant.likely@secretlab.ca> wr=
ote:
> On Tue, Apr 7, 2009 at 1:20 AM, Wolfgang Grandegger <wg@grandegger.com> w=
rote:
>> Preserve I2C clock settings for the Socrates MPC8544 board.
>
> I had thought that the preserve-clocking property was intended for
> older boards that don't currently have any method of getting the clock
> setting out of u-boot.  Since Socrates is a new board, U-Boot should
> probably be made to fill in the real clock rate setting.
>
> g.

--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* Re: [PATCH v3 0/5] i2c: i2c-mpc: make I2C bus speed configurable
From: Kumar Gala @ 2009-04-08  5:28 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: Linux/PPC Development, devicetree-discuss, linux-i2c, Ben Dooks
In-Reply-To: <53B42D49-C040-442E-8448-7BC3190220A5@kernel.crashing.org>


On Apr 8, 2009, at 12:11 AM, Kumar Gala wrote:

>
> On Apr 7, 2009, at 3:20 AM, Wolfgang Grandegger wrote:
>
>> This patch series makes the I2C bus speed configurable by using the
>> I2C node property "clock-frequency". If the property is not defined,
>> the old fixed clock settings will be used for backward compatibility.
>> The property "fsl,preserve-clocking" allows to inherit the settings
>> from the bootloader. Furthermore, it does some cleanup and uses the
>> new bindings for the Socrates board:
>>
>> i2c: i2c-mpc: various coding style fixes
>> i2c: i2c-mpc: use dev based printout function
>> i2c: i2c-mpc: make I2C bus speed configurable
>
> It looks like Ben picked up these patches.
>
>> powerpc: i2c-mpc: document new FSL I2C bindings and cleanup
>> powerpc/85xx: i2c-mpc: use new I2C bindings for the Socates board
>
> I would have preferred these two go via me, but it looks like the  
> board one got picked up by Ben.  I'll deal with the doc/binding  
> update.
>>
>> Ben, could you please consider this patch series for inclusion into
>> 2.6.30

So I'm a bit concerned with the output we now get:

mpc-i2c fffe03000.i2c: clock 0 Hz (dfsrr=16 fdr=49)

why 0? is that right?

- k

^ permalink raw reply

* Re: [PATCH v3 0/5] i2c: i2c-mpc: make I2C bus speed configurable
From: Kumar Gala @ 2009-04-08  5:22 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, devicetree-discuss, Ben Dooks, linux-i2c
In-Reply-To: <fa686aa40904072216m64b4fd83q9b52c89ae40cae11@mail.gmail.com>


On Apr 8, 2009, at 12:16 AM, Grant Likely wrote:

> On Tue, Apr 7, 2009 at 10:11 PM, Kumar Gala  
> <galak@kernel.crashing.org> wrote:
>>
>> On Apr 7, 2009, at 3:20 AM, Wolfgang Grandegger wrote:
>>
>>> This patch series makes the I2C bus speed configurable by using the
>>> I2C node property "clock-frequency". If the property is not defined,
>>> the old fixed clock settings will be used for backward  
>>> compatibility.
>>> The property "fsl,preserve-clocking" allows to inherit the settings
>>> from the bootloader. Furthermore, it does some cleanup and uses the
>>> new bindings for the Socrates board:
>>>
>>>  i2c: i2c-mpc: various coding style fixes
>>>  i2c: i2c-mpc: use dev based printout function
>>>  i2c: i2c-mpc: make I2C bus speed configurable
>>
>> It looks like Ben picked up these patches.
>>
>>>  powerpc: i2c-mpc: document new FSL I2C bindings and cleanup
>>>  powerpc/85xx: i2c-mpc: use new I2C bindings for the Socates board
>>
>> I would have preferred these two go via me, but it looks like the  
>> board one
>> got picked up by Ben.  I'll deal with the doc/binding update.
>
> hrummm.  As I mentioned in my reply, I'm not convinced that the board
> one is the right thing in this case.  I would have preferred it to be
> deferred.

which part?  I missed this whole thread as I had it forwarding to my  
devicetree-discuss folder which I don't normally look at.

- k

^ permalink raw reply

* Re: [PATCH v3 0/5] i2c: i2c-mpc: make I2C bus speed configurable
From: Grant Likely @ 2009-04-08  5:16 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, devicetree-discuss, Ben Dooks, linux-i2c
In-Reply-To: <53B42D49-C040-442E-8448-7BC3190220A5@kernel.crashing.org>

On Tue, Apr 7, 2009 at 10:11 PM, Kumar Gala <galak@kernel.crashing.org> wro=
te:
>
> On Apr 7, 2009, at 3:20 AM, Wolfgang Grandegger wrote:
>
>> This patch series makes the I2C bus speed configurable by using the
>> I2C node property "clock-frequency". If the property is not defined,
>> the old fixed clock settings will be used for backward compatibility.
>> The property "fsl,preserve-clocking" allows to inherit the settings
>> from the bootloader. Furthermore, it does some cleanup and uses the
>> new bindings for the Socrates board:
>>
>> =A0i2c: i2c-mpc: various coding style fixes
>> =A0i2c: i2c-mpc: use dev based printout function
>> =A0i2c: i2c-mpc: make I2C bus speed configurable
>
> It looks like Ben picked up these patches.
>
>> =A0powerpc: i2c-mpc: document new FSL I2C bindings and cleanup
>> =A0powerpc/85xx: i2c-mpc: use new I2C bindings for the Socates board
>
> I would have preferred these two go via me, but it looks like the board o=
ne
> got picked up by Ben. =A0I'll deal with the doc/binding update.

hrummm.  As I mentioned in my reply, I'm not convinced that the board
one is the right thing in this case.  I would have preferred it to be
deferred.

g.

--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* Re: [PATCH v3 4/5] powerpc: i2c-mpc: document new FSL I2C bindings and cleanup
From: Kumar Gala @ 2009-04-08  5:13 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: linuxppc-dev, devicetree-discuss, linux-i2c, Ben Dooks
In-Reply-To: <20090407082231.646648985@denx.de>


On Apr 7, 2009, at 3:20 AM, Wolfgang Grandegger wrote:

> This patch documents the new bindings for the MPC I2C bus driver.
> Furthermore, it removes obsolete FSL device related definitions
> for I2C.
> It should go through the appropriate PowerPC maintainer(s) hands.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
> ---
> Documentation/powerpc/dts-bindings/fsl/i2c.txt |   46 +++++++++++++++ 
> +---------
> include/linux/fsl_devices.h                    |    4 --
> 2 files changed, 31 insertions(+), 19 deletions(-)

applied to merge

- k

^ permalink raw reply

* Re: linux-next: build failure
From: Alan Modra @ 2009-04-08  5:12 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, Paul Mackerras, linuxppc-dev
In-Reply-To: <20090408140407.14dc5242.sfr@canb.auug.org.au>

On Wed, Apr 08, 2009 at 02:04:07PM +1000, Stephen Rothwell wrote:
>   LD      vmlinux.o
> powerpc-linux-ld: TOC section size exceeds 64k

I'm starting to sound like a cracked record, but I'll say it again:
ld -r does not merely package together object files, it transforms
them.   Try using thin archives instead.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply

* Re: [PATCH v3 0/5] i2c: i2c-mpc: make I2C bus speed configurable
From: Kumar Gala @ 2009-04-08  5:11 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: linuxppc-dev, devicetree-discuss, linux-i2c, Ben Dooks
In-Reply-To: <20090407082052.477328750@denx.de>


On Apr 7, 2009, at 3:20 AM, Wolfgang Grandegger wrote:

> This patch series makes the I2C bus speed configurable by using the
> I2C node property "clock-frequency". If the property is not defined,
> the old fixed clock settings will be used for backward compatibility.
> The property "fsl,preserve-clocking" allows to inherit the settings
> from the bootloader. Furthermore, it does some cleanup and uses the
> new bindings for the Socrates board:
>
>  i2c: i2c-mpc: various coding style fixes
>  i2c: i2c-mpc: use dev based printout function
>  i2c: i2c-mpc: make I2C bus speed configurable

It looks like Ben picked up these patches.

>  powerpc: i2c-mpc: document new FSL I2C bindings and cleanup
>  powerpc/85xx: i2c-mpc: use new I2C bindings for the Socates board

I would have preferred these two go via me, but it looks like the  
board one got picked up by Ben.  I'll deal with the doc/binding update.
>
> Ben, could you please consider this patch series for inclusion into
> 2.6.30.

- k

^ permalink raw reply

* Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.
From: Michael Ellerman @ 2009-04-08  5:08 UTC (permalink / raw)
  To: Tony Breeds; +Cc: linuxppc-dev
In-Reply-To: <2c4bcf8d1d7083ff53ce5b556765e96676a007fb.1239165378.git.tony@bakeyournoodle.com>

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

On Wed, 2009-04-08 at 14:36 +1000, Tony Breeds wrote:
> This patch silences all the warnings generated in arch/powerpc for
> allmodconfig build.
> 
> It does:
>  * Where appropriate use the uninitialized_var() macro to help GCC
>    understand we know what's going on.
>  * Explicitly casts PHYSICAL_START in one printk()
>  * Initialise a few variables, as it's "neater" than using uninitialized_var()
> 
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
> ---
> Only compile tested.
> 
>  arch/powerpc/kernel/cacheinfo.c           |    4 ++--
>  arch/powerpc/kernel/pci_dn.c              |    2 +-
>  arch/powerpc/kernel/setup_64.c            |    4 ++--
>  arch/powerpc/platforms/cell/axon_msi.c    |    2 +-
>  arch/powerpc/platforms/cell/beat_iommu.c  |    2 +-
>  arch/powerpc/platforms/iseries/pci.c      |   24 ++++++++++++------------
>  arch/powerpc/platforms/powermac/low_i2c.c |    5 ++---
>  arch/powerpc/platforms/pseries/msi.c      |    2 +-
>  8 files changed, 22 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c
> index bb37b1d..fd6aef9 100644
> --- a/arch/powerpc/kernel/cacheinfo.c
> +++ b/arch/powerpc/kernel/cacheinfo.c
> @@ -510,7 +510,7 @@ static struct cache *index_kobj_to_cache(struct kobject *k)
>  
>  static ssize_t size_show(struct kobject *k, struct kobj_attribute *attr, char *buf)
>  {
> -	unsigned int size_kb;
> +	unsigned int uninitialized_var(size_kb);
>  	struct cache *cache;
>  
>  	cache = index_kobj_to_cache(k);
> @@ -559,7 +559,7 @@ static struct kobj_attribute cache_nr_sets_attr =
>  
>  static ssize_t associativity_show(struct kobject *k, struct kobj_attribute *attr, char *buf)
>  {
> -	unsigned int associativity;
> +	unsigned int uninitialized_var(associativity);
>  	struct cache *cache;

The getter routines in here could really multiplex their return values
with a negative error code, which I generally prefer, but this works I
guess.


> diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
> index 1c67de5..b9d66ed 100644
> --- a/arch/powerpc/kernel/pci_dn.c
> +++ b/arch/powerpc/kernel/pci_dn.c
> @@ -83,7 +83,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
>  		void *data)
>  {
>  	struct device_node *dn, *nextdn;
> -	void *ret;
> +	void *uninitialized_var(ret);

The code causing this one is a little ugly anyway, I think we should
change it to be:

-               if (pre && ((ret = pre(dn, data)) != NULL))
-                       return ret;
+               if (pre) {
+                       ret = pre(dn, data);
+                       if (ret != NULL)
+                               return ret;
+               }


> diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
> index 0ce45c2..dae4c7c 100644
> --- a/arch/powerpc/platforms/cell/axon_msi.c
> +++ b/arch/powerpc/platforms/cell/axon_msi.c
> @@ -151,7 +151,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev)
>  {
>  	struct irq_host *irq_host;
>  	struct device_node *dn, *tmp;
> -	const phandle *ph;
> +	const phandle *uninitialized_var(ph);
>  	struct axon_msic *msic = NULL;

Freakin gcc. This is just:

if (!dn)
	return;

for (; dn; ..)
	ph = ..

if (!ph)

And it can't work out that it's never used uninitialised?

> diff --git a/arch/powerpc/platforms/cell/beat_iommu.c b/arch/powerpc/platforms/cell/beat_iommu.c
> index 93b0efd..8230cd8 100644
> --- a/arch/powerpc/platforms/cell/beat_iommu.c
> +++ b/arch/powerpc/platforms/cell/beat_iommu.c
> @@ -57,7 +57,7 @@ static unsigned long celleb_dma_direct_offset;
>  static void __init celleb_init_direct_mapping(void)
>  {
>  	u64 lpar_addr, io_addr;
> -	u64 io_space_id, ioid, dma_base, dma_size, io_page_size;
> +	u64 io_space_id=0, ioid=0, dma_base=0, dma_size=0, io_page_size=0;

Do you need a new spacebar? :D

> diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
> index 02a634f..05f047d 100644
> --- a/arch/powerpc/platforms/iseries/pci.c
> +++ b/arch/powerpc/platforms/iseries/pci.c
> @@ -616,8 +616,8 @@ static inline struct device_node *xlate_iomm_address(
>   */
>  static u8 iseries_readb(const volatile void __iomem *addr)
>  {
> -	u64 bar_offset;
> -	u64 dsa;
> +	u64 uninitialized_var(bar_offset);
> +	u64 uninitialized_var(dsa);
>  	int retry = 0;
>  	struct HvCallPci_LoadReturn ret;
>  	struct device_node *dn =
> @@ -634,8 +634,8 @@ static u8 iseries_readb(const volatile void __iomem *addr)
>  
>  static u16 iseries_readw_be(const volatile void __iomem *addr)
>  {
> -	u64 bar_offset;
> -	u64 dsa;
> +	u64 uninitialized_var(bar_offset);
> +	u64 uninitialized_var(dsa);
>  	int retry = 0;
>  	struct HvCallPci_LoadReturn ret;
>  	struct device_node *dn =
> @@ -653,8 +653,8 @@ static u16 iseries_readw_be(const volatile void __iomem *addr)
>  
>  static u32 iseries_readl_be(const volatile void __iomem *addr)
>  {
> -	u64 bar_offset;
> -	u64 dsa;
> +	u64 uninitialized_var(bar_offset);
> +	u64 uninitialized_var(dsa);
>  	int retry = 0;
>  	struct HvCallPci_LoadReturn ret;
>  	struct device_node *dn =
> @@ -676,8 +676,8 @@ static u32 iseries_readl_be(const volatile void __iomem *addr)
>   */
>  static void iseries_writeb(u8 data, volatile void __iomem *addr)
>  {
> -	u64 bar_offset;
> -	u64 dsa;
> +	u64 uninitialized_var(bar_offset);
> +	u64 uninitialized_var(dsa);
>  	int retry = 0;
>  	u64 rc;
>  	struct device_node *dn =
> @@ -692,8 +692,8 @@ static void iseries_writeb(u8 data, volatile void __iomem *addr)
>  
>  static void iseries_writew_be(u16 data, volatile void __iomem *addr)
>  {
> -	u64 bar_offset;
> -	u64 dsa;
> +	u64 uninitialized_var(bar_offset);
> +	u64 uninitialized_var(dsa);
>  	int retry = 0;
>  	u64 rc;
>  	struct device_node *dn =
> @@ -708,8 +708,8 @@ static void iseries_writew_be(u16 data, volatile void __iomem *addr)
>  
>  static void iseries_writel_be(u32 data, volatile void __iomem *addr)
>  {
> -	u64 bar_offset;
> -	u64 dsa;
> +	u64 uninitialized_var(bar_offset);
> +	u64 uninitialized_var(dsa);
>  	int retry = 0;
>  	u64 rc;
>  	struct device_node *dn =
> diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
> index 21226b7..5989427 100644
> --- a/arch/powerpc/platforms/powermac/low_i2c.c
> +++ b/arch/powerpc/platforms/powermac/low_i2c.c
> @@ -1090,7 +1090,7 @@ EXPORT_SYMBOL_GPL(pmac_low_i2c_unlock);
>  
>  int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled)
>  {
> -	int rc;
> +	int rc = 0;
>  
>  	mutex_lock(&bus->mutex);
>  	bus->polled = polled || pmac_i2c_force_poll;
> @@ -1099,9 +1099,8 @@ int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled)
>  	if (bus->open && (rc = bus->open(bus)) != 0) {
>  		bus->opened = 0;
>  		mutex_unlock(&bus->mutex);
> -		return rc;
>  	}
> -	return 0;
> +	return rc;

This one is a bug surely?

1092 {
1093         int rc;
1094        
1095         mutex_lock(&bus->mutex);
1096         bus->polled = polled || pmac_i2c_force_poll;
1097         bus->opened = 1;
1098         bus->mode = pmac_i2c_mode_std;
1099         if (bus->open && (rc = bus->open(bus)) != 0) {
1100                 bus->opened = 0;
1101                 mutex_unlock(&bus->mutex);
1102                 return rc;
1103         }
1104         return 0;
1105 }


I can't reproduce it though with a simple test case :?

> diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
> index bf2e1ac..d92f593 100644
> --- a/arch/powerpc/platforms/pseries/msi.c
> +++ b/arch/powerpc/platforms/pseries/msi.c
> @@ -282,7 +282,7 @@ static int msi_quota_for_device(struct pci_dev *dev, int request)
>  {
>  	struct device_node *pe_dn;
>  	struct msi_counts counts;
> -	int total;
> +	int uninitialized_var(total);
>  
>  	pr_debug("rtas_msi: calc quota for %s, request %d\n", pci_name(dev),
>  		  request);

Gah, gcc sucks. It should just not warn in these cases where it doesn't
know wth is going on.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

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

^ permalink raw reply

* Re: [PATCH] powerpc/oprofile: Remove unused dump_pmcs() in FSL oprofile
From: Kumar Gala @ 2009-04-08  4:49 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, afleming
In-Reply-To: <fe6d8d0ac33f450da7db317eb7f785bed788fc21.1239148958.git.michael@ellerman.id.au>


On Apr 7, 2009, at 7:02 PM, Michael Ellerman wrote:

> It's still in the git history if anyone wants it.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
> arch/powerpc/oprofile/op_model_fsl_emb.c |   14 --------------
> 1 files changed, 0 insertions(+), 14 deletions(-)

applied to next

- k

^ permalink raw reply

* [PATCH] Quieten arch/powerpc in a allmodconfig build.
From: Tony Breeds @ 2009-04-08  4:36 UTC (permalink / raw)
  To: linuxppc-dev

This patch silences all the warnings generated in arch/powerpc for
allmodconfig build.

It does:
 * Where appropriate use the uninitialized_var() macro to help GCC
   understand we know what's going on.
 * Explicitly casts PHYSICAL_START in one printk()
 * Initialise a few variables, as it's "neater" than using uninitialized_var()

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
Only compile tested.

 arch/powerpc/kernel/cacheinfo.c           |    4 ++--
 arch/powerpc/kernel/pci_dn.c              |    2 +-
 arch/powerpc/kernel/setup_64.c            |    4 ++--
 arch/powerpc/platforms/cell/axon_msi.c    |    2 +-
 arch/powerpc/platforms/cell/beat_iommu.c  |    2 +-
 arch/powerpc/platforms/iseries/pci.c      |   24 ++++++++++++------------
 arch/powerpc/platforms/powermac/low_i2c.c |    5 ++---
 arch/powerpc/platforms/pseries/msi.c      |    2 +-
 8 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c
index bb37b1d..fd6aef9 100644
--- a/arch/powerpc/kernel/cacheinfo.c
+++ b/arch/powerpc/kernel/cacheinfo.c
@@ -510,7 +510,7 @@ static struct cache *index_kobj_to_cache(struct kobject *k)
 
 static ssize_t size_show(struct kobject *k, struct kobj_attribute *attr, char *buf)
 {
-	unsigned int size_kb;
+	unsigned int uninitialized_var(size_kb);
 	struct cache *cache;
 
 	cache = index_kobj_to_cache(k);
@@ -559,7 +559,7 @@ static struct kobj_attribute cache_nr_sets_attr =
 
 static ssize_t associativity_show(struct kobject *k, struct kobj_attribute *attr, char *buf)
 {
-	unsigned int associativity;
+	unsigned int uninitialized_var(associativity);
 	struct cache *cache;
 
 	cache = index_kobj_to_cache(k);
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index 1c67de5..b9d66ed 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -83,7 +83,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
 		void *data)
 {
 	struct device_node *dn, *nextdn;
-	void *ret;
+	void *uninitialized_var(ret);
 
 	/* We started with a phb, iterate all childs */
 	for (dn = start->child; dn; dn = nextdn) {
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index c410c60..38968f1 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -421,8 +421,8 @@ void __init setup_system(void)
 		printk("htab_address                  = 0x%p\n", htab_address);
 	printk("htab_hash_mask                = 0x%lx\n", htab_hash_mask);
 	if (PHYSICAL_START > 0)
-		printk("physical_start                = 0x%lx\n",
-		       PHYSICAL_START);
+		printk("physical_start                = 0x%llx\n",
+		       (unsigned long long)PHYSICAL_START);
 	printk("-----------------------------------------------------\n");
 
 	DBG(" <- setup_system()\n");
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 0ce45c2..dae4c7c 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -151,7 +151,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev)
 {
 	struct irq_host *irq_host;
 	struct device_node *dn, *tmp;
-	const phandle *ph;
+	const phandle *uninitialized_var(ph);
 	struct axon_msic *msic = NULL;
 
 	dn = of_node_get(pci_device_to_OF_node(dev));
diff --git a/arch/powerpc/platforms/cell/beat_iommu.c b/arch/powerpc/platforms/cell/beat_iommu.c
index 93b0efd..8230cd8 100644
--- a/arch/powerpc/platforms/cell/beat_iommu.c
+++ b/arch/powerpc/platforms/cell/beat_iommu.c
@@ -57,7 +57,7 @@ static unsigned long celleb_dma_direct_offset;
 static void __init celleb_init_direct_mapping(void)
 {
 	u64 lpar_addr, io_addr;
-	u64 io_space_id, ioid, dma_base, dma_size, io_page_size;
+	u64 io_space_id=0, ioid=0, dma_base=0, dma_size=0, io_page_size=0;
 
 	if (!find_dma_window(&io_space_id, &ioid, &dma_base, &dma_size,
 			     &io_page_size)) {
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 02a634f..05f047d 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -616,8 +616,8 @@ static inline struct device_node *xlate_iomm_address(
  */
 static u8 iseries_readb(const volatile void __iomem *addr)
 {
-	u64 bar_offset;
-	u64 dsa;
+	u64 uninitialized_var(bar_offset);
+	u64 uninitialized_var(dsa);
 	int retry = 0;
 	struct HvCallPci_LoadReturn ret;
 	struct device_node *dn =
@@ -634,8 +634,8 @@ static u8 iseries_readb(const volatile void __iomem *addr)
 
 static u16 iseries_readw_be(const volatile void __iomem *addr)
 {
-	u64 bar_offset;
-	u64 dsa;
+	u64 uninitialized_var(bar_offset);
+	u64 uninitialized_var(dsa);
 	int retry = 0;
 	struct HvCallPci_LoadReturn ret;
 	struct device_node *dn =
@@ -653,8 +653,8 @@ static u16 iseries_readw_be(const volatile void __iomem *addr)
 
 static u32 iseries_readl_be(const volatile void __iomem *addr)
 {
-	u64 bar_offset;
-	u64 dsa;
+	u64 uninitialized_var(bar_offset);
+	u64 uninitialized_var(dsa);
 	int retry = 0;
 	struct HvCallPci_LoadReturn ret;
 	struct device_node *dn =
@@ -676,8 +676,8 @@ static u32 iseries_readl_be(const volatile void __iomem *addr)
  */
 static void iseries_writeb(u8 data, volatile void __iomem *addr)
 {
-	u64 bar_offset;
-	u64 dsa;
+	u64 uninitialized_var(bar_offset);
+	u64 uninitialized_var(dsa);
 	int retry = 0;
 	u64 rc;
 	struct device_node *dn =
@@ -692,8 +692,8 @@ static void iseries_writeb(u8 data, volatile void __iomem *addr)
 
 static void iseries_writew_be(u16 data, volatile void __iomem *addr)
 {
-	u64 bar_offset;
-	u64 dsa;
+	u64 uninitialized_var(bar_offset);
+	u64 uninitialized_var(dsa);
 	int retry = 0;
 	u64 rc;
 	struct device_node *dn =
@@ -708,8 +708,8 @@ static void iseries_writew_be(u16 data, volatile void __iomem *addr)
 
 static void iseries_writel_be(u32 data, volatile void __iomem *addr)
 {
-	u64 bar_offset;
-	u64 dsa;
+	u64 uninitialized_var(bar_offset);
+	u64 uninitialized_var(dsa);
 	int retry = 0;
 	u64 rc;
 	struct device_node *dn =
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index 21226b7..5989427 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -1090,7 +1090,7 @@ EXPORT_SYMBOL_GPL(pmac_low_i2c_unlock);
 
 int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled)
 {
-	int rc;
+	int rc = 0;
 
 	mutex_lock(&bus->mutex);
 	bus->polled = polled || pmac_i2c_force_poll;
@@ -1099,9 +1099,8 @@ int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled)
 	if (bus->open && (rc = bus->open(bus)) != 0) {
 		bus->opened = 0;
 		mutex_unlock(&bus->mutex);
-		return rc;
 	}
-	return 0;
+	return rc;
 }
 EXPORT_SYMBOL_GPL(pmac_i2c_open);
 
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index bf2e1ac..d92f593 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -282,7 +282,7 @@ static int msi_quota_for_device(struct pci_dev *dev, int request)
 {
 	struct device_node *pe_dn;
 	struct msi_counts counts;
-	int total;
+	int uninitialized_var(total);
 
 	pr_debug("rtas_msi: calc quota for %s, request %d\n", pci_name(dev),
 		  request);
-- 
1.6.0.6

^ permalink raw reply related

* [PATCH] mpic_find() was overloaded to do two things introduce mpic_is_ipi() and simplify mpic_find()
From: Tony Breeds @ 2009-04-08  4:26 UTC (permalink / raw)
  To: linuxppc-dev

Also silences the warning:
arch/powerpc/sysdev/mpic.c: In function 'mpic_irq_set_priority':
arch/powerpc/sysdev/mpic.c:1382: warning: 'is_ipi' may be used uninitialized in this function

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
Only compile tested.

 arch/powerpc/sysdev/mpic.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 21b9567..a09eaf9 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -613,23 +613,23 @@ static int irq_choose_cpu(unsigned int virt_irq)
 #define mpic_irq_to_hw(virq)	((unsigned int)irq_map[virq].hwirq)
 
 /* Find an mpic associated with a given linux interrupt */
-static struct mpic *mpic_find(unsigned int irq, unsigned int *is_ipi)
+static struct mpic *mpic_find(unsigned int irq)
 {
-	unsigned int src = mpic_irq_to_hw(irq);
-	struct mpic *mpic;
-
 	if (irq < NUM_ISA_INTERRUPTS)
 		return NULL;
 
-	mpic = irq_desc[irq].chip_data;
+	return irq_desc[irq].chip_data;
+}
 
-	if (is_ipi)
-		*is_ipi = (src >= mpic->ipi_vecs[0] &&
-			   src <= mpic->ipi_vecs[3]);
+/* Determine if the linux irq is an IPI */
+static unsigned int mpic_is_ipi(struct mpic *mpic, unsigned int irq)
+{
+	unsigned int src = mpic_irq_to_hw(irq);
 
-	return mpic;
+	return (src >= mpic->ipi_vecs[0] && src <= mpic->ipi_vecs[3]);
 }
 
+
 /* Convert a cpu mask from logical to physical cpu numbers. */
 static inline u32 mpic_physmask(u32 cpumask)
 {
@@ -1379,8 +1379,7 @@ void __init mpic_set_serial_int(struct mpic *mpic, int enable)
 
 void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
 {
-	unsigned int is_ipi;
-	struct mpic *mpic = mpic_find(irq, &is_ipi);
+	struct mpic *mpic = mpic_find(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
 	unsigned long flags;
 	u32 reg;
@@ -1389,7 +1388,7 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
 		return;
 
 	spin_lock_irqsave(&mpic_lock, flags);
-	if (is_ipi) {
+	if (mpic_is_ipi(mpic, irq)) {
 		reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) &
 			~MPIC_VECPRI_PRIORITY_MASK;
 		mpic_ipi_write(src - mpic->ipi_vecs[0],
-- 
1.6.0.6

^ permalink raw reply related

* linux-next: build failure
From: Stephen Rothwell @ 2009-04-08  4:04 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev, linux-next, amodra

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

Hi all,

Today's linux-next build (powerpc allyesconfig) failed like this:

  LD      vmlinux.o
powerpc-linux-ld: TOC section size exceeds 64k

I will think about (and appreciate suggestions on) how to fix this ...
-- 
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

* [PATCH] Fix build failure drivers/parport/parport_pc.c for powerpc
From: Tony Breeds @ 2009-04-08  3:25 UTC (permalink / raw)
  To: linux-kernel, Alan Cox; +Cc: linuxppc-dev

In commit 51dcdfec6a274afc1c6fce180d582add9ff512c0 (parport: Use the PCI
IRQ if offered) parport_pc_probe_port() gained an irqflags arg.  This
isn't being supplied on powerpc.  This patch make powerpc fallback to
the old behaviour, that is using "0" for irqflags.

Fixes build failure:
In file included from drivers/parport/parport_pc.c:68:
arch/powerpc/include/asm/parport.h: In function 'parport_pc_find_nonpci_ports':
arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
make[3]: *** [drivers/parport/parport_pc.o] Error 1

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
 arch/powerpc/include/asm/parport.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/include/asm/parport.h b/arch/powerpc/include/asm/parport.h
index 414c50e..94942d6 100644
--- a/arch/powerpc/include/asm/parport.h
+++ b/arch/powerpc/include/asm/parport.h
@@ -29,7 +29,7 @@ static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
 		prop = of_get_property(np, "interrupts", NULL);
 		if (!prop)
 			continue;
-		if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL) != NULL)
+		if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL, 0) != NULL)
 			count++;
 	}
 	return count;
-- 
1.6.0.6

^ permalink raw reply related

* [PATCH] powerpc/mm: Fix compile warning
From: Kumar Gala @ 2009-04-08  3:11 UTC (permalink / raw)
  To: linuxppc-dev

arch/powerpc/mm/tlb_nohash.c: In function 'flush_tlb_mm':
arch/powerpc/mm/tlb_nohash.c:128: warning: unused variable 'cpu_mask'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/mm/tlb_nohash.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index 7af7297..ad2eb4d 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -125,7 +125,6 @@ static void do_flush_tlb_page_ipi(void *param)
 
 void flush_tlb_mm(struct mm_struct *mm)
 {
-	cpumask_t cpu_mask;
 	unsigned int pid;
 
 	preempt_disable();
-- 
1.6.0.6

^ permalink raw reply related

* Re: "ahci: drop intx manipulation on msi enable" breaks ULI M1575
From: Michael Ellerman @ 2009-04-08  2:09 UTC (permalink / raw)
  To: Timur Tabi; +Cc: Tejun Heo, linux-ide, Jeff Garzik, Linux PPC Development
In-Reply-To: <ed82fe3e0904071736w55dff582y8ac2681f6410865b@mail.gmail.com>

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

On Tue, 2009-04-07 at 19:36 -0500, Timur Tabi wrote:
> On Tue, Apr 7, 2009 at 6:57 PM, Tejun Heo <tj@kernel.org> wrote:
> 
> > Hmmm... that means intx isn't set by default.  I'm not sure what is
> > the right thing to do here.  I think it's something which should be
> > handled by the PCI layer.  Oh well, maybe we should just revert the
> > change and keep setting intx?
> 
> cc'ing linuxppc-dev
> 
> I really don't know what should be done.  It seems to make sense to
> have the PCI layer enable interrupts.
> 
> This seems to be a powerpc-specific bug, but I don't know enough of
> the PCI subsystem.

Have you confirmed that INTX is disabled before that call?

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

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

^ permalink raw reply

* Re: "ahci: drop intx manipulation on msi enable" breaks ULI M1575
From: Timur Tabi @ 2009-04-08  1:19 UTC (permalink / raw)
  To: michael; +Cc: Tejun Heo, linux-ide, Jeff Garzik, Linux PPC Development
In-Reply-To: <1239151956.10104.1.camel@localhost>

On Tue, Apr 7, 2009 at 7:52 PM, Michael Ellerman <michael@ellerman.id.au> wrote:

> Can you post some more details, or point us at a thread?

http://marc.info/?t=123911652100006&r=1&w=2

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: "ahci: drop intx manipulation on msi enable" breaks ULI M1575
From: Michael Ellerman @ 2009-04-08  0:52 UTC (permalink / raw)
  To: Timur Tabi; +Cc: Tejun Heo, linux-ide, Jeff Garzik, Linux PPC Development
In-Reply-To: <ed82fe3e0904071736w55dff582y8ac2681f6410865b@mail.gmail.com>

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

On Tue, 2009-04-07 at 19:36 -0500, Timur Tabi wrote:
> On Tue, Apr 7, 2009 at 6:57 PM, Tejun Heo <tj@kernel.org> wrote:
> 
> > Hmmm... that means intx isn't set by default.  I'm not sure what is
> > the right thing to do here.  I think it's something which should be
> > handled by the PCI layer.  Oh well, maybe we should just revert the
> > change and keep setting intx?
> 
> cc'ing linuxppc-dev
> 
> I really don't know what should be done.  It seems to make sense to
> have the PCI layer enable interrupts.
> 
> This seems to be a powerpc-specific bug, but I don't know enough of
> the PCI subsystem.

Can you post some more details, or point us at a thread?

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

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

^ permalink raw reply

* Re: "ahci: drop intx manipulation on msi enable" breaks ULI M1575
From: Timur Tabi @ 2009-04-08  0:36 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide, Jeff Garzik, Linux PPC Development
In-Reply-To: <49DBE858.9040004@kernel.org>

On Tue, Apr 7, 2009 at 6:57 PM, Tejun Heo <tj@kernel.org> wrote:

> Hmmm... that means intx isn't set by default. =A0I'm not sure what is
> the right thing to do here. =A0I think it's something which should be
> handled by the PCI layer. =A0Oh well, maybe we should just revert the
> change and keep setting intx?

cc'ing linuxppc-dev

I really don't know what should be done.  It seems to make sense to
have the PCI layer enable interrupts.

This seems to be a powerpc-specific bug, but I don't know enough of
the PCI subsystem.

--=20
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: Hotplug on PPC4xx
From: Michael Ellerman @ 2009-04-08  0:27 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev
In-Reply-To: <20090407192728.7218eea9@lappy.seanm.ca>

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

On Tue, 2009-04-07 at 19:27 -0400, Sean MacLennan wrote:
> On Mon, 6 Apr 2009 18:20:23 -0400
> "Sean MacLennan" <sean.maclennan@ottawa.kanatek.ca> wrote:
> 
> > I am trying to run the /sbin/hotplug from the kernel and it doesn't
> > work. Has anybody got it running?
> 
> I looked into it some more. It turns out that the env pointers are
> freed before they are copied.

That sounds like a bug?

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

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

^ permalink raw reply

* Re: AMCC 440EP phy detection
From: Eddie Dawydiuk @ 2009-04-08  0:10 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa40904071011n22084931wc8900606fd62f167@mail.gmail.com>

Hello,

Thanks for the suggestions :)

I found the ibm_newemac driver(2.6.29) makes the assumption that the bootloader 
has already configured the tx enable pin as it is a multiplexed pin. 
Unfortuantley I am not using U-Boot and our minimal bootloader does not do this. 
  After finding tx enable was never asserting for Eth0 a quick user space 
program verified tx enable was configured as a GPIO pin.

> On Tue, Apr 7, 2009 at 9:32 AM, Eddie Dawydiuk <eddie@embeddedarm.com> wrote:
>> Hello,
>>
>> I'm working on a board based on the Yosemite AMCC 440EP eval board. I'm
>> having some difficulty getting both network interfaces working. The first
>> problem I found is the ibm_newemac driver was detecting the two phys at
>> address 0 and 1 where we have them wired for addresses 1 and 3. As a result
>> I hardcoded the phy-address in the dts file. I then found I was able to
>> receive and send data on eth1(phy-address 3) without incident. Although I
>> found eth0 can receive data but I see no packets being transmitted(using a
>> packet sniffer) and I see no indication from a software standpoint of any
>> transmit failures. We are using Micrel KSZ8041FTL phys(RMII mode) where the
>> Yosemite board used Micrel KS8721BL phys.  I've reviewed the schematic and
>> it appears both phys are connected identically and I've seen this same
>> failure on multiple boards. I thought the fact that the driver detected a
>> phy at address 0 might be a clue, but I can't make much of the clue. So I
>> thought I'd post this info in the hopes someone else might have run into a
>> similar problem or have a suggestion.
> 
> Phy address 0 is the broadcast address.  All phys will usually respond
> to address 0 accesses.  Off the top of my head, It sounds like one PHY
> is responding to addresses 0 & 1, and the other phy isn't responding
> at all.
> 
> g.
> 


-- 
Best Regards,
________________________________________________________________
  Eddie Dawydiuk, Technologic Systems | voice:  (480) 837-5200
  16525 East Laser Drive 	     | fax:    (480) 837-5300
  Fountain Hills, AZ 85268            | web: www.embeddedARM.com

^ permalink raw reply

* Re: [PATCH] powerpc/oprofile: dump_pmcs() is not used
From: Michael Ellerman @ 2009-04-08  0:06 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Kumar Gala, afleming
In-Reply-To: <AE9B4B27-F781-4C0B-9E17-79F3E7C78CF7@kernel.crashing.org>

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

On Tue, 2009-04-07 at 14:42 -0500, Kumar Gala wrote:
> On Apr 6, 2009, at 9:03 AM, Kumar Gala wrote:
> 
> >
> > On Apr 6, 2009, at 8:45 AM, Michael Ellerman wrote:
> >
> >> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> >> ---
> >> arch/powerpc/oprofile/op_model_fsl_emb.c |    2 ++
> >> 1 files changed, 2 insertions(+), 0 deletions(-)
> >>
> >> Or should we just remove it?
> >
> > I'm for removing it if Andy doesn't have any issues.  Someone can  
> > always add it back as debugfs code in the future if they want it.
> 
> I chatted w/Andy and we both agreed to just remove the code rather  
> than #if 0 it.  If you send me a patch with that I'll apply it.

Cool, done.

Delegated to you in patchwork too. I was going to mark the old one as
superseded but I won't mess with it while it's delegated to you.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

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

^ permalink raw reply

* [PATCH] powerpc/oprofile: Remove unused dump_pmcs() in FSL oprofile
From: Michael Ellerman @ 2009-04-08  0:02 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, afleming

It's still in the git history if anyone wants it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/oprofile/op_model_fsl_emb.c |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/oprofile/op_model_fsl_emb.c b/arch/powerpc/oprofile/op_model_fsl_emb.c
index 91596f6..62312ab 100644
--- a/arch/powerpc/oprofile/op_model_fsl_emb.c
+++ b/arch/powerpc/oprofile/op_model_fsl_emb.c
@@ -228,20 +228,6 @@ static void pmc_stop_ctrs(void)
 	mtpmr(PMRN_PMGC0, pmgc0);
 }
 
-static void dump_pmcs(void)
-{
-	printk("pmgc0: %x\n", mfpmr(PMRN_PMGC0));
-	printk("pmc\t\tpmlca\t\tpmlcb\n");
-	printk("%8x\t%8x\t%8x\n", mfpmr(PMRN_PMC0),
-			mfpmr(PMRN_PMLCA0), mfpmr(PMRN_PMLCB0));
-	printk("%8x\t%8x\t%8x\n", mfpmr(PMRN_PMC1),
-			mfpmr(PMRN_PMLCA1), mfpmr(PMRN_PMLCB1));
-	printk("%8x\t%8x\t%8x\n", mfpmr(PMRN_PMC2),
-			mfpmr(PMRN_PMLCA2), mfpmr(PMRN_PMLCB2));
-	printk("%8x\t%8x\t%8x\n", mfpmr(PMRN_PMC3),
-			mfpmr(PMRN_PMLCA3), mfpmr(PMRN_PMLCB3));
-}
-
 static int fsl_emb_cpu_setup(struct op_counter_config *ctr)
 {
 	int i;
-- 
1.6.2.1

^ 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